visualize-admin / visualization-tool

The tool for visualizing Swiss Open Government Data. Project ownership: Federal Office for the Environment FOEN
https://visualize.admin.ch
BSD 3-Clause "New" or "Revised" License
29 stars 3 forks source link

For scaleType `Interval` - start y-Axis at lowest value (instead of 0) #1500

Closed sosiology closed 1 month ago

sosiology commented 2 months ago

DoD The y-Axis of chart dimensions of scaleType Interval starts at the lowest value (according to the available data). Dimensions of Ratio scale keep their current behaviour and start at 0.

Is your feature request related to a problem? Please describe. If there is a visualization, where the relevant y-axis is of scaleType Interval values are typically in a limited range of values that is unrelated to zero, letting the y-axis start at zero is not helpful for the visualization. See screenshot:

Image

Describe the solution you'd like For IntervalScale Dimensions there could be a "auto-tune" function to detect the right value range for the y-axis depending on the data that would be displayed. But this function should be only for IntervalScale, while for RatioScale, it is very important that the y-axis starts exactly at zero no matter what the data is. An example how it should loke with "autotune" is given below:

Image

Usecases and impact I think there must be tons of visualizations that would benefit from such a behaviour.

updated description this updated description is provided and coordinated with Sabine and Tobi

related but outdated_ https://github.com/visualize-admin/visualization-tool/issues/1255Usecases and impact

sosiology commented 1 month ago

@bprusinowski can you provide a dataset to test this with?

bprusinowski commented 1 month ago

@sosiology I've added the How to test description to the https://github.com/visualize-admin/visualization-tool/pull/1565 (sorry that it wasn't there in the first place).