I will give you an example for the highCharts engine, and later you can use the same method for other engines/options, you just have to modify the chart engine name throughout the hook.
In the functions.php file of your theme, or child theme; insert this :
- This way, it will be applied to all the HighCharts.
- This hook takes three parameters:
1. $highcharts_render_data : which is an array with all the options,
2. $chartID : in case you need it for only some specific charts;
3. and the last one is the $chart_object.
-
In that example, we have changed the position of the Zoom reset button of highCharts from right side to the left, but you can modify it to change the options you need for your charts.
-
This will not be affected by the plugin updates, because these hooks will be saved in your Theme's functions.php
Thank you for your effort and time in addressing this question. Sorry I didn't give any feedback to all your response, I was swamped in some demanding projects. Thanks for the code samples as well. I will try this out. I would also advise that this part is included in the callback documentation. I know its a favour to ask for coding support but it would create more satisfied customers at the end.
I have tried this hook with other options, other than options.chart. For instance this code below shows the hook applied to options.yAxis. Unfortunately it doesn't work. Am I missing anything here.
As a workaround I tried replacing the title.enabled=false with title.text=undefined (since highcharts api documentation says the former is deprecated) as in the following code snippet:
Every chart exposes several options that customize its look and feel. Charts usually support custom options appropriate to that visualization. wpDataChart callbacks allow adding options that are available in Google Charts API, Highcharts API, and Chart.js API.
All necessary resources are available in charts engines API (depends on which one you use). Every engine has a different approach to chart settings. In wpDataChart callbacks, you have to adopt those settings to the wpDataChart object (you can take a look at examples for each engine in our documentation, and also in the Support help center). A huge number of examples for any area of programming can be found on stackoverflow.com (typing your problem in google and at the end add "site: stackoverflow.com" and Google will search only that website). Also, a lot of examples of charts, chart settings, and customization can be found on jsffidle.net (typing in google for example "line chart highcharts jsffidle")
I am sorry that we are not able to provide further assistance on this matter.
Of course, if you have any other questions, please don't hesitate to open new tickets and we will advise. Thank you
Dear Team,
I know I can apply callbacks per chart with;
jQuery(window).on('load', function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[chartID] = function(obj){
obj.options.plotOptions = {
series: {
// some options //
},
}
};
})
What do I do if there is an option I want to get applied to all the charts instead of a single chart at a time? Is this possible?
Thanks,
Hi, Kessy
Thanks for reaching out to us.
I believe that our developers confirmed that it should be possible to apply the same Chart callback to all charts,
i just can't seem to find a note with the example anywhere, so i will have to check with them to be sure.
I will reach out to them, and as soon as they confirm, i will report back right away.
Thank you for your patience.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Hi, Kessy
I just want to say that i am still following this case,
my apology for all this waiting time.
We still did not get confirmation if we can get a callback like that applied to all the charts ,
At this point we should get the confirmation very soon, you have already been waiting for a long time.
Thank you for all your patience on this, we will report back again as quickly as possible with a confirmation.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Hi, Kessy
Thank you for all your patience on this.
I am happy to confirm that it is possible to create a chart callback that will be applied for all the charts in your plugin at the same time.
Depending on the chart engine, the hooks are slightly different, ( basically just tne chart engine name is different for each hook),
they are :
I will give you an example for the highCharts engine, and later you can use the same method for other engines/options, you just have to modify the chart engine name throughout the hook.
In the functions.php file of your theme, or child theme; insert this :
- This way, it will be applied to all the HighCharts.
- This hook takes three parameters:
1. $highcharts_render_data : which is an array with all the options,
2. $chartID : in case you need it for only some specific charts;
3. and the last one is the $chart_object.
-
In that example, we have changed the position of the Zoom reset button of highCharts from right side to the left, but you can modify it to change the options you need for your charts.
-
This will not be affected by the plugin updates, because these hooks will be saved in your Theme's functions.php
As we noted on the wpDataCharts callbacks Documentation,
using wpDataChart callbacks requires certain level of programming skills and included support refers only to advice.
Let me know if that works for your use-case. Thank you
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Hi Milos,
Thank you for your effort and time in addressing this question. Sorry I didn't give any feedback to all your response, I was swamped in some demanding projects. Thanks for the code samples as well. I will try this out.
I would also advise that this part is included in the callback documentation. I know its a favour to ask for coding support but it would create more satisfied customers at the end.
Regards,
Kessy
Hi Milos,
I have tried this hook with other options, other than options.chart. For instance this code below shows the hook applied to options.yAxis. Unfortunately it doesn't work. Am I missing anything here.
As a workaround I tried replacing the title.enabled=false with title.text=undefined (since highcharts api documentation says the former is deprecated) as in the following code snippet:
This also doesn't work
Regards,
Kessy
Hi, Kessy Juma
I will pass these details to our 2nd level Team and they will check what we can do.
I am not 100% sure how much we can help, but we will do our absolute best, as much as our support is capable to cover.
As soon as they advise, i will report back right away.
Thank you for your patience.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Hi, Kessy Juma
Apology for all the waiting time.
We did our best with our 2nd level Team to find any kind of a working example that might help you create your custom callback for your use-case,
but unfortunately, this kind of solution would require a high level of custom work that is not covered by our support.
You will have to modify and customize the code in order to get your solution.
You can check out all the available chart engines and examples of wpDataCharts documentation here .
If the options you need are not in the chart creation wizard, you can try to find a custom solution using chart callbacks.
You can check our documentation about wpDataCharts callbacks.
I am sorry that we are not able to provide further assistance on this matter.
Of course, if you have any other questions, please don't hesitate to open new tickets and we will advise. Thank you
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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