@cdc/chart 4.23.2 → 4.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cdcchart.js +41198 -39447
  2. package/examples/area-chart.json +187 -0
  3. package/examples/big-small-test-bar.json +328 -0
  4. package/examples/big-small-test-line.json +328 -0
  5. package/examples/big-small-test-negative.json +328 -0
  6. package/examples/box-plot.json +0 -1
  7. package/examples/example-bar-chart.json +4 -1
  8. package/examples/example-sparkline.json +76 -0
  9. package/examples/gallery/bar-chart-horizontal/horizontal-bar-chart.json +31 -172
  10. package/examples/gallery/bar-chart-vertical/vertical-bar-chart-confidence.json +1 -0
  11. package/examples/gallery/bar-chart-vertical/vertical-bar-chart-with-confidence.json +96 -14
  12. package/examples/gallery/line/line.json +1 -0
  13. package/examples/horizontal-chart-max-increase.json +38 -0
  14. package/examples/line-chart-max-increase.json +32 -0
  15. package/examples/line-chart-nonnumeric.json +5 -5
  16. package/examples/line-chart.json +6 -6
  17. package/examples/planet-deviation-config.json +168 -0
  18. package/examples/planet-deviation-data.json +38 -0
  19. package/examples/planet-example-config.json +139 -20
  20. package/examples/planet-example-data-max-increase.json +56 -0
  21. package/examples/planet-example-data.json +10 -10
  22. package/examples/scatterplot-continuous.csv +3 -3
  23. package/examples/scatterplot.json +2 -2
  24. package/examples/sparkline-chart-nonnumeric.json +3 -3
  25. package/index.html +26 -9
  26. package/package.json +6 -3
  27. package/src/CdcChart.jsx +146 -92
  28. package/src/components/AreaChart.jsx +198 -0
  29. package/src/components/BarChart.jsx +58 -34
  30. package/src/components/BoxPlot.jsx +28 -15
  31. package/src/components/DataTable.jsx +21 -17
  32. package/src/components/DeviationBar.jsx +191 -0
  33. package/src/components/EditorPanel.jsx +473 -168
  34. package/src/components/Filters.jsx +3 -2
  35. package/src/components/Legend.jsx +59 -46
  36. package/src/components/LineChart.jsx +3 -21
  37. package/src/components/LinearChart.jsx +158 -55
  38. package/src/components/PairedBarChart.jsx +0 -1
  39. package/src/components/PieChart.jsx +11 -14
  40. package/src/components/ScatterPlot.jsx +19 -16
  41. package/src/components/SparkLine.jsx +87 -85
  42. package/src/components/useIntersectionObserver.jsx +1 -1
  43. package/src/data/initial-state.js +20 -4
  44. package/src/hooks/useColorPalette.js +58 -48
  45. package/src/hooks/useReduceData.js +3 -4
  46. package/src/index.jsx +1 -1
  47. package/src/scss/editor-panel.scss +5 -0
  48. package/src/test/CdcChart.test.jsx +6 -0
@@ -0,0 +1,76 @@
1
+ {
2
+ "type": "chart",
3
+ "title": "Example Spark Line",
4
+ "theme": "theme-blue",
5
+ "fontSize": "medium",
6
+ "height": "375",
7
+ "compact": true,
8
+ "padding": {
9
+ "left": 5,
10
+ "right": 5
11
+ },
12
+ "yAxis": {
13
+ "size": "75",
14
+ "gridLines": false,
15
+ "label": "Y-Axis Example Label",
16
+ "numTicks": "9"
17
+ },
18
+ "barThickness": 0.35,
19
+ "xAxis": {
20
+ "size": "77",
21
+ "tickRotation": "25",
22
+ "dataKey": "Date",
23
+ "label": "X-Axis Example Label",
24
+ "type": "date",
25
+ "dateParseFormat": "%d/%m/%Y",
26
+ "dateDisplayFormat": "%d/%m/%Y"
27
+ },
28
+ "table": {
29
+ "label": "Data Table",
30
+ "expanded": true,
31
+ "download": true
32
+ },
33
+ "legend": {
34
+ "behavior": "isolate",
35
+ "position": "right",
36
+ "label": "Type of Data"
37
+ },
38
+ "palette": "qualitative-bold",
39
+ "labels": false,
40
+ "dataFormat": {},
41
+ "confidenceKeys": {},
42
+ "data": [
43
+ {
44
+ "Date": "1/15/2016",
45
+ "Data 1": "0"
46
+ },
47
+ {
48
+ "Date": "2/15/2016",
49
+ "Data 1": "25"
50
+ },
51
+ {
52
+ "Date": "3/15/2016",
53
+ "Data 1": "50"
54
+ },
55
+ {
56
+ "Date": "4/15/2016",
57
+ "Data 1": "75"
58
+ },
59
+ {
60
+ "Date": "5/15/2016",
61
+ "Data 1": "100"
62
+ },
63
+ {
64
+ "Date": "6/15/2016",
65
+ "Data 1": "50"
66
+ }
67
+ ],
68
+ "visualizationType": "Spark Line",
69
+ "series": [
70
+ {
71
+ "dataKey": "Data 1",
72
+ "type": "Bar"
73
+ }
74
+ ],
75
+ "description": "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups."
76
+ }
@@ -5,10 +5,7 @@
5
5
  "fontSize": "small",
