KoolReport's Forum

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

Chartjs plug-ins #1176

Closed Sean opened this topic on on Nov 21, 2019 - 3 comments

Sean commented on Nov 21, 2019

How do I install and use chartjs plug-ins through koolreport? The plug-in that I'm trying to use is https://chartjs-plugin-datalabels.netlify.com/guide/#table-of-contents

David Winterburn commented on Nov 22, 2019

Hi Sean,

To add a chartjs plugin to the Chartjs package, please build your plugin to a final js file and add it to folder chartjs/clients. Then open the file chartjs/Chart.php and replace the following function:

protected function resourceSettings()
    {
        return array(
            "folder" => "clients",
            "js" => array("Chart.bundle.min.js", "chartjs.js"),
        );
    }

with:

protected function resourceSettings()
    {
        return array(
            "folder" => "clients",
            "js" => array("Chart.bundle.min.js", "chartjs.js", array("my-chartjs-plugin.js")),
        );
    }

Hope that helps!

Jason commented on Nov 22, 2019

It worked, now i see the values for each data point, thanks!!

KoolReport commented on Nov 22, 2019

Great!

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
solved

None