I am using Google Charts for a line chart including a legend.
I have the legend on top, but it seems the space for having a legend in any other place (especially on the right) is still reserved. So now I have a very noticeable white space on the right side of the chart.
Is it possible to remove this white space? I found some code to do this in native Google Charts, but don't know if I can use it with your plugin. Or how to target it on a specific chart.
You're right, I can see how the Google chart engine leaves that space on the right side.
I tried with some CSS without success, it seems maybe it can only be done via a custom chart callback, similarly as you tried, this just falls under custom work, which is not provided by our Support;
That being said, I will still do my best to see if one of our developers perhaps knows a way to achieve this, but we can't guarantee success.
As soon as they find the time to take a look at this and try to solve it, I will report back.
In the meantime, I will do my best to advise you in general about doing custom chart callbacks via our Plugin :
Every chart engine has its own layout and its settings.
We use free libraries for chart engines, and they are limited as to what we can change from within the plugin's UI.
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.
Let me know if you resolve this from your end in the meantime.
You're welcome, I am happy this advice will be helpful.
You should be able to find the right option(s) for the chart to create the right custom callback. :)
If you try any specific one and if it does not work as expected, you can send us what you tried and our devs can try to see if it needs a small modification.
If anything else comes up, please don't hesitate to create new/additional tickets, too.
Hello support team,
I am using Google Charts for a line chart including a legend.
I have the legend on top, but it seems the space for having a legend in any other place (especially on the right) is still reserved. So now I have a very noticeable white space on the right side of the chart.
Is it possible to remove this white space? I found some code to do this in native Google Charts, but don't know if I can use it with your plugin. Or how to target it on a specific chart.
var options = {
chartArea: {right: 0}
};
Source: https://stackoverflow.com/questions/15754989/google-chart-how-to-make-right-side-of-the-white-space-empty
Can you give me some information how to proceed?
Regards,
Sara
Hi Sara,
You're right, I can see how the Google chart engine leaves that space on the right side.
I tried with some CSS without success, it seems maybe it can only be done via a custom chart callback, similarly as you tried, this just falls under custom work, which is not provided by our Support;
That being said, I will still do my best to see if one of our developers perhaps knows a way to achieve this, but we can't guarantee success.
As soon as they find the time to take a look at this and try to solve it, I will report back.
In the meantime, I will do my best to advise you in general about doing custom chart callbacks via our Plugin :
Every chart engine has its own layout and its settings.
We use free libraries for chart engines, and they are limited as to what we can change from within the plugin's UI.
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.
Let me know if you resolve this from your end in the meantime.
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
Hello Miloš,
The callbacks are exactly what I needed. Now I just have to find the right settings.
Thank you very much. :)
Regards,
Sara
Hi Sara,
You're welcome, I am happy this advice will be helpful.
You should be able to find the right option(s) for the chart to create the right custom callback. :)
If you try any specific one and if it does not work as expected, you can send us what you tried and our devs can try to see if it needs a small modification.
If anything else comes up, please don't hesitate to create new/additional tickets, too.
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