I have created different wpDataCharts for my tables. There is a small bug in the Highcharts variant pie chart. All others seem to be ok. If you select the table view in the diagram menu (top right), the name "Category" is always displayed as the column heading for the first column. Everything is correct in the bar charts, there the labeling of the "horizontal axis as column heading" is adopted as the column heading in the table view. This setting can be found in the axis settings. However, this axis designation does not exist in the pie charts. I think that's why there is no designation that can be used for the column heading. Could you please take a look at this? Thanks very much.
There are no series in pie charts, so there are no options to edit their labels.
The only way you can add/remove labels and/or change colors of pie charts is through wpDataChart Callbacks. On this page you can see how the colors can be changed, and on this page, you can see how you can remove dataLabels and add a legend to the pie chart.
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")
Please note that using hooks or wpDataTable and wpDataChart callbacks requires a certain level of programming skills and included support refers only to advice.
Thank you Aleksandar for your quick reply. Unfortunately it didn't help me. What you recommended me is not my goal. Please follow your second sent link to change the colors. If you now click on "view data table" in the menu, you will see the problem on your own page. Again, the first column heading of the table is "Category". This is a bug for me. Regardless of the table and content, the column heading is always "Category". I tried to resolve this name via wpDataCharts callbacks. I've tried different things, but it was unsuccessful. Any ideas?
I have now inserted the table at the bottom of the chart. So you can see both. Is the information enough for you or do you need more? Here is the link to the table and chart page.
I'll definitely add it as a saved response for our agents, but since the callback applies to the first column only when it's exported, I don't know if our management will want it added to the FAQ page.
Anyway, thank you for the callback, and please feel free to reach out to us if you need some further assistance!
I have created different wpDataCharts for my tables. There is a small bug in the Highcharts variant pie chart. All others seem to be ok. If you select the table view in the diagram menu (top right), the name "Category" is always displayed as the column heading for the first column. Everything is correct in the bar charts, there the labeling of the "horizontal axis as column heading" is adopted as the column heading in the table view. This setting can be found in the axis settings. However, this axis designation does not exist in the pie charts. I think that's why there is no designation that can be used for the column heading. Could you please take a look at this? Thanks very much.
Greetings, Torsten
Hello Torsten
Thank you for your purchase.
There are no series in pie charts, so there are no options to edit their labels.
The only way you can add/remove labels and/or change colors of pie charts is through wpDataChart Callbacks. On this page you can see how the colors can be changed, and on this page, you can see how you can remove dataLabels and add a legend to the pie chart.
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
Thank you Aleksandar for your quick reply. Unfortunately it didn't help me. What you recommended me is not my goal. Please follow your second sent link to change the colors. If you now click on "view data table" in the menu, you will see the problem on your own page. Again, the first column heading of the table is "Category". This is a bug for me. Regardless of the table and content, the column heading is always "Category". I tried to resolve this name via wpDataCharts callbacks. I've tried different things, but it was unsuccessful. Any ideas?
Greetings, Torsten
In the meantime I've found something:
https://stackoverflow.com/questions/55257457/change-highcharts-pie-chart-xls-file-category-column-name
I tested it, it doesn't seem to work with wpDataCharts. But I think we're close to a solution.
Greetings, Torsten
Ok, problem solved. Here is the code:
<script type="text/javascript">
jQuery(window).on('load',function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[4] = function(obj){
obj.options.exporting.csv = {
columnHeaderFormatter: function(item, key) {
if (!key) {
return 'custom title'
}
return false
}
}
}
});
</script>
Thank you and good luck. :-)
Greetings, Torsten
Awesome, Torsten, thank you for that.
I've added it to my personal log for future reference, but it's great that this is a public ticket, so it's accessible to everyone.
Can you please show me the table you used for this, and which columns were used in the chart, so we can create something similar on our FAQ page?
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
I have now inserted the table at the bottom of the chart. So you can see both. Is the information enough for you or do you need more? Here is the link to the table and chart page.
Greetings, Torsten
Awesome, Torsten, thank you!
I'll definitely add it as a saved response for our agents, but since the callback applies to the first column only when it's exported, I don't know if our management will want it added to the FAQ page.
Anyway, thank you for the callback, and please feel free to reach out to us if you need some further assistance!
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