-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathChartProviderExamples.ts
57 lines (52 loc) · 1.59 KB
/
ChartProviderExamples.ts
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
export const SimpleChartProviderExample = `
const ChartProviderExample = () => {
const lineSeriesData = [
{
name: "Installation",
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
},
{
name: "Manufacturing",
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
},
]
return (
<ChartProvider highchartsOptions={{ chart: { type: "line" }, series: lineSeriesData }}>
<BaseChart />
</ChartProvider>
);
};
render(<ChartProviderExample />);
`.trim();
export const CustomChartProviderExample = `
const ChartProviderExample = () => {
const lineSeriesData = [
{
name: "Installation",
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
type: "line",
},
{
name: "Manufacturing",
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
type: "line",
},
{
name: "Sales & Distribution",
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
type: "column",
},
{
name: "Project Development",
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
type: "column",
},
]
return (
<ChartProvider highchartsOptions={{title: {floating: true, align: "right", text: "Custom charting title"}, series: lineSeriesData}}>
<BaseChart />
</ChartProvider>
);
};
render(<ChartProviderExample />);
`.trim();