I am using your wpDataCharts Callbacks example for the HighCharts API. I am attempting to specify the visibility of each series but have been unsuccessful. It appears that my code modification does not use the data specified in the table. Can you tell me how to modify what I have done? Thank you.
I am using your wpDataCharts Callbacks example for the HighCharts API. I am attempting to specify the visibility of each series but have been unsuccessful. It appears that my code modification does not use the data specified in the table. Can you tell me how to modify what I have done? Thank you.
Here's my code:
jQuery(window).load(function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[2] = function(obj){
obj.options.chart.backgroundColor = '#F7F7F7';
obj.options.chart.zoomType = 'x';
obj.options.chart.panning = true;
obj.options.chart.panKey = 'shift';
obj.options.series =
[{
visible: true,
}, {
visible: false,
}, {
visible: false,
}, {
visible: false,
}, {
visible: false,
}, {
visible: false,
}];
obj.options.tooltip = {
formatter: function () {
var s = '<b>' + this.y + '%</b>';
return s;
}
};
}
});
I figured it out (If there's a better way, please let me know):
jQuery(window).load(function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[2] = function(obj){
obj.options.chart.backgroundColor = '#F7F7F7';
obj.options.chart.zoomType = 'x';
obj.options.chart.panning = true;
obj.options.chart.panKey = 'shift';
obj.options.series[0].visible = true;
obj.options.series[1].visible = false;
obj.options.series[2].visible = false;
obj.options.series[3].visible = false;
obj.options.series[4].visible = false;
obj.options.series[5].visible = false;
obj.options.tooltip = {
formatter: function () {
var s = '<b>' + this.y + '%</b>';
return s;
}
};
}
});
Hi Quint,
Thank you for your purchase.
Looking at your code it looks like there are no changes needed or any modification so good job on writing it.
Hope that everythig is working fine.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables