@cdc/waffle-chart 4.25.11 → 4.26.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/cdcwafflechart.js +10841 -9924
- package/examples/default.json +10 -0
- package/examples/tp5-gauge-white.json +158 -0
- package/examples/tp5-gauge.json +158 -0
- package/examples/tp5-style-white.json +72 -0
- package/examples/tp5-style.json +72 -0
- package/examples/tp5-waffle.json +123 -0
- package/index.html +1 -36
- package/package.json +31 -33
- package/src/CdcWaffleChart.tsx +230 -98
- package/src/_stories/WaffleChart.Editor.stories.tsx +254 -30
- package/src/_stories/WaffleChart.stories.tsx +77 -2
- package/src/components/EditorPanel.jsx +118 -215
- package/src/images/callout-flag.svg +7 -0
- package/src/scss/waffle-chart.scss +216 -1
- package/src/store/chart.reducer.ts +1 -1
- package/src/test/CdcWaffleChart.test.jsx +1 -1
- package/src/types/Config.ts +4 -2
- package/LICENSE +0 -201
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "TP5 Gauge Chart - White Background",
|
|
3
|
+
"visualizationType": "TP5 Gauge",
|
|
4
|
+
"visualizationSubType": "linear",
|
|
5
|
+
"showPercent": true,
|
|
6
|
+
"showDenominator": true,
|
|
7
|
+
"valueDescription": "out of",
|
|
8
|
+
"content": "of cases occurred in the home",
|
|
9
|
+
"subtext": "Chart subtext or citation",
|
|
10
|
+
"orientation": "horizontal",
|
|
11
|
+
"data": [
|
|
12
|
+
{
|
|
13
|
+
"Insured Rate": "43",
|
|
14
|
+
"Coverage Status": "Insured",
|
|
15
|
+
"state": "Alabama",
|
|
16
|
+
"Year (Good filter option)": "2010",
|
|
17
|
+
"link": "",
|
|
18
|
+
"Verified": true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"Insured Rate": "0",
|
|
22
|
+
"Coverage Status": "Uninsured",
|
|
23
|
+
"state": "Alaska",
|
|
24
|
+
"Year (Good filter option)": "2006",
|
|
25
|
+
"link": "",
|
|
26
|
+
"Verified": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"Insured Rate": "72.7",
|
|
30
|
+
"Coverage Status": "Insured",
|
|
31
|
+
"state": "Arizona",
|
|
32
|
+
"Year (Good filter option)": "2008",
|
|
33
|
+
"link": "#lorem",
|
|
34
|
+
"Verified": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"Insured Rate": "78.7",
|
|
38
|
+
"Coverage Status": "Insured",
|
|
39
|
+
"state": "Arkansas",
|
|
40
|
+
"Year (Good filter option)": "2010",
|
|
41
|
+
"link": "",
|
|
42
|
+
"Verified": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"Insured Rate": "37.2",
|
|
46
|
+
"Coverage Status": "Insured",
|
|
47
|
+
"state": "California",
|
|
48
|
+
"Year (Good filter option)": "2018",
|
|
49
|
+
"link": "https://search.cdc.gov/search/?query=California&utf8=%E2%9C%93&affiliate=cdc-main",
|
|
50
|
+
"Verified": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"Insured Rate": "50.6",
|
|
54
|
+
"Coverage Status": "Insured",
|
|
55
|
+
"state": "Colorado",
|
|
56
|
+
"Year (Good filter option)": "2014",
|
|
57
|
+
"link": "",
|
|
58
|
+
"Verified": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"Insured Rate": "83.2",
|
|
62
|
+
"Coverage Status": "Insured",
|
|
63
|
+
"state": "Connecticut",
|
|
64
|
+
"Year (Good filter option)": "2019",
|
|
65
|
+
"link": "",
|
|
66
|
+
"Verified": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"Insured Rate": "90",
|
|
70
|
+
"Coverage Status": "Insured",
|
|
71
|
+
"state": "Delaware",
|
|
72
|
+
"Year (Good filter option)": "2020",
|
|
73
|
+
"link": "",
|
|
74
|
+
"Verified": true
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"Insured Rate": "77.1",
|
|
78
|
+
"Coverage Status": "Insured",
|
|
79
|
+
"state": "District of Columbia",
|
|
80
|
+
"Year (Good filter option)": "2019",
|
|
81
|
+
"link": "https://search.cdc.gov/search/index.html?query=Washington+D.C.&sitelimit=&utf8=%E2%9C%93&affiliate=cdc-main",
|
|
82
|
+
"Verified": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"Insured Rate": "83",
|
|
86
|
+
"Coverage Status": "Insured",
|
|
87
|
+
"state": "Florida",
|
|
88
|
+
"Year (Good filter option)": "2016",
|
|
89
|
+
"link": "",
|
|
90
|
+
"Verified": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"Insured Rate": "67.4",
|
|
94
|
+
"Coverage Status": "Insured",
|
|
95
|
+
"state": "Georgia",
|
|
96
|
+
"Year (Good filter option)": "2013",
|
|
97
|
+
"link": "",
|
|
98
|
+
"Verified": false
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"filters": [
|
|
102
|
+
{
|
|
103
|
+
"columnName": "Year (Good filter option)",
|
|
104
|
+
"label": "Year",
|
|
105
|
+
"showDropdown": true,
|
|
106
|
+
"order": "desc",
|
|
107
|
+
"active": true,
|
|
108
|
+
"values": [],
|
|
109
|
+
"type": "multi-select"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"fontSize": "",
|
|
113
|
+
"overallFontSize": "medium",
|
|
114
|
+
"dataColumn": "Insured Rate",
|
|
115
|
+
"dataFunction": "Mean (Average)",
|
|
116
|
+
"dataConditionalColumn": "",
|
|
117
|
+
"dataConditionalOperator": "",
|
|
118
|
+
"dataConditionalComparate": "",
|
|
119
|
+
"invalidComparate": false,
|
|
120
|
+
"customDenom": false,
|
|
121
|
+
"dataDenom": "100",
|
|
122
|
+
"dataDenomColumn": "",
|
|
123
|
+
"dataDenomFunction": "",
|
|
124
|
+
"prefix": "",
|
|
125
|
+
"suffix": "%",
|
|
126
|
+
"roundToPlace": "0",
|
|
127
|
+
"shape": "circle",
|
|
128
|
+
"nodeWidth": "10",
|
|
129
|
+
"nodeSpacer": "2",
|
|
130
|
+
"theme": "theme-blue",
|
|
131
|
+
"type": "waffle-chart",
|
|
132
|
+
"gauge": {
|
|
133
|
+
"height": 35,
|
|
134
|
+
"width": "100%"
|
|
135
|
+
},
|
|
136
|
+
"visual": {
|
|
137
|
+
"border": false,
|
|
138
|
+
"accent": false,
|
|
139
|
+
"background": false,
|
|
140
|
+
"hideBackgroundColor": false,
|
|
141
|
+
"borderColorTheme": false,
|
|
142
|
+
"whiteBackground": true,
|
|
143
|
+
"colors": {
|
|
144
|
+
"theme-blue": "#005eaa",
|
|
145
|
+
"theme-purple": "#712177",
|
|
146
|
+
"theme-brown": "#705043",
|
|
147
|
+
"theme-teal": "#00695c",
|
|
148
|
+
"theme-pink": "#af4448",
|
|
149
|
+
"theme-orange": "#bb4d00",
|
|
150
|
+
"theme-slate": "#29434e",
|
|
151
|
+
"theme-indigo": "#26418f",
|
|
152
|
+
"theme-cyan": "#006778",
|
|
153
|
+
"theme-green": "#4b830d",
|
|
154
|
+
"theme-amber": "#fbab18"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"showTitle": true
|
|
158
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "TP5 Gauge Chart",
|
|
3
|
+
"visualizationType": "TP5 Gauge",
|
|
4
|
+
"visualizationSubType": "linear",
|
|
5
|
+
"showPercent": true,
|
|
6
|
+
"showDenominator": true,
|
|
7
|
+
"valueDescription": "out of",
|
|
8
|
+
"content": "of cases occurred in the home",
|
|
9
|
+
"subtext": "Chart subtext or citation",
|
|
10
|
+
"orientation": "horizontal",
|
|
11
|
+
"data": [
|
|
12
|
+
{
|
|
13
|
+
"Insured Rate": "43",
|
|
14
|
+
"Coverage Status": "Insured",
|
|
15
|
+
"state": "Alabama",
|
|
16
|
+
"Year (Good filter option)": "2010",
|
|
17
|
+
"link": "",
|
|
18
|
+
"Verified": true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"Insured Rate": "0",
|
|
22
|
+
"Coverage Status": "Uninsured",
|
|
23
|
+
"state": "Alaska",
|
|
24
|
+
"Year (Good filter option)": "2006",
|
|
25
|
+
"link": "",
|
|
26
|
+
"Verified": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"Insured Rate": "72.7",
|
|
30
|
+
"Coverage Status": "Insured",
|
|
31
|
+
"state": "Arizona",
|
|
32
|
+
"Year (Good filter option)": "2008",
|
|
33
|
+
"link": "#lorem",
|
|
34
|
+
"Verified": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"Insured Rate": "78.7",
|
|
38
|
+
"Coverage Status": "Insured",
|
|
39
|
+
"state": "Arkansas",
|
|
40
|
+
"Year (Good filter option)": "2010",
|
|
41
|
+
"link": "",
|
|
42
|
+
"Verified": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"Insured Rate": "37.2",
|
|
46
|
+
"Coverage Status": "Insured",
|
|
47
|
+
"state": "California",
|
|
48
|
+
"Year (Good filter option)": "2018",
|
|
49
|
+
"link": "https://search.cdc.gov/search/?query=California&utf8=%E2%9C%93&affiliate=cdc-main",
|
|
50
|
+
"Verified": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"Insured Rate": "50.6",
|
|
54
|
+
"Coverage Status": "Insured",
|
|
55
|
+
"state": "Colorado",
|
|
56
|
+
"Year (Good filter option)": "2014",
|
|
57
|
+
"link": "",
|
|
58
|
+
"Verified": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"Insured Rate": "83.2",
|
|
62
|
+
"Coverage Status": "Insured",
|
|
63
|
+
"state": "Connecticut",
|
|
64
|
+
"Year (Good filter option)": "2019",
|
|
65
|
+
"link": "",
|
|
66
|
+
"Verified": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"Insured Rate": "90",
|
|
70
|
+
"Coverage Status": "Insured",
|
|
71
|
+
"state": "Delaware",
|
|
72
|
+
"Year (Good filter option)": "2020",
|
|
73
|
+
"link": "",
|
|
74
|
+
"Verified": true
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"Insured Rate": "77.1",
|
|
78
|
+
"Coverage Status": "Insured",
|
|
79
|
+
"state": "District of Columbia",
|
|
80
|
+
"Year (Good filter option)": "2019",
|
|
81
|
+
"link": "https://search.cdc.gov/search/index.html?query=Washington+D.C.&sitelimit=&utf8=%E2%9C%93&affiliate=cdc-main",
|
|
82
|
+
"Verified": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"Insured Rate": "83",
|
|
86
|
+
"Coverage Status": "Insured",
|
|
87
|
+
"state": "Florida",
|
|
88
|
+
"Year (Good filter option)": "2016",
|
|
89
|
+
"link": "",
|
|
90
|
+
"Verified": true
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"Insured Rate": "67.4",
|
|
94
|
+
"Coverage Status": "Insured",
|
|
95
|
+
"state": "Georgia",
|
|
96
|
+
"Year (Good filter option)": "2013",
|
|
97
|
+
"link": "",
|
|
98
|
+
"Verified": false
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"filters": [
|
|
102
|
+
{
|
|
103
|
+
"columnName": "Year (Good filter option)",
|
|
104
|
+
"label": "Year",
|
|
105
|
+
"showDropdown": true,
|
|
106
|
+
"order": "desc",
|
|
107
|
+
"active": true,
|
|
108
|
+
"values": [],
|
|
109
|
+
"type": "multi-select"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"fontSize": "",
|
|
113
|
+
"overallFontSize": "medium",
|
|
114
|
+
"dataColumn": "Insured Rate",
|
|
115
|
+
"dataFunction": "Mean (Average)",
|
|
116
|
+
"dataConditionalColumn": "",
|
|
117
|
+
"dataConditionalOperator": "",
|
|
118
|
+
"dataConditionalComparate": "",
|
|
119
|
+
"invalidComparate": false,
|
|
120
|
+
"customDenom": false,
|
|
121
|
+
"dataDenom": "100",
|
|
122
|
+
"dataDenomColumn": "",
|
|
123
|
+
"dataDenomFunction": "",
|
|
124
|
+
"prefix": "",
|
|
125
|
+
"suffix": "%",
|
|
126
|
+
"roundToPlace": "0",
|
|
127
|
+
"shape": "circle",
|
|
128
|
+
"nodeWidth": "10",
|
|
129
|
+
"nodeSpacer": "2",
|
|
130
|
+
"theme": "theme-blue",
|
|
131
|
+
"type": "waffle-chart",
|
|
132
|
+
"gauge": {
|
|
133
|
+
"height": 35,
|
|
134
|
+
"width": "100%"
|
|
135
|
+
},
|
|
136
|
+
"visual": {
|
|
137
|
+
"border": true,
|
|
138
|
+
"accent": false,
|
|
139
|
+
"background": false,
|
|
140
|
+
"hideBackgroundColor": false,
|
|
141
|
+
"borderColorTheme": false,
|
|
142
|
+
"whiteBackground": false,
|
|
143
|
+
"colors": {
|
|
144
|
+
"theme-blue": "#005eaa",
|
|
145
|
+
"theme-purple": "#712177",
|
|
146
|
+
"theme-brown": "#705043",
|
|
147
|
+
"theme-teal": "#00695c",
|
|
148
|
+
"theme-pink": "#af4448",
|
|
149
|
+
"theme-orange": "#bb4d00",
|
|
150
|
+
"theme-slate": "#29434e",
|
|
151
|
+
"theme-indigo": "#26418f",
|
|
152
|
+
"theme-cyan": "#006778",
|
|
153
|
+
"theme-green": "#4b830d",
|
|
154
|
+
"theme-amber": "#fbab18"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"showTitle": true
|
|
158
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "waffle-chart",
|
|
3
|
+
"shape": "person",
|
|
4
|
+
"title": "Overdose Mortality Rate",
|
|
5
|
+
"content": "of overdoses resulted in death.",
|
|
6
|
+
"subtext": "This data is an example and does not reflect actual averages",
|
|
7
|
+
"orientation": "horizontal",
|
|
8
|
+
"visualizationType": "TP5 Waffle",
|
|
9
|
+
"data": [
|
|
10
|
+
{
|
|
11
|
+
"Resulted in Death": 250,
|
|
12
|
+
"Number of Overdoses": 600,
|
|
13
|
+
"state": "Alabama",
|
|
14
|
+
"Year": "2010"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"Resulted in Death": 16,
|
|
18
|
+
"Number of Overdoses": 80,
|
|
19
|
+
"state": "Alaska",
|
|
20
|
+
"Year": "2008"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"Resulted in Death": 19,
|
|
24
|
+
"Number of Overdoses": 100,
|
|
25
|
+
"state": "Alaska",
|
|
26
|
+
"Year": "2010"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"Resulted in Death": 93,
|
|
30
|
+
"Number of Overdoses": 400,
|
|
31
|
+
"state": "Alaska",
|
|
32
|
+
"Year": "2012"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"Resulted in Death": 82,
|
|
36
|
+
"Number of Overdoses": 400,
|
|
37
|
+
"state": "Arizona",
|
|
38
|
+
"Year": "2010"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"filters": [],
|
|
42
|
+
"fontSize": null,
|
|
43
|
+
"overallFontSize": "medium",
|
|
44
|
+
"dataColumn": "Resulted in Death",
|
|
45
|
+
"dataFunction": "Sum",
|
|
46
|
+
"dataConditionalColumn": "",
|
|
47
|
+
"dataConditionalOperator": null,
|
|
48
|
+
"dataConditionalComparate": "",
|
|
49
|
+
"customDenom": true,
|
|
50
|
+
"dataDenom": null,
|
|
51
|
+
"dataDenomColumn": "Number of Overdoses",
|
|
52
|
+
"dataDenomFunction": "Sum",
|
|
53
|
+
"prefix": "",
|
|
54
|
+
"suffix": "%",
|
|
55
|
+
"roundToPlace": 0,
|
|
56
|
+
"nodeWidth": 10,
|
|
57
|
+
"nodeSpacer": 2,
|
|
58
|
+
"theme": "theme-blue",
|
|
59
|
+
"visualizationSubType": "",
|
|
60
|
+
"invalidComparate": false,
|
|
61
|
+
"showDenominator": false,
|
|
62
|
+
"showPercent": true,
|
|
63
|
+
"valueDescription": "Overdose mortality percentage",
|
|
64
|
+
"visual": {
|
|
65
|
+
"border": false,
|
|
66
|
+
"accent": false,
|
|
67
|
+
"background": false,
|
|
68
|
+
"hideBackgroundColor": false,
|
|
69
|
+
"borderColorTheme": false,
|
|
70
|
+
"whiteBackground": true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "waffle-chart",
|
|
3
|
+
"shape": "person",
|
|
4
|
+
"title": "Overdose Mortality Rate",
|
|
5
|
+
"content": "of overdoses resulted in death.",
|
|
6
|
+
"subtext": "This data is an example and does not reflect actual averages",
|
|
7
|
+
"orientation": "horizontal",
|
|
8
|
+
"visualizationType": "TP5 Waffle",
|
|
9
|
+
"data": [
|
|
10
|
+
{
|
|
11
|
+
"Resulted in Death": 250,
|
|
12
|
+
"Number of Overdoses": 600,
|
|
13
|
+
"state": "Alabama",
|
|
14
|
+
"Year": "2010"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"Resulted in Death": 16,
|
|
18
|
+
"Number of Overdoses": 80,
|
|
19
|
+
"state": "Alaska",
|
|
20
|
+
"Year": "2008"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"Resulted in Death": 19,
|
|
24
|
+
"Number of Overdoses": 100,
|
|
25
|
+
"state": "Alaska",
|
|
26
|
+
"Year": "2010"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"Resulted in Death": 93,
|
|
30
|
+
"Number of Overdoses": 400,
|
|
31
|
+
"state": "Alaska",
|
|
32
|
+
"Year": "2012"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"Resulted in Death": 82,
|
|
36
|
+
"Number of Overdoses": 400,
|
|
37
|
+
"state": "Arizona",
|
|
38
|
+
"Year": "2010"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"filters": [],
|
|
42
|
+
"fontSize": null,
|
|
43
|
+
"overallFontSize": "medium",
|
|
44
|
+
"dataColumn": "Resulted in Death",
|
|
45
|
+
"dataFunction": "Sum",
|
|
46
|
+
"dataConditionalColumn": "",
|
|
47
|
+
"dataConditionalOperator": null,
|
|
48
|
+
"dataConditionalComparate": "",
|
|
49
|
+
"customDenom": true,
|
|
50
|
+
"dataDenom": null,
|
|
51
|
+
"dataDenomColumn": "Number of Overdoses",
|
|
52
|
+
"dataDenomFunction": "Sum",
|
|
53
|
+
"prefix": "",
|
|
54
|
+
"suffix": "%",
|
|
55
|
+
"roundToPlace": 0,
|
|
56
|
+
"nodeWidth": 10,
|
|
57
|
+
"nodeSpacer": 2,
|
|
58
|
+
"theme": "theme-blue",
|
|
59
|
+
"visualizationSubType": "",
|
|
60
|
+
"invalidComparate": false,
|
|
61
|
+
"showDenominator": false,
|
|
62
|
+
"showPercent": true,
|
|
63
|
+
"valueDescription": "Overdose mortality percentage",
|
|
64
|
+
"visual": {
|
|
65
|
+
"border": false,
|
|
66
|
+
"accent": false,
|
|
67
|
+
"background": false,
|
|
68
|
+
"hideBackgroundColor": false,
|
|
69
|
+
"borderColorTheme": false,
|
|
70
|
+
"whiteBackground": false
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "A Waffle Chart - Person",
|
|
3
|
+
"titleStyle": "small",
|
|
4
|
+
"showTitle": true,
|
|
5
|
+
"visualizationSubType": "linear",
|
|
6
|
+
"showPercent": true,
|
|
7
|
+
"showDenominator": true,
|
|
8
|
+
"valueDescription": "out of",
|
|
9
|
+
"content": "Highlight a piece of data in relationship to a data set.",
|
|
10
|
+
"subtext": "",
|
|
11
|
+
"orientation": null,
|
|
12
|
+
"filters": [],
|
|
13
|
+
"fontSize": "",
|
|
14
|
+
"overallFontSize": "medium",
|
|
15
|
+
"dataColumn": "Age-adjusted rate",
|
|
16
|
+
"dataFunction": "Count",
|
|
17
|
+
"dataConditionalColumn": "",
|
|
18
|
+
"dataConditionalOperator": "",
|
|
19
|
+
"dataConditionalComparate": "",
|
|
20
|
+
"invalidComparate": false,
|
|
21
|
+
"customDenom": false,
|
|
22
|
+
"dataDenom": "100",
|
|
23
|
+
"dataDenomColumn": "",
|
|
24
|
+
"dataDenomFunction": "",
|
|
25
|
+
"suffix": "%",
|
|
26
|
+
"roundToPlace": "0",
|
|
27
|
+
"shape": "person",
|
|
28
|
+
"nodeWidth": "10",
|
|
29
|
+
"nodeSpacer": "2",
|
|
30
|
+
"theme": "theme-blue",
|
|
31
|
+
"type": "waffle-chart",
|
|
32
|
+
"visualizationType": "TP5 Waffle",
|
|
33
|
+
"gauge": {
|
|
34
|
+
"height": 35,
|
|
35
|
+
"width": "100%"
|
|
36
|
+
},
|
|
37
|
+
"visual": {
|
|
38
|
+
"border": true,
|
|
39
|
+
"accent": false,
|
|
40
|
+
"background": false,
|
|
41
|
+
"hideBackgroundColor": false,
|
|
42
|
+
"borderColorTheme": false,
|
|
43
|
+
"colors": {
|
|
44
|
+
"theme-blue": "#005eaa",
|
|
45
|
+
"theme-purple": "#712177",
|
|
46
|
+
"theme-brown": "#705043",
|
|
47
|
+
"theme-teal": "#00695c",
|
|
48
|
+
"theme-pink": "#af4448",
|
|
49
|
+
"theme-orange": "#bb4d00",
|
|
50
|
+
"theme-slate": "#29434e",
|
|
51
|
+
"theme-indigo": "#26418f",
|
|
52
|
+
"theme-cyan": "#006778",
|
|
53
|
+
"theme-green": "#4b830d",
|
|
54
|
+
"theme-amber": "#fbab18"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"errors": [],
|
|
58
|
+
"currentViewport": "lg",
|
|
59
|
+
"id": 17,
|
|
60
|
+
"category": "General",
|
|
61
|
+
"label": "Waffle Chart",
|
|
62
|
+
"subType": "Waffle",
|
|
63
|
+
"icon": {
|
|
64
|
+
"type": {},
|
|
65
|
+
"key": null,
|
|
66
|
+
"ref": null,
|
|
67
|
+
"props": {},
|
|
68
|
+
"_owner": null,
|
|
69
|
+
"_store": {}
|
|
70
|
+
},
|
|
71
|
+
"activeVizButtonID": 17,
|
|
72
|
+
"dataFileName": "valid-data-chart.csv",
|
|
73
|
+
"dataFileSourceType": "file",
|
|
74
|
+
"dataDescription": {
|
|
75
|
+
"horizontal": false,
|
|
76
|
+
"series": false
|
|
77
|
+
},
|
|
78
|
+
"data": [
|
|
79
|
+
{
|
|
80
|
+
"Race": "Hispanic or Latino",
|
|
81
|
+
"Age-adjusted rate": "644.2"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"Race": "Non-Hispanic American Indian",
|
|
85
|
+
"Age-adjusted rate": "636.1"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"Race": "Non-Hispanic Black",
|
|
89
|
+
"Age-adjusted rate": "563.7"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"Race": "Non-Hispanic Asian or Pacific Islander",
|
|
93
|
+
"Age-adjusted rate": "202.5"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"Race": "Non-Hispanic White",
|
|
97
|
+
"Age-adjusted rate": "183.6"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"formattedData": [
|
|
101
|
+
{
|
|
102
|
+
"Race": "Hispanic or Latino",
|
|
103
|
+
"Age-adjusted rate": "644.2"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"Race": "Non-Hispanic American Indian",
|
|
107
|
+
"Age-adjusted rate": "636.1"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"Race": "Non-Hispanic Black",
|
|
111
|
+
"Age-adjusted rate": "563.7"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"Race": "Non-Hispanic Asian or Pacific Islander",
|
|
115
|
+
"Age-adjusted rate": "202.5"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"Race": "Non-Hispanic White",
|
|
119
|
+
"Age-adjusted rate": "183.6"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"datasets": {}
|
|
123
|
+
}
|
package/index.html
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
6
|
-
<style>
|
|
7
|
-
.type-waffle-chart {
|
|
8
|
-
min-height: 100vh;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
body {
|
|
12
|
-
/* max-width: 1000px; */
|
|
13
|
-
margin: 0 auto !important;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
border-top: none !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.react-container + .react-container {
|
|
21
|
-
margin-top: 3rem;
|
|
22
|
-
}
|
|
23
|
-
</style>
|
|
24
|
-
<link rel="stylesheet prefetch" href="https://www.cdc.gov/TemplatePackage/5.0/css/app.min.css?_=71669" />
|
|
25
|
-
</head>
|
|
26
|
-
<body>
|
|
27
|
-
<!-- Original -->
|
|
28
|
-
<div class="react-container" data-config="/examples/example-config.json"></div>
|
|
29
|
-
|
|
30
|
-
<!-- DATA PRESENTATION GALLERY: https://www.cdc.gov/wcms/4.0/cdc-wp/data-presentation/waffle-chart.html#examples -->
|
|
31
|
-
<!-- <div class="react-container" data-config="/examples/gallery/avg-to-max.json"></div> -->
|
|
32
|
-
<!-- <div class="react-container" data-config="/examples/gallery/count.json"></div> -->
|
|
33
|
-
|
|
34
|
-
<script type="module" src="./src/index.jsx"></script>
|
|
35
|
-
</body>
|
|
36
|
-
</html>
|
|
1
|
+
<!-- index.html is generated by @cdc/core/generateViteConfig.js using the files in @cdc/core/devTemplate/ -->
|