Skip to content

feat: Add ability to override or disable default legend

Tristan Read requested to merge tr-configurable-legend into master

It currently is not possible to provide a custom legend (or use the ECharts legend) for the line chart, area chart, or stacked bar chart. This MR would allow disabling the gitlab-ui legend to use the ECharts config instead.

Another use case is where someone doesn't want to include a legend at all. This would solve that use case.

This came up as part of migrating the security dashboard to use the gitlab-ui line chart. The advantage to using the ECharts legend in this case is that it provides click-to-filter functionality.

This MR proposes one idea for how to provide this flexibility, and could be a discussion point for other avenues to provide such flexibility.

Related Issues

https://gitlab.com/gitlab-org/gitlab-ce/issues/57126

Edited by Tristan Read

Merge request reports