KoolReport's Forum

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

ChartJS Height #331

Open Keith Burke opened this topic on on Jun 22, 2018 - 11 comments

Keith Burke commented on Jun 22, 2018

Is there a way to set the height of a ChartJS?

The option is there for google charts. The google charts look fantastic when surrounded by layout divs, When I configure those charts [5 per page] as ChartJS, they all appear full screen and overlap :(

Keith Burke commented on Jun 22, 2018

Oh, and width.

KoolReport commented on Jun 23, 2018

Could you please share your code with ChartJs, I would like to replicate the issue. Or you can send your page with issue to support@koolreport.com.

Keith Burke commented on Jun 25, 2018

Thank you. I've emailed you a copy of two sample reports. One in Google Charts and one in ChartJS. Both are identical other than I've changed the use clause.

The Google Chart one looks perfect where as the ChartJS layout is all wrong.

Google Chart

ChartJS

KoolReport commented on Jun 25, 2018

I received!

Keith Burke commented on Jun 25, 2018

Sorry. I forgot I had htaccess folder protection on too. I'll disable that tomorrow morning.

Keith Burke commented on Jun 26, 2018

htaccess directory protection removed. You should be able to login now. Sorry for wasting some time.

KoolReport commented on Jun 26, 2018

No problem! I have accessed and saw the issue.

Keith Burke commented on Jun 26, 2018

I've noticed something. Apparently ChartJS keeps the width proportional to the height. It respects the width option but not the height. So if I set the Width to 50%, the height reduces by 50%. This is not the behaviour I'd like.

I'd like to set width to 100% and height to 25% or 200px, so I can show multiple chars on the dashboard.

If I'm right, and this can't be easily fixed, I can just move back to Google Charts. It's slower and not as pretty but allows what I want.

KoolReport commented on Jun 26, 2018

Actually it is a feature of ChartJS called responsive. It will remain the width and height ratio so that when page resize, we will not get long but thin chart (for example). Give me a little time I will find solution for you.

Keith Burke commented on Jun 26, 2018

Don't put too much time into it. It's not too important. Google Charts does what we need, just not as nice to look at :)

Daniel Cordeiro commented on Jun 21, 2019

I have the same problem with chartsjs, but in the google chart works very well. Any solution?

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

ChartJS