Line chart visualizations axes don't start at 0

Release notes

Problem to solve

Line charts in Product Analytics don't use 0 as the default value for the y-axis. Instead they use a starting y-value which is based on the underlying data. This is misleading and will cause a viewer to reach different conclusions than what the data is showing. This is the truncated graph class of problem for misleading graphs.

For example, consider the current visualization: image

Now consider the same data visualized with the y-axis starting at 0:

image

These two graphs tell very different stories even though they are using the same data.

Proposal

Default to using 0 as the starting point for the y-axes in a graph.

  • Provide a configuration option for users to specify a starting y-value if they wish.
  • If not explicitly set, use 0.
  • This applies to LineChart currently and will also need to be consider for the ColumnChart when complete

Intended users

Feature Usage Metrics

Implementation plan

For all visualization chart components that use ECharts (besides single-stat):

  • Set options.yAxis.min to 0 if the value is undefined.
  • Update specs.

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by Jiaan Louw