Example of Error Bar in Angular Chart Component

This sample shows the errors in the quantity of different items with an error bar chart.

Quantity vs Items
Description

In this example, you can see how to render and configure the error bar chart. An error bar chart is used to indicate the error or uncertainty in the reported measurement.

Chart supports the following error bar types.

  • Fixed - Renders a fixed type error bar.
  • Percentage - Renders a percentage type error bar.
  • StandardDeviation - Renders a standard deviation type error bar.
  • StandardError - Renders a standard error type error bar.
  • Custom - Renders a custom type error bar.

Tooltip is enabled in this example. To see the tooltip in action, hover over a point or tap on it in touch-enabled devices.

Injecting Module

The Charts component’s features are segregated into individual feature modules. To use error bar, we need to inject ErrorBarService into the @NgModule.providers section.

More information about the error bar can be found in this documentation section.