How can I get the title of an image to use it as Data in HighCharts

How can I get the title of an image to use it as Data in HighCharts

oakmeseoakmese Posts: 9Questions: 4Answers: 0
edited January 2023 in Free community support

Hi,

I'm trying to get the Datas in my Datatable to use it my in HighCharts but I have images in some columns, I want to get the title of the images to use it as Datas name in my HighCharts chart.

I tried this :

table
.column(2, { search: 'applied' })
.data()
.each(function (val) {
if (counts[val]) {
counts[val] += 1;
} else {
counts[val] = 1;
}
});

        // And map it to the format highcharts uses
        return $.map(counts, function (val, key) {
            var key = $('img').attr('title');
            return {
                name: key,
                y: val,
            };
        });

My chart is displayed but not the title of my images.

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.