Holiday Notice – Support Unavailable on April 18 and April 21
We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!
In the meantime, if you need any help, feel free to:
-
Use the support widget in the bottom right corner on our websites (Amelia and wpDataTables) — our latest AI-powered assistant is there 24/7 to help with basic and intermediate questions,
-
Browse our detailed documentation (Amelia, wpDataTables)
-
Explore helpful articles,
-
Or check out our YouTube channels for video guides!
Amelia YouTube Channel
wpDataTables YouTube Channel
Thank you for your understanding, and we wish you a wonderful holiday weekend!
I am trying to add a trendline series to an existing chart using the callback. But when I try to use the obj.options.series [], it replaces my existing series with only the new one. How can I add a new series without losing the ones that are there?
https://api.highcharts.com/highstock/series.trendline
function highStockChartCallback(obj) {
//this takes the existing series and adds an ID to the series so I can add a treadline to it. This works as expected.
if (obj.options.series && obj.options.series.length >= 2) {
// Sanitize and update IDs for the first two series
obj.options.series[0].id = obj.options.series[0].name.replace(/[^a-zA-Z0-9]/g, '');
obj.options.series[1].id = obj.options.series[1].name.replace(/[^a-zA-Z0-9]/g, '');
}
//this doesn't work. It removes both series above and only adds this trendline.
obj.options.series = [
{
type: 'trendline',
linkedTo: 'obj.options.series[0].id',
}
];
}
wpDataChartsCallbacks[22] = highStockChartCallback;
Hi Shanda,
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
I am sorry, but for this specific use-case, we did not try something like that yet, so i can't show you an exact example how you can achieve it.
We will show you some other Custom Chart Callback examples, though, and I will do my best to provide as many details as possible that might be useful.
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.
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