AutoChart
AutoChart = (props: Props): <ConfigProvider />
AutoChart
is an immediate auto visualization React component in AVA.
It can automatically generate and render the proper chart for visualization based on the input data with one-line of code.
Parameter list
-
props * Input parameters
- required parameters
type
: Props object
- Props Parameter configuration.
Properties | Type | Description | Default |
---|---|---|---|
data | any[] | The source data. | Default mock panel Optional |
fields | string[] | Recommended data fields. | Use all Optional |
title | string | The title of the container. | None Optional |
description | string | The container description information. | None Optional |
width | React.CSSProperties['width'] | Width. | 100% Optional |
height | React.CSSProperties['width'] | Height. | 100% Optional |
className | string | The class name of the container. | None Optional |
language | "zh-CN" | "en-US" | Language. | "zh-CN" Optional |
purpose | Purpose | Specifies the purpose of the chart analysis. | None Optional |
showRanking | boolean | Whether to show the recommended chart ranking. | true Optional |
noDataContent | React.ReactNode | Show nodes when custom data is empty. | None Optional |
- Purpose Parameter configuration.
type PURPOSE_OPTIONS = ["Comparison", "Trend", "Distribution", "Rank", "Proportion",
"Composition", "Relation", "Hierarchy", "Flow", "Spatial", "Anomaly", "Value"];
Data
data
Row data array. If empty, mock panel is available.
fields
The fields for chart recommendations.
Container
title
Chart title.
description
Chart description.
width
"100%"
Container width.
height
"100%"
Container height.
className
Container className.
language
"zh-CN"
Internationalization.
Configuration
purpose
The purpose of visualization.
showRanking
true
Whether to display the recommended ranking, it can be used to switch chart type.
noDataContent
To render content without data.