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
Hello
I need to make a graph with a logarithmic scale.
Do you have a procedure for this?
I searched in the documentation, FAQ,, etc but I did not find it. Thank you for your help.
Hello,
I will do my best to advise what you can try in order to achieve this with a custom callback.
First, just to comment that a chart like this is not possible at the moment just with our built-in options.
You can suggest this as a built-in feature for our developers, if you wish - and they will do their best, to add it in the future if possible.
Please feel free to search on our suggestions page,
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
-
At this time, maybe it can be done with a custom chart callback.
If you wish, you can check our documentation about wpDataCharts callbacks.
-
That being said, I recall another similar ticket where a user wanted to add an option to a Chart as 'logaritmic',
so I will share what he did and he reported it was successful.
-
At first, the user's callback looked like this :
<script type="text/javascript"> jQuery(window).on('load', function(){ if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; } wpDataChartsCallbacks[4] = function(obj){ obj.options.yAxis.type = 'logarithmic'; }
} }); </script>
Then our devs checked it, and they fixed his code,
there was one "bracket" that was unneeded " } " in the code,
so the user had an error in the browser's Console;
and the script was not applied.
You can check in your browser Developer console if you try
wpDataCharts[4].render_data.options.yAxis.type
It should say logarithmic, if so that means it is being applied.
Our devs are not sure if you need anything else regarding the visual/look,
but you can find everything you need in our Documentation for developers here,
where our devs displayed the available hooks and parameters for them.
-
After that, the user was still not achieving the desired goal, but he came back and said this :
I found the solution. The syntax for the callback should be
obj.options.yAxis = {type:'logarithmic'};", not "obj.options.yAxis.type = 'logarithmic';".
I've mplemented it for [wpdatachart id=6], and now I see what I expected to see in the webpage.
-
After this, another user came back, and commented : I implemented the syntax change in the front-end callback, so it now reads: [wpdatachart id=5]
<script type="text/javascript"> jQuery(window).on('load',function(){ if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; } wpDataChartsCallbacks[5] = function(obj){
obj.options.xAxis = {
type:'logarithmic' };
} }); </script>
This generates the correct logarithmic scaling, but now the X-axis series is ignored and only the row index of the data points are shown. The data table has 10000 rows; the series defining the X-axis ranges from 0.1 to 100. So the ticks should start at 0.1 and go up to 100. The tooltip also shows now that the X-axis series is just the row index. (See attached.) -
Then he said this :
By implementing this front-end callback, I was able to generate the correct plot:
<script type="text/javascript"> jQuery(window).on('load',function(){ if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; } wpDataChartsCallbacks[5] = function(obj){ obj.options.plotOptions.series = {pointStart: .1, pointInterval: .01}; obj.options.xAxis = {type:'logarithmic' };
} }); </script>
So the key thing is that a pointStart and interval must be specified.
This of course requires uniform spacing for the input series defining the X-axis.
-
That is the best we have at the moment when it comes to custom examples and what another user managed to achieve, they said this worked for them. I hope it 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
Thanks for the reply, I'll try your advice. Have a nice day
André
Hello André,
Just following up,
No problem, i am happy to advise, we hope that our suggested custom example will work for you.
Our developers will add more custom Chart Hook examples and Custom hook examples in general to our Documentation soon,
so we hope that will help as well.
Anything else that we could assist with, please don't hesitate to create new tickets.
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