KoolReport's Forum

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

Charts don't redraw when I collapse sidemenu #1419

Open Roman Halaxa opened this topic on on May 3, 2020 - 2 comments

Roman Halaxa commented on May 3, 2020

Is there a way to trigger charts redraw function manually so I can bind it to menu collapse event? Specifically google charts. Thank you.

KoolReport commented on May 3, 2020

You name the chart and you call {chart_name}.redraw();. Here is the details

Add name to chart:

ColumnChart::create(array(
    "name"=>"mySaleChart"
));

Call redraw() at client-side

mySaleChart.redraw();

Let us know if you need further assistance.

Roman Halaxa commented on May 3, 2020

Hello, thanks for your reply. Is there a way to make this easier? I have quite a bunch of charts in my dashboard and the simplest thing would be to just redraw all of them when menu collapses. Is there a way or do I have to assign name to each of them and then call redraw for each of them, ending up with a long list of names and redraws? Thank you again.

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

None