simple stats graphs break when complex or lower screen res

8 months 1 week ago #172347 by mikebb
I mentioned squished and broken graphs in a previous thread and the dev said he could not replicate it.
I've narrowed it down to the following when showing answers to a flexible array question:
- lots of answer categories (on the x axis) and/or
- long text strings on the answers (x axis labels) and/or
- lower screen resolutions (still above the specified minimum) and/or higher than 100% font size (in windows).

all this makes for broken graphs like in the first screenshot (browser showing 90%). if the screensize is changed or the browser zoomed out then the graphs display fine - see screenshot 2 (browser showing 80%).
These are on a 2560x1440 display with text size 175% (my eyes are poor) using LS 3.14.3+180809. same/similar on Edge, chrome and firefox (all latest).
I think the problem is in chart.js and the sizing it sets in its container using bootsrap columns. Interestingly complex stats does not have this problem where the charts are held in tables - ie not relying on bootsrap's layout.

I don't understand chart.js enough to know a solution. I wonder if its about the div size at holds the chart before chart does its building and sizing - there's some thread about on this.

Work-arounds are:
  • use a higher screen resolution - not easy for some!
  • collapse the side bar and reload the page (so there's more horizontal space).
  • use short answer categories or re-design your question texts
  • set
    responsive: !0
    in chart.min.js - I un-minned it to do this so I can control scroll to quickly find a resolution that works.
  • avoid flexible array graphs

If you think this is a bug I can do a bug report - I think a fix would make limesurvey more useful.

Browser at 90% - broken

Browser at 80% - OK

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
8 months 1 week ago #172374 by holch
Why opening a new thread if this (or part of this) has been discussed in another thread before?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

8 months 1 week ago - 8 months 1 week ago #172417 by mikebb
holch - I opened a new thread as the other one i referred to was mainly about a different issue where this matter was a minor part of it that I added to main question. And that issue (click here) was resolved by an update.
so I didn't want to hijack a dead thread.
I can move that back if you prefer.
Last edit: 8 months 1 week ago by mikebb.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!