From 6c550b5367120c38065654782bbe713094637eb7 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 8 Jan 2025 13:09:29 -0500 Subject: [PATCH 01/19] [DEV-10046a] create a function to handle child parent filters --- .../DashboardFiltersWrapper.tsx | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx b/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx index 6cae19339..6959fe7b3 100644 --- a/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +++ b/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx @@ -34,6 +34,40 @@ type DashboardFiltersProps = { setAPILoading: (loading: boolean) => void } +const updateChildFilters = (newSharedFilters, state) => { + const dataSetArr = Object.values(state.data).flat() + + // Find all child filters and their parent filter + const childFilterIndexes = newSharedFilters + .map((filter, index) => (filter.parents ? index : -1)) // Get indexes of all child filters + .filter(index => index !== -1) // Filter out invalid indexes + + if (childFilterIndexes.length === 0) return newSharedFilters // No child filters found + + // Update child filters + let updatedFilters = [...newSharedFilters] + childFilterIndexes.forEach(childIndex => { + const childFilter = newSharedFilters[childIndex] + const parentFilter = newSharedFilters.find(filter => String(childFilter.parents) === String(filter.key)) + + if (parentFilter) { + // Get active values for the parent filter + const parentActiveValuesArr = dataSetArr.filter(d => d[parentFilter.columnName] === parentFilter.active) + const uniqChildValues = _.uniq(parentActiveValuesArr.map(d => d[childFilter.columnName]).filter(Boolean)) + + // Update the child filter if active values exist + if (uniqChildValues.length > 0) { + updatedFilters[childIndex] = { + ...childFilter, + values: uniqChildValues + } + } + } + }) + + return updatedFilters +} + const DashboardFiltersWrapper: React.FC = ({ apiFilterDropdowns, visualizationConfig, @@ -183,7 +217,7 @@ const DashboardFiltersWrapper: React.FC = ({ > Date: Wed, 8 Jan 2025 13:23:31 -0500 Subject: [PATCH 02/19] [DEV-10046a] create helper function --- .../dashboard/examples/all-components.json | 5136 ++--------------- .../src/helpers/updateChildFilters.ts | 45 + 2 files changed, 574 insertions(+), 4607 deletions(-) create mode 100644 packages/dashboard/src/helpers/updateChildFilters.ts diff --git a/packages/dashboard/examples/all-components.json b/packages/dashboard/examples/all-components.json index 3af696905..70b2d6bf5 100644 --- a/packages/dashboard/examples/all-components.json +++ b/packages/dashboard/examples/all-components.json @@ -1,4650 +1,572 @@ { - "dashboard": {}, - "rows": [ - [ - { - "width": 12, - "widget": "chart1" - }, - {}, - {} - ], - [ - { - "width": 12, - "widget": "map1" - }, - {}, - {} - ], - [ - { - "width": 4, - "widget": "data-bite1698177306942" - }, + "dashboard": { + "theme": "theme-blue", + "sharedFilters": [ { - "equalHeight": false, - "width": 4, - "widget": "waffle-chart1698177326024" + "key": "Parent", + "showDropdown": true, + "values": ["900", "4000", "1200", "8000", "9000", "700", "2200", "5000", "6000"], + "type": "datafilter", + "columnName": "Data 1", + "usedBy": ["chart1736358305659"], + "tier": 1 }, { - "width": 4, - "widget": "markup-include1698177345432" + "key": "Child", + "showDropdown": true, + "values": ["135", "90", "300", "160", "350", "220", "8888", "777", "200", "360", "1350", "3220"], + "type": "datafilter", + "columnName": "Data 2", + "usedBy": ["chart1736358305659"], + "parents": "Parent", + "tier": 2 }, { - "width": null + "key": "Child 3", + "showDropdown": true, + "values": ["300", "240", "290", "230", "320", "540", "590", "930"], + "type": "datafilter", + "usedBy": ["chart1736358305659"], + "columnName": "Data 3" } - ], - [ - { - "width": 12, - "widget": "filtered-text1698177354149" - }, - { - "equalHeight": false - }, - {}, - {} ] - ], - "visualizations": { - "chart1": { - "uid": "chart1", - "type": "chart", - "dataKey": "data2", - "title": "Average Temperature By City (Line Example)", - "description": "

Average temperature from October 1st through August 29th in:

  • New York
  • San Francisco
  • Austin
", - "visualizationType": "Line", - "series": [ - { - "dataKey": "New York", - "label": "NY" - }, - { - "dataKey": "San Francisco", - "label": "SF" - }, - { - "dataKey": "Austin", - "label": "AU" - } - ], - "filters": [ + }, + "rows": [ + { + "columns": [ { - "label": "Wind", - "columnName": "wind" + "width": 12, + "widget": "dashboardFilters1736358302924" }, + {}, + {} + ] + }, + { + "columns": [ { - "label": "Humidity", - "columnName": "humidity" + "width": 12, + "widget": "chart1736358305659" } - ], - "seriesLabel": "City", - "fontSize": "large", - "dataFormat": { - "commas": false, - "prefix": "", - "suffix": "°" + ] + } + ], + "visualizations": { + "dashboardFilters1736358302924": { + "filters": [], + "filterBehavior": "Filter Change", + "newViz": true, + "openModal": true, + "uid": "dashboardFilters1736358302924", + "type": "dashboardFilters", + "sharedFilterIndexes": [0, 1, 2], + "visualizationType": "dashboardFilters" + }, + "chart1736358305659": { + "annotations": [], + "type": "chart", + "debugSvg": false, + "chartMessage": { + "noData": "No Data Available" + }, + "title": "", + "showTitle": true, + "showDownloadMediaButton": false, + "theme": "theme-blue", + "animate": false, + "lineDatapointStyle": "hover", + "lineDatapointColor": "Same as Line", + "barHasBorder": "false", + "isLollipopChart": false, + "lollipopShape": "circle", + "lollipopColorStyle": "two-tone", + "visualizationSubType": "regular", + "barStyle": "", + "roundingStyle": "standard", + "tipRounding": "top", + "isResponsiveTicks": false, + "general": { + "annotationDropdownText": "Annotations", + "showDownloadButton": false, + "showMissingDataLabel": true, + "showSuppressedSymbol": true, + "showZeroValueData": true, + "hideNullValue": true }, "padding": { - "left": 15, - "right": 15 + "left": 5, + "right": 5 }, + "preliminaryData": [], "yAxis": { - "label": "Temperature", - "paddingPercent": 0.15 + "hideAxis": false, + "displayNumbersOnBar": false, + "hideLabel": false, + "hideTicks": false, + "size": 50, + "gridLines": false, + "enablePadding": false, + "min": "", + "max": "", + "labelColor": "#333", + "tickLabelColor": "#333", + "tickColor": "#333", + "rightHideAxis": false, + "rightAxisSize": 0, + "rightLabel": "", + "rightLabelOffsetSize": 0, + "rightAxisLabelColor": "#333", + "rightAxisTickLabelColor": "#333", + "rightAxisTickColor": "#333", + "numTicks": "", + "axisPadding": 0, + "scalePadding": 10, + "tickRotation": 0, + "anchors": [], + "shoMissingDataLabel": true, + "showMissingDataLine": true, + "categories": [] }, - "xAxis": { - "label": "Date", - "dataKey": "date", - "type": "date", - "dateParseFormat": "%Y-%m-%d", - "dateDisplayFormat": "%b %d", - "numTicks": 8, - "tickRotation": 50 + "boxplot": { + "plots": [], + "borders": "true", + "plotOutlierValues": false, + "plotNonOutlierValues": true, + "labels": { + "q1": "Lower Quartile", + "q2": "q2", + "q3": "Upper Quartile", + "q4": "q4", + "minimum": "Minimum", + "maximum": "Maximum", + "mean": "Mean", + "median": "Median", + "sd": "Standard Deviation", + "iqr": "Interquartile Range", + "count": "Count", + "outliers": "Outliers", + "values": "Values", + "lowerBounds": "Lower Bounds", + "upperBounds": "Upper Bounds" + } }, - "legend": { - "label": "Legend", - "above": true, - "left": true + "topAxis": { + "hasLine": false + }, + "isLegendValue": false, + "barThickness": 0.35, + "barHeight": 25, + "barSpace": 15, + "heights": { + "vertical": 300, + "horizontal": 750 + }, + "xAxis": { + "sortDates": false, + "anchors": [], + "type": "categorical", + "showTargetLabel": true, + "targetLabel": "Target", + "hideAxis": false, + "hideLabel": false, + "hideTicks": false, + "size": 75, + "tickRotation": 0, + "min": "", + "max": "", + "labelColor": "#333", + "tickLabelColor": "#333", + "tickColor": "#333", + "numTicks": "", + "labelOffset": 0, + "axisPadding": 200, + "target": 0, + "maxTickRotation": 0, + "padding": 5, + "showYearsOnce": false, + "sortByRecentDate": false, + "dataKey": "Date", + "axisBBox": 29.860000610351562, + "tickWidthMax": 86 }, "table": { "label": "Data Table", - "expanded": false, - "download": true + "expanded": true, + "limitHeight": false, + "height": "", + "caption": "", + "showDownloadUrl": false, + "showDataTableLink": true, + "showDownloadLinkBelow": true, + "indexLabel": "", + "download": true, + "showVertical": true, + "dateDisplayFormat": "", + "showMissingDataLabel": true, + "showSuppressedSymbol": true, + "show": false }, - "regions": [ - { - "label": "Region", - "color": "black", - "background": "green", - "from": "2011-10-02", - "to": "2011-10-03" - } - ], - "formattedData": [ - { - "date": "2011-10-01", - "New York": "89.4", - "San Francisco": "26.7", - "Austin": "34.2", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-02", - "New York": "54.0", - "San Francisco": "59.9", - "Austin": "68.7", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-03", - "New York": "51.3", - "San Francisco": "53.1", - "Austin": "64.4", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-04", - "New York": "34.7", - "San Francisco": "56.8", - "Austin": "98.0", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-01", - "New York": "32.4", - "San Francisco": "43.7", - "Austin": "54.2", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-02", - "New York": "65.0", - "San Francisco": "76.9", - "Austin": "87.7", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-03", - "New York": "53.3", - "San Francisco": "59.1", - "Austin": "69.4", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-04", - "New York": "55.7", - "San Francisco": "58.8", - "Austin": "68.0", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-01", - "New York": "63.4", - "San Francisco": "62.7", - "Austin": "72.2", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-02", - "New York": "58.0", - "San Francisco": "59.9", - "Austin": "67.7", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" - }, + "orientation": "vertical", + "color": "pinkpurple", + "columns": {}, + "legend": { + "hide": false, + "behavior": "isolate", + "axisAlign": true, + "singleRow": true, + "colorCode": "", + "reverseLabelOrder": false, + "description": "", + "dynamicLegend": false, + "dynamicLegendDefaultText": "Show All", + "dynamicLegendItemLimit": 5, + "dynamicLegendItemLimitMessage": "Dynamic Legend Item Limit Hit.", + "dynamicLegendChartMessage": "Select Options from the Legend", + "label": "", + "lineMode": false, + "verticalSorted": false, + "highlightOnHover": false, + "hideSuppressedLabels": false, + "hideSuppressionLink": false, + "seriesHighlight": [], + "style": "circles", + "subStyle": "linear blocks", + "tickRotation": "", + "hideBorder": { + "side": false, + "topBottom": true + }, + "position": "right" + }, + "brush": { + "height": 45, + "active": false + }, + "exclusions": { + "active": false, + "keys": [] + }, + "palette": "qualitative-bold", + "isPaletteReversed": false, + "twoColor": { + "palette": "monochrome-1", + "isPaletteReversed": false + }, + "labels": false, + "dataFormat": { + "commas": false, + "prefix": "", + "suffix": "", + "abbreviated": false, + "bottomSuffix": "", + "bottomPrefix": "", + "bottomAbbreviated": false + }, + "confidenceKeys": {}, + "visual": { + "border": true, + "accent": true, + "background": true, + "verticalHoverLine": false, + "horizontalHoverLine": false + }, + "useLogScale": false, + "filterBehavior": "Filter Change", + "highlightedBarValues": [], + "series": [ { - "date": "2011-10-03", - "New York": "53.3", - "San Francisco": "59.1", - "Austin": "69.4", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" + "dataKey": "Data 1", + "type": "Bar", + "axis": "Left", + "tooltip": true }, { - "date": "2011-10-04", - "New York": "55.7", - "San Francisco": "58.8", - "Austin": "68.0", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" + "dataKey": "Data 3", + "type": "Bar", + "axis": "Left", + "tooltip": true }, { - "date": "2011-10-01", - "New York": "63.4", - "San Francisco": "62.7", - "Austin": "87.2", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" + "dataKey": "Data 2", + "type": "Bar", + "axis": "Left", + "tooltip": true }, { - "date": "2011-10-02", - "New York": "98.0", - "San Francisco": "59.9", - "Austin": "67.7", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" + "dataKey": "Data 5", + "type": "Bar", + "axis": "Left", + "tooltip": true }, { - "date": "2011-10-03", - "New York": "53.3", - "San Francisco": "59.1", - "Austin": "69.4", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" + "dataKey": "Data 6", + "type": "Bar", + "axis": "Left", + "tooltip": true }, { - "date": "2011-10-04", - "New York": "55.7", - "San Francisco": "54.8", - "Austin": "68.0", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" - } - ] - }, - "map1": { - "uid": "map1", - "type": "map", - "defaultData": false, - "dataKey": "data1", - "general": { - "title": "Map Example", - "subtext": "", - "territoriesLabel": "Territories", - "type": "data", - "geoType": "us", - "headerColor": "theme-blue", - "showSidebar": true, - "showTitle": true, - "geoBorderColor": "darkGray", - "showDownloadButton": true, - "expandDataTable": true - }, - "color": "pinkpurple", - "columns": { - "geo": { - "name": "state", - "label": "Location", - "tooltip": false, - "dataTable": true - }, - "primary": { - "name": "Insured Rate", - "label": "Data Label", - "prefix": "", - "suffix": "%", - "dataTable": true, + "dataKey": "Data 4", + "type": "Bar", + "axis": "Left", "tooltip": true - }, - "navigate": { - "name": "link", - "tooltip": false, - "dataTable": false } + ], + "tooltips": { + "opacity": 90, + "singleSeries": false, + "dateDisplayFormat": "" }, - "legend": { - "numberOfItems": 3, - "position": "side", - "title": "Legend Title", - "description": "Legend Text", - "type": "equalnumber", - "specialClasses": [ - "N/A" - ] + "forestPlot": { + "startAt": 0, + "colors": { + "line": "", + "shape": "" + }, + "lineOfNoEffect": { + "show": true + }, + "type": "", + "pooledResult": { + "diamondHeight": 5, + "column": "" + }, + "estimateField": "", + "estimateRadius": "", + "shape": "square", + "rowHeight": 20, + "description": { + "show": true, + "text": "description", + "location": 0 + }, + "result": { + "show": true, + "text": "result", + "location": 100 + }, + "radius": { + "min": 2, + "max": 10, + "scalingColumn": "" + }, + "regression": { + "lower": 0, + "upper": 0, + "estimateField": 0 + }, + "leftWidthOffset": 0, + "rightWidthOffset": 0, + "showZeroLine": false, + "leftLabel": "", + "rightLabel": "" + }, + "area": { + "isStacked": false + }, + "sankey": { + "title": { + "defaultColor": "black" + }, + "iterations": 1, + "rxValue": 0.9, + "overallSize": { + "width": 900, + "height": 700 + }, + "margin": { + "margin_y": 25, + "margin_x": 0 + }, + "nodeSize": { + "nodeWidth": 26, + "nodeHeight": 40 + }, + "nodePadding": 55, + "nodeFontColor": "black", + "nodeColor": { + "default": "#ff8500", + "inactive": "#808080" + }, + "linkColor": { + "default": "#ffc900", + "inactive": "#D3D3D3" + }, + "opacity": { + "nodeOpacityDefault": 1, + "nodeOpacityInactive": 0.1, + "LinkOpacityDefault": 1, + "LinkOpacityInactive": 0.1 + }, + "storyNodeFontColor": "#006778", + "storyNodeText": [], + "nodeValueStyle": { + "textBefore": "(", + "textAfter": ")" + }, + "data": [] + }, + "filters": [], + "openModal": true, + "uid": "chart1736358305659", + "visualizationType": "Bar", + "dataDescription": { + "horizontal": false, + "series": false }, - "filters": [ + "dataKey": "valid-area-chart.json", + "version": "4.24.10", + "dynamicMarginTop": 0 + } + }, + "table": { + "label": "Data Table", + "show": true, + "showDownloadUrl": false, + "showDownloadLinkBelow": true, + "showVertical": true + }, + "newViz": true, + "errors": [], + "currentViewport": "lg", + "id": 15, + "category": "General", + "label": "Dashboard", + "type": "dashboard", + "subType": null, + "orientation": null, + "icon": { + "key": null, + "ref": null, + "props": {}, + "_owner": null, + "_store": {} + }, + "content": "Present multiple data visualizations with shared filter controls.", + "datasets": { + "valid-area-chart.json": { + "data": [ { - "label": "Filter 2", - "columnName": "filter2" + "Date": "1/15/2016", + "Data 1": "900", + "Data 2": "135", + "Data 3": "300", + "Data 4": "95", + "Data 5": "120", + "Data 6": "310" + }, + { + "Date": "2/15/2016", + "Data 1": "4000", + "Data 2": "90", + "Data 3": "240", + "Data 4": "60", + "Data 5": "160", + "Data 6": "2000" + }, + { + "Date": "3/15/2016", + "Data 1": "4000", + "Data 2": "300", + "Data 3": "290", + "Data 4": "100", + "Data 5": "200", + "Data 6": "250" + }, + { + "Date": "4/15/2016", + "Data 1": "1200", + "Data 2": "160", + "Data 3": "230", + "Data 4": "180", + "Data 5": "160", + "Data 6": "220" + }, + { + "Date": "5/15/2016", + "Data 1": "8000", + "Data 2": "350", + "Data 3": "300", + "Data 4": "150", + "Data 5": "130", + "Data 6": "100" + }, + { + "Date": "6/15/2016", + "Data 1": "9000", + "Data 2": "220", + "Data 3": "320", + "Data 4": "100", + "Data 5": "220", + "Data 6": "300" + }, + { + "Date": "7/15/2016", + "Data 1": "900", + "Data 2": "8888", + "Data 3": "300", + "Data 4": "195", + "Data 5": "120", + "Data 6": "610" + }, + { + "Date": "8/15/2016", + "Data 1": "900", + "Data 2": "777", + "Data 3": "540", + "Data 4": "600", + "Data 5": "120", + "Data 6": "200" + }, + { + "Date": "9/15/2016", + "Data 1": "700", + "Data 2": "200", + "Data 3": "590", + "Data 4": "900", + "Data 5": "400", + "Data 6": "650" + }, + { + "Date": "10/15/2016", + "Data 1": "2200", + "Data 2": "360", + "Data 3": "930", + "Data 4": "880", + "Data 5": "760", + "Data 6": "420" + }, + { + "Date": "11/15/2016", + "Data 1": "5000", + "Data 2": "1350", + "Data 3": "300", + "Data 4": "1150", + "Data 5": "230", + "Data 6": "600" + }, + { + "Date": "12/15/2016", + "Data 1": "6000", + "Data 2": "3220", + "Data 3": "540", + "Data 4": "300", + "Data 5": "720", + "Data 6": "3000" } ], - "formattedData": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ] - }, - "data-bite1698177306942": { - "type": "data-bite", - "data": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "dataBite": "", - "dataFunction": "Count", - "dataColumn": "Insured Rate", - "bitePosition": "Left", - "biteFontSize": 24, - "fontSize": "medium", - "biteBody": "Message", - "imageData": { - "display": "none", - "url": "", - "alt": "", - "options": [] - }, - "dataFormat": { - "roundToPlace": 0, - "commas": true, - "prefix": "", - "suffix": "%" - }, - "biteStyle": "graphic", - "filters": [], - "subtext": "", - "title": "Title", - "theme": "theme-blue", - "shadow": false, - "visual": { - "border": false, - "accent": false, - "background": false, - "hideBackgroundColor": false, - "borderColorTheme": false - }, - "general": { - "isCompactStyle": false - }, - "openModal": false, - "uid": "data-bite1698177306942", - "visualizationType": "data-bite", - "dataKey": "data1", - "dataDescription": { - "horizontal": false, - "series": false - }, - "formattedData": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "editing": false, - "originalFormattedData": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "validated": 4.23 - }, - "waffle-chart1698177326024": { - "title": "Waffle Chart", - "visualizationType": "waffle-chart", - "visualizationSubType": "linear", - "showPercent": true, - "showDenominator": true, - "valueDescription": "out of", - "content": "Message", - "subtext": "", - "orientation": "horizontal", - "data": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "filters": [], - "fontSize": "", - "overallFontSize": "medium", - "dataColumn": "", - "dataFunction": "", - "dataConditionalColumn": "", - "dataConditionalOperator": "", - "dataConditionalComparate": "", - "invalidComparate": false, - "customDenom": false, - "dataDenom": "100", - "dataDenomColumn": "", - "dataDenomFunction": "", - "suffix": "%", - "roundToPlace": "0", - "shape": "circle", - "nodeWidth": "10", - "nodeSpacer": "2", - "theme": "theme-blue", - "type": "waffle-chart", - "visual": { - "border": true, - "accent": false, - "background": false, - "hideBackgroundColor": false, - "borderColorTheme": false - }, - "openModal": false, - "uid": "waffle-chart1698177326024", - "dataKey": "data1", - "dataDescription": { - "horizontal": false, - "series": false - }, - "formattedData": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "editing": false, - "originalFormattedData": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "validated": 4.23 - }, - "markup-include1698177345432": { - "title": "Markup Include", - "showHeader": false, - "type": "markup-include", - "srcUrl": "#example", - "theme": "theme-blue", - "visual": { - "border": false, - "accent": false, - "background": false, - "hideBackgroundColor": false, - "borderColorTheme": false - }, - "openModal": false, - "uid": "markup-include1698177345432", - "visualizationType": "markup-include", - "editing": false, - "data": {}, - "validated": 4.23 - }, - "filtered-text1698177354149": { - "title": "Filtered Text", - "type": "filtered-text", - "theme": "theme-blue", - "fontSize": "small", - "shadow": false, - "filters": [], - "visual": { - "hideBackgroundColor": false, - "background": false, - "roundedBorders": false, - "accent": false, - "border": false, - "borderColorTheme": false - }, - "openModal": false, - "uid": "filtered-text1698177354149", - "visualizationType": "filtered-text", - "dataKey": "data1", - "data": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "dataDescription": { - "horizontal": false, - "series": false - }, - "formattedData": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "editing": false, - "originalFormattedData": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ], - "validated": 4.23, - "textColumn": "state" - } - }, - "table": { - "label": "Data Table", - "show": true, - "showDownloadUrl": false, - "showVertical": true - }, - "type": "dashboard", - "datasets": { - "data1": { - "data": [ - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "75", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "100", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 1", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option1", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option2", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "43", - "state": "Alabama" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "0", - "state": "Alaska" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "72.7", - "state": "Arizona" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "78.7", - "state": "Arkansas" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "37.2", - "state": "California" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "50.6", - "state": "Colorado" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83.2", - "state": "Connecticut" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "90", - "state": "Delaware" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "77", - "state": "District of Columbia" - }, - { - "filter1": "option3", - "filter2": "sub option 2", - "Insured Rate": "83", - "state": "Florida" - } - ] - }, - "data2": { - "dataUrl": "../examples/temp-example-data.json", - "data": [ - { - "date": "2011-10-01", - "New York": "89.4", - "San Francisco": "26.7", - "Austin": "34.2", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-02", - "New York": "54.0", - "San Francisco": "59.9", - "Austin": "68.7", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-03", - "New York": "51.3", - "San Francisco": "53.1", - "Austin": "64.4", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-04", - "New York": "34.7", - "San Francisco": "56.8", - "Austin": "98.0", - "wind": "Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-01", - "New York": "32.4", - "San Francisco": "43.7", - "Austin": "54.2", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-02", - "New York": "65.0", - "San Francisco": "76.9", - "Austin": "87.7", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-03", - "New York": "53.3", - "San Francisco": "59.1", - "Austin": "69.4", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-04", - "New York": "55.7", - "San Francisco": "58.8", - "Austin": "68.0", - "wind": "Don't Include Wind", - "humidity": "Include Humidiy" - }, - { - "date": "2011-10-01", - "New York": "63.4", - "San Francisco": "62.7", - "Austin": "72.2", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-02", - "New York": "58.0", - "San Francisco": "59.9", - "Austin": "67.7", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-03", - "New York": "53.3", - "San Francisco": "59.1", - "Austin": "69.4", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-04", - "New York": "55.7", - "San Francisco": "58.8", - "Austin": "68.0", - "wind": "Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-01", - "New York": "63.4", - "San Francisco": "62.7", - "Austin": "87.2", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-02", - "New York": "98.0", - "San Francisco": "59.9", - "Austin": "67.7", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-03", - "New York": "53.3", - "San Francisco": "59.1", - "Austin": "69.4", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" - }, - { - "date": "2011-10-04", - "New York": "55.7", - "San Francisco": "54.8", - "Austin": "68.0", - "wind": "Don't Include Wind", - "humidity": "Don't Include Humidiy" - } - ] + "dataFileSize": 1924, + "dataFileName": "valid-area-chart.json", + "dataFileSourceType": "file", + "dataFileFormat": "JSON", + "preview": true } }, + "visualizationType": null, + "activeVizButtonID": 15, "runtime": {}, - "uuid": 1698177351089 -} \ No newline at end of file + "version": "4.25.1", + "uuid": 1736358304508, + "migrations": { + "addColorMigration": true + } +} diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts new file mode 100644 index 000000000..a42dc9917 --- /dev/null +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -0,0 +1,45 @@ +import { SharedFilter } from '../types/SharedFilter' +import _ from 'lodash' + +export const updateChildFilters = ( + newSharedFilters: SharedFilter[], + state: { data: Record } +): SharedFilter[] => { + const data = Object.values(state.data).flat() + + // Find indexes of all child filters + const childFilterIndexes = newSharedFilters + .map((filter, index) => (filter.parents ? index : -1)) + .filter(index => index !== -1) + + if (childFilterIndexes.length === 0) return newSharedFilters + + // deep copy of the shared filters + const updatedFilters = _.cloneDeep(newSharedFilters) + + // Update each child filter + childFilterIndexes.forEach(childIndex => { + const childFilter = newSharedFilters[childIndex] + const parentFilter = newSharedFilters.find(filter => String(childFilter.parents) === String(filter.key)) + + if (parentFilter) { + // Filter dataset based on parent's active value + const parentActiveValuesArr = data.filter( + (d: Record) => d[parentFilter.columnName] === parentFilter.active + ) + + // Get unique active values for the child filter + const uniqChildValues = _.uniq(parentActiveValuesArr.map(d => d[childFilter.columnName]).filter(Boolean)) + + // Update the child filter if unique values exist + if (uniqChildValues.length > 0) { + updatedFilters[childIndex] = { + ...childFilter, + values: uniqChildValues + } + } + } + }) + + return updatedFilters +} From ea8ba3debc0536296f9d1d209f819aa0c69457bd Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 8 Jan 2025 14:20:29 -0500 Subject: [PATCH 03/19] [DEV-10046a] write a test code --- .../DashboardFiltersWrapper.tsx | 2 +- .../helpers/tests/updatesChildFilters.test.ts | 121 ++++++++++++++++++ .../src/helpers/updateChildFilters.ts | 9 +- 3 files changed, 125 insertions(+), 7 deletions(-) create mode 100644 packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts diff --git a/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx b/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx index 6959fe7b3..d1f584de6 100644 --- a/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +++ b/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx @@ -217,7 +217,7 @@ const DashboardFiltersWrapper: React.FC = ({ > { + it('should filter data based on the provided filters', () => { + const filters = [ + { + tier: 1, + columnName: 'name', + active: 'John', + key: 'Parent Filter', + values: ['John', 'Kelly', 'Norman', 'Jane'] + }, + { + tier: 2, + columnName: 'lastName', + active: 'Deer', + key: 'Child Filter', + parents: 'Parent Filter', + values: ['Deer', 'Adams', 'Sally', 'Gorman', 'Roberts'] + } + ] as SharedFilter[] + const data = { + vizKey: [ + [ + { name: 'John', lastName: 'Deer' }, + { name: 'John', lastName: 'Roberts' }, + { name: 'Kelly', lastName: 'Adams' }, + { name: 'Norman', lastName: 'Sally' }, + { name: 'Jane', lastName: 'Gorman' } + ] + ] + } + + let exprectedResult = [ + { + tier: 1, + columnName: 'name', + active: 'John', + key: 'Parent Filter', + values: ['John', 'Kelly', 'Norman', 'Jane'] + }, + { + tier: 2, + columnName: 'lastName', + active: '', + key: 'Child Filter', + parents: 'Parent Filter', + values: ['Deer', 'Roberts'] // updated values only + } + ] + const result = updateChildFilters(filters, data) + + expect(result).toEqual(exprectedResult) + }) + + it('should handle a parent with two child filters', () => { + const filters = [ + { + tier: 1, + columnName: 'category', + active: 'Electronics', + key: 'Parent Filter', + values: ['Electronics', 'Furniture', 'Clothing'] + }, + { + tier: 2, + columnName: 'brand', + key: 'Child Filter 1', + parents: 'Parent Filter', + values: ['Sony', 'Samsung', 'IKEA', 'Nike'] + }, + { + tier: 3, + columnName: 'priceRange', + key: 'Child Filter 2', + parents: 'Parent Filter', + values: ['Under $50', '$50-$100', 'Over $100'] + } + ] as SharedFilter[] + + const data = { + vizKey: [ + [ + { category: 'Electronics', brand: 'Sony', priceRange: '$50-$100' }, + { category: 'Electronics', brand: 'Samsung', priceRange: 'Over $100' }, + { category: 'Furniture', brand: 'IKEA', priceRange: '$50-$100' }, + { category: 'Clothing', brand: 'Nike', priceRange: 'Under $50' } + ] + ] + } + + const expectedResult = [ + { + tier: 1, + columnName: 'category', + active: 'Electronics', + key: 'Parent Filter', + values: ['Electronics', 'Furniture', 'Clothing'] + }, + { + tier: 2, + columnName: 'brand', + key: 'Child Filter 1', + parents: 'Parent Filter', + values: ['Sony', 'Samsung'] // Updated to match 'Electronics' + }, + { + tier: 3, + columnName: 'priceRange', + key: 'Child Filter 2', + parents: 'Parent Filter', + values: ['$50-$100', 'Over $100'] // Updated to match 'Electronics' + } + ] + + const result = updateChildFilters(filters, data) + + expect(result).toEqual(expectedResult) + }) +}) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index a42dc9917..0a2fc2b81 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -1,11 +1,8 @@ import { SharedFilter } from '../types/SharedFilter' import _ from 'lodash' -export const updateChildFilters = ( - newSharedFilters: SharedFilter[], - state: { data: Record } -): SharedFilter[] => { - const data = Object.values(state.data).flat() +export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Record): SharedFilter[] => { + const dateSet = Object.values(data).flat() // Find indexes of all child filters const childFilterIndexes = newSharedFilters @@ -24,7 +21,7 @@ export const updateChildFilters = ( if (parentFilter) { // Filter dataset based on parent's active value - const parentActiveValuesArr = data.filter( + const parentActiveValuesArr = dateSet.filter( (d: Record) => d[parentFilter.columnName] === parentFilter.active ) From 388eec65749df463c9d662118836165e11e6b16f Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 8 Jan 2025 14:28:18 -0500 Subject: [PATCH 04/19] [DEV-10046a] Remove a file --- .../DashboardFiltersWrapper.tsx | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx b/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx index d1f584de6..9ed347f07 100644 --- a/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx +++ b/packages/dashboard/src/components/DashboardFilters/DashboardFiltersWrapper.tsx @@ -14,6 +14,7 @@ import { hasDashboardApplyBehavior } from '../../helpers/hasDashboardApplyBehavi import * as apiFilterHelpers from '../../helpers/apiFilterHelpers' import { applyQueuedActive } from '@cdc/core/components/Filters/helpers/applyQueuedActive' import './dashboardfilter.styles.css' +import { updateChildFilters } from '../../helpers/updateChildFilters' type SubOptions = { subOptions?: Record<'value' | 'text', string>[] } @@ -34,40 +35,6 @@ type DashboardFiltersProps = { setAPILoading: (loading: boolean) => void } -const updateChildFilters = (newSharedFilters, state) => { - const dataSetArr = Object.values(state.data).flat() - - // Find all child filters and their parent filter - const childFilterIndexes = newSharedFilters - .map((filter, index) => (filter.parents ? index : -1)) // Get indexes of all child filters - .filter(index => index !== -1) // Filter out invalid indexes - - if (childFilterIndexes.length === 0) return newSharedFilters // No child filters found - - // Update child filters - let updatedFilters = [...newSharedFilters] - childFilterIndexes.forEach(childIndex => { - const childFilter = newSharedFilters[childIndex] - const parentFilter = newSharedFilters.find(filter => String(childFilter.parents) === String(filter.key)) - - if (parentFilter) { - // Get active values for the parent filter - const parentActiveValuesArr = dataSetArr.filter(d => d[parentFilter.columnName] === parentFilter.active) - const uniqChildValues = _.uniq(parentActiveValuesArr.map(d => d[childFilter.columnName]).filter(Boolean)) - - // Update the child filter if active values exist - if (uniqChildValues.length > 0) { - updatedFilters[childIndex] = { - ...childFilter, - values: uniqChildValues - } - } - } - }) - - return updatedFilters -} - const DashboardFiltersWrapper: React.FC = ({ apiFilterDropdowns, visualizationConfig, From 6800ceeee51339587b469a0f13006c1b27add18b Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 8 Jan 2025 14:34:49 -0500 Subject: [PATCH 05/19] [DEV-10046a] clear active --- packages/dashboard/src/helpers/updateChildFilters.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 0a2fc2b81..2f8f9e71e 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -32,7 +32,8 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor if (uniqChildValues.length > 0) { updatedFilters[childIndex] = { ...childFilter, - values: uniqChildValues + values: uniqChildValues, + active: '' } } } From cc6ea337c4a144e2e8b1eba05c69435d39091a09 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 8 Jan 2025 14:37:16 -0500 Subject: [PATCH 06/19] [DEV-10046a] clear active --- .../dashboard/src/helpers/tests/updatesChildFilters.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts b/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts index 1bf05740b..fb8c5a5f1 100644 --- a/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts +++ b/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts @@ -14,7 +14,7 @@ describe('updateChildFilters', () => { { tier: 2, columnName: 'lastName', - active: 'Deer', + active: '', key: 'Child Filter', parents: 'Parent Filter', values: ['Deer', 'Adams', 'Sally', 'Gorman', 'Roberts'] @@ -67,12 +67,14 @@ describe('updateChildFilters', () => { tier: 2, columnName: 'brand', key: 'Child Filter 1', + active: '', parents: 'Parent Filter', values: ['Sony', 'Samsung', 'IKEA', 'Nike'] }, { tier: 3, columnName: 'priceRange', + active: '', key: 'Child Filter 2', parents: 'Parent Filter', values: ['Under $50', '$50-$100', 'Over $100'] @@ -101,6 +103,7 @@ describe('updateChildFilters', () => { { tier: 2, columnName: 'brand', + active: '', key: 'Child Filter 1', parents: 'Parent Filter', values: ['Sony', 'Samsung'] // Updated to match 'Electronics' @@ -108,6 +111,7 @@ describe('updateChildFilters', () => { { tier: 3, columnName: 'priceRange', + active: '', key: 'Child Filter 2', parents: 'Parent Filter', values: ['$50-$100', 'Over $100'] // Updated to match 'Electronics' From c60e43ae2681a5ed5d8dbf6fa184dd89b9666c78 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Thu, 9 Jan 2025 09:21:58 -0500 Subject: [PATCH 07/19] [DEV-10046a] update test --- .../helpers/tests/updatesChildFilters.test.ts | 69 ------------------- 1 file changed, 69 deletions(-) diff --git a/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts b/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts index fb8c5a5f1..625e8ff72 100644 --- a/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts +++ b/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts @@ -53,73 +53,4 @@ describe('updateChildFilters', () => { expect(result).toEqual(exprectedResult) }) - - it('should handle a parent with two child filters', () => { - const filters = [ - { - tier: 1, - columnName: 'category', - active: 'Electronics', - key: 'Parent Filter', - values: ['Electronics', 'Furniture', 'Clothing'] - }, - { - tier: 2, - columnName: 'brand', - key: 'Child Filter 1', - active: '', - parents: 'Parent Filter', - values: ['Sony', 'Samsung', 'IKEA', 'Nike'] - }, - { - tier: 3, - columnName: 'priceRange', - active: '', - key: 'Child Filter 2', - parents: 'Parent Filter', - values: ['Under $50', '$50-$100', 'Over $100'] - } - ] as SharedFilter[] - - const data = { - vizKey: [ - [ - { category: 'Electronics', brand: 'Sony', priceRange: '$50-$100' }, - { category: 'Electronics', brand: 'Samsung', priceRange: 'Over $100' }, - { category: 'Furniture', brand: 'IKEA', priceRange: '$50-$100' }, - { category: 'Clothing', brand: 'Nike', priceRange: 'Under $50' } - ] - ] - } - - const expectedResult = [ - { - tier: 1, - columnName: 'category', - active: 'Electronics', - key: 'Parent Filter', - values: ['Electronics', 'Furniture', 'Clothing'] - }, - { - tier: 2, - columnName: 'brand', - active: '', - key: 'Child Filter 1', - parents: 'Parent Filter', - values: ['Sony', 'Samsung'] // Updated to match 'Electronics' - }, - { - tier: 3, - columnName: 'priceRange', - active: '', - key: 'Child Filter 2', - parents: 'Parent Filter', - values: ['$50-$100', 'Over $100'] // Updated to match 'Electronics' - } - ] - - const result = updateChildFilters(filters, data) - - expect(result).toEqual(expectedResult) - }) }) From 5cf2e95f7f778e583965dbb4df13ac7adb348de7 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Mon, 13 Jan 2025 15:29:54 -0500 Subject: [PATCH 08/19] [DEV-10046a] update test --- .../dashboard/src/helpers/tests/updatesChildFilters.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts b/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts index 625e8ff72..7e821ffaa 100644 --- a/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts +++ b/packages/dashboard/src/helpers/tests/updatesChildFilters.test.ts @@ -17,7 +17,7 @@ describe('updateChildFilters', () => { active: '', key: 'Child Filter', parents: 'Parent Filter', - values: ['Deer', 'Adams', 'Sally', 'Gorman', 'Roberts'] + values: ['Deer', 'Roberts'] } ] as SharedFilter[] const data = { From e4b57961244978bf53492ff6f615d18fdaf070b7 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 15 Jan 2025 17:42:36 -0500 Subject: [PATCH 09/19] [DEV-10046a] Fix spelling & TS support --- .../dashboard/src/helpers/updateChildFilters.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 2f8f9e71e..1a17304fb 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -2,10 +2,10 @@ import { SharedFilter } from '../types/SharedFilter' import _ from 'lodash' export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Record): SharedFilter[] => { - const dateSet = Object.values(data).flat() + const dataSet = Object.values(data).flat() // Find indexes of all child filters - const childFilterIndexes = newSharedFilters + const childFilterIndexes: number[] = newSharedFilters .map((filter, index) => (filter.parents ? index : -1)) .filter(index => index !== -1) @@ -16,17 +16,19 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor // Update each child filter childFilterIndexes.forEach(childIndex => { - const childFilter = newSharedFilters[childIndex] - const parentFilter = newSharedFilters.find(filter => String(childFilter.parents) === String(filter.key)) + const childFilter: SharedFilter = newSharedFilters[childIndex] + const parentFilter: SharedFilter = newSharedFilters.find( + filter => String(childFilter.parents) === String(filter.key) + ) if (parentFilter) { // Filter dataset based on parent's active value - const parentActiveValuesArr = dateSet.filter( + const parentsActiveValues: string[] = dataSet.filter( (d: Record) => d[parentFilter.columnName] === parentFilter.active ) // Get unique active values for the child filter - const uniqChildValues = _.uniq(parentActiveValuesArr.map(d => d[childFilter.columnName]).filter(Boolean)) + const uniqChildValues = _.uniq(parentsActiveValues.map(d => d[childFilter.columnName]).filter(Boolean)) // Update the child filter if unique values exist if (uniqChildValues.length > 0) { From 1700414b34ba1b50dcc853d037741abbf4e5477c Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Thu, 16 Jan 2025 16:19:48 -0500 Subject: [PATCH 10/19] [DEV-10046a] Fix active value --- packages/dashboard/src/helpers/updateChildFilters.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 1a17304fb..48621efa5 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -34,8 +34,7 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor if (uniqChildValues.length > 0) { updatedFilters[childIndex] = { ...childFilter, - values: uniqChildValues, - active: '' + values: uniqChildValues } } } From e43593ab9f1b04b66450c816436b14af876b5f68 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Thu, 16 Jan 2025 16:25:55 -0500 Subject: [PATCH 11/19] [DEV-10046a] Handle Multiselect parent>child --- packages/dashboard/src/helpers/updateChildFilters.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 48621efa5..c79410026 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -3,7 +3,6 @@ import _ from 'lodash' export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Record): SharedFilter[] => { const dataSet = Object.values(data).flat() - // Find indexes of all child filters const childFilterIndexes: number[] = newSharedFilters .map((filter, index) => (filter.parents ? index : -1)) @@ -23,10 +22,9 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor if (parentFilter) { // Filter dataset based on parent's active value - const parentsActiveValues: string[] = dataSet.filter( - (d: Record) => d[parentFilter.columnName] === parentFilter.active + const parentsActiveValues: string[] = dataSet.filter((d: Record) => + parentFilter.active.includes(d[parentFilter.columnName]) ) - // Get unique active values for the child filter const uniqChildValues = _.uniq(parentsActiveValues.map(d => d[childFilter.columnName]).filter(Boolean)) From 0904d7db99bd6f2498ad2c618b9643b96f6a0b54 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Thu, 16 Jan 2025 16:37:06 -0500 Subject: [PATCH 12/19] [DEV-10046a] update filters --- .../src/helpers/updateChildFilters.ts | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index c79410026..861ccf897 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -3,28 +3,33 @@ import _ from 'lodash' export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Record): SharedFilter[] => { const dataSet = Object.values(data).flat() + // filter out Data type filters + const filters = newSharedFilters.filter(filter => filter.type === 'datafilter') // Find indexes of all child filters - const childFilterIndexes: number[] = newSharedFilters + const childFilterIndexes: number[] = filters .map((filter, index) => (filter.parents ? index : -1)) .filter(index => index !== -1) - if (childFilterIndexes.length === 0) return newSharedFilters // deep copy of the shared filters - const updatedFilters = _.cloneDeep(newSharedFilters) + const updatedFilters = _.cloneDeep(filters) // Update each child filter childFilterIndexes.forEach(childIndex => { - const childFilter: SharedFilter = newSharedFilters[childIndex] - const parentFilter: SharedFilter = newSharedFilters.find( - filter => String(childFilter.parents) === String(filter.key) - ) + const childFilter: SharedFilter = filters[childIndex] + const parentFilter: SharedFilter = filters.find(filter => String(childFilter.parents) === String(filter.key)) + const isParentMultiSelect = parentFilter.filterStyle === 'multi-select' if (parentFilter) { // Filter dataset based on parent's active value - const parentsActiveValues: string[] = dataSet.filter((d: Record) => - parentFilter.active.includes(d[parentFilter.columnName]) - ) + const parentsActiveValues: string[] = dataSet.filter((d: Record) => { + if (isParentMultiSelect) { + // If multi-select, check if the parent active array includes the value + return parentFilter.active.includes(d[parentFilter.columnName]) + } else { + return parentFilter.active === d[parentFilter.columnName] + } + }) // Get unique active values for the child filter const uniqChildValues = _.uniq(parentsActiveValues.map(d => d[childFilter.columnName]).filter(Boolean)) From 8bf86cc934669fbf4ec36e4dcb89ed620967ad39 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Thu, 16 Jan 2025 16:41:53 -0500 Subject: [PATCH 13/19] [DEV-10046a] handle URL filters --- .../dashboard/src/helpers/updateChildFilters.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 861ccf897..02c2be753 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -4,20 +4,21 @@ import _ from 'lodash' export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Record): SharedFilter[] => { const dataSet = Object.values(data).flat() // filter out Data type filters - const filters = newSharedFilters.filter(filter => filter.type === 'datafilter') + const dataFilters = newSharedFilters.filter(filter => filter.type === 'datafilter') + const urlFilters = newSharedFilters.filter(filter => filter.type === 'urlfilter') // Find indexes of all child filters - const childFilterIndexes: number[] = filters + const childFilterIndexes: number[] = dataFilters .map((filter, index) => (filter.parents ? index : -1)) .filter(index => index !== -1) if (childFilterIndexes.length === 0) return newSharedFilters // deep copy of the shared filters - const updatedFilters = _.cloneDeep(filters) + const updatedFilters = _.cloneDeep(dataFilters) // Update each child filter childFilterIndexes.forEach(childIndex => { - const childFilter: SharedFilter = filters[childIndex] - const parentFilter: SharedFilter = filters.find(filter => String(childFilter.parents) === String(filter.key)) + const childFilter: SharedFilter = dataFilters[childIndex] + const parentFilter: SharedFilter = dataFilters.find(filter => String(childFilter.parents) === String(filter.key)) const isParentMultiSelect = parentFilter.filterStyle === 'multi-select' if (parentFilter) { @@ -43,5 +44,5 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor } }) - return updatedFilters + return [...updatedFilters, ...urlFilters] } From bd06d482c7b5b276dffec3578a2aa100af195d10 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Thu, 16 Jan 2025 16:44:08 -0500 Subject: [PATCH 14/19] [DEV-10046a] add guard --- packages/dashboard/src/helpers/updateChildFilters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 02c2be753..fa741c1f9 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -26,7 +26,7 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor const parentsActiveValues: string[] = dataSet.filter((d: Record) => { if (isParentMultiSelect) { // If multi-select, check if the parent active array includes the value - return parentFilter.active.includes(d[parentFilter.columnName]) + return Array.isArray(parentFilter.active) && parentFilter.active.includes(d[parentFilter.columnName]) } else { return parentFilter.active === d[parentFilter.columnName] } From a96039c4f2cdd21ce679f161a4f49c2490fdee63 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Fri, 7 Feb 2025 18:09:57 -0500 Subject: [PATCH 15/19] [DEV-10046a] add active value --- .../src/helpers/updateChildFilters.ts | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index fa741c1f9..bf3ca76c0 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -3,22 +3,22 @@ import _ from 'lodash' export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Record): SharedFilter[] => { const dataSet = Object.values(data).flat() - // filter out Data type filters - const dataFilters = newSharedFilters.filter(filter => filter.type === 'datafilter') - const urlFilters = newSharedFilters.filter(filter => filter.type === 'urlfilter') + // Find indexes of all child filters - const childFilterIndexes: number[] = dataFilters - .map((filter, index) => (filter.parents ? index : -1)) + const childFilterIndexes: number[] = newSharedFilters + .map((filter, index) => (filter.type === 'datafilter' && filter.parents ? index : -1)) .filter(index => index !== -1) if (childFilterIndexes.length === 0) return newSharedFilters // deep copy of the shared filters - const updatedFilters = _.cloneDeep(dataFilters) + const updatedFilters = _.cloneDeep(newSharedFilters) // Update each child filter childFilterIndexes.forEach(childIndex => { - const childFilter: SharedFilter = dataFilters[childIndex] - const parentFilter: SharedFilter = dataFilters.find(filter => String(childFilter.parents) === String(filter.key)) + const childFilter: SharedFilter = newSharedFilters[childIndex] + const parentFilter: SharedFilter = newSharedFilters.find( + filter => String(childFilter.parents) === String(filter.key) + ) const isParentMultiSelect = parentFilter.filterStyle === 'multi-select' if (parentFilter) { @@ -36,13 +36,16 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor // Update the child filter if unique values exist if (uniqChildValues.length > 0) { + const isChildMultiSelect = childFilter.filterStyle === 'multi-select' + const activeValue = isChildMultiSelect ? uniqChildValues : uniqChildValues[0] updatedFilters[childIndex] = { ...childFilter, - values: uniqChildValues + values: uniqChildValues, + active: activeValue } } } }) - - return [...updatedFilters, ...urlFilters] + console.log(updatedFilters, 'updatedFilters') + return updatedFilters } From 4f298e9bfe1d22035003c9702711544288efb17d Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Mon, 10 Feb 2025 18:17:39 -0500 Subject: [PATCH 16/19] [DEV-10046a] clean console --- packages/dashboard/src/helpers/updateChildFilters.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index bf3ca76c0..16ec0c0ef 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -46,6 +46,5 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor } } }) - console.log(updatedFilters, 'updatedFilters') return updatedFilters } From 3a6263b5775b016ca3f701e818dfcd8997a550be Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 12 Feb 2025 17:00:48 -0500 Subject: [PATCH 17/19] [DEV-10046a] rename var --- packages/dashboard/src/helpers/updateChildFilters.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 16ec0c0ef..931948da0 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -32,15 +32,15 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor } }) // Get unique active values for the child filter - const uniqChildValues = _.uniq(parentsActiveValues.map(d => d[childFilter.columnName]).filter(Boolean)) + const childFilterValues = _.uniq(parentsActiveValues.map(d => d[childFilter.columnName]).filter(Boolean)) // Update the child filter if unique values exist - if (uniqChildValues.length > 0) { + if (childFilterValues.length > 0) { const isChildMultiSelect = childFilter.filterStyle === 'multi-select' - const activeValue = isChildMultiSelect ? uniqChildValues : uniqChildValues[0] + const activeValue = isChildMultiSelect ? childFilterValues : childFilterValues[0] updatedFilters[childIndex] = { ...childFilter, - values: uniqChildValues, + values: childFilterValues, active: activeValue } } From 393e6d4474362a2728d4bc1e9096009958cc1b15 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 12 Feb 2025 17:01:51 -0500 Subject: [PATCH 18/19] [DEV-10046a] cleanup --- packages/dashboard/src/helpers/updateChildFilters.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 931948da0..02eed4371 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -24,12 +24,7 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor if (parentFilter) { // Filter dataset based on parent's active value const parentsActiveValues: string[] = dataSet.filter((d: Record) => { - if (isParentMultiSelect) { - // If multi-select, check if the parent active array includes the value - return Array.isArray(parentFilter.active) && parentFilter.active.includes(d[parentFilter.columnName]) - } else { - return parentFilter.active === d[parentFilter.columnName] - } + return parentFilter.active?.includes(d[parentFilter.columnName]) }) // Get unique active values for the child filter const childFilterValues = _.uniq(parentsActiveValues.map(d => d[childFilter.columnName]).filter(Boolean)) From d7af279863fd6357e8ff5816118404e1e9457a51 Mon Sep 17 00:00:00 2001 From: Murad CDC Date: Wed, 12 Feb 2025 17:10:52 -0500 Subject: [PATCH 19/19] [DEV-10046a] remove var --- packages/dashboard/src/helpers/updateChildFilters.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/dashboard/src/helpers/updateChildFilters.ts b/packages/dashboard/src/helpers/updateChildFilters.ts index 02eed4371..f1bdf45fe 100644 --- a/packages/dashboard/src/helpers/updateChildFilters.ts +++ b/packages/dashboard/src/helpers/updateChildFilters.ts @@ -19,7 +19,6 @@ export const updateChildFilters = (newSharedFilters: SharedFilter[], data: Recor const parentFilter: SharedFilter = newSharedFilters.find( filter => String(childFilter.parents) === String(filter.key) ) - const isParentMultiSelect = parentFilter.filterStyle === 'multi-select' if (parentFilter) { // Filter dataset based on parent's active value