@cdc/chart 4.23.1 → 4.23.2
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.
- package/dist/cdcchart.js +54532 -696
- package/examples/Barchart_with_negative.json +34 -0
- package/examples/box-plot.json +2 -2
- package/examples/dynamic-legends.json +1 -1
- package/examples/example-bar-chart-nonnumeric.json +36 -0
- package/examples/example-bar-chart.json +33 -0
- package/examples/example-combo-bar-nonnumeric.json +105 -0
- package/examples/gallery/bar-chart-vertical/vertical-bar-chart-categorical.json +1 -1
- package/examples/gallery/bar-chart-vertical/vertical-bar-chart.json +2 -2
- package/examples/gallery/paired-bar/paired-bar-chart.json +65 -13
- package/examples/line-chart-nonnumeric.json +32 -0
- package/examples/line-chart.json +21 -63
- package/examples/newdata.json +1 -1
- package/examples/planet-combo-example-config.json +143 -20
- package/examples/planet-example-data-nonnumeric.json +56 -0
- package/examples/planet-example-data.json +2 -2
- package/examples/planet-pie-example-config-nonnumeric.json +30 -0
- package/examples/scatterplot-continuous.csv +17 -0
- package/examples/scatterplot.json +136 -0
- package/examples/sparkline-chart-nonnumeric.json +76 -0
- package/examples/stacked-vertical-bar-example-negative.json +154 -0
- package/examples/stacked-vertical-bar-example-nonnumerics.json +154 -0
- package/index.html +74 -0
- package/package.json +29 -23
- package/src/{CdcChart.tsx → CdcChart.jsx} +74 -56
- package/src/components/{BarChart.tsx → BarChart.jsx} +99 -91
- package/src/components/BoxPlot.jsx +88 -0
- package/src/components/{DataTable.tsx → DataTable.jsx} +102 -25
- package/src/components/{EditorPanel.js → EditorPanel.jsx} +228 -14
- package/src/components/{Filters.js → Filters.jsx} +6 -12
- package/src/components/{Legend.js → Legend.jsx} +120 -108
- package/src/components/{LineChart.tsx → LineChart.jsx} +26 -12
- package/src/components/{LinearChart.tsx → LinearChart.jsx} +67 -47
- package/src/components/{PairedBarChart.tsx → PairedBarChart.jsx} +45 -78
- package/src/components/{PieChart.tsx → PieChart.jsx} +17 -32
- package/src/components/ScatterPlot.jsx +48 -0
- package/src/components/{SparkLine.js → SparkLine.jsx} +49 -18
- package/src/components/{useIntersectionObserver.tsx → useIntersectionObserver.jsx} +1 -1
- package/src/data/initial-state.js +33 -3
- package/src/hooks/{useColorPalette.ts → useColorPalette.js} +10 -28
- package/src/hooks/{useReduceData.ts → useReduceData.js} +25 -14
- package/src/hooks/useRightAxis.js +3 -1
- package/src/index.jsx +16 -0
- package/src/scss/DataTable.scss +22 -0
- package/src/scss/main.scss +30 -10
- package/vite.config.js +4 -0
- package/dist/495.js +0 -3
- package/dist/703.js +0 -1
- package/src/components/BoxPlot.js +0 -92
- package/src/index.html +0 -67
- package/src/index.tsx +0 -18
- /package/src/{context.tsx → ConfigContext.jsx} +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"Category": "One",
|
|
4
|
+
"Values": 888
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"Category": "Two",
|
|
8
|
+
"Values": 400
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"Category": "Three",
|
|
12
|
+
"Values": -100
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"Category": "Four",
|
|
16
|
+
"Values": 500
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"Category": "Five",
|
|
20
|
+
"Values": 700
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"Category": "Six",
|
|
24
|
+
"Values": -1000
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"Category": "Seven",
|
|
28
|
+
"Values": 300
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"Category": "Eight",
|
|
32
|
+
"Values": -500
|
|
33
|
+
}
|
|
34
|
+
]
|
package/examples/box-plot.json
CHANGED
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"numTicks": "",
|
|
41
41
|
"label": "Observations"
|
|
42
42
|
},
|
|
43
|
-
"boxplot": [],
|
|
44
43
|
"topAxis": {
|
|
45
44
|
"hasLine": false
|
|
46
45
|
},
|
|
@@ -80,6 +79,7 @@
|
|
|
80
79
|
"colorCode": "",
|
|
81
80
|
"reverseLabelOrder": false,
|
|
82
81
|
"description": "",
|
|
82
|
+
"hide": true,
|
|
83
83
|
"dynamicLegend": false,
|
|
84
84
|
"dynamicLegendDefaultText": "Show All",
|
|
85
85
|
"dynamicLegendItemLimit": 5,
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"dataDescription": {
|
|
112
112
|
"horizontal": false,
|
|
113
113
|
"series": false,
|
|
114
|
-
"singleRow":
|
|
114
|
+
"singleRow": true,
|
|
115
115
|
"xKey": "Group_Category",
|
|
116
116
|
"valueKey": "Value"
|
|
117
117
|
},
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "chart",
|
|
3
|
+
"title": "Example Bar Chart",
|
|
4
|
+
"theme": "theme-blue",
|
|
5
|
+
"fontSize": "medium",
|
|
6
|
+
"height": 300,
|
|
7
|
+
"padding": { "left": 5, "right": 5 },
|
|
8
|
+
"yAxis": { "size": "76", "gridLines": false, "label": "Y Axis Example Label" },
|
|
9
|
+
"barThickness": "0.6",
|
|
10
|
+
"xAxis": { "size": "59", "tickRotation": 0, "dataKey": "Date", "label": "X Axis Example Label" },
|
|
11
|
+
"table": { "label": "Data Type by Date", "expanded": true },
|
|
12
|
+
"legend": { "behavior": "isolate", "position": "right", "label": "Type of Data" },
|
|
13
|
+
"palette": "qualitative-bold",
|
|
14
|
+
"labels": false,
|
|
15
|
+
"dataFormat": { "suffix": " units" },
|
|
16
|
+
"confidenceKeys": {},
|
|
17
|
+
"data": [
|
|
18
|
+
{ "Date": "1/15/2016", "Data 1": "90", "Data 2": "1323.5", "Data 3": "1000", "Data 4": "95", "Data 5": "120", "Data 6": "310" },
|
|
19
|
+
{ "Date": "2/15/2016", "Data 1": "NA", "Data 2": "90.3", "Data 3": "240", "Data 4": "60", "Data 5": "160", "Data 6": "200" },
|
|
20
|
+
{ "Date": "3/15/2016", "Data 1": "50", "Data 2": "booo", "Data 3": "290", "Data 4": "100", "Data 5": "200", "Data 6": "250" },
|
|
21
|
+
{ "Date": "4/15/2016", "Data 1": "", "Data 2": "160", "Data 3": "230", "Data 4": "180", "Data 5": "160", "Data 6": "220" },
|
|
22
|
+
{ "Date": "5/15/2016", "Data 1": "", "Data 2": "350", "Data 3": "300", "Data 4": "150", "Data 5": "130", "Data 6": "100" },
|
|
23
|
+
{ "Date": "6/15/2016", "Data 1": "90", "Data 2": "220", "Data 3": "320", "Data 4": "100", "Data 5": "220", "Data 6": "300" }
|
|
24
|
+
],
|
|
25
|
+
"visualizationType": "Bar",
|
|
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" }
|
|
33
|
+
],
|
|
34
|
+
"description": "This example shows a bar chart created in the visualization editor in WCMS",
|
|
35
|
+
"dataCutoff": "0"
|
|
36
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "chart",
|
|
3
|
+
"title": "Example Bar Chart",
|
|
4
|
+
"theme": "theme-blue",
|
|
5
|
+
"fontSize": "medium",
|
|
6
|
+
"height": 300,
|
|
7
|
+
"padding": { "left": 5, "right": 5 },
|
|
8
|
+
"yAxis": { "size": "76", "gridLines": false, "label": "Y Axis Example Label" },
|
|
9
|
+
"barThickness": "0.6",
|
|
10
|
+
"xAxis": { "size": "59", "tickRotation": 0, "dataKey": "Date", "label": "X Axis Example Label" },
|
|
11
|
+
"table": { "label": "Data Type by Date", "expanded": true },
|
|
12
|
+
"legend": { "behavior": "isolate", "position": "right", "label": "Type of Data" },
|
|
13
|
+
"palette": "qualitative-bold",
|
|
14
|
+
"labels": false,
|
|
15
|
+
"dataFormat": { "suffix": " units" },
|
|
16
|
+
"confidenceKeys": {},
|
|
17
|
+
"data": [
|
|
18
|
+
{ "Date": "1/15/2016", "Data 1": "90", "Data 2": "135", "Data 3": "300", "Data 4": "95", "Data 5": "120", "Data 6": "310" },
|
|
19
|
+
{ "Date": "2/15/2016", "Data 1": "40", "Data 2": "90", "Data 3": "240", "Data 4": "60", "Data 5": "160", "Data 6": "200" },
|
|
20
|
+
{ "Date": "3/15/2016", "Data 1": "50", "Data 2": "300", "Data 3": "290", "Data 4": "100", "Data 5": "200", "Data 6": "250" },
|
|
21
|
+
{ "Date": "4/15/2016", "Data 1": "120", "Data 2": "160", "Data 3": "230", "Data 4": "180", "Data 5": "160", "Data 6": "220" },
|
|
22
|
+
{ "Date": "5/15/2016", "Data 1": "80", "Data 2": "350", "Data 3": "300", "Data 4": "150", "Data 5": "130", "Data 6": "100" },
|
|
23
|
+
{ "Date": "6/15/2016", "Data 1": "90", "Data 2": "220", "Data 3": "320", "Data 4": "100", "Data 5": "220", "Data 6": "300" }
|
|
24
|
+
],
|
|
25
|
+
"visualizationType": "Bar",
|
|
26
|
+
"series": [
|
|
27
|
+
{ "dataKey": "Data 1", "type": "Bar" },
|
|
28
|
+
{ "dataKey": "Data 2", "type": "Bar" },
|
|
29
|
+
{ "dataKey": "Data 3", "type": "Bar" }
|
|
30
|
+
],
|
|
31
|
+
"description": "This example shows a bar chart created in the visualization editor in WCMS",
|
|
32
|
+
"dataCutoff": "0"
|
|
33
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "chart",
|
|
3
|
+
"title": "Combo Bar-Line Chart",
|
|
4
|
+
"theme": "theme-indigo",
|
|
5
|
+
"animate": false,
|
|
6
|
+
"fontSize": "medium",
|
|
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",
|
|
16
|
+
"padding": { "left": 5, "right": 5 },
|
|
17
|
+
"yAxis": {
|
|
18
|
+
"hideAxis": false,
|
|
19
|
+
"displayNumbersOnBar": false,
|
|
20
|
+
"hideLabel": false,
|
|
21
|
+
"hideTicks": false,
|
|
22
|
+
"size": "68",
|
|
23
|
+
"gridLines": true,
|
|
24
|
+
"min": "",
|
|
25
|
+
"max": "",
|
|
26
|
+
"labelColor": "#333",
|
|
27
|
+
"tickLabelColor": "#333",
|
|
28
|
+
"tickColor": "#333",
|
|
29
|
+
"rightHideAxis": true,
|
|
30
|
+
"rightAxisSize": 50,
|
|
31
|
+
"rightLabelOffsetSize": 0,
|
|
32
|
+
"rightAxisLabelColor": "#333",
|
|
33
|
+
"rightAxisTickLabelColor": "#333",
|
|
34
|
+
"rightAxisTickColor": "#333",
|
|
35
|
+
"isLegendValue": false,
|
|
36
|
+
"numTicks": "",
|
|
37
|
+
"label": "Y-Axis Label Example"
|
|
38
|
+
},
|
|
39
|
+
"topAxis": { "hasLine": false },
|
|
40
|
+
"barThickness": "0.5",
|
|
41
|
+
"barHeight": 25,
|
|
42
|
+
"height": "332",
|
|
43
|
+
"xAxis": {
|
|
44
|
+
"type": "date",
|
|
45
|
+
"hideAxis": false,
|
|
46
|
+
"hideLabel": false,
|
|
47
|
+
"hideTicks": false,
|
|
48
|
+
"size": "78",
|
|
49
|
+
"tickRotation": "25",
|
|
50
|
+
"min": "",
|
|
51
|
+
"max": "",
|
|
52
|
+
"labelColor": "#333",
|
|
53
|
+
"tickLabelColor": "#333",
|
|
54
|
+
"tickColor": "#333",
|
|
55
|
+
"isLegendValue": false,
|
|
56
|
+
"numTicks": "",
|
|
57
|
+
"dataKey": "Date",
|
|
58
|
+
"label": "X-Axis Example Label",
|
|
59
|
+
"dateParseFormat": "%d/%m/%Y",
|
|
60
|
+
"dateDisplayFormat": "%d/%m/%Y"
|
|
61
|
+
},
|
|
62
|
+
"table": { "label": "Data Table", "expanded": true, "limitHeight": false, "height": "", "caption": "", "download": true, "show": true },
|
|
63
|
+
"orientation": "vertical",
|
|
64
|
+
"legend": {
|
|
65
|
+
"behavior": "highlight",
|
|
66
|
+
"position": "right",
|
|
67
|
+
"singleRow": false,
|
|
68
|
+
"colorCode": "",
|
|
69
|
+
"reverseLabelOrder": false,
|
|
70
|
+
"description": "",
|
|
71
|
+
"dynamicLegend": false,
|
|
72
|
+
"dynamicLegendDefaultText": "Show All",
|
|
73
|
+
"dynamicLegendItemLimit": 5,
|
|
74
|
+
"dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
|
|
75
|
+
"dynamicLegendChartMessage": "Select Options from the Legend",
|
|
76
|
+
"label": "Data Type"
|
|
77
|
+
},
|
|
78
|
+
"exclusions": { "active": false, "keys": [] },
|
|
79
|
+
"palette": "qualitative2",
|
|
80
|
+
"isPaletteReversed": false,
|
|
81
|
+
"labels": false,
|
|
82
|
+
"dataFormat": { "commas": false, "prefix": "", "suffix": "" },
|
|
83
|
+
"confidenceKeys": {},
|
|
84
|
+
"visual": { "border": true, "accent": true, "background": true },
|
|
85
|
+
"data": [
|
|
86
|
+
{ "Date": "1/15/2016", "Data 1": "N/A", "Data 2": "110", "Data 3": "100", "Data 4": "90", "Monthly-Goal": "100" },
|
|
87
|
+
{ "Date": "2/15/2016", "Data 1": "100", "Data 2": "goop", "Data 3": "100", "Data 4": "100", "Monthly-Goal": "100" },
|
|
88
|
+
{ "Date": "3/15/2016", "Data 1": "", "Data 2": "90", "Data 3": "100.5", "Data 4": "120", "Monthly-Goal": "110" },
|
|
89
|
+
{ "Date": "4/15/2016", "Data 1": "80", "Data 2": "2,00", "Data 3": "110", "Data 4": "120", "Monthly-Goal": "110" },
|
|
90
|
+
{ "Date": "5/15/2016", "Data 1": "70", "Data 2": "90", "Data 3": "110", "Data 4": "130", "Monthly-Goal": "120" },
|
|
91
|
+
{ "Date": "6/15/2016", "Data 1": "100", "Data 2": "120", "Data 3": "120", "Data 4": "130", "Monthly-Goal": "120" },
|
|
92
|
+
{ "Date": "7/15/2016", "Data 1": "zip", "Data 2": null, "Data 3": "120", "Data 4": "130", "Monthly-Goal": "130" },
|
|
93
|
+
{ "Date": "8/15/2016", "Data 1": "110", "Data 2": "130", "Data 3": "120", "Data 4": "140", "Monthly-Goal": "130" },
|
|
94
|
+
{ "Date": "9/15/2016", "Data 1": "120", "Data 2": "130", "Data 3": "120", "Data 4": "150", "Monthly-Goal": "140" }
|
|
95
|
+
],
|
|
96
|
+
"visualizationType": "Combo",
|
|
97
|
+
"series": [
|
|
98
|
+
{ "dataKey": "Data 1", "type": "Bar" },
|
|
99
|
+
{ "dataKey": "Data 2", "type": "Bar" },
|
|
100
|
+
{ "dataKey": "Data 3", "type": "Bar" },
|
|
101
|
+
{ "dataKey": "Data 4", "type": "Bar" },
|
|
102
|
+
{ "dataKey": "Monthly-Goal", "type": "dashed-sm", "axis": "Left" }
|
|
103
|
+
],
|
|
104
|
+
"description": "Note: There is an option to make the line dotted as demonstrated above"
|
|
105
|
+
}
|
|
@@ -153,11 +153,11 @@
|
|
|
153
153
|
{
|
|
154
154
|
"Date": "6/15/2016",
|
|
155
155
|
"Data 1": "9000",
|
|
156
|
-
"Data 2": "
|
|
156
|
+
"Data 2": "-2200",
|
|
157
157
|
"Data 3": "320",
|
|
158
158
|
"Data 4": "100",
|
|
159
159
|
"Data 5": "220",
|
|
160
|
-
"Data 6": "3000"
|
|
160
|
+
"Data 6": "-3000"
|
|
161
161
|
}
|
|
162
162
|
],
|
|
163
163
|
"visualizationType": "Bar",
|
|
@@ -1,43 +1,80 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "chart",
|
|
3
3
|
"title": "Example Paired Bar Chart",
|
|
4
|
-
"theme": "theme-
|
|
4
|
+
"theme": "theme-pink",
|
|
5
|
+
"animate": false,
|
|
5
6
|
"fontSize": "small",
|
|
6
7
|
"lineDatapointStyle": "hover",
|
|
7
|
-
"barHasBorder": "
|
|
8
|
+
"barHasBorder": "true",
|
|
8
9
|
"isLollipopChart": false,
|
|
9
10
|
"lollipopShape": "circle",
|
|
10
11
|
"lollipopColorStyle": "two-tone",
|
|
11
12
|
"visualizationSubType": null,
|
|
13
|
+
"barStyle": "",
|
|
14
|
+
"roundingStyle": "standard",
|
|
15
|
+
"tipRounding": "top",
|
|
12
16
|
"padding": {
|
|
13
17
|
"left": 5,
|
|
14
18
|
"right": 5
|
|
15
19
|
},
|
|
16
20
|
"yAxis": {
|
|
17
|
-
"hideAxis":
|
|
21
|
+
"hideAxis": false,
|
|
22
|
+
"displayNumbersOnBar": true,
|
|
18
23
|
"hideLabel": false,
|
|
19
24
|
"hideTicks": false,
|
|
20
|
-
"size": "
|
|
25
|
+
"size": "86",
|
|
21
26
|
"gridLines": false,
|
|
22
|
-
"
|
|
23
|
-
"
|
|
27
|
+
"min": "",
|
|
28
|
+
"max": "",
|
|
29
|
+
"labelColor": "#333",
|
|
30
|
+
"tickLabelColor": "#333",
|
|
31
|
+
"tickColor": "#333",
|
|
32
|
+
"rightHideAxis": true,
|
|
33
|
+
"rightAxisSize": 50,
|
|
34
|
+
"rightLabel": "",
|
|
35
|
+
"rightLabelOffsetSize": 0,
|
|
36
|
+
"rightAxisLabelColor": "#333",
|
|
37
|
+
"rightAxisTickLabelColor": "#333",
|
|
38
|
+
"rightAxisTickColor": "#333",
|
|
39
|
+
"numTicks": "4",
|
|
40
|
+
"label": "Value Axisd"
|
|
41
|
+
},
|
|
42
|
+
"boxplot": [],
|
|
43
|
+
"topAxis": {
|
|
44
|
+
"hasLine": false
|
|
24
45
|
},
|
|
46
|
+
"isLegendValue": false,
|
|
25
47
|
"barThickness": 0.35,
|
|
26
|
-
"
|
|
48
|
+
"barHeight": "25",
|
|
49
|
+
"barSpace": "15",
|
|
50
|
+
"heights": {
|
|
51
|
+
"vertical": 300,
|
|
52
|
+
"horizontal": 287
|
|
53
|
+
},
|
|
27
54
|
"xAxis": {
|
|
28
55
|
"type": "categorical",
|
|
29
56
|
"hideAxis": false,
|
|
30
57
|
"hideLabel": false,
|
|
31
58
|
"hideTicks": false,
|
|
32
|
-
"size": "
|
|
59
|
+
"size": "79",
|
|
33
60
|
"tickRotation": "0",
|
|
61
|
+
"min": "",
|
|
34
62
|
"max": "15000",
|
|
63
|
+
"labelColor": "#333",
|
|
64
|
+
"tickLabelColor": "#333",
|
|
65
|
+
"tickColor": "#333",
|
|
66
|
+
"numTicks": "",
|
|
67
|
+
"labelOffset": "87",
|
|
35
68
|
"dataKey": "Age Group",
|
|
36
69
|
"label": "Age Group"
|
|
37
70
|
},
|
|
38
71
|
"table": {
|
|
39
72
|
"label": "Data Table",
|
|
40
73
|
"expanded": false,
|
|
74
|
+
"limitHeight": false,
|
|
75
|
+
"height": "",
|
|
76
|
+
"caption": "",
|
|
77
|
+
"showDownloadUrl": false,
|
|
41
78
|
"show": true,
|
|
42
79
|
"indexLabel": "Region"
|
|
43
80
|
},
|
|
@@ -45,7 +82,15 @@
|
|
|
45
82
|
"legend": {
|
|
46
83
|
"behavior": "isolate",
|
|
47
84
|
"position": "right",
|
|
85
|
+
"singleRow": false,
|
|
86
|
+
"colorCode": "",
|
|
48
87
|
"reverseLabelOrder": false,
|
|
88
|
+
"description": "",
|
|
89
|
+
"dynamicLegend": false,
|
|
90
|
+
"dynamicLegendDefaultText": "Show All",
|
|
91
|
+
"dynamicLegendItemLimit": 5,
|
|
92
|
+
"dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.",
|
|
93
|
+
"dynamicLegendChartMessage": "Select Options from the Legend",
|
|
49
94
|
"hide": false,
|
|
50
95
|
"label": "Region "
|
|
51
96
|
},
|
|
@@ -53,14 +98,22 @@
|
|
|
53
98
|
"active": false,
|
|
54
99
|
"keys": []
|
|
55
100
|
},
|
|
56
|
-
"palette": "
|
|
101
|
+
"palette": "qualitative1",
|
|
57
102
|
"isPaletteReversed": false,
|
|
58
103
|
"labels": false,
|
|
59
104
|
"dataFormat": {
|
|
60
105
|
"commas": true,
|
|
61
|
-
"
|
|
106
|
+
"prefix": "",
|
|
107
|
+
"suffix": " per 100k",
|
|
108
|
+
"abbreviated": false
|
|
62
109
|
},
|
|
63
110
|
"confidenceKeys": {},
|
|
111
|
+
"visual": {
|
|
112
|
+
"border": true,
|
|
113
|
+
"accent": true,
|
|
114
|
+
"background": true
|
|
115
|
+
},
|
|
116
|
+
"height": "400",
|
|
64
117
|
"data": [
|
|
65
118
|
{
|
|
66
119
|
"Region": "West Coast",
|
|
@@ -115,7 +168,7 @@
|
|
|
115
168
|
{
|
|
116
169
|
"Region": "East Coast",
|
|
117
170
|
"Age Group": "35-44",
|
|
118
|
-
"Cases Per 100K": "
|
|
171
|
+
"Cases Per 100K": "27478"
|
|
119
172
|
},
|
|
120
173
|
{
|
|
121
174
|
"Region": "East Coast",
|
|
@@ -191,6 +244,5 @@
|
|
|
191
244
|
"type": "Bar"
|
|
192
245
|
}
|
|
193
246
|
],
|
|
194
|
-
"filters": []
|
|
195
|
-
"barHeight": "23"
|
|
247
|
+
"filters": []
|
|
196
248
|
}
|
|
@@ -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": "8", "Data 2": "N/A", "Data 3": "1,300", "Data 4": "95", "Data 5": "120", "Data 6": "310" },
|
|
19
|
+
{ "Date": "2/15/2016", "Data 1": "dddd", "Data 2": "9", "Data 3": "240", "Data 4": "60", "Data 5": "160", "Data 6": "200" },
|
|
20
|
+
{ "Date": "3/15/2016", "Data 1": "boo", "Data 2": "5", "Data 3": "290", "Data 4": "100", "Data 5": "200", "Data 6": "250" },
|
|
21
|
+
{ "Date": "4/15/2016", "Data 1": "44", "Data 2": "NA", "Data 3": "230", "Data 4": "180", "Data 5": "160", "Data 6": "220" },
|
|
22
|
+
{ "Date": "5/15/2016", "Data 1": "12", "Data 2": "350", "Data 3": "300", "Data 4": "150", "Data 5": "130", "Data 6": "100" }
|
|
23
|
+
],
|
|
24
|
+
"visualizationType": "Line",
|
|
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" }
|
|
31
|
+
]
|
|
32
|
+
}
|
package/examples/line-chart.json
CHANGED
|
@@ -1,76 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "chart",
|
|
3
|
-
"title": "Example
|
|
4
|
-
"theme": "theme-
|
|
3
|
+
"title": "Example Line Chart",
|
|
4
|
+
"theme": "theme-green",
|
|
5
5
|
"fontSize": "medium",
|
|
6
6
|
"height": "375",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
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
|
-
},
|
|
7
|
+
"padding": { "left": 5, "right": 5 },
|
|
8
|
+
"yAxis": { "size": "75", "gridLines": false, "label": "Y-Axis Example Label", "numTicks": "9" },
|
|
18
9
|
"barThickness": 0.35,
|
|
19
|
-
"xAxis": {
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
},
|
|
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" },
|
|
38
13
|
"palette": "qualitative-bold",
|
|
39
14
|
"labels": false,
|
|
40
15
|
"dataFormat": {},
|
|
41
16
|
"confidenceKeys": {},
|
|
42
17
|
"data": [
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
|
|
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
|
-
}
|
|
18
|
+
{ "Date": "1/15/2016", "Data 1": "90", "Data 2": "135", "Data 3": "300", "Data 4": "95", "Data 5": "120", "Data 6": "310" },
|
|
19
|
+
{ "Date": "2/15/2016", "Data 1": "40", "Data 2": "90", "Data 3": "240", "Data 4": "60", "Data 5": "160", "Data 6": "200" },
|
|
20
|
+
{ "Date": "3/15/2016", "Data 1": "50", "Data 2": "300", "Data 3": "290", "Data 4": "100", "Data 5": "200", "Data 6": "250" },
|
|
21
|
+
{ "Date": "4/15/2016", "Data 1": "120", "Data 2": "160", "Data 3": "230", "Data 4": "180", "Data 5": "160", "Data 6": "220" },
|
|
22
|
+
{ "Date": "5/15/2016", "Data 1": "80", "Data 2": "350", "Data 3": "300", "Data 4": "150", "Data 5": "130", "Data 6": "100" },
|
|
23
|
+
{ "Date": "6/15/2016", "Data 1": "90", "Data 2": "220", "Data 3": "320", "Data 4": "100", "Data 5": "220", "Data 6": "300" }
|
|
67
24
|
],
|
|
68
|
-
"visualizationType": "
|
|
25
|
+
"visualizationType": "Line",
|
|
69
26
|
"series": [
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
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" }
|
|
33
|
+
]
|
|
76
34
|
}
|