@cdc/dashboard 4.26.3 → 4.26.5
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/CONFIG.md +219 -0
- package/README.md +60 -20
- package/dist/cdcdashboard-CY9IcPSi.es.js +6 -0
- package/dist/cdcdashboard-DlpiY3fQ.es.js +4 -0
- package/dist/cdcdashboard.js +61559 -58048
- package/examples/__data__/data-2.json +6 -0
- package/examples/__data__/data.json +6 -0
- package/examples/dashboard-conditions-filters-incomplete.json +221 -0
- package/examples/dashboard-missing-datasets-multi.json +174 -0
- package/examples/dashboard-missing-datasets-single.json +121 -0
- package/examples/dashboard-multi-dashboard-version-regression.json +146 -0
- package/examples/dashboard-shared-filter-row-delete-cleanup.json +186 -0
- package/examples/dashboard-stale-dataset-keys.json +181 -0
- package/examples/dashboard-tiered-filter-regression.json +190 -0
- package/examples/legend-issue.json +1 -1
- package/examples/minimal-example.json +34 -0
- package/examples/private/cfa-dashboard.json +651 -0
- package/examples/private/data-bite-wrap.json +6936 -0
- package/examples/private/dengue.json +4640 -0
- package/examples/private/link_to_file.json +16662 -0
- package/examples/private/multi-dash-fix.json +16963 -0
- package/examples/private/versions.json +41612 -0
- package/examples/sankey.json +3 -3
- package/examples/test-api-filter-reset.json +4 -4
- package/examples/tp5-test.json +86 -4
- package/examples/us-map-filter-example.json +1074 -0
- package/package.json +9 -9
- package/src/CdcDashboard.tsx +6 -2
- package/src/CdcDashboardComponent.tsx +179 -88
- package/src/DashboardCopyPasteContext.test.tsx +33 -0
- package/src/DashboardCopyPasteContext.tsx +48 -0
- package/src/_stories/Dashboard.EditorRegression.stories.tsx +72 -0
- package/src/_stories/Dashboard.Regression.stories.tsx +196 -0
- package/src/_stories/Dashboard.Zoom.stories.tsx +88 -0
- package/src/_stories/Dashboard.smoke.stories.tsx +33 -0
- package/src/_stories/Dashboard.stories.tsx +337 -2
- package/src/_stories/FilteredTextMigrationComparison.stories.tsx +87 -0
- package/src/_stories/_mock/dashboard-data-driven-colors.json +171 -0
- package/src/_stories/_mock/tp5-test.json +86 -5
- package/src/components/Column.test.tsx +176 -0
- package/src/components/Column.tsx +214 -13
- package/src/components/DashboardConditionModal.test.tsx +420 -0
- package/src/components/DashboardConditionModal.tsx +367 -0
- package/src/components/DashboardConditionSummary.tsx +59 -0
- package/src/components/DashboardEditors.tsx +23 -0
- package/src/components/DashboardFilters/DashboardFilters.test.tsx +267 -0
- package/src/components/DashboardFilters/DashboardFilters.tsx +193 -172
- package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.test.tsx +164 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/DashboardFiltersEditor.tsx +46 -6
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/APIModal.tsx +5 -3
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/DeleteFilterModal.tsx +59 -58
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.test.tsx +304 -0
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/FilterEditor.tsx +43 -36
- package/src/components/DashboardFilters/DashboardFiltersEditor/components/NestedDropDownDashboard.tsx +2 -2
- package/src/components/DashboardFilters/DashboardFiltersWrapper.test.tsx +142 -0
- package/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +32 -27
- package/src/components/DashboardFilters/dashboardfilter.styles.css +42 -27
- package/src/components/DataDesignerModal.tsx +2 -1
- package/src/components/ExpandCollapseButtons.tsx +6 -4
- package/src/components/Grid.tsx +12 -7
- package/src/components/Header/Header.tsx +36 -17
- package/src/components/MultiConfigTabs/MultiConfigTabs.tsx +141 -140
- package/src/components/Row.test.tsx +228 -0
- package/src/components/Row.tsx +104 -28
- package/src/components/VisualizationRow.test.tsx +396 -0
- package/src/components/VisualizationRow.tsx +177 -51
- package/src/components/VisualizationsPanel/VisualizationsPanel.test.tsx +49 -0
- package/src/components/VisualizationsPanel/VisualizationsPanel.tsx +14 -13
- package/src/components/Widget/Widget.test.tsx +218 -0
- package/src/components/Widget/Widget.tsx +123 -20
- package/src/components/Widget/widget.styles.css +58 -14
- package/src/components/dashboard-condition-modal.css +76 -0
- package/src/components/dashboard-condition-summary.css +87 -0
- package/src/data/initial-state.js +1 -0
- package/src/helpers/addValuesToDashboardFilters.ts +3 -5
- package/src/helpers/addVisualization.ts +17 -4
- package/src/helpers/cloneDashboardWidget.ts +127 -0
- package/src/helpers/dashboardColumnWidgets.ts +99 -0
- package/src/helpers/dashboardConditionUi.ts +47 -0
- package/src/helpers/dashboardConditions.ts +200 -0
- package/src/helpers/dashboardFilterTargets.ts +156 -0
- package/src/helpers/filterData.ts +4 -9
- package/src/helpers/filterVisibility.ts +20 -0
- package/src/helpers/formatConfigBeforeSave.ts +2 -2
- package/src/helpers/getFilteredData.ts +18 -5
- package/src/helpers/getUpdateConfig.ts +43 -12
- package/src/helpers/getVizRowColumnLocator.ts +11 -1
- package/src/helpers/iconHash.tsx +9 -3
- package/src/helpers/mapDataToConfig.ts +31 -29
- package/src/helpers/reloadURLHelpers.ts +25 -5
- package/src/helpers/removeDashboardFilter.ts +33 -33
- package/src/helpers/tests/addVisualization.test.ts +53 -9
- package/src/helpers/tests/cloneDashboardWidget.test.ts +136 -0
- package/src/helpers/tests/dashboardColumnWidgets.test.ts +99 -0
- package/src/helpers/tests/dashboardConditionUi.test.ts +41 -0
- package/src/helpers/tests/dashboardConditions.test.ts +428 -0
- package/src/helpers/tests/formatConfigBeforeSave.test.ts +51 -0
- package/src/helpers/tests/getFilteredData.test.ts +265 -86
- package/src/helpers/tests/getUpdateConfig.test.ts +338 -0
- package/src/helpers/tests/reloadURLHelpers.test.ts +394 -238
- package/src/index.tsx +6 -3
- package/src/scss/grid.scss +281 -22
- package/src/scss/main.scss +215 -64
- package/src/store/dashboard.actions.ts +17 -4
- package/src/store/dashboard.reducer.test.ts +538 -0
- package/src/store/dashboard.reducer.ts +136 -22
- package/src/test/CdcDashboard.test.jsx +24 -0
- package/src/test/CdcDashboard.test.tsx +148 -0
- package/src/test/CdcDashboardComponent.test.tsx +935 -2
- package/src/types/ConfigRow.ts +15 -0
- package/src/types/DashboardFilters.ts +4 -0
- package/src/types/SharedFilter.ts +2 -0
- package/tests/fixtures/dashboard-config-with-metadata.json +1 -1
- package/dist/cdcdashboard-vr9HZwRt.es.js +0 -6
- package/examples/DEV-6574.json +0 -2224
- package/examples/api-dashboard-data.json +0 -272
- package/examples/api-dashboard-years.json +0 -11
- package/examples/api-geographies-data.json +0 -11
- package/examples/chart-data.json +0 -5409
- package/examples/custom/css/respiratory.css +0 -236
- package/examples/custom/js/respiratory.js +0 -242
- package/examples/default-data.json +0 -368
- package/examples/default-filter-control.json +0 -209
- package/examples/default-multi-dataset-shared-filter.json +0 -1729
- package/examples/default-multi-dataset.json +0 -506
- package/examples/ed-visits-county-file.json +0 -402
- package/examples/filters/Alabama.json +0 -72
- package/examples/filters/Alaska.json +0 -1737
- package/examples/filters/Arkansas.json +0 -4713
- package/examples/filters/California.json +0 -212
- package/examples/filters/Colorado.json +0 -1500
- package/examples/filters/Connecticut.json +0 -559
- package/examples/filters/Delaware.json +0 -63
- package/examples/filters/DistrictofColumbia.json +0 -63
- package/examples/filters/Florida.json +0 -4217
- package/examples/filters/States.json +0 -146
- package/examples/state-level.json +0 -90136
- package/examples/state-points.json +0 -10474
- package/examples/temp-example-data.json +0 -130
- package/examples/test-dashboard-simple.json +0 -503
- package/examples/test-example.json +0 -752
- package/examples/test-file.json +0 -147
- package/examples/test.json +0 -752
- package/examples/testing.json +0 -94456
- /package/examples/{data → __data__}/data-with-metadata.json +0 -0
- /package/examples/{legend-issue-data.json → __data__/legend-issue-data.json} +0 -0
- /package/examples/api-test/{categories.json → __data__/categories.json} +0 -0
- /package/examples/api-test/{chart-data.json → __data__/chart-data.json} +0 -0
- /package/examples/api-test/{topics.json → __data__/topics.json} +0 -0
- /package/examples/api-test/{years.json → __data__/years.json} +0 -0
- /package/src/_stories/{Dashboard.Pages.stories.tsx → Dashboard.Pages.smoke.stories.tsx} +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dashboard",
|
|
3
|
+
"version": "4.26.5",
|
|
4
|
+
"dashboard": {
|
|
5
|
+
"theme": "theme-blue",
|
|
6
|
+
"title": "Regression: Shared Filter Row Delete Cleanup",
|
|
7
|
+
"description": "<p>Use this fixture to delete several rows that participate in shared-filter targeting. The shared filters intentionally include stale <code>usedBy</code> references so cleanup logic has to tolerate missing targets.</p>",
|
|
8
|
+
"sharedFilters": [
|
|
9
|
+
{
|
|
10
|
+
"key": "Region",
|
|
11
|
+
"label": "Region",
|
|
12
|
+
"type": "datafilter",
|
|
13
|
+
"filterStyle": "dropdown",
|
|
14
|
+
"columnName": "Region",
|
|
15
|
+
"showDropdown": true,
|
|
16
|
+
"active": "North",
|
|
17
|
+
"values": ["North", "South"],
|
|
18
|
+
"orderedValues": ["North", "South"],
|
|
19
|
+
"usedBy": ["chart-alpha", "chart-beta", "chart-gamma", "missing-widget"],
|
|
20
|
+
"resetLabel": "Select a region"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"key": "Status",
|
|
24
|
+
"label": "Status",
|
|
25
|
+
"type": "datafilter",
|
|
26
|
+
"filterStyle": "dropdown",
|
|
27
|
+
"columnName": "Status",
|
|
28
|
+
"showDropdown": true,
|
|
29
|
+
"active": "Open",
|
|
30
|
+
"values": ["Open", "Closed"],
|
|
31
|
+
"orderedValues": ["Open", "Closed"],
|
|
32
|
+
"usedBy": ["chart-alpha", "chart-beta", "missing-widget-2"],
|
|
33
|
+
"resetLabel": "Select a status"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": "Year",
|
|
37
|
+
"label": "Year",
|
|
38
|
+
"type": "datafilter",
|
|
39
|
+
"filterStyle": "dropdown",
|
|
40
|
+
"columnName": "Year",
|
|
41
|
+
"showDropdown": true,
|
|
42
|
+
"active": "2024",
|
|
43
|
+
"values": ["2023", "2024"],
|
|
44
|
+
"orderedValues": ["2023", "2024"],
|
|
45
|
+
"usedBy": ["chart-gamma"],
|
|
46
|
+
"resetLabel": "Select a year"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"rows": [
|
|
51
|
+
{
|
|
52
|
+
"columns": [
|
|
53
|
+
{
|
|
54
|
+
"width": 12,
|
|
55
|
+
"widget": "dashboard-filters"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"columns": [
|
|
61
|
+
{
|
|
62
|
+
"width": 12,
|
|
63
|
+
"widget": "chart-alpha"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"columns": [
|
|
69
|
+
{
|
|
70
|
+
"width": 12,
|
|
71
|
+
"widget": "chart-beta"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"columns": [
|
|
77
|
+
{
|
|
78
|
+
"width": 12,
|
|
79
|
+
"widget": "chart-gamma"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"visualizations": {
|
|
85
|
+
"dashboard-filters": {
|
|
86
|
+
"uid": "dashboard-filters",
|
|
87
|
+
"type": "dashboardFilters",
|
|
88
|
+
"visualizationType": "dashboardFilters",
|
|
89
|
+
"sharedFilterIndexes": [0, 1, 2],
|
|
90
|
+
"filterBehavior": "Filter Change",
|
|
91
|
+
"autoLoad": true
|
|
92
|
+
},
|
|
93
|
+
"chart-alpha": {
|
|
94
|
+
"uid": "chart-alpha",
|
|
95
|
+
"type": "chart",
|
|
96
|
+
"visualizationType": "Bar",
|
|
97
|
+
"title": "Row A",
|
|
98
|
+
"dataKey": "shared-filter-data",
|
|
99
|
+
"xAxis": {
|
|
100
|
+
"dataKey": "Label"
|
|
101
|
+
},
|
|
102
|
+
"series": [
|
|
103
|
+
{
|
|
104
|
+
"dataKey": "Value"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"theme": "theme-blue"
|
|
108
|
+
},
|
|
109
|
+
"chart-beta": {
|
|
110
|
+
"uid": "chart-beta",
|
|
111
|
+
"type": "chart",
|
|
112
|
+
"visualizationType": "Bar",
|
|
113
|
+
"title": "Row B",
|
|
114
|
+
"dataKey": "shared-filter-data",
|
|
115
|
+
"xAxis": {
|
|
116
|
+
"dataKey": "Label"
|
|
117
|
+
},
|
|
118
|
+
"series": [
|
|
119
|
+
{
|
|
120
|
+
"dataKey": "Value"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"theme": "theme-blue"
|
|
124
|
+
},
|
|
125
|
+
"chart-gamma": {
|
|
126
|
+
"uid": "chart-gamma",
|
|
127
|
+
"type": "chart",
|
|
128
|
+
"visualizationType": "Bar",
|
|
129
|
+
"title": "Row C",
|
|
130
|
+
"dataKey": "shared-filter-data",
|
|
131
|
+
"xAxis": {
|
|
132
|
+
"dataKey": "Label"
|
|
133
|
+
},
|
|
134
|
+
"series": [
|
|
135
|
+
{
|
|
136
|
+
"dataKey": "Value"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"theme": "theme-blue"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"datasets": {
|
|
143
|
+
"shared-filter-data": {
|
|
144
|
+
"data": [
|
|
145
|
+
{
|
|
146
|
+
"Region": "North",
|
|
147
|
+
"Status": "Open",
|
|
148
|
+
"Year": "2024",
|
|
149
|
+
"Label": "North Open 2024",
|
|
150
|
+
"Value": 40
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"Region": "North",
|
|
154
|
+
"Status": "Closed",
|
|
155
|
+
"Year": "2024",
|
|
156
|
+
"Label": "North Closed 2024",
|
|
157
|
+
"Value": 22
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"Region": "South",
|
|
161
|
+
"Status": "Open",
|
|
162
|
+
"Year": "2024",
|
|
163
|
+
"Label": "South Open 2024",
|
|
164
|
+
"Value": 15
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"Region": "North",
|
|
168
|
+
"Status": "Open",
|
|
169
|
+
"Year": "2023",
|
|
170
|
+
"Label": "North Open 2023",
|
|
171
|
+
"Value": 30
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"preview": true,
|
|
175
|
+
"dataFileName": "shared-filter-data.json",
|
|
176
|
+
"dataFileSourceType": "file",
|
|
177
|
+
"dataFileFormat": "JSON"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"table": {
|
|
181
|
+
"label": "Data Table",
|
|
182
|
+
"show": false,
|
|
183
|
+
"showDownloadUrl": false,
|
|
184
|
+
"showVertical": true
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dashboard",
|
|
3
|
+
"version": "4.26.5",
|
|
4
|
+
"dashboard": {
|
|
5
|
+
"theme": "theme-blue",
|
|
6
|
+
"title": "Regression: Stale Dataset Keys",
|
|
7
|
+
"description": "<p>This dashboard mixes valid and stale <code>dataKey</code> references. It is intended to verify that config mapping skips missing datasets instead of crashing.</p>"
|
|
8
|
+
},
|
|
9
|
+
"rows": [
|
|
10
|
+
{
|
|
11
|
+
"columns": [
|
|
12
|
+
{
|
|
13
|
+
"width": 12,
|
|
14
|
+
"widget": "intro-markup"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"columns": [
|
|
20
|
+
{
|
|
21
|
+
"width": 6,
|
|
22
|
+
"widget": "valid-viz-data-bite"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"width": 6,
|
|
26
|
+
"widget": "stale-viz-chart"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"dataKey": "missing-row-dataset",
|
|
32
|
+
"dataDescription": {
|
|
33
|
+
"horizontal": false,
|
|
34
|
+
"series": false
|
|
35
|
+
},
|
|
36
|
+
"columns": [
|
|
37
|
+
{
|
|
38
|
+
"width": 6,
|
|
39
|
+
"widget": "stale-row-chart"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"width": 6,
|
|
43
|
+
"widget": "valid-row-chart"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"dataKey": "valid-row-dataset",
|
|
49
|
+
"dataDescription": {
|
|
50
|
+
"horizontal": false,
|
|
51
|
+
"series": false
|
|
52
|
+
},
|
|
53
|
+
"columns": [
|
|
54
|
+
{
|
|
55
|
+
"width": 12,
|
|
56
|
+
"widget": "valid-row-chart-2"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"visualizations": {
|
|
62
|
+
"intro-markup": {
|
|
63
|
+
"uid": "intro-markup",
|
|
64
|
+
"type": "markup-include",
|
|
65
|
+
"visualizationType": "markup-include",
|
|
66
|
+
"theme": "theme-blue",
|
|
67
|
+
"contentEditor": {
|
|
68
|
+
"title": "How to use this fixture",
|
|
69
|
+
"showHeader": true,
|
|
70
|
+
"srcUrl": "",
|
|
71
|
+
"useInlineHTML": true,
|
|
72
|
+
"inlineHTML": "<p><strong>Expected:</strong> the valid widgets render normally, while widgets pointing at missing datasets stay unresolved instead of crashing the page.</p><p>This fixture covers both visualization-level and row-level stale <code>dataKey</code> references.</p>"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"valid-viz-data-bite": {
|
|
76
|
+
"uid": "valid-viz-data-bite",
|
|
77
|
+
"type": "data-bite",
|
|
78
|
+
"visualizationType": "data-bite",
|
|
79
|
+
"title": "Valid viz.dataKey",
|
|
80
|
+
"biteBody": "This uses a valid dataset and should continue to render.",
|
|
81
|
+
"dataKey": "valid-viz-dataset",
|
|
82
|
+
"dataColumn": "Value",
|
|
83
|
+
"dataFunction": "Pass Through",
|
|
84
|
+
"theme": "theme-blue"
|
|
85
|
+
},
|
|
86
|
+
"stale-viz-chart": {
|
|
87
|
+
"uid": "stale-viz-chart",
|
|
88
|
+
"type": "chart",
|
|
89
|
+
"visualizationType": "Bar",
|
|
90
|
+
"title": "Stale viz.dataKey",
|
|
91
|
+
"dataKey": "renamed-viz-dataset",
|
|
92
|
+
"xAxis": {
|
|
93
|
+
"dataKey": "Category"
|
|
94
|
+
},
|
|
95
|
+
"series": [
|
|
96
|
+
{
|
|
97
|
+
"dataKey": "Value"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"theme": "theme-blue"
|
|
101
|
+
},
|
|
102
|
+
"stale-row-chart": {
|
|
103
|
+
"uid": "stale-row-chart",
|
|
104
|
+
"type": "chart",
|
|
105
|
+
"visualizationType": "Bar",
|
|
106
|
+
"title": "Stale row.dataKey",
|
|
107
|
+
"xAxis": {
|
|
108
|
+
"dataKey": "Category"
|
|
109
|
+
},
|
|
110
|
+
"series": [
|
|
111
|
+
{
|
|
112
|
+
"dataKey": "Value"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"theme": "theme-blue"
|
|
116
|
+
},
|
|
117
|
+
"valid-row-chart": {
|
|
118
|
+
"uid": "valid-row-chart",
|
|
119
|
+
"type": "markup-include",
|
|
120
|
+
"visualizationType": "markup-include",
|
|
121
|
+
"theme": "theme-blue",
|
|
122
|
+
"contentEditor": {
|
|
123
|
+
"title": "Companion widget",
|
|
124
|
+
"showHeader": true,
|
|
125
|
+
"srcUrl": "",
|
|
126
|
+
"useInlineHTML": true,
|
|
127
|
+
"inlineHTML": "<p>This row deliberately mixes one stale row-level data target with a non-data widget so the row itself can still render while the stale chart stays safely unresolved.</p>"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"valid-row-chart-2": {
|
|
131
|
+
"uid": "valid-row-chart-2",
|
|
132
|
+
"type": "chart",
|
|
133
|
+
"visualizationType": "Bar",
|
|
134
|
+
"title": "Valid row.dataKey",
|
|
135
|
+
"xAxis": {
|
|
136
|
+
"dataKey": "Category"
|
|
137
|
+
},
|
|
138
|
+
"series": [
|
|
139
|
+
{
|
|
140
|
+
"dataKey": "Value"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"theme": "theme-blue"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"datasets": {
|
|
147
|
+
"valid-viz-dataset": {
|
|
148
|
+
"data": [
|
|
149
|
+
{
|
|
150
|
+
"Value": 123
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"preview": true,
|
|
154
|
+
"dataFileName": "valid-viz-dataset.json",
|
|
155
|
+
"dataFileSourceType": "file",
|
|
156
|
+
"dataFileFormat": "JSON"
|
|
157
|
+
},
|
|
158
|
+
"valid-row-dataset": {
|
|
159
|
+
"data": [
|
|
160
|
+
{
|
|
161
|
+
"Category": "Valid Row A",
|
|
162
|
+
"Value": 10
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"Category": "Valid Row B",
|
|
166
|
+
"Value": 25
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"preview": true,
|
|
170
|
+
"dataFileName": "valid-row-dataset.json",
|
|
171
|
+
"dataFileSourceType": "file",
|
|
172
|
+
"dataFileFormat": "JSON"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"table": {
|
|
176
|
+
"label": "Data Table",
|
|
177
|
+
"show": false,
|
|
178
|
+
"showDownloadUrl": false,
|
|
179
|
+
"showVertical": true
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dashboard",
|
|
3
|
+
"version": "4.26.5",
|
|
4
|
+
"dashboard": {
|
|
5
|
+
"theme": "theme-blue",
|
|
6
|
+
"title": "Regression: Tiered Filtering",
|
|
7
|
+
"description": "<p>This fixture supports 1-tier, 2-tier, and 3-tier checks on the same page. The saved <code>tier</code> values are intentionally strings so save/reload does not depend on number parsing.</p>",
|
|
8
|
+
"sharedFilters": [
|
|
9
|
+
{
|
|
10
|
+
"key": "Region",
|
|
11
|
+
"label": "Region",
|
|
12
|
+
"type": "datafilter",
|
|
13
|
+
"filterStyle": "dropdown",
|
|
14
|
+
"columnName": "Region",
|
|
15
|
+
"showDropdown": true,
|
|
16
|
+
"active": "North",
|
|
17
|
+
"values": ["North", "South"],
|
|
18
|
+
"orderedValues": ["North", "South"],
|
|
19
|
+
"usedBy": ["chart-tier-1", "chart-tier-2", "chart-tier-3"],
|
|
20
|
+
"tier": "1",
|
|
21
|
+
"resetLabel": "Select a region"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "Category",
|
|
25
|
+
"label": "Category",
|
|
26
|
+
"type": "datafilter",
|
|
27
|
+
"filterStyle": "dropdown",
|
|
28
|
+
"columnName": "Category",
|
|
29
|
+
"showDropdown": true,
|
|
30
|
+
"active": "Alpha",
|
|
31
|
+
"values": ["Alpha", "Beta"],
|
|
32
|
+
"orderedValues": ["Alpha", "Beta"],
|
|
33
|
+
"usedBy": ["chart-tier-2", "chart-tier-3"],
|
|
34
|
+
"parents": ["Region"],
|
|
35
|
+
"tier": "2",
|
|
36
|
+
"resetLabel": "Select a category"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"key": "Detail",
|
|
40
|
+
"label": "Detail",
|
|
41
|
+
"type": "datafilter",
|
|
42
|
+
"filterStyle": "dropdown",
|
|
43
|
+
"columnName": "Detail",
|
|
44
|
+
"showDropdown": true,
|
|
45
|
+
"active": "One",
|
|
46
|
+
"values": ["One", "Two"],
|
|
47
|
+
"orderedValues": ["One", "Two"],
|
|
48
|
+
"usedBy": ["chart-tier-3"],
|
|
49
|
+
"parents": ["Category"],
|
|
50
|
+
"tier": "3",
|
|
51
|
+
"resetLabel": "Select a detail"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"rows": [
|
|
56
|
+
{
|
|
57
|
+
"columns": [
|
|
58
|
+
{
|
|
59
|
+
"width": 12,
|
|
60
|
+
"widget": "tiered-filters"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"columns": [
|
|
66
|
+
{
|
|
67
|
+
"width": 4,
|
|
68
|
+
"widget": "chart-tier-1"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"width": 4,
|
|
72
|
+
"widget": "chart-tier-2"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"width": 4,
|
|
76
|
+
"widget": "chart-tier-3"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"visualizations": {
|
|
82
|
+
"tiered-filters": {
|
|
83
|
+
"uid": "tiered-filters",
|
|
84
|
+
"type": "dashboardFilters",
|
|
85
|
+
"visualizationType": "dashboardFilters",
|
|
86
|
+
"sharedFilterIndexes": [0, 1, 2],
|
|
87
|
+
"filterBehavior": "Filter Change",
|
|
88
|
+
"autoLoad": true
|
|
89
|
+
},
|
|
90
|
+
"chart-tier-1": {
|
|
91
|
+
"uid": "chart-tier-1",
|
|
92
|
+
"type": "chart",
|
|
93
|
+
"visualizationType": "Bar",
|
|
94
|
+
"title": "1 tier: Region only",
|
|
95
|
+
"dataKey": "tiered-filter-data",
|
|
96
|
+
"xAxis": {
|
|
97
|
+
"dataKey": "Label"
|
|
98
|
+
},
|
|
99
|
+
"series": [
|
|
100
|
+
{
|
|
101
|
+
"dataKey": "Value"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"theme": "theme-blue"
|
|
105
|
+
},
|
|
106
|
+
"chart-tier-2": {
|
|
107
|
+
"uid": "chart-tier-2",
|
|
108
|
+
"type": "chart",
|
|
109
|
+
"visualizationType": "Bar",
|
|
110
|
+
"title": "2 tiers: Region + Category",
|
|
111
|
+
"dataKey": "tiered-filter-data",
|
|
112
|
+
"xAxis": {
|
|
113
|
+
"dataKey": "Label"
|
|
114
|
+
},
|
|
115
|
+
"series": [
|
|
116
|
+
{
|
|
117
|
+
"dataKey": "Value"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"theme": "theme-blue"
|
|
121
|
+
},
|
|
122
|
+
"chart-tier-3": {
|
|
123
|
+
"uid": "chart-tier-3",
|
|
124
|
+
"type": "chart",
|
|
125
|
+
"visualizationType": "Bar",
|
|
126
|
+
"title": "3 tiers: Region + Category + Detail",
|
|
127
|
+
"dataKey": "tiered-filter-data",
|
|
128
|
+
"xAxis": {
|
|
129
|
+
"dataKey": "Label"
|
|
130
|
+
},
|
|
131
|
+
"series": [
|
|
132
|
+
{
|
|
133
|
+
"dataKey": "Value"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"theme": "theme-blue"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"datasets": {
|
|
140
|
+
"tiered-filter-data": {
|
|
141
|
+
"data": [
|
|
142
|
+
{
|
|
143
|
+
"Region": "North",
|
|
144
|
+
"Category": "Alpha",
|
|
145
|
+
"Detail": "One",
|
|
146
|
+
"Label": "North Alpha One",
|
|
147
|
+
"Value": 11
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"Region": "North",
|
|
151
|
+
"Category": "Alpha",
|
|
152
|
+
"Detail": "Two",
|
|
153
|
+
"Label": "North Alpha Two",
|
|
154
|
+
"Value": 12
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"Region": "North",
|
|
158
|
+
"Category": "Beta",
|
|
159
|
+
"Detail": "One",
|
|
160
|
+
"Label": "North Beta One",
|
|
161
|
+
"Value": 13
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"Region": "South",
|
|
165
|
+
"Category": "Alpha",
|
|
166
|
+
"Detail": "One",
|
|
167
|
+
"Label": "South Alpha One",
|
|
168
|
+
"Value": 21
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"Region": "South",
|
|
172
|
+
"Category": "Beta",
|
|
173
|
+
"Detail": "Two",
|
|
174
|
+
"Label": "South Beta Two",
|
|
175
|
+
"Value": 22
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"preview": true,
|
|
179
|
+
"dataFileName": "tiered-filter-data.json",
|
|
180
|
+
"dataFileSourceType": "file",
|
|
181
|
+
"dataFileFormat": "JSON"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"table": {
|
|
185
|
+
"label": "Data Table",
|
|
186
|
+
"show": false,
|
|
187
|
+
"showDownloadUrl": false,
|
|
188
|
+
"showVertical": true
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dashboard",
|
|
3
|
+
"version": "4.26.4",
|
|
4
|
+
"dashboard": {
|
|
5
|
+
"theme": "theme-blue",
|
|
6
|
+
"title": "Dashboard Example",
|
|
7
|
+
"titleStyle": "small",
|
|
8
|
+
"sharedFilters": []
|
|
9
|
+
},
|
|
10
|
+
"data": [],
|
|
11
|
+
"rows": [
|
|
12
|
+
{
|
|
13
|
+
"columns": [
|
|
14
|
+
{
|
|
15
|
+
"width": 12,
|
|
16
|
+
"widget": "markup-1"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"visualizations": {
|
|
22
|
+
"markup-1": {
|
|
23
|
+
"type": "markup-include",
|
|
24
|
+
"theme": "theme-blue",
|
|
25
|
+
"contentEditor": {
|
|
26
|
+
"inlineHTML": "<p>Minimal dashboard example</p>",
|
|
27
|
+
"showHeader": true,
|
|
28
|
+
"srcUrl": "",
|
|
29
|
+
"title": "Dashboard Example",
|
|
30
|
+
"useInlineHTML": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|