KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

ChartJS error bars plugin #2298

Open Nick Hartt opened this topic on on Aug 24, 2021 - 1 comments

Nick Hartt commented on Aug 24, 2021

Something that we would appreciate is the ability to load custom plugins, or at the very least plugins that are not natively supported by KoolReport. We currently would have to edit KoolReport's files to add plugins, and even then due to the issue we have reported with plugins not loading correctly there is a chance that the plugin does not work at all. We want to use, specifically, the error bars plugin (https://github.com/datavisyn/chartjs-plugin-error-bars) for ChartJS; this would allow us to reproduce charts that summarise data over time, where we use the error bars to represent the standard deviation at each data point. We have tried adding the plugin ourselves, but due to its architecture we cannot add the required field to the dataset. How would we go about getting this, or a similar plugin, to work?

Note: we need to be able to generate charts in an offline intranet system so cannot use Google Charts.

Sebastian Morales commented on Aug 25, 2021

I see your problem. We will make Chartjs be able to load user's custom plugin files, not only the predefined ones in the next version.

Regarding the error bars plugin's special data, i.e "errorBars" object, I think you would have to extends Chartjs' BarChart, LineChart, etc classes and override the "processData" method to add "errorBars" to the data yourself. Let us know if you have any problem using this approach. Rgds,

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
suggestion

ChartJS