We're Moving to a New Support Platform – Starting June 1st!
We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.
You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.
While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.
We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.
Thanks for your continued support and trust – we’re excited to bring you an even better support experience!
Is there a way to turn on
using the wpDataCharts callbacks feature?
I know you can turn them on for Export, but I was wanting to turn them on in GUI display.
Hi Michelle Lawson,
Happy New Year and Thank you for your purchase.
Yes it is possible to enable data labels with callback. Here you can find example how to use wpDataCharts callback for Highcharts - http://wpdatatables.com/documentation/information-for-developers/wpdatacharts-callbacks/
And here you can find in Highcharts documentation and in JSFiddle how you can enable them data lables - Link - JSFiddle
Yep, I tried that. It didn't work. I even cut/pasted your example exactly (except I changed the chart ID) and nothing happens.
I am putting the javascript at the bottom of the page that has the chart, so it loads after highcharts.js loads. There are no javascript errors, but there is also no change to the chart what-so-ever. The chart is generated via JSON data.
Any ideas on what could be going wrong would be greatly appreciated.
Hi Michelle Lawson,
Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. You can write credentials here just check PRIVATE so nobody can see it except us.
Unfortunately it is on an internal site that is behind a firewall. What would you do to analyze, where would you start? Could it be a plugin conflict?
Hi Michelle Lawson,
What version of the plugin do you have? wpDataChart callback is implemented from version 1.6.2. Please send me the code that you added to customize your chart so I can take a look.
You tried also example from our documentation and it's not working?
I deactivated every plugin except wpDataTables and it still doesn't work. So I assume a plugin conflict is not the issue.
Hi Michelle Lawson,
No plugin conflict can't be an issue with wpDataChart callback. What version of the plugin do you have?
Please send me the code that you added to customize your chart so I can take a look. You tried example from our documentation and it's not working?
I am running Version 1.7.
At this point I am just trying something simple from your example like:
[wpdatachart id=2]
which is a "Basic Column Chart"
here is JSON that I am using:
[{"date_mo":"Jan","date_dow":"Sun","date_dom":"01","initiated_ts":"2017-01-01","app_count":"35"},{"date_mo":"Jan","date_dow":"Mon","date_dom":"02","initiated_ts":"2017-01-02","app_count":"856"},{"date_mo":"Jan","date_dow":"Tue","date_dom":"03","initiated_ts":"2017-01-03","app_count":"638"},{"date_mo":"Jan","date_dow":"Wed","date_dom":"04","initiated_ts":"2017-01-04","app_count":"18"}]
columns used in chart are:
and in javascript I have
jQuery(window).load(function() {
if (typeof wpDataChartsCallbacks == 'undefined') {
wpDataChartsCallbacks = {};
}
wpDataChartsCallbacks[2] = function(obj) {
obj.options.chart.backgroundColor = '#F7F7F7';
}
});
Hi Michelle Lawson,
Do you maybe have Team Viewer? If you have please send me your Team Viewer login and I will login to take a look. Just check PRIVATE so nobody else can see them.
Thanks for your assistance Milos in resolving location of javascript.
Back to my original issue, I am trying to display the dataLabels on the graph. That still doesn't work and I'm sure its something simple I'm doing wrong.
<script>
jQuery(window).load(function() {
if (typeof wpDataChartsCallbacks == 'undefined') {
wpDataChartsCallbacks = {};
}
wpDataChartsCallbacks[2] = function(obj) {
obj.options.chart.backgroundColor = '#F7F7F7';
obj.plotOptions = {
series: {
dataLabels: {
enabled: true,
color: '#FF0000'
}
}
}
}
});
</script>
I've tried series and bar.
I also tried plotOptions.series.dataLabels.enabled = true (which throws all kinds of errors because its trying to reference null objects). On the other hand, the above does not throw an error, but also does not display dataLabels.
Nevermind, I got it!
obj.options.plotOptions
duh!
Thanks for all your help!
Hi Michelle Lawson,
You should write obj.options.plotOptions instead obj.plotOptions and it will work.