This sample shows a category axis in a chart with details about internet users across different countries.
You can use the category axis to represent string values instead of numbers in the chart. To use category axis, set valueType
in axis to Category
.
Tooltip is enabled in this example, to see the tooltip in action, hover a point or tap on a point in touch enabled devices.
Injecting Module
Chart component features are segregated into individual feature-wise modules. To use category feature, we need to inject CategoryService
into the @NgModule.providers
section.
More information on the category axis can be found in this documentation section.