6
6
  "lineDatapointStyle": "hover",
7
7
  "barHasBorder": "false",
8
- "padding": {
9
- "left": 5,
10
- "right": 5
11
- },
8
+ "padding": { "left": 5, "right": 5 },
12
9
  "yAxis": {
13
10
  "size": 50,
14
11
  "gridLines": false,
@@ -18,124 +15,40 @@
18
15
  "fontSize": "small",
19
16
  "lineDatapointStyle": "hover",
20
17
  "barHasBorder": "false",
21
- "padding": {
22
- "left": 5,
23
- "right": 5
24
- },
25
- "yAxis": {
26
- "size": 50,
27
- "gridLines": false,
28
- "label": "X-Axis Example Label",
29
- "numTicks": "10"
30
- },
18
+ "padding": { "left": 5, "right": 5 },
19
+ "yAxis": { "size": 50, "gridLines": false, "label": "X-Axis Example Label", "numTicks": "10" },
31
20
  "barThickness": "0.7",
32
21
  "height": 560,
33
- "xAxis": {
34
- "type": "categorical",
35
- "size": "0",
36
- "tickRotation": 0,
37
- "dataKey": "Group",
38
- "label": ""
39
- },
40
- "table": {
41
- "label": "Data Table",
42
- "expanded": true,
43
- "download": false,
44
- "show": true
45
- },
46
- "legend": {
47
- "behavior": "isolate",
48
- "position": "right",
49
- "label": "Type of Data"
50
- },
51
- "exclusions": {
52
- "active": false,
53
- "keys": []
54
- },
22
+ "xAxis": { "type": "categorical", "size": "0", "tickRotation": 0, "dataKey": "Group", "label": "" },
23
+ "table": { "label": "Data Table", "expanded": true, "download": false, "show": true },
24
+ "legend": { "behavior": "isolate", "position": "right", "label": "Type of Data" },
25
+ "exclusions": { "active": false, "keys": [] },
55
26
  "palette": "qualitative-soft",
56
27
  "labels": false,
57
28
  "dataFormat": {},
58
29
  "confidenceKeys": {},
59
30
  "data": [
60
- {
61
- "Group": "Combined Total of Group A",
62
- "Vehicle": "100",
63
- "Home": "120",
64
- "Work": "140",
65
- "Office": "120"
66
- },
67
- {
68
- "Group": "Combined Total of Group B",
69
- "Vehicle": "150",
70
- "Home": "140",
71
- "Work": "100",
72
- "Office": "90"
73
- },
74
- {
75
- "Group": "Combined Total of Group C",
76
- "Vehicle": "90",
77
- "Home": "90",
78
- "Work": "80",
79
- "Office": "80"
80
- },
81
- {
82
- "Group": "Combined Total of Group D",
83
- "Vehicle": "70",
84
- "Home": "60",
85
- "Work": "50",
86
- "Office": "70"
87
- }
31
+ { "Group": "Combined Total of Group A", "Vehicle": "100", "Home": "120", "Work": "140", "Office": "120" },
32
+ { "Group": "Combined Total of Group B", "Vehicle": "150", "Home": "140", "Work": "100", "Office": "90" },
33
+ { "Group": "Combined Total of Group C", "Vehicle": "90", "Home": "90", "Work": "80", "Office": "80" },
34
+ { "Group": "Combined Total of Group D", "Vehicle": "70", "Home": "60", "Work": "50", "Office": "70" }
88
35
  ],
89
36
  "visualizationType": "Bar",
90
37
  "visualizationSubType": "horizontal",
91
38
  "series": [
92
- {
93
- "dataKey": "Vehicle",
94
- "type": "Bar"
95
- },
96
- {
97
- "dataKey": "Home",
98
- "type": "Bar"
99
- },
100
- {
101
- "dataKey": "Work",
102
- "type": "Bar"
103
- },
104
- {
105
- "dataKey": "Office",
106
- "type": "Bar"
107
- }
39
+ { "dataKey": "Vehicle", "type": "Bar" },
40
+ { "dataKey": "Home", "type": "Bar" },
41
+ { "dataKey": "Work", "type": "Bar" },
42
+ { "dataKey": "Office", "type": "Bar" }
108
43
  ],
109
44
  "description": "This example shows a horizontal bar chart created in the visualization editor in WCMS",
110
45
  "runtime": {
111
- "seriesLabels": {
112
- "Vehicle": "Vehicle",
113
- "Home": "Home",
114
- "Work": "Work",
115
- "Office": "Office"
116
- },
46
+ "seriesLabels": { "Vehicle": "Vehicle", "Home": "Home", "Work": "Work", "Office": "Office" },
117
47
  "seriesLabelsAll": ["Vehicle", "Home", "Work", "Office"],
118
- "originalXAxis": {
119
- "type": "categorical",
120
- "size": "0",
121
- "tickRotation": 0,
122
- "dataKey": "Group",
123
- "label": ""
124
- },
48
+ "originalXAxis": { "type": "categorical", "size": "0", "tickRotation": 0, "dataKey": "Group", "label": "" },
125
49
  "seriesKeys": ["Vehicle", "Home", "Work", "Office"],
126
- "xAxis": {
127
- "size": 50,
128
- "gridLines": false,
129
- "label": "X-Axis Example Label",
130
- "numTicks": "10"
131
- },
132
- "yAxis": {
133
- "type": "categorical",
134
- "size": "0",
135
- "tickRotation": 0,
136
- "dataKey": "Group",
137
- "label": ""
138
- },
50
+ "xAxis": { "size": 50, "gridLines": false, "label": "X-Axis Example Label", "numTicks": "10" },
51
+ "yAxis": { "type": "categorical", "size": "0", "tickRotation": 0, "dataKey": "Group", "label": "" },
139
52
  "horizontal": true,
140
53
  "uniqueId": 1644353484184,
141
54
  "editorErrorMessage": ""
@@ -147,81 +60,27 @@
147
60
  },
148
61
  "barThickness": "0.7",
149
62
  "height": 560,
150
- "xAxis": {
151
- "type": "categorical",
152
- "size": "0",
153
- "tickRotation": 0,
154
- "dataKey": "Group",
155
- "label": ""
156
- },
157
- "table": {
158
- "label": "Data Table",
159
- "expanded": true,
160
- "download": false,
161
- "show": true
162
- },
163
- "legend": {
164
- "behavior": "isolate",
165
- "position": "right",
166
- "label": "Location"
167
- },
168
- "exclusions": {
169
- "active": false,
170
- "keys": []
171
- },
63
+ "xAxis": { "type": "categorical", "size": "0", "tickRotation": 0, "dataKey": "Group", "label": "" },
64
+ "table": { "label": "Data Table", "expanded": true, "download": false, "show": true },
65
+ "legend": { "behavior": "isolate", "position": "right", "label": "Location" },
66
+ "exclusions": { "active": false, "keys": [] },
172
67
  "palette": "qualitative-soft",
173
68
  "labels": false,
174
69
  "dataFormat": {},
175
70
  "confidenceKeys": {},
176
71
  "data": [
177
- {
178
- "Group": "Group A Survey Results",
179
- "Vehicle": "100",
180
- "Home": "120",
181
- "Work": "140",
182
- "Office": "120"
183
- },
184
- {
185
- "Group": "Group B Survey Results",
186
- "Vehicle": "150",
187
- "Home": "140",
188
- "Work": "100",
189
- "Office": "90"
190
- },
191
- {
192
- "Group": "Group C Survey Results",
193
- "Vehicle": "90",
194
- "Home": "90",
195
- "Work": "80",
196
- "Office": "80"
197
- },
198
- {
199
- "Group": "Group D Survey Results",
200
- "Vehicle": "70",
201
- "Home": "60",
202
- "Work": "50",
203
- "Office": "70"
204
- }
72
+ { "Group": "Group A Survey Results", "Vehicle": "100", "Home": "120", "Work": "140", "Office": "120" },
73
+ { "Group": "Group B Survey Results", "Vehicle": "150", "Home": "140", "Work": "100", "Office": "90" },
74
+ { "Group": "Group C Survey Results", "Vehicle": "90", "Home": "90", "Work": "80", "Office": "80" },
75
+ { "Group": "Group D Survey Results", "Vehicle": "70", "Home": "60", "Work": "50", "Office": "70" }
205
76
  ],
206
77
  "visualizationType": "Bar",
207
78
  "visualizationSubType": "horizontal",
208
79
  "series": [
209
- {
210
- "dataKey": "Vehicle",
211
- "type": "Bar"
212
- },
213
- {
214
- "dataKey": "Home",
215
- "type": "Bar"
216
- },
217
- {
218
- "dataKey": "Work",
219
- "type": "Bar"
220
- },
221
- {
222
- "dataKey": "Office",
223
- "type": "Bar"
224
- }
80
+ { "dataKey": "Vehicle", "type": "Bar" },
81
+ { "dataKey": "Home", "type": "Bar" },
82
+ { "dataKey": "Work", "type": "Bar" },
83
+ { "dataKey": "Office", "type": "Bar" }
225
84
  ],
226
85
  "description": "This example shows a horizontal bar chart created in the visualization editor in WCMS",
227
86
  "barPadding": 40,
@@ -0,0 +1 @@
1
+ {"type":"chart","title":"Bar Chart with Confidence Intervals","theme":"theme-green","animate":false,"fontSize":"medium","lineDatapointStyle":"hover","barHasBorder":"false","isLollipopChart":false,"lollipopShape":"circle","lollipopColorStyle":"two-tone","visualizationSubType":"regular","barStyle":"rounded","roundingStyle":"standard","tipRounding":"top","padding":{"left":5,"right":5},"yAxis":{"hideAxis":false,"displayNumbersOnBar":false,"hideLabel":false,"hideTicks":false,"size":"75","gridLines":true,"min":"","max":"","labelColor":"#333","tickLabelColor":"#333","tickColor":"#333","rightHideAxis":true,"rightAxisSize":50,"rightLabelOffsetSize":0,"rightAxisLabelColor":"#333","rightAxisTickLabelColor":"#333","rightAxisTickColor":"#333","isLegendValue":false,"numTicks":"","label":"Y-Axis Example Label"},"topAxis":{"hasLine":false},"barThickness":0.35,"barHeight":25,"height":300,"xAxis":{"type":"categorical","hideAxis":false,"hideLabel":false,"hideTicks":false,"size":"50","tickRotation":0,"min":"","max":"","labelColor":"#333","tickLabelColor":"#333","tickColor":"#333","isLegendValue":false,"numTicks":"","dataKey":"Date","label":"X-Axis Sample Label"},"table":{"label":"Data Table","expanded":true,"limitHeight":false,"height":"","caption":"","show":true},"orientation":"vertical","legend":{"behavior":"isolate","position":"right","singleRow":false,"colorCode":"","reverseLabelOrder":false,"description":"","dynamicLegend":false,"dynamicLegendDefaultText":"Show All","dynamicLegendItemLimit":5,"dynamicLegendItemLimitMessage":"Dynamic Legend Item Limit Hit.","dynamicLegendChartMessage":"Select Options from the Legend"},"exclusions":{"active":false,"keys":[]},"palette":"qualitative-bold","isPaletteReversed":false,"labels":false,"dataFormat":{"commas":false,"prefix":"","suffix":""},"confidenceKeys":{"upper":"high","lower":"low"},"visual":{"border":true,"accent":true,"background":true},"data":[{"Data":"data1","Date":"1/12/2016","Value":"212","high":"220","low":"200"},{"Data":"data2","Date":"1/13/2016","Value":"213","high":"230","low":"205"},{"Data":"data3","Date":"1/14/2016","Value":"214","high":"240","low":"210"}],"visualizationType":"Bar","series":[{"dataKey":"Value","type":"Bar"}]}
@@ -1,36 +1,108 @@
1
1
  {
2
2
  "type": "chart",
3
- "title": "Bar Chart with Confidence Intervals",
4
- "theme": "theme-green",
3
+ "title": "Example Bar Chart",
4
+ "theme": "theme-blue",
5
+ "animate": false,
5
6
  "fontSize": "medium",
6
- "height": 300,
7
+ "lineDatapointStyle": "hover",
8
+ "barHasBorder": "false",
9
+ "isLollipopChart": false,
10
+ "lollipopShape": "circle",
11
+ "lollipopColorStyle": "two-tone",
12
+ "visualizationSubType": "regular",
13
+ "barStyle": "",
14
+ "roundingStyle": "standard",
15
+ "tipRounding": "top",
7
16
  "padding": {
8
17
  "left": 5,
9
18
  "right": 5
10
19
  },
11
20
  "yAxis": {
12
- "size": "75",
21
+ "hideAxis": false,
22
+ "displayNumbersOnBar": false,
23
+ "hideLabel": false,
24
+ "hideTicks": false,
25
+ "size": "150",
13
26
  "gridLines": true,
14
- "label": "Y-Axis Example Label"
27
+ "min": "",
28
+ "max": "",
29
+ "labelColor": "#333",
30
+ "tickLabelColor": "#333",
31
+ "tickColor": "#333",
32
+ "rightHideAxis": true,
33
+ "rightAxisSize": 0,
34
+ "rightLabelOffsetSize": 0,
35
+ "rightAxisLabelColor": "#333",
36
+ "rightAxisTickLabelColor": "#333",
37
+ "rightAxisTickColor": "#333",
38
+ "isLegendValue": false,
39
+ "numTicks": "",
40
+ "label": "Y Axis Example Label"
41
+ },
42
+ "topAxis": {
43
+ "hasLine": false
15
44
  },
16
- "barThickness": 0.35,
45
+ "barThickness": "0.6",
46
+ "barHeight": 25,
47
+ "height": 300,
17
48
  "xAxis": {
18
- "size": "50",
49
+ "type": "categorical",
50
+ "hideAxis": false,
51
+ "hideLabel": false,
52
+ "hideTicks": false,
53
+ "size": "59",
19
54
  "tickRotation": 0,
55
+ "min": "",
56
+ "max": "",
57
+ "labelColor": "#333",
58
+ "tickLabelColor": "#333",
59
+ "tickColor": "#333",
60
+ "isLegendValue": false,
61
+ "numTicks": "",
20
62
  "dataKey": "Date",
21
- "label": "X-Axis Sample Label"
63
+ "label": "X Axis Example Label"
22
64
  },
23
65
  "table": {
24
- "label": "Data Table",
25
- "expanded": true
66
+ "label": "Data Type by Date",
67
+ "expanded": false,
68
+ "limitHeight": false,
69
+ "height": "",
70
+ "caption": "",
71
+ "show": true,
72
+ "download": true
26
73
  },
74
+ "orientation": "vertical",
27
75
  "legend": {
28
76
  "behavior": "isolate",
29
- "position": "right"
77
+ "position": "right",
78
+ "singleRow": false,
79
+ "colorCode": "",
80
+ "reverseLabelOrder": false,
81
+ "description": "",
82
+ "dynamicLegend": false,
83
+ "dynamicLegendDefaultText": "Show All",
84
+ "dynamicLegendItemLimit": 5,
85
+ "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
86
+ "dynamicLegendChartMessage": "Select Options from the Legend",
87
+ "label": "Type of Data"
88
+ },
89
+ "exclusions": {
90
+ "active": false,
91
+ "keys": []
30
92
  },
31
93
  "palette": "qualitative-bold",
94
+ "isPaletteReversed": false,
32
95
  "labels": false,
33
- "dataFormat": {},
96
+ "dataFormat": {
97
+ "commas": false,
98
+ "prefix": "",
99
+ "suffix": " units"
100
+ },
101
+ "visual": {
102
+ "border": true,
103
+ "accent": true,
104
+ "background": true
105
+ },
34
106
  "confidenceKeys": {
35
107
  "upper": "high",
36
108
  "lower": "low"
@@ -61,8 +133,18 @@
61
133
  "visualizationType": "Bar",
62
134
  "series": [
63
135
  {
64
- "dataKey": "Value",
136
+ "dataKey": "data1",
137
+ "type": "Bar"
138
+ },
139
+ {
140
+ "dataKey": "data2",
141
+ "type": "Bar"
142
+ },
143
+ {
144
+ "dataKey": "data3",
65
145
  "type": "Bar"
66
146
  }
67
- ]
147
+ ],
148
+ "description": "This example shows a bar chart created in the visualization editor in WCMS",
149
+ "dataCutoff": "0"
68
150
  }
@@ -0,0 +1 @@
1
+ {"type":"chart","title":"Example Line Chart","theme":"theme-green","animate":true,"fontSize":"medium","lineDatapointStyle":"hover","barHasBorder":"false","isLollipopChart":false,"lollipopShape":"circle","lollipopColorStyle":"two-tone","visualizationSubType":"regular","barStyle":"","roundingStyle":"standard","tipRounding":"top","padding":{"left":5,"right":5},"yAxis":{"hideAxis":false,"displayNumbersOnBar":false,"hideLabel":false,"hideTicks":false,"size":"75","gridLines":false,"min":"","max":"","label":"Y-Axis Example Label","numTicks":"9"},"barThickness":0.35,"barHeight":25,"height":"375","xAxis":{"type":"date","hideAxis":false,"hideLabel":false,"hideTicks":false,"size":"77","tickRotation":"25","min":"","max":"","dataKey":"Date","label":"X-Axis Example Label","dateParseFormat":"%d/%m/%Y","dateDisplayFormat":"%d/%m/%Y"},"table":{"label":"Data Table","expanded":true,"limitHeight":false,"height":"","caption":"","download":true,"show":true},"orientation":"vertical","legend":{"behavior":"isolate","position":"right","colorCode":"","reverseLabelOrder":false,"description":"","dynamicLegend":false,"dynamicLegendDefaultText":"Show All","dynamicLegendItemLimit":5,"dynamicLegendItemLimitMessage":"Dynamic Legend Item Limit Hit.","dynamicLegendChartMessage":"Select Options from the Legend","label":"Type of Data"},"exclusions":{"active":false,"keys":[]},"palette":"qualitative-bold","isPaletteReversed":false,"labels":false,"dataFormat":{"commas":false,"prefix":"","suffix":""},"confidenceKeys":{},"visual":{"border":true,"accent":true,"background":true},"data":[{"Date":"1/15/2016","Data 1":"90","Data 2":"135","Data 3":"300","Data 4":"95","Data 5":"120","Data 6":"310"},{"Date":"2/15/2016","Data 1":"40","Data 2":"90","Data 3":"240","Data 4":"60","Data 5":"160","Data 6":"200"},{"Date":"3/15/2016","Data 1":"50","Data 2":"300","Data 3":"290","Data 4":"100","Data 5":"200","Data 6":"250"},{"Date":"4/15/2016","Data 1":"120","Data 2":"160","Data 3":"230","Data 4":"180","Data 5":"160","Data 6":"220"},{"Date":"5/15/2016","Data 1":"80","Data 2":"350","Data 3":"300","Data 4":"150","Data 5":"130","Data 6":"100"},{"Date":"6/15/2016","Data 1":"90","Data 2":"220","Data 3":"320","Data 4":"100","Data 5":"220","Data 6":"300"}],"visualizationType":"Line","series":[{"dataKey":"Data 1","type":"Bar"},{"dataKey":"Data 2","type":"Bar"},{"dataKey":"Data 3","type":"Bar"},{"dataKey":"Data 4","type":"Bar"},{"dataKey":"Data 5","type":"Bar"},{"dataKey":"Data 6","type":"Bar"}]}
@@ -0,0 +1,38 @@
1
+ {
2
+ "title": "Planet Radius (Combo Example)",
3
+ "dataUrl": "/examples/planet-example-data-max-increase.json",
4
+ "animate": true,
5
+ "animateReplay": true,
6
+
7
+ "visualizationType": "Bar",
8
+ "visualizationSubType": "horizontal",
9
+ "isLollipopChart": false,
10
+ "barHasBorder": "true",
11
+ "series": [{ "dataKey": "Radius" }, { "dataKey": "Diameter" }],
12
+ "fontSize": "small",
13
+ "dataFormat": {
14
+ "roundTo": 1,
15
+ "commas": false,
16
+ "prefix": "",
17
+ "suffix": "km"
18
+ },
19
+ "padding": {
20
+ "left": 0,
21
+ "right": 0
22
+ },
23
+ "yAxis": {
24
+ "label": "Measurement (1000km)",
25
+ "displayNumbersOnBar": false,
26
+ "labelPlacement": "On Date/Category Axis"
27
+ },
28
+ "xAxis": {
29
+ "label": "Planet",
30
+ "dataKey": "name",
31
+ "size": 75
32
+ },
33
+ "table": {
34
+ "label": "Data Table",
35
+ "expanded": false
36
+ },
37
+ "lollipopShape": "circle"
38
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "type": "chart",
3
+ "title": "Example Line Chart",
4
+ "theme": "theme-green",
5
+ "fontSize": "medium",
6
+ "height": "375",
7
+ "padding": { "left": 5, "right": 5 },
8
+ "yAxis": { "size": "75", "gridLines": false, "label": "Y-Axis Example Label", "numTicks": "9" },
9
+ "barThickness": 0.35,
10
+ "xAxis": { "size": "77", "tickRotation": "25", "dataKey": "Date", "label": "X-Axis Example Label", "type": "date", "dateParseFormat": "%d/%m/%Y", "dateDisplayFormat": "%d/%m/%Y" },
11
+ "table": { "label": "Data Table", "expanded": true, "download": true },
12
+ "legend": { "behavior": "isolate", "position": "right", "label": "Type of Data" },
13
+ "palette": "qualitative-bold",
14
+ "labels": false,
15
+ "dataFormat": {},
16
+ "confidenceKeys": {},
17
+ "data": [
18
+ { "Date": "1/15/2016", "Data 1": "900", "Data 2": "1350", "Data 3": "2000", "Data 4": "950", "Data 5": "1200", "Data 6": "1610" },
19
+ { "Date": "2/15/2016", "Data 1": "600", "Data 2": "1150", "Data 3": "1000", "Data 4": "1350", "Data 5": "200", "Data 6": "610" },
20
+ { "Date": "3/15/2016", "Data 1": "700", "Data 2": "1550", "Data 3": "1800", "Data 4": "1650", "Data 5": "2000", "Data 6": "1610" },
21
+ { "Date": "3/15/2016", "Data 1": "300", "Data 2": "550", "Data 3": "800", "Data 4": "650", "Data 5": "2100", "Data 6": "2210" }
22
+ ],
23
+ "visualizationType": "Line",
24
+ "series": [
25
+ { "dataKey": "Data 1", "type": "Line" },
26
+ { "dataKey": "Data 2", "type": "Line" },
27
+ { "dataKey": "Data 3", "type": "Line" },
28
+ { "dataKey": "Data 4", "type": "Line" },
29
+ { "dataKey": "Data 5", "type": "Line" },
30
+ { "dataKey": "Data 6", "type": "Line" }
31
+ ]
32
+ }
@@ -23,10 +23,10 @@
23
23
  ],
