@@ -6,27 +6,7 @@ import ExampleGroup from "../../common/ExampleGroup";
6
6
7
7
const ChartCompWithDefault = uiCompRegistry [ "chartsGeoMap" ] . comp ;
8
8
9
- const defaultDataSource = "[\n {\n \"date\": \"2021-09\",\n \"department\": \"Administration\",\n \"spending\": 9003,\n \"budget\": 8000\n },\n {\n \"date\": \"2021-09\",\n \"department\": \"Finance\",\n \"spending\": 3033,\n \"budget\": 4000\n },\n {\n \"date\": \"2021-09\",\n \"department\": \"Sales\",\n \"spending\": 9230,\n \"budget\": 8000\n },\n {\n \"date\": \"2021-10\",\n \"department\": \"Administration\",\n \"spending\": 13032,\n \"budget\": 15000\n },\n {\n \"date\": \"2021-10\",\n \"department\": \"Finance\",\n \"spending\": 2300,\n \"budget\": 5000\n },\n {\n \"date\": \"2021-10\",\n \"department\": \"Sales\",\n \"spending\": 7323.5,\n \"budget\": 8000\n },\n {\n \"date\": \"2021-11\",\n \"department\": \"Administration\",\n \"spending\": 13000,\n \"budget\": 16023\n },\n {\n \"date\": \"2021-11\",\n \"department\": \"Finance\",\n \"spending\": 3569.5,\n \"budget\": 3000\n },\n {\n \"date\": \"2021-11\",\n \"department\": \"Sales\",\n \"spending\": 10000,\n \"budget\": 9932\n },\n {\n \"date\": \"2021-12\",\n \"department\": \"Administration\",\n \"spending\": 18033,\n \"budget\": 20000\n },\n {\n \"date\": \"2021-12\",\n \"department\": \"Finance\",\n \"spending\": 4890,\n \"budget\": 4500\n },\n {\n \"date\": \"2021-12\",\n \"department\": \"Sales\",\n \"spending\": 9322,\n \"budget\": 8000\n }\n]" ;
10
-
11
- const defaultEchartsJsonOption = "{\n \"xAxis\": {\n \"data\": [\n \"Day 1\",\n \"Day 2\",\n \"Day 3\",\n \"Day 4\",\n \"Day 5\"\n ]\n },\n \"data\": [\n [\n 100,\n 200,\n 50,\n 150\n ],\n [\n 120,\n 220,\n 80,\n 180\n ],\n [\n 80,\n 150,\n 60,\n 130\n ],\n [\n 130,\n 230,\n 110,\n 190\n ],\n [\n 90,\n 180,\n 70,\n 160\n ]\n ]\n}" ;
12
-
13
- const data = JSON . stringify ( defaultDataSource ) ;
14
- const echartsOption = JSON . stringify ( defaultEchartsJsonOption ) ;
15
-
16
9
export default function GeoMapChartExample ( ) {
17
- const blackListConfig : string [ ] = [ "data" , "echartsOption" , "series" ] ;
18
- const series = [
19
- {
20
- "columnName" : "spending" ,
21
- "seriesName" : "Spending" ,
22
- "dataIndex" : "f011b34c"
23
- } ,
24
- {
25
- "columnName" : "budget" ,
26
- "seriesName" : "Budget" ,
27
- "dataIndex" : "30e02269"
28
- }
29
- ] ;
30
10
return (
31
11
< >
32
12
< ExampleGroup
@@ -37,11 +17,61 @@ export default function GeoMapChartExample() {
37
17
title = { trans ( "componentDoc.default" ) }
38
18
width = { 500 }
39
19
height = { 300 }
40
- blackListConfig = { blackListConfig }
41
20
config = { {
42
- mode : "json" ,
43
- data : data ,
44
- series : series ,
21
+ } }
22
+ compFactory = { ChartCompWithDefault }
23
+ />
24
+ </ ExampleGroup >
25
+
26
+ < ExampleGroup
27
+ title = { trans ( "componentDoc.basicUsage" ) }
28
+ description = { trans ( "componentDoc.basicDemoDescription" ) }
29
+ >
30
+ < Example
31
+ title = "Zoom Level - 1"
32
+ width = { 500 }
33
+ height = { 300 }
34
+ config = { {
35
+ } }
36
+ compFactory = { ChartCompWithDefault }
37
+ />
38
+ < Example
39
+ title = "Zoom Level - 3"
40
+ width = { 500 }
41
+ height = { 300 }
42
+ config = { {
43
+ } }
44
+ compFactory = { ChartCompWithDefault }
45
+ />
46
+ < Example
47
+ title = "Zoom Level - 5"
48
+ width = { 500 }
49
+ height = { 300 }
50
+ config = { {
51
+ } }
52
+ compFactory = { ChartCompWithDefault }
53
+ />
54
+ < Example
55
+ title = "Center Position ( Lat, Lon) - Spain"
56
+ width = { 500 }
57
+ height = { 300 }
58
+ config = { {
59
+ } }
60
+ compFactory = { ChartCompWithDefault }
61
+ />
62
+ < Example
63
+ title = "Center Position ( Lat, Lon) - USA"
64
+ width = { 500 }
65
+ height = { 300 }
66
+ config = { {
67
+ } }
68
+ compFactory = { ChartCompWithDefault }
69
+ />
70
+ < Example
71
+ title = "Center Position ( Lat, Lon) - Turkey"
72
+ width = { 500 }
73
+ height = { 300 }
74
+ config = { {
45
75
} }
46
76
compFactory = { ChartCompWithDefault }
47
77
/>
0 commit comments