Hello! I was wondering how can I set my google scatter chart to have equal X axis and Y axis numeric limits. For example, set both axis limits to the highest observed value of the input data.
With plugin's built-in features, something like this is not possible, so you will need to use wpDataCharts callbacks.
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 Support help center). 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")
Please note that using hooks or wpdatatable and wpDataChart callbacks requires certain level of programming skills and included support refers only to advice.
Thanks for the quick response! Indeed the answer could be found in the documentation. Sorry for bringing it to your attention unnecessarily. I post the code I used here for future reference:
The code should be placed just above the code calling the google chart (in my case google chart is constructed by wpdatatables plugin). So, the complete content area looks like this:
Hello! I was wondering how can I set my google scatter chart to have equal X axis and Y axis numeric limits. For example, set both axis limits to the highest observed value of the input data.
Hello John
Thank you for your purchase.
With plugin's built-in features, something like this is not possible, so you will need to use wpDataCharts callbacks.
Kind Regards,
Aleksandar Vuković
[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
Thanks for the quick response! Indeed the answer could be found in the documentation. Sorry for bringing it to your attention unnecessarily. I post the code I used here for future reference:
The code should be placed just above the code calling the google chart (in my case google chart is constructed by wpdatatables plugin). So, the complete content area looks like this:
<script type="text/javascript">
jQuery(window).on('load',function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[90] = function(obj){
obj.options.hAxis.maxValue = 300;
obj.options.vAxis.maxValue = 300;
}
});
</script>
[wpdatachart id=90]
Where [wpdatachart id=90] calls the chart to be placed into the specific area of the page.
Again, many thank!
That's it, John!
I'm glad you were able to find the answers you needed.
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[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