24
24
  "visualizationType": "Line",
25
25
  "series": [
26
- { "dataKey": "Data 1", "type": "Bar" },
27
- { "dataKey": "Data 2", "type": "Bar" },
28
- { "dataKey": "Data 3", "type": "Bar" },
29
- { "dataKey": "Data 4", "type": "Bar" },
30
- { "dataKey": "Data 5", "type": "Bar" }
26
+ { "dataKey": "Data 1", "type": "Line" },
27
+ { "dataKey": "Data 2", "type": "Line" },
28
+ { "dataKey": "Data 3", "type": "Line" },
29
+ { "dataKey": "Data 4", "type": "Line" },
30
+ { "dataKey": "Data 5", "type": "Line" }
31
31
  ]
32
32
  }
@@ -24,11 +24,11 @@
24
24
  ],
25
25
  "visualizationType": "Line",
26
26
  "series": [
27
- { "dataKey": "Data 1", "type": "Bar" },
28
- { "dataKey": "Data 2", "type": "Bar" },
29
- { "dataKey": "Data 3", "type": "Bar" },
30
- { "dataKey": "Data 4", "type": "Bar" },
31
- { "dataKey": "Data 5", "type": "Bar" },
32
- { "dataKey": "Data 6", "type": "Bar" }
27
+ { "dataKey": "Data 1", "type": "Line" },
28
+ { "dataKey": "Data 2", "type": "Line" },
29
+ { "dataKey": "Data 3", "type": "Line" },
30
+ { "dataKey": "Data 4", "type": "Line" },
31
+ { "dataKey": "Data 5", "type": "Line" },
32
+ { "dataKey": "Data 6", "type": "Line" }
33
33
  ]
34
34
  }