/
AutoChartTest.tsx
83 lines (73 loc) · 2.66 KB
/
AutoChartTest.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import * as React from 'react';
import AutoChart from './auto-chart';
// import { DataSamples } from './data-samples';
export function AutoChartTest() {
return (
<>
<AutoChart
data={[
{ f1: '2019-01', f2: 100 },
{ f1: '2019-02', f2: 300 },
{ f1: '2019-03', f2: 340 },
{ f1: '2019-04', f2: 630 },
]}
title="expect: Line"
/>
{/* <AutoChart
data={[
{ f1: 'a', f2: 100 },
{ f1: 'b', f2: 300 },
{ f1: 'c', f2: 430 },
{ f1: 'd', f2: 630 },
]}
title="expect: Column"
/> */}
{/* <AutoChart
data={[
{ f1: 'a', f2: 70 },
{ f1: 'b', f2: 120 },
{ f1: 'c', f2: 900 },
{ f1: 'd', f2: 630 },
]}
title="expect: Pie"
/> */}
{/* <AutoChart data={[]} title="测试" description="测试" /> */}
{/* <AutoChart
data={DataSamples.ForChartType('percent_stacked_bar_chart')}
purpose="Proportion"
title="expect: Percentage Stacked Bar"
/> */}
{/* <AutoChart data={DataSamples.ForChartType('line_chart')} title="expect: Line" />
<AutoChart data={DataSamples.ForChartType('area_chart')} title="expect: Area" /> */}
{/* <AutoChart data={DataSamples.ForChartType('area_chart')} title="expect: Area" config={{ type: 'StepLine' }} /> */}
{/* <AutoChart
data={[
{ f1: '2019-01', f2: 100 },
{ f1: '2019-02', f2: 300 },
{ f1: '2019-03', f2: 340 },
{ f1: '2019-04', f2: 630 },
]}
title="try: Stacked Area"
description="适合做 stacked area"
config={{ configs: { xField: 'f1', yField: 'f2' }, type: 'StepLine' }}
/> */}
{/* <AutoChart data={DataSamples.ForChartType('pie_chart')} title="expect: Pie" />
<AutoChart data={DataSamples.ForChartType('scatter_plot')} title="expect: Scatter" />
<AutoChart data={DataSamples.ForChartType('bubble_chart')} title="expect: Bubble" /> */}
{/* <AutoChart data={DataSamples.ForChartType('histogram')} title="expect: Histogram" /> */}
{/* <AutoChart
data={[
{ f1: 'a', f2: 100 },
{ f1: 'b', f2: 200 },
{ f1: 'c', f2: 300 },
{ f1: 'd', f2: 400 },
{ f1: 'e', f2: 630 },
]}
title="expect: Rose"
config={{ configs: { colorField: 'f1', categoryField: 'f1', radiusField: 'f2' }, type: 'Rose' }}
/> */}
{/* <AutoChart data={DataSamples.ForChartType('heatmap')} title="expect: Heatmap" />
<AutoChart data={DataSamples.ForChartType('grouped_column_chart')} title="expect: Area" /> */}
</>
);
}