I was wondering if there is a way to change the tree chart colors. When building the tree chart for highcharts it looks like it defaults to a standard green but I couldn't find a place to change it. If not in the UI, is there a way to code a chart on the backend for different colors? Or maybe a way to hook into the specific chart to change the color gradient?
I think I did this right. I found line 1843 in class.wpdatachart.php has the colors for the tree chart. My guess is that an update will overwrite the color changes I make here. If that is true, is there a better way to modify rather than right in file itself? Is there a way to modify with functions.php?
That is the default behavior of the charts engine, but if you need some custom solution you can check our documentation about 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 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.
Hi,
I was wondering if there is a way to change the tree chart colors. When building the tree chart for highcharts it looks like it defaults to a standard green but I couldn't find a place to change it. If not in the UI, is there a way to code a chart on the backend for different colors? Or maybe a way to hook into the specific chart to change the color gradient?
Thank you!
I think I did this right. I found line 1843 in class.wpdatachart.php has the colors for the tree chart. My guess is that an update will overwrite the color changes I make here. If that is true, is there a better way to modify rather than right in file itself? Is there a way to modify with functions.php?
Hi Ryan,
thank you for reaching out to us!
That is the default behavior of the charts engine, but if you need some custom solution you can check our documentation about wpDataCharts callbacks.
Hi Ivana,
Thank you for the information and clarity! That makes more sense now :)
Hi Ryan,
anytime; I'm glad I could help!
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.