Chart
made with SVG, supports polylines printing and display setting (experimental status).
<Chart labels={[]} datasets={[]}/>
<Chart labels={[]} datasets={[]}/>
Basic usage of Chart component.
Properties | Description | Type | Default |
---|---|---|---|
size | The size of chart, the value can be a string or number with unit (px) | Array | [480, 320] |
max | The maximum in Y-Axis | Number | Leave it as blank to automatically calculate the maximum in the dataset |
min | The minimum in Y-Axis | number | Leave it as blank to automatically calculate the minimum in the dataset |
lines | The number of lines in Y-Axis | Number | 5 |
step | The decreasing step in Y-Axis | Number | Leave it as blank to automatically compute the avarage based on lines ,max and min |
format | The labels formatting function in Y-Axis | Function | (val) => val |
labels | The labels of X-Axis, required property | Array | - |
datasets | The chart data, the format is shown as follows, required property | Array | - |
shift | The shift in Y-Axis | Number | 0.6 |