Chart (Gravity UI Charts)
You can use this chart type to render various charts with the @gravity-ui/charts library.
For available types of visualizations, see the library overview.
The library is currently in alpha.
Structure on the Prepare tab
This tab describes chart configuration with library component properties.
Configuration example for a simple pie chart:
// an example of a simple pie chart
module.exports = {
series: {
data: [{
type: 'pie',
data: [{
name: 'Apple',
value: 70,
}, {
name: 'Cherry',
value: 30,
}],
}],
},
legend: {enabled: true},
title: {
text: 'SeriesName',
style: {fontSize: '12px', fontWeight: 'normal'},
},
}
For available configuration fields, see the developer documentation.
Structure on the Config tab
The Config tab describes the data structure for additional chart features, e.g., cross-filtering. Common format:
module.exports = {
drilldown: {
breadcrumbs: [],
},
events: {
click: [{handler: {type: 'setActionParams'}, scope: 'point'}],
},
}