KoolReport's Forum

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

Google chart InterpolateNulls #834

Open Wessel Verheijen opened this topic on on Apr 26, 2019 - 2 comments

Wessel Verheijen commented on Apr 26, 2019

Hi!

I have a joint table that looks like this:

In pn2 and realizations, the 0 values are passed to the Table and AreaChart class as nulls (which I want them to be), but the visuals turn them in to 0's.

In Google charts, there should be an option "interpolateNulls" which makes the line skip the null or 0 values. I've tried to add these in the "options" parameter of AreaChart::create(... But that didn't work.

Can you help me solve this problem?

Kind regards,

Wessel

David Winterburn commented on Apr 27, 2019

Hi Wessel,

Please open the file koolreport/srcwidgets/google/Chart.php, go to function prepareData() and replace the following line:

if ($cType === "number") {

with:

if ($cType === "number" && $value !== null) {

Then add the option 'interpolateNulls' => true to "options" parameter in AreaChart::create to see if it works for you.

We will consider the prepareData function more in the future versions of the Google Chart class. Thanks!

Wessel Verheijen commented on Apr 29, 2019

This worked perfectly! Thanks very much.

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
help needed
solved

Laravel