Line chart - do you add a legend to one variable data visualisation?



  • I started to consider what's the best practice for one-variable data visualization? Shall the legend be included in this case or not? What's important the component headliner indicates what's data refers to so in my opinion it shouldn't be necessary but I would like to hear your opinion 🙂 enter image description here



  • Avoid to show the legend if it only has one entry

    As you said this information could be included in the heading. This is also how Google Sheets does it. There won't be a legend displayed if there is only one data series present.

    If the number of data series is dynamic (e.g. the user can add them at will), you could consider showing the legend to underline the fact that you can display different multiple data series.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2