Skip to content

Charts

The Element Charts library is a collection of charts based on ECharts. It features a variety of chart styles for different kind of datasets. The source code can be found in the charts-ng folder.

Usage

The first step to select the correct type of chart is to understand the type of data, use context and functionality of the chart.

Please take in consideration what do you want to communicate to the user and select the chart based on your analysis. The following graphic is a suggested chart usage. Use good judgement to select the best representation for the data available.

Chart Decision Tree

There is also a Generic Chart which provides full flexibility by supporting all ECharts options.

More examples can be found in our playground by filtering for si-charts.

Axis and Labels

The axis and labels of a chart are crucial to provide context and structure to the data being displayed. Use clear, concise and accurate metrics to reflect the information.

Up to two axis can be shown on a chart if needed. In this case, both axes should be scaled consistently to ensure accurate comparison. Be mindful about using two axis since they are more complex and difficult to interpret than single axis charts.

Dual Axis Chart

Missing Data

Use a range band to represent instances where there is no data available for a specific time period.

Use Empty State if the data cannot be retrieved for the whole chart.

Missing Data Chart

Legends

Legends are a key or explanatory notes that add context and meaning to data represented within the chart.

The legends are positioned at the top right of the chart. Depending on the context, it's possible to position the legends at the right bottom or right to the graph.

  • When possible, order the items in the legend to match the order of the data in the chart.
  • Avoid using a legend if there is only one category of data.

Interactions

Chart Interactions

Select to Hide

Data series can be hidden/shown by selecting the corresponding legend.

Data Switch

If needed, use a Select component to allow the user to switch between different data sets or representations within the same chart.


Except where otherwise noted, content on this site is licensed under MIT License.