frappe / frappe

Low code web framework for real world applications, in Python and Javascript
https://frappeframework.com
MIT License
7.35k stars 3.47k forks source link

Truncated labels on X-axis' Charts #16878

Open gavindsouza opened 2 years ago

gavindsouza commented 2 years ago

Description of the issue

Labels on the X-axis are unreadable when there are "many" points/labels/columns. The labels get truncated from "Augustine" to "Aug..." or with fewer letters depending on the number of points.

Context information (for bug reports)

The truncation happens in the charts library and a fix is due there.

Observed result

Screenshot 2022-05-11 at 1 42 26 PM

Expected result

Some clever way of showing the labels, not sure how exactly this should be fixed.

One way could be something like the following image, although I'm not a fan of it at least it's functional.

IMAGE 2022-05-11 14:14:13

Another way could be adding horizontal scroll and scaling the chart to show untruncated labels.

this-gavagai commented 2 years ago

For what it’s worth, I’m a social scientist who spends a lot of time labeling graphs. The angled label is definitely the standard practice (and I’d argue the best practice).

Setting the chart to scroll just to accommodate long labels leaves the bars far apart and unable to all appear on the same screen, which defeats the purpose of the visualization. Most visualization libraries provide a way to define label orientation.