Hey everyone!
With the Labour Day holidays coming up, we’d like to let you know about our upcoming working hours:
Thursday, May 1st: Our team will be off during Labour Day.
Friday, May 2nd: We'll also be off for an extended holiday break.
We’ll be back on Monday, May 5th, ready to respond to all messages received during this time.
In the meantime, if you need help, feel free to:
-
Use the support widget on the bottom right of our websites (Amelia and wpDataTables) — our AI-powered assistant is available 24/7 and can help with many common questions.
-
Visit our documentation, articles, or YouTube channels for quick answers and step-by-step guides.
https://www.youtube.com/@AmeliaWordPressBookingPlugin/videos
https://www.youtube.com/@wpDataTables/videos
Thank you for being so understanding, and we hope you enjoy the long weekend!
Hi
I am trying to use the callback feature to make a change to the wpDataTablesChart for charts.js. e.g. change the chart colour
and changing the chart number to 12 for my chart. as follows
<script> jQuery(window).load(function() {
if (typeof wpDataChartsCallbacks == 'undefined')
{ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[2] = function(obj) { obj.options.chart.backgroundColor = '#F7F7F7';
obj.options.plotOptions = {
series: {
dataLabels: {
enabled: true,
color: '#FF0000'
}
}
}
} });
</script>
[wpdatachart id=12]
hopefully an easy answer, am I inserting the JS code in the correct place namely just after or before the shortcode [wpdatachart id=12] within my elementor accordion.
Placing the code before or after the above shortcode simply displays the JS code on the page, so is not executing, should the JS code be placed elsewhere in my system ??
Many Thanks
Colin
Hi Colin,
Thank you for your purchase.
All you have to do is take the code and paste it in your Text Editor. If you are using some page builder or anything else that is not standard wordpress Text editor you have to find option how to insert javascript on that page or to contact support of that plugin to find out how to achieve this.
When you find this we notice that id of the chart are not the same in wpDataChartsCallbacks and in shortcode which can cause not applying changes that you made with this callback. You can find examples of wpdatachart callbacks in our Support Help Center.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan
Many thanks for your quick reply, good advice re the ID, I had assumed they were the same !!, I will explore my options of calling javascript within my environment namely latest versions of
Wordpress
Generatepress Pro Theme
Elementor Page Builder
wpDatatables, wpDataCharts plugins
Best Regards
Colin
Hi Colin,
We are not familiar with Elementor Page Builder but I suppose that they have option that you can insert javascript code on page. I believe that you will find that option.
Best regards.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan
I have looked at your support pages which are very helpful.
I believe you simply paste the JS code and wpDataCharts shortcode into an HTML Widget on the page, which I have just done a test below and although there are no errors it is not responding to in this case displaying the title Test Chart Title
Contents of HTML Widget within Elementor
<script type="text/javascript">
jQuery(window).load(function(){
if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
wpDataChartsCallbacks[12] = function(obj){
obj.options.plotOptions = {
series: {
dataLabels: {
enabled: false
}
},
title: {
display: true,
text: 'Test Chart Title'
}
};
};
});
</script>
[wpdatachart id=12]
I will continue to test ..
Thanks Colin
Hi Colin,
I am glad that you find usuful informations in our new Support help center.
For future testing some advices:
Best regards.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan
Some good advice thanks, I will take a look at these other resources before submitting a ticket in future, I already use stackoverflow.com, a great resource.
My most important use of callbacks is in another area but critical to the success of my website, I will describe it briefly as follows :-
I have a sorder table for direct debits of the form
id, 1
code, SWW
name, south west water
frequency, monthly
date_from, 31/09/18
date_to, 31/07/19
amount, £300
After the INSERT of this row I need to trigger a procedure or callback to write the corresponding rows for each month to a sorder_line table as follows :-
date, sorder_id, £300
31/09/18, 1, £300
31/10/18, 1, £300
until
31/07/19
I have written a procedure to perform this activity and it works, but I don't believe I can call this procedure using wpDataTables, so I need a callback or hook to do this automatically after an INSERT of a wpDataTable row of the MySQL sorder table.
If you can provide an indication of how I can trigger either my procedure or configure another method that would be appreciated. Also shall I raise this as another call, many thanks.
Best Regards
Colin
Hi Colin,
You can't use procedures directly in our MYSQL query box, but you can take a look in our documentation about Actions and Filters which are defined in wpDataTables plugin for customization's by developers.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan
Thanks for your reply, I will see if it is possible to achieve my objectives using the actions and filters and post my results, likely over the weekend.
Best Regards
Colin
Hi Colin,
You are welcome.
Best regards.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables