8 |
--------------------------------------------------------------------------------
/docs/index.tsx:
--------------------------------------------------------------------------------
1 | import { Grid, Snippet } from '@lobehub/ui';
2 | import { Card } from 'antd';
3 | import { Center, Flexbox } from 'react-layout-kit';
4 |
5 | import AreaChart from '@/AreaChart/demos/example';
6 | import BarChart from '@/BarChart/demos/example';
7 | import BarChartGroups from '@/BarChart/demos/groups';
8 | import DonutChart from '@/DonutChart/demos/withLegend';
9 | import LineChart from '@/LineChart/demos/customColors';
10 | import ScatterChart from '@/ScatterChart/demos/example';
11 |
12 | export default () => {
13 | return (
14 |
9 |
10 | ## Usage example
11 |
12 | The example below shows a composition combining an `AreaChart` with text elements.
13 |
14 |
15 |
16 | ## Usage example with click event
17 |
18 | The example below shows an interacive chart using the `onValueChange` prop.
19 |
20 |
21 |
22 | ## Usage example with custom tooltip
23 |
24 | The example below shows a custom tooltip using `customTooltip` prop.
25 |
26 |
27 |
28 | ## Usage example with a custom colors
29 |
30 | The example below shows a chart with custom `colors`.
31 |
32 |
33 |
34 | ## Usage example with x-axis and y-axis labels
35 |
36 | The example below shows added axis labels using `xAxisLabel` and `yAxisLabel` prop.
37 |
38 |
39 |
40 | ## API
41 |
42 |
9 |
10 | ## Usage example
11 |
12 | The example below shows a chart composition combining a `BarChart` with text elements.
13 |
14 |
15 |
16 | ## Usage example with custom X axis labels
17 |
18 | The example below shows an interacive chart using the `xAxisLabelFormatter` prop.
19 |
20 |
21 |
22 | ## Usage example with groups
23 |
24 | The example below shows a chart with a group composition.
25 |
26 |
27 |
28 | ## Usage example with click event
29 |
30 | The example below shows an interacive chart using the `onValueChange` prop.
31 |
32 |
33 |
34 | ## Usage example with custom tooltip
35 |
36 | The example below shows a custom tooltip using `customTooltip` prop.
37 |
38 |
39 |
40 | ## Usage example with a custom colors
41 |
42 | The example below shows a chart with custom `colors`.
43 |
44 |
45 |
46 | ## Usage example with x-axis and y-axis labels
47 |
48 | The example below shows added axis labels using `xAxisLabel` and `yAxisLabel` props.
49 |
50 |
51 |
52 | ## No Data
53 |
54 |
55 |
56 | ## Loading
57 |
58 |
59 |
60 | ## API
61 |
62 |
8 |
9 | ## Usage example
10 |
11 | You can also pass an `href` into the data, then your datapoint gets rendered as a clickable link with `target="_blank"`.
12 |
13 |
14 |
15 | ## Usage example with click event
16 |
17 | The example below shows an interacive chart using the `onValueChange` prop.
18 |
19 |
20 |
21 | ## Usage example with a custom colors
22 |
23 | The example below shows a chart with custom `colors`.
24 |
25 |
26 |
27 | ## API
28 |
29 |
11 |
12 | ## Marker Bar
13 |
14 |
15 |
16 | ## Delta Bar
17 |
18 |
19 |
20 | ## Category Bar
21 |
22 |
23 |
24 | ## API
25 |
26 |
8 |
9 | ## Usage example
10 |
11 | The example below shows a composition of a `DonutChart` component.
12 |
13 |
14 |
15 | ## Usage example with legend
16 |
17 | The example below shows a composition of a `DonutChart` and `Legend` component.
18 |
19 |
20 |
21 | ## Usage example with click event
22 |
23 | The example below shows an interacive chart using the `onValueChange` prop.
24 |
25 |
26 |
27 | ## Usage example with custom tooltip
28 |
29 | The example below shows a custom tooltip using `customTooltip` prop.
30 |
31 |
32 |
33 | ## Usage example with a custom colors
34 |
35 | The example below shows a chart with custom `colors`.
36 |
37 |
38 |
39 | ## API
40 |
41 |
9 |
10 | ## Usage example with evolution gradient
11 |
12 | The `calculateFrom` prop controls the referenced value to calculate the drop-off between steps. Here we set it to previous, to always reference the preceding bar as the calculation base. We also set `showArrow` to false.
13 |
14 |
15 |
16 | ## API
17 |
18 |
8 |
9 | ## Usage example
10 |
11 | The example below shows a composition of a `Heatmaps` component.
12 |
13 |
14 |
15 | ## Loading
16 |
17 |
18 |
19 | ## Activity Levels
20 |
21 | Use the `maxLevel` prop to control the number of activity levels. This value is zero indexed (0 represents no activity),
22 | so for example a maxLevel of 2 will total in 3 levels as above. Each activity level must be in the interval from 0 to `maxLevel`,
23 | which is 4 per default.
24 |
25 |
26 |
27 | ## Date Ranges
28 |
29 |
30 |
31 | ## Usage example with click event
32 |
33 | The example below shows an interacive chart using the `onValueChange` prop.
34 |
35 |
36 |
37 | ## Usage example with custom tooltip
38 |
39 | The example below shows a custom tooltip using `customTooltip` prop.
40 |
41 |
42 |
43 | ## Usage example with a custom colors
44 |
45 | The example below shows a chart with custom `colors`.
46 |
47 |
48 |
49 | ## Customization
50 |
51 |
52 |
53 | ## Localization
54 |
55 |
56 |
57 | ## API
58 |
59 |
8 |
9 | ## API
10 |
11 |
9 |
10 | ## Usage example
11 |
12 | The example below shows a composition combining an `AreaChart` with text elements.
13 |
14 |
15 |
16 | ## Usage example with click event
17 |
18 | The example below shows an interacive chart using the `onValueChange` prop.
19 |
20 |
21 |
22 | ## Usage example with custom tooltip
23 |
24 | The example below shows a custom tooltip using `customTooltip` prop.
25 |
26 |
27 |
28 | ## Usage example with a custom colors
29 |
30 | The example below shows a chart with custom `colors`.
31 |
32 |
33 |
34 | ## Usage example with x-axis and y-axis labels
35 |
36 | The example below shows added axis labels using `xAxisLabel` and `yAxisLabel` prop.
37 |
38 |
39 |
40 | ## API
41 |
42 |
9 |
10 | ## Usage example
11 |
12 | The example below shows a chart composition combining a `ScatterChart` with text elements.
13 |
14 |
15 |
16 | ## Usage example with click event
17 |
18 | The example below shows an interacive chart using the `onValueChange` prop.
19 |
20 |
21 |
22 | ## Usage example with custom tooltip
23 |
24 | The example below shows a custom tooltip using `customTooltip` prop.
25 |
26 |
27 |
28 | ## Usage example with a custom colors
29 |
30 | The example below shows a chart with custom `colors`.
31 |
32 |
33 |
34 | ## Usage example with x-axis and y-axis labels
35 |
36 | The example below shows added axis labels using `xAxisLabel` and `yAxisLabel` props.
37 |
38 |
39 |
40 | ## API
41 |
42 |
11 |
12 | ## Spark Bar Chart
13 |
14 |
15 |
16 | ## Spark Line Chart
17 |
18 |
19 |
20 | ## API
21 |
22 |
8 |
9 | ## Usage example
10 |
11 | The example below shows a composition of an uptime monitor with a `Tracker` component. The \`tooltip property acts as pop-up information and displays the provided status.
12 |
13 |
14 |
15 | ## Usage example with click event
16 |
17 | The example below shows an interacive chart using the `onValueChange` prop.
18 |
19 |
20 |
21 | ## Usage example with custom tooltip
22 |
23 | The example below shows a custom tooltip using `customTooltip` prop.
24 |
25 |
26 |
27 | ## Usage example with a custom colors
28 |
29 | The example below shows a chart with custom `colors`.
30 |
31 |
32 |
33 | ## API
34 |
35 |