Hey everyone!
With the holiday season upon us, we want to share our upcoming working hours:
- New Year: Our team will be off on January 1st and 2nd. We’ll be back on Friday, January 3rd, to respond to any messages received during this time.
- Weekend: As usual, we don’t work on weekends, so January 4th and 5th will also be non-working days.
- Orthodox Christmas: Our office will be closed on Monday and Tuesday, January 6th and 7th for the holiday.
After that, we’ll return to our regular schedule and assist you as quickly as possible.
In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.
Thanks a bunch for your understanding and support!
Warm regards and happy holidays!
TMS
Hi,
Please take a look at the test site/URL https://aialphalab.com/fund-interest-gammel/. I have inserted line charts using Google and ApexCharts.
I need to be able to edit the dates on the x-axis. It looks rather weird now. Google per standard use the first letter of some months...Apex is just...crowded!
As far as I have been able to read I need to use callbacks. No idea what it is but it involves inserting some code somewhere.
Can you tell me:
Best,
Morten
Hi Morten,
You are correct.
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 our end within the plugin's built-in User Interface.
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.
On this page you will find, our developers made one custom callback example for each Chart Engine,
and you will then need to modify that example to edit the option of the chart you need.
-
When it comes to inserting this custom callback code,
you can either insert it in our main plugin settings/Custom JS and CSS/Custom JS,
or it is better to insert it directly on your WordPress Page where you have the Chart, as Custom HTML, wrapped inside a HTML "script" tag, like this
"<script>...your code...</script>".
I hope that helps.
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
Hi Milos,
I got a bit further. I'm using Google Charts and have used the callback function to remove the padding Google adds to the chart as standard (which makes the chart fill out only 50% of the container) and made the tooltip include both graphs.
As I have no coding background I'm pretty satisfied with myself so far :-) You can see the chart here. The code looks like this:
<script type="text/javascript">
jQuery(window).on('load',function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[4] = function(obj){
obj.options.chartArea = {left:135,top:30,width:'100%',height:'75%'};
obj.options.focusTarget = ['category'];
}
});
</script>
But...I have not been able to solve the issue with the horizontal axis. I want to be able to control which dates goes in the horizontal axis. I have been looking in the Google API documentation and found the object I need (hAxis.ticks) but I just can't make it work. No matter what I do, It has zero impact on the dates shown.
This is the code I'm working with now:
<script type="text/javascript">
jQuery(window).on('load',function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[4] = function(obj){
obj.options.hAxis.ticks = hAxis: {
ticks: [new Date(2020,1,1), new Date(2021,1,1), new Date(2022,1,1), new Date(2023,1,1)]
}
});
</script>
Can you help me?
Best,
Morten
Hi again,
Managed to solve the question below. This code works:
<script type="text/javascript">
jQuery(window).on('load',function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[4] = function(obj){
obj.options.chartArea = {left:135,top:30,width:'100%',height:'75%'};
obj.options.focusTarget = ['category'];
obj.options.hAxis.ticks = [{v: new Date(2020, 1, 1), f: '2020'}, {v: new Date(2021, 1, 1), f: '2021'}, {v: new Date(2022, 1, 1), f: '2022'}, {v: new Date(2023, 1, 1), f: '2023'}];
}
});
</script>
Only thing that remains now is how I get each year to center under each of the vertical gridlines? Right now the year/text starts at the gridline - if it makes sense.
Do you know?
Hi Morten,
i am glad to see that you found a solution for the previous question,
we will make note of this, and will do our best to add more custom examples of Chart callbacks on our Documentation in the future.
2. In regards to getting each year to center under each of the vertical gridlines;
I am sorry, but at the moment we do not have any working example to for something like this.
You can check out our examples for wpDataCharts callbacks.
On that page our developers made one custom example for each Chart Engine;
so you will have to search on the Chart Engine's API documentation which options you need to change to achieve your goal,
and you need to modify one of our examples to your use case.
Of course, you can also research online on places such as Stack Overflow and similar, if any other user has managed to change the option(s) you need.
I hope that helps.
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
Alright, I will try Stackoverflow. They also helped me with the code below :-)
Let's close this ticket.
Best,
Morten
Hi Morten,
no problem, i hope that it helps.
Please don't hesitate to open new tickets if anything new comes up.
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