The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Add boxplot visualization (#68104)
Aleksandr Lesnenkof0582cb46ad0
diff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Box_Plot_Customization.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Box_Plot_Customization.pngnew file mode 100644index 00000000000..88a4f9f8cbfBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Box_Plot_Customization.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Dense_Temporal_Data.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Dense_Temporal_Data.pngnew file mode 100644index 00000000000..9977adcbc54Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Dense_Temporal_Data.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Distribution_Shapes.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Distribution_Shapes.pngnew file mode 100644index 00000000000..5841fab388eBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Distribution_Shapes.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Label_Formatting.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Label_Formatting.pngnew file mode 100644index 00000000000..df4c6bb713aBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Label_Formatting.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Label_Overflow.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Label_Overflow.pngnew file mode 100644index 00000000000..ccc8f4ef86dBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Label_Overflow.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Log_Scale.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Log_Scale.pngnew file mode 100644index 00000000000..a38c6ea30d5Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Log_Scale.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Log_Scale_Edge_Cases.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Log_Scale_Edge_Cases.pngnew file mode 100644index 00000000000..ba482b55ff8Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Log_Scale_Edge_Cases.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Many_Categories.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Many_Categories.pngnew file mode 100644index 00000000000..a393c4aa624Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Many_Categories.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Medium_Dense_Temporal_Data.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Medium_Dense_Temporal_Data.pngnew file mode 100644index 00000000000..b15abc57026Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Medium_Dense_Temporal_Data.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Min_Max_No_Outliers.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Min_Max_No_Outliers.pngnew file mode 100644index 00000000000..44df59a036fBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Min_Max_No_Outliers.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Multi_Series_Breakout_With_Hidden_Sort_Formatting.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Multi_Series_Breakout_With_Hidden_Sort_Formatting.pngnew file mode 100644index 00000000000..f7d2a718d56Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Multi_Series_Breakout_With_Hidden_Sort_Formatting.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Multi_Series_Two_Metrics_With_Axis_Split_Formatting.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Multi_Series_Two_Metrics_With_Axis_Split_Formatting.pngnew file mode 100644index 00000000000..767ee4ab31cBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Multi_Series_Two_Metrics_With_Axis_Split_Formatting.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Dimension_Min_Max.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Dimension_Min_Max.pngnew file mode 100644index 00000000000..750d1d47984Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Dimension_Min_Max.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Dimension_Tukey.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Dimension_Tukey.pngnew file mode 100644index 00000000000..d014e11ddf2Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Dimension_Tukey.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Min_Max_All_Points.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Min_Max_All_Points.pngnew file mode 100644index 00000000000..3ee9d841e9bBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Numeric_Min_Max_All_Points.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Outlier_Overflow.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Outlier_Overflow.pngnew file mode 100644index 00000000000..fa112d99fffBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Outlier_Overflow.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Positive_Negative_Cross_Zero_Y_Axis_Auto.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Positive_Negative_Cross_Zero_Y_Axis_Auto.pngnew file mode 100644index 00000000000..2fa6bf8c69bBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Positive_Negative_Cross_Zero_Y_Axis_Auto.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Pow_Scale.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Pow_Scale.pngnew file mode 100644index 00000000000..8afa93a96b3Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Pow_Scale.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Scale_Extremes.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Scale_Extremes.pngnew file mode 100644index 00000000000..0c79b58059aBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Scale_Extremes.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Single_Category.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Single_Category.pngnew file mode 100644index 00000000000..d08161a12adBinary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Single_Category.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Top_Bottom_Mixed_Outliers.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Top_Bottom_Mixed_Outliers.pngnew file mode 100644index 00000000000..e2b49dbbb47Binary files /dev/null and b/.loki/reference/chrome_laptop_Viz_Static_Viz_BoxPlotChart_Top_Bottom_Mixed_Outliers.png differdiff --git a/.loki/reference/chrome_laptop_Viz_Static_Viz_WaterfallChart_Null_X_Axis_Value.png b/.loki/reference/chrome_laptop_Viz_Static_Viz_WaterfallChart_Null_X_Axis_Value.pngindex cbc26f31038..86be65453c7 100644Binary files a/.loki/reference/chrome_laptop_Viz_Static_Viz_WaterfallChart_Null_X_Axis_Value.png and b/.loki/reference/chrome_laptop_Viz_Static_Viz_WaterfallChart_Null_X_Axis_Value.png differdiff --git a/e2e/support/helpers/e2e-visual-tests-helpers.js b/e2e/support/helpers/e2e-visual-tests-helpers.jsindex 80a9e59bb8b..c904a2e1509 100644--- a/e2e/support/helpers/e2e-visual-tests-helpers.js+++ b/e2e/support/helpers/e2e-visual-tests-helpers.js@@ -86,6 +86,7 @@ export function chartPathsWithFillColors(colors) {}const CIRCLE_PATH = "M1 0A1 1 0 1 1 1 -0.0001";+const DIAMOND_PATH = "M0 -1L1 0L0 1L-1 0Z";export function cartesianChartCircle() {return echartsContainer().find(`path[d="${CIRCLE_PATH}"]`)@@ -261,3 +262,17 @@ export function assertEChartsTooltipNotContain(rows) {});});}++export const BoxPlot = {+ getBoxes() {+ return echartsContainer().find('path[fill-opacity="0.15"][stroke]');+ },++ getPoints() {+ return echartsContainer().find(`path[d="${CIRCLE_PATH}"]`);+ },++ getMeanMarkers() {+ return echartsContainer().find(`path[d="${DIAMOND_PATH}"]`);+ },+};diff --git a/e2e/test/scenarios/visualizations-charts/boxplot.cy.spec.js b/e2e/test/scenarios/visualizations-charts/boxplot.cy.spec.jsnew file mode 100644index 00000000000..48d3a759047--- /dev/null+++ b/e2e/test/scenarios/visualizations-charts/boxplot.cy.spec.js@@ -0,0 +1,479 @@+const { H } = cy;+import { SAMPLE_DB_ID } from "e2e/support/cypress_data";+import { SAMPLE_DATABASE } from "e2e/support/cypress_sample_database";++const { ORDERS, ORDERS_ID, PRODUCTS, PRODUCTS_ID } = SAMPLE_DATABASE;++const testQuery = {+ type: "query",+ database: SAMPLE_DB_ID,+ query: {+ "source-table": ORDERS_ID,+ aggregation: [["count"]],+ breakout: [+ ["field", ORDERS.CREATED_AT, { "temporal-unit": "year" }],+ [+ "field",+ ORDERS.TOTAL,+ { binning: { strategy: "num-bins", "num-bins": 50 } },+ ],+ ],+ },+};++const singleSeriesQuestion = {+ dataset_query: testQuery,+ display: "boxplot",+ visualization_settings: {+ "graph.dimensions": ["CREATED_AT"],+ },+};++describe("scenarios > visualizations > boxplot", () => {+ beforeEach(() => {+ H.restore();+ cy.signInAsNormalUser();+ });++ it("should render boxplot and update chart on display settings changes", () => {+ H.visitQuestionAdhoc(singleSeriesQuestion);++ // 5 Boxes: 2022-2026+ H.BoxPlot.getBoxes().should("have.length", 5);++ // By default: Tukey whiskers, outliers shown, mean shown+ H.BoxPlot.getPoints().should("have.length", 1); // Only one outlier+ H.BoxPlot.getMeanMarkers().should("have.length", 5);++ // Open settings and change whisker type to Min/Max+ H.openVizSettingsSidebar();+ H.leftSidebar().within(() => {+ cy.findByText("Display").click();+ cy.findByText("Whiskers extend to").should("exist");+ cy.findByText("1.5 × interquartile range").should("exist");+ cy.findByText("Min/Max").click();+ });++ // With Min/Max whiskers, there should be no outliers+ H.BoxPlot.getPoints().should("not.exist");++ // "Outliers only" option should be hidden when Min/Max is selected+ H.leftSidebar().findByText("Outliers only").should("not.exist");++ // Change points mode to show all points+ H.leftSidebar().findByText("All points").click();+ H.BoxPlot.getPoints().should("have.length.at.least", 5);++ // Hide points entirely+ H.leftSidebar().findByText("None").click();+ H.BoxPlot.getPoints().should("not.exist");++ // Toggle mean off+ H.leftSidebar().findByText("Show mean").click();+ H.BoxPlot.getMeanMarkers().should("not.exist");++ // Toggle mean back on+ H.leftSidebar().findByText("Show mean").click();+ H.BoxPlot.getMeanMarkers().should("have.length", 5);+ });++ it("should show and configure data labels", () => {+ H.visitQuestionAdhoc(singleSeriesQuestion);++ H.openVizSettingsSidebar();+ H.leftSidebar().within(() => {+ cy.findByText("Display").click();+ cy.findByText("Show values on data points").click();+ });++ // After enabling, "Values to display" option appears with segmented buttons+ H.leftSidebar().within(() => {+ cy.findByText("Values to display").should("exist");+ cy.findByRole("button", { name: "Median only" }).should("exist");+ cy.findByRole("button", { name: "All" }).click();+ });++ // Verify label value appears+ H.echartsContainer().findByText("412").should("exist");++ // Disable "Hide overlapping labels" to show more labels+ H.leftSidebar().findByText("Hide overlapping labels").click();+ H.echartsContainer().findByText("91.75").should("exist");++ // Test "Auto formatting" segmented button+ H.leftSidebar().within(() => {+ cy.findByText("Auto formatting").should("exist");+ cy.findByRole("button", { name: "Full" }).click();+ });+ });++ it("should display tooltips on hover", () => {+ H.visitQuestionAdhoc(singleSeriesQuestion);++ // Hover over a box element from the left side to avoid mean marker overlap+ H.BoxPlot.getBoxes().first().trigger("mousemove", "left");+ H.assertEChartsTooltip({+ header: "2022",+ rows: [+ { name: "Upper whisker", value: "84" },+ { name: "Q3 (75th percentile)", value: "59" },+ { name: "Median", value: "35" },+ { name: "Mean", value: "39.16" },+ { name: "Q1 (25th percentile)", value: "15.5" },+ { name: "Lower whisker", value: "1" },+ ],+ });++ // Hover over the outlier point+ H.BoxPlot.getPoints().first().trigger("mousemove");+ H.assertEChartsTooltip({+ header: "2026 (outlier)",+ rows: [+ { name: "Count", value: "189" },+ { name: "Total: 50 bins", value: "70 – 75" },+ ],+ });+ });++ it("should support axis customization", () => {+ H.visitQuestionAdhoc(singleSeriesQuestion);++ H.openVizSettingsSidebar();+ H.leftSidebar().findByText("Axes").click();++ // Add y-axis label+ H.leftSidebar().within(() => {+ cy.findByDisplayValue("Count").clear().type("Count Label");+ });+ H.echartsContainer().findByText("Count Label").should("exist");++ // Add x-axis label+ H.leftSidebar().within(() => {+ cy.findByDisplayValue("Created At: Year").clear().type("Year Label");+ });+ H.echartsContainer().findByText("Year Label").should("exist");++ // Toggle auto y-axis range+ // Before toggling auto y-axis range, the y-axis labels contains 600+ H.echartsContainer().findByText("600");++ H.leftSidebar().findByText("Auto y-axis range").click();+ H.echartsContainer().within(() => {+ cy.findByText("100"); // Y-axis label since default non-auto range is [0, 100]+ cy.findByText("600").should("not.exist");+ });+ });++ it("should display goal line when configured", () => {+ H.visitQuestionAdhoc(singleSeriesQuestion);++ H.openVizSettingsSidebar();+ H.leftSidebar().findByText("Display").click();+ H.leftSidebar().findByText("Goal line").click();++ H.leftSidebar().within(() => {+ cy.findByLabelText("Goal value").clear().type("100");+ cy.findByLabelText("Goal label").clear().type("Target");+ });++ H.echartsContainer().findByText("Target").should("exist");+ H.goalLine().should("exist");+ });++ it("should render in dashboard and support drill-through on boxes and outliers", () => {+ H.createQuestionAndDashboard({+ questionDetails: {+ name: "BoxPlot Dashboard Test",+ query: singleSeriesQuestion.dataset_query.query,+ display: "boxplot",+ visualization_settings: singleSeriesQuestion.visualization_settings,+ },+ }).then(({ body: dashcard }) => {+ H.visitDashboard(dashcard.dashboard_id);+ });++ H.echartsContainer().should("be.visible");+ // Verify boxplot renders in dashboard context (5 boxes: 2022-2026)+ H.BoxPlot.getBoxes().should("have.length", 5);+ H.BoxPlot.getMeanMarkers().should("have.length", 5);++ // Click on a box to trigger drill-through (click left to avoid mean marker overlap)+ H.BoxPlot.getBoxes().first().click("left");++ // Click "See these Orders" to drill down+ H.popover().findByText("See these Orders").click();++ // Should navigate to filtered table view with dimension filter applied+ cy.findByTestId("filter-pill").should(+ "have.text",+ "Created At: Year is Jan 1 – Dec 31, 2022",+ );++ // Verify we're viewing a table with results+ H.tableInteractiveBody().contains("79.37").should("exist");++ // Go back to dashboard+ cy.findByLabelText("Back to Test Dashboard").click();++ // Click on an outlier point+ H.BoxPlot.getPoints().first().click();++ // Should show drill options+ H.popover().within(() => {+ cy.findByText("See these Orders").should("exist");+ });++ H.popover().findByText("See these Orders").click();++ // Should filter to specific dimension and show table+ cy.findByTestId("filter-pill").should(+ "have.text",+ "Created At: Year is Jan 1 – Dec 31, 2026",+ );++ // Verify we're viewing a table with results+ H.tableInteractiveBody().contains("97.44").should("exist");+ });++ describe("multi-series", () => {+ const breakoutQuery = {+ type: "query",+ database: SAMPLE_DB_ID,+ query: {+ "source-table": ORDERS_ID,+ aggregation: [["count"]],+ breakout: [+ ["field", ORDERS.CREATED_AT, { "temporal-unit": "year" }],+ [+ "field",+ ORDERS.TOTAL,+ { binning: { strategy: "num-bins", "num-bins": 50 } },+ ],+ ["field", PRODUCTS.CATEGORY, { "source-field": ORDERS.PRODUCT_ID }],+ ],+ },+ };++ const twoMetricsQuery = {+ type: "query",+ database: SAMPLE_DB_ID,+ query: {+ "source-table": ORDERS_ID,+ aggregation: [["count"], ["sum", ["field", ORDERS.QUANTITY, null]]],+ breakout: [+ ["field", ORDERS.CREATED_AT, { "temporal-unit": "year" }],+ [+ "field",+ ORDERS.TOTAL,+ { binning: { strategy: "num-bins", "num-bins": 50 } },+ ],+ ],+ },+ };++ it("should render boxplot with breakout (two dimensions, one metric)", () => {+ H.visitQuestionAdhoc({+ dataset_query: breakoutQuery,+ display: "boxplot",+ });++ // Select dimensions via UI+ H.openVizSettingsSidebar();+ H.leftSidebar().findByText("Data").click();++ // Configure dimensions+ H.leftSidebar().findAllByPlaceholderText("Select a field").eq(0).click();+ H.popover().findByText("Created At: Year").click();+ H.leftSidebar().findByText("Add series breakout").click();+ H.popover().findByText("Product → Category").click();++ // Configure metrics+ H.leftSidebar().findAllByPlaceholderText("Select a field").eq(2).click();+ H.popover().findByText("Count").click();++ // Should have legend items for each category+ cy.findAllByTestId("legend-item").should("have.length", 4);+ cy.findAllByTestId("legend-item").should("contain", "Doohickey");+ cy.findAllByTestId("legend-item").should("contain", "Gadget");+ cy.findAllByTestId("legend-item").should("contain", "Gizmo");+ cy.findAllByTestId("legend-item").should("contain", "Widget");++ // Should have 5 boxes per category (5 years × 4 categories = 20 boxes)+ H.BoxPlot.getBoxes().should("have.length", 20);++ // Hover over a box and verify tooltip shows breakout value+ H.BoxPlot.getBoxes().first().trigger("mousemove", "left");+ H.assertEChartsTooltip({+ header: "2022",+ rows: [+ { name: "Product → Category", value: "Gadget" },+ { name: "Upper whisker", value: "25" },+ { name: "Q3 (75th percentile)", value: "18.25" },+ { name: "Median", value: "12" },+ { name: "Mean", value: "12.44" },+ { name: "Q1 (25th percentile)", value: "6.5" },+ { name: "Lower whisker", value: "1" },+ ],+ });++ // Hide first series (Doohickey)+ cy.findAllByTestId("legend-item")+ .eq(0)+ .findByLabelText("Hide series")+ .click();+ H.BoxPlot.getBoxes().should("have.length", 15);++ // Show it back+ cy.findAllByTestId("legend-item")+ .eq(0)+ .findByLabelText("Show series")+ .click();+ // Move mouse away to reset focus/blur state+ H.echartsContainer().realHover({ position: "top" });+ H.BoxPlot.getBoxes().should("have.length", 20);++ // Verify drill-through includes both dimension and breakout filters+ H.BoxPlot.getBoxes().first().click("left");+ H.popover().findByText("See these Orders").click();++ cy.findAllByTestId("filter-pill").should("have.length", 2);+ cy.findAllByTestId("filter-pill")+ .eq(0)+ .should("have.text", "Created At: Year is Jan 1 – Dec 31, 2022");+ cy.findAllByTestId("filter-pill")+ .eq(1)+ .should("have.text", "Product → Category is Doohickey");++ H.tableInteractiveBody().should("exist");+ });++ it("should render boxplot with two metrics", () => {+ H.visitQuestionAdhoc({+ dataset_query: twoMetricsQuery,+ display: "boxplot",+ });++ // Select via UI+ H.openVizSettingsSidebar();+ H.leftSidebar().findByText("Data").click();++ // Configure dimension+ H.leftSidebar().findAllByPlaceholderText("Select a field").eq(0).click();+ H.popover().findByText("Created At: Year").click();++ // Should have legend items for each metric+ cy.findAllByTestId("legend-item").should("have.length", 2);+ cy.findAllByTestId("legend-item").should("contain", "Count");+ cy.findAllByTestId("legend-item").should("contain", "Sum of Quantity");++ // Should have 5 boxes per metric (5 years × 2 metrics = 10 boxes)+ H.BoxPlot.getBoxes().should("have.length", 10);++ // Hover over a box from the first metric and verify tooltip+ H.BoxPlot.getBoxes().first().trigger("mousemove", "left");+ H.assertEChartsTooltip({+ header: "2022",+ rows: [+ { name: "Upper whisker", value: "84" },+ { name: "Q3 (75th percentile)", value: "59" },+ { name: "Median", value: "35" },+ { name: "Mean", value: "39.16" },+ { name: "Q1 (25th percentile)", value: "15.5" },+ { name: "Lower whisker", value: "1" },+ ],+ });++ // Hide first series (Count)+ cy.findAllByTestId("legend-item")+ .eq(0)+ .findByLabelText("Hide series")+ .click();+ H.BoxPlot.getBoxes().should("have.length", 5);++ // Show it back+ cy.findAllByTestId("legend-item")+ .eq(0)+ .findByLabelText("Show series")+ .click();+ // Move mouse away to reset focus/blur state+ H.echartsContainer().realHover({ position: "top" });+ H.BoxPlot.getBoxes().should("have.length", 10);++ // Verify drill-through applies dimension filter+ H.BoxPlot.getBoxes().first().click("left");+ H.popover().findByText("See these Orders").click();++ cy.findByTestId("filter-pill").should(+ "have.text",+ "Created At: Year is Jan 1 – Dec 31, 2022",+ );++ H.tableInteractiveBody().should("exist");+ });+ });++ it("should support value formatting, axis settings, and series customization", () => {+ // Use Products table: Average of Price by Category and Created at (year)+ const priceByYearQuery = {+ type: "query",+ database: SAMPLE_DB_ID,+ query: {+ "source-table": PRODUCTS_ID,+ aggregation: [["avg", ["field", PRODUCTS.PRICE, null]]],+ breakout: [+ ["field", PRODUCTS.CREATED_AT, { "temporal-unit": "year" }],+ ["field", PRODUCTS.CATEGORY, null],+ ],+ },+ };++ H.visitQuestionAdhoc({+ dataset_query: priceByYearQuery,+ display: "boxplot",+ visualization_settings: {+ "graph.dimensions": ["CREATED_AT"],+ "graph.metrics": ["avg"],+ "graph.show_values": true,+ },+ });++ H.BoxPlot.getBoxes().should("have.length", 4);++ // Set currency formatting via UI using series settings+ H.openVizSettingsSidebar();+ H.openSeriesSettings("Average of Price");+ H.popover().within(() => {+ cy.findByText("Formatting").click();+ cy.findByLabelText("Style").click();+ cy.findByText("Currency").click();+ });++ // Verify formatted value appears in labels (should have $ prefix)+ H.echartsContainer().findByText("$52.13").should("be.visible");+ cy.button("Done").click();++ // Verify formatted tooltip with all currency values+ H.BoxPlot.getBoxes().first().trigger("mousemove", "left");+ H.assertEChartsTooltip({+ header: "2022",+ rows: [+ { name: "Upper whisker", value: "$53.93" },+ { name: "Q3 (75th percentile)", value: "$53.93" },+ { name: "Median", value: "$52.13" },+ { name: "Mean", value: "$52.94" },+ { name: "Q1 (25th percentile)", value: "$51.13" },+ { name: "Lower whisker", value: "$48.62" },+ ],+ });++ H.openVizSettingsSidebar();+ H.leftSidebar().findByText("Axes").click();++ // Default: pinned to zero, y-axis should include 0+ H.echartsContainer().findByText("$0").should("be.visible");+ H.leftSidebar().findByText("Unpin from zero").click();++ // After unpinning, 0 should not be visible (y-axis starts higher since prices are ~$40-80)+ H.echartsContainer().findByText("$0").should("not.exist");+ });+});diff --git a/enterprise/frontend/src/metabase-enterprise/ai-entity-analysis/utils.ts b/enterprise/frontend/src/metabase-enterprise/ai-entity-analysis/utils.tsindex fea5149a12a..90a3b4cd8de 100644--- a/enterprise/frontend/src/metabase-enterprise/ai-entity-analysis/utils.ts+++ b/enterprise/frontend/src/metabase-enterprise/ai-entity-analysis/utils.ts@@ -4,6 +4,7 @@ const CHART_ANALYSIS_ENABLED = {// enabledarea: true,bar: true,+ boxplot: true,combo: true,funnel: true,gauge: true,@@ -44,6 +45,7 @@ type EnabledChartTypes = {export const CHART_ANALYSIS_RENDER_FORMATS = {area: "svg",bar: "svg",+ boxplot: "svg",combo: "svg",funnel: "png",gauge: "svg",diff --git a/frontend/src/metabase-types/api/card.ts b/frontend/src/metabase-types/api/card.tsindex 4bc7e96b814..1be0f5a6caa 100644--- a/frontend/src/metabase-types/api/card.ts+++ b/frontend/src/metabase-types/api/card.ts@@ -226,6 +226,10 @@ export type StackValuesDisplay = "total" | "all" | "series";export const numericScale = ["linear", "pow", "log"] as const;export type NumericScale = (typeof numericScale)[number];+export type BoxPlotWhiskerType = "tukey" | "min-max";+export type BoxPlotPointsMode = "none" | "outliers" | "all";+export type BoxPlotShowValuesMode = "median" | "all";+export type XAxisScale = "ordinal" | "histogram" | "timeseries" | NumericScale;export type YAxisScale = NumericScale;@@ -341,6 +345,12 @@ export type VisualizationSettings = {"sankey.show_edge_labels"?: boolean;"sankey.label_value_formatting"?: "auto" | "full" | "compact";+ // BoxPlot settings+ "boxplot.whisker_type"?: BoxPlotWhiskerType;+ "boxplot.points_mode"?: BoxPlotPointsMode;+ "boxplot.show_mean"?: boolean;+ "boxplot.show_values_mode"?: BoxPlotShowValuesMode;+// List view settings"list.columns"?: ListViewColumns; // set of columns selected for custom list view"list.entity_icon_enabled"?: boolean; // display/hide first list item column rendering image/icondiff --git a/frontend/src/metabase-types/api/visualization.ts b/frontend/src/metabase-types/api/visualization.tsindex d25a454398f..4820f0d43d9 100644--- a/frontend/src/metabase-types/api/visualization.ts+++ b/frontend/src/metabase-types/api/visualization.ts@@ -32,6 +32,7 @@ export const cardDisplayTypes = ["object","map","scatter",+ "boxplot","waterfall","sankey","list",diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.stories.tsx b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.stories.tsxnew file mode 100644index 00000000000..f1ed5db2c8a--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.stories.tsx@@ -0,0 +1,204 @@+import type { StoryFn } from "@storybook/react";++import { color } from "metabase/lib/colors";+import {+ measureTextHeight,+ measureTextWidth,+} from "metabase/static-viz/lib/text";+import { DEFAULT_VISUALIZATION_THEME } from "metabase/visualizations/shared/utils/theme";+import type { RenderingContext } from "metabase/visualizations/types";++import type { StaticChartProps } from "../StaticVisualization";+import { StaticVisualization } from "../StaticVisualization";++import { data } from "./stories-data";++export default {+ title: "Viz/Static Viz/BoxPlotChart",+ component: StaticVisualization,+};++const Template: StoryFn<StaticChartProps> = (args) => {+ return (+ <div style={{ border: "1px solid black", display: "inline-block" }}>+ <StaticVisualization {...args} isStorybook />+ </div>+ );+};++const renderingContext: RenderingContext = {+ getColor: color,+ measureText: (text, style) =>+ measureTextWidth(text, Number(style.size), Number(style.weight)),+ measureTextHeight: (_, style) => measureTextHeight(Number(style.size)),+ fontFamily: "Lato",+ theme: DEFAULT_VISUALIZATION_THEME,+};++export const SingleCategory = {+ render: Template,+ args: {+ rawSeries: data.singleCategory as any,+ renderingContext,+ },+};++export const ManyCategories = {+ render: Template,+ args: {+ rawSeries: data.manyCategories as any,+ renderingContext,+ },+};++export const LabelOverflow = {+ render: Template,+ args: {+ rawSeries: data.labelOverflow as any,+ renderingContext,+ },+};++export const OutlierOverflow = {+ render: Template,+ args: {+ rawSeries: data.outlierOverflow as any,+ renderingContext,+ },+};++export const PositiveNegativeCrossZeroYAxisAuto = {+ render: Template,+ args: {+ rawSeries: data.positiveNegativeCrossZeroYAxisAuto as any,+ renderingContext,+ },+};++export const TopBottomMixedOutliers = {+ render: Template,+ args: {+ rawSeries: data.topBottomMixedOutliers as any,+ renderingContext,+ },+};++export const ScaleExtremes = {+ render: Template,+ args: {+ rawSeries: data.scaleExtremes as any,+ renderingContext,+ },+};++export const DistributionShapes = {+ render: Template,+ args: {+ rawSeries: data.distributionShapes as any,+ renderingContext,+ },+};++export const LogScale = {+ render: Template,+ args: {+ rawSeries: data.logScale as any,+ renderingContext,+ },+};++export const LogScaleEdgeCases = {+ render: Template,+ args: {+ rawSeries: data.logScaleEdgeCases as any,+ renderingContext,+ },+};++export const LabelFormatting = {+ render: Template,+ args: {+ rawSeries: data.labelFormatting as any,+ renderingContext,+ },+};++export const MinMaxNoOutliers = {+ render: Template,+ args: {+ rawSeries: data.minMaxNoOutliers as any,+ renderingContext,+ },+};++export const PowScale = {+ render: Template,+ args: {+ rawSeries: data.powScale as any,+ renderingContext,+ },+};++export const MediumDenseTemporalData = {+ render: Template,+ args: {+ rawSeries: data.mediumDenseTemporalData as any,+ renderingContext,+ },+};++export const DenseTemporalData = {+ render: Template,+ args: {+ rawSeries: data.denseTemporalData as any,+ renderingContext,+ },+};++export const NumericDimensionTukey = {+ render: Template,+ args: {+ rawSeries: data.numericDimensionTukey as any,+ renderingContext,+ },+};++export const NumericDimensionMinMax = {+ render: Template,+ args: {+ rawSeries: data.numericDimensionMinMax as any,+ renderingContext,+ },+};++export const NumericMinMaxAllPoints = {+ render: Template,+ args: {+ rawSeries: data.numericMinMaxAllPoints as any,+ renderingContext,+ },+};++export const BoxPlotCustomization = {+ render: Template,+ args: {+ rawSeries: data.boxPlotCustomization as any,+ renderingContext,+ },+};++export const MultiSeriesBreakoutWithHiddenSortFormatting = {+ render: Template,+ args: {+ rawSeries: data.multiSeriesBreakoutWithHiddenSortFormatting as any,+ renderingContext,+ },+};++export const MultiSeriesTwoMetricsWithAxisSplitFormatting = {+ render: Template,+ args: {+ rawSeries: data.multiSeriesTwoMetricsWithAxisSplitFormatting as any,+ renderingContext,+ },+};diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.tsx b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.tsxnew file mode 100644index 00000000000..d698f59c647--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/BoxPlotChart.tsx@@ -0,0 +1,104 @@+import { Group } from "@visx/group";+import { init } from "echarts/core";++import type { StaticChartProps } from "metabase/static-viz/components/StaticVisualization";+import { sanitizeSvgForBatik } from "metabase/static-viz/lib/svg";+import { registerEChartsModules } from "metabase/visualizations/echarts";+import {+ getBoxPlotLayoutModel,+ getBoxPlotModel,+ getBoxPlotOption,+} from "metabase/visualizations/echarts/boxplot";+import { getChartMeasurements } from "metabase/visualizations/echarts/cartesian/chart-measurements";+import { getLegendItems } from "metabase/visualizations/echarts/cartesian/model/legend";++import Watermark from "../../watermark.svg?component";+import { Legend } from "../Legend";+import { calculateLegendRows } from "../Legend/utils";++registerEChartsModules();++const WIDTH = 540;+const HEIGHT = 360;+const LEGEND_PADDING = 8;++export function BoxPlotChart({+ rawSeries,+ settings,+ renderingContext,+ width = WIDTH,+ height = HEIGHT,+ isStorybook = false,+ hasDevWatermark = false,+}: StaticChartProps) {+ const chartModel = getBoxPlotModel(rawSeries, settings);++ const legendItems = getLegendItems(chartModel.seriesModels);+ const isReversed = settings["legend.is_reversed"];+ const { height: legendHeight, items: legendLayoutItems } =+ calculateLegendRows({+ items: legendItems,+ width,+ horizontalPadding: LEGEND_PADDING,+ verticalPadding: LEGEND_PADDING,+ isReversed,+ });++ const chartHeight = height - legendHeight;+ const chart = init(null, null, {+ renderer: "svg",+ ssr: true,+ width,+ height: chartHeight,+ });++ const chartMeasurements = getChartMeasurements(+ { ...chartModel, dataset: chartModel.boxDataset },+ settings,+ false,+ width,+ chartHeight,+ renderingContext,+ );++ const layoutModel = getBoxPlotLayoutModel({+ chartModel,+ chartMeasurements,+ settings,+ chartWidth: width,+ renderingContext,+ });++ const option = getBoxPlotOption(+ chartModel,+ layoutModel,+ null,+ [],+ settings,+ false,+ renderingContext,+ );+ chart.setOption(option);++ const chartSvg = sanitizeSvgForBatik(chart.renderToSVGString(), isStorybook);++ return (+ <svg xmlns="http://www.w3.org/2000/svg" width={width} height={height}>+ <Legend items={legendLayoutItems} />+ <Group top={legendHeight}>+ <g dangerouslySetInnerHTML={{ __html: chartSvg }}></g>+ </Group>+ {hasDevWatermark && (+ <Watermark+ x="0"+ y="0"+ height={height}+ width={width}+ preserveAspectRatio="xMinYMin slice"+ fill={renderingContext.getColor("text-secondary")}+ opacity={0.2}+ />+ )}+ </svg>+ );+}diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/index.ts b/frontend/src/metabase/static-viz/components/BoxPlotChart/index.tsnew file mode 100644index 00000000000..62fef002bee--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/index.ts@@ -0,0 +1 @@+export { BoxPlotChart } from "./BoxPlotChart";diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/box-plot-customization.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/box-plot-customization.jsonnew file mode 100644index 00000000000..62aa6961267--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/box-plot-customization.json@@ -0,0 +1,269 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "column_settings": {+ "[\"name\",\"CREATED_AT\"]": {+ "date_style": "MMMM D, YYYY"+ },+ "[\"name\",\"count\"]": {+ "number_style": "currency",+ "number_separators": ",.",+ "currency_style": "code",+ "decimals": 2,+ "scale": 4,+ "prefix": "((((",+ "suffix": "))))"+ }+ },+ "series_settings": {+ "count": {+ "color": "#F7C41F",+ "title": "",+ "axis": "right"+ }+ },+ "boxplot.points_mode": "all",+ "boxplot.whisker_type": "tukey",+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "graph.y_axis.title_text": "___Count___",+ "graph.y_axis.split_number": 20,+ "graph.x_axis.title_text": "___Created At: Year___",+ "graph.x_axis.axis_enabled": "rotate-45",+ "graph.y_axis.auto_range": false,+ "graph.y_axis.max": 1999,+ "graph.y_axis.min": -400,+ "graph.show_goal": true,+ "graph.goal_value": -300+ }+ },+ "data": {+ "rows": [+ ["2022-01-01T00:00:00Z", 0, 6],+ ["2022-01-01T00:00:00Z", 20, 212],+ ["2022-01-01T00:00:00Z", 40, 242],+ ["2022-01-01T00:00:00Z", 60, 95],+ ["2022-01-01T00:00:00Z", 80, 184],+ ["2022-01-01T00:00:00Z", 100, 5],+ ["2023-01-01T00:00:00Z", -60, 1],+ ["2023-01-01T00:00:00Z", 0, 37],+ ["2023-01-01T00:00:00Z", 20, 1014],+ ["2023-01-01T00:00:00Z", 40, 1104],+ ["2023-01-01T00:00:00Z", 60, 649],+ ["2023-01-01T00:00:00Z", 80, 751],+ ["2023-01-01T00:00:00Z", 100, 54],+ ["2024-01-01T00:00:00Z", 0, 5],+ ["2024-01-01T00:00:00Z", 20, 377],+ ["2024-01-01T00:00:00Z", 40, 1155],+ ["2024-01-01T00:00:00Z", 60, 1331],+ ["2024-01-01T00:00:00Z", 80, 662],+ ["2024-01-01T00:00:00Z", 100, 963],+ ["2024-01-01T00:00:00Z", 120, 992],+ ["2024-01-01T00:00:00Z", 140, 349],+ ["2025-01-01T00:00:00Z", 0, 3],+ ["2025-01-01T00:00:00Z", 20, 449],+ ["2025-01-01T00:00:00Z", 40, 1239],+ ["2025-01-01T00:00:00Z", 60, 1495],+ ["2025-01-01T00:00:00Z", 80, 805],+ ["2025-01-01T00:00:00Z", 100, 1062],+ ["2025-01-01T00:00:00Z", 120, 1121],+ ["2025-01-01T00:00:00Z", 140, 404],+ ["2026-01-01T00:00:00Z", 20, 138],+ ["2026-01-01T00:00:00Z", 40, 367],+ ["2026-01-01T00:00:00Z", 60, 437],+ ["2026-01-01T00:00:00Z", 80, 247],+ ["2026-01-01T00:00:00Z", 100, 345],+ ["2026-01-01T00:00:00Z", 120, 343],+ ["2026-01-01T00:00:00Z", 140, 117]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Year",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "year"+ }+ ],+ "source": "breakout",+ "unit": "year",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Year",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "year"+ }+ ],+ "source": "breakout",+ "unit": "year",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 35,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 127.5,+ "q3": 977.5,+ "max": 1495,+ "sd": 451.9696435936364,+ "avg": 521.1111111111111+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/dense-temporal-data.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/dense-temporal-data.jsonnew file mode 100644index 00000000000..ac168bddb41--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/dense-temporal-data.json@@ -0,0 +1,517 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.dimensions": ["CREATED_AT"],+ "graph.metrics": ["count"],+ "graph.series_order_dimension": null,+ "graph.series_order": null,+ "graph.show_values": true,+ "graph.label_value_frequency": "all"+ }+ },+ "data": {+ "rows": [+ ["2022-04-01T00:00:00Z", 40, 1],+ ["2022-05-01T00:00:00Z", 20, 1],+ ["2022-05-01T00:00:00Z", 40, 9],+ ["2022-05-01T00:00:00Z", 60, 2],+ ["2022-05-01T00:00:00Z", 80, 7],+ ["2022-06-01T00:00:00Z", 20, 14],+ ["2022-06-01T00:00:00Z", 40, 9],+ ["2022-06-01T00:00:00Z", 60, 6],+ ["2022-06-01T00:00:00Z", 80, 8],+ ["2022-07-01T00:00:00Z", 20, 15],+ ["2022-07-01T00:00:00Z", 40, 25],+ ["2022-07-01T00:00:00Z", 60, 8],+ ["2022-07-01T00:00:00Z", 80, 16],+ ["2022-08-01T00:00:00Z", 20, 13],+ ["2022-08-01T00:00:00Z", 40, 26],+ ["2022-08-01T00:00:00Z", 60, 10],+ ["2022-08-01T00:00:00Z", 80, 30],+ ["2022-09-01T00:00:00Z", 0, 2],+ ["2022-09-01T00:00:00Z", 20, 24],+ ["2022-09-01T00:00:00Z", 40, 26],+ ["2022-09-01T00:00:00Z", 60, 16],+ ["2022-09-01T00:00:00Z", 80, 24],+ ["2022-10-01T00:00:00Z", 20, 47],+ ["2022-10-01T00:00:00Z", 40, 38],+ ["2022-10-01T00:00:00Z", 60, 17],+ ["2022-10-01T00:00:00Z", 80, 32],+ ["2022-10-01T00:00:00Z", 100, 3],+ ["2022-11-01T00:00:00Z", 20, 49],+ ["2022-11-01T00:00:00Z", 40, 57],+ ["2022-11-01T00:00:00Z", 60, 12],+ ["2022-11-01T00:00:00Z", 80, 30],+ ["2022-11-01T00:00:00Z", 100, 2],+ ["2022-12-01T00:00:00Z", 0, 4],+ ["2022-12-01T00:00:00Z", 20, 49],+ ["2022-12-01T00:00:00Z", 40, 51],+ ["2022-12-01T00:00:00Z", 60, 24],+ ["2022-12-01T00:00:00Z", 80, 37],+ ["2023-01-01T00:00:00Z", 0, 1],+ ["2023-01-01T00:00:00Z", 20, 71],+ ["2023-01-01T00:00:00Z", 40, 64],+ ["2023-01-01T00:00:00Z", 60, 30],+ ["2023-01-01T00:00:00Z", 80, 35],+ ["2023-01-01T00:00:00Z", 100, 4],+ ["2023-02-01T00:00:00Z", 0, 1],+ ["2023-02-01T00:00:00Z", 20, 64],+ ["2023-02-01T00:00:00Z", 40, 71],+ ["2023-02-01T00:00:00Z", 60, 30],+ ["2023-02-01T00:00:00Z", 80, 36],+ ["2023-02-01T00:00:00Z", 100, 4],+ ["2023-03-01T00:00:00Z", 20, 75],+ ["2023-03-01T00:00:00Z", 40, 92],+ ["2023-03-01T00:00:00Z", 60, 40],+ ["2023-03-01T00:00:00Z", 80, 46],+ ["2023-03-01T00:00:00Z", 100, 3],+ ["2023-04-01T00:00:00Z", 0, 3],+ ["2023-04-01T00:00:00Z", 20, 79],+ ["2023-04-01T00:00:00Z", 40, 65],+ ["2023-04-01T00:00:00Z", 60, 38],+ ["2023-04-01T00:00:00Z", 80, 52],+ ["2023-04-01T00:00:00Z", 100, 1],+ ["2023-05-01T00:00:00Z", 0, 1],+ ["2023-05-01T00:00:00Z", 20, 74],+ ["2023-05-01T00:00:00Z", 40, 82],+ ["2023-05-01T00:00:00Z", 60, 42],+ ["2023-05-01T00:00:00Z", 80, 70],+ ["2023-05-01T00:00:00Z", 100, 2],+ ["2023-06-01T00:00:00Z", 0, 1],+ ["2023-06-01T00:00:00Z", 20, 61],+ ["2023-06-01T00:00:00Z", 40, 90],+ ["2023-06-01T00:00:00Z", 60, 46],+ ["2023-06-01T00:00:00Z", 80, 62],+ ["2023-06-01T00:00:00Z", 100, 4],+ ["2023-07-01T00:00:00Z", 0, 5],+ ["2023-07-01T00:00:00Z", 20, 99],+ ["2023-07-01T00:00:00Z", 40, 87],+ ["2023-07-01T00:00:00Z", 60, 57],+ ["2023-07-01T00:00:00Z", 80, 70],+ ["2023-07-01T00:00:00Z", 100, 7],+ ["2023-08-01T00:00:00Z", 0, 8],+ ["2023-08-01T00:00:00Z", 20, 94],+ ["2023-08-01T00:00:00Z", 40, 95],+ ["2023-08-01T00:00:00Z", 60, 62],+ ["2023-08-01T00:00:00Z", 80, 66],+ ["2023-08-01T00:00:00Z", 100, 8],+ ["2023-09-01T00:00:00Z", 0, 4],+ ["2023-09-01T00:00:00Z", 20, 108],+ ["2023-09-01T00:00:00Z", 40, 101],+ ["2023-09-01T00:00:00Z", 60, 66],+ ["2023-09-01T00:00:00Z", 80, 60],+ ["2023-09-01T00:00:00Z", 100, 7],+ ["2023-10-01T00:00:00Z", 0, 5],+ ["2023-10-01T00:00:00Z", 20, 91],+ ["2023-10-01T00:00:00Z", 40, 108],+ ["2023-10-01T00:00:00Z", 60, 64],+ ["2023-10-01T00:00:00Z", 80, 82],+ ["2023-10-01T00:00:00Z", 100, 4],+ ["2023-11-01T00:00:00Z", 0, 4],+ ["2023-11-01T00:00:00Z", 20, 112],+ ["2023-11-01T00:00:00Z", 40, 117],+ ["2023-11-01T00:00:00Z", 60, 66],+ ["2023-11-01T00:00:00Z", 80, 92],+ ["2023-11-01T00:00:00Z", 100, 3],+ ["2023-12-01T00:00:00Z", -60, 1],+ ["2023-12-01T00:00:00Z", 0, 4],+ ["2023-12-01T00:00:00Z", 20, 86],+ ["2023-12-01T00:00:00Z", 40, 132],+ ["2023-12-01T00:00:00Z", 60, 108],+ ["2023-12-01T00:00:00Z", 80, 80],+ ["2023-12-01T00:00:00Z", 100, 7],+ ["2024-01-01T00:00:00Z", 0, 1],+ ["2024-01-01T00:00:00Z", 20, 27],+ ["2024-01-01T00:00:00Z", 40, 105],+ ["2024-01-01T00:00:00Z", 60, 105],+ ["2024-01-01T00:00:00Z", 80, 56],+ ["2024-01-01T00:00:00Z", 100, 70],+ ["2024-01-01T00:00:00Z", 120, 75],+ ["2024-01-01T00:00:00Z", 140, 18],+ ["2024-02-01T00:00:00Z", 0, 1],+ ["2024-02-01T00:00:00Z", 20, 30],+ ["2024-02-01T00:00:00Z", 40, 83],+ ["2024-02-01T00:00:00Z", 60, 87],+ ["2024-02-01T00:00:00Z", 80, 53],+ ["2024-02-01T00:00:00Z", 100, 74],+ ["2024-02-01T00:00:00Z", 120, 59],+ ["2024-02-01T00:00:00Z", 140, 17],+ ["2024-03-01T00:00:00Z", 20, 35],+ ["2024-03-01T00:00:00Z", 40, 86],+ ["2024-03-01T00:00:00Z", 60, 104],+ ["2024-03-01T00:00:00Z", 80, 65],+ ["2024-03-01T00:00:00Z", 100, 58],+ ["2024-03-01T00:00:00Z", 120, 69],+ ["2024-03-01T00:00:00Z", 140, 28],+ ["2024-04-01T00:00:00Z", 0, 1],+ ["2024-04-01T00:00:00Z", 20, 28],+ ["2024-04-01T00:00:00Z", 40, 106],+ ["2024-04-01T00:00:00Z", 60, 96],+ ["2024-04-01T00:00:00Z", 80, 45],+ ["2024-04-01T00:00:00Z", 100, 73],+ ["2024-04-01T00:00:00Z", 120, 72],+ ["2024-04-01T00:00:00Z", 140, 18],+ ["2024-05-01T00:00:00Z", 0, 1],+ ["2024-05-01T00:00:00Z", 20, 25],+ ["2024-05-01T00:00:00Z", 40, 110],+ ["2024-05-01T00:00:00Z", 60, 130],+ ["2024-05-01T00:00:00Z", 80, 45],+ ["2024-05-01T00:00:00Z", 100, 85],+ ["2024-05-01T00:00:00Z", 120, 91],+ ["2024-05-01T00:00:00Z", 140, 33],+ ["2024-06-01T00:00:00Z", 20, 30],+ ["2024-06-01T00:00:00Z", 40, 86],+ ["2024-06-01T00:00:00Z", 60, 98],+ ["2024-06-01T00:00:00Z", 80, 43],+ ["2024-06-01T00:00:00Z", 100, 66],+ ["2024-06-01T00:00:00Z", 120, 86],+ ["2024-06-01T00:00:00Z", 140, 46],+ ["2024-07-01T00:00:00Z", 20, 37],+ ["2024-07-01T00:00:00Z", 40, 116],+ ["2024-07-01T00:00:00Z", 60, 127],+ ["2024-07-01T00:00:00Z", 80, 56],+ ["2024-07-01T00:00:00Z", 100, 78],+ ["2024-07-01T00:00:00Z", 120, 84],+ ["2024-07-01T00:00:00Z", 140, 25],+ ["2024-08-01T00:00:00Z", 20, 30],+ ["2024-08-01T00:00:00Z", 40, 87],+ ["2024-08-01T00:00:00Z", 60, 127],+ ["2024-08-01T00:00:00Z", 80, 63],+ ["2024-08-01T00:00:00Z", 100, 76],+ ["2024-08-01T00:00:00Z", 120, 81],+ ["2024-08-01T00:00:00Z", 140, 37],+ ["2024-09-01T00:00:00Z", 0, 1],+ ["2024-09-01T00:00:00Z", 20, 31],+ ["2024-09-01T00:00:00Z", 40, 100],+ ["2024-09-01T00:00:00Z", 60, 108],+ ["2024-09-01T00:00:00Z", 80, 53],+ ["2024-09-01T00:00:00Z", 100, 92],+ ["2024-09-01T00:00:00Z", 120, 76],+ ["2024-09-01T00:00:00Z", 140, 37],+ ["2024-10-01T00:00:00Z", 20, 33],+ ["2024-10-01T00:00:00Z", 40, 92],+ ["2024-10-01T00:00:00Z", 60, 117],+ ["2024-10-01T00:00:00Z", 80, 68],+ ["2024-10-01T00:00:00Z", 100, 95],+ ["2024-10-01T00:00:00Z", 120, 101],+ ["2024-10-01T00:00:00Z", 140, 27],+ ["2024-11-01T00:00:00Z", 20, 39],+ ["2024-11-01T00:00:00Z", 40, 89],+ ["2024-11-01T00:00:00Z", 60, 113],+ ["2024-11-01T00:00:00Z", 80, 55],+ ["2024-11-01T00:00:00Z", 100, 95],+ ["2024-11-01T00:00:00Z", 120, 98],+ ["2024-11-01T00:00:00Z", 140, 31],+ ["2024-12-01T00:00:00Z", 20, 32],+ ["2024-12-01T00:00:00Z", 40, 95],+ ["2024-12-01T00:00:00Z", 60, 119],+ ["2024-12-01T00:00:00Z", 80, 60],+ ["2024-12-01T00:00:00Z", 100, 101],+ ["2024-12-01T00:00:00Z", 120, 100],+ ["2024-12-01T00:00:00Z", 140, 32],+ ["2025-01-01T00:00:00Z", 20, 37],+ ["2025-01-01T00:00:00Z", 40, 101],+ ["2025-01-01T00:00:00Z", 60, 143],+ ["2025-01-01T00:00:00Z", 80, 70],+ ["2025-01-01T00:00:00Z", 100, 98],+ ["2025-01-01T00:00:00Z", 120, 95],+ ["2025-01-01T00:00:00Z", 140, 40],+ ["2025-02-01T00:00:00Z", 20, 39],+ ["2025-02-01T00:00:00Z", 40, 100],+ ["2025-02-01T00:00:00Z", 60, 115],+ ["2025-02-01T00:00:00Z", 80, 60],+ ["2025-02-01T00:00:00Z", 100, 84],+ ["2025-02-01T00:00:00Z", 120, 102],+ ["2025-02-01T00:00:00Z", 140, 33],+ ["2025-03-01T00:00:00Z", 20, 29],+ ["2025-03-01T00:00:00Z", 40, 105],+ ["2025-03-01T00:00:00Z", 60, 132],+ ["2025-03-01T00:00:00Z", 80, 66],+ ["2025-03-01T00:00:00Z", 100, 96],+ ["2025-03-01T00:00:00Z", 120, 116],+ ["2025-03-01T00:00:00Z", 140, 29],+ ["2025-04-01T00:00:00Z", 0, 1],+ ["2025-04-01T00:00:00Z", 20, 34],+ ["2025-04-01T00:00:00Z", 40, 97],+ ["2025-04-01T00:00:00Z", 60, 111],+ ["2025-04-01T00:00:00Z", 80, 70],+ ["2025-04-01T00:00:00Z", 100, 88],+ ["2025-04-01T00:00:00Z", 120, 92],+ ["2025-04-01T00:00:00Z", 140, 40],+ ["2025-05-01T00:00:00Z", 20, 53],+ ["2025-05-01T00:00:00Z", 40, 100],+ ["2025-05-01T00:00:00Z", 60, 128],+ ["2025-05-01T00:00:00Z", 80, 79],+ ["2025-05-01T00:00:00Z", 100, 87],+ ["2025-05-01T00:00:00Z", 120, 89],+ ["2025-05-01T00:00:00Z", 140, 25],+ ["2025-06-01T00:00:00Z", 0, 2],+ ["2025-06-01T00:00:00Z", 20, 39],+ ["2025-06-01T00:00:00Z", 40, 91],+ ["2025-06-01T00:00:00Z", 60, 111],+ ["2025-06-01T00:00:00Z", 80, 63],+ ["2025-06-01T00:00:00Z", 100, 86],+ ["2025-06-01T00:00:00Z", 120, 90],+ ["2025-06-01T00:00:00Z", 140, 39],+ ["2025-07-01T00:00:00Z", 20, 46],+ ["2025-07-01T00:00:00Z", 40, 108],+ ["2025-07-01T00:00:00Z", 60, 121],+ ["2025-07-01T00:00:00Z", 80, 66],+ ["2025-07-01T00:00:00Z", 100, 94],+ ["2025-07-01T00:00:00Z", 120, 91],+ ["2025-07-01T00:00:00Z", 140, 30],+ ["2025-08-01T00:00:00Z", 20, 35],+ ["2025-08-01T00:00:00Z", 40, 105],+ ["2025-08-01T00:00:00Z", 60, 127],+ ["2025-08-01T00:00:00Z", 80, 63],+ ["2025-08-01T00:00:00Z", 100, 88],+ ["2025-08-01T00:00:00Z", 120, 108],+ ["2025-08-01T00:00:00Z", 140, 40],+ ["2025-09-01T00:00:00Z", 20, 37],+ ["2025-09-01T00:00:00Z", 40, 100],+ ["2025-09-01T00:00:00Z", 60, 125],+ ["2025-09-01T00:00:00Z", 80, 67],+ ["2025-09-01T00:00:00Z", 100, 82],+ ["2025-09-01T00:00:00Z", 120, 80],+ ["2025-09-01T00:00:00Z", 140, 28],+ ["2025-10-01T00:00:00Z", 20, 34],+ ["2025-10-01T00:00:00Z", 40, 117],+ ["2025-10-01T00:00:00Z", 60, 131],+ ["2025-10-01T00:00:00Z", 80, 57],+ ["2025-10-01T00:00:00Z", 100, 91],+ ["2025-10-01T00:00:00Z", 120, 82],+ ["2025-10-01T00:00:00Z", 140, 28],+ ["2025-11-01T00:00:00Z", 20, 37],+ ["2025-11-01T00:00:00Z", 40, 107],+ ["2025-11-01T00:00:00Z", 60, 121],+ ["2025-11-01T00:00:00Z", 80, 69],+ ["2025-11-01T00:00:00Z", 100, 85],+ ["2025-11-01T00:00:00Z", 120, 81],+ ["2025-11-01T00:00:00Z", 140, 42],+ ["2025-12-01T00:00:00Z", 20, 29],+ ["2025-12-01T00:00:00Z", 40, 108],+ ["2025-12-01T00:00:00Z", 60, 130],+ ["2025-12-01T00:00:00Z", 80, 75],+ ["2025-12-01T00:00:00Z", 100, 83],+ ["2025-12-01T00:00:00Z", 120, 95],+ ["2025-12-01T00:00:00Z", 140, 30],+ ["2026-01-01T00:00:00Z", 20, 34],+ ["2026-01-01T00:00:00Z", 40, 105],+ ["2026-01-01T00:00:00Z", 60, 125],+ ["2026-01-01T00:00:00Z", 80, 64],+ ["2026-01-01T00:00:00Z", 100, 109],+ ["2026-01-01T00:00:00Z", 120, 105],+ ["2026-01-01T00:00:00Z", 140, 38],+ ["2026-02-01T00:00:00Z", 20, 34],+ ["2026-02-01T00:00:00Z", 40, 103],+ ["2026-02-01T00:00:00Z", 60, 130],+ ["2026-02-01T00:00:00Z", 80, 72],+ ["2026-02-01T00:00:00Z", 100, 87],+ ["2026-02-01T00:00:00Z", 120, 84],+ ["2026-02-01T00:00:00Z", 140, 33],+ ["2026-03-01T00:00:00Z", 20, 43],+ ["2026-03-01T00:00:00Z", 40, 102],+ ["2026-03-01T00:00:00Z", 60, 107],+ ["2026-03-01T00:00:00Z", 80, 72],+ ["2026-03-01T00:00:00Z", 100, 87],+ ["2026-03-01T00:00:00Z", 120, 93],+ ["2026-03-01T00:00:00Z", 140, 23],+ ["2026-04-01T00:00:00Z", 20, 27],+ ["2026-04-01T00:00:00Z", 40, 57],+ ["2026-04-01T00:00:00Z", 60, 75],+ ["2026-04-01T00:00:00Z", 80, 39],+ ["2026-04-01T00:00:00Z", 100, 62],+ ["2026-04-01T00:00:00Z", 120, 61],+ ["2026-04-01T00:00:00Z", 140, 23]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 114,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 29.58731445692873,+ "q3": 91.5,+ "max": 143,+ "sd": 37.626906825058086,+ "avg": 60.12820512820513+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/distribution-shapes.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/distribution-shapes.jsonnew file mode 100644index 00000000000..a78450b9448--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/distribution-shapes.json@@ -0,0 +1,135 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": false,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "tukey"+ }+ },+ "data": {+ "rows": [+ ["Symmetric", 10],+ ["Symmetric", 30],+ ["Symmetric", 50],+ ["Symmetric", 70],+ ["Symmetric", 90],+ ["Skewed", 10],+ ["Skewed", 11],+ ["Skewed", 12],+ ["Skewed", 13],+ ["Skewed", 100],+ ["AllNeg", -100],+ ["AllNeg", -80],+ ["AllNeg", -60],+ ["AllNeg", -40],+ ["AllNeg", -20],+ ["WithZero", 0],+ ["WithZero", 0],+ ["WithZero", 50],+ ["WithZero", 100],+ ["WithZero", 100]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 7.25+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 15,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": -100,+ "q1": -11.715728752538098,+ "q3": 61.7157287525381,+ "max": 100,+ "sd": 58.73589416326183,+ "avg": 17.3+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/index.ts b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/index.tsnew file mode 100644index 00000000000..7e365b4e453--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/index.ts@@ -0,0 +1,45 @@+import boxPlotCustomization from "./box-plot-customization.json";+import denseTemporalData from "./dense-temporal-data.json";+import distributionShapes from "./distribution-shapes.json";+import labelFormatting from "./label-formatting.json";+import labelOverflow from "./label-overflow.json";+import logScaleEdgeCases from "./log-scale-edge-cases.json";+import logScale from "./log-scale.json";+import manyCategories from "./many-categories.json";+import mediumDenseTemporalData from "./medium-dense-temporal-data.json";+import minMaxNoOutliers from "./min-max-no-outliers.json";+import multiSeriesBreakoutWithHiddenSortFormatting from "./multi-series-breakout-with-hidden-sort-formatting.json";+import multiSeriesTwoMetricsWithAxisSplitFormatting from "./multi-series-two-metrics-with-axis-split-formatting.json";+import numericDimensionMinMax from "./numeric-dimension-min-max.json";+import numericDimensionTukey from "./numeric-dimension-tukey.json";+import numericMinMaxAllPoints from "./numeric-min-max-all-points.json";+import outlierOverflow from "./outlier-overflow.json";+import positiveNegativeCrossZeroYAxisAuto from "./positive-negative-cross-zero-y-axis-auto.json";+import powScale from "./pow-scale.json";+import scaleExtremes from "./scale-extremes.json";+import singleCategory from "./single-category.json";+import topBottomMixedOutliers from "./top-bottom-mixed-outliers.json";++export const data = {+ boxPlotCustomization,+ denseTemporalData,+ distributionShapes,+ labelFormatting,+ labelOverflow,+ logScale,+ logScaleEdgeCases,+ manyCategories,+ mediumDenseTemporalData,+ minMaxNoOutliers,+ numericDimensionMinMax,+ numericDimensionTukey,+ numericMinMaxAllPoints,+ outlierOverflow,+ positiveNegativeCrossZeroYAxisAuto,+ powScale,+ scaleExtremes,+ singleCategory,+ topBottomMixedOutliers,+ multiSeriesBreakoutWithHiddenSortFormatting,+ multiSeriesTwoMetricsWithAxisSplitFormatting,+};diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/label-formatting.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/label-formatting.jsonnew file mode 100644index 00000000000..39015978c33--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/label-formatting.json@@ -0,0 +1,131 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.y_axis.scale": "linear",+ "boxplot.whisker_type": "tukey",+ "graph.label_value_frequency": "fit",+ "graph.label_value_formatting": "compact",+ "boxplot.show_values_mode": "all",+ "graph.show_values": true,+ "boxplot.points_mode": "outliers",+ "series_settings": {+ "VAL": {+ "color": "#E75454"+ }+ }+ }+ },+ "data": {+ "rows": [+ ["Compact", 1000],+ ["Compact", 10000],+ ["Compact", 100000],+ ["Compact", 500000],+ ["Compact", 1000000],+ ["Overlap", 48],+ ["Overlap", 49],+ ["Overlap", 50],+ ["Overlap", 51],+ ["Overlap", 52]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 2,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 7+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 10,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 48,+ "q1": 50,+ "q3": 100000,+ "max": 1000000,+ "sd": 333414.71610859915,+ "avg": 161125+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/label-overflow.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/label-overflow.jsonnew file mode 100644index 00000000000..a421b4e8b46--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/label-overflow.json@@ -0,0 +1,130 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "series_settings": {+ "VAL": {+ "color": "#689636"+ }+ },+ "boxplot.points_mode": "all",+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "graph.show_goal": false,+ "graph.goal_value": 21,+ "graph.label_value_frequency": "all"+ }+ },+ "data": {+ "rows": [+ ["Median", 10],+ ["Median", 30],+ ["Median", 50],+ ["Median", 70],+ ["Median", 90],+ ["NoPoints", 10],+ ["NoPoints", 30],+ ["NoPoints", 50],+ ["NoPoints", 200],+ ["NoPoints", -50]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 2,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 7+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 7,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": -50,+ "q1": 15,+ "q3": 70,+ "max": 200,+ "sd": 65.39622822966679,+ "avg": 49+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/log-scale-edge-cases.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/log-scale-edge-cases.jsonnew file mode 100644index 00000000000..9a530e6a881--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/log-scale-edge-cases.json@@ -0,0 +1,125 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": false,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "tukey",+ "graph.y_axis.scale": "log"+ }+ },+ "data": {+ "rows": [+ ["NearOne", 0.5],+ ["NearOne", 1],+ ["NearOne", 2],+ ["NearOne", 5],+ ["NearOne", 10],+ ["WithZero", 0],+ ["WithZero", 10],+ ["WithZero", 100],+ ["WithZero", 1000]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 2,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 7.444444444444445+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 8,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 0,+ "q1": 0.875,+ "q3": 47.697505292422925,+ "max": 1000,+ "sd": 329.5316541868339,+ "avg": 125.38888888888889+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/log-scale.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/log-scale.jsonnew file mode 100644index 00000000000..24705a16927--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/log-scale.json@@ -0,0 +1,136 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": false,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "tukey",+ "graph.y_axis.scale": "log"+ }+ },+ "data": {+ "rows": [+ ["Orders", 1],+ ["Orders", 10],+ ["Orders", 100],+ ["Orders", 1000],+ ["Orders", 10000],+ ["Close", 100],+ ["Close", 110],+ ["Close", 120],+ ["Close", 130],+ ["Close", 140],+ ["Fraction", 0.01],+ ["Fraction", 0.1],+ ["Fraction", 0.5],+ ["Fraction", 1],+ ["Fraction", 10],+ ["WithOutlier", 100],+ ["WithOutlier", 120],+ ["WithOutlier", 140],+ ["WithOutlier", 160],+ ["WithOutlier", 10000]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 7.5+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 13,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 0.01,+ "q1": 5.5,+ "q3": 140,+ "max": 10000,+ "sd": 3047.139446133693,+ "avg": 1112.1305+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/many-categories.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/many-categories.jsonnew file mode 100644index 00000000000..ebba2759bf3--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/many-categories.json@@ -0,0 +1,144 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.label_value_frequency": "fit",+ "graph.goal_value": 21,+ "graph.show_goal": true,+ "boxplot.show_values_mode": "all",+ "graph.show_values": true,+ "boxplot.points_mode": "all",+ "series_settings": {+ "VAL": {+ "color": "#51528D"+ }+ }+ }+ },+ "data": {+ "rows": [+ ["Category Alpha", 10],+ ["Category Alpha", 30],+ ["Category Alpha", 50],+ ["Category Beta", 15],+ ["Category Beta", 35],+ ["Category Beta", 55],+ ["Category Gamma", 12],+ ["Category Gamma", 32],+ ["Category Gamma", 52],+ ["Category Delta", 18],+ ["Category Delta", 38],+ ["Category Delta", 58],+ ["Category Epsilon", 11],+ ["Category Epsilon", 31],+ ["Category Epsilon", 51],+ ["Category Zeta", 16],+ ["Category Zeta", 36],+ ["Category Zeta", 56],+ ["Category Eta", 13],+ ["Category Eta", 33],+ ["Category Eta", 53],+ ["Category Theta", 19],+ ["Category Theta", 39],+ ["Category Theta", 59]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 8,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 13.75+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 24,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 10,+ "q1": 17,+ "q3": 51.5,+ "max": 59,+ "sd": 16.973764922732197,+ "avg": 34.25+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/medium-dense-temporal-data.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/medium-dense-temporal-data.jsonnew file mode 100644index 00000000000..1ac6d03e5cc--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/medium-dense-temporal-data.json@@ -0,0 +1,349 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.dimensions": ["CREATED_AT"],+ "graph.metrics": ["count"],+ "graph.series_order_dimension": null,+ "graph.series_order": null,+ "graph.show_values": true,+ "graph.label_value_frequency": "all"+ }+ },+ "data": {+ "rows": [+ ["2024-05-01T00:00:00Z", 0, 1],+ ["2024-05-01T00:00:00Z", 20, 25],+ ["2024-05-01T00:00:00Z", 40, 110],+ ["2024-05-01T00:00:00Z", 60, 130],+ ["2024-05-01T00:00:00Z", 80, 45],+ ["2024-05-01T00:00:00Z", 100, 85],+ ["2024-05-01T00:00:00Z", 120, 91],+ ["2024-05-01T00:00:00Z", 140, 33],+ ["2024-06-01T00:00:00Z", 20, 30],+ ["2024-06-01T00:00:00Z", 40, 86],+ ["2024-06-01T00:00:00Z", 60, 98],+ ["2024-06-01T00:00:00Z", 80, 43],+ ["2024-06-01T00:00:00Z", 100, 66],+ ["2024-06-01T00:00:00Z", 120, 86],+ ["2024-06-01T00:00:00Z", 140, 46],+ ["2024-07-01T00:00:00Z", 20, 37],+ ["2024-07-01T00:00:00Z", 40, 116],+ ["2024-07-01T00:00:00Z", 60, 127],+ ["2024-07-01T00:00:00Z", 80, 56],+ ["2024-07-01T00:00:00Z", 100, 78],+ ["2024-07-01T00:00:00Z", 120, 84],+ ["2024-07-01T00:00:00Z", 140, 25],+ ["2024-08-01T00:00:00Z", 20, 30],+ ["2024-08-01T00:00:00Z", 40, 87],+ ["2024-08-01T00:00:00Z", 60, 127],+ ["2024-08-01T00:00:00Z", 80, 63],+ ["2024-08-01T00:00:00Z", 100, 76],+ ["2024-08-01T00:00:00Z", 120, 81],+ ["2024-08-01T00:00:00Z", 140, 37],+ ["2024-09-01T00:00:00Z", 0, 1],+ ["2024-09-01T00:00:00Z", 20, 31],+ ["2024-09-01T00:00:00Z", 40, 100],+ ["2024-09-01T00:00:00Z", 60, 108],+ ["2024-09-01T00:00:00Z", 80, 53],+ ["2024-09-01T00:00:00Z", 100, 92],+ ["2024-09-01T00:00:00Z", 120, 76],+ ["2024-09-01T00:00:00Z", 140, 37],+ ["2024-10-01T00:00:00Z", 20, 33],+ ["2024-10-01T00:00:00Z", 40, 92],+ ["2024-10-01T00:00:00Z", 60, 117],+ ["2024-10-01T00:00:00Z", 80, 68],+ ["2024-10-01T00:00:00Z", 100, 95],+ ["2024-10-01T00:00:00Z", 120, 101],+ ["2024-10-01T00:00:00Z", 140, 27],+ ["2024-11-01T00:00:00Z", 20, 39],+ ["2024-11-01T00:00:00Z", 40, 89],+ ["2024-11-01T00:00:00Z", 60, 113],+ ["2024-11-01T00:00:00Z", 80, 55],+ ["2024-11-01T00:00:00Z", 100, 95],+ ["2024-11-01T00:00:00Z", 120, 98],+ ["2024-11-01T00:00:00Z", 140, 31],+ ["2024-12-01T00:00:00Z", 20, 32],+ ["2024-12-01T00:00:00Z", 40, 95],+ ["2024-12-01T00:00:00Z", 60, 119],+ ["2024-12-01T00:00:00Z", 80, 60],+ ["2024-12-01T00:00:00Z", 100, 101],+ ["2024-12-01T00:00:00Z", 120, 100],+ ["2024-12-01T00:00:00Z", 140, 32],+ ["2025-01-01T00:00:00Z", 20, 37],+ ["2025-01-01T00:00:00Z", 40, 101],+ ["2025-01-01T00:00:00Z", 60, 143],+ ["2025-01-01T00:00:00Z", 80, 70],+ ["2025-01-01T00:00:00Z", 100, 98],+ ["2025-01-01T00:00:00Z", 120, 95],+ ["2025-01-01T00:00:00Z", 140, 40],+ ["2025-02-01T00:00:00Z", 20, 39],+ ["2025-02-01T00:00:00Z", 40, 100],+ ["2025-02-01T00:00:00Z", 60, 115],+ ["2025-02-01T00:00:00Z", 80, 60],+ ["2025-02-01T00:00:00Z", 100, 84],+ ["2025-02-01T00:00:00Z", 120, 102],+ ["2025-02-01T00:00:00Z", 140, 33],+ ["2025-03-01T00:00:00Z", 20, 29],+ ["2025-03-01T00:00:00Z", 40, 105],+ ["2025-03-01T00:00:00Z", 60, 132],+ ["2025-03-01T00:00:00Z", 80, 66],+ ["2025-03-01T00:00:00Z", 100, 96],+ ["2025-03-01T00:00:00Z", 120, 116],+ ["2025-03-01T00:00:00Z", 140, 29],+ ["2025-04-01T00:00:00Z", 0, 1],+ ["2025-04-01T00:00:00Z", 20, 34],+ ["2025-04-01T00:00:00Z", 40, 97],+ ["2025-04-01T00:00:00Z", 60, 111],+ ["2025-04-01T00:00:00Z", 80, 70],+ ["2025-04-01T00:00:00Z", 100, 88],+ ["2025-04-01T00:00:00Z", 120, 92],+ ["2025-04-01T00:00:00Z", 140, 40],+ ["2025-05-01T00:00:00Z", 20, 53],+ ["2025-05-01T00:00:00Z", 40, 100],+ ["2025-05-01T00:00:00Z", 60, 128],+ ["2025-05-01T00:00:00Z", 80, 79],+ ["2025-05-01T00:00:00Z", 100, 87],+ ["2025-05-01T00:00:00Z", 120, 89],+ ["2025-05-01T00:00:00Z", 140, 25],+ ["2025-06-01T00:00:00Z", 0, 2],+ ["2025-06-01T00:00:00Z", 20, 39],+ ["2025-06-01T00:00:00Z", 40, 91],+ ["2025-06-01T00:00:00Z", 60, 111],+ ["2025-06-01T00:00:00Z", 80, 63],+ ["2025-06-01T00:00:00Z", 100, 86],+ ["2025-06-01T00:00:00Z", 120, 90],+ ["2025-06-01T00:00:00Z", 140, 39],+ ["2025-07-01T00:00:00Z", 20, 46],+ ["2025-07-01T00:00:00Z", 40, 108],+ ["2025-07-01T00:00:00Z", 60, 121],+ ["2025-07-01T00:00:00Z", 80, 66],+ ["2025-07-01T00:00:00Z", 100, 94],+ ["2025-07-01T00:00:00Z", 120, 91],+ ["2025-07-01T00:00:00Z", 140, 30],+ ["2025-08-01T00:00:00Z", 20, 35],+ ["2025-08-01T00:00:00Z", 40, 105],+ ["2025-08-01T00:00:00Z", 60, 127],+ ["2025-08-01T00:00:00Z", 80, 63],+ ["2025-08-01T00:00:00Z", 100, 88],+ ["2025-08-01T00:00:00Z", 120, 108],+ ["2025-08-01T00:00:00Z", 140, 40],+ ["2025-09-01T00:00:00Z", 20, 37],+ ["2025-09-01T00:00:00Z", 40, 100],+ ["2025-09-01T00:00:00Z", 60, 125],+ ["2025-09-01T00:00:00Z", 80, 67],+ ["2025-09-01T00:00:00Z", 100, 82],+ ["2025-09-01T00:00:00Z", 120, 80],+ ["2025-09-01T00:00:00Z", 140, 28],+ ["2025-10-01T00:00:00Z", 20, 34],+ ["2025-10-01T00:00:00Z", 40, 117],+ ["2025-10-01T00:00:00Z", 60, 131],+ ["2025-10-01T00:00:00Z", 80, 57],+ ["2025-10-01T00:00:00Z", 100, 91],+ ["2025-10-01T00:00:00Z", 120, 82],+ ["2025-10-01T00:00:00Z", 140, 28],+ ["2025-11-01T00:00:00Z", 20, 37],+ ["2025-11-01T00:00:00Z", 40, 107],+ ["2025-11-01T00:00:00Z", 60, 121],+ ["2025-11-01T00:00:00Z", 80, 69],+ ["2025-11-01T00:00:00Z", 100, 85],+ ["2025-11-01T00:00:00Z", 120, 81],+ ["2025-11-01T00:00:00Z", 140, 42],+ ["2025-12-01T00:00:00Z", 20, 29],+ ["2025-12-01T00:00:00Z", 40, 108],+ ["2025-12-01T00:00:00Z", 60, 130],+ ["2025-12-01T00:00:00Z", 80, 75],+ ["2025-12-01T00:00:00Z", 100, 83],+ ["2025-12-01T00:00:00Z", 120, 95],+ ["2025-12-01T00:00:00Z", 140, 30]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 73,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 39.254207844954806,+ "q3": 99.79583152331271,+ "max": 143,+ "sd": 34.090936372875454,+ "avg": 74.07638888888889+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/min-max-no-outliers.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/min-max-no-outliers.jsonnew file mode 100644index 00000000000..620eaa1f778--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/min-max-no-outliers.json@@ -0,0 +1,135 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "min-max"+ }+ },+ "data": {+ "rows": [+ ["None", 40],+ ["None", 45],+ ["None", 50],+ ["None", 55],+ ["None", 60],+ ["High", 40],+ ["High", 45],+ ["High", 50],+ ["High", 55],+ ["High", 150],+ ["Low", -50],+ ["Low", 45],+ ["Low", 50],+ ["Low", 55],+ ["Low", 60],+ ["Both", -30],+ ["Both", 45],+ ["Both", 50],+ ["Both", 55],+ ["Both", 130]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 3.75+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 9,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": -50,+ "q1": 43.66025403784439,+ "q3": 56.33974596215561,+ "max": 150,+ "sd": 41.92725529821986,+ "avg": 50+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/multi-series-breakout-with-hidden-sort-formatting.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/multi-series-breakout-with-hidden-sort-formatting.jsonnew file mode 100644index 00000000000..8c285f6d703--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/multi-series-breakout-with-hidden-sort-formatting.json@@ -0,0 +1,1204 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "series_settings": {+ "Widget": {+ "color": "#227FD2"+ },+ "Gizmo": {+ "color": "#8A5EB0"+ },+ "Gadget": {+ "show_series_values": false,+ "color": "#69C8C8"+ },+ "Doohickey": {+ "axis": "right",+ "show_series_values": false+ }+ },+ "boxplot.show_values_mode": "all",+ "graph.show_values": true,+ "graph.series_order": [+ {+ "key": "Doohickey",+ "color": "#88BF4D",+ "enabled": true,+ "name": "Doohickey"+ },+ {+ "name": "Gadget",+ "enabled": false,+ "color": "#69C8C8",+ "key": "Gadget"+ },+ {+ "key": "Gizmo",+ "color": "#8A5EB0",+ "enabled": true,+ "name": "Gizmo"+ },+ {+ "key": "Widget",+ "color": "#227FD2",+ "enabled": true,+ "name": "Widget"+ }+ ],+ "graph.series_order_dimension": "CATEGORY",+ "graph.metrics": ["count"],+ "graph.dimensions": ["CREATED_AT", "CATEGORY"],+ "column_settings": {+ "[\"name\",\"count\"]": {+ "number_separators": ".,",+ "prefix": "[",+ "suffix": "]"+ }+ },+ "graph.x_axis.title_text": "[Created At: Year]",+ "graph.y_axis.title_text": "[Count]"+ }+ },+ "data": {+ "rows": [+ ["2022-01-01T00:00:00Z", "Doohickey", "AK", 5],+ ["2022-01-01T00:00:00Z", "Doohickey", "AL", 6],+ ["2022-01-01T00:00:00Z", "Doohickey", "AR", 1],+ ["2022-01-01T00:00:00Z", "Doohickey", "CA", 6],+ ["2022-01-01T00:00:00Z", "Doohickey", "CO", 16],+ ["2022-01-01T00:00:00Z", "Doohickey", "CT", 1],+ ["2022-01-01T00:00:00Z", "Doohickey", "FL", 1],+ ["2022-01-01T00:00:00Z", "Doohickey", "GA", 6],+ ["2022-01-01T00:00:00Z", "Doohickey", "IA", 4],+ ["2022-01-01T00:00:00Z", "Doohickey", "ID", 3],+ ["2022-01-01T00:00:00Z", "Doohickey", "IL", 5],+ ["2022-01-01T00:00:00Z", "Doohickey", "IN", 4],+ ["2022-01-01T00:00:00Z", "Doohickey", "KS", 3],+ ["2022-01-01T00:00:00Z", "Doohickey", "KY", 4],+ ["2022-01-01T00:00:00Z", "Doohickey", "LA", 2],+ ["2022-01-01T00:00:00Z", "Doohickey", "MA", 2],+ ["2022-01-01T00:00:00Z", "Doohickey", "MI", 5],+ ["2022-01-01T00:00:00Z", "Doohickey", "MN", 6],+ ["2022-01-01T00:00:00Z", "Doohickey", "MO", 6],+ ["2022-01-01T00:00:00Z", "Doohickey", "MS", 1],+ ["2022-01-01T00:00:00Z", "Doohickey", "MT", 8],+ ["2022-01-01T00:00:00Z", "Doohickey", "NC", 3],+ ["2022-01-01T00:00:00Z", "Doohickey", "ND", 10],+ ["2022-01-01T00:00:00Z", "Doohickey", "NE", 8],+ ["2022-01-01T00:00:00Z", "Doohickey", "NJ", 1],+ ["2022-01-01T00:00:00Z", "Doohickey", "NY", 3],+ ["2022-01-01T00:00:00Z", "Doohickey", "OH", 5],+ ["2022-01-01T00:00:00Z", "Doohickey", "OK", 2],+ ["2022-01-01T00:00:00Z", "Doohickey", "OR", 2],+ ["2022-01-01T00:00:00Z", "Doohickey", "PA", 7],+ ["2022-01-01T00:00:00Z", "Doohickey", "SC", 5],+ ["2022-01-01T00:00:00Z", "Doohickey", "SD", 7],+ ["2022-01-01T00:00:00Z", "Doohickey", "TN", 1],+ ["2022-01-01T00:00:00Z", "Doohickey", "TX", 5],+ ["2022-01-01T00:00:00Z", "Doohickey", "UT", 4],+ ["2022-01-01T00:00:00Z", "Doohickey", "VA", 1],+ ["2022-01-01T00:00:00Z", "Doohickey", "WA", 7],+ ["2022-01-01T00:00:00Z", "Doohickey", "WI", 8],+ ["2022-01-01T00:00:00Z", "Doohickey", "WV", 2],+ ["2022-01-01T00:00:00Z", "Doohickey", "WY", 1],+ ["2022-01-01T00:00:00Z", "Gadget", "AK", 6],+ ["2022-01-01T00:00:00Z", "Gadget", "AL", 2],+ ["2022-01-01T00:00:00Z", "Gadget", "AR", 4],+ ["2022-01-01T00:00:00Z", "Gadget", "CA", 7],+ ["2022-01-01T00:00:00Z", "Gadget", "CO", 13],+ ["2022-01-01T00:00:00Z", "Gadget", "CT", 1],+ ["2022-01-01T00:00:00Z", "Gadget", "DE", 1],+ ["2022-01-01T00:00:00Z", "Gadget", "FL", 2],+ ["2022-01-01T00:00:00Z", "Gadget", "GA", 3],+ ["2022-01-01T00:00:00Z", "Gadget", "IA", 8],+ ["2022-01-01T00:00:00Z", "Gadget", "ID", 5],+ ["2022-01-01T00:00:00Z", "Gadget", "IL", 4],+ ["2022-01-01T00:00:00Z", "Gadget", "IN", 5],+ ["2022-01-01T00:00:00Z", "Gadget", "KS", 3],+ ["2022-01-01T00:00:00Z", "Gadget", "KY", 6],+ ["2022-01-01T00:00:00Z", "Gadget", "LA", 4],+ ["2022-01-01T00:00:00Z", "Gadget", "MA", 1],+ ["2022-01-01T00:00:00Z", "Gadget", "MD", 1],+ ["2022-01-01T00:00:00Z", "Gadget", "ME", 1],+ ["2022-01-01T00:00:00Z", "Gadget", "MI", 8],+ ["2022-01-01T00:00:00Z", "Gadget", "MN", 5],+ ["2022-01-01T00:00:00Z", "Gadget", "MO", 6],+ ["2022-01-01T00:00:00Z", "Gadget", "MS", 5],+ ["2022-01-01T00:00:00Z", "Gadget", "MT", 11],+ ["2022-01-01T00:00:00Z", "Gadget", "NC", 7],+ ["2022-01-01T00:00:00Z", "Gadget", "ND", 7],+ ["2022-01-01T00:00:00Z", "Gadget", "NE", 6],+ ["2022-01-01T00:00:00Z", "Gadget", "NM", 3],+ ["2022-01-01T00:00:00Z", "Gadget", "NV", 2],+ ["2022-01-01T00:00:00Z", "Gadget", "NY", 4],+ ["2022-01-01T00:00:00Z", "Gadget", "OH", 3],+ ["2022-01-01T00:00:00Z", "Gadget", "OK", 1],+ ["2022-01-01T00:00:00Z", "Gadget", "OR", 3],+ ["2022-01-01T00:00:00Z", "Gadget", "PA", 3],+ ["2022-01-01T00:00:00Z", "Gadget", "SC", 3],+ ["2022-01-01T00:00:00Z", "Gadget", "SD", 8],+ ["2022-01-01T00:00:00Z", "Gadget", "TN", 2],+ ["2022-01-01T00:00:00Z", "Gadget", "TX", 14],+ ["2022-01-01T00:00:00Z", "Gadget", "VA", 2],+ ["2022-01-01T00:00:00Z", "Gadget", "WA", 5],+ ["2022-01-01T00:00:00Z", "Gadget", "WI", 4],+ ["2022-01-01T00:00:00Z", "Gadget", "WV", 7],+ ["2022-01-01T00:00:00Z", "Gadget", "WY", 3],+ ["2022-01-01T00:00:00Z", "Gizmo", "AK", 6],+ ["2022-01-01T00:00:00Z", "Gizmo", "AL", 4],+ ["2022-01-01T00:00:00Z", "Gizmo", "AR", 5],+ ["2022-01-01T00:00:00Z", "Gizmo", "CA", 7],+ ["2022-01-01T00:00:00Z", "Gizmo", "CO", 3],+ ["2022-01-01T00:00:00Z", "Gizmo", "CT", 1],+ ["2022-01-01T00:00:00Z", "Gizmo", "FL", 2],+ ["2022-01-01T00:00:00Z", "Gizmo", "GA", 3],+ ["2022-01-01T00:00:00Z", "Gizmo", "IA", 7],+ ["2022-01-01T00:00:00Z", "Gizmo", "ID", 1],+ ["2022-01-01T00:00:00Z", "Gizmo", "IL", 6],+ ["2022-01-01T00:00:00Z", "Gizmo", "IN", 6],+ ["2022-01-01T00:00:00Z", "Gizmo", "KS", 2],+ ["2022-01-01T00:00:00Z", "Gizmo", "KY", 3],+ ["2022-01-01T00:00:00Z", "Gizmo", "LA", 4],+ ["2022-01-01T00:00:00Z", "Gizmo", "MA", 1],+ ["2022-01-01T00:00:00Z", "Gizmo", "MD", 1],+ ["2022-01-01T00:00:00Z", "Gizmo", "MI", 2],+ ["2022-01-01T00:00:00Z", "Gizmo", "MN", 7],+ ["2022-01-01T00:00:00Z", "Gizmo", "MO", 4],+ ["2022-01-01T00:00:00Z", "Gizmo", "MS", 2],+ ["2022-01-01T00:00:00Z", "Gizmo", "MT", 9],+ ["2022-01-01T00:00:00Z", "Gizmo", "NC", 2],+ ["2022-01-01T00:00:00Z", "Gizmo", "ND", 9],+ ["2022-01-01T00:00:00Z", "Gizmo", "NE", 6],+ ["2022-01-01T00:00:00Z", "Gizmo", "NJ", 1],+ ["2022-01-01T00:00:00Z", "Gizmo", "NV", 1],+ ["2022-01-01T00:00:00Z", "Gizmo", "NY", 6],+ ["2022-01-01T00:00:00Z", "Gizmo", "OH", 4],+ ["2022-01-01T00:00:00Z", "Gizmo", "OK", 3],+ ["2022-01-01T00:00:00Z", "Gizmo", "OR", 3],+ ["2022-01-01T00:00:00Z", "Gizmo", "PA", 4],+ ["2022-01-01T00:00:00Z", "Gizmo", "SC", 2],+ ["2022-01-01T00:00:00Z", "Gizmo", "SD", 7],+ ["2022-01-01T00:00:00Z", "Gizmo", "TN", 4],+ ["2022-01-01T00:00:00Z", "Gizmo", "TX", 5],+ ["2022-01-01T00:00:00Z", "Gizmo", "VA", 2],+ ["2022-01-01T00:00:00Z", "Gizmo", "VT", 1],+ ["2022-01-01T00:00:00Z", "Gizmo", "WA", 4],+ ["2022-01-01T00:00:00Z", "Gizmo", "WI", 6],+ ["2022-01-01T00:00:00Z", "Gizmo", "WY", 2],+ ["2022-01-01T00:00:00Z", "Widget", "AK", 2],+ ["2022-01-01T00:00:00Z", "Widget", "AL", 6],+ ["2022-01-01T00:00:00Z", "Widget", "AR", 4],+ ["2022-01-01T00:00:00Z", "Widget", "CA", 7],+ ["2022-01-01T00:00:00Z", "Widget", "CO", 7],+ ["2022-01-01T00:00:00Z", "Widget", "DE", 1],+ ["2022-01-01T00:00:00Z", "Widget", "FL", 3],+ ["2022-01-01T00:00:00Z", "Widget", "GA", 3],+ ["2022-01-01T00:00:00Z", "Widget", "IA", 6],+ ["2022-01-01T00:00:00Z", "Widget", "ID", 1],+ ["2022-01-01T00:00:00Z", "Widget", "IL", 5],+ ["2022-01-01T00:00:00Z", "Widget", "IN", 4],+ ["2022-01-01T00:00:00Z", "Widget", "KS", 2],+ ["2022-01-01T00:00:00Z", "Widget", "KY", 8],+ ["2022-01-01T00:00:00Z", "Widget", "LA", 7],+ ["2022-01-01T00:00:00Z", "Widget", "MA", 1],+ ["2022-01-01T00:00:00Z", "Widget", "MD", 1],+ ["2022-01-01T00:00:00Z", "Widget", "ME", 2],+ ["2022-01-01T00:00:00Z", "Widget", "MI", 13],+ ["2022-01-01T00:00:00Z", "Widget", "MN", 4],+ ["2022-01-01T00:00:00Z", "Widget", "MO", 7],+ ["2022-01-01T00:00:00Z", "Widget", "MS", 2],+ ["2022-01-01T00:00:00Z", "Widget", "MT", 12],+ ["2022-01-01T00:00:00Z", "Widget", "NC", 8],+ ["2022-01-01T00:00:00Z", "Widget", "ND", 7],+ ["2022-01-01T00:00:00Z", "Widget", "NE", 9],+ ["2022-01-01T00:00:00Z", "Widget", "NM", 2],+ ["2022-01-01T00:00:00Z", "Widget", "NV", 1],+ ["2022-01-01T00:00:00Z", "Widget", "NY", 4],+ ["2022-01-01T00:00:00Z", "Widget", "OH", 6],+ ["2022-01-01T00:00:00Z", "Widget", "OK", 3],+ ["2022-01-01T00:00:00Z", "Widget", "OR", 5],+ ["2022-01-01T00:00:00Z", "Widget", "PA", 4],+ ["2022-01-01T00:00:00Z", "Widget", "SC", 1],+ ["2022-01-01T00:00:00Z", "Widget", "SD", 5],+ ["2022-01-01T00:00:00Z", "Widget", "TN", 4],+ ["2022-01-01T00:00:00Z", "Widget", "TX", 14],+ ["2022-01-01T00:00:00Z", "Widget", "UT", 2],+ ["2022-01-01T00:00:00Z", "Widget", "VA", 1],+ ["2022-01-01T00:00:00Z", "Widget", "WA", 8],+ ["2022-01-01T00:00:00Z", "Widget", "WI", 11],+ ["2022-01-01T00:00:00Z", "Widget", "WV", 3],+ ["2022-01-01T00:00:00Z", "Widget", "WY", 4],+ ["2023-01-01T00:00:00Z", "Doohickey", "AK", 20],+ ["2023-01-01T00:00:00Z", "Doohickey", "AL", 22],+ ["2023-01-01T00:00:00Z", "Doohickey", "AR", 14],+ ["2023-01-01T00:00:00Z", "Doohickey", "AZ", 2],+ ["2023-01-01T00:00:00Z", "Doohickey", "CA", 26],+ ["2023-01-01T00:00:00Z", "Doohickey", "CO", 32],+ ["2023-01-01T00:00:00Z", "Doohickey", "CT", 2],+ ["2023-01-01T00:00:00Z", "Doohickey", "DE", 1],+ ["2023-01-01T00:00:00Z", "Doohickey", "FL", 12],+ ["2023-01-01T00:00:00Z", "Doohickey", "GA", 26],+ ["2023-01-01T00:00:00Z", "Doohickey", "IA", 24],+ ["2023-01-01T00:00:00Z", "Doohickey", "ID", 4],+ ["2023-01-01T00:00:00Z", "Doohickey", "IL", 23],+ ["2023-01-01T00:00:00Z", "Doohickey", "IN", 21],+ ["2023-01-01T00:00:00Z", "Doohickey", "KS", 19],+ ["2023-01-01T00:00:00Z", "Doohickey", "KY", 21],+ ["2023-01-01T00:00:00Z", "Doohickey", "LA", 11],+ ["2023-01-01T00:00:00Z", "Doohickey", "MA", 2],+ ["2023-01-01T00:00:00Z", "Doohickey", "MD", 7],+ ["2023-01-01T00:00:00Z", "Doohickey", "ME", 6],+ ["2023-01-01T00:00:00Z", "Doohickey", "MI", 18],+ ["2023-01-01T00:00:00Z", "Doohickey", "MN", 27],+ ["2023-01-01T00:00:00Z", "Doohickey", "MO", 23],+ ["2023-01-01T00:00:00Z", "Doohickey", "MS", 13],+ ["2023-01-01T00:00:00Z", "Doohickey", "MT", 43],+ ["2023-01-01T00:00:00Z", "Doohickey", "NC", 21],+ ["2023-01-01T00:00:00Z", "Doohickey", "ND", 20],+ ["2023-01-01T00:00:00Z", "Doohickey", "NE", 25],+ ["2023-01-01T00:00:00Z", "Doohickey", "NJ", 4],+ ["2023-01-01T00:00:00Z", "Doohickey", "NM", 12],+ ["2023-01-01T00:00:00Z", "Doohickey", "NV", 3],+ ["2023-01-01T00:00:00Z", "Doohickey", "NY", 29],+ ["2023-01-01T00:00:00Z", "Doohickey", "OH", 21],+ ["2023-01-01T00:00:00Z", "Doohickey", "OK", 10],+ ["2023-01-01T00:00:00Z", "Doohickey", "OR", 12],+ ["2023-01-01T00:00:00Z", "Doohickey", "PA", 20],+ ["2023-01-01T00:00:00Z", "Doohickey", "SC", 19],+ ["2023-01-01T00:00:00Z", "Doohickey", "SD", 26],+ ["2023-01-01T00:00:00Z", "Doohickey", "TN", 11],+ ["2023-01-01T00:00:00Z", "Doohickey", "TX", 61],+ ["2023-01-01T00:00:00Z", "Doohickey", "UT", 3],+ ["2023-01-01T00:00:00Z", "Doohickey", "VA", 11],+ ["2023-01-01T00:00:00Z", "Doohickey", "VT", 5],+ ["2023-01-01T00:00:00Z", "Doohickey", "WA", 20],+ ["2023-01-01T00:00:00Z", "Doohickey", "WI", 31],+ ["2023-01-01T00:00:00Z", "Doohickey", "WV", 7],+ ["2023-01-01T00:00:00Z", "Doohickey", "WY", 15],+ ["2023-01-01T00:00:00Z", "Gadget", "AK", 18],+ ["2023-01-01T00:00:00Z", "Gadget", "AL", 28],+ ["2023-01-01T00:00:00Z", "Gadget", "AR", 18],+ ["2023-01-01T00:00:00Z", "Gadget", "AZ", 7],+ ["2023-01-01T00:00:00Z", "Gadget", "CA", 29],+ ["2023-01-01T00:00:00Z", "Gadget", "CO", 35],+ ["2023-01-01T00:00:00Z", "Gadget", "DE", 3],+ ["2023-01-01T00:00:00Z", "Gadget", "FL", 19],+ ["2023-01-01T00:00:00Z", "Gadget", "GA", 27],+ ["2023-01-01T00:00:00Z", "Gadget", "IA", 37],+ ["2023-01-01T00:00:00Z", "Gadget", "ID", 5],+ ["2023-01-01T00:00:00Z", "Gadget", "IL", 37],+ ["2023-01-01T00:00:00Z", "Gadget", "IN", 23],+ ["2023-01-01T00:00:00Z", "Gadget", "KS", 22],+ ["2023-01-01T00:00:00Z", "Gadget", "KY", 20],+ ["2023-01-01T00:00:00Z", "Gadget", "LA", 17],+ ["2023-01-01T00:00:00Z", "Gadget", "MA", 4],+ ["2023-01-01T00:00:00Z", "Gadget", "MD", 7],+ ["2023-01-01T00:00:00Z", "Gadget", "ME", 3],+ ["2023-01-01T00:00:00Z", "Gadget", "MI", 15],+ ["2023-01-01T00:00:00Z", "Gadget", "MN", 25],+ ["2023-01-01T00:00:00Z", "Gadget", "MO", 34],+ ["2023-01-01T00:00:00Z", "Gadget", "MS", 14],+ ["2023-01-01T00:00:00Z", "Gadget", "MT", 48],+ ["2023-01-01T00:00:00Z", "Gadget", "NC", 23],+ ["2023-01-01T00:00:00Z", "Gadget", "ND", 30],+ ["2023-01-01T00:00:00Z", "Gadget", "NE", 20],+ ["2023-01-01T00:00:00Z", "Gadget", "NH", 3],+ ["2023-01-01T00:00:00Z", "Gadget", "NJ", 4],+ ["2023-01-01T00:00:00Z", "Gadget", "NM", 8],+ ["2023-01-01T00:00:00Z", "Gadget", "NV", 4],+ ["2023-01-01T00:00:00Z", "Gadget", "NY", 21],+ ["2023-01-01T00:00:00Z", "Gadget", "OH", 17],+ ["2023-01-01T00:00:00Z", "Gadget", "OK", 14],+ ["2023-01-01T00:00:00Z", "Gadget", "OR", 14],+ ["2023-01-01T00:00:00Z", "Gadget", "PA", 22],+ ["2023-01-01T00:00:00Z", "Gadget", "SC", 19],+ ["2023-01-01T00:00:00Z", "Gadget", "SD", 35],+ ["2023-01-01T00:00:00Z", "Gadget", "TN", 22],+ ["2023-01-01T00:00:00Z", "Gadget", "TX", 73],+ ["2023-01-01T00:00:00Z", "Gadget", "UT", 4],+ ["2023-01-01T00:00:00Z", "Gadget", "VA", 18],+ ["2023-01-01T00:00:00Z", "Gadget", "VT", 9],+ ["2023-01-01T00:00:00Z", "Gadget", "WA", 27],+ ["2023-01-01T00:00:00Z", "Gadget", "WI", 28],+ ["2023-01-01T00:00:00Z", "Gadget", "WV", 14],+ ["2023-01-01T00:00:00Z", "Gadget", "WY", 14],+ ["2023-01-01T00:00:00Z", "Gizmo", "AK", 22],+ ["2023-01-01T00:00:00Z", "Gizmo", "AL", 23],+ ["2023-01-01T00:00:00Z", "Gizmo", "AR", 13],+ ["2023-01-01T00:00:00Z", "Gizmo", "AZ", 5],+ ["2023-01-01T00:00:00Z", "Gizmo", "CA", 41],+ ["2023-01-01T00:00:00Z", "Gizmo", "CO", 36],+ ["2023-01-01T00:00:00Z", "Gizmo", "DE", 1],+ ["2023-01-01T00:00:00Z", "Gizmo", "FL", 10],+ ["2023-01-01T00:00:00Z", "Gizmo", "GA", 20],+ ["2023-01-01T00:00:00Z", "Gizmo", "IA", 23],+ ["2023-01-01T00:00:00Z", "Gizmo", "ID", 14],+ ["2023-01-01T00:00:00Z", "Gizmo", "IL", 26],+ ["2023-01-01T00:00:00Z", "Gizmo", "IN", 20],+ ["2023-01-01T00:00:00Z", "Gizmo", "KS", 21],+ ["2023-01-01T00:00:00Z", "Gizmo", "KY", 29],+ ["2023-01-01T00:00:00Z", "Gizmo", "LA", 20],+ ["2023-01-01T00:00:00Z", "Gizmo", "MA", 4],+ ["2023-01-01T00:00:00Z", "Gizmo", "MD", 3],+ ["2023-01-01T00:00:00Z", "Gizmo", "ME", 4],+ ["2023-01-01T00:00:00Z", "Gizmo", "MI", 27],+ ["2023-01-01T00:00:00Z", "Gizmo", "MN", 38],+ ["2023-01-01T00:00:00Z", "Gizmo", "MO", 32],+ ["2023-01-01T00:00:00Z", "Gizmo", "MS", 14],+ ["2023-01-01T00:00:00Z", "Gizmo", "MT", 45],+ ["2023-01-01T00:00:00Z", "Gizmo", "NC", 17],+ ["2023-01-01T00:00:00Z", "Gizmo", "ND", 20],+ ["2023-01-01T00:00:00Z", "Gizmo", "NE", 33],+ ["2023-01-01T00:00:00Z", "Gizmo", "NH", 1],+ ["2023-01-01T00:00:00Z", "Gizmo", "NJ", 4],+ ["2023-01-01T00:00:00Z", "Gizmo", "NM", 9],+ ["2023-01-01T00:00:00Z", "Gizmo", "NV", 2],+ ["2023-01-01T00:00:00Z", "Gizmo", "NY", 24],+ ["2023-01-01T00:00:00Z", "Gizmo", "OH", 18],+ ["2023-01-01T00:00:00Z", "Gizmo", "OK", 13],+ ["2023-01-01T00:00:00Z", "Gizmo", "OR", 22],+ ["2023-01-01T00:00:00Z", "Gizmo", "PA", 11],+ ["2023-01-01T00:00:00Z", "Gizmo", "SC", 16],+ ["2023-01-01T00:00:00Z", "Gizmo", "SD", 19],+ ["2023-01-01T00:00:00Z", "Gizmo", "TN", 20],+ ["2023-01-01T00:00:00Z", "Gizmo", "TX", 47],+ ["2023-01-01T00:00:00Z", "Gizmo", "UT", 5],+ ["2023-01-01T00:00:00Z", "Gizmo", "VA", 15],+ ["2023-01-01T00:00:00Z", "Gizmo", "VT", 5],+ ["2023-01-01T00:00:00Z", "Gizmo", "WA", 20],+ ["2023-01-01T00:00:00Z", "Gizmo", "WI", 31],+ ["2023-01-01T00:00:00Z", "Gizmo", "WV", 10],+ ["2023-01-01T00:00:00Z", "Gizmo", "WY", 11],+ ["2023-01-01T00:00:00Z", "Widget", "AK", 33],+ ["2023-01-01T00:00:00Z", "Widget", "AL", 25],+ ["2023-01-01T00:00:00Z", "Widget", "AR", 14],+ ["2023-01-01T00:00:00Z", "Widget", "AZ", 6],+ ["2023-01-01T00:00:00Z", "Widget", "CA", 44],+ ["2023-01-01T00:00:00Z", "Widget", "CO", 44],+ ["2023-01-01T00:00:00Z", "Widget", "CT", 1],+ ["2023-01-01T00:00:00Z", "Widget", "FL", 23],+ ["2023-01-01T00:00:00Z", "Widget", "GA", 33],+ ["2023-01-01T00:00:00Z", "Widget", "IA", 35],+ ["2023-01-01T00:00:00Z", "Widget", "ID", 12],+ ["2023-01-01T00:00:00Z", "Widget", "IL", 29],+ ["2023-01-01T00:00:00Z", "Widget", "IN", 25],+ ["2023-01-01T00:00:00Z", "Widget", "KS", 21],+ ["2023-01-01T00:00:00Z", "Widget", "KY", 20],+ ["2023-01-01T00:00:00Z", "Widget", "LA", 13],+ ["2023-01-01T00:00:00Z", "Widget", "MA", 4],+ ["2023-01-01T00:00:00Z", "Widget", "MD", 6],+ ["2023-01-01T00:00:00Z", "Widget", "ME", 4],+ ["2023-01-01T00:00:00Z", "Widget", "MI", 27],+ ["2023-01-01T00:00:00Z", "Widget", "MN", 41],+ ["2023-01-01T00:00:00Z", "Widget", "MO", 34],+ ["2023-01-01T00:00:00Z", "Widget", "MS", 19],+ ["2023-01-01T00:00:00Z", "Widget", "MT", 35],+ ["2023-01-01T00:00:00Z", "Widget", "NC", 32],+ ["2023-01-01T00:00:00Z", "Widget", "ND", 23],+ ["2023-01-01T00:00:00Z", "Widget", "NE", 33],+ ["2023-01-01T00:00:00Z", "Widget", "NJ", 7],+ ["2023-01-01T00:00:00Z", "Widget", "NM", 8],+ ["2023-01-01T00:00:00Z", "Widget", "NV", 1],+ ["2023-01-01T00:00:00Z", "Widget", "NY", 30],+ ["2023-01-01T00:00:00Z", "Widget", "OH", 27],+ ["2023-01-01T00:00:00Z", "Widget", "OK", 12],+ ["2023-01-01T00:00:00Z", "Widget", "OR", 20],+ ["2023-01-01T00:00:00Z", "Widget", "PA", 15],+ ["2023-01-01T00:00:00Z", "Widget", "SC", 16],+ ["2023-01-01T00:00:00Z", "Widget", "SD", 22],+ ["2023-01-01T00:00:00Z", "Widget", "TN", 27],+ ["2023-01-01T00:00:00Z", "Widget", "TX", 77],+ ["2023-01-01T00:00:00Z", "Widget", "UT", 5],+ ["2023-01-01T00:00:00Z", "Widget", "VA", 17],+ ["2023-01-01T00:00:00Z", "Widget", "VT", 4],+ ["2023-01-01T00:00:00Z", "Widget", "WA", 12],+ ["2023-01-01T00:00:00Z", "Widget", "WI", 41],+ ["2023-01-01T00:00:00Z", "Widget", "WV", 16],+ ["2023-01-01T00:00:00Z", "Widget", "WY", 10],+ ["2024-01-01T00:00:00Z", "Doohickey", "AK", 31],+ ["2024-01-01T00:00:00Z", "Doohickey", "AL", 35],+ ["2024-01-01T00:00:00Z", "Doohickey", "AR", 21],+ ["2024-01-01T00:00:00Z", "Doohickey", "AZ", 4],+ ["2024-01-01T00:00:00Z", "Doohickey", "CA", 46],+ ["2024-01-01T00:00:00Z", "Doohickey", "CO", 52],+ ["2024-01-01T00:00:00Z", "Doohickey", "CT", 2],+ ["2024-01-01T00:00:00Z", "Doohickey", "DE", 4],+ ["2024-01-01T00:00:00Z", "Doohickey", "FL", 16],+ ["2024-01-01T00:00:00Z", "Doohickey", "GA", 27],+ ["2024-01-01T00:00:00Z", "Doohickey", "IA", 34],+ ["2024-01-01T00:00:00Z", "Doohickey", "ID", 6],+ ["2024-01-01T00:00:00Z", "Doohickey", "IL", 41],+ ["2024-01-01T00:00:00Z", "Doohickey", "IN", 34],+ ["2024-01-01T00:00:00Z", "Doohickey", "KS", 30],+ ["2024-01-01T00:00:00Z", "Doohickey", "KY", 31],+ ["2024-01-01T00:00:00Z", "Doohickey", "LA", 10],+ ["2024-01-01T00:00:00Z", "Doohickey", "MA", 1],+ ["2024-01-01T00:00:00Z", "Doohickey", "MD", 5],+ ["2024-01-01T00:00:00Z", "Doohickey", "ME", 8],+ ["2024-01-01T00:00:00Z", "Doohickey", "MI", 48],+ ["2024-01-01T00:00:00Z", "Doohickey", "MN", 60],+ ["2024-01-01T00:00:00Z", "Doohickey", "MO", 40],+ ["2024-01-01T00:00:00Z", "Doohickey", "MS", 28],+ ["2024-01-01T00:00:00Z", "Doohickey", "MT", 51],+ ["2024-01-01T00:00:00Z", "Doohickey", "NC", 28],+ ["2024-01-01T00:00:00Z", "Doohickey", "ND", 45],+ ["2024-01-01T00:00:00Z", "Doohickey", "NE", 34],+ ["2024-01-01T00:00:00Z", "Doohickey", "NH", 1],+ ["2024-01-01T00:00:00Z", "Doohickey", "NJ", 6],+ ["2024-01-01T00:00:00Z", "Doohickey", "NM", 9],+ ["2024-01-01T00:00:00Z", "Doohickey", "NV", 2],+ ["2024-01-01T00:00:00Z", "Doohickey", "NY", 39],+ ["2024-01-01T00:00:00Z", "Doohickey", "OH", 34],+ ["2024-01-01T00:00:00Z", "Doohickey", "OK", 18],+ ["2024-01-01T00:00:00Z", "Doohickey", "OR", 17],+ ["2024-01-01T00:00:00Z", "Doohickey", "PA", 25],+ ["2024-01-01T00:00:00Z", "Doohickey", "SC", 26],+ ["2024-01-01T00:00:00Z", "Doohickey", "SD", 21],+ ["2024-01-01T00:00:00Z", "Doohickey", "TN", 15],+ ["2024-01-01T00:00:00Z", "Doohickey", "TX", 84],+ ["2024-01-01T00:00:00Z", "Doohickey", "UT", 7],+ ["2024-01-01T00:00:00Z", "Doohickey", "VA", 19],+ ["2024-01-01T00:00:00Z", "Doohickey", "VT", 4],+ ["2024-01-01T00:00:00Z", "Doohickey", "WA", 30],+ ["2024-01-01T00:00:00Z", "Doohickey", "WI", 52],+ ["2024-01-01T00:00:00Z", "Doohickey", "WV", 8],+ ["2024-01-01T00:00:00Z", "Doohickey", "WY", 17],+ ["2024-01-01T00:00:00Z", "Gadget", "AK", 31],+ ["2024-01-01T00:00:00Z", "Gadget", "AL", 37],+ ["2024-01-01T00:00:00Z", "Gadget", "AR", 24],+ ["2024-01-01T00:00:00Z", "Gadget", "AZ", 5],+ ["2024-01-01T00:00:00Z", "Gadget", "CA", 54],+ ["2024-01-01T00:00:00Z", "Gadget", "CO", 60],+ ["2024-01-01T00:00:00Z", "Gadget", "CT", 2],+ ["2024-01-01T00:00:00Z", "Gadget", "DE", 3],+ ["2024-01-01T00:00:00Z", "Gadget", "FL", 28],+ ["2024-01-01T00:00:00Z", "Gadget", "GA", 36],+ ["2024-01-01T00:00:00Z", "Gadget", "IA", 33],+ ["2024-01-01T00:00:00Z", "Gadget", "ID", 20],+ ["2024-01-01T00:00:00Z", "Gadget", "IL", 36],+ ["2024-01-01T00:00:00Z", "Gadget", "IN", 37],+ ["2024-01-01T00:00:00Z", "Gadget", "KS", 40],+ ["2024-01-01T00:00:00Z", "Gadget", "KY", 32],+ ["2024-01-01T00:00:00Z", "Gadget", "LA", 19],+ ["2024-01-01T00:00:00Z", "Gadget", "MA", 11],+ ["2024-01-01T00:00:00Z", "Gadget", "MD", 8],+ ["2024-01-01T00:00:00Z", "Gadget", "ME", 8],+ ["2024-01-01T00:00:00Z", "Gadget", "MI", 58],+ ["2024-01-01T00:00:00Z", "Gadget", "MN", 73],+ ["2024-01-01T00:00:00Z", "Gadget", "MO", 34],+ ["2024-01-01T00:00:00Z", "Gadget", "MS", 23],+ ["2024-01-01T00:00:00Z", "Gadget", "MT", 82],+ ["2024-01-01T00:00:00Z", "Gadget", "NC", 60],+ ["2024-01-01T00:00:00Z", "Gadget", "ND", 40],+ ["2024-01-01T00:00:00Z", "Gadget", "NE", 44],+ ["2024-01-01T00:00:00Z", "Gadget", "NH", 2],+ ["2024-01-01T00:00:00Z", "Gadget", "NJ", 4],+ ["2024-01-01T00:00:00Z", "Gadget", "NM", 16],+ ["2024-01-01T00:00:00Z", "Gadget", "NV", 3],+ ["2024-01-01T00:00:00Z", "Gadget", "NY", 60],+ ["2024-01-01T00:00:00Z", "Gadget", "OH", 37],+ ["2024-01-01T00:00:00Z", "Gadget", "OK", 19],+ ["2024-01-01T00:00:00Z", "Gadget", "OR", 33],+ ["2024-01-01T00:00:00Z", "Gadget", "PA", 35],+ ["2024-01-01T00:00:00Z", "Gadget", "SC", 32],+ ["2024-01-01T00:00:00Z", "Gadget", "SD", 31],+ ["2024-01-01T00:00:00Z", "Gadget", "TN", 30],+ ["2024-01-01T00:00:00Z", "Gadget", "TX", 103],+ ["2024-01-01T00:00:00Z", "Gadget", "UT", 7],+ ["2024-01-01T00:00:00Z", "Gadget", "VA", 25],+ ["2024-01-01T00:00:00Z", "Gadget", "VT", 9],+ ["2024-01-01T00:00:00Z", "Gadget", "WA", 32],+ ["2024-01-01T00:00:00Z", "Gadget", "WI", 57],+ ["2024-01-01T00:00:00Z", "Gadget", "WV", 15],+ ["2024-01-01T00:00:00Z", "Gadget", "WY", 17],+ ["2024-01-01T00:00:00Z", "Gizmo", "AK", 50],+ ["2024-01-01T00:00:00Z", "Gizmo", "AL", 47],+ ["2024-01-01T00:00:00Z", "Gizmo", "AR", 26],+ ["2024-01-01T00:00:00Z", "Gizmo", "AZ", 5],+ ["2024-01-01T00:00:00Z", "Gizmo", "CA", 61],+ ["2024-01-01T00:00:00Z", "Gizmo", "CO", 59],+ ["2024-01-01T00:00:00Z", "Gizmo", "CT", 1],+ ["2024-01-01T00:00:00Z", "Gizmo", "DE", 2],+ ["2024-01-01T00:00:00Z", "Gizmo", "FL", 21],+ ["2024-01-01T00:00:00Z", "Gizmo", "GA", 32],+ ["2024-01-01T00:00:00Z", "Gizmo", "IA", 57],+ ["2024-01-01T00:00:00Z", "Gizmo", "ID", 10],+ ["2024-01-01T00:00:00Z", "Gizmo", "IL", 54],+ ["2024-01-01T00:00:00Z", "Gizmo", "IN", 34],+ ["2024-01-01T00:00:00Z", "Gizmo", "KS", 35],+ ["2024-01-01T00:00:00Z", "Gizmo", "KY", 42],+ ["2024-01-01T00:00:00Z", "Gizmo", "LA", 17],+ ["2024-01-01T00:00:00Z", "Gizmo", "MA", 10],+ ["2024-01-01T00:00:00Z", "Gizmo", "MD", 6],+ ["2024-01-01T00:00:00Z", "Gizmo", "ME", 10],+ ["2024-01-01T00:00:00Z", "Gizmo", "MI", 53],+ ["2024-01-01T00:00:00Z", "Gizmo", "MN", 70],+ ["2024-01-01T00:00:00Z", "Gizmo", "MO", 57],+ ["2024-01-01T00:00:00Z", "Gizmo", "MS", 38],+ ["2024-01-01T00:00:00Z", "Gizmo", "MT", 72],+ ["2024-01-01T00:00:00Z", "Gizmo", "NC", 40],+ ["2024-01-01T00:00:00Z", "Gizmo", "ND", 45],+ ["2024-01-01T00:00:00Z", "Gizmo", "NE", 46],+ ["2024-01-01T00:00:00Z", "Gizmo", "NJ", 3],+ ["2024-01-01T00:00:00Z", "Gizmo", "NM", 12],+ ["2024-01-01T00:00:00Z", "Gizmo", "NV", 2],+ ["2024-01-01T00:00:00Z", "Gizmo", "NY", 52],+ ["2024-01-01T00:00:00Z", "Gizmo", "OH", 35],+ ["2024-01-01T00:00:00Z", "Gizmo", "OK", 23],+ ["2024-01-01T00:00:00Z", "Gizmo", "OR", 35],+ ["2024-01-01T00:00:00Z", "Gizmo", "PA", 29],+ ["2024-01-01T00:00:00Z", "Gizmo", "SC", 26],+ ["2024-01-01T00:00:00Z", "Gizmo", "SD", 40],+ ["2024-01-01T00:00:00Z", "Gizmo", "TN", 34],+ ["2024-01-01T00:00:00Z", "Gizmo", "TX", 128],+ ["2024-01-01T00:00:00Z", "Gizmo", "UT", 6],+ ["2024-01-01T00:00:00Z", "Gizmo", "VA", 33],+ ["2024-01-01T00:00:00Z", "Gizmo", "VT", 8],+ ["2024-01-01T00:00:00Z", "Gizmo", "WA", 27],+ ["2024-01-01T00:00:00Z", "Gizmo", "WI", 61],+ ["2024-01-01T00:00:00Z", "Gizmo", "WV", 20],+ ["2024-01-01T00:00:00Z", "Gizmo", "WY", 18],+ ["2024-01-01T00:00:00Z", "Widget", "AK", 30],+ ["2024-01-01T00:00:00Z", "Widget", "AL", 38],+ ["2024-01-01T00:00:00Z", "Widget", "AR", 25],+ ["2024-01-01T00:00:00Z", "Widget", "AZ", 6],+ ["2024-01-01T00:00:00Z", "Widget", "CA", 41],+ ["2024-01-01T00:00:00Z", "Widget", "CO", 43],+ ["2024-01-01T00:00:00Z", "Widget", "CT", 1],+ ["2024-01-01T00:00:00Z", "Widget", "FL", 29],+ ["2024-01-01T00:00:00Z", "Widget", "GA", 40],+ ["2024-01-01T00:00:00Z", "Widget", "IA", 38],+ ["2024-01-01T00:00:00Z", "Widget", "ID", 25],+ ["2024-01-01T00:00:00Z", "Widget", "IL", 41],+ ["2024-01-01T00:00:00Z", "Widget", "IN", 42],+ ["2024-01-01T00:00:00Z", "Widget", "KS", 29],+ ["2024-01-01T00:00:00Z", "Widget", "KY", 52],+ ["2024-01-01T00:00:00Z", "Widget", "LA", 17],+ ["2024-01-01T00:00:00Z", "Widget", "MA", 7],+ ["2024-01-01T00:00:00Z", "Widget", "MD", 8],+ ["2024-01-01T00:00:00Z", "Widget", "ME", 8],+ ["2024-01-01T00:00:00Z", "Widget", "MI", 52],+ ["2024-01-01T00:00:00Z", "Widget", "MN", 41],+ ["2024-01-01T00:00:00Z", "Widget", "MO", 44],+ ["2024-01-01T00:00:00Z", "Widget", "MS", 29],+ ["2024-01-01T00:00:00Z", "Widget", "MT", 67],+ ["2024-01-01T00:00:00Z", "Widget", "NC", 64],+ ["2024-01-01T00:00:00Z", "Widget", "ND", 52],+ ["2024-01-01T00:00:00Z", "Widget", "NE", 49],+ ["2024-01-01T00:00:00Z", "Widget", "NH", 2],+ ["2024-01-01T00:00:00Z", "Widget", "NJ", 9],+ ["2024-01-01T00:00:00Z", "Widget", "NM", 8],+ ["2024-01-01T00:00:00Z", "Widget", "NV", 1],+ ["2024-01-01T00:00:00Z", "Widget", "NY", 57],+ ["2024-01-01T00:00:00Z", "Widget", "OH", 38],+ ["2024-01-01T00:00:00Z", "Widget", "OK", 27],+ ["2024-01-01T00:00:00Z", "Widget", "OR", 32],+ ["2024-01-01T00:00:00Z", "Widget", "PA", 32],+ ["2024-01-01T00:00:00Z", "Widget", "SC", 21],+ ["2024-01-01T00:00:00Z", "Widget", "SD", 41],+ ["2024-01-01T00:00:00Z", "Widget", "TN", 45],+ ["2024-01-01T00:00:00Z", "Widget", "TX", 118],+ ["2024-01-01T00:00:00Z", "Widget", "UT", 10],+ ["2024-01-01T00:00:00Z", "Widget", "VA", 34],+ ["2024-01-01T00:00:00Z", "Widget", "VT", 3],+ ["2024-01-01T00:00:00Z", "Widget", "WA", 43],+ ["2024-01-01T00:00:00Z", "Widget", "WI", 59],+ ["2024-01-01T00:00:00Z", "Widget", "WV", 11],+ ["2024-01-01T00:00:00Z", "Widget", "WY", 22],+ ["2025-01-01T00:00:00Z", "Doohickey", "AK", 36],+ ["2025-01-01T00:00:00Z", "Doohickey", "AL", 34],+ ["2025-01-01T00:00:00Z", "Doohickey", "AR", 23],+ ["2025-01-01T00:00:00Z", "Doohickey", "AZ", 5],+ ["2025-01-01T00:00:00Z", "Doohickey", "CA", 43],+ ["2025-01-01T00:00:00Z", "Doohickey", "CO", 52],+ ["2025-01-01T00:00:00Z", "Doohickey", "DE", 1],+ ["2025-01-01T00:00:00Z", "Doohickey", "FL", 22],+ ["2025-01-01T00:00:00Z", "Doohickey", "GA", 36],+ ["2025-01-01T00:00:00Z", "Doohickey", "IA", 33],+ ["2025-01-01T00:00:00Z", "Doohickey", "ID", 13],+ ["2025-01-01T00:00:00Z", "Doohickey", "IL", 33],+ ["2025-01-01T00:00:00Z", "Doohickey", "IN", 32],+ ["2025-01-01T00:00:00Z", "Doohickey", "KS", 29],+ ["2025-01-01T00:00:00Z", "Doohickey", "KY", 40],+ ["2025-01-01T00:00:00Z", "Doohickey", "LA", 17],+ ["2025-01-01T00:00:00Z", "Doohickey", "MA", 9],+ ["2025-01-01T00:00:00Z", "Doohickey", "MD", 7],+ ["2025-01-01T00:00:00Z", "Doohickey", "ME", 5],+ ["2025-01-01T00:00:00Z", "Doohickey", "MI", 43],+ ["2025-01-01T00:00:00Z", "Doohickey", "MN", 65],+ ["2025-01-01T00:00:00Z", "Doohickey", "MO", 52],+ ["2025-01-01T00:00:00Z", "Doohickey", "MS", 29],+ ["2025-01-01T00:00:00Z", "Doohickey", "MT", 59],+ ["2025-01-01T00:00:00Z", "Doohickey", "NC", 44],+ ["2025-01-01T00:00:00Z", "Doohickey", "ND", 51],+ ["2025-01-01T00:00:00Z", "Doohickey", "NE", 34],+ ["2025-01-01T00:00:00Z", "Doohickey", "NH", 2],+ ["2025-01-01T00:00:00Z", "Doohickey", "NJ", 6],+ ["2025-01-01T00:00:00Z", "Doohickey", "NM", 8],+ ["2025-01-01T00:00:00Z", "Doohickey", "NV", 4],+ ["2025-01-01T00:00:00Z", "Doohickey", "NY", 53],+ ["2025-01-01T00:00:00Z", "Doohickey", "OH", 28],+ ["2025-01-01T00:00:00Z", "Doohickey", "OK", 19],+ ["2025-01-01T00:00:00Z", "Doohickey", "OR", 24],+ ["2025-01-01T00:00:00Z", "Doohickey", "PA", 30],+ ["2025-01-01T00:00:00Z", "Doohickey", "SC", 20],+ ["2025-01-01T00:00:00Z", "Doohickey", "SD", 35],+ ["2025-01-01T00:00:00Z", "Doohickey", "TN", 33],+ ["2025-01-01T00:00:00Z", "Doohickey", "TX", 92],+ ["2025-01-01T00:00:00Z", "Doohickey", "UT", 5],+ ["2025-01-01T00:00:00Z", "Doohickey", "VA", 31],+ ["2025-01-01T00:00:00Z", "Doohickey", "VT", 8],+ ["2025-01-01T00:00:00Z", "Doohickey", "WA", 25],+ ["2025-01-01T00:00:00Z", "Doohickey", "WI", 51],+ ["2025-01-01T00:00:00Z", "Doohickey", "WV", 14],+ ["2025-01-01T00:00:00Z", "Doohickey", "WY", 17],+ ["2025-01-01T00:00:00Z", "Gadget", "AK", 54],+ ["2025-01-01T00:00:00Z", "Gadget", "AL", 54],+ ["2025-01-01T00:00:00Z", "Gadget", "AR", 26],+ ["2025-01-01T00:00:00Z", "Gadget", "AZ", 7],+ ["2025-01-01T00:00:00Z", "Gadget", "CA", 51],+ ["2025-01-01T00:00:00Z", "Gadget", "CO", 63],+ ["2025-01-01T00:00:00Z", "Gadget", "CT", 5],+ ["2025-01-01T00:00:00Z", "Gadget", "FL", 33],+ ["2025-01-01T00:00:00Z", "Gadget", "GA", 42],+ ["2025-01-01T00:00:00Z", "Gadget", "IA", 68],+ ["2025-01-01T00:00:00Z", "Gadget", "ID", 17],+ ["2025-01-01T00:00:00Z", "Gadget", "IL", 54],+ ["2025-01-01T00:00:00Z", "Gadget", "IN", 45],+ ["2025-01-01T00:00:00Z", "Gadget", "KS", 31],+ ["2025-01-01T00:00:00Z", "Gadget", "KY", 50],+ ["2025-01-01T00:00:00Z", "Gadget", "LA", 20],+ ["2025-01-01T00:00:00Z", "Gadget", "MA", 8],+ ["2025-01-01T00:00:00Z", "Gadget", "MD", 4],+ ["2025-01-01T00:00:00Z", "Gadget", "ME", 2],+ ["2025-01-01T00:00:00Z", "Gadget", "MI", 54],+ ["2025-01-01T00:00:00Z", "Gadget", "MN", 82],+ ["2025-01-01T00:00:00Z", "Gadget", "MO", 47],+ ["2025-01-01T00:00:00Z", "Gadget", "MS", 36],+ ["2025-01-01T00:00:00Z", "Gadget", "MT", 79],+ ["2025-01-01T00:00:00Z", "Gadget", "NC", 55],+ ["2025-01-01T00:00:00Z", "Gadget", "ND", 64],+ ["2025-01-01T00:00:00Z", "Gadget", "NE", 44],+ ["2025-01-01T00:00:00Z", "Gadget", "NH", 4],+ ["2025-01-01T00:00:00Z", "Gadget", "NJ", 8],+ ["2025-01-01T00:00:00Z", "Gadget", "NM", 17],+ ["2025-01-01T00:00:00Z", "Gadget", "NV", 5],+ ["2025-01-01T00:00:00Z", "Gadget", "NY", 64],+ ["2025-01-01T00:00:00Z", "Gadget", "OH", 45],+ ["2025-01-01T00:00:00Z", "Gadget", "OK", 20],+ ["2025-01-01T00:00:00Z", "Gadget", "OR", 35],+ ["2025-01-01T00:00:00Z", "Gadget", "PA", 43],+ ["2025-01-01T00:00:00Z", "Gadget", "SC", 28],+ ["2025-01-01T00:00:00Z", "Gadget", "SD", 56],+ ["2025-01-01T00:00:00Z", "Gadget", "TN", 38],+ ["2025-01-01T00:00:00Z", "Gadget", "TX", 130],+ ["2025-01-01T00:00:00Z", "Gadget", "UT", 9],+ ["2025-01-01T00:00:00Z", "Gadget", "VA", 29],+ ["2025-01-01T00:00:00Z", "Gadget", "VT", 12],+ ["2025-01-01T00:00:00Z", "Gadget", "WA", 40],+ ["2025-01-01T00:00:00Z", "Gadget", "WI", 56],+ ["2025-01-01T00:00:00Z", "Gadget", "WV", 20],+ ["2025-01-01T00:00:00Z", "Gadget", "WY", 29],+ ["2025-01-01T00:00:00Z", "Gizmo", "AK", 38],+ ["2025-01-01T00:00:00Z", "Gizmo", "AL", 45],+ ["2025-01-01T00:00:00Z", "Gizmo", "AR", 28],+ ["2025-01-01T00:00:00Z", "Gizmo", "AZ", 7],+ ["2025-01-01T00:00:00Z", "Gizmo", "CA", 46],+ ["2025-01-01T00:00:00Z", "Gizmo", "CO", 59],+ ["2025-01-01T00:00:00Z", "Gizmo", "CT", 3],+ ["2025-01-01T00:00:00Z", "Gizmo", "DE", 1],+ ["2025-01-01T00:00:00Z", "Gizmo", "FL", 29],+ ["2025-01-01T00:00:00Z", "Gizmo", "GA", 41],+ ["2025-01-01T00:00:00Z", "Gizmo", "IA", 44],+ ["2025-01-01T00:00:00Z", "Gizmo", "ID", 13],+ ["2025-01-01T00:00:00Z", "Gizmo", "IL", 59],+ ["2025-01-01T00:00:00Z", "Gizmo", "IN", 41],+ ["2025-01-01T00:00:00Z", "Gizmo", "KS", 29],+ ["2025-01-01T00:00:00Z", "Gizmo", "KY", 46],+ ["2025-01-01T00:00:00Z", "Gizmo", "LA", 13],+ ["2025-01-01T00:00:00Z", "Gizmo", "MA", 5],+ ["2025-01-01T00:00:00Z", "Gizmo", "MD", 5],+ ["2025-01-01T00:00:00Z", "Gizmo", "ME", 7],+ ["2025-01-01T00:00:00Z", "Gizmo", "MI", 49],+ ["2025-01-01T00:00:00Z", "Gizmo", "MN", 83],+ ["2025-01-01T00:00:00Z", "Gizmo", "MO", 48],+ ["2025-01-01T00:00:00Z", "Gizmo", "MS", 28],+ ["2025-01-01T00:00:00Z", "Gizmo", "MT", 78],+ ["2025-01-01T00:00:00Z", "Gizmo", "NC", 54],+ ["2025-01-01T00:00:00Z", "Gizmo", "ND", 46],+ ["2025-01-01T00:00:00Z", "Gizmo", "NE", 45],+ ["2025-01-01T00:00:00Z", "Gizmo", "NH", 2],+ ["2025-01-01T00:00:00Z", "Gizmo", "NJ", 6],+ ["2025-01-01T00:00:00Z", "Gizmo", "NM", 12],+ ["2025-01-01T00:00:00Z", "Gizmo", "NV", 5],+ ["2025-01-01T00:00:00Z", "Gizmo", "NY", 58],+ ["2025-01-01T00:00:00Z", "Gizmo", "OH", 45],+ ["2025-01-01T00:00:00Z", "Gizmo", "OK", 20],+ ["2025-01-01T00:00:00Z", "Gizmo", "OR", 38],+ ["2025-01-01T00:00:00Z", "Gizmo", "PA", 38],+ ["2025-01-01T00:00:00Z", "Gizmo", "SC", 29],+ ["2025-01-01T00:00:00Z", "Gizmo", "SD", 45],+ ["2025-01-01T00:00:00Z", "Gizmo", "TN", 43],+ ["2025-01-01T00:00:00Z", "Gizmo", "TX", 134],+ ["2025-01-01T00:00:00Z", "Gizmo", "UT", 6],+ ["2025-01-01T00:00:00Z", "Gizmo", "VA", 29],+ ["2025-01-01T00:00:00Z", "Gizmo", "VT", 9],+ ["2025-01-01T00:00:00Z", "Gizmo", "WA", 33],+ ["2025-01-01T00:00:00Z", "Gizmo", "WI", 75],+ ["2025-01-01T00:00:00Z", "Gizmo", "WV", 20],+ ["2025-01-01T00:00:00Z", "Gizmo", "WY", 27],+ ["2025-01-01T00:00:00Z", "Widget", "AK", 38],+ ["2025-01-01T00:00:00Z", "Widget", "AL", 47],+ ["2025-01-01T00:00:00Z", "Widget", "AR", 33],+ ["2025-01-01T00:00:00Z", "Widget", "AZ", 5],+ ["2025-01-01T00:00:00Z", "Widget", "CA", 48],+ ["2025-01-01T00:00:00Z", "Widget", "CO", 74],+ ["2025-01-01T00:00:00Z", "Widget", "CT", 3],+ ["2025-01-01T00:00:00Z", "Widget", "DE", 1],+ ["2025-01-01T00:00:00Z", "Widget", "FL", 25],+ ["2025-01-01T00:00:00Z", "Widget", "GA", 37],+ ["2025-01-01T00:00:00Z", "Widget", "IA", 63],+ ["2025-01-01T00:00:00Z", "Widget", "ID", 22],+ ["2025-01-01T00:00:00Z", "Widget", "IL", 44],+ ["2025-01-01T00:00:00Z", "Widget", "IN", 35],+ ["2025-01-01T00:00:00Z", "Widget", "KS", 56],+ ["2025-01-01T00:00:00Z", "Widget", "KY", 38],+ ["2025-01-01T00:00:00Z", "Widget", "LA", 22],+ ["2025-01-01T00:00:00Z", "Widget", "MA", 9],+ ["2025-01-01T00:00:00Z", "Widget", "MD", 13],+ ["2025-01-01T00:00:00Z", "Widget", "ME", 8],+ ["2025-01-01T00:00:00Z", "Widget", "MI", 49],+ ["2025-01-01T00:00:00Z", "Widget", "MN", 79],+ ["2025-01-01T00:00:00Z", "Widget", "MO", 51],+ ["2025-01-01T00:00:00Z", "Widget", "MS", 41],+ ["2025-01-01T00:00:00Z", "Widget", "MT", 90],+ ["2025-01-01T00:00:00Z", "Widget", "NC", 51],+ ["2025-01-01T00:00:00Z", "Widget", "ND", 56],+ ["2025-01-01T00:00:00Z", "Widget", "NE", 45],+ ["2025-01-01T00:00:00Z", "Widget", "NH", 8],+ ["2025-01-01T00:00:00Z", "Widget", "NJ", 9],+ ["2025-01-01T00:00:00Z", "Widget", "NM", 17],+ ["2025-01-01T00:00:00Z", "Widget", "NV", 3],+ ["2025-01-01T00:00:00Z", "Widget", "NY", 61],+ ["2025-01-01T00:00:00Z", "Widget", "OH", 42],+ ["2025-01-01T00:00:00Z", "Widget", "OK", 30],+ ["2025-01-01T00:00:00Z", "Widget", "OR", 35],+ ["2025-01-01T00:00:00Z", "Widget", "PA", 52],+ ["2025-01-01T00:00:00Z", "Widget", "SC", 33],+ ["2025-01-01T00:00:00Z", "Widget", "SD", 52],+ ["2025-01-01T00:00:00Z", "Widget", "TN", 41],+ ["2025-01-01T00:00:00Z", "Widget", "TX", 136],+ ["2025-01-01T00:00:00Z", "Widget", "UT", 7],+ ["2025-01-01T00:00:00Z", "Widget", "VA", 36],+ ["2025-01-01T00:00:00Z", "Widget", "VT", 9],+ ["2025-01-01T00:00:00Z", "Widget", "WA", 28],+ ["2025-01-01T00:00:00Z", "Widget", "WI", 50],+ ["2025-01-01T00:00:00Z", "Widget", "WV", 20],+ ["2025-01-01T00:00:00Z", "Widget", "WY", 27],+ ["2026-01-01T00:00:00Z", "Doohickey", "AK", 11],+ ["2026-01-01T00:00:00Z", "Doohickey", "AL", 12],+ ["2026-01-01T00:00:00Z", "Doohickey", "AR", 5],+ ["2026-01-01T00:00:00Z", "Doohickey", "AZ", 2],+ ["2026-01-01T00:00:00Z", "Doohickey", "CA", 12],+ ["2026-01-01T00:00:00Z", "Doohickey", "CO", 15],+ ["2026-01-01T00:00:00Z", "Doohickey", "CT", 1],+ ["2026-01-01T00:00:00Z", "Doohickey", "FL", 5],+ ["2026-01-01T00:00:00Z", "Doohickey", "GA", 10],+ ["2026-01-01T00:00:00Z", "Doohickey", "IA", 16],+ ["2026-01-01T00:00:00Z", "Doohickey", "ID", 10],+ ["2026-01-01T00:00:00Z", "Doohickey", "IL", 10],+ ["2026-01-01T00:00:00Z", "Doohickey", "IN", 7],+ ["2026-01-01T00:00:00Z", "Doohickey", "KS", 6],+ ["2026-01-01T00:00:00Z", "Doohickey", "KY", 17],+ ["2026-01-01T00:00:00Z", "Doohickey", "LA", 4],+ ["2026-01-01T00:00:00Z", "Doohickey", "MA", 3],+ ["2026-01-01T00:00:00Z", "Doohickey", "MI", 17],+ ["2026-01-01T00:00:00Z", "Doohickey", "MN", 23],+ ["2026-01-01T00:00:00Z", "Doohickey", "MO", 13],+ ["2026-01-01T00:00:00Z", "Doohickey", "MS", 7],+ ["2026-01-01T00:00:00Z", "Doohickey", "MT", 18],+ ["2026-01-01T00:00:00Z", "Doohickey", "NC", 21],+ ["2026-01-01T00:00:00Z", "Doohickey", "ND", 18],+ ["2026-01-01T00:00:00Z", "Doohickey", "NE", 16],+ ["2026-01-01T00:00:00Z", "Doohickey", "NH", 2],+ ["2026-01-01T00:00:00Z", "Doohickey", "NJ", 2],+ ["2026-01-01T00:00:00Z", "Doohickey", "NM", 2],+ ["2026-01-01T00:00:00Z", "Doohickey", "NY", 17],+ ["2026-01-01T00:00:00Z", "Doohickey", "OH", 9],+ ["2026-01-01T00:00:00Z", "Doohickey", "OK", 6],+ ["2026-01-01T00:00:00Z", "Doohickey", "OR", 10],+ ["2026-01-01T00:00:00Z", "Doohickey", "PA", 3],+ ["2026-01-01T00:00:00Z", "Doohickey", "SC", 10],+ ["2026-01-01T00:00:00Z", "Doohickey", "SD", 16],+ ["2026-01-01T00:00:00Z", "Doohickey", "TN", 13],+ ["2026-01-01T00:00:00Z", "Doohickey", "TX", 24],+ ["2026-01-01T00:00:00Z", "Doohickey", "UT", 1],+ ["2026-01-01T00:00:00Z", "Doohickey", "VA", 8],+ ["2026-01-01T00:00:00Z", "Doohickey", "VT", 1],+ ["2026-01-01T00:00:00Z", "Doohickey", "WA", 7],+ ["2026-01-01T00:00:00Z", "Doohickey", "WI", 20],+ ["2026-01-01T00:00:00Z", "Doohickey", "WV", 2],+ ["2026-01-01T00:00:00Z", "Doohickey", "WY", 4],+ ["2026-01-01T00:00:00Z", "Gadget", "AK", 14],+ ["2026-01-01T00:00:00Z", "Gadget", "AL", 6],+ ["2026-01-01T00:00:00Z", "Gadget", "AR", 11],+ ["2026-01-01T00:00:00Z", "Gadget", "AZ", 2],+ ["2026-01-01T00:00:00Z", "Gadget", "CA", 17],+ ["2026-01-01T00:00:00Z", "Gadget", "CO", 25],+ ["2026-01-01T00:00:00Z", "Gadget", "DE", 1],+ ["2026-01-01T00:00:00Z", "Gadget", "FL", 9],+ ["2026-01-01T00:00:00Z", "Gadget", "GA", 13],+ ["2026-01-01T00:00:00Z", "Gadget", "IA", 19],+ ["2026-01-01T00:00:00Z", "Gadget", "ID", 6],+ ["2026-01-01T00:00:00Z", "Gadget", "IL", 9],+ ["2026-01-01T00:00:00Z", "Gadget", "IN", 6],+ ["2026-01-01T00:00:00Z", "Gadget", "KS", 14],+ ["2026-01-01T00:00:00Z", "Gadget", "KY", 5],+ ["2026-01-01T00:00:00Z", "Gadget", "LA", 9],+ ["2026-01-01T00:00:00Z", "Gadget", "MA", 3],+ ["2026-01-01T00:00:00Z", "Gadget", "MD", 2],+ ["2026-01-01T00:00:00Z", "Gadget", "ME", 4],+ ["2026-01-01T00:00:00Z", "Gadget", "MI", 16],+ ["2026-01-01T00:00:00Z", "Gadget", "MN", 25],+ ["2026-01-01T00:00:00Z", "Gadget", "MO", 20],+ ["2026-01-01T00:00:00Z", "Gadget", "MS", 10],+ ["2026-01-01T00:00:00Z", "Gadget", "MT", 17],+ ["2026-01-01T00:00:00Z", "Gadget", "NC", 11],+ ["2026-01-01T00:00:00Z", "Gadget", "ND", 15],+ ["2026-01-01T00:00:00Z", "Gadget", "NE", 12],+ ["2026-01-01T00:00:00Z", "Gadget", "NH", 1],+ ["2026-01-01T00:00:00Z", "Gadget", "NJ", 2],+ ["2026-01-01T00:00:00Z", "Gadget", "NM", 4],+ ["2026-01-01T00:00:00Z", "Gadget", "NV", 2],+ ["2026-01-01T00:00:00Z", "Gadget", "NY", 22],+ ["2026-01-01T00:00:00Z", "Gadget", "OH", 16],+ ["2026-01-01T00:00:00Z", "Gadget", "OK", 5],+ ["2026-01-01T00:00:00Z", "Gadget", "OR", 11],+ ["2026-01-01T00:00:00Z", "Gadget", "PA", 11],+ ["2026-01-01T00:00:00Z", "Gadget", "SC", 10],+ ["2026-01-01T00:00:00Z", "Gadget", "SD", 15],+ ["2026-01-01T00:00:00Z", "Gadget", "TN", 14],+ ["2026-01-01T00:00:00Z", "Gadget", "TX", 33],+ ["2026-01-01T00:00:00Z", "Gadget", "UT", 3],+ ["2026-01-01T00:00:00Z", "Gadget", "VA", 12],+ ["2026-01-01T00:00:00Z", "Gadget", "VT", 2],+ ["2026-01-01T00:00:00Z", "Gadget", "WA", 7],+ ["2026-01-01T00:00:00Z", "Gadget", "WI", 28],+ ["2026-01-01T00:00:00Z", "Gadget", "WV", 5],+ ["2026-01-01T00:00:00Z", "Gadget", "WY", 10],+ ["2026-01-01T00:00:00Z", "Gizmo", "AK", 15],+ ["2026-01-01T00:00:00Z", "Gizmo", "AL", 16],+ ["2026-01-01T00:00:00Z", "Gizmo", "AR", 8],+ ["2026-01-01T00:00:00Z", "Gizmo", "AZ", 2],+ ["2026-01-01T00:00:00Z", "Gizmo", "CA", 12],+ ["2026-01-01T00:00:00Z", "Gizmo", "CO", 19],+ ["2026-01-01T00:00:00Z", "Gizmo", "CT", 1],+ ["2026-01-01T00:00:00Z", "Gizmo", "DE", 1],+ ["2026-01-01T00:00:00Z", "Gizmo", "FL", 8],+ ["2026-01-01T00:00:00Z", "Gizmo", "GA", 16],+ ["2026-01-01T00:00:00Z", "Gizmo", "IA", 19],+ ["2026-01-01T00:00:00Z", "Gizmo", "ID", 9],+ ["2026-01-01T00:00:00Z", "Gizmo", "IL", 14],+ ["2026-01-01T00:00:00Z", "Gizmo", "IN", 16],+ ["2026-01-01T00:00:00Z", "Gizmo", "KS", 5],+ ["2026-01-01T00:00:00Z", "Gizmo", "KY", 11],+ ["2026-01-01T00:00:00Z", "Gizmo", "LA", 8],+ ["2026-01-01T00:00:00Z", "Gizmo", "MA", 3],+ ["2026-01-01T00:00:00Z", "Gizmo", "MD", 4],+ ["2026-01-01T00:00:00Z", "Gizmo", "ME", 2],+ ["2026-01-01T00:00:00Z", "Gizmo", "MI", 29],+ ["2026-01-01T00:00:00Z", "Gizmo", "MN", 13],+ ["2026-01-01T00:00:00Z", "Gizmo", "MO", 19],+ ["2026-01-01T00:00:00Z", "Gizmo", "MS", 9],+ ["2026-01-01T00:00:00Z", "Gizmo", "MT", 23],+ ["2026-01-01T00:00:00Z", "Gizmo", "NC", 18],+ ["2026-01-01T00:00:00Z", "Gizmo", "ND", 12],+ ["2026-01-01T00:00:00Z", "Gizmo", "NE", 10],+ ["2026-01-01T00:00:00Z", "Gizmo", "NJ", 1],+ ["2026-01-01T00:00:00Z", "Gizmo", "NM", 1],+ ["2026-01-01T00:00:00Z", "Gizmo", "NV", 1],+ ["2026-01-01T00:00:00Z", "Gizmo", "NY", 14],+ ["2026-01-01T00:00:00Z", "Gizmo", "OH", 12],+ ["2026-01-01T00:00:00Z", "Gizmo", "OK", 7],+ ["2026-01-01T00:00:00Z", "Gizmo", "OR", 16],+ ["2026-01-01T00:00:00Z", "Gizmo", "PA", 11],+ ["2026-01-01T00:00:00Z", "Gizmo", "SC", 10],+ ["2026-01-01T00:00:00Z", "Gizmo", "SD", 11],+ ["2026-01-01T00:00:00Z", "Gizmo", "TN", 12],+ ["2026-01-01T00:00:00Z", "Gizmo", "TX", 29],+ ["2026-01-01T00:00:00Z", "Gizmo", "UT", 1],+ ["2026-01-01T00:00:00Z", "Gizmo", "VA", 4],+ ["2026-01-01T00:00:00Z", "Gizmo", "VT", 6],+ ["2026-01-01T00:00:00Z", "Gizmo", "WA", 11],+ ["2026-01-01T00:00:00Z", "Gizmo", "WI", 21],+ ["2026-01-01T00:00:00Z", "Gizmo", "WV", 7],+ ["2026-01-01T00:00:00Z", "Gizmo", "WY", 9],+ ["2026-01-01T00:00:00Z", "Widget", "AK", 14],+ ["2026-01-01T00:00:00Z", "Widget", "AL", 17],+ ["2026-01-01T00:00:00Z", "Widget", "AR", 9],+ ["2026-01-01T00:00:00Z", "Widget", "AZ", 1],+ ["2026-01-01T00:00:00Z", "Widget", "CA", 15],+ ["2026-01-01T00:00:00Z", "Widget", "CO", 25],+ ["2026-01-01T00:00:00Z", "Widget", "CT", 1],+ ["2026-01-01T00:00:00Z", "Widget", "FL", 10],+ ["2026-01-01T00:00:00Z", "Widget", "GA", 12],+ ["2026-01-01T00:00:00Z", "Widget", "IA", 15],+ ["2026-01-01T00:00:00Z", "Widget", "ID", 4],+ ["2026-01-01T00:00:00Z", "Widget", "IL", 17],+ ["2026-01-01T00:00:00Z", "Widget", "IN", 12],+ ["2026-01-01T00:00:00Z", "Widget", "KS", 11],+ ["2026-01-01T00:00:00Z", "Widget", "KY", 17],+ ["2026-01-01T00:00:00Z", "Widget", "LA", 10],+ ["2026-01-01T00:00:00Z", "Widget", "MA", 2],+ ["2026-01-01T00:00:00Z", "Widget", "MD", 1],+ ["2026-01-01T00:00:00Z", "Widget", "ME", 1],+ ["2026-01-01T00:00:00Z", "Widget", "MI", 13],+ ["2026-01-01T00:00:00Z", "Widget", "MN", 21],+ ["2026-01-01T00:00:00Z", "Widget", "MO", 17],+ ["2026-01-01T00:00:00Z", "Widget", "MS", 12],+ ["2026-01-01T00:00:00Z", "Widget", "MT", 25],+ ["2026-01-01T00:00:00Z", "Widget", "NC", 16],+ ["2026-01-01T00:00:00Z", "Widget", "ND", 19],+ ["2026-01-01T00:00:00Z", "Widget", "NE", 16],+ ["2026-01-01T00:00:00Z", "Widget", "NH", 3],+ ["2026-01-01T00:00:00Z", "Widget", "NJ", 2],+ ["2026-01-01T00:00:00Z", "Widget", "NM", 6],+ ["2026-01-01T00:00:00Z", "Widget", "NV", 1],+ ["2026-01-01T00:00:00Z", "Widget", "NY", 17],+ ["2026-01-01T00:00:00Z", "Widget", "OH", 16],+ ["2026-01-01T00:00:00Z", "Widget", "OK", 4],+ ["2026-01-01T00:00:00Z", "Widget", "OR", 14],+ ["2026-01-01T00:00:00Z", "Widget", "PA", 11],+ ["2026-01-01T00:00:00Z", "Widget", "SC", 12],+ ["2026-01-01T00:00:00Z", "Widget", "SD", 14],+ ["2026-01-01T00:00:00Z", "Widget", "TN", 14],+ ["2026-01-01T00:00:00Z", "Widget", "TX", 35],+ ["2026-01-01T00:00:00Z", "Widget", "VA", 12],+ ["2026-01-01T00:00:00Z", "Widget", "VT", 2],+ ["2026-01-01T00:00:00Z", "Widget", "WA", 16],+ ["2026-01-01T00:00:00Z", "Widget", "WI", 16],+ ["2026-01-01T00:00:00Z", "Widget", "WV", 5],+ ["2026-01-01T00:00:00Z", "Widget", "WY", 5]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Year",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "year"+ }+ ],+ "source": "breakout",+ "unit": "year",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "CATEGORY",+ "display_name": "Product → Category",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/Category",+ "field_ref": [+ "field",+ 18,+ {+ "source-field": 14+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 6.375+ }+ }+ }+ },+ {+ "name": "STATE",+ "display_name": "User → State",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/State",+ "field_ref": [+ "field",+ 1,+ {+ "source-field": 11+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 49,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 1,+ "average-length": 2+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Year",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "year"+ }+ ],+ "source": "breakout",+ "unit": "year",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "CATEGORY",+ "display_name": "Product → Category",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/Category",+ "field_ref": [+ "field",+ 18,+ {+ "source-field": 14+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 6.375+ }+ }+ }+ },+ {+ "name": "STATE",+ "display_name": "User → State",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/State",+ "field_ref": [+ "field",+ 1,+ {+ "source-field": 11+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 49,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 1,+ "average-length": 2+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 85,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 5.231534567728808,+ "q3": 30.80022830379615,+ "max": 136,+ "sd": 19.868608937082108,+ "avg": 20.435729847494553+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/multi-series-two-metrics-with-axis-split-formatting.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/multi-series-two-metrics-with-axis-split-formatting.jsonnew file mode 100644index 00000000000..397a16c9c74--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/multi-series-two-metrics-with-axis-split-formatting.json@@ -0,0 +1,7667 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.x_axis.title_text": "[Created At: Year]",+ "column_settings": {+ "[\"name\",\"count\"]": {+ "number_separators": ".,",+ "prefix": "[",+ "suffix": "]"+ }+ },+ "graph.dimensions": ["CREATED_AT"],+ "graph.metrics": ["avg", "count"],+ "graph.series_order_dimension": null,+ "graph.series_order": null,+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "series_settings": {+ "count": {+ "axis": "left",+ "color": "#E75454",+ "title": "Count!!!!!"+ },+ "avg": {+ "axis": "right",+ "show_series_values": false,+ "color": "#8A5EB0",+ "title": "Average of Total!!!!!"+ }+ }+ }+ },+ "data": {+ "rows": [+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "AK",+ 5,+ 47.8457858071405,+ 47.8457858071405+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "AL",+ 6,+ 65.76345879992107,+ 63.23345879992107+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "AR",+ 1,+ 21.15809834572766,+ 19.86809834572766+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "CA",+ 6,+ 45.79833485591342,+ 42.823605970466765+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "CO",+ 16,+ 47.305324863105845,+ 45.97157486310584+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "CT",+ 1,+ 78.69178100854835,+ 73.99178100854834+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "FL",+ 1,+ 33.627470408648485,+ 31.727470408648482+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "GA",+ 6,+ 45.49911043276505,+ 45.13671796701465+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "IA",+ 4,+ 53.57179401654187,+ 52.4356851070871+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "ID",+ 3,+ 52.90544014690383,+ 51.84347333126304+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "IL",+ 5,+ 59.23140643931126,+ 55.74540643931126+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "IN",+ 4,+ 65.80831673579598,+ 61.50081673579597+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "KS",+ 3,+ 36.65173249854819,+ 34.41506583188153+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "KY",+ 4,+ 38.12665018802277,+ 36.71119129963188+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "LA",+ 2,+ 46.2115141414441,+ 44.4315141414441+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "MA",+ 2,+ 46.72524980864516,+ 45.654646865558064+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "MI",+ 5,+ 53.6177494852332,+ 50.5837494852332+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "MN",+ 6,+ 52.524246701043644,+ 50.133944256186396+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "MO",+ 6,+ 56.38550915979942,+ 54.100509159799415+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "MS",+ 1,+ 27.326330427467955,+ 25.536330427467956+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "MT",+ 8,+ 43.4815756439011,+ 43.4815756439011+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "NC",+ 3,+ 51.267997000110086,+ 48.94466366677675+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "ND",+ 10,+ 51.02777415346681,+ 49.19938905421663+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "NE",+ 8,+ 46.00837037272031,+ 44.47294323636592+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "NJ",+ 1,+ 84.20967825322741,+ 78.6996782532274+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "NY",+ 3,+ 35.34385402192807,+ 33.98385402192807+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "OH",+ 5,+ 48.327223886086536,+ 47.43191521106606+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "OK",+ 2,+ 34.17854588801124,+ 32.70854588801124+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "OR",+ 2,+ 39.56828684713717,+ 39.56828684713717+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "PA",+ 7,+ 81.09782366067228,+ 76.50782366067229+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "SC",+ 5,+ 61.280492339306306,+ 59.14951454344951+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "SD",+ 7,+ 53.96826317721052,+ 52.32598920915318+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "TN",+ 1,+ 27.326330427467955,+ 25.536330427467956+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "TX",+ 5,+ 57.15115949687488,+ 53.78915949687488+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "UT",+ 4,+ 37.832493272525745,+ 36.5966001558559+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "VA",+ 1,+ 82.0796782532274,+ 78.6996782532274+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "WA",+ 7,+ 48.300928180334715,+ 45.35378532319186+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "WI",+ 8,+ 54.78238422751909,+ 52.17238422751909+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "WV",+ 2,+ 34.67354588801124,+ 32.70854588801124+ ],+ [+ "2022-01-01T00:00:00Z",+ "Doohickey",+ "WY",+ 1,+ 26.556330427467955,+ 25.536330427467956+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "AK",+ 6,+ 47.948128986377796,+ 47.95909878483067+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "AL",+ 2,+ 86.84210550492226,+ 83.50210550492224+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "AR",+ 4,+ 34.51418603967352,+ 33.020666085688305+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "CA",+ 7,+ 52.63456749837644,+ 50.11997900977159+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "CO",+ 13,+ 46.005825753743316,+ 45.386067729330485+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "CT",+ 1,+ 91.16279013719551,+ 85.72279013719552+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "DE",+ 1,+ 12.323068489110506,+ 20.41053609936413+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "FL",+ 2,+ 85.87645782069538,+ 81.01645782069538+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "GA",+ 3,+ 49.67953294357302,+ 50.06930072195959+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "IA",+ 8,+ 62.683582739092266,+ 60.08552828436488+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "ID",+ 5,+ 60.49095574521418,+ 57.06895574521418+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "IL",+ 4,+ 42.15412613888257,+ 41.50193108092804+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "IN",+ 5,+ 57.91013174754509,+ 54.12013174754509+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "KS",+ 3,+ 45.2493149983163,+ 42.4893149983163+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "KY",+ 6,+ 51.30430835690425,+ 48.400975023570915+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "LA",+ 4,+ 43.40930079272164,+ 43.46337379014307+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "MA",+ 1,+ 37.34901429507968,+ 35.149014295079674+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "MD",+ 1,+ 67.67752383956291,+ 63.84752383956291+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "ME",+ 1,+ 56.01155415510499,+ 56.326269136507406+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "MI",+ 8,+ 60.23010895822505,+ 56.822608958225054+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "MN",+ 5,+ 60.85959582199678,+ 56.945595821996775+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "MO",+ 6,+ 50.267101043186614,+ 48.230434376519945+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "MS",+ 5,+ 36.34329872943094,+ 33.963298729430946+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "MT",+ 11,+ 62.47490802431331,+ 62.47490802431331+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "NC",+ 7,+ 43.28231477194312,+ 42.25754747360314+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "ND",+ 7,+ 63.95262713274996,+ 60.90691284703567+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "NE",+ 6,+ 61.976895904153984,+ 59.40931809169745+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "NM",+ 3,+ 69.29324936157163,+ 65.91658269490496+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "NV",+ 2,+ 57.28377552864148,+ 57.34077616743904+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "NY",+ 4,+ 45.20812707199345,+ 43.470627071993455+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "OH",+ 3,+ 73.23746711683911,+ 69.25413378350578+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "OK",+ 1,+ 40.14840873131915,+ 38.418408731319154+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "OR",+ 3,+ 53.72103632554362,+ 53.72103632554362+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "PA",+ 3,+ 45.69619190526447,+ 44.80182650587467+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "SC",+ 3,+ 53.232461051690365,+ 52.99265812987121+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "SD",+ 8,+ 49.286783487905716,+ 47.39303348790572+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "TN",+ 2,+ 35.83581940627536,+ 33.49081940627536+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "TX",+ 14,+ 56.97320313854333,+ 54.12927648817162+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "VA",+ 2,+ 67.39762161508897,+ 65.5563710573592+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "WA",+ 5,+ 53.940131123540674,+ 50.87399064563227+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "WI",+ 4,+ 49.40586456858355,+ 47.053364568583554+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "WV",+ 7,+ 41.688675069154264,+ 39.33010364058284+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gadget",+ "WY",+ 3,+ 61.417563196755694,+ 59.05422986342236+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "AK",+ 6,+ 65.31852799931296,+ 66.09700966043394+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "AL",+ 4,+ 75.2884278700119,+ 72.3934278700119+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "AR",+ 5,+ 64.25772438455314,+ 60.33572438455313+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "CA",+ 7,+ 64.99236703255849,+ 61.902160548158385+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "CO",+ 3,+ 79.90494537198153,+ 77.65494537198153+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "CT",+ 1,+ 92.83125153827623,+ 87.29125153827623+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "FL",+ 2,+ 79.59616927403711,+ 75.0861692740371+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "GA",+ 3,+ 55.812587580416334,+ 53.665920913749666+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "IA",+ 7,+ 63.5564399677692,+ 61.01509935291571+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "ID",+ 1,+ 47.93324323588729,+ 45.22324323588729+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "IL",+ 6,+ 52.770661987024276,+ 50.75558744499727+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "IN",+ 6,+ 66.3340427641064,+ 61.994042764106396+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "KS",+ 2,+ 50.20888821166276,+ 47.14388821166276+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "KY",+ 3,+ 36.328198372771936,+ 34.27153170610527+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "LA",+ 4,+ 68.99342848138228,+ 66.34092848138228+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "MA",+ 1,+ 38.97323416938524,+ 36.683234169385244+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "MD",+ 1,+ 79.59616927403711,+ 75.0861692740371+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "MI",+ 2,+ 43.509854353873,+ 41.049854353873+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "MN",+ 7,+ 68.29182747663084,+ 63.900398905202266+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "MO",+ 4,+ 53.223348579772946,+ 52.96841986467667+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "MS",+ 2,+ 84.7188935922852,+ 79.1738935922852+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "MT",+ 9,+ 61.092333706789276,+ 61.59964690575786+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "NC",+ 2,+ 34.64324765003256,+ 33.073247650032556+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "ND",+ 9,+ 57.083938022506445,+ 55.12298116542313+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "NE",+ 6,+ 69.14987005191736,+ 65.5432033852507+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "NJ",+ 1,+ 80.34616927403711,+ 75.0861692740371+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "NV",+ 1,+ 48.32324323588729,+ 45.22324323588729+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "NY",+ 6,+ 62.81375961045702,+ 61.89849820776666+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "OH",+ 4,+ 55.37048356873835,+ 52.36048356873835+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "OK",+ 3,+ 59.737872597059976,+ 57.16453926372664+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "OR",+ 3,+ 67.67854049211137,+ 67.67854049211137+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "PA",+ 4,+ 72.48063299212438,+ 68.37563299212438+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "SC",+ 2,+ 68.0445000751665,+ 64.18950007516649+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "SD",+ 7,+ 82.743424807641,+ 79.56342480764101+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "TN",+ 4,+ 62.24921231660829,+ 58.82592134511693+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "TX",+ 5,+ 73.57704524766237,+ 69.25104524766236+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "VA",+ 2,+ 55.14824765003256,+ 52.87324765003256+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "VT",+ 1,+ 46.022292782398374,+ 50.433725012700116+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "WA",+ 4,+ 49.288967945548215,+ 46.283967945548206+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "WI",+ 6,+ 49.486206001329016,+ 48.202248303372414+ ],+ [+ "2022-01-01T00:00:00Z",+ "Gizmo",+ "WY",+ 2,+ 56.25197000437383,+ 54.08697000437383+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "AK",+ 2,+ 81.93968377632999,+ 85.07039113100019+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "AL",+ 6,+ 63.92358953305025,+ 61.46525619971692+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "AR",+ 4,+ 51.553475200731576,+ 50.381046898202975+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "CA",+ 7,+ 63.70302203619975,+ 59.25873632191403+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "CO",+ 7,+ 60.66049494730081,+ 59.32713918048509+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "DE",+ 1,+ 36.60883787357609,+ 36.60883787357609+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "FL",+ 3,+ 67.54988166801733,+ 64.73173333244472+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "GA",+ 3,+ 62.599880901708055,+ 60.66039724178391+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "IA",+ 6,+ 48.66580146212479,+ 47.3094035990908+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "ID",+ 1,+ 81.57334253952367,+ 76.95334253952366+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "IL",+ 5,+ 81.47444627947738,+ 76.68444627947737+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "IN",+ 4,+ 65.60500025466139,+ 61.312500254661394+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "KS",+ 2,+ 62.188390946168994,+ 58.393390946169+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "KY",+ 8,+ 60.827736660180484,+ 57.38523666018048+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "LA",+ 7,+ 61.45751216540284,+ 59.093226451117125+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "MA",+ 1,+ 44.98927237126308,+ 42.33927237126308+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "MD",+ 1,+ 89.0715141414441,+ 84.03151414144409+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "ME",+ 2,+ 63.30947481775763,+ 60.009474817757635+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "MI",+ 13,+ 62.21243672031183,+ 58.88746623986803+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "MN",+ 4,+ 44.78459665188822,+ 41.90209665188822+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "MO",+ 7,+ 55.06306705023233,+ 53.04063704823955+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "MS",+ 2,+ 88.66964681174835,+ 83.49598746872304+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "MT",+ 12,+ 42.885549289188944,+ 43.54676266572469+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "NC",+ 8,+ 53.06528816379524,+ 50.65778816379524+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "ND",+ 7,+ 55.99077568970089,+ 54.38376873920876+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "NE",+ 9,+ 57.51022614588424,+ 55.2548364969621+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "NM",+ 2,+ 74.82231756335274,+ 71.17231756335273+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "NV",+ 1,+ 59.47800900192853,+ 55.668009001928525+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "NY",+ 4,+ 55.26023833036837,+ 53.13523833036837+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "OH",+ 6,+ 67.33080891350552,+ 63.66914224683886+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "OK",+ 3,+ 57.80920649327999,+ 57.18068446095285+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "OR",+ 5,+ 44.42473307913903,+ 44.42473307913903+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "PA",+ 4,+ 53.0579794243676,+ 50.05297942436761+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "SC",+ 1,+ 88.50598746872305,+ 83.49598746872304+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "SD",+ 5,+ 52.24872921503326,+ 52.47263231621134+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "TN",+ 4,+ 62.5905040913126,+ 58.495504091312604+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "TX",+ 14,+ 60.08007122527176,+ 56.54649979670033+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "UT",+ 2,+ 77.59195453331037,+ 74.11195453331037+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "VA",+ 1,+ 38.60783079127111,+ 37.01783079127111+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "WA",+ 8,+ 63.29574328545146,+ 60.13252421996355+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "WI",+ 11,+ 62.16049078840323,+ 59.614817019845106+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "WV",+ 3,+ 67.74993708402353,+ 63.91660375069019+ ],+ [+ "2022-01-01T00:00:00Z",+ "Widget",+ "WY",+ 4,+ 64.29795055745221,+ 61.82295055745222+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "AK",+ 20,+ 50.322138277070444,+ 50.970943556100586+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "AL",+ 22,+ 50.36664802482181,+ 49.63684458119403+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "AR",+ 14,+ 56.57426984442134,+ 53.75986194403256+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "AZ",+ 2,+ 47.455567402829686,+ 44.93556740282969+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "CA",+ 26,+ 54.01956001772893,+ 50.49552824655852+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "CO",+ 32,+ 52.18780714802147,+ 51.57665100679768+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "CT",+ 2,+ 54.085437427288355,+ 50.85543742728835+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "DE",+ 1,+ 74.87095783152942,+ 74.87095783152942+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "FL",+ 12,+ 55.66401107996727,+ 53.00601523481866+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "GA",+ 26,+ 52.9262170408591,+ 53.981889631725714+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "IA",+ 24,+ 59.98350771372767,+ 56.754992136911326+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "ID",+ 4,+ 60.88243588714304,+ 57.434935887143034+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "IL",+ 23,+ 56.193886519051844,+ 52.92177713097798+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "IN",+ 21,+ 55.31635381707728,+ 52.050478957579344+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "KS",+ 19,+ 58.188881313580794,+ 54.637828682001846+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "KY",+ 21,+ 48.28884496091949,+ 45.69225599695307+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "LA",+ 11,+ 50.804968164601036,+ 49.04199694398109+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "MA",+ 2,+ 32.24267236127382,+ 30.342672361273817+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "MD",+ 7,+ 45.00598183646497,+ 42.45883897932212+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "ME",+ 6,+ 45.71165637726609,+ 43.32998971059943+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "MI",+ 18,+ 51.36812788840027,+ 49.489390467381604+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "MN",+ 27,+ 53.092135336379066,+ 49.78246953287782+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "MO",+ 23,+ 52.160691699639244,+ 50.26692738008937+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "MS",+ 13,+ 65.27428958786068,+ 61.55563727183446+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "MT",+ 43,+ 48.28543785996245,+ 48.553558838994824+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "NC",+ 21,+ 49.37962084936985,+ 48.74675107121582+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "ND",+ 20,+ 62.15688645174007,+ 59.29772770030139+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "NE",+ 25,+ 48.49848801747345,+ 47.07747374903645+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "NJ",+ 4,+ 62.37591917269202,+ 58.293419172692026+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "NM",+ 12,+ 56.003437709217316,+ 53.507920353652416+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "NV",+ 3,+ 57.6198915576809,+ 53.92655822434756+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "NY",+ 29,+ 49.599533474737264,+ 48.253230280348006+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "OH",+ 21,+ 50.99364764362701,+ 48.53285309493458+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "OK",+ 10,+ 54.307807182675575,+ 52.63219230087182+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "OR",+ 12,+ 42.56243247757567,+ 42.56243247757567+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "PA",+ 20,+ 45.4632280299524,+ 43.35228033153986+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "SC",+ 19,+ 52.2044037889135,+ 50.361579660236835+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "SD",+ 26,+ 49.02478014712437,+ 47.62966679396975+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "TN",+ 11,+ 64.7704466412445,+ 61.57726979794151+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "TX",+ 61,+ 57.94518617101403,+ 55.15106299594023+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "UT",+ 3,+ 60.78545974512809,+ 58.05879307846143+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "VA",+ 11,+ 59.62292971901901,+ 57.545889903617585+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "VT",+ 5,+ 66.00370508262729,+ 62.267705082627295+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "WA",+ 20,+ 54.57821950117304,+ 52.16254552285274+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "WI",+ 31,+ 57.31091852629173,+ 54.737117512847284+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "WV",+ 7,+ 56.3857148442297,+ 53.649583741110064+ ],+ [+ "2023-01-01T00:00:00Z",+ "Doohickey",+ "WY",+ 15,+ 53.98433104619394,+ 52.83475000309578+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "AK",+ 18,+ 55.510289001444896,+ 55.510289001444896+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "AL",+ 28,+ 59.828724525053936,+ 58.17718932518014+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "AR",+ 18,+ 58.12927249291706,+ 55.413426470656916+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "AZ",+ 7,+ 68.13424731690216,+ 65.24658528435891+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "CA",+ 29,+ 60.00584789808403,+ 56.49501497766218+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "CO",+ 35,+ 58.95164495558585,+ 57.80194083779362+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "DE",+ 3,+ 84.77579891062057,+ 84.77579891062057+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "FL",+ 19,+ 63.452333772183735,+ 60.08053578178031+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "GA",+ 27,+ 62.231994921910236,+ 60.314497319470235+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "IA",+ 37,+ 54.08367762809354,+ 51.511164345581996+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "ID",+ 5,+ 69.11992543997556,+ 65.20792543997557+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "IL",+ 37,+ 54.20150870907131,+ 51.93732725787951+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "IN",+ 23,+ 55.52098188769192,+ 52.175567711873335+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "KS",+ 22,+ 59.23517564145296,+ 56.326394459732924+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "KY",+ 20,+ 53.95441754355543,+ 51.0992038472262+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "LA",+ 17,+ 51.38419332711611,+ 49.98000317767508+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "MA",+ 4,+ 59.929704975471445,+ 56.40470497547145+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "MD",+ 7,+ 58.401380792526346,+ 56.20579703738316+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "ME",+ 3,+ 67.62390452097203,+ 64.1005711876387+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "MI",+ 15,+ 66.77643112088589,+ 62.99643112088589+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "MN",+ 25,+ 61.729720401630296,+ 58.19211569503291+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "MO",+ 34,+ 67.08169340845015,+ 64.53119311392221+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "MS",+ 14,+ 49.9100441684573,+ 47.02006542704407+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "MT",+ 48,+ 56.17613511541469,+ 56.87635593156151+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "NC",+ 23,+ 66.43808939445098,+ 63.424611133581415+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "ND",+ 30,+ 65.78875966015879,+ 62.73645314368613+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "NE",+ 20,+ 63.91888635968106,+ 61.13462630933398+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "NH",+ 3,+ 55.28940763661282,+ 55.28940763661282+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "NJ",+ 4,+ 45.073009780602895,+ 42.1230097806029+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "NM",+ 8,+ 56.61039494302651,+ 53.850394943026515+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "NV",+ 4,+ 52.08724901060453,+ 49.816203708283844+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "NY",+ 21,+ 56.08946257427818,+ 53.93279590761151+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "OH",+ 17,+ 50.44678077439544,+ 48.45706309390128+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "OK",+ 14,+ 60.31399554914362,+ 58.00265729012558+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "OR",+ 14,+ 56.1586964752064,+ 56.1586964752064+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "PA",+ 22,+ 52.62187823826886,+ 50.26871065731599+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "SC",+ 19,+ 62.67343768521,+ 59.89853780070207+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "SD",+ 35,+ 64.03466270098373,+ 61.88171344960065+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "TN",+ 22,+ 61.550547378024916,+ 58.0022305613249+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "TX",+ 73,+ 57.324956241091726,+ 54.33740286339475+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "UT",+ 4,+ 56.98242320579194,+ 54.42492320579194+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "VA",+ 18,+ 52.61737411889389,+ 51.06015490858191+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "VT",+ 9,+ 52.8348328034742,+ 49.84594391458531+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "WA",+ 27,+ 52.797092408829364,+ 49.82584649451256+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "WI",+ 28,+ 58.627323389894826,+ 56.048968285535345+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "WV",+ 14,+ 65.10753729334319,+ 61.42253729334318+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gadget",+ "WY",+ 14,+ 46.488512565629755,+ 45.586836743315445+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "AK",+ 22,+ 50.84486514992209,+ 51.564287299243624+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "AL",+ 23,+ 55.31852593589543,+ 53.1915694141563+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "AR",+ 13,+ 58.22148402451516,+ 55.15443868589422+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "AZ",+ 5,+ 64.90001821584067,+ 61.458018215840674+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "CA",+ 41,+ 61.27989146760952,+ 57.80128318041288+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "CO",+ 36,+ 58.03046694593636,+ 56.79316391868912+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "DE",+ 1,+ 76.28323416938524,+ 76.28323416938524+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "FL",+ 10,+ 58.78756631606433,+ 55.461566316064335+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "GA",+ 20,+ 50.76130252200916,+ 49.24116673440075+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "IA",+ 23,+ 66.51617850544291,+ 64.57088104463838+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "ID",+ 14,+ 52.79602877357862,+ 49.807457345007194+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "IL",+ 26,+ 60.41095034415637,+ 57.22537243032114+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "IN",+ 20,+ 61.40195458443231,+ 57.86795254917263+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "KS",+ 21,+ 59.54642668090099,+ 56.878189588031745+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "KY",+ 29,+ 56.25576920408579,+ 54.00529203640747+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "LA",+ 20,+ 63.33265210682663,+ 61.31734516529627+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "MA",+ 4,+ 53.37818557720742,+ 52.68258144381802+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "MD",+ 3,+ 49.16191776227055,+ 46.38191776227055+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "ME",+ 4,+ 36.741527206162615,+ 34.82652720616261+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "MI",+ 27,+ 50.11256420592479,+ 47.97487158611573+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "MN",+ 38,+ 58.006113683350364,+ 54.40558545919592+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "MO",+ 32,+ 51.425262166490604,+ 49.54056677492847+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "MS",+ 14,+ 43.52164321258849,+ 41.46105561209609+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "MT",+ 45,+ 48.3335779848252,+ 49.04918073128215+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "NC",+ 17,+ 48.90366868233661,+ 46.95938165567403+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "ND",+ 20,+ 61.26239349303037,+ 58.34639349303038+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "NE",+ 33,+ 52.66688056935985,+ 50.3281873977227+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "NH",+ 1,+ 66.44160029487797,+ 66.44160029487797+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "NJ",+ 4,+ 40.17716911740525,+ 37.54716911740525+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "NM",+ 9,+ 46.31144134777661,+ 45.56043841459497+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "NV",+ 2,+ 28.94149349422585,+ 27.08649349422585+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "NY",+ 24,+ 57.684995354750505,+ 56.003308443187215+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "OH",+ 18,+ 57.51044416505657,+ 54.82034195685828+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "OK",+ 13,+ 49.936178754779114,+ 48.02472343976152+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "OR",+ 22,+ 48.82302353589794,+ 49.14668877331411+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "PA",+ 11,+ 62.39918092196477,+ 59.49542726451223+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "SC",+ 16,+ 55.43327016910758,+ 53.390512911626104+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "SD",+ 19,+ 57.32874752917625,+ 55.45200521213368+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "TN",+ 20,+ 58.075349854114954,+ 54.27534985411495+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "TX",+ 47,+ 59.86683338624138,+ 56.98907695103594+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "UT",+ 5,+ 49.37630039022755,+ 47.16030039022755+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "VA",+ 15,+ 51.82481097106753,+ 50.42189324712611+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "VT",+ 5,+ 58.6571076923065,+ 55.3351076923065+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "WA",+ 20,+ 57.34819662704731,+ 54.458120773129345+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "WI",+ 31,+ 52.11732920213135,+ 49.77647666024409+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "WV",+ 10,+ 66.98505064272798,+ 64.0915244496639+ ],+ [+ "2023-01-01T00:00:00Z",+ "Gizmo",+ "WY",+ 11,+ 58.07701856205702,+ 56.49590782621297+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "AK",+ 33,+ 52.45041120629145,+ 52.72916445980381+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "AL",+ 25,+ 53.70229658067186,+ 52.10464087549951+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "AR",+ 14,+ 55.89275644189617,+ 52.631928627462436+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "AZ",+ 6,+ 60.58191418152038,+ 57.36858084818705+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "CA",+ 44,+ 62.48932918977562,+ 58.33672967461782+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "CO",+ 44,+ 56.73839942077593,+ 55.79572637718843+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "CT",+ 1,+ 94.6634841727878,+ 89.0134841727878+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "FL",+ 23,+ 49.281048596619,+ 46.79084397939655+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "GA",+ 33,+ 53.984341826052564,+ 52.40137875014366+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "IA",+ 35,+ 60.89609422942612,+ 58.01603651266084+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "ID",+ 12,+ 68.35693791885063,+ 65.20136672573673+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "IL",+ 29,+ 57.68392686140442,+ 54.45216079459417+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "IN",+ 25,+ 60.6819434640437,+ 57.47785530391526+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "KS",+ 21,+ 60.742135507313336,+ 57.14768800731379+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "KY",+ 20,+ 62.23444205983487,+ 59.11958414491533+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "LA",+ 13,+ 67.10248457352657,+ 64.52094611198811+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "MA",+ 4,+ 55.57366620542592,+ 52.30366620542593+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "MD",+ 6,+ 74.23849659820792,+ 70.40203890990578+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "ME",+ 4,+ 63.82321729589356,+ 60.495717295893556+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "MI",+ 27,+ 53.45836781210586,+ 51.018381376426994+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "MN",+ 41,+ 59.03622194217617,+ 56.22293287227876+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "MO",+ 34,+ 64.93712721553003,+ 62.59227281105382+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "MS",+ 19,+ 54.50171593004797,+ 51.267415616222046+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "MT",+ 35,+ 57.94908068266393,+ 58.62320261947831+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "NC",+ 32,+ 55.24036891451929,+ 53.9497433844965+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "ND",+ 23,+ 52.06742348210346,+ 50.153940885723934+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "NE",+ 33,+ 60.578089607801274,+ 58.07928528777305+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "NJ",+ 7,+ 62.84990942801079,+ 59.824630797316715+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "NM",+ 8,+ 56.88334853773365,+ 54.108348537733654+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "NV",+ 1,+ 41.266539622351054,+ 38.616539622351056+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "NY",+ 30,+ 54.68432620800577,+ 53.394252948853506+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "OH",+ 27,+ 68.66466857467381,+ 65.6962006787046+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "OK",+ 12,+ 61.874369309698416,+ 59.33547218981291+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "OR",+ 20,+ 59.65769263868536,+ 59.65769263868536+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "PA",+ 15,+ 52.188421320937145,+ 49.47786613876874+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "SC",+ 16,+ 63.186578019681676,+ 63.82585352111415+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "SD",+ 22,+ 61.0963249245333,+ 59.82100272896084+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "TN",+ 27,+ 59.558099751894716,+ 56.157875378596174+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "TX",+ 77,+ 62.05823303130549,+ 58.81952591521175+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "UT",+ 5,+ 61.83184773481978,+ 60.84080077055863+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "VA",+ 17,+ 54.96527472272614,+ 53.44909595036789+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "VT",+ 4,+ 34.31816870119147,+ 32.375668701191465+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "WA",+ 12,+ 78.72302665926574,+ 74.51193134052396+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "WI",+ 41,+ 56.97239214559674,+ 54.566193633054084+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "WV",+ 16,+ 59.913290333093734,+ 56.522665333093734+ ],+ [+ "2023-01-01T00:00:00Z",+ "Widget",+ "WY",+ 10,+ 55.26796289646144,+ 53.628170574415584+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "AK",+ 31,+ 67.63905466730932,+ 67.84103578696546+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "AL",+ 35,+ 81.14788623281636,+ 78.69945457045908+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "AR",+ 21,+ 78.20983777430938,+ 73.43698063145223+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "AZ",+ 4,+ 99.79460132140551,+ 95.15043699125715+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "CA",+ 46,+ 82.54907324827113,+ 77.1651778270226+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "CO",+ 52,+ 83.84497513248888,+ 81.97137106971972+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "CT",+ 2,+ 130.77175045336242,+ 122.96675045336242+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "DE",+ 4,+ 61.8475100871199,+ 61.8475100871199+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "FL",+ 16,+ 100.66987197311202,+ 95.976250619556+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "GA",+ 27,+ 78.87577403215276,+ 76.70267550533333+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "IA",+ 34,+ 80.2268442860801,+ 76.17950757435727+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "ID",+ 6,+ 85.278191115513,+ 80.45152444884633+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "IL",+ 41,+ 83.16686911417675,+ 78.98682825087981+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "IN",+ 34,+ 81.46928342768,+ 76.35393888614969+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "KS",+ 30,+ 77.77659657000248,+ 73.16301917059418+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "KY",+ 31,+ 85.33990590478136,+ 80.62032685914077+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "LA",+ 10,+ 82.05142786843615,+ 80.1440217249375+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "MA",+ 1,+ 33.76177348624573,+ 36.37128575934436+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "MD",+ 5,+ 111.04548068593708,+ 105.58317588788768+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "ME",+ 8,+ 103.24729661328973,+ 97.86354661328974+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "MI",+ 48,+ 84.79280659238039,+ 80.42824860452035+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "MN",+ 60,+ 77.97465275032674,+ 73.49118017427979+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "MO",+ 40,+ 80.3300441643054,+ 77.5939357935305+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "MS",+ 28,+ 87.00007127818743,+ 81.5750374977227+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "MT",+ 51,+ 72.85793442981849,+ 73.28939195426763+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "NC",+ 28,+ 81.55857651291753,+ 77.99519986487563+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "ND",+ 45,+ 80.77553468147512,+ 77.45890385535643+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "NE",+ 34,+ 88.89179871588004,+ 84.38844312447159+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "NH",+ 1,+ 52.723521442619514,+ 52.723521442619514+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "NJ",+ 6,+ 84.88102280072455,+ 79.32768946739122+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "NM",+ 9,+ 83.55537983172296,+ 79.48204649838962+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "NV",+ 2,+ 73.26636534057074,+ 68.57136534057075+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "NY",+ 39,+ 84.91465458542005,+ 82.15158710547415+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "OH",+ 34,+ 79.04561453673242,+ 75.1603016473957+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "OK",+ 18,+ 91.31011907512351,+ 88.28432511909294+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "OR",+ 17,+ 79.71475687964517,+ 80.4007733641809+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "PA",+ 25,+ 74.65418888320623,+ 71.15824072120957+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "SC",+ 26,+ 81.98599356899882,+ 78.49341739265981+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "SD",+ 21,+ 85.73506856188521,+ 82.7232747870299+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "TN",+ 15,+ 71.70363176421274,+ 67.81895948557309+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "TX",+ 84,+ 80.41871722537088,+ 76.26352868542892+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "UT",+ 7,+ 98.04488849204822,+ 94.18265084692482+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "VA",+ 19,+ 78.11500054018579,+ 75.5727245220932+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "VT",+ 4,+ 87.25293537227356,+ 82.31293537227356+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "WA",+ 30,+ 78.44620051562106,+ 73.9153319152884+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "WI",+ 52,+ 82.14775913526897,+ 78.44193729352081+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "WV",+ 8,+ 87.50925873216389,+ 83.35709562992898+ ],+ [+ "2024-01-01T00:00:00Z",+ "Doohickey",+ "WY",+ 17,+ 88.83830975066391,+ 85.42242739772273+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "AK",+ 31,+ 75.35249097247276,+ 76.18513966753096+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "AL",+ 37,+ 97.35959808948641,+ 94.56745904649559+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "AR",+ 24,+ 90.3718631146758,+ 85.1277609085407+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "AZ",+ 5,+ 96.31437635049144,+ 91.20637635049145+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "CA",+ 54,+ 88.74235702277596,+ 83.05919775547055+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "CO",+ 60,+ 86.66527937456101,+ 84.8702818470022+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "CT",+ 2,+ 70.65624915708129,+ 66.43624915708129+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "DE",+ 3,+ 42.26362907895607,+ 42.26362907895607+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "FL",+ 28,+ 85.74892474500109,+ 81.2222588185041+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "GA",+ 36,+ 85.88048657445047,+ 83.52322709807738+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "IA",+ 33,+ 87.81022824121091,+ 83.44088585786575+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "ID",+ 20,+ 90.9292841904972,+ 86.26024954765131+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "IL",+ 36,+ 90.8749186606764,+ 85.92148185327666+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "IN",+ 37,+ 95.28844631174174,+ 89.64521402743583+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "KS",+ 40,+ 88.94904069421248,+ 83.7314292571026+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "KY",+ 32,+ 77.7759182669436,+ 73.93577594640443+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "LA",+ 19,+ 85.16281832368097,+ 82.34992670653924+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "MA",+ 11,+ 88.83910881118784,+ 83.61456335664239+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "MD",+ 8,+ 95.2933616207773,+ 90.79518691338707+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "ME",+ 8,+ 84.16019750760263,+ 79.77144750760264+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "MI",+ 58,+ 92.33727769793914,+ 87.25857340036441+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "MN",+ 73,+ 94.642103699562,+ 88.86002538818325+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "MO",+ 34,+ 96.02745364043804,+ 92.276959308823+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "MS",+ 23,+ 93.09776797178007,+ 87.25669994250808+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "MT",+ 82,+ 82.6709573387074,+ 83.26675050945832+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "NC",+ 60,+ 88.84872227525611,+ 85.3396145120827+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "ND",+ 40,+ 83.33168681055834,+ 79.61294416403653+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "NE",+ 44,+ 84.97937815952115,+ 81.26817496063936+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "NH",+ 2,+ 86.9691335233566,+ 87.92507340323306+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "NJ",+ 4,+ 78.20095230408457,+ 73.08345230408457+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "NM",+ 16,+ 96.12797011760051,+ 92.17041724236805+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "NV",+ 3,+ 103.29923486794814,+ 96.69784113152056+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "NY",+ 60,+ 86.88746786361723,+ 83.9215431655238+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "OH",+ 37,+ 89.78644494922472,+ 85.97336324250492+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "OK",+ 19,+ 100.58078575558443,+ 96.56874601931608+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "OR",+ 33,+ 76.72294834574323,+ 77.5001709608857+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "PA",+ 35,+ 90.65437976815613,+ 86.10551427298795+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "SC",+ 32,+ 93.76001074657009,+ 88.75966744649321+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "SD",+ 31,+ 93.56400930248012,+ 90.64293819407445+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "TN",+ 30,+ 87.21085109040443,+ 81.67977241636271+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "TX",+ 103,+ 87.66043447156095,+ 82.95516404558855+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "UT",+ 7,+ 96.33692594178521,+ 92.0126402274995+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "VA",+ 25,+ 95.9400800383357,+ 93.29919559572664+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "VT",+ 9,+ 93.74174114015997,+ 88.43507447349332+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "WA",+ 32,+ 92.1444080330373,+ 87.00002407791887+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "WI",+ 57,+ 87.84620890591157,+ 84.57326102134357+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "WV",+ 15,+ 115.81404634562108,+ 109.25737967895442+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gadget",+ "WY",+ 17,+ 81.43786656906104,+ 78.56941144140727+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "AK",+ 50,+ 82.47229776121644,+ 82.77212572764412+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "AL",+ 47,+ 83.37622124496262,+ 80.81229682067068+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "AR",+ 26,+ 86.1776515329143,+ 81.1939623876681+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "AZ",+ 5,+ 85.95497951846642,+ 81.39897951846642+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "CA",+ 61,+ 87.19228015522145,+ 81.66064560002646+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "CO",+ 59,+ 86.07416659026029,+ 84.00430329490392+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "CT",+ 1,+ 130.9396127553999,+ 123.1196127553999+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "DE",+ 2,+ 69.4784151827146,+ 71.53728939345484+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "FL",+ 21,+ 103.36283296851603,+ 98.58229156373525+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "GA",+ 32,+ 83.38085126940223,+ 80.34746543619266+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "IA",+ 57,+ 86.99696013837921,+ 82.61573444366688+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "ID",+ 10,+ 73.62498089530209,+ 69.4579808953021+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "IL",+ 54,+ 84.36915513003412,+ 79.6879598528871+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "IN",+ 34,+ 78.84714977538553,+ 74.80818010861206+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "KS",+ 35,+ 89.49892069735557,+ 84.30742755221728+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "KY",+ 42,+ 84.15455244317727,+ 80.0187713116136+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "LA",+ 17,+ 90.16048146060608,+ 87.15380218296653+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "MA",+ 10,+ 103.86306780753377,+ 98.33238424968498+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "MD",+ 6,+ 64.53062214509212,+ 61.949164456789994+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "ME",+ 10,+ 82.02888370627136,+ 77.75188370627136+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "MI",+ 53,+ 84.54307171174905,+ 80.907445950434+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "MN",+ 70,+ 88.44681594252079,+ 83.50254485008092+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "MO",+ 57,+ 92.09316315416619,+ 88.62243276735306+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "MS",+ 38,+ 98.17194749846685,+ 92.26967059033174+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "MT",+ 72,+ 82.46556551803836,+ 83.06537221802576+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "NC",+ 40,+ 92.18470274985428,+ 88.13385343604314+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "ND",+ 45,+ 85.59546215988793,+ 81.91605622098099+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "NE",+ 46,+ 89.59127644569205,+ 85.50053511442445+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "NJ",+ 3,+ 84.5159908531492,+ 78.9859908531492+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "NM",+ 12,+ 86.13362435152675,+ 81.93445768486008+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "NV",+ 2,+ 81.67803872201826,+ 76.44303872201826+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "NY",+ 52,+ 85.55915671038849,+ 82.53170795323777+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "OH",+ 35,+ 79.71983374528364,+ 75.90855070710211+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "OK",+ 23,+ 75.46348421986208,+ 73.14512015291992+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "OR",+ 35,+ 84.62038391277683,+ 85.19566564437984+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "PA",+ 29,+ 80.95220483940416,+ 76.97925533915105+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "SC",+ 26,+ 87.85422308313358,+ 83.04976273790143+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "SD",+ 40,+ 86.16874037066728,+ 83.23242307277037+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "TN",+ 34,+ 86.11671211693243,+ 80.48288858752068+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "TX",+ 128,+ 82.67826508042457,+ 78.40962375249232+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "UT",+ 6,+ 98.89420714702916,+ 96.82200088362308+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "VA",+ 33,+ 88.01337905395272,+ 84.9549897025697+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "VT",+ 8,+ 101.71963638375837,+ 95.96213638375838+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "WA",+ 27,+ 93.59383071564503,+ 88.40972882754043+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "WI",+ 61,+ 83.04697274374041,+ 79.33234716765817+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "WV",+ 20,+ 87.90682306956981,+ 83.24210222353527+ ],+ [+ "2024-01-01T00:00:00Z",+ "Gizmo",+ "WY",+ 18,+ 71.93265822107364,+ 69.16599155440697+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "AK",+ 30,+ 93.20059603063068,+ 93.53362531822297+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "AL",+ 38,+ 94.00803243243297,+ 90.98946515011271+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "AR",+ 25,+ 93.3703595292698,+ 87.6711595292698+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "AZ",+ 6,+ 107.48377389348263,+ 101.78377389348263+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "CA",+ 41,+ 95.81295400262042,+ 89.84814578786157+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "CO",+ 43,+ 78.45094218613855,+ 76.928475220426+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "CT",+ 1,+ 67.53890855689461,+ 63.50890855689462+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "FL",+ 29,+ 91.86885124012758,+ 87.77170641570386+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "GA",+ 40,+ 91.52724241751997,+ 88.03310572716765+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "IA",+ 38,+ 100.64128687518595,+ 95.93829282688786+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "ID",+ 25,+ 92.71910569016723,+ 87.95819222221759+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "IL",+ 41,+ 93.07383956876444,+ 88.31658292245199+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "IN",+ 42,+ 111.16919782707258,+ 104.1294045953378+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "KS",+ 29,+ 103.98197543251234,+ 98.01571887181554+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "KY",+ 52,+ 92.32254101117212,+ 87.39264414703595+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "LA",+ 17,+ 87.66966112598976,+ 84.9591459568276+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "MA",+ 7,+ 63.25707967172952,+ 60.10020997184349+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "MD",+ 8,+ 71.79447074335877,+ 67.86383207389994+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "ME",+ 8,+ 69.84657426428188,+ 67.0778892244395+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "MI",+ 52,+ 90.2266675419678,+ 85.72980479807015+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "MN",+ 41,+ 98.11614468045451,+ 92.14174098805262+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "MO",+ 44,+ 78.72499542390119,+ 76.24799242131708+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "MS",+ 29,+ 103.71768620308572,+ 97.79932548908334+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "MT",+ 67,+ 87.79042518543896,+ 88.1715094896494+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "NC",+ 64,+ 92.4436960867847,+ 88.97540711494278+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "ND",+ 52,+ 95.36117151186662,+ 91.27803586714751+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "NE",+ 49,+ 97.54094072722964,+ 92.60179677863078+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "NH",+ 2,+ 93.21637655230971,+ 97.08599150985364+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "NJ",+ 9,+ 95.55487244144814,+ 89.30376133033703+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "NM",+ 8,+ 92.62143571341176,+ 88.10643571341176+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "NV",+ 1,+ 50.26215255778118,+ 47.04215255778118+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "NY",+ 57,+ 101.23175882712071,+ 97.8644335160347+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "OH",+ 38,+ 96.89117275508951,+ 92.62816453872858+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "OK",+ 27,+ 83.89852809080888,+ 80.64039014004207+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "OR",+ 32,+ 85.02410044026928,+ 85.66602987019145+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "PA",+ 32,+ 93.70261959336906,+ 88.68121061354287+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "SC",+ 21,+ 91.47387972130022,+ 86.74049019729132+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "SD",+ 41,+ 85.83188854184276,+ 82.55641366249309+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "TN",+ 45,+ 83.67508379531706,+ 78.61185848787095+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "TX",+ 118,+ 92.96517313634294,+ 87.98083660482948+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "UT",+ 10,+ 85.66999601068306,+ 82.86903567221138+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "VA",+ 34,+ 88.4560517486957,+ 85.36266266697635+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "VT",+ 3,+ 79.24339787147699,+ 77.00561279990136+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "WA",+ 43,+ 86.70248835071301,+ 81.90973264519131+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "WI",+ 59,+ 92.00617879509899,+ 88.16079702626885+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "WV",+ 11,+ 97.23633624287261,+ 91.73269987923626+ ],+ [+ "2024-01-01T00:00:00Z",+ "Widget",+ "WY",+ 22,+ 85.7004211271942,+ 82.40360294537602+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "AK",+ 36,+ 73.65987747046181,+ 74.19677055075739+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "AL",+ 34,+ 83.27504814490501,+ 81.02801052938068+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "AR",+ 23,+ 78.96365223319441,+ 74.91895691157417+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "AZ",+ 5,+ 80.42373282347995,+ 77.92458373214421+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "CA",+ 43,+ 82.85626436896791,+ 77.44953153123599+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "CO",+ 52,+ 83.05080351371272,+ 81.4854370419189+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "DE",+ 1,+ 59.53172693453274,+ 59.53172693453274+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "FL",+ 22,+ 80.55577220779519,+ 76.21967381572112+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "GA",+ 36,+ 79.60962686289693,+ 76.83857598080075+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "IA",+ 33,+ 80.01381133870525,+ 75.74039303581218+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "ID",+ 13,+ 90.20499070620728,+ 85.1972370796719+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "IL",+ 33,+ 95.14710877114842,+ 90.15235110143847+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "IN",+ 32,+ 87.59373697935789,+ 82.27832354079796+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "KS",+ 29,+ 91.65464003642772,+ 87.46195508795451+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "KY",+ 40,+ 82.00639986029263,+ 78.11387054529455+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "LA",+ 17,+ 87.65448011591263,+ 84.28389188061851+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "MA",+ 9,+ 84.92768777158184,+ 81.09155787382156+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "MD",+ 7,+ 76.83022819831994,+ 73.50659996130254+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "ME",+ 5,+ 84.23210474898195,+ 79.84210474898195+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "MI",+ 43,+ 79.97913157392347,+ 76.44381420201582+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "MN",+ 65,+ 76.9544597729172,+ 72.36353837284157+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "MO",+ 52,+ 73.20685204941728,+ 70.36199275274768+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "MS",+ 29,+ 78.03476690814887,+ 73.37451264449666+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "MT",+ 59,+ 78.50400314734365,+ 78.83957962314136+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "NC",+ 44,+ 82.23978903942513,+ 79.1844845789738+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "ND",+ 51,+ 74.74953939084115,+ 71.35590645715702+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "NE",+ 34,+ 78.78676816104195,+ 75.35149072684634+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "NH",+ 2,+ 84.54602495013631,+ 84.54602495013631+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "NJ",+ 6,+ 72.53123548529983,+ 67.78456881863316+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "NM",+ 8,+ 103.19953850303646,+ 98.83960732712423+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "NV",+ 4,+ 67.33425205442053,+ 65.13272388828918+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "NY",+ 53,+ 83.71380682632646,+ 80.870368396596+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "OH",+ 28,+ 84.29420927617281,+ 80.45107897134562+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "OK",+ 19,+ 88.74215925529036,+ 84.94428422067047+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "OR",+ 24,+ 77.96997358325952,+ 78.19357215710107+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "PA",+ 30,+ 79.34125900286408,+ 75.49995087292865+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "SC",+ 20,+ 74.92211566158683,+ 71.35375330103234+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "SD",+ 35,+ 79.73352230027062,+ 77.1099044280779+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "TN",+ 33,+ 93.23357964093994,+ 87.93789602228127+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "TX",+ 92,+ 82.20489797555977,+ 78.10929305760725+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "UT",+ 5,+ 76.72568465721005,+ 74.77098628816155+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "VA",+ 31,+ 81.46451338198852,+ 78.79092385301058+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "VT",+ 8,+ 91.18042911587126,+ 86.02042911587127+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "WA",+ 25,+ 86.9560484365985,+ 81.6500484365985+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "WI",+ 51,+ 83.35313281523294,+ 79.68413097639075+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "WV",+ 14,+ 80.62421046151643,+ 76.49428448747818+ ],+ [+ "2025-01-01T00:00:00Z",+ "Doohickey",+ "WY",+ 17,+ 78.06496606174778,+ 75.06320135586543+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "AK",+ 54,+ 92.22834175345378,+ 93.18102963297027+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "AL",+ 54,+ 86.83805334179235,+ 83.89177954816782+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "AR",+ 26,+ 99.71569159204284,+ 94.0416037226641+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "AZ",+ 7,+ 103.17258744853926,+ 98.03613467275281+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "CA",+ 51,+ 98.25627311150397,+ 91.51580871415642+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "CO",+ 63,+ 88.37587718551525,+ 86.36775730182308+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "CT",+ 5,+ 65.72377540697822,+ 61.79777540697822+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "FL",+ 33,+ 93.71772692877435,+ 88.88481285001325+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "GA",+ 42,+ 98.29324194924745,+ 95.30543675599695+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "IA",+ 68,+ 90.24467242241242,+ 85.48612175840942+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "ID",+ 17,+ 91.31444730684007,+ 87.3181336811201+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "IL",+ 54,+ 92.51533654691828,+ 87.56016082009977+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "IN",+ 45,+ 95.26982002448528,+ 89.69201292823847+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "KS",+ 31,+ 86.51645469067913,+ 81.35653344899936+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "KY",+ 50,+ 89.45900135292406,+ 85.1000066784024+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "LA",+ 20,+ 85.51207529070962,+ 82.55415936990633+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "MA",+ 8,+ 86.69123812862412,+ 81.59248812862411+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "MD",+ 4,+ 92.30520156064544,+ 89.1585841163384+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "ME",+ 2,+ 39.24077362543698,+ 37.19577362543698+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "MI",+ 54,+ 98.04509993787474,+ 92.94185198956782+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "MN",+ 82,+ 94.76290775292946,+ 89.10135530269127+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "MO",+ 47,+ 85.54078583045634,+ 83.13203031755839+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "MS",+ 36,+ 87.85036895575607,+ 82.65624278628135+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "MT",+ 79,+ 86.74663504561619,+ 87.1119225920229+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "NC",+ 55,+ 85.23762640805892,+ 81.71117944811907+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "ND",+ 64,+ 93.61729189393341,+ 90.02477361869481+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "NE",+ 44,+ 88.38102073449105,+ 84.38439825492118+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "NH",+ 4,+ 81.99478250946177,+ 81.99478250946177+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "NJ",+ 8,+ 90.23188526141578,+ 84.33063526141578+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "NM",+ 17,+ 90.93557653923158,+ 86.75539641917928+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "NV",+ 5,+ 88.90583712744568,+ 84.05900088558913+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "NY",+ 64,+ 86.36748482371661,+ 83.6077492892498+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "OH",+ 45,+ 91.54050927198305,+ 86.92855055970276+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "OK",+ 20,+ 94.16814292962655,+ 90.46178231532303+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "OR",+ 35,+ 90.85792623592401,+ 91.20976497931882+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "PA",+ 43,+ 87.34332971573514,+ 83.0392430242347+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "SC",+ 28,+ 86.66728558570355,+ 81.96440448206202+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "SD",+ 56,+ 89.56827060805071,+ 86.54728559440231+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "TN",+ 38,+ 90.61587434298244,+ 85.15408989747955+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "TX",+ 130,+ 89.33875836093686,+ 84.81774906012676+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "UT",+ 9,+ 80.92426403182226,+ 80.86353227980989+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "VA",+ 29,+ 72.94313663664902,+ 70.36431475877029+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "VT",+ 12,+ 85.37418244376296,+ 80.75056950920238+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "WA",+ 40,+ 91.11539509148004,+ 85.80719077415327+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "WI",+ 56,+ 87.50046513483446,+ 83.80297461998109+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "WV",+ 20,+ 81.90612486740608,+ 77.42847898131421+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gadget",+ "WY",+ 29,+ 92.58777367077485,+ 89.739436775884+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "AK",+ 38,+ 83.13456375159531,+ 83.64756470238788+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "AL",+ 45,+ 81.46836107277191,+ 79.3618226213915+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "AR",+ 28,+ 88.11847073995438,+ 83.01103193488552+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "AZ",+ 7,+ 101.80947828431997,+ 97.49027976350634+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "CA",+ 46,+ 85.93287364059549,+ 80.27440965283083+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "CO",+ 59,+ 79.85921521373501,+ 78.1966982627839+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "CT",+ 3,+ 49.269907763104804,+ 46.329907763104806+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "DE",+ 1,+ 112.41825444654248,+ 112.41825444654248+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "FL",+ 29,+ 84.89148661513259,+ 80.23669787591501+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "GA",+ 41,+ 82.44523887327574,+ 79.89513514329562+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "IA",+ 44,+ 93.38380832293113,+ 88.49975120488799+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "ID",+ 13,+ 92.5013940012404,+ 87.48836068751463+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "IL",+ 59,+ 86.89109921036403,+ 82.26171794839303+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "IN",+ 41,+ 89.67964545119453,+ 84.88739336868116+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "KS",+ 29,+ 82.62706886543151,+ 77.7457964863859+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "KY",+ 46,+ 86.14315936209562,+ 81.98785428968597+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "LA",+ 13,+ 88.05876094169749,+ 84.67183786477442+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "MA",+ 5,+ 77.18130556653307,+ 73.64062200868428+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "MD",+ 5,+ 87.64179168420524,+ 82.67979168420524+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "ME",+ 7,+ 80.49709717290834,+ 77.43706477105493+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "MI",+ 49,+ 92.92779511993699,+ 87.89565685045729+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "MN",+ 83,+ 90.8087664815809,+ 85.50441292465462+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "MO",+ 48,+ 91.4940077027366,+ 88.16898548920577+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "MS",+ 28,+ 84.21677800165946,+ 78.99938358145704+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "MT",+ 78,+ 81.0150897806702,+ 81.33917999590855+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "NC",+ 54,+ 86.78131277553007,+ 83.37459067170016+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "ND",+ 46,+ 84.80688900120904,+ 81.5505424530267+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "NE",+ 45,+ 94.94462305566316,+ 90.09699374415302+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "NH",+ 2,+ 107.54436105558933,+ 107.54436105558933+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "NJ",+ 6,+ 90.99210177435721,+ 85.03710177435721+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "NM",+ 12,+ 85.79384679900296,+ 82.63560501737821+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "NV",+ 5,+ 95.12899561765859,+ 89.0289956176586+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "NY",+ 58,+ 82.11466273231468,+ 79.05432772464174+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "OH",+ 45,+ 84.64900966675694,+ 80.95742324947169+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "OK",+ 20,+ 78.6078169911461,+ 76.15577840866922+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "OR",+ 38,+ 90.06555667971111,+ 90.67553758500142+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "PA",+ 38,+ 87.34096981076257,+ 83.00312695299777+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "SC",+ 29,+ 85.15741336487427,+ 80.78596183216911+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "SD",+ 45,+ 86.07563805661755,+ 82.95939489314657+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "TN",+ 43,+ 89.15113042092425,+ 83.99172675288648+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "TX",+ 134,+ 88.09130933791864,+ 83.73215924454263+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "UT",+ 6,+ 102.70016490322374,+ 98.08849823655707+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "VA",+ 29,+ 87.4660472894627,+ 84.42161911614181+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "VT",+ 9,+ 75.39944153222986,+ 71.13166375445208+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "WA",+ 33,+ 106.6062597406807,+ 100.49363608473217+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "WI",+ 75,+ 88.89073042924647,+ 84.84899248029566+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "WV",+ 20,+ 93.76014078105663,+ 88.5872890704294+ ],+ [+ "2025-01-01T00:00:00Z",+ "Gizmo",+ "WY",+ 27,+ 82.35868269931673,+ 79.81488622734155+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "AK",+ 38,+ 95.39553318107707,+ 95.57968529276138+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "AL",+ 47,+ 89.15908115965082,+ 85.95241636551671+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "AR",+ 33,+ 87.6658634501694,+ 83.10618791803883+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "AZ",+ 5,+ 80.60182199098792,+ 78.19412174435878+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "CA",+ 48,+ 92.2891307388157,+ 86.27465730506275+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "CO",+ 74,+ 89.30054763916543,+ 87.24228135491106+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "CT",+ 3,+ 108.07581504627161,+ 102.27029738520235+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "DE",+ 1,+ 37.648145389078365,+ 37.648145389078365+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "FL",+ 25,+ 100.07116823345024,+ 94.91856846009775+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "GA",+ 37,+ 88.91802773601364,+ 86.53321891300999+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "IA",+ 63,+ 94.14473199738967,+ 88.9218850257247+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "ID",+ 22,+ 96.1090388642109,+ 91.53400686948385+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "IL",+ 44,+ 93.41588325843695,+ 88.98205610406806+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "IN",+ 35,+ 83.20790148129637,+ 78.38904753789745+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "KS",+ 56,+ 95.92795682497972,+ 90.56875353145463+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "KY",+ 38,+ 81.2715747967215,+ 77.10601350211857+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "LA",+ 22,+ 80.51646011079772,+ 78.24919337935444+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "MA",+ 9,+ 111.97117336518066,+ 105.38339558740287+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "MD",+ 13,+ 92.83197337013587,+ 88.07316691281864+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "ME",+ 8,+ 78.23854314006519,+ 74.89828055769335+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "MI",+ 49,+ 97.66573152298297,+ 92.39199268488943+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "MN",+ 79,+ 91.96819369931394,+ 86.51444705190659+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "MO",+ 51,+ 87.40706491323796,+ 84.50924424840338+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "MS",+ 41,+ 97.90226851297268,+ 92.35666296994367+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "MT",+ 90,+ 87.22515969899082,+ 87.58931172129202+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "NC",+ 51,+ 87.16376879521926,+ 83.75862331463712+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "ND",+ 56,+ 93.13479095133728,+ 88.94931762549014+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "NE",+ 45,+ 83.3534446697476,+ 79.85759665658337+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "NH",+ 8,+ 89.70491186186838,+ 90.00136507622675+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "NJ",+ 9,+ 94.05589240486499,+ 87.90255907153166+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "NM",+ 17,+ 82.46699592518816,+ 78.95210992278291+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "NV",+ 3,+ 55.69780605454592,+ 53.205806480410956+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "NY",+ 61,+ 88.45143053166282,+ 85.59773263936717+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "OH",+ 42,+ 95.67043553319266,+ 90.702452887582+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "OK",+ 30,+ 93.03672246466495,+ 89.28621898200616+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "OR",+ 35,+ 100.16931164819053,+ 101.01159528904805+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "PA",+ 52,+ 90.41172207469515,+ 85.75458788412386+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "SC",+ 33,+ 85.39276566075915,+ 81.03361433397829+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "SD",+ 52,+ 88.7638956066271,+ 86.3069848483546+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "TN",+ 41,+ 97.56850374196272,+ 91.61503041632155+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "TX",+ 136,+ 89.87529024709775,+ 85.14284427024653+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "UT",+ 7,+ 94.63911838398927,+ 90.39340409827498+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "VA",+ 36,+ 91.06063406739943,+ 87.75782505786093+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "VT",+ 9,+ 84.3503503623713,+ 79.57479480681575+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "WA",+ 28,+ 82.07956271299452,+ 77.68686962337722+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "WI",+ 50,+ 85.77044370598249,+ 82.32271765514038+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "WV",+ 20,+ 97.26248037869259,+ 92.73242467419539+ ],+ [+ "2025-01-01T00:00:00Z",+ "Widget",+ "WY",+ 27,+ 93.88191914923149,+ 90.436225179968+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "AK",+ 11,+ 78.875417981514,+ 78.875417981514+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "AL",+ 12,+ 74.46012526565163,+ 72.9350190735574+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "AR",+ 5,+ 86.2612871735486,+ 82.51040004598478+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "AZ",+ 2,+ 79.85480945863068,+ 78.16055884205784+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "CA",+ 12,+ 71.21612883029282,+ 67.15854493937134+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "CO",+ 15,+ 85.10573964590682,+ 83.84733660060745+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "CT",+ 1,+ 76.07687730741436,+ 71.53687730741436+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "FL",+ 5,+ 105.94721548329805,+ 99.95121548329806+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "GA",+ 10,+ 83.67376368210566,+ 80.45576368210565+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "IA",+ 16,+ 80.77053391663041,+ 76.92220573734542+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "ID",+ 10,+ 92.50520168224439,+ 87.26920168224439+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "IL",+ 10,+ 83.07854601852995,+ 78.19154601852995+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "IN",+ 7,+ 80.95547301475746,+ 75.6583301576146+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "KS",+ 6,+ 71.79235969955832,+ 68.82995413248796+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "KY",+ 17,+ 86.22137773649236,+ 81.56208077972079+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "LA",+ 4,+ 53.88552895338379,+ 51.81052895338379+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "MA",+ 3,+ 74.25823488119504,+ 69.89156821452838+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "MI",+ 17,+ 88.94360794478717,+ 84.53945672147778+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "MN",+ 23,+ 103.70522507419906,+ 97.13892821601681+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "MO",+ 13,+ 83.38499485010396,+ 80.70020292452342+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "MS",+ 7,+ 85.93801896367293,+ 81.48301745467118+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "MT",+ 18,+ 74.25173530592328,+ 75.20641126282685+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "NC",+ 21,+ 80.82016761135851,+ 77.89138077214143+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "ND",+ 18,+ 65.34208762562747,+ 62.63201144269566+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "NE",+ 16,+ 81.41679506011705,+ 77.97645346028831+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "NH",+ 2,+ 99.3106814357252,+ 99.3106814357252+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "NJ",+ 2,+ 111.4954433125907,+ 104.97064639099004+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "NM",+ 2,+ 74.51102531673793,+ 72.76097035152289+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "NY",+ 17,+ 86.7099983281096,+ 83.68725776221812+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "OH",+ 9,+ 97.71973494143127,+ 92.79767199672999+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "OK",+ 6,+ 91.96371481024306,+ 88.44176952406801+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "OR",+ 10,+ 77.33989969998795,+ 77.99675563820813+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "PA",+ 3,+ 87.60789059441034,+ 82.64789059441033+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "SC",+ 10,+ 82.67563508082073,+ 77.99563508082072+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "SD",+ 16,+ 84.8007133921797,+ 82.05266731436018+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "TN",+ 13,+ 88.03585676250404,+ 82.45498391691365+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "TX",+ 24,+ 73.79791004774928,+ 69.59065416722484+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "UT",+ 1,+ 69.77727121216614,+ 66.64727121216615+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "VA",+ 8,+ 88.34181065076281,+ 85.66500619603543+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "VT",+ 1,+ 119.16825444654248,+ 112.41825444654248+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "WA",+ 7,+ 97.60556699673805,+ 91.64842413959519+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "WI",+ 20,+ 86.17728477170652,+ 82.17951927573745+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "WV",+ 2,+ 38.25593909425851,+ 36.09093909425851+ ],+ [+ "2026-01-01T00:00:00Z",+ "Doohickey",+ "WY",+ 4,+ 92.8226213888656,+ 89.25262138886559+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "AK",+ 14,+ 83.06233340513731,+ 84.0292599143754+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "AL",+ 6,+ 84.96168303604115,+ 83.28804064343697+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "AR",+ 11,+ 93.89341804795868,+ 89.36385307721024+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "AZ",+ 2,+ 44.71797023701532,+ 42.347970237015325+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "CA",+ 17,+ 111.37905209463084,+ 103.76690718242278+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "CO",+ 25,+ 97.95883395962785,+ 95.86068162790768+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "DE",+ 1,+ 81.87627832636537,+ 81.87627832636537+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "FL",+ 9,+ 91.02353798799481,+ 85.8713157657726+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "GA",+ 13,+ 77.87942337017935,+ 74.99853852261496+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "IA",+ 19,+ 78.01264306041686,+ 73.70875103683368+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "ID",+ 6,+ 108.398391594171,+ 103.27216474971301+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "IL",+ 9,+ 95.03027159161971,+ 90.09602809966262+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "IN",+ 6,+ 102.56877850612207,+ 95.86044517278874+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "KS",+ 14,+ 97.91592191513948,+ 92.57119894041904+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "KY",+ 5,+ 99.45210155396289,+ 93.8221015539629+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "LA",+ 9,+ 115.02276013006583,+ 110.63642745410867+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "MA",+ 3,+ 130.31943964793732,+ 122.65277298127063+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "MD",+ 2,+ 123.46881371524239,+ 116.47881371524238+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "ME",+ 4,+ 57.36344112773757,+ 55.24220296564626+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "MI",+ 16,+ 110.90747174626134,+ 104.78550451343845+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "MN",+ 25,+ 88.21561879035896,+ 83.73732818782845+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "MO",+ 20,+ 80.64842167181101,+ 77.78206447023845+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "MS",+ 10,+ 66.39914862798138,+ 62.05514862798138+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "MT",+ 17,+ 90.98346308039375,+ 91.17352666302735+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "NC",+ 11,+ 84.627304978614,+ 80.79094134225036+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "ND",+ 15,+ 105.22153845709775,+ 100.65695156791418+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "NE",+ 12,+ 96.09646335493984,+ 91.82535343677681+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "NH",+ 1,+ 138.19082979039501,+ 143.4221774571866+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "NJ",+ 2,+ 68.02494729899443,+ 63.57494729899443+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "NM",+ 4,+ 96.1275134792808,+ 91.4400134792808+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "NV",+ 2,+ 125.00475412237822,+ 116.98975412237822+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "NY",+ 22,+ 90.58883260787229,+ 87.59613037514792+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "OH",+ 16,+ 83.32054974006313,+ 79.90652143606789+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "OK",+ 5,+ 106.22214161093065,+ 101.65014161093065+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "OR",+ 11,+ 99.55502809576559,+ 100.780606093245+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "PA",+ 11,+ 94.19361908750021,+ 89.23032281082322+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "SC",+ 10,+ 79.54064322492782,+ 75.83325792727989+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "SD",+ 15,+ 85.07010057947714,+ 81.91101225907147+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "TN",+ 14,+ 84.62186419102134,+ 80.35841940786328+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "TX",+ 33,+ 80.2865931339994,+ 76.32523290487723+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "UT",+ 3,+ 81.98966142550472,+ 80.58398005979436+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "VA",+ 12,+ 83.5810258806507,+ 80.7739183144973+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "VT",+ 2,+ 117.99434982484544,+ 111.31434982484544+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "WA",+ 7,+ 71.50879036447475,+ 67.55834124663168+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "WI",+ 28,+ 98.26786104551914,+ 94.25108477807422+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "WV",+ 5,+ 77.66812184745496,+ 73.27012184745496+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gadget",+ "WY",+ 10,+ 85.47121570747053,+ 82.82860614086333+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "AK",+ 15,+ 82.19809002451962,+ 83.32262903565328+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "AL",+ 16,+ 82.65361622769176,+ 79.62567826862781+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "AR",+ 8,+ 98.66006534657147,+ 93.04653889963853+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "AZ",+ 2,+ 135.37863398752506,+ 131.37443950971414+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "CA",+ 12,+ 95.34687573921826,+ 88.69520907255159+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "CO",+ 19,+ 94.73563028800871,+ 92.44932756051513+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "CT",+ 1,+ 69.22432810381133,+ 65.09432810381134+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "DE",+ 1,+ 99.66240044231697,+ 99.66240044231697+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "FL",+ 8,+ 80.96799410491984,+ 76.38424410491984+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "GA",+ 16,+ 69.4697295093467,+ 67.75797966609196+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "IA",+ 19,+ 81.32949330420652,+ 77.25678614226504+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "ID",+ 9,+ 93.6969168361482,+ 88.582044503648+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "IL",+ 14,+ 91.88792989097969,+ 87.3238743538817+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "IN",+ 16,+ 82.7619163801145,+ 78.1247215608811+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "KS",+ 5,+ 101.73941230635073,+ 96.93127252299048+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "KY",+ 11,+ 94.28310445554665,+ 89.45226777783239+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "LA",+ 8,+ 107.6861913647177,+ 103.87451422836331+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "MA",+ 3,+ 113.94805570613097,+ 107.24472237279765+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "MD",+ 4,+ 89.83464279164538,+ 86.55362141418313+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "ME",+ 2,+ 88.70961123725951,+ 84.08461123725951+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "MI",+ 29,+ 92.56109504317992,+ 87.79449444140526+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "MN",+ 13,+ 85.8343476845266,+ 80.31127076144969+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "MO",+ 19,+ 73.34121808064315,+ 70.84213559851783+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "MS",+ 9,+ 74.87969036017994,+ 69.98080147129104+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "MT",+ 23,+ 74.45539197230215,+ 75.06264450533321+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "NC",+ 18,+ 86.56420223000725,+ 82.99003606257999+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "ND",+ 12,+ 68.0303202574242,+ 65.48783499930924+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "NE",+ 10,+ 73.77173875359989,+ 70.99145040910442+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "NJ",+ 1,+ 69.65432810381134,+ 65.09432810381134+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "NM",+ 1,+ 40.26449564120193,+ 38.30449564120193+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "NV",+ 1,+ 39.886496250465754,+ 37.32649625046575+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "NY",+ 14,+ 83.18235008149593,+ 79.9837786529245+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "OH",+ 12,+ 99.09319931016806,+ 94.40835635414918+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "OK",+ 7,+ 90.08436233208593,+ 86.2057909035145+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "OR",+ 16,+ 74.11316722066523,+ 74.11316722066523+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "PA",+ 11,+ 73.42420434504648,+ 69.93882390368682+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "SC",+ 10,+ 101.87910016890635,+ 96.81431263079219+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "SD",+ 11,+ 103.52936127813527,+ 99.546634005408+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "TN",+ 12,+ 97.59012619570656,+ 91.20512619570655+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "TX",+ 29,+ 97.49532449427139,+ 92.21217605291822+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "UT",+ 1,+ 78.61016314504417,+ 75.08016314504417+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "VA",+ 4,+ 76.38930102020528,+ 73.23930102020529+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "VT",+ 6,+ 69.8991826354826,+ 67.14025332670487+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "WA",+ 11,+ 86.67526098021064,+ 81.59553491158108+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "WI",+ 21,+ 75.5064787130761,+ 72.81044468544073+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "WV",+ 7,+ 74.66155441781703,+ 70.43441156067418+ ],+ [+ "2026-01-01T00:00:00Z",+ "Gizmo",+ "WY",+ 9,+ 62.59700406295002,+ 62.10152236137589+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "AK",+ 14,+ 87.9874061863936,+ 89.46499225519285+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "AL",+ 17,+ 86.29962636808956,+ 83.21641287979303+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "AR",+ 9,+ 89.12184542625926,+ 83.68073431514816+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "AZ",+ 1,+ 123.89963250370613,+ 117.32963250370614+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "CA",+ 15,+ 96.33601133870475,+ 89.61534467203808+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "CO",+ 25,+ 99.83120775067708,+ 97.34124391015888+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "CT",+ 1,+ 73.54415037577924,+ 69.15415037577924+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "FL",+ 10,+ 97.96591273028858,+ 92.42091273028858+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "GA",+ 12,+ 84.43423510693714,+ 82.49280182688604+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "IA",+ 15,+ 105.71043040891047,+ 100.46758472172368+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "ID",+ 4,+ 75.82416052349102,+ 71.53416052349102+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "IL",+ 17,+ 90.9203416420901,+ 86.42035687574894+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "IN",+ 12,+ 86.98418260870162,+ 81.29251594203495+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "KS",+ 11,+ 93.97751073044081,+ 88.24205618498627+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "KY",+ 17,+ 104.50357860589055,+ 99.27619674934921+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "LA",+ 10,+ 101.19622264126107,+ 97.30422264126108+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "MA",+ 2,+ 99.55434639716836,+ 93.69934639716836+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "MD",+ 1,+ 137.06522767559335,+ 136.16126271106958+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "ME",+ 1,+ 71.13558718583916,+ 70.14610686710009+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "MI",+ 13,+ 90.50942327069045,+ 85.38634634761353+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "MN",+ 21,+ 94.94956192763615,+ 89.80918832661527+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "MO",+ 17,+ 96.62318745698353,+ 93.17405523205456+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "MS",+ 12,+ 101.58735884072242,+ 95.18431316633148+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "MT",+ 25,+ 80.20264305140958,+ 81.5512665323776+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "NC",+ 16,+ 94.49473785862541,+ 90.60516441932707+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "ND",+ 19,+ 92.37785928014279,+ 88.23678365173778+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "NE",+ 16,+ 77.90981656330815,+ 74.38902575087738+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "NH",+ 3,+ 69.1605299839642,+ 70.90431253956139+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "NJ",+ 2,+ 87.99185558792057,+ 83.82022650916274+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "NM",+ 6,+ 99.62590078221923,+ 94.76923411555256+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "NV",+ 1,+ 35.86789820016516,+ 33.56789820016516+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "NY",+ 17,+ 91.83774093900054,+ 88.78168838507696+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "OH",+ 16,+ 77.95921181021667,+ 73.83675067767044+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "OK",+ 4,+ 127.84081572322852,+ 122.33331572322851+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "OR",+ 14,+ 99.52645141702561,+ 99.52645141702561+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "PA",+ 11,+ 105.34615176310274,+ 99.8292153113429+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "SC",+ 12,+ 99.80784272195338,+ 94.71377577714057+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "SD",+ 14,+ 105.66332814860756,+ 102.70468988781859+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "TN",+ 14,+ 90.89194309960368,+ 85.43565836027348+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "TX",+ 35,+ 87.81617192515782,+ 83.25351631765875+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "VA",+ 12,+ 93.88474997178601,+ 90.79054722026157+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "VT",+ 2,+ 58.75818158572302,+ 55.43318158572302+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "WA",+ 16,+ 92.76190606498787,+ 87.99360269324002+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "WI",+ 16,+ 88.31444578218107,+ 84.98967066647732+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "WV",+ 5,+ 95.96856898899364,+ 91.45336816803962+ ],+ [+ "2026-01-01T00:00:00Z",+ "Widget",+ "WY",+ 5,+ 97.73233612516019,+ 95.02505793672823+ ]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Year",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "year"+ }+ ],+ "source": "breakout",+ "unit": "year",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "CATEGORY",+ "display_name": "Product → Category",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/Category",+ "field_ref": [+ "field",+ 18,+ {+ "source-field": 14+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 6.375+ }+ }+ }+ },+ {+ "name": "STATE",+ "display_name": "User → State",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/State",+ "field_ref": [+ "field",+ 1,+ {+ "source-field": 11+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 49,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 1,+ "average-length": 2+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ },+ {+ "name": "avg",+ "display_name": "Average of Total",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": ["aggregation", 1],+ "source": "aggregation"+ },+ {+ "name": "avg_2",+ "display_name": "Average of Subtotal",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": ["aggregation", 2],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Year",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "year"+ }+ ],+ "source": "breakout",+ "unit": "year",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "CATEGORY",+ "display_name": "Product → Category",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/Category",+ "field_ref": [+ "field",+ 18,+ {+ "source-field": 14+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 6.375+ }+ }+ }+ },+ {+ "name": "STATE",+ "display_name": "User → State",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": "type/State",+ "field_ref": [+ "field",+ 1,+ {+ "source-field": 11+ }+ ],+ "source": "breakout",+ "fingerprint": {+ "global": {+ "distinct-count": 49,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 1,+ "average-length": 2+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 85,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 5.231534567728808,+ "q3": 30.80022830379615,+ "max": 136,+ "sd": 19.868608937082108,+ "avg": 20.435729847494553+ }+ }+ }+ },+ {+ "name": "avg",+ "display_name": "Average of Total",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": ["aggregation", 1],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 916,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 12.323068489110506,+ "q1": 59.213515391309386,+ "q3": 89.39830327759235,+ "max": 138.19082979039501,+ "sd": 19.470499487335186,+ "avg": 75.54872017968552+ }+ }+ }+ },+ {+ "name": "avg_2",+ "display_name": "Average of Subtotal",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": ["aggregation", 2],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 908,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 19.86809834572766,+ "q1": 56.647072713218954,+ "q3": 85.55123581595808,+ "max": 143.4221774571866,+ "sd": 18.52777191871152,+ "avg": 72.41013199702012+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-dimension-min-max.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-dimension-min-max.jsonnew file mode 100644index 00000000000..ba15972d3e5--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-dimension-min-max.json@@ -0,0 +1,519 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.dimensions": ["TOTAL"],+ "graph.metrics": ["count"],+ "graph.series_order_dimension": null,+ "graph.series_order": null,+ "graph.show_values": true,+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "min-max",+ "boxplot.show_values_mode": "all"+ }+ },+ "data": {+ "rows": [+ ["2022-04-01T00:00:00Z", 40, 1],+ ["2022-05-01T00:00:00Z", 20, 1],+ ["2022-05-01T00:00:00Z", 40, 9],+ ["2022-05-01T00:00:00Z", 60, 2],+ ["2022-05-01T00:00:00Z", 80, 7],+ ["2022-06-01T00:00:00Z", 20, 14],+ ["2022-06-01T00:00:00Z", 40, 9],+ ["2022-06-01T00:00:00Z", 60, 6],+ ["2022-06-01T00:00:00Z", 80, 8],+ ["2022-07-01T00:00:00Z", 20, 15],+ ["2022-07-01T00:00:00Z", 40, 25],+ ["2022-07-01T00:00:00Z", 60, 8],+ ["2022-07-01T00:00:00Z", 80, 16],+ ["2022-08-01T00:00:00Z", 20, 13],+ ["2022-08-01T00:00:00Z", 40, 26],+ ["2022-08-01T00:00:00Z", 60, 10],+ ["2022-08-01T00:00:00Z", 80, 30],+ ["2022-09-01T00:00:00Z", 0, 2],+ ["2022-09-01T00:00:00Z", 20, 24],+ ["2022-09-01T00:00:00Z", 40, 26],+ ["2022-09-01T00:00:00Z", 60, 16],+ ["2022-09-01T00:00:00Z", 80, 24],+ ["2022-10-01T00:00:00Z", 20, 47],+ ["2022-10-01T00:00:00Z", 40, 38],+ ["2022-10-01T00:00:00Z", 60, 17],+ ["2022-10-01T00:00:00Z", 80, 32],+ ["2022-10-01T00:00:00Z", 100, 3],+ ["2022-11-01T00:00:00Z", 20, 49],+ ["2022-11-01T00:00:00Z", 40, 57],+ ["2022-11-01T00:00:00Z", 60, 12],+ ["2022-11-01T00:00:00Z", 80, 30],+ ["2022-11-01T00:00:00Z", 100, 2],+ ["2022-12-01T00:00:00Z", 0, 4],+ ["2022-12-01T00:00:00Z", 20, 49],+ ["2022-12-01T00:00:00Z", 40, 51],+ ["2022-12-01T00:00:00Z", 60, 24],+ ["2022-12-01T00:00:00Z", 80, 37],+ ["2023-01-01T00:00:00Z", 0, 1],+ ["2023-01-01T00:00:00Z", 20, 71],+ ["2023-01-01T00:00:00Z", 40, 64],+ ["2023-01-01T00:00:00Z", 60, 30],+ ["2023-01-01T00:00:00Z", 80, 35],+ ["2023-01-01T00:00:00Z", 100, 4],+ ["2023-02-01T00:00:00Z", 0, 1],+ ["2023-02-01T00:00:00Z", 20, 64],+ ["2023-02-01T00:00:00Z", 40, 71],+ ["2023-02-01T00:00:00Z", 60, 30],+ ["2023-02-01T00:00:00Z", 80, 36],+ ["2023-02-01T00:00:00Z", 100, 4],+ ["2023-03-01T00:00:00Z", 20, 75],+ ["2023-03-01T00:00:00Z", 40, 92],+ ["2023-03-01T00:00:00Z", 60, 40],+ ["2023-03-01T00:00:00Z", 80, 46],+ ["2023-03-01T00:00:00Z", 100, 3],+ ["2023-04-01T00:00:00Z", 0, 3],+ ["2023-04-01T00:00:00Z", 20, 79],+ ["2023-04-01T00:00:00Z", 40, 65],+ ["2023-04-01T00:00:00Z", 60, 38],+ ["2023-04-01T00:00:00Z", 80, 52],+ ["2023-04-01T00:00:00Z", 100, 1],+ ["2023-05-01T00:00:00Z", 0, 1],+ ["2023-05-01T00:00:00Z", 20, 74],+ ["2023-05-01T00:00:00Z", 40, 82],+ ["2023-05-01T00:00:00Z", 60, 42],+ ["2023-05-01T00:00:00Z", 80, 70],+ ["2023-05-01T00:00:00Z", 100, 2],+ ["2023-06-01T00:00:00Z", 0, 1],+ ["2023-06-01T00:00:00Z", 20, 61],+ ["2023-06-01T00:00:00Z", 40, 90],+ ["2023-06-01T00:00:00Z", 60, 46],+ ["2023-06-01T00:00:00Z", 80, 62],+ ["2023-06-01T00:00:00Z", 100, 4],+ ["2023-07-01T00:00:00Z", 0, 5],+ ["2023-07-01T00:00:00Z", 20, 99],+ ["2023-07-01T00:00:00Z", 40, 87],+ ["2023-07-01T00:00:00Z", 60, 57],+ ["2023-07-01T00:00:00Z", 80, 70],+ ["2023-07-01T00:00:00Z", 100, 7],+ ["2023-08-01T00:00:00Z", 0, 8],+ ["2023-08-01T00:00:00Z", 20, 94],+ ["2023-08-01T00:00:00Z", 40, 95],+ ["2023-08-01T00:00:00Z", 60, 62],+ ["2023-08-01T00:00:00Z", 80, 66],+ ["2023-08-01T00:00:00Z", 100, 8],+ ["2023-09-01T00:00:00Z", 0, 4],+ ["2023-09-01T00:00:00Z", 20, 108],+ ["2023-09-01T00:00:00Z", 40, 101],+ ["2023-09-01T00:00:00Z", 60, 66],+ ["2023-09-01T00:00:00Z", 80, 60],+ ["2023-09-01T00:00:00Z", 100, 7],+ ["2023-10-01T00:00:00Z", 0, 5],+ ["2023-10-01T00:00:00Z", 20, 91],+ ["2023-10-01T00:00:00Z", 40, 108],+ ["2023-10-01T00:00:00Z", 60, 64],+ ["2023-10-01T00:00:00Z", 80, 82],+ ["2023-10-01T00:00:00Z", 100, 4],+ ["2023-11-01T00:00:00Z", 0, 4],+ ["2023-11-01T00:00:00Z", 20, 112],+ ["2023-11-01T00:00:00Z", 40, 117],+ ["2023-11-01T00:00:00Z", 60, 66],+ ["2023-11-01T00:00:00Z", 80, 92],+ ["2023-11-01T00:00:00Z", 100, 3],+ ["2023-12-01T00:00:00Z", -60, 1],+ ["2023-12-01T00:00:00Z", 0, 4],+ ["2023-12-01T00:00:00Z", 20, 86],+ ["2023-12-01T00:00:00Z", 40, 132],+ ["2023-12-01T00:00:00Z", 60, 108],+ ["2023-12-01T00:00:00Z", 80, 80],+ ["2023-12-01T00:00:00Z", 100, 7],+ ["2024-01-01T00:00:00Z", 0, 1],+ ["2024-01-01T00:00:00Z", 20, 27],+ ["2024-01-01T00:00:00Z", 40, 105],+ ["2024-01-01T00:00:00Z", 60, 105],+ ["2024-01-01T00:00:00Z", 80, 56],+ ["2024-01-01T00:00:00Z", 100, 70],+ ["2024-01-01T00:00:00Z", 120, 75],+ ["2024-01-01T00:00:00Z", 140, 18],+ ["2024-02-01T00:00:00Z", 0, 1],+ ["2024-02-01T00:00:00Z", 20, 30],+ ["2024-02-01T00:00:00Z", 40, 83],+ ["2024-02-01T00:00:00Z", 60, 87],+ ["2024-02-01T00:00:00Z", 80, 53],+ ["2024-02-01T00:00:00Z", 100, 74],+ ["2024-02-01T00:00:00Z", 120, 59],+ ["2024-02-01T00:00:00Z", 140, 17],+ ["2024-03-01T00:00:00Z", 20, 35],+ ["2024-03-01T00:00:00Z", 40, 86],+ ["2024-03-01T00:00:00Z", 60, 104],+ ["2024-03-01T00:00:00Z", 80, 65],+ ["2024-03-01T00:00:00Z", 100, 58],+ ["2024-03-01T00:00:00Z", 120, 69],+ ["2024-03-01T00:00:00Z", 140, 28],+ ["2024-04-01T00:00:00Z", 0, 1],+ ["2024-04-01T00:00:00Z", 20, 28],+ ["2024-04-01T00:00:00Z", 40, 106],+ ["2024-04-01T00:00:00Z", 60, 96],+ ["2024-04-01T00:00:00Z", 80, 45],+ ["2024-04-01T00:00:00Z", 100, 73],+ ["2024-04-01T00:00:00Z", 120, 72],+ ["2024-04-01T00:00:00Z", 140, 18],+ ["2024-05-01T00:00:00Z", 0, 1],+ ["2024-05-01T00:00:00Z", 20, 25],+ ["2024-05-01T00:00:00Z", 40, 110],+ ["2024-05-01T00:00:00Z", 60, 130],+ ["2024-05-01T00:00:00Z", 80, 45],+ ["2024-05-01T00:00:00Z", 100, 85],+ ["2024-05-01T00:00:00Z", 120, 91],+ ["2024-05-01T00:00:00Z", 140, 33],+ ["2024-06-01T00:00:00Z", 20, 30],+ ["2024-06-01T00:00:00Z", 40, 86],+ ["2024-06-01T00:00:00Z", 60, 98],+ ["2024-06-01T00:00:00Z", 80, 43],+ ["2024-06-01T00:00:00Z", 100, 66],+ ["2024-06-01T00:00:00Z", 120, 86],+ ["2024-06-01T00:00:00Z", 140, 46],+ ["2024-07-01T00:00:00Z", 20, 37],+ ["2024-07-01T00:00:00Z", 40, 116],+ ["2024-07-01T00:00:00Z", 60, 127],+ ["2024-07-01T00:00:00Z", 80, 56],+ ["2024-07-01T00:00:00Z", 100, 78],+ ["2024-07-01T00:00:00Z", 120, 84],+ ["2024-07-01T00:00:00Z", 140, 25],+ ["2024-08-01T00:00:00Z", 20, 30],+ ["2024-08-01T00:00:00Z", 40, 87],+ ["2024-08-01T00:00:00Z", 60, 127],+ ["2024-08-01T00:00:00Z", 80, 63],+ ["2024-08-01T00:00:00Z", 100, 76],+ ["2024-08-01T00:00:00Z", 120, 81],+ ["2024-08-01T00:00:00Z", 140, 37],+ ["2024-09-01T00:00:00Z", 0, 1],+ ["2024-09-01T00:00:00Z", 20, 31],+ ["2024-09-01T00:00:00Z", 40, 100],+ ["2024-09-01T00:00:00Z", 60, 108],+ ["2024-09-01T00:00:00Z", 80, 53],+ ["2024-09-01T00:00:00Z", 100, 92],+ ["2024-09-01T00:00:00Z", 120, 76],+ ["2024-09-01T00:00:00Z", 140, 37],+ ["2024-10-01T00:00:00Z", 20, 33],+ ["2024-10-01T00:00:00Z", 40, 92],+ ["2024-10-01T00:00:00Z", 60, 117],+ ["2024-10-01T00:00:00Z", 80, 68],+ ["2024-10-01T00:00:00Z", 100, 95],+ ["2024-10-01T00:00:00Z", 120, 101],+ ["2024-10-01T00:00:00Z", 140, 27],+ ["2024-11-01T00:00:00Z", 20, 39],+ ["2024-11-01T00:00:00Z", 40, 89],+ ["2024-11-01T00:00:00Z", 60, 113],+ ["2024-11-01T00:00:00Z", 80, 55],+ ["2024-11-01T00:00:00Z", 100, 95],+ ["2024-11-01T00:00:00Z", 120, 98],+ ["2024-11-01T00:00:00Z", 140, 31],+ ["2024-12-01T00:00:00Z", 20, 32],+ ["2024-12-01T00:00:00Z", 40, 95],+ ["2024-12-01T00:00:00Z", 60, 119],+ ["2024-12-01T00:00:00Z", 80, 60],+ ["2024-12-01T00:00:00Z", 100, 101],+ ["2024-12-01T00:00:00Z", 120, 100],+ ["2024-12-01T00:00:00Z", 140, 32],+ ["2025-01-01T00:00:00Z", 20, 37],+ ["2025-01-01T00:00:00Z", 40, 101],+ ["2025-01-01T00:00:00Z", 60, 143],+ ["2025-01-01T00:00:00Z", 80, 70],+ ["2025-01-01T00:00:00Z", 100, 98],+ ["2025-01-01T00:00:00Z", 120, 95],+ ["2025-01-01T00:00:00Z", 140, 40],+ ["2025-02-01T00:00:00Z", 20, 39],+ ["2025-02-01T00:00:00Z", 40, 100],+ ["2025-02-01T00:00:00Z", 60, 115],+ ["2025-02-01T00:00:00Z", 80, 60],+ ["2025-02-01T00:00:00Z", 100, 84],+ ["2025-02-01T00:00:00Z", 120, 102],+ ["2025-02-01T00:00:00Z", 140, 33],+ ["2025-03-01T00:00:00Z", 20, 29],+ ["2025-03-01T00:00:00Z", 40, 105],+ ["2025-03-01T00:00:00Z", 60, 132],+ ["2025-03-01T00:00:00Z", 80, 66],+ ["2025-03-01T00:00:00Z", 100, 96],+ ["2025-03-01T00:00:00Z", 120, 116],+ ["2025-03-01T00:00:00Z", 140, 29],+ ["2025-04-01T00:00:00Z", 0, 1],+ ["2025-04-01T00:00:00Z", 20, 34],+ ["2025-04-01T00:00:00Z", 40, 97],+ ["2025-04-01T00:00:00Z", 60, 111],+ ["2025-04-01T00:00:00Z", 80, 70],+ ["2025-04-01T00:00:00Z", 100, 88],+ ["2025-04-01T00:00:00Z", 120, 92],+ ["2025-04-01T00:00:00Z", 140, 40],+ ["2025-05-01T00:00:00Z", 20, 53],+ ["2025-05-01T00:00:00Z", 40, 100],+ ["2025-05-01T00:00:00Z", 60, 128],+ ["2025-05-01T00:00:00Z", 80, 79],+ ["2025-05-01T00:00:00Z", 100, 87],+ ["2025-05-01T00:00:00Z", 120, 89],+ ["2025-05-01T00:00:00Z", 140, 25],+ ["2025-06-01T00:00:00Z", 0, 2],+ ["2025-06-01T00:00:00Z", 20, 39],+ ["2025-06-01T00:00:00Z", 40, 91],+ ["2025-06-01T00:00:00Z", 60, 111],+ ["2025-06-01T00:00:00Z", 80, 63],+ ["2025-06-01T00:00:00Z", 100, 86],+ ["2025-06-01T00:00:00Z", 120, 90],+ ["2025-06-01T00:00:00Z", 140, 39],+ ["2025-07-01T00:00:00Z", 20, 46],+ ["2025-07-01T00:00:00Z", 40, 108],+ ["2025-07-01T00:00:00Z", 60, 121],+ ["2025-07-01T00:00:00Z", 80, 66],+ ["2025-07-01T00:00:00Z", 100, 94],+ ["2025-07-01T00:00:00Z", 120, 91],+ ["2025-07-01T00:00:00Z", 140, 30],+ ["2025-08-01T00:00:00Z", 20, 35],+ ["2025-08-01T00:00:00Z", 40, 105],+ ["2025-08-01T00:00:00Z", 60, 127],+ ["2025-08-01T00:00:00Z", 80, 63],+ ["2025-08-01T00:00:00Z", 100, 88],+ ["2025-08-01T00:00:00Z", 120, 108],+ ["2025-08-01T00:00:00Z", 140, 40],+ ["2025-09-01T00:00:00Z", 20, 37],+ ["2025-09-01T00:00:00Z", 40, 100],+ ["2025-09-01T00:00:00Z", 60, 125],+ ["2025-09-01T00:00:00Z", 80, 67],+ ["2025-09-01T00:00:00Z", 100, 82],+ ["2025-09-01T00:00:00Z", 120, 80],+ ["2025-09-01T00:00:00Z", 140, 28],+ ["2025-10-01T00:00:00Z", 20, 34],+ ["2025-10-01T00:00:00Z", 40, 117],+ ["2025-10-01T00:00:00Z", 60, 131],+ ["2025-10-01T00:00:00Z", 80, 57],+ ["2025-10-01T00:00:00Z", 100, 91],+ ["2025-10-01T00:00:00Z", 120, 82],+ ["2025-10-01T00:00:00Z", 140, 28],+ ["2025-11-01T00:00:00Z", 20, 37],+ ["2025-11-01T00:00:00Z", 40, 107],+ ["2025-11-01T00:00:00Z", 60, 121],+ ["2025-11-01T00:00:00Z", 80, 69],+ ["2025-11-01T00:00:00Z", 100, 85],+ ["2025-11-01T00:00:00Z", 120, 81],+ ["2025-11-01T00:00:00Z", 140, 42],+ ["2025-12-01T00:00:00Z", 20, 29],+ ["2025-12-01T00:00:00Z", 40, 108],+ ["2025-12-01T00:00:00Z", 60, 130],+ ["2025-12-01T00:00:00Z", 80, 75],+ ["2025-12-01T00:00:00Z", 100, 83],+ ["2025-12-01T00:00:00Z", 120, 95],+ ["2025-12-01T00:00:00Z", 140, 30],+ ["2026-01-01T00:00:00Z", 20, 34],+ ["2026-01-01T00:00:00Z", 40, 105],+ ["2026-01-01T00:00:00Z", 60, 125],+ ["2026-01-01T00:00:00Z", 80, 64],+ ["2026-01-01T00:00:00Z", 100, 109],+ ["2026-01-01T00:00:00Z", 120, 105],+ ["2026-01-01T00:00:00Z", 140, 38],+ ["2026-02-01T00:00:00Z", 20, 34],+ ["2026-02-01T00:00:00Z", 40, 103],+ ["2026-02-01T00:00:00Z", 60, 130],+ ["2026-02-01T00:00:00Z", 80, 72],+ ["2026-02-01T00:00:00Z", 100, 87],+ ["2026-02-01T00:00:00Z", 120, 84],+ ["2026-02-01T00:00:00Z", 140, 33],+ ["2026-03-01T00:00:00Z", 20, 43],+ ["2026-03-01T00:00:00Z", 40, 102],+ ["2026-03-01T00:00:00Z", 60, 107],+ ["2026-03-01T00:00:00Z", 80, 72],+ ["2026-03-01T00:00:00Z", 100, 87],+ ["2026-03-01T00:00:00Z", 120, 93],+ ["2026-03-01T00:00:00Z", 140, 23],+ ["2026-04-01T00:00:00Z", 20, 27],+ ["2026-04-01T00:00:00Z", 40, 57],+ ["2026-04-01T00:00:00Z", 60, 75],+ ["2026-04-01T00:00:00Z", 80, 39],+ ["2026-04-01T00:00:00Z", 100, 62],+ ["2026-04-01T00:00:00Z", 120, 61],+ ["2026-04-01T00:00:00Z", 140, 23]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 114,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 29.58731445692873,+ "q3": 91.5,+ "max": 143,+ "sd": 37.626906825058086,+ "avg": 60.12820512820513+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-dimension-tukey.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-dimension-tukey.jsonnew file mode 100644index 00000000000..a3e5729dbc8--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-dimension-tukey.json@@ -0,0 +1,517 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.dimensions": ["TOTAL"],+ "graph.metrics": ["count"],+ "graph.series_order_dimension": null,+ "graph.series_order": null,+ "graph.show_values": true,+ "graph.label_value_frequency": "all"+ }+ },+ "data": {+ "rows": [+ ["2022-04-01T00:00:00Z", 40, 1],+ ["2022-05-01T00:00:00Z", 20, 1],+ ["2022-05-01T00:00:00Z", 40, 9],+ ["2022-05-01T00:00:00Z", 60, 2],+ ["2022-05-01T00:00:00Z", 80, 7],+ ["2022-06-01T00:00:00Z", 20, 14],+ ["2022-06-01T00:00:00Z", 40, 9],+ ["2022-06-01T00:00:00Z", 60, 6],+ ["2022-06-01T00:00:00Z", 80, 8],+ ["2022-07-01T00:00:00Z", 20, 15],+ ["2022-07-01T00:00:00Z", 40, 25],+ ["2022-07-01T00:00:00Z", 60, 8],+ ["2022-07-01T00:00:00Z", 80, 16],+ ["2022-08-01T00:00:00Z", 20, 13],+ ["2022-08-01T00:00:00Z", 40, 26],+ ["2022-08-01T00:00:00Z", 60, 10],+ ["2022-08-01T00:00:00Z", 80, 30],+ ["2022-09-01T00:00:00Z", 0, 2],+ ["2022-09-01T00:00:00Z", 20, 24],+ ["2022-09-01T00:00:00Z", 40, 26],+ ["2022-09-01T00:00:00Z", 60, 16],+ ["2022-09-01T00:00:00Z", 80, 24],+ ["2022-10-01T00:00:00Z", 20, 47],+ ["2022-10-01T00:00:00Z", 40, 38],+ ["2022-10-01T00:00:00Z", 60, 17],+ ["2022-10-01T00:00:00Z", 80, 32],+ ["2022-10-01T00:00:00Z", 100, 3],+ ["2022-11-01T00:00:00Z", 20, 49],+ ["2022-11-01T00:00:00Z", 40, 57],+ ["2022-11-01T00:00:00Z", 60, 12],+ ["2022-11-01T00:00:00Z", 80, 30],+ ["2022-11-01T00:00:00Z", 100, 2],+ ["2022-12-01T00:00:00Z", 0, 4],+ ["2022-12-01T00:00:00Z", 20, 49],+ ["2022-12-01T00:00:00Z", 40, 51],+ ["2022-12-01T00:00:00Z", 60, 24],+ ["2022-12-01T00:00:00Z", 80, 37],+ ["2023-01-01T00:00:00Z", 0, 1],+ ["2023-01-01T00:00:00Z", 20, 71],+ ["2023-01-01T00:00:00Z", 40, 64],+ ["2023-01-01T00:00:00Z", 60, 30],+ ["2023-01-01T00:00:00Z", 80, 35],+ ["2023-01-01T00:00:00Z", 100, 4],+ ["2023-02-01T00:00:00Z", 0, 1],+ ["2023-02-01T00:00:00Z", 20, 64],+ ["2023-02-01T00:00:00Z", 40, 71],+ ["2023-02-01T00:00:00Z", 60, 30],+ ["2023-02-01T00:00:00Z", 80, 36],+ ["2023-02-01T00:00:00Z", 100, 4],+ ["2023-03-01T00:00:00Z", 20, 75],+ ["2023-03-01T00:00:00Z", 40, 92],+ ["2023-03-01T00:00:00Z", 60, 40],+ ["2023-03-01T00:00:00Z", 80, 46],+ ["2023-03-01T00:00:00Z", 100, 3],+ ["2023-04-01T00:00:00Z", 0, 3],+ ["2023-04-01T00:00:00Z", 20, 79],+ ["2023-04-01T00:00:00Z", 40, 65],+ ["2023-04-01T00:00:00Z", 60, 38],+ ["2023-04-01T00:00:00Z", 80, 52],+ ["2023-04-01T00:00:00Z", 100, 1],+ ["2023-05-01T00:00:00Z", 0, 1],+ ["2023-05-01T00:00:00Z", 20, 74],+ ["2023-05-01T00:00:00Z", 40, 82],+ ["2023-05-01T00:00:00Z", 60, 42],+ ["2023-05-01T00:00:00Z", 80, 70],+ ["2023-05-01T00:00:00Z", 100, 2],+ ["2023-06-01T00:00:00Z", 0, 1],+ ["2023-06-01T00:00:00Z", 20, 61],+ ["2023-06-01T00:00:00Z", 40, 90],+ ["2023-06-01T00:00:00Z", 60, 46],+ ["2023-06-01T00:00:00Z", 80, 62],+ ["2023-06-01T00:00:00Z", 100, 4],+ ["2023-07-01T00:00:00Z", 0, 5],+ ["2023-07-01T00:00:00Z", 20, 99],+ ["2023-07-01T00:00:00Z", 40, 87],+ ["2023-07-01T00:00:00Z", 60, 57],+ ["2023-07-01T00:00:00Z", 80, 70],+ ["2023-07-01T00:00:00Z", 100, 7],+ ["2023-08-01T00:00:00Z", 0, 8],+ ["2023-08-01T00:00:00Z", 20, 94],+ ["2023-08-01T00:00:00Z", 40, 95],+ ["2023-08-01T00:00:00Z", 60, 62],+ ["2023-08-01T00:00:00Z", 80, 66],+ ["2023-08-01T00:00:00Z", 100, 8],+ ["2023-09-01T00:00:00Z", 0, 4],+ ["2023-09-01T00:00:00Z", 20, 108],+ ["2023-09-01T00:00:00Z", 40, 101],+ ["2023-09-01T00:00:00Z", 60, 66],+ ["2023-09-01T00:00:00Z", 80, 60],+ ["2023-09-01T00:00:00Z", 100, 7],+ ["2023-10-01T00:00:00Z", 0, 5],+ ["2023-10-01T00:00:00Z", 20, 91],+ ["2023-10-01T00:00:00Z", 40, 108],+ ["2023-10-01T00:00:00Z", 60, 64],+ ["2023-10-01T00:00:00Z", 80, 82],+ ["2023-10-01T00:00:00Z", 100, 4],+ ["2023-11-01T00:00:00Z", 0, 4],+ ["2023-11-01T00:00:00Z", 20, 112],+ ["2023-11-01T00:00:00Z", 40, 117],+ ["2023-11-01T00:00:00Z", 60, 66],+ ["2023-11-01T00:00:00Z", 80, 92],+ ["2023-11-01T00:00:00Z", 100, 3],+ ["2023-12-01T00:00:00Z", -60, 1],+ ["2023-12-01T00:00:00Z", 0, 4],+ ["2023-12-01T00:00:00Z", 20, 86],+ ["2023-12-01T00:00:00Z", 40, 132],+ ["2023-12-01T00:00:00Z", 60, 108],+ ["2023-12-01T00:00:00Z", 80, 80],+ ["2023-12-01T00:00:00Z", 100, 7],+ ["2024-01-01T00:00:00Z", 0, 1],+ ["2024-01-01T00:00:00Z", 20, 27],+ ["2024-01-01T00:00:00Z", 40, 105],+ ["2024-01-01T00:00:00Z", 60, 105],+ ["2024-01-01T00:00:00Z", 80, 56],+ ["2024-01-01T00:00:00Z", 100, 70],+ ["2024-01-01T00:00:00Z", 120, 75],+ ["2024-01-01T00:00:00Z", 140, 18],+ ["2024-02-01T00:00:00Z", 0, 1],+ ["2024-02-01T00:00:00Z", 20, 30],+ ["2024-02-01T00:00:00Z", 40, 83],+ ["2024-02-01T00:00:00Z", 60, 87],+ ["2024-02-01T00:00:00Z", 80, 53],+ ["2024-02-01T00:00:00Z", 100, 74],+ ["2024-02-01T00:00:00Z", 120, 59],+ ["2024-02-01T00:00:00Z", 140, 17],+ ["2024-03-01T00:00:00Z", 20, 35],+ ["2024-03-01T00:00:00Z", 40, 86],+ ["2024-03-01T00:00:00Z", 60, 104],+ ["2024-03-01T00:00:00Z", 80, 65],+ ["2024-03-01T00:00:00Z", 100, 58],+ ["2024-03-01T00:00:00Z", 120, 69],+ ["2024-03-01T00:00:00Z", 140, 28],+ ["2024-04-01T00:00:00Z", 0, 1],+ ["2024-04-01T00:00:00Z", 20, 28],+ ["2024-04-01T00:00:00Z", 40, 106],+ ["2024-04-01T00:00:00Z", 60, 96],+ ["2024-04-01T00:00:00Z", 80, 45],+ ["2024-04-01T00:00:00Z", 100, 73],+ ["2024-04-01T00:00:00Z", 120, 72],+ ["2024-04-01T00:00:00Z", 140, 18],+ ["2024-05-01T00:00:00Z", 0, 1],+ ["2024-05-01T00:00:00Z", 20, 25],+ ["2024-05-01T00:00:00Z", 40, 110],+ ["2024-05-01T00:00:00Z", 60, 130],+ ["2024-05-01T00:00:00Z", 80, 45],+ ["2024-05-01T00:00:00Z", 100, 85],+ ["2024-05-01T00:00:00Z", 120, 91],+ ["2024-05-01T00:00:00Z", 140, 33],+ ["2024-06-01T00:00:00Z", 20, 30],+ ["2024-06-01T00:00:00Z", 40, 86],+ ["2024-06-01T00:00:00Z", 60, 98],+ ["2024-06-01T00:00:00Z", 80, 43],+ ["2024-06-01T00:00:00Z", 100, 66],+ ["2024-06-01T00:00:00Z", 120, 86],+ ["2024-06-01T00:00:00Z", 140, 46],+ ["2024-07-01T00:00:00Z", 20, 37],+ ["2024-07-01T00:00:00Z", 40, 116],+ ["2024-07-01T00:00:00Z", 60, 127],+ ["2024-07-01T00:00:00Z", 80, 56],+ ["2024-07-01T00:00:00Z", 100, 78],+ ["2024-07-01T00:00:00Z", 120, 84],+ ["2024-07-01T00:00:00Z", 140, 25],+ ["2024-08-01T00:00:00Z", 20, 30],+ ["2024-08-01T00:00:00Z", 40, 87],+ ["2024-08-01T00:00:00Z", 60, 127],+ ["2024-08-01T00:00:00Z", 80, 63],+ ["2024-08-01T00:00:00Z", 100, 76],+ ["2024-08-01T00:00:00Z", 120, 81],+ ["2024-08-01T00:00:00Z", 140, 37],+ ["2024-09-01T00:00:00Z", 0, 1],+ ["2024-09-01T00:00:00Z", 20, 31],+ ["2024-09-01T00:00:00Z", 40, 100],+ ["2024-09-01T00:00:00Z", 60, 108],+ ["2024-09-01T00:00:00Z", 80, 53],+ ["2024-09-01T00:00:00Z", 100, 92],+ ["2024-09-01T00:00:00Z", 120, 76],+ ["2024-09-01T00:00:00Z", 140, 37],+ ["2024-10-01T00:00:00Z", 20, 33],+ ["2024-10-01T00:00:00Z", 40, 92],+ ["2024-10-01T00:00:00Z", 60, 117],+ ["2024-10-01T00:00:00Z", 80, 68],+ ["2024-10-01T00:00:00Z", 100, 95],+ ["2024-10-01T00:00:00Z", 120, 101],+ ["2024-10-01T00:00:00Z", 140, 27],+ ["2024-11-01T00:00:00Z", 20, 39],+ ["2024-11-01T00:00:00Z", 40, 89],+ ["2024-11-01T00:00:00Z", 60, 113],+ ["2024-11-01T00:00:00Z", 80, 55],+ ["2024-11-01T00:00:00Z", 100, 95],+ ["2024-11-01T00:00:00Z", 120, 98],+ ["2024-11-01T00:00:00Z", 140, 31],+ ["2024-12-01T00:00:00Z", 20, 32],+ ["2024-12-01T00:00:00Z", 40, 95],+ ["2024-12-01T00:00:00Z", 60, 119],+ ["2024-12-01T00:00:00Z", 80, 60],+ ["2024-12-01T00:00:00Z", 100, 101],+ ["2024-12-01T00:00:00Z", 120, 100],+ ["2024-12-01T00:00:00Z", 140, 32],+ ["2025-01-01T00:00:00Z", 20, 37],+ ["2025-01-01T00:00:00Z", 40, 101],+ ["2025-01-01T00:00:00Z", 60, 143],+ ["2025-01-01T00:00:00Z", 80, 70],+ ["2025-01-01T00:00:00Z", 100, 98],+ ["2025-01-01T00:00:00Z", 120, 95],+ ["2025-01-01T00:00:00Z", 140, 40],+ ["2025-02-01T00:00:00Z", 20, 39],+ ["2025-02-01T00:00:00Z", 40, 100],+ ["2025-02-01T00:00:00Z", 60, 115],+ ["2025-02-01T00:00:00Z", 80, 60],+ ["2025-02-01T00:00:00Z", 100, 84],+ ["2025-02-01T00:00:00Z", 120, 102],+ ["2025-02-01T00:00:00Z", 140, 33],+ ["2025-03-01T00:00:00Z", 20, 29],+ ["2025-03-01T00:00:00Z", 40, 105],+ ["2025-03-01T00:00:00Z", 60, 132],+ ["2025-03-01T00:00:00Z", 80, 66],+ ["2025-03-01T00:00:00Z", 100, 96],+ ["2025-03-01T00:00:00Z", 120, 116],+ ["2025-03-01T00:00:00Z", 140, 29],+ ["2025-04-01T00:00:00Z", 0, 1],+ ["2025-04-01T00:00:00Z", 20, 34],+ ["2025-04-01T00:00:00Z", 40, 97],+ ["2025-04-01T00:00:00Z", 60, 111],+ ["2025-04-01T00:00:00Z", 80, 70],+ ["2025-04-01T00:00:00Z", 100, 88],+ ["2025-04-01T00:00:00Z", 120, 92],+ ["2025-04-01T00:00:00Z", 140, 40],+ ["2025-05-01T00:00:00Z", 20, 53],+ ["2025-05-01T00:00:00Z", 40, 100],+ ["2025-05-01T00:00:00Z", 60, 128],+ ["2025-05-01T00:00:00Z", 80, 79],+ ["2025-05-01T00:00:00Z", 100, 87],+ ["2025-05-01T00:00:00Z", 120, 89],+ ["2025-05-01T00:00:00Z", 140, 25],+ ["2025-06-01T00:00:00Z", 0, 2],+ ["2025-06-01T00:00:00Z", 20, 39],+ ["2025-06-01T00:00:00Z", 40, 91],+ ["2025-06-01T00:00:00Z", 60, 111],+ ["2025-06-01T00:00:00Z", 80, 63],+ ["2025-06-01T00:00:00Z", 100, 86],+ ["2025-06-01T00:00:00Z", 120, 90],+ ["2025-06-01T00:00:00Z", 140, 39],+ ["2025-07-01T00:00:00Z", 20, 46],+ ["2025-07-01T00:00:00Z", 40, 108],+ ["2025-07-01T00:00:00Z", 60, 121],+ ["2025-07-01T00:00:00Z", 80, 66],+ ["2025-07-01T00:00:00Z", 100, 94],+ ["2025-07-01T00:00:00Z", 120, 91],+ ["2025-07-01T00:00:00Z", 140, 30],+ ["2025-08-01T00:00:00Z", 20, 35],+ ["2025-08-01T00:00:00Z", 40, 105],+ ["2025-08-01T00:00:00Z", 60, 127],+ ["2025-08-01T00:00:00Z", 80, 63],+ ["2025-08-01T00:00:00Z", 100, 88],+ ["2025-08-01T00:00:00Z", 120, 108],+ ["2025-08-01T00:00:00Z", 140, 40],+ ["2025-09-01T00:00:00Z", 20, 37],+ ["2025-09-01T00:00:00Z", 40, 100],+ ["2025-09-01T00:00:00Z", 60, 125],+ ["2025-09-01T00:00:00Z", 80, 67],+ ["2025-09-01T00:00:00Z", 100, 82],+ ["2025-09-01T00:00:00Z", 120, 80],+ ["2025-09-01T00:00:00Z", 140, 28],+ ["2025-10-01T00:00:00Z", 20, 34],+ ["2025-10-01T00:00:00Z", 40, 117],+ ["2025-10-01T00:00:00Z", 60, 131],+ ["2025-10-01T00:00:00Z", 80, 57],+ ["2025-10-01T00:00:00Z", 100, 91],+ ["2025-10-01T00:00:00Z", 120, 82],+ ["2025-10-01T00:00:00Z", 140, 28],+ ["2025-11-01T00:00:00Z", 20, 37],+ ["2025-11-01T00:00:00Z", 40, 107],+ ["2025-11-01T00:00:00Z", 60, 121],+ ["2025-11-01T00:00:00Z", 80, 69],+ ["2025-11-01T00:00:00Z", 100, 85],+ ["2025-11-01T00:00:00Z", 120, 81],+ ["2025-11-01T00:00:00Z", 140, 42],+ ["2025-12-01T00:00:00Z", 20, 29],+ ["2025-12-01T00:00:00Z", 40, 108],+ ["2025-12-01T00:00:00Z", 60, 130],+ ["2025-12-01T00:00:00Z", 80, 75],+ ["2025-12-01T00:00:00Z", 100, 83],+ ["2025-12-01T00:00:00Z", 120, 95],+ ["2025-12-01T00:00:00Z", 140, 30],+ ["2026-01-01T00:00:00Z", 20, 34],+ ["2026-01-01T00:00:00Z", 40, 105],+ ["2026-01-01T00:00:00Z", 60, 125],+ ["2026-01-01T00:00:00Z", 80, 64],+ ["2026-01-01T00:00:00Z", 100, 109],+ ["2026-01-01T00:00:00Z", 120, 105],+ ["2026-01-01T00:00:00Z", 140, 38],+ ["2026-02-01T00:00:00Z", 20, 34],+ ["2026-02-01T00:00:00Z", 40, 103],+ ["2026-02-01T00:00:00Z", 60, 130],+ ["2026-02-01T00:00:00Z", 80, 72],+ ["2026-02-01T00:00:00Z", 100, 87],+ ["2026-02-01T00:00:00Z", 120, 84],+ ["2026-02-01T00:00:00Z", 140, 33],+ ["2026-03-01T00:00:00Z", 20, 43],+ ["2026-03-01T00:00:00Z", 40, 102],+ ["2026-03-01T00:00:00Z", 60, 107],+ ["2026-03-01T00:00:00Z", 80, 72],+ ["2026-03-01T00:00:00Z", 100, 87],+ ["2026-03-01T00:00:00Z", 120, 93],+ ["2026-03-01T00:00:00Z", 140, 23],+ ["2026-04-01T00:00:00Z", 20, 27],+ ["2026-04-01T00:00:00Z", 40, 57],+ ["2026-04-01T00:00:00Z", 60, 75],+ ["2026-04-01T00:00:00Z", 80, 39],+ ["2026-04-01T00:00:00Z", 100, 62],+ ["2026-04-01T00:00:00Z", 120, 61],+ ["2026-04-01T00:00:00Z", 140, 23]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 114,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 29.58731445692873,+ "q3": 91.5,+ "max": 143,+ "sd": 37.626906825058086,+ "avg": 60.12820512820513+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-min-max-all-points.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-min-max-all-points.jsonnew file mode 100644index 00000000000..cb8fc4a70ce--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/numeric-min-max-all-points.json@@ -0,0 +1,520 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.dimensions": ["TOTAL"],+ "graph.metrics": ["count"],+ "graph.series_order_dimension": null,+ "graph.series_order": null,+ "graph.show_values": true,+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "min-max",+ "boxplot.points_mode": "all",+ "boxplot.show_values_mode": "all"+ }+ },+ "data": {+ "rows": [+ ["2022-04-01T00:00:00Z", 40, 1],+ ["2022-05-01T00:00:00Z", 20, 1],+ ["2022-05-01T00:00:00Z", 40, 9],+ ["2022-05-01T00:00:00Z", 60, 2],+ ["2022-05-01T00:00:00Z", 80, 7],+ ["2022-06-01T00:00:00Z", 20, 14],+ ["2022-06-01T00:00:00Z", 40, 9],+ ["2022-06-01T00:00:00Z", 60, 6],+ ["2022-06-01T00:00:00Z", 80, 8],+ ["2022-07-01T00:00:00Z", 20, 15],+ ["2022-07-01T00:00:00Z", 40, 25],+ ["2022-07-01T00:00:00Z", 60, 8],+ ["2022-07-01T00:00:00Z", 80, 16],+ ["2022-08-01T00:00:00Z", 20, 13],+ ["2022-08-01T00:00:00Z", 40, 26],+ ["2022-08-01T00:00:00Z", 60, 10],+ ["2022-08-01T00:00:00Z", 80, 30],+ ["2022-09-01T00:00:00Z", 0, 2],+ ["2022-09-01T00:00:00Z", 20, 24],+ ["2022-09-01T00:00:00Z", 40, 26],+ ["2022-09-01T00:00:00Z", 60, 16],+ ["2022-09-01T00:00:00Z", 80, 24],+ ["2022-10-01T00:00:00Z", 20, 47],+ ["2022-10-01T00:00:00Z", 40, 38],+ ["2022-10-01T00:00:00Z", 60, 17],+ ["2022-10-01T00:00:00Z", 80, 32],+ ["2022-10-01T00:00:00Z", 100, 3],+ ["2022-11-01T00:00:00Z", 20, 49],+ ["2022-11-01T00:00:00Z", 40, 57],+ ["2022-11-01T00:00:00Z", 60, 12],+ ["2022-11-01T00:00:00Z", 80, 30],+ ["2022-11-01T00:00:00Z", 100, 2],+ ["2022-12-01T00:00:00Z", 0, 4],+ ["2022-12-01T00:00:00Z", 20, 49],+ ["2022-12-01T00:00:00Z", 40, 51],+ ["2022-12-01T00:00:00Z", 60, 24],+ ["2022-12-01T00:00:00Z", 80, 37],+ ["2023-01-01T00:00:00Z", 0, 1],+ ["2023-01-01T00:00:00Z", 20, 71],+ ["2023-01-01T00:00:00Z", 40, 64],+ ["2023-01-01T00:00:00Z", 60, 30],+ ["2023-01-01T00:00:00Z", 80, 35],+ ["2023-01-01T00:00:00Z", 100, 4],+ ["2023-02-01T00:00:00Z", 0, 1],+ ["2023-02-01T00:00:00Z", 20, 64],+ ["2023-02-01T00:00:00Z", 40, 71],+ ["2023-02-01T00:00:00Z", 60, 30],+ ["2023-02-01T00:00:00Z", 80, 36],+ ["2023-02-01T00:00:00Z", 100, 4],+ ["2023-03-01T00:00:00Z", 20, 75],+ ["2023-03-01T00:00:00Z", 40, 92],+ ["2023-03-01T00:00:00Z", 60, 40],+ ["2023-03-01T00:00:00Z", 80, 46],+ ["2023-03-01T00:00:00Z", 100, 3],+ ["2023-04-01T00:00:00Z", 0, 3],+ ["2023-04-01T00:00:00Z", 20, 79],+ ["2023-04-01T00:00:00Z", 40, 65],+ ["2023-04-01T00:00:00Z", 60, 38],+ ["2023-04-01T00:00:00Z", 80, 52],+ ["2023-04-01T00:00:00Z", 100, 1],+ ["2023-05-01T00:00:00Z", 0, 1],+ ["2023-05-01T00:00:00Z", 20, 74],+ ["2023-05-01T00:00:00Z", 40, 82],+ ["2023-05-01T00:00:00Z", 60, 42],+ ["2023-05-01T00:00:00Z", 80, 70],+ ["2023-05-01T00:00:00Z", 100, 2],+ ["2023-06-01T00:00:00Z", 0, 1],+ ["2023-06-01T00:00:00Z", 20, 61],+ ["2023-06-01T00:00:00Z", 40, 90],+ ["2023-06-01T00:00:00Z", 60, 46],+ ["2023-06-01T00:00:00Z", 80, 62],+ ["2023-06-01T00:00:00Z", 100, 4],+ ["2023-07-01T00:00:00Z", 0, 5],+ ["2023-07-01T00:00:00Z", 20, 99],+ ["2023-07-01T00:00:00Z", 40, 87],+ ["2023-07-01T00:00:00Z", 60, 57],+ ["2023-07-01T00:00:00Z", 80, 70],+ ["2023-07-01T00:00:00Z", 100, 7],+ ["2023-08-01T00:00:00Z", 0, 8],+ ["2023-08-01T00:00:00Z", 20, 94],+ ["2023-08-01T00:00:00Z", 40, 95],+ ["2023-08-01T00:00:00Z", 60, 62],+ ["2023-08-01T00:00:00Z", 80, 66],+ ["2023-08-01T00:00:00Z", 100, 8],+ ["2023-09-01T00:00:00Z", 0, 4],+ ["2023-09-01T00:00:00Z", 20, 108],+ ["2023-09-01T00:00:00Z", 40, 101],+ ["2023-09-01T00:00:00Z", 60, 66],+ ["2023-09-01T00:00:00Z", 80, 60],+ ["2023-09-01T00:00:00Z", 100, 7],+ ["2023-10-01T00:00:00Z", 0, 5],+ ["2023-10-01T00:00:00Z", 20, 91],+ ["2023-10-01T00:00:00Z", 40, 108],+ ["2023-10-01T00:00:00Z", 60, 64],+ ["2023-10-01T00:00:00Z", 80, 82],+ ["2023-10-01T00:00:00Z", 100, 4],+ ["2023-11-01T00:00:00Z", 0, 4],+ ["2023-11-01T00:00:00Z", 20, 112],+ ["2023-11-01T00:00:00Z", 40, 117],+ ["2023-11-01T00:00:00Z", 60, 66],+ ["2023-11-01T00:00:00Z", 80, 92],+ ["2023-11-01T00:00:00Z", 100, 3],+ ["2023-12-01T00:00:00Z", -60, 1],+ ["2023-12-01T00:00:00Z", 0, 4],+ ["2023-12-01T00:00:00Z", 20, 86],+ ["2023-12-01T00:00:00Z", 40, 132],+ ["2023-12-01T00:00:00Z", 60, 108],+ ["2023-12-01T00:00:00Z", 80, 80],+ ["2023-12-01T00:00:00Z", 100, 7],+ ["2024-01-01T00:00:00Z", 0, 1],+ ["2024-01-01T00:00:00Z", 20, 27],+ ["2024-01-01T00:00:00Z", 40, 105],+ ["2024-01-01T00:00:00Z", 60, 105],+ ["2024-01-01T00:00:00Z", 80, 56],+ ["2024-01-01T00:00:00Z", 100, 70],+ ["2024-01-01T00:00:00Z", 120, 75],+ ["2024-01-01T00:00:00Z", 140, 18],+ ["2024-02-01T00:00:00Z", 0, 1],+ ["2024-02-01T00:00:00Z", 20, 30],+ ["2024-02-01T00:00:00Z", 40, 83],+ ["2024-02-01T00:00:00Z", 60, 87],+ ["2024-02-01T00:00:00Z", 80, 53],+ ["2024-02-01T00:00:00Z", 100, 74],+ ["2024-02-01T00:00:00Z", 120, 59],+ ["2024-02-01T00:00:00Z", 140, 17],+ ["2024-03-01T00:00:00Z", 20, 35],+ ["2024-03-01T00:00:00Z", 40, 86],+ ["2024-03-01T00:00:00Z", 60, 104],+ ["2024-03-01T00:00:00Z", 80, 65],+ ["2024-03-01T00:00:00Z", 100, 58],+ ["2024-03-01T00:00:00Z", 120, 69],+ ["2024-03-01T00:00:00Z", 140, 28],+ ["2024-04-01T00:00:00Z", 0, 1],+ ["2024-04-01T00:00:00Z", 20, 28],+ ["2024-04-01T00:00:00Z", 40, 106],+ ["2024-04-01T00:00:00Z", 60, 96],+ ["2024-04-01T00:00:00Z", 80, 45],+ ["2024-04-01T00:00:00Z", 100, 73],+ ["2024-04-01T00:00:00Z", 120, 72],+ ["2024-04-01T00:00:00Z", 140, 18],+ ["2024-05-01T00:00:00Z", 0, 1],+ ["2024-05-01T00:00:00Z", 20, 25],+ ["2024-05-01T00:00:00Z", 40, 110],+ ["2024-05-01T00:00:00Z", 60, 130],+ ["2024-05-01T00:00:00Z", 80, 45],+ ["2024-05-01T00:00:00Z", 100, 85],+ ["2024-05-01T00:00:00Z", 120, 91],+ ["2024-05-01T00:00:00Z", 140, 33],+ ["2024-06-01T00:00:00Z", 20, 30],+ ["2024-06-01T00:00:00Z", 40, 86],+ ["2024-06-01T00:00:00Z", 60, 98],+ ["2024-06-01T00:00:00Z", 80, 43],+ ["2024-06-01T00:00:00Z", 100, 66],+ ["2024-06-01T00:00:00Z", 120, 86],+ ["2024-06-01T00:00:00Z", 140, 46],+ ["2024-07-01T00:00:00Z", 20, 37],+ ["2024-07-01T00:00:00Z", 40, 116],+ ["2024-07-01T00:00:00Z", 60, 127],+ ["2024-07-01T00:00:00Z", 80, 56],+ ["2024-07-01T00:00:00Z", 100, 78],+ ["2024-07-01T00:00:00Z", 120, 84],+ ["2024-07-01T00:00:00Z", 140, 25],+ ["2024-08-01T00:00:00Z", 20, 30],+ ["2024-08-01T00:00:00Z", 40, 87],+ ["2024-08-01T00:00:00Z", 60, 127],+ ["2024-08-01T00:00:00Z", 80, 63],+ ["2024-08-01T00:00:00Z", 100, 76],+ ["2024-08-01T00:00:00Z", 120, 81],+ ["2024-08-01T00:00:00Z", 140, 37],+ ["2024-09-01T00:00:00Z", 0, 1],+ ["2024-09-01T00:00:00Z", 20, 31],+ ["2024-09-01T00:00:00Z", 40, 100],+ ["2024-09-01T00:00:00Z", 60, 108],+ ["2024-09-01T00:00:00Z", 80, 53],+ ["2024-09-01T00:00:00Z", 100, 92],+ ["2024-09-01T00:00:00Z", 120, 76],+ ["2024-09-01T00:00:00Z", 140, 37],+ ["2024-10-01T00:00:00Z", 20, 33],+ ["2024-10-01T00:00:00Z", 40, 92],+ ["2024-10-01T00:00:00Z", 60, 117],+ ["2024-10-01T00:00:00Z", 80, 68],+ ["2024-10-01T00:00:00Z", 100, 95],+ ["2024-10-01T00:00:00Z", 120, 101],+ ["2024-10-01T00:00:00Z", 140, 27],+ ["2024-11-01T00:00:00Z", 20, 39],+ ["2024-11-01T00:00:00Z", 40, 89],+ ["2024-11-01T00:00:00Z", 60, 113],+ ["2024-11-01T00:00:00Z", 80, 55],+ ["2024-11-01T00:00:00Z", 100, 95],+ ["2024-11-01T00:00:00Z", 120, 98],+ ["2024-11-01T00:00:00Z", 140, 31],+ ["2024-12-01T00:00:00Z", 20, 32],+ ["2024-12-01T00:00:00Z", 40, 95],+ ["2024-12-01T00:00:00Z", 60, 119],+ ["2024-12-01T00:00:00Z", 80, 60],+ ["2024-12-01T00:00:00Z", 100, 101],+ ["2024-12-01T00:00:00Z", 120, 100],+ ["2024-12-01T00:00:00Z", 140, 32],+ ["2025-01-01T00:00:00Z", 20, 37],+ ["2025-01-01T00:00:00Z", 40, 101],+ ["2025-01-01T00:00:00Z", 60, 143],+ ["2025-01-01T00:00:00Z", 80, 70],+ ["2025-01-01T00:00:00Z", 100, 98],+ ["2025-01-01T00:00:00Z", 120, 95],+ ["2025-01-01T00:00:00Z", 140, 40],+ ["2025-02-01T00:00:00Z", 20, 39],+ ["2025-02-01T00:00:00Z", 40, 100],+ ["2025-02-01T00:00:00Z", 60, 115],+ ["2025-02-01T00:00:00Z", 80, 60],+ ["2025-02-01T00:00:00Z", 100, 84],+ ["2025-02-01T00:00:00Z", 120, 102],+ ["2025-02-01T00:00:00Z", 140, 33],+ ["2025-03-01T00:00:00Z", 20, 29],+ ["2025-03-01T00:00:00Z", 40, 105],+ ["2025-03-01T00:00:00Z", 60, 132],+ ["2025-03-01T00:00:00Z", 80, 66],+ ["2025-03-01T00:00:00Z", 100, 96],+ ["2025-03-01T00:00:00Z", 120, 116],+ ["2025-03-01T00:00:00Z", 140, 29],+ ["2025-04-01T00:00:00Z", 0, 1],+ ["2025-04-01T00:00:00Z", 20, 34],+ ["2025-04-01T00:00:00Z", 40, 97],+ ["2025-04-01T00:00:00Z", 60, 111],+ ["2025-04-01T00:00:00Z", 80, 70],+ ["2025-04-01T00:00:00Z", 100, 88],+ ["2025-04-01T00:00:00Z", 120, 92],+ ["2025-04-01T00:00:00Z", 140, 40],+ ["2025-05-01T00:00:00Z", 20, 53],+ ["2025-05-01T00:00:00Z", 40, 100],+ ["2025-05-01T00:00:00Z", 60, 128],+ ["2025-05-01T00:00:00Z", 80, 79],+ ["2025-05-01T00:00:00Z", 100, 87],+ ["2025-05-01T00:00:00Z", 120, 89],+ ["2025-05-01T00:00:00Z", 140, 25],+ ["2025-06-01T00:00:00Z", 0, 2],+ ["2025-06-01T00:00:00Z", 20, 39],+ ["2025-06-01T00:00:00Z", 40, 91],+ ["2025-06-01T00:00:00Z", 60, 111],+ ["2025-06-01T00:00:00Z", 80, 63],+ ["2025-06-01T00:00:00Z", 100, 86],+ ["2025-06-01T00:00:00Z", 120, 90],+ ["2025-06-01T00:00:00Z", 140, 39],+ ["2025-07-01T00:00:00Z", 20, 46],+ ["2025-07-01T00:00:00Z", 40, 108],+ ["2025-07-01T00:00:00Z", 60, 121],+ ["2025-07-01T00:00:00Z", 80, 66],+ ["2025-07-01T00:00:00Z", 100, 94],+ ["2025-07-01T00:00:00Z", 120, 91],+ ["2025-07-01T00:00:00Z", 140, 30],+ ["2025-08-01T00:00:00Z", 20, 35],+ ["2025-08-01T00:00:00Z", 40, 105],+ ["2025-08-01T00:00:00Z", 60, 127],+ ["2025-08-01T00:00:00Z", 80, 63],+ ["2025-08-01T00:00:00Z", 100, 88],+ ["2025-08-01T00:00:00Z", 120, 108],+ ["2025-08-01T00:00:00Z", 140, 40],+ ["2025-09-01T00:00:00Z", 20, 37],+ ["2025-09-01T00:00:00Z", 40, 100],+ ["2025-09-01T00:00:00Z", 60, 125],+ ["2025-09-01T00:00:00Z", 80, 67],+ ["2025-09-01T00:00:00Z", 100, 82],+ ["2025-09-01T00:00:00Z", 120, 80],+ ["2025-09-01T00:00:00Z", 140, 28],+ ["2025-10-01T00:00:00Z", 20, 34],+ ["2025-10-01T00:00:00Z", 40, 117],+ ["2025-10-01T00:00:00Z", 60, 131],+ ["2025-10-01T00:00:00Z", 80, 57],+ ["2025-10-01T00:00:00Z", 100, 91],+ ["2025-10-01T00:00:00Z", 120, 82],+ ["2025-10-01T00:00:00Z", 140, 28],+ ["2025-11-01T00:00:00Z", 20, 37],+ ["2025-11-01T00:00:00Z", 40, 107],+ ["2025-11-01T00:00:00Z", 60, 121],+ ["2025-11-01T00:00:00Z", 80, 69],+ ["2025-11-01T00:00:00Z", 100, 85],+ ["2025-11-01T00:00:00Z", 120, 81],+ ["2025-11-01T00:00:00Z", 140, 42],+ ["2025-12-01T00:00:00Z", 20, 29],+ ["2025-12-01T00:00:00Z", 40, 108],+ ["2025-12-01T00:00:00Z", 60, 130],+ ["2025-12-01T00:00:00Z", 80, 75],+ ["2025-12-01T00:00:00Z", 100, 83],+ ["2025-12-01T00:00:00Z", 120, 95],+ ["2025-12-01T00:00:00Z", 140, 30],+ ["2026-01-01T00:00:00Z", 20, 34],+ ["2026-01-01T00:00:00Z", 40, 105],+ ["2026-01-01T00:00:00Z", 60, 125],+ ["2026-01-01T00:00:00Z", 80, 64],+ ["2026-01-01T00:00:00Z", 100, 109],+ ["2026-01-01T00:00:00Z", 120, 105],+ ["2026-01-01T00:00:00Z", 140, 38],+ ["2026-02-01T00:00:00Z", 20, 34],+ ["2026-02-01T00:00:00Z", 40, 103],+ ["2026-02-01T00:00:00Z", 60, 130],+ ["2026-02-01T00:00:00Z", 80, 72],+ ["2026-02-01T00:00:00Z", 100, 87],+ ["2026-02-01T00:00:00Z", 120, 84],+ ["2026-02-01T00:00:00Z", 140, 33],+ ["2026-03-01T00:00:00Z", 20, 43],+ ["2026-03-01T00:00:00Z", 40, 102],+ ["2026-03-01T00:00:00Z", 60, 107],+ ["2026-03-01T00:00:00Z", 80, 72],+ ["2026-03-01T00:00:00Z", 100, 87],+ ["2026-03-01T00:00:00Z", 120, 93],+ ["2026-03-01T00:00:00Z", 140, 23],+ ["2026-04-01T00:00:00Z", 20, 27],+ ["2026-04-01T00:00:00Z", 40, 57],+ ["2026-04-01T00:00:00Z", 60, 75],+ ["2026-04-01T00:00:00Z", 80, 39],+ ["2026-04-01T00:00:00Z", 100, 62],+ ["2026-04-01T00:00:00Z", 120, 61],+ ["2026-04-01T00:00:00Z", 140, 23]+ ],+ "cols": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CREATED_AT",+ "display_name": "Created At: Month",+ "base_type": "type/DateTime",+ "effective_type": "type/DateTime",+ "semantic_type": "type/CreationTimestamp",+ "field_ref": [+ "field",+ 13,+ {+ "temporal-unit": "month"+ }+ ],+ "source": "breakout",+ "unit": "month",+ "fingerprint": {+ "global": {+ "distinct-count": 10001,+ "nil%": 0+ },+ "type": {+ "type/DateTime": {+ "earliest": "2022-04-30T18:56:13.352Z",+ "latest": "2026-04-19T14:07:15.657Z"+ }+ }+ }+ },+ {+ "name": "TOTAL",+ "display_name": "Total: 8 bins",+ "base_type": "type/Float",+ "effective_type": "type/Float",+ "semantic_type": null,+ "field_ref": [+ "field",+ 5,+ {+ "binning": {+ "strategy": "num-bins",+ "min-value": 0,+ "max-value": 160,+ "num-bins": 8,+ "bin-width": 20+ }+ }+ ],+ "source": "breakout",+ "binning_info": {+ "binning_strategy": "num-bins",+ "strategy": "num-bins",+ "min_value": 0,+ "max_value": 160,+ "num_bins": 8,+ "bin_width": 20+ },+ "fingerprint": {+ "global": {+ "distinct-count": 4426,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 8.93914247937167,+ "q1": 51.34535490743823,+ "q3": 110.29428389265787,+ "max": 159.34900526552292,+ "sd": 34.26469575709948,+ "avg": 80.35871658771228+ }+ }+ }+ },+ {+ "name": "count",+ "display_name": "Count",+ "base_type": "type/BigInteger",+ "effective_type": "type/BigInteger",+ "semantic_type": "type/Quantity",+ "field_ref": ["aggregation", 0],+ "source": "aggregation",+ "fingerprint": {+ "global": {+ "distinct-count": 114,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 1,+ "q1": 29.58731445692873,+ "q3": 91.5,+ "max": 143,+ "sd": 37.626906825058086,+ "avg": 60.12820512820513+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/outlier-overflow.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/outlier-overflow.jsonnew file mode 100644index 00000000000..96c9b90eeb8--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/outlier-overflow.json@@ -0,0 +1,135 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "series_settings": {+ "VAL": {+ "color": "#689636"+ }+ },+ "boxplot.points_mode": "all",+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "graph.show_goal": false,+ "graph.goal_value": 21,+ "graph.label_value_frequency": "all"+ }+ },+ "data": {+ "rows": [+ ["HighOut", 10],+ ["HighOut", 20],+ ["HighOut", 30],+ ["HighOut", 40],+ ["HighOut", 200],+ ["LowOut", -100],+ ["LowOut", 50],+ ["LowOut", 60],+ ["LowOut", 70],+ ["LowOut", 80],+ ["BothOut", -80],+ ["BothOut", 40],+ ["BothOut", 50],+ ["BothOut", 60],+ ["BothOut", 180]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 3,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 6.666666666666667+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 12,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": -100,+ "q1": 22.5,+ "q3": 67.75255128608411,+ "max": 200,+ "sd": 77.13315635654882,+ "avg": 47.333333333333336+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/positive-negative-cross-zero-y-axis-auto.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/positive-negative-cross-zero-y-axis-auto.jsonnew file mode 100644index 00000000000..7089c996c00--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/positive-negative-cross-zero-y-axis-auto.json@@ -0,0 +1,129 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all"+ }+ },+ "data": {+ "rows": [+ ["Positive", 80],+ ["Positive", 85],+ ["Positive", 90],+ ["Positive", 95],+ ["Positive", 100],+ ["Negative", -100],+ ["Negative", -95],+ ["Negative", -90],+ ["Negative", -85],+ ["Negative", -80],+ ["CrossZero", -50],+ ["CrossZero", -25],+ ["CrossZero", 0],+ ["CrossZero", 25],+ ["CrossZero", 50]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 3,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 8.333333333333334+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 15,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": -100,+ "q1": -83.75,+ "q3": 83.75,+ "max": 100,+ "sd": 79.16979943676215,+ "avg": 0+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/pow-scale.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/pow-scale.jsonnew file mode 100644index 00000000000..ef6a44ffcb2--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/pow-scale.json@@ -0,0 +1,136 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": false,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "tukey",+ "graph.y_axis.scale": "pow"+ }+ },+ "data": {+ "rows": [+ ["Orders", 1],+ ["Orders", 10],+ ["Orders", 100],+ ["Orders", 1000],+ ["Orders", 10000],+ ["Close", 100],+ ["Close", 110],+ ["Close", 120],+ ["Close", 130],+ ["Close", 140],+ ["Fraction", 0.01],+ ["Fraction", 0.1],+ ["Fraction", 0.5],+ ["Fraction", 1],+ ["Fraction", 10],+ ["WithOutlier", 100],+ ["WithOutlier", 120],+ ["WithOutlier", 140],+ ["WithOutlier", 160],+ ["WithOutlier", 10000]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 7.5+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 13,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 0.01,+ "q1": 5.5,+ "q3": 140,+ "max": 10000,+ "sd": 3047.139446133693,+ "avg": 1112.1305+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/scale-extremes.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/scale-extremes.jsonnew file mode 100644index 00000000000..ab09efaff3d--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/scale-extremes.json@@ -0,0 +1,125 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all",+ "boxplot.whisker_type": "tukey"+ }+ },+ "data": {+ "rows": [+ ["Large", 1000000],+ ["Large", 2000000],+ ["Large", 3000000],+ ["Large", 4000000],+ ["Large", 5000000],+ ["Small", 0.001],+ ["Small", 0.002],+ ["Small", 0.003],+ ["Small", 0.004],+ ["Small", 0.005]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 2,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 5+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Decimal",+ "effective_type": "type/Decimal",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Decimal"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 10,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 0.001,+ "q1": 0.003,+ "q3": 3000000,+ "max": 5000000,+ "sd": 1900292.373849643,+ "avg": 1500000.0015+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/single-category.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/single-category.jsonnew file mode 100644index 00000000000..75a04ff106d--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/single-category.json@@ -0,0 +1,125 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "graph.label_value_frequency": "fit",+ "graph.goal_value": 21,+ "graph.show_goal": true,+ "boxplot.show_values_mode": "all",+ "graph.show_values": true,+ "boxplot.points_mode": "all",+ "series_settings": {+ "VAL": {+ "color": "#51528D"+ }+ }+ }+ },+ "data": {+ "rows": [+ ["Only", 10],+ ["Only", 20],+ ["Only", 30],+ ["Only", 40],+ ["Only", 50]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 1,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 4+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 5,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": 10,+ "q1": 17.5,+ "q3": 42.5,+ "max": 50,+ "sd": 15.811388300841896,+ "avg": 30+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/top-bottom-mixed-outliers.json b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/top-bottom-mixed-outliers.jsonnew file mode 100644index 00000000000..a6aacc79d5b--- /dev/null+++ b/frontend/src/metabase/static-viz/components/BoxPlotChart/stories-data/top-bottom-mixed-outliers.json@@ -0,0 +1,134 @@+[+ {+ "card": {+ "display": "boxplot",+ "visualization_settings": {+ "boxplot.points_mode": "outliers",+ "graph.show_values": true,+ "boxplot.show_values_mode": "all",+ "graph.label_value_formatting": "compact",+ "graph.label_value_frequency": "all"+ }+ },+ "data": {+ "rows": [+ ["None", 40],+ ["None", 45],+ ["None", 50],+ ["None", 55],+ ["None", 60],+ ["High", 40],+ ["High", 45],+ ["High", 50],+ ["High", 55],+ ["High", 150],+ ["Low", -50],+ ["Low", 45],+ ["Low", 50],+ ["Low", 55],+ ["Low", 60],+ ["Both", -30],+ ["Both", 45],+ ["Both", 50],+ ["Both", 55],+ ["Both", 130]+ ],+ "cols": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native"+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native"+ }+ ],+ "results_metadata": {+ "columns": [+ {+ "name": "CATEGORY",+ "display_name": "CATEGORY",+ "base_type": "type/Text",+ "effective_type": "type/Text",+ "semantic_type": null,+ "field_ref": [+ "field",+ "CATEGORY",+ {+ "base-type": "type/Text"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 4,+ "nil%": 0+ },+ "type": {+ "type/Text": {+ "percent-json": 0,+ "percent-url": 0,+ "percent-email": 0,+ "percent-state": 0,+ "average-length": 3.75+ }+ }+ }+ },+ {+ "name": "VAL",+ "display_name": "VAL",+ "base_type": "type/Integer",+ "effective_type": "type/Integer",+ "semantic_type": null,+ "field_ref": [+ "field",+ "VAL",+ {+ "base-type": "type/Integer"+ }+ ],+ "source": "native",+ "fingerprint": {+ "global": {+ "distinct-count": 9,+ "nil%": 0+ },+ "type": {+ "type/Number": {+ "min": -50,+ "q1": 43.66025403784439,+ "q3": 56.33974596215561,+ "max": 150,+ "sd": 41.92725529821986,+ "avg": 50+ }+ }+ }+ }+ ]+ },+ "results_timezone": "UTC"+ }+ }+]diff --git a/frontend/src/metabase/static-viz/components/StaticVisualization/StaticVisualization.tsx b/frontend/src/metabase/static-viz/components/StaticVisualization/StaticVisualization.tsxindex 6bb15017296..b2babdf2d90 100644--- a/frontend/src/metabase/static-viz/components/StaticVisualization/StaticVisualization.tsx+++ b/frontend/src/metabase/static-viz/components/StaticVisualization/StaticVisualization.tsx@@ -3,6 +3,7 @@ import { getVisualizationTransformed } from "metabase/visualizations";import { getComputedSettingsForSeries } from "metabase/visualizations/lib/settings/visualization";import type { StaticVisualizationProps } from "metabase/visualizations/types";+import { BoxPlotChart } from "../BoxPlotChart/BoxPlotChart";import { ComboChart } from "../ComboChart";import { FunnelBarChart } from "../FunnelBarChart";import { PieChart } from "../PieChart/PieChart";@@ -41,6 +42,8 @@ export const StaticVisualization = ({return <ComboChart {...props} />;case "scatter":return <ScatterPlot {...props} />;+ case "boxplot":+ return <BoxPlotChart {...props} />;case "waterfall":return <WaterfallChart {...props} />;case "funnel":diff --git a/frontend/src/metabase/static-viz/register.js b/frontend/src/metabase/static-viz/register.jsindex ebf30b25ef2..8719efab364 100644--- a/frontend/src/metabase/static-viz/register.js+++ b/frontend/src/metabase/static-viz/register.js@@ -4,6 +4,7 @@ import {} from "metabase/visualizations";import { AreaChart } from "metabase/visualizations/visualizations/AreaChart";import { BarChart } from "metabase/visualizations/visualizations/BarChart";+import { BoxPlot } from "metabase/visualizations/visualizations/BoxPlot";import { ComboChart } from "metabase/visualizations/visualizations/ComboChart";import { Funnel } from "metabase/visualizations/visualizations/Funnel";import { LineChart } from "metabase/visualizations/visualizations/LineChart";@@ -26,6 +27,7 @@ export const registerStaticVisualizations = () => {registerVisualization(WaterfallChart);registerVisualization(ComboChart);registerVisualization(ScatterPlot);+ registerVisualization(BoxPlot);registerVisualization(PieChart);registerVisualization(SankeyChart);registerVisualization(RowChart);diff --git a/frontend/src/metabase/ui/components/icons/Icon/icons/boxplot.svg b/frontend/src/metabase/ui/components/icons/Icon/icons/boxplot.svgnew file mode 100644index 00000000000..9e5f4c86d76--- /dev/null+++ b/frontend/src/metabase/ui/components/icons/Icon/icons/boxplot.svg@@ -0,0 +1,17 @@+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">+ <!-- Left boxplot -->+ <rect x="2" y="5" width="4" height="6" fill="none" stroke="currentColor" stroke-width="1.5"/>+ <line x1="4" y1="2" x2="4" y2="5" stroke="currentColor" stroke-width="1.5"/>+ <line x1="4" y1="11" x2="4" y2="14" stroke="currentColor" stroke-width="1.5"/>+ <line x1="2" y1="8" x2="6" y2="8" stroke="currentColor" stroke-width="1.5"/>+ <line x1="2.5" y1="2" x2="5.5" y2="2" stroke="currentColor" stroke-width="1.5"/>+ <line x1="2.5" y1="14" x2="5.5" y2="14" stroke="currentColor" stroke-width="1.5"/>++ <!-- Right boxplot -->+ <rect x="10" y="4" width="4" height="5" fill="none" stroke="currentColor" stroke-width="1.5"/>+ <line x1="12" y1="1" x2="12" y2="4" stroke="currentColor" stroke-width="1.5"/>+ <line x1="12" y1="9" x2="12" y2="12" stroke="currentColor" stroke-width="1.5"/>+ <line x1="10" y1="6.5" x2="14" y2="6.5" stroke="currentColor" stroke-width="1.5"/>+ <line x1="10.5" y1="1" x2="13.5" y2="1" stroke="currentColor" stroke-width="1.5"/>+ <line x1="10.5" y1="12" x2="13.5" y2="12" stroke="currentColor" stroke-width="1.5"/>+</svg>diff --git a/frontend/src/metabase/ui/components/icons/Icon/icons/index.ts b/frontend/src/metabase/ui/components/icons/Icon/icons/index.tsindex 34d073af9d9..0cf62f99e55 100644--- a/frontend/src/metabase/ui/components/icons/Icon/icons/index.ts+++ b/frontend/src/metabase/ui/components/icons/Icon/icons/index.ts@@ -68,6 +68,8 @@ import bookmark_component from "./bookmark.svg?component";import bookmark_source from "./bookmark.svg?source";import bookmark_filled_component from "./bookmark_filled.svg?component";import bookmark_filled_source from "./bookmark_filled.svg?source";+import boxplot_component from "./boxplot.svg?component";+import boxplot_source from "./boxplot.svg?source";import breakout_component from "./breakout.svg?component";import breakout_source from "./breakout.svg?source";import broken_link_component from "./broken_link.svg?component";@@ -685,6 +687,10 @@ export const Icons: Record<IconName, { component: React.VFC; source: string }> =component: bolt_filled_component,source: bolt_filled_source,},+ boxplot: {+ component: boxplot_component,+ source: boxplot_source,+ },breakout: {component: breakout_component,source: breakout_source,@@ -1704,6 +1710,7 @@ export type IconName =| "bookmark_filled"| "bolt"| "bolt_filled"+ | "boxplot"| "breakout"| "bubble"| "broken_link"diff --git a/frontend/src/metabase/visualizations/components/EmptyVizState/EmptyVizState.tsx b/frontend/src/metabase/visualizations/components/EmptyVizState/EmptyVizState.tsxindex 48318822c51..410a1b99a1c 100644--- a/frontend/src/metabase/visualizations/components/EmptyVizState/EmptyVizState.tsx+++ b/frontend/src/metabase/visualizations/components/EmptyVizState/EmptyVizState.tsx@@ -35,7 +35,8 @@ export const EmptyVizState = ({isCardDisplayType(chartType) &&chartType !== "table" &&chartType !== "object" &&- chartType !== "list";+ chartType !== "list" &&+ chartType !== "boxplot";const emptyVizChart = isValidChartType ? chartType : "bar";diff --git a/frontend/src/metabase/visualizations/components/EmptyVizState/utils.ts b/frontend/src/metabase/visualizations/components/EmptyVizState/utils.tsindex d0953f15902..8da8b7a8de4 100644--- a/frontend/src/metabase/visualizations/components/EmptyVizState/utils.ts+++ b/frontend/src/metabase/visualizations/components/EmptyVizState/utils.ts@@ -7,7 +7,11 @@ import type { CardDisplayType } from "metabase-types/api";* The "table" and the "object" (detail) charts can always display the data* using the raw table alone, so they don't need an empty state.*/-export type ExcludedEmptyVizDisplayTypes = "table" | "list" | "object";+export type ExcludedEmptyVizDisplayTypes =+ | "table"+ | "list"+ | "object"+ | "boxplot";type SupportedDisplayType = Exclude<CardDisplayType,ExcludedEmptyVizDisplayTypesdiff --git a/frontend/src/metabase/visualizations/components/settings/ChartSettingEnumToggle.tsx b/frontend/src/metabase/visualizations/components/settings/ChartSettingEnumToggle.tsxnew file mode 100644index 00000000000..4d4a6c99012--- /dev/null+++ b/frontend/src/metabase/visualizations/components/settings/ChartSettingEnumToggle.tsx@@ -0,0 +1,26 @@+import { Switch } from "metabase/ui";++export const ChartSettingEnumToggle = <T extends string>({+ value,+ onChange,+ id,+ checkedValue,+ uncheckedValue,+}: {+ value: T | undefined;+ onChange: (value: T) => void;+ id?: string;+ checkedValue: T;+ uncheckedValue: T;+}) => (+ <Switch+ labelPosition="left"+ checked={value === checkedValue}+ onChange={(e) =>+ onChange(e.currentTarget.checked ? checkedValue : uncheckedValue)+ }+ id={id}+ role="switch"+ size="sm"+ />+);diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/constants.ts b/frontend/src/metabase/visualizations/echarts/boxplot/constants.tsnew file mode 100644index 00000000000..8acc1807320--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/constants.ts@@ -0,0 +1,40 @@+export const BOXPLOT_SERIES_NAME = "Box Plot";+export const OUTLIERS_SERIES_NAME = "Outliers";+export const DATA_POINTS_SERIES_NAME = "Data points";+export const MEAN_SERIES_NAME = "Mean";++export type BoxPlotStat = "min" | "q1" | "median" | "q3" | "max" | "mean";++export const BOXPLOT_STATS: BoxPlotStat[] = [+ "min",+ "q1",+ "median",+ "q3",+ "max",+ "mean",+];++export const BOXPLOT_BOX_WIDTH_RATIO = 0.7;+export const BOXPLOT_MIN_BOX_WIDTH = 3;+export const BOXPLOT_MAX_BOX_WIDTH = 60;+export const BOXPLOT_LABEL_PADDING = 4;++export const BOX_FILL_OPACITY = 0.15;+export const EMPHASIS_DARKEN_FACTOR = 0.2;+export const MEAN_COLOR_DARKEN_FACTOR = 0.3;+export const BLUR_OPACITY = 0.7;+export const NON_OUTLIER_OPACITY = 0.6;+export const MEAN_SYMBOL_SIZE_OFFSET = 2;+export const LABEL_DISTANCE = 3;++export const BOXPLOT_DATA_LABEL_STYLE = {+ fontWeight: 400,+ fontSize: 13,+ textBorderWidth: 3,+};++export const BOXPLOT_MIN_SYMBOL_SIZE = 5;+export const BOXPLOT_MAX_SYMBOL_SIZE = 10;+export const BOXPLOT_SYMBOL_SIZE_RATIO = 0.15;++export const SIDE_LABELS_MIN_GAP_RATIO = 1.5;diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/events.ts b/frontend/src/metabase/visualizations/echarts/boxplot/events.tsnew file mode 100644index 00000000000..bd865828554--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/events.ts@@ -0,0 +1,571 @@+import { t } from "ttag";++import type {+ EChartsTooltipModel,+ EChartsTooltipRow,+} from "metabase/visualizations/components/ChartTooltip/EChartsTooltip";+import { formatValueForTooltip } from "metabase/visualizations/components/ChartTooltip/utils";+import {+ INDEX_KEY,+ X_AXIS_DATA_KEY,+} from "metabase/visualizations/echarts/cartesian/constants/dataset";+import { getDatasetKey } from "metabase/visualizations/echarts/cartesian/model/dataset";+import type { DataKey } from "metabase/visualizations/echarts/cartesian/model/types";+import type { EChartsSeriesMouseEvent } from "metabase/visualizations/echarts/types";+import type {+ ComputedVisualizationSettings,+ DataPoint,+} from "metabase/visualizations/types";+import type { ClickObject, ClickObjectDimension } from "metabase-lib";+import type { DatasetColumn, RowValue } from "metabase-types/api";++import type {+ BoxPlotChartModel,+ BoxPlotDatum,+ BoxPlotSeriesModel,+} from "./model/types";+import {+ extractSeriesDataKeyFromName,+ isBoxPlotScatterSeriesName,+ isMeanSeriesName,+ isPointSeriesName,+} from "./utils";++const isDatasetRowObject = (value: unknown): value is Record<string, unknown> =>+ value != null &&+ typeof value === "object" &&+ !Array.isArray(value) &&+ X_AXIS_DATA_KEY in value;++const extractPointData = (+ dataValue: unknown,+ dataKey: DataKey,+): { xValue: RowValue; yValue: number; index: number | null } | null => {+ if (!isDatasetRowObject(dataValue)) {+ return null;+ }+ const xValue = dataValue[X_AXIS_DATA_KEY] as RowValue;+ const yValue = dataValue[dataKey];+ const rawIndex = dataValue[INDEX_KEY];+ const index = typeof rawIndex === "number" ? rawIndex : null;++ if (typeof yValue === "number" && Number.isFinite(yValue)) {+ return { xValue, yValue, index };+ }+ return null;+};++export const isBoxPlotSeriesEvent = (+ event: EChartsSeriesMouseEvent,+): boolean => {+ if (event.seriesType === "boxplot") {+ return true;+ }++ const seriesName = event.seriesName ?? "";+ return isBoxPlotScatterSeriesName(seriesName);+};++const findSeriesModelByEvent = (+ seriesModels: BoxPlotSeriesModel[],+ seriesId: string | undefined,+ seriesName: string | undefined,+): BoxPlotSeriesModel | null => {+ if (seriesModels.length === 0) {+ return null;+ }++ if (seriesId) {+ const matchById = seriesModels.find((s) => s.dataKey === seriesId);+ if (matchById) {+ return matchById;+ }+ }++ if (seriesName) {+ const extractedDataKey = extractSeriesDataKeyFromName(seriesName);+ if (extractedDataKey) {+ return seriesModels.find((s) => s.dataKey === extractedDataKey) ?? null;+ }+ }++ return null;+};++const createTooltipRow = (+ name: string,+ value: unknown,+ column: DatasetColumn | undefined,+ settings: ComputedVisualizationSettings,+ isAlreadyScaled = false,+): EChartsTooltipRow => ({+ name,+ values: [+ formatValueForTooltip({+ value,+ column,+ settings,+ isAlreadyScaled,+ }),+ ],+});++type DataBySeriesAndXValue = Map<DataKey, Map<RowValue, BoxPlotDatum>>;++const getDatumByXValue = (+ dataBySeriesAndXValue: DataBySeriesAndXValue,+ dataKey: DataKey,+ xValue: RowValue,+): BoxPlotDatum | undefined => dataBySeriesAndXValue.get(dataKey)?.get(xValue);++const getXIndexAndValue = (+ event: EChartsSeriesMouseEvent,+ dataBySeriesAndXValue: DataBySeriesAndXValue,+ dataKey: DataKey,+ xValues: RowValue[],+ fromEChartsAxisValue: (value: number) => number,+): { xIndex: number; specificValue: number | null } | null => {+ const { dataIndex, seriesType, seriesName, value } = event;++ if (dataIndex == null) {+ return null;+ }++ if (seriesType === "boxplot") {+ const xValue = xValues[dataIndex];+ const datum = getDatumByXValue(dataBySeriesAndXValue, dataKey, xValue);+ return { xIndex: dataIndex, specificValue: datum?.median ?? null };+ }++ if (isMeanSeriesName(seriesName)) {+ const xValue = xValues[dataIndex];+ const datum = getDatumByXValue(dataBySeriesAndXValue, dataKey, xValue);+ return { xIndex: dataIndex, specificValue: datum?.mean ?? null };+ }++ const pointData = extractPointData(value, dataKey);+ if (!pointData) {+ return null;+ }++ const xIndex = xValues.indexOf(pointData.xValue);+ const originalYValue = fromEChartsAxisValue(pointData.yValue);+ return {+ xIndex: xIndex >= 0 ? xIndex : dataIndex,+ specificValue: originalYValue,+ };+};++const buildBoxClickData = (+ dimensions: ClickObjectDimension[],+ seriesModel: BoxPlotSeriesModel,+ specificValue: number | null,+): DataPoint[] => {+ const data: DataPoint[] = [];++ for (const dim of dimensions) {+ data.push({+ key: dim.column.display_name,+ value: dim.value,+ col: dim.column,+ });+ }++ if (specificValue != null && seriesModel.column) {+ data.push({+ key: seriesModel.column.display_name,+ value: specificValue,+ col: seriesModel.column,+ });+ }++ return data;+};++const buildPointClickData = (+ rawDatum: Record<string, RowValue>,+ columnByDataKey: Record<DataKey, DatasetColumn>,+): DataPoint[] => {+ const data: DataPoint[] = [];++ for (const [dataKey, value] of Object.entries(rawDatum)) {+ if (dataKey === X_AXIS_DATA_KEY || value == null) {+ continue;+ }+ const column = columnByDataKey[dataKey];+ if (column) {+ data.push({+ key: column.display_name,+ value,+ col: column,+ });+ }+ }++ return data;+};++export const getBoxPlotClickData = (+ chartModel: BoxPlotChartModel,+ settings: ComputedVisualizationSettings,+ event: EChartsSeriesMouseEvent,+): ClickObject | null => {+ const { dataIndex, seriesName, seriesId, value } = event;+ const {+ xValues,+ dataBySeriesAndXValue,+ seriesModels,+ dimensionModel,+ breakoutColumn,+ yAxisScaleTransforms,+ columnByDataKey,+ } = chartModel;++ if (dataIndex == null || seriesModels.length === 0) {+ return null;+ }++ const seriesModel =+ findSeriesModelByEvent(seriesModels, seriesId, seriesName) ??+ seriesModels[0];++ const dimensionColumn = dimensionModel.column;+ const xIndexAndValue = getXIndexAndValue(+ event,+ dataBySeriesAndXValue,+ seriesModel.dataKey,+ xValues,+ yAxisScaleTransforms.fromEChartsAxisValue,+ );++ if (!xIndexAndValue) {+ return null;+ }++ const { xIndex, specificValue } = xIndexAndValue;+ const xValue = xValues[xIndex];+ if (xValue === undefined) {+ return null;+ }++ const dimensions: ClickObjectDimension[] = [];++ if (dimensionColumn) {+ dimensions.push({ column: dimensionColumn, value: xValue });+ }++ if (breakoutColumn && "breakoutValue" in seriesModel) {+ dimensions.push({+ column: breakoutColumn,+ value: seriesModel.breakoutValue,+ });+ }++ let data: DataPoint[];++ if (isPointSeriesName(seriesName)) {+ const pointData = extractPointData(value, seriesModel.dataKey);+ const datum = pointData+ ? getDatumByXValue(+ dataBySeriesAndXValue,+ seriesModel.dataKey,+ pointData.xValue,+ )+ : null;+ const rawDatum = findRawDatumByIndex(datum, pointData?.index ?? null);++ if (rawDatum) {+ data = buildPointClickData(rawDatum, columnByDataKey);+ } else {+ data = buildBoxClickData(dimensions, seriesModel, specificValue);+ }+ } else {+ data = buildBoxClickData(dimensions, seriesModel, specificValue);+ }++ return {+ cardId: seriesModel.cardId,+ event: event.event?.event,+ value: specificValue,+ column: seriesModel.column,+ dimensions,+ data,+ settings,+ };+};++export const getBoxPlotTooltipModel = (+ chartModel: BoxPlotChartModel,+ settings: ComputedVisualizationSettings,+ dataIndex: number,+ seriesName: string | undefined,+ seriesId: string | undefined,+ dataValue: unknown,+): EChartsTooltipModel | null => {+ const {+ xValues,+ dataBySeriesAndXValue,+ seriesModels,+ dimensionModel,+ showMean,+ breakoutColumn,+ } = chartModel;++ if (seriesModels.length === 0) {+ return null;+ }++ const seriesModel =+ findSeriesModelByEvent(seriesModels, seriesId, seriesName) ??+ seriesModels[0];++ if (isPointSeriesName(seriesName)) {+ return getPointTooltipModel(+ chartModel,+ seriesModel,+ dataBySeriesAndXValue,+ dataValue,+ settings,+ );+ }++ const xValue = xValues[dataIndex];+ const datum = getDatumByXValue(+ dataBySeriesAndXValue,+ seriesModel.dataKey,+ xValue,+ );++ if (!datum) {+ return null;+ }++ return getBoxTooltipModel(+ datum,+ seriesModel,+ dimensionModel.column,+ breakoutColumn,+ settings,+ showMean,+ );+};++const getBoxTooltipModel = (+ datum: BoxPlotDatum,+ seriesModel: BoxPlotSeriesModel,+ dimensionColumn: DatasetColumn | undefined,+ breakoutColumn: DatasetColumn | undefined,+ settings: ComputedVisualizationSettings,+ showMean: boolean,+): EChartsTooltipModel => {+ const metricColumn = seriesModel.column;++ const header = String(+ formatValueForTooltip({+ value: datum.xValue,+ column: dimensionColumn,+ settings,+ }),+ );++ const formatValue = (value: number) =>+ formatValueForTooltip({+ value,+ column: metricColumn,+ settings,+ isAlreadyScaled: true,+ });++ const hasBreakout = breakoutColumn != null && "breakoutValue" in seriesModel;++ const rows: EChartsTooltipRow[] = [+ ...(hasBreakout+ ? [+ {+ name: breakoutColumn.display_name,+ values: [+ formatValueForTooltip({+ value: seriesModel.breakoutValue,+ column: breakoutColumn,+ settings,+ }),+ ],+ },+ ]+ : []),+ {+ name: t`Upper whisker`,+ values: [formatValue(datum.max)],+ },+ {+ name: t`Q3 (75th percentile)`,+ values: [formatValue(datum.q3)],+ },+ {+ name: t`Median`,+ values: [formatValue(datum.median)],+ },+ ...(showMean && Number.isFinite(datum.mean)+ ? [{ name: t`Mean`, values: [formatValue(datum.mean)] }]+ : []),+ {+ name: t`Q1 (25th percentile)`,+ values: [formatValue(datum.q1)],+ },+ {+ name: t`Lower whisker`,+ values: [formatValue(datum.min)],+ },+ ];++ return {+ header,+ rows,+ };+};++const findRawDatumByIndex = (+ boxPlotDatum: BoxPlotDatum | null | undefined,+ index: number | null,+): Record<string, RowValue> | null => {+ if (boxPlotDatum == null || index == null) {+ return null;+ }+ const rawDataPoint = boxPlotDatum.rawDataPoints.find(+ (rp) => rp.index === index,+ );+ return rawDataPoint?.datum ?? null;+};++const buildPointTooltipRows = (+ rawDatum: Record<string, RowValue> | null,+ seriesModel: BoxPlotSeriesModel,+ dimensionColumn: DatasetColumn | undefined,+ breakoutColumn: DatasetColumn | undefined,+ columnByDataKey: Record<DataKey, DatasetColumn>,+ settings: ComputedVisualizationSettings,+): EChartsTooltipRow[] => {+ const metricColumn = seriesModel.column;+ const hasBreakout = breakoutColumn != null && "breakoutValue" in seriesModel;++ if (!rawDatum) {+ return [];+ }++ const metricValue = rawDatum[seriesModel.dataKey];+ const metricRow: EChartsTooltipRow[] =+ metricColumn && metricValue != null+ ? [+ createTooltipRow(+ metricColumn.display_name,+ metricValue,+ metricColumn,+ settings,+ ),+ ]+ : [];++ const breakoutRow: EChartsTooltipRow[] = hasBreakout+ ? [+ createTooltipRow(+ breakoutColumn.display_name,+ seriesModel.breakoutValue,+ breakoutColumn,+ settings,+ ),+ ]+ : [];++ const breakoutValue = hasBreakout ? seriesModel.breakoutValue : undefined;++ const skipDataKeys = new Set<DataKey>([seriesModel.dataKey, X_AXIS_DATA_KEY]);++ if (dimensionColumn) {+ skipDataKeys.add(+ getDatasetKey(dimensionColumn, seriesModel.cardId, breakoutValue),+ );+ }++ if (hasBreakout && breakoutColumn) {+ skipDataKeys.add(+ getDatasetKey(breakoutColumn, seriesModel.cardId, breakoutValue),+ );+ }++ const otherRows: EChartsTooltipRow[] = [];+ for (const [dataKey, value] of Object.entries(rawDatum)) {+ if (skipDataKeys.has(dataKey)) {+ continue;+ }+ const column = columnByDataKey[dataKey];+ if (column && value != null) {+ otherRows.push(+ createTooltipRow(column.display_name, value, column, settings),+ );+ }+ }++ return [...metricRow, ...breakoutRow, ...otherRows];+};++const getPointTooltipModel = (+ chartModel: BoxPlotChartModel,+ seriesModel: BoxPlotSeriesModel,+ dataBySeriesAndXValue: DataBySeriesAndXValue,+ dataValue: unknown,+ settings: ComputedVisualizationSettings,+): EChartsTooltipModel | null => {+ const {+ dimensionModel,+ whiskerType,+ breakoutColumn,+ columnByDataKey,+ yAxisScaleTransforms,+ } = chartModel;++ const pointData = extractPointData(dataValue, seriesModel.dataKey);+ if (!pointData) {+ return null;+ }++ const { xValue, index } = pointData;+ const yValue = yAxisScaleTransforms.fromEChartsAxisValue(pointData.yValue);+ const datum = getDatumByXValue(+ dataBySeriesAndXValue,+ seriesModel.dataKey,+ xValue,+ );++ if (!datum) {+ return null;+ }++ const dimensionColumn = dimensionModel.column;+ const isOutlier =+ whiskerType === "tukey" && (yValue < datum.min || yValue > datum.max);++ const xValueFormatted = String(+ formatValueForTooltip({+ value: datum.xValue,+ column: dimensionColumn,+ settings,+ }),+ );++ const header = isOutlier+ ? `${xValueFormatted} (${t`outlier`})`+ : xValueFormatted;++ const rawDatum = findRawDatumByIndex(datum, index);++ const rows = buildPointTooltipRows(+ rawDatum,+ seriesModel,+ dimensionColumn,+ breakoutColumn,+ columnByDataKey,+ settings,+ );++ return { header, rows };+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/index.ts b/frontend/src/metabase/visualizations/echarts/boxplot/index.tsnew file mode 100644index 00000000000..327acb09e6a--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/index.ts@@ -0,0 +1,25 @@+export { getBoxPlotModel } from "./model";+export type {+ BoxPlotChartModel,+ BoxPlotDatum,+ BoxPlotLabelFrequency,+ BoxPlotPointsMode,+ BoxPlotSeriesModel,+ BoxPlotShowValuesMode,+ BoxPlotWhiskerType,+} from "./model/types";+export { getBoxPlotOption } from "./option";+export { getBoxPlotTooltipOption } from "./option/tooltip";+export { getBoxPlotLayoutModel } from "./layout";+export type { BoxPlotLayoutModel, BoxPlotLabelOverflow } from "./layout/types";+export {+ getBoxPlotClickData,+ getBoxPlotTooltipModel,+ isBoxPlotSeriesEvent,+} from "./events";+export {+ extractSeriesDataKeyFromName,+ getDataPointsSeriesName,+ getMeanSeriesName,+ getOutliersSeriesName,+} from "./utils";diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/layout/index.ts b/frontend/src/metabase/visualizations/echarts/boxplot/layout/index.tsnew file mode 100644index 00000000000..c4d62a902c9--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/layout/index.ts@@ -0,0 +1,532 @@+import type { ChartMeasurements } from "metabase/visualizations/echarts/cartesian/chart-measurements/types";+import { CHART_STYLE } from "metabase/visualizations/echarts/cartesian/constants/style";+import type { DataKey } from "metabase/visualizations/echarts/cartesian/model/types";+import type {+ ComputedVisualizationSettings,+ RenderingContext,+} from "metabase/visualizations/types";+import type { RowValue } from "metabase-types/api";++import {+ BOXPLOT_DATA_LABEL_STYLE,+ BOXPLOT_LABEL_PADDING,+ LABEL_DISTANCE,+ MEAN_SYMBOL_SIZE_OFFSET,+} from "../constants";+import type { BoxPlotChartModel, BoxPlotDatum } from "../model/types";+import type { LabelLayoutMode } from "../utils";+import {+ computeSeriesXOffsetPixels,+ getBoxPlotBoxWidth,+ getBoxPlotSymbolSize,+ getLabelLayoutMode,+} from "../utils";++import type {+ BoxPlotLabelOverflow,+ BoxPlotLayoutModel,+ BoxPlotPadding,+ BoxPlotSideLabelOverflow,+} from "./types";++export type {+ BoxPlotLayoutModel,+ BoxPlotLabelOverflow,+ BoxPlotSideLabelOverflow,+ BoxPlotPadding,+};++type LayoutParams = {+ chartModel: BoxPlotChartModel;+ chartMeasurements: ChartMeasurements;+ settings: ComputedVisualizationSettings;+ chartWidth: number;+ renderingContext: RenderingContext;+};++type DataExtremesResult = {+ dataMin: number;+ dataMax: number;+ minIsOutlier: boolean;+ maxIsOutlier: boolean;+} | null;++const getAllBoxPlotValues = (datum: BoxPlotDatum): number[] => [+ datum.min,+ datum.q1,+ datum.median,+ datum.q3,+ datum.max,+];++const getLabelExtension = (+ isOutlier: boolean,+ symbolRadius: number,+ labelHeight: number,+ labelLayoutMode: LabelLayoutMode,+): number => {+ if (isOutlier) {+ return symbolRadius + LABEL_DISTANCE + labelHeight;+ }+ return labelLayoutMode === "vertical"+ ? LABEL_DISTANCE + labelHeight+ : labelHeight / 2;+};++const getMaxLabelWidth = (+ values: number[],+ measureLabel: (value: number) => number,+): number => {+ if (values.length === 0) {+ return 0;+ }+ return Math.max(...values.map(measureLabel), 0);+};++const getLeftSideLabels = (+ datum: BoxPlotDatum,+ showValuesMode: string,+): number[] => (showValuesMode === "all" ? [datum.q1, datum.q3] : []);++const getRightSideLabels = (+ datum: BoxPlotDatum,+ showValuesMode: string,+): number[] =>+ showValuesMode === "median"+ ? [datum.median]+ : [datum.min, datum.max, datum.median];++const getVerticalLabels = (+ datum: BoxPlotDatum,+ showValuesMode: string,+): number[] =>+ showValuesMode === "all" ? getAllBoxPlotValues(datum) : [datum.median];++const findDataExtremes = (+ dataBySeriesAndXValue: Map<DataKey, Map<RowValue, BoxPlotDatum>>,+ includeOutliers: boolean,+): DataExtremesResult => {+ let dataMin = Infinity;+ let dataMax = -Infinity;+ let minIsOutlier = false;+ let maxIsOutlier = false;++ for (const xValueMap of dataBySeriesAndXValue.values()) {+ for (const datum of xValueMap.values()) {+ if (Number.isFinite(datum.min) && datum.min < dataMin) {+ dataMin = datum.min;+ minIsOutlier = false;+ }+ if (Number.isFinite(datum.max) && datum.max > dataMax) {+ dataMax = datum.max;+ maxIsOutlier = false;+ }++ if (includeOutliers) {+ datum.outliers.forEach((outlier) => {+ if (Number.isFinite(outlier)) {+ if (outlier < dataMin) {+ dataMin = outlier;+ minIsOutlier = true;+ }+ if (outlier > dataMax) {+ dataMax = outlier;+ maxIsOutlier = true;+ }+ }+ });+ }+ }+ }++ if (!Number.isFinite(dataMin) || !Number.isFinite(dataMax)) {+ return null;+ }++ return { dataMin, dataMax, minIsOutlier, maxIsOutlier };+};++const getTransformedAxisBound = (+ customValue: number | undefined,+ dataValue: number,+ isAutoRange: boolean,+ shouldUseZero: boolean,+ toEChartsAxisValue: (value: number) => number | null,+ transformedDataValue: number,+): number => {+ if (typeof customValue === "number" && Number.isFinite(customValue)) {+ const transformed = toEChartsAxisValue(customValue);+ if (transformed != null) {+ return transformed;+ }+ } else if (!isAutoRange && shouldUseZero) {+ const transformedZero = toEChartsAxisValue(0);+ if (transformedZero != null) {+ return transformedZero;+ }+ }+ return transformedDataValue;+};++const computeSideLabelOverflow = (+ chartModel: BoxPlotChartModel,+ xValueWidth: number,+ labelLayoutMode: LabelLayoutMode,+ labelOffset: number,+ seriesCount: number,+ renderingContext: RenderingContext,+): BoxPlotSideLabelOverflow => {+ const {+ xValues,+ dataBySeriesAndXValue,+ seriesModels,+ showValuesMode,+ seriesLabelsFormatters,+ leftAxisModel,+ rightAxisModel,+ } = chartModel;++ const hasFormatters = Object.keys(seriesLabelsFormatters).length > 0;+ if (!showValuesMode || !hasFormatters || xValues.length === 0) {+ return { left: 0, right: 0, leftYAxisOffset: 0, rightYAxisOffset: 0 };+ }++ const fontStyle = {+ weight: BOXPLOT_DATA_LABEL_STYLE.fontWeight,+ size: BOXPLOT_DATA_LABEL_STYLE.fontSize,+ family: renderingContext.fontFamily,+ };++ const spaceFromCenterToEdge = xValueWidth / 2;+ const firstXValue = xValues[0];+ const lastXValue = xValues[xValues.length - 1];++ let leftOverflow = 0;+ let rightOverflow = 0;++ seriesModels.forEach((seriesModel, seriesIndex) => {+ const labelFormatter = seriesLabelsFormatters[seriesModel.dataKey];+ if (!labelFormatter) {+ return;+ }++ const measureLabel = (value: number): number => {+ if (!Number.isFinite(value)) {+ return 0;+ }+ return renderingContext.measureText(labelFormatter(value), fontStyle);+ };++ const seriesDataMap = dataBySeriesAndXValue.get(seriesModel.dataKey);+ const xOffset = computeSeriesXOffsetPixels(+ xValueWidth,+ seriesIndex,+ seriesCount,+ );++ const firstDatum = seriesDataMap?.get(firstXValue);+ const lastDatum = seriesDataMap?.get(lastXValue);+ const negativeXOffset = Math.abs(Math.min(0, xOffset));+ const positiveXOffset = Math.max(0, xOffset);++ if (labelLayoutMode === "side") {+ if (firstDatum) {+ const maxLabelWidth = getMaxLabelWidth(+ getLeftSideLabels(firstDatum, showValuesMode),+ measureLabel,+ );+ if (maxLabelWidth > 0) {+ const extension = labelOffset + maxLabelWidth + negativeXOffset;+ leftOverflow = Math.max(+ leftOverflow,+ extension - spaceFromCenterToEdge,+ );+ }+ }++ if (lastDatum) {+ const maxLabelWidth = getMaxLabelWidth(+ getRightSideLabels(lastDatum, showValuesMode),+ measureLabel,+ );+ if (maxLabelWidth > 0) {+ const extension = labelOffset + maxLabelWidth + positiveXOffset;+ rightOverflow = Math.max(+ rightOverflow,+ extension - spaceFromCenterToEdge,+ );+ }+ }+ } else {+ if (firstDatum) {+ const maxLabelWidth = getMaxLabelWidth(+ getVerticalLabels(firstDatum, showValuesMode),+ measureLabel,+ );+ leftOverflow = Math.max(+ leftOverflow,+ maxLabelWidth / 2 + negativeXOffset - spaceFromCenterToEdge,+ );+ }++ if (lastDatum) {+ const maxLabelWidth = getMaxLabelWidth(+ getVerticalLabels(lastDatum, showValuesMode),+ measureLabel,+ );+ rightOverflow = Math.max(+ rightOverflow,+ maxLabelWidth / 2 + positiveXOffset - spaceFromCenterToEdge,+ );+ }+ }+ });++ leftOverflow = Math.max(0, leftOverflow);+ rightOverflow = Math.max(0, rightOverflow);++ const hasLeftAxis = leftAxisModel != null;+ const hasRightAxis = rightAxisModel != null;++ return {+ left: leftOverflow,+ right: rightOverflow,+ leftYAxisOffset: hasLeftAxis ? leftOverflow : 0,+ rightYAxisOffset: hasRightAxis ? rightOverflow : 0,+ };+};++const computeLabelOverflow = (+ chartModel: BoxPlotChartModel,+ settings: ComputedVisualizationSettings,+ labelLayoutMode: LabelLayoutMode,+ symbolSize: number,+ innerHeight: number,+): BoxPlotLabelOverflow => {+ const {+ dataBySeriesAndXValue,+ pointsMode,+ showValuesMode,+ seriesLabelsFormatters,+ yAxisScaleTransforms,+ } = chartModel;++ const hasFormatters = Object.keys(seriesLabelsFormatters).length > 0;+ if (+ showValuesMode == null ||+ !hasFormatters ||+ dataBySeriesAndXValue.size === 0+ ) {+ return { top: 0, bottom: 0 };+ }++ const includeOutliersInRange = pointsMode !== "none";+ const extremes = findDataExtremes(+ dataBySeriesAndXValue,+ includeOutliersInRange,+ );+ if (extremes == null) {+ return { top: 0, bottom: 0 };+ }++ const { dataMin, dataMax, minIsOutlier, maxIsOutlier } = extremes;+ const { toEChartsAxisValue } = yAxisScaleTransforms;++ const transformedDataMin = toEChartsAxisValue(dataMin);+ const transformedDataMax = toEChartsAxisValue(dataMax);+ if (transformedDataMin == null || transformedDataMax == null) {+ return { top: 0, bottom: 0 };+ }++ const isAutoRange = settings["graph.y_axis.auto_range"] === true;+ const axisMin = getTransformedAxisBound(+ settings["graph.y_axis.min"],+ dataMin,+ isAutoRange,+ dataMin > 0,+ toEChartsAxisValue,+ transformedDataMin,+ );+ const axisMax = getTransformedAxisBound(+ settings["graph.y_axis.max"],+ dataMax,+ isAutoRange,+ dataMax < 0,+ toEChartsAxisValue,+ transformedDataMax,+ );++ const labelHeight = CHART_STYLE.seriesLabels.size;+ const symbolRadius = symbolSize / 2;+ // In "all" mode we show min/max box labels AND outlier labels+ // In "median" mode we only show the median label (no overflow concern)+ const showsMinMaxLabels = showValuesMode === "all";++ if (!showsMinMaxLabels) {+ return { top: 0, bottom: 0 };+ }++ // Only consider outlier label extension if we're showing outlier labels (in "all" mode with points)+ const showsOutlierLabels = showValuesMode === "all" && pointsMode !== "none";+ const bottomExtension = getLabelExtension(+ minIsOutlier && showsOutlierLabels,+ symbolRadius,+ labelHeight,+ labelLayoutMode,+ );+ const topExtension = getLabelExtension(+ maxIsOutlier && showsOutlierLabels,+ symbolRadius,+ labelHeight,+ labelLayoutMode,+ );++ let bottomOverflow = 0;+ let topOverflow = 0;++ if (innerHeight > 0) {+ const axisRange = axisMax - axisMin;+ if (axisRange > 0) {+ const pixelsPerUnit = innerHeight / axisRange;+ const bottomPixelsFromAxis =+ (transformedDataMin - axisMin) * pixelsPerUnit;+ const topPixelsFromAxis = (axisMax - transformedDataMax) * pixelsPerUnit;++ if (bottomPixelsFromAxis < bottomExtension) {+ bottomOverflow = bottomExtension;+ }+ if (topPixelsFromAxis < topExtension) {+ topOverflow = topExtension;+ }+ }+ } else {+ if (transformedDataMin <= axisMin) {+ bottomOverflow = bottomExtension;+ }+ if (transformedDataMax >= axisMax) {+ topOverflow = topExtension;+ }+ }++ return { bottom: bottomOverflow, top: topOverflow };+};++const computeOverflows = (+ chartModel: BoxPlotChartModel,+ settings: ComputedVisualizationSettings,+ boundsWidth: number,+ boundsHeight: number,+ xValuesCount: number,+ seriesCount: number,+ initialSubcategoryWidth: number,+ renderingContext: RenderingContext,+): {+ labelOverflow: BoxPlotLabelOverflow;+ sideLabelOverflow: BoxPlotSideLabelOverflow;+} => {+ const labelLayoutMode = getLabelLayoutMode(initialSubcategoryWidth);+ const symbolSize = getBoxPlotSymbolSize(initialSubcategoryWidth);+ const labelOffset =+ getBoxPlotBoxWidth(initialSubcategoryWidth) / 2 + BOXPLOT_LABEL_PADDING;+ const xValueWidth = boundsWidth / Math.max(xValuesCount, 1);++ return {+ labelOverflow: computeLabelOverflow(+ chartModel,+ settings,+ labelLayoutMode,+ symbolSize,+ boundsHeight,+ ),+ sideLabelOverflow: computeSideLabelOverflow(+ chartModel,+ xValueWidth,+ labelLayoutMode,+ labelOffset,+ seriesCount,+ renderingContext,+ ),+ };+};++export const getBoxPlotLayoutModel = (+ params: LayoutParams,+): BoxPlotLayoutModel => {+ const {+ chartModel,+ chartMeasurements,+ settings,+ chartWidth,+ renderingContext,+ } = params;++ const { bounds, padding: basePadding } = chartMeasurements;+ const boundsWidth = bounds.right - bounds.left;+ const boundsHeight = bounds.bottom - bounds.top;++ const { xValues, seriesModels } = chartModel;+ const seriesCount = seriesModels.length;+ const xValuesCount = xValues.length;++ const initialSubcategoryWidth =+ boundsWidth / Math.max(xValuesCount, 1) / Math.max(seriesCount, 1);++ const { labelOverflow, sideLabelOverflow } = computeOverflows(+ chartModel,+ settings,+ boundsWidth,+ boundsHeight,+ xValuesCount,+ seriesCount,+ initialSubcategoryWidth,+ renderingContext,+ );++ const adjustedPadding: BoxPlotPadding = {+ top: basePadding.top + labelOverflow.top,+ bottom: basePadding.bottom + labelOverflow.bottom,+ left: basePadding.left + sideLabelOverflow.left,+ right: basePadding.right + sideLabelOverflow.right,+ };++ const xValueWidth =+ (chartWidth - adjustedPadding.left - adjustedPadding.right) /+ Math.max(xValuesCount, 1);+ const subcategoryWidth = xValueWidth / Math.max(seriesCount, 1);++ const labelLayoutMode = getLabelLayoutMode(subcategoryWidth);+ const boxWidth = getBoxPlotBoxWidth(subcategoryWidth);+ const boxHalfWidth = boxWidth / 2;+ const symbolSize = getBoxPlotSymbolSize(subcategoryWidth);+ const meanSymbolSize = symbolSize + MEAN_SYMBOL_SIZE_OFFSET;+ const labelOffset = boxHalfWidth + BOXPLOT_LABEL_PADDING;++ const visibleSeriesModels = seriesModels.filter((s) => s.visible);+ const visibleSeriesCount = visibleSeriesModels.length;+ const visibleSeriesOffsets = new Map(+ visibleSeriesModels.map((s, index) => [+ s.dataKey,+ computeSeriesXOffsetPixels(xValueWidth, index, visibleSeriesCount),+ ]),+ );++ const xAxisOffset = labelOverflow.bottom;++ return {+ xValuesCount,+ xValueWidth,+ labelLayoutMode,+ boxWidth,+ boxHalfWidth,+ symbolSize,+ meanSymbolSize,+ labelOffset,+ subcategoryWidth,+ visibleSeriesOffsets,+ labelOverflow,+ sideLabelOverflow,+ adjustedPadding,+ xAxisOffset,+ chartMeasurements,+ };+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/layout/types.ts b/frontend/src/metabase/visualizations/echarts/boxplot/layout/types.tsnew file mode 100644index 00000000000..12f32b2ffaf--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/layout/types.ts@@ -0,0 +1,65 @@+import type { ChartMeasurements } from "metabase/visualizations/echarts/cartesian/chart-measurements/types";+import type { DataKey } from "metabase/visualizations/echarts/cartesian/model/types";++import type { LabelLayoutMode } from "../utils";++export type BoxPlotLabelOverflow = {+ top: number;+ bottom: number;+};++export type BoxPlotSideLabelOverflow = {+ left: number;+ right: number;+ leftYAxisOffset: number;+ rightYAxisOffset: number;+};++export type BoxPlotPadding = {+ top: number;+ right: number;+ bottom: number;+ left: number;+};++export type BoxPlotLayoutModel = {+ // Number of unique x-axis values+ xValuesCount: number;++ // Width in pixels allocated for each x-value on x-axis+ xValueWidth: number;++ // Width allocated per series within an x-value (xValueWidth / visibleSeriesCount)+ subcategoryWidth: number;++ // Pixel offsets from category center for each visible series, keyed by dataKey.+ // Use as: visibleSeriesOffsets.get(seriesModel.dataKey)+ visibleSeriesOffsets: Map<DataKey, number>;++ // Whether labels appear on sides of boxes ("side") or above/below ("vertical")+ labelLayoutMode: LabelLayoutMode;++ // Box dimensions+ boxWidth: number;+ boxHalfWidth: number;++ // Symbol sizes for scatter points (outliers, data points, mean)+ symbolSize: number;+ meanSymbolSize: number;++ // Horizontal distance from box edge to label position+ labelOffset: number;++ // Extra padding needed to prevent label clipping+ labelOverflow: BoxPlotLabelOverflow;+ sideLabelOverflow: BoxPlotSideLabelOverflow;++ // Final padding including label overflow adjustments+ adjustedPadding: BoxPlotPadding;++ // Vertical offset for x-axis to accommodate bottom labels+ xAxisOffset: number;++ // Original chart measurements from cartesian chart system+ chartMeasurements: ChartMeasurements;+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/model/dataset.ts b/frontend/src/metabase/visualizations/echarts/boxplot/model/dataset.tsnew file mode 100644index 00000000000..89ebdb49d3c--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/model/dataset.ts@@ -0,0 +1,410 @@+import type { RowValue } from "metabase-types/api";++import { INDEX_KEY, X_AXIS_DATA_KEY } from "../../cartesian/constants/dataset";+import type {+ ChartDataset,+ DataKey,+ Datum,+ NumericAxisScaleTransforms,+} from "../../cartesian/model/types";+import { getBoxPlotStatKey, getSeriesXValueKey } from "../utils";++import type {+ BoxPlotDatum,+ BoxPlotRawDataPoint,+ BoxPlotSeriesModel,+ BoxPlotWhiskerType,+} from "./types";++type SeriesStatKeys = {+ dataKey: DataKey;+ minKey: DataKey;+ q1Key: DataKey;+ medianKey: DataKey;+ q3Key: DataKey;+ maxKey: DataKey;+ meanKey: DataKey;+};++const getQuantile = (+ sortedDataPoints: BoxPlotRawDataPoint[],+ quantile: number,+): number => {+ const length = sortedDataPoints.length;+ if (length === 0) {+ return 0;+ }+ if (length === 1) {+ return sortedDataPoints[0].value;+ }++ const index = (length - 1) * quantile;+ const lowerIndex = Math.floor(index);+ const fraction = index - lowerIndex;++ if (fraction === 0) {+ return sortedDataPoints[lowerIndex].value;+ }++ const lowerValue = sortedDataPoints[lowerIndex].value;+ const upperValue = sortedDataPoints[lowerIndex + 1].value;+ return lowerValue + fraction * (upperValue - lowerValue);+};++const findFirstIndexGreaterOrEqual = (+ sortedDataPoints: BoxPlotRawDataPoint[],+ target: number,+): number => {+ let left = 0;+ let right = sortedDataPoints.length;++ while (left < right) {+ const mid = Math.floor((left + right) / 2);+ if (sortedDataPoints[mid].value < target) {+ left = mid + 1;+ } else {+ right = mid;+ }+ }++ return left;+};++const findFirstIndexGreaterThan = (+ sortedDataPoints: BoxPlotRawDataPoint[],+ target: number,+): number => {+ let left = 0;+ let right = sortedDataPoints.length;++ while (left < right) {+ const mid = Math.floor((left + right) / 2);+ if (sortedDataPoints[mid].value <= target) {+ left = mid + 1;+ } else {+ right = mid;+ }+ }++ return left;+};++type DataPointGroup = {+ dataPoints: BoxPlotRawDataPoint[];+ sum: number;+};++const computeBoxPlotDatum = (+ xValue: RowValue,+ group: DataPointGroup,+ seriesKey: DataKey,+ seriesIndex: number,+ whiskerType: BoxPlotWhiskerType,+): BoxPlotDatum | null => {+ const { dataPoints } = group;+ const length = dataPoints.length;+ if (length === 0) {+ return null;+ }++ const sortedDataPoints = [...dataPoints].sort((a, b) => a.value - b.value);++ const min = sortedDataPoints[0].value;+ const max = sortedDataPoints[length - 1].value;+ const q1 = getQuantile(sortedDataPoints, 0.25);+ const median = getQuantile(sortedDataPoints, 0.5);+ const q3 = getQuantile(sortedDataPoints, 0.75);+ const mean = group.sum / length;++ if (whiskerType === "min-max") {+ return {+ xValue,+ seriesKey,+ seriesIndex,+ min,+ q1,+ median,+ q3,+ max,+ mean,+ outliers: [],+ rawDataPoints: sortedDataPoints,+ };+ }++ const iqr = q3 - q1;+ const lowerBoundValue = q1 - 1.5 * iqr;+ const upperBoundValue = q3 + 1.5 * iqr;++ const firstNonOutlierIndex = findFirstIndexGreaterOrEqual(+ sortedDataPoints,+ lowerBoundValue,+ );+ const firstUpperOutlierIndex = findFirstIndexGreaterThan(+ sortedDataPoints,+ upperBoundValue,+ );++ const rawWhiskerMin =+ firstNonOutlierIndex < length+ ? sortedDataPoints[firstNonOutlierIndex].value+ : q1;+ const rawWhiskerMax =+ firstUpperOutlierIndex > 0+ ? sortedDataPoints[firstUpperOutlierIndex - 1].value+ : q3;++ const whiskerMin = Math.min(rawWhiskerMin, q1);+ const whiskerMax = Math.max(rawWhiskerMax, q3);++ const outliers: number[] = [];+ for (let i = 0; i < firstNonOutlierIndex; i++) {+ outliers.push(sortedDataPoints[i].value);+ }+ for (let i = firstUpperOutlierIndex; i < length; i++) {+ outliers.push(sortedDataPoints[i].value);+ }++ return {+ xValue,+ seriesKey,+ seriesIndex,+ min: whiskerMin,+ q1,+ median,+ q3,+ max: whiskerMax,+ mean,+ outliers,+ rawDataPoints: sortedDataPoints,+ };+};++export const computeMultiSeriesBoxPlotData = (+ dataset: ChartDataset,+ dimensionDataKey: DataKey,+ seriesModels: BoxPlotSeriesModel[],+ whiskerType: BoxPlotWhiskerType,+ yAxisScaleTransforms: NumericAxisScaleTransforms,+): {+ dataBySeriesAndXValue: Map<DataKey, Map<RowValue, BoxPlotDatum>>;+ xValues: RowValue[];+ boxDataset: ChartDataset;+ outlierAbovePointsDataset: ChartDataset;+ outlierBelowPointsDataset: ChartDataset;+ nonOutlierPointsDataset: ChartDataset;+} => {+ const seriesDataKeys = seriesModels.map((s) => s.dataKey);+ const seriesIndexMap = new Map(seriesModels.map((s, i) => [s.dataKey, i]));++ const dataPointGroups = new Map<string, DataPointGroup>();+ const groupKeyToSeriesXValue = new Map<+ string,+ { seriesKey: DataKey; xValue: RowValue }+ >();+ const uniqueXValues = new Set<RowValue>();++ for (let i = 0; i < dataset.length; i++) {+ const row = dataset[i];+ const xValue = row[dimensionDataKey];+ uniqueXValues.add(xValue);++ seriesDataKeys.forEach((seriesKey) => {+ const value = row[seriesKey];+ if (typeof value !== "number" || !Number.isFinite(value)) {+ return;+ }++ const groupKey = getSeriesXValueKey(seriesKey, xValue);+ let group = dataPointGroups.get(groupKey);+ if (group === undefined) {+ group = { dataPoints: [], sum: 0 };+ dataPointGroups.set(groupKey, group);+ groupKeyToSeriesXValue.set(groupKey, { seriesKey, xValue });+ }+ group.dataPoints.push({ value, datum: row, index: i });+ group.sum += value;+ });+ }++ const xValues = Array.from(uniqueXValues);++ const dataBySeriesAndXValue = new Map<DataKey, Map<RowValue, BoxPlotDatum>>(+ seriesModels.map((s) => [s.dataKey, new Map()]),+ );++ dataPointGroups.forEach((group, groupKey) => {+ const { seriesKey, xValue } = groupKeyToSeriesXValue.get(groupKey)!;+ const seriesIndex = seriesIndexMap.get(seriesKey)!;++ const boxPlotDatum = computeBoxPlotDatum(+ xValue,+ group,+ seriesKey,+ seriesIndex,+ whiskerType,+ );++ if (boxPlotDatum) {+ dataBySeriesAndXValue.get(seriesKey)!.set(xValue, boxPlotDatum);+ }+ });++ const { toEChartsAxisValue } = yAxisScaleTransforms;+ const boxDataset = buildBoxDataset(+ xValues,+ seriesModels,+ dataBySeriesAndXValue,+ toEChartsAxisValue,+ );++ const {+ outlierAbovePointsDataset,+ outlierBelowPointsDataset,+ nonOutlierPointsDataset,+ } = buildPointsDatasets(+ dataset,+ seriesModels,+ dataBySeriesAndXValue,+ toEChartsAxisValue,+ );++ return {+ dataBySeriesAndXValue,+ xValues,+ boxDataset,+ outlierAbovePointsDataset,+ outlierBelowPointsDataset,+ nonOutlierPointsDataset,+ };+};++const buildBoxDataset = (+ xValues: RowValue[],+ seriesModels: BoxPlotSeriesModel[],+ dataBySeriesAndXValue: Map<DataKey, Map<RowValue, BoxPlotDatum>>,+ toEChartsAxisValue: (value: number) => number | null,+): ChartDataset => {+ const seriesStatKeys: SeriesStatKeys[] = seriesModels.map((seriesModel) => ({+ dataKey: seriesModel.dataKey,+ minKey: getBoxPlotStatKey(seriesModel.dataKey, "min"),+ q1Key: getBoxPlotStatKey(seriesModel.dataKey, "q1"),+ medianKey: getBoxPlotStatKey(seriesModel.dataKey, "median"),+ q3Key: getBoxPlotStatKey(seriesModel.dataKey, "q3"),+ maxKey: getBoxPlotStatKey(seriesModel.dataKey, "max"),+ meanKey: getBoxPlotStatKey(seriesModel.dataKey, "mean"),+ }));++ return xValues.map((xValue) => {+ const row: Datum = {+ [X_AXIS_DATA_KEY]: xValue,+ };++ for (const keys of seriesStatKeys) {+ const datum = dataBySeriesAndXValue.get(keys.dataKey)?.get(xValue);+ if (!datum) {+ row[keys.minKey] = NaN;+ row[keys.q1Key] = NaN;+ row[keys.medianKey] = NaN;+ row[keys.q3Key] = NaN;+ row[keys.maxKey] = NaN;+ row[keys.meanKey] = NaN;+ continue;+ }++ row[keys.minKey] = toEChartsAxisValue(datum.min) ?? NaN;+ row[keys.q1Key] = toEChartsAxisValue(datum.q1) ?? NaN;+ row[keys.medianKey] = toEChartsAxisValue(datum.median) ?? NaN;+ row[keys.q3Key] = toEChartsAxisValue(datum.q3) ?? NaN;+ row[keys.maxKey] = toEChartsAxisValue(datum.max) ?? NaN;+ row[keys.meanKey] = toEChartsAxisValue(datum.mean) ?? NaN;+ }++ return row;+ });+};++type PointsDatasetsResult = {+ outlierAbovePointsDataset: ChartDataset;+ outlierBelowPointsDataset: ChartDataset;+ nonOutlierPointsDataset: ChartDataset;+};++const buildPointsDatasets = (+ rawDataset: ChartDataset,+ seriesModels: BoxPlotSeriesModel[],+ dataBySeriesAndXValue: Map<DataKey, Map<RowValue, BoxPlotDatum>>,+ toEChartsAxisValue: (value: number) => number | null,+): PointsDatasetsResult => {+ const outlierAboveRows: Datum[] = [];+ const outlierBelowRows: Datum[] = [];+ const nonOutlierRows: Datum[] = [];++ for (let i = 0; i < rawDataset.length; i++) {+ const rawRow = rawDataset[i];+ const xValue = rawRow[X_AXIS_DATA_KEY];+ let hasOutlierAbove = false;+ let hasOutlierBelow = false;+ let hasNonOutlier = false;++ const outlierAboveRow: Datum = {+ [X_AXIS_DATA_KEY]: xValue,+ [INDEX_KEY]: i,+ };+ const outlierBelowRow: Datum = {+ [X_AXIS_DATA_KEY]: xValue,+ [INDEX_KEY]: i,+ };+ const nonOutlierRow: Datum = {+ [X_AXIS_DATA_KEY]: xValue,+ [INDEX_KEY]: i,+ };++ for (const seriesModel of seriesModels) {+ const value = rawRow[seriesModel.dataKey];+ if (typeof value !== "number" || !Number.isFinite(value)) {+ continue;+ }++ const transformed = toEChartsAxisValue(value);+ if (transformed == null) {+ continue;+ }++ const datum = dataBySeriesAndXValue.get(seriesModel.dataKey)?.get(xValue);+ if (!datum) {+ continue;+ }++ const isOutlierAbove = value > datum.max;+ const isOutlierBelow = value < datum.min;++ if (isOutlierAbove) {+ outlierAboveRow[seriesModel.dataKey] = transformed;+ hasOutlierAbove = true;+ } else if (isOutlierBelow) {+ outlierBelowRow[seriesModel.dataKey] = transformed;+ hasOutlierBelow = true;+ } else {+ nonOutlierRow[seriesModel.dataKey] = transformed;+ hasNonOutlier = true;+ }+ }++ if (hasOutlierAbove) {+ outlierAboveRows.push(outlierAboveRow);+ }+ if (hasOutlierBelow) {+ outlierBelowRows.push(outlierBelowRow);+ }+ if (hasNonOutlier) {+ nonOutlierRows.push(nonOutlierRow);+ }+ }++ return {+ outlierAbovePointsDataset: outlierAboveRows,+ outlierBelowPointsDataset: outlierBelowRows,+ nonOutlierPointsDataset: nonOutlierRows,+ };+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/model/dataset.unit.spec.ts b/frontend/src/metabase/visualizations/echarts/boxplot/model/dataset.unit.spec.tsnew file mode 100644index 00000000000..67f764a0cc5--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/model/dataset.unit.spec.ts@@ -0,0 +1,531 @@+import { createMockSeriesModel } from "__support__/echarts";+import { checkNumber } from "metabase/lib/types";+import {+ INDEX_KEY,+ X_AXIS_DATA_KEY,+} from "metabase/visualizations/echarts/cartesian/constants/dataset";+import type {+ ChartDataset,+ NumericAxisScaleTransforms,+} from "metabase/visualizations/echarts/cartesian/model/types";+import type { RowValue } from "metabase-types/api";++import { getBoxPlotStatKey } from "../utils";++import { computeMultiSeriesBoxPlotData } from "./dataset";+import type { BoxPlotSeriesModel } from "./types";++const yAxisScaleTransforms: NumericAxisScaleTransforms = {+ toEChartsAxisValue: (value: RowValue) => checkNumber(value),+ fromEChartsAxisValue: (value: number) => value,+};++const createMockBoxPlotSeriesModel = (+ opts?: Partial<BoxPlotSeriesModel>,+): BoxPlotSeriesModel => createMockSeriesModel(opts) as BoxPlotSeriesModel;++describe("computeMultiSeriesBoxPlotData", () => {+ describe("basic statistics calculation", () => {+ it("should compute correct boxplot statistics for a single series", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", series1: 4 },+ { [X_AXIS_DATA_KEY]: "A", series1: 5 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum?.xValue).toBe("A");+ expect(datum?.seriesKey).toBe("series1");+ expect(datum?.seriesIndex).toBe(0);+ expect(datum?.min).toBe(1);+ expect(datum?.q1).toBe(2);+ expect(datum?.median).toBe(3);+ expect(datum?.q3).toBe(4);+ expect(datum?.max).toBe(5);+ expect(datum?.mean).toBe(3);+ expect(datum?.outliers).toEqual([]);+ expect(datum?.rawDataPoints).toEqual([+ { value: 1, datum: { [X_AXIS_DATA_KEY]: "A", series1: 1 }, index: 0 },+ { value: 2, datum: { [X_AXIS_DATA_KEY]: "A", series1: 2 }, index: 1 },+ { value: 3, datum: { [X_AXIS_DATA_KEY]: "A", series1: 3 }, index: 2 },+ { value: 4, datum: { [X_AXIS_DATA_KEY]: "A", series1: 4 }, index: 3 },+ { value: 5, datum: { [X_AXIS_DATA_KEY]: "A", series1: 5 }, index: 4 },+ ]);+ });++ it("should compute correct quantiles with interpolation", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", series1: 4 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum?.min).toBe(1);+ expect(datum?.q1).toBe(1.75);+ expect(datum?.median).toBe(2.5);+ expect(datum?.q3).toBe(3.25);+ expect(datum?.max).toBe(4);+ expect(datum?.mean).toBe(2.5);+ });++ it("should handle single data point", () => {+ const dataset: ChartDataset = [{ [X_AXIS_DATA_KEY]: "A", series1: 42 }];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum?.min).toBe(42);+ expect(datum?.q1).toBe(42);+ expect(datum?.median).toBe(42);+ expect(datum?.q3).toBe(42);+ expect(datum?.max).toBe(42);+ expect(datum?.mean).toBe(42);+ expect(datum?.outliers).toEqual([]);+ });+ });++ describe("whisker types", () => {+ it("should use min/max as whiskers when whiskerType is 'min-max'", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", series1: 4 },+ { [X_AXIS_DATA_KEY]: "A", series1: 5 },+ { [X_AXIS_DATA_KEY]: "A", series1: 100 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum?.min).toBe(1);+ expect(datum?.max).toBe(100);+ expect(datum?.outliers).toEqual([]);+ });++ it("should detect upper outliers using tukey when whiskerType is 'tukey'", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", series1: 4 },+ { [X_AXIS_DATA_KEY]: "A", series1: 5 },+ { [X_AXIS_DATA_KEY]: "A", series1: 100 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "tukey",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ // q1=1.75, q3=4.25, IQR=2.5, upper bound = 4.25 + 1.5*2.5 = 8+ // 100 > 8 so it's an outlier, max whisker is 5+ expect(datum?.min).toBe(1);+ expect(datum?.max).toBe(5);+ expect(datum?.outliers).toEqual([100]);+ });++ it("should detect lower outliers using tukey when whiskerType is 'tukey'", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: -100 },+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", series1: 4 },+ { [X_AXIS_DATA_KEY]: "A", series1: 5 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "tukey",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ // q1=1.25, q3=4, IQR=2.75, lower bound = 1.25 - 1.5*2.75 = -2.875+ // -100 < -2.875 so it's an outlier, min whisker is 1+ expect(datum?.min).toBe(1);+ expect(datum?.max).toBe(5);+ expect(datum?.outliers).toEqual([-100]);+ });++ it("should detect both upper and lower outliers", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: -100 },+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", series1: 4 },+ { [X_AXIS_DATA_KEY]: "A", series1: 5 },+ { [X_AXIS_DATA_KEY]: "A", series1: 100 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "tukey",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum?.min).toBe(1);+ expect(datum?.max).toBe(5);+ expect(datum?.outliers).toEqual([-100, 100]);+ });+ });++ describe("multiple x-values", () => {+ it("should compute statistics separately for each x-value", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 10 },+ { [X_AXIS_DATA_KEY]: "A", series1: 20 },+ { [X_AXIS_DATA_KEY]: "B", series1: 100 },+ { [X_AXIS_DATA_KEY]: "B", series1: 200 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ expect(result.xValues).toEqual(["A", "B"]);++ const datumA = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datumA?.min).toBe(10);+ expect(datumA?.max).toBe(20);+ expect(datumA?.mean).toBe(15);++ const datumB = result.dataBySeriesAndXValue.get("series1")?.get("B");+ expect(datumB?.min).toBe(100);+ expect(datumB?.max).toBe(200);+ expect(datumB?.mean).toBe(150);+ });+ });++ describe("multiple series", () => {+ it("should compute statistics for each series independently", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1, series2: 10 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2, series2: 20 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3, series2: 30 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ createMockBoxPlotSeriesModel({ dataKey: "series2" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ const datum1 = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum1?.seriesIndex).toBe(0);+ expect(datum1?.min).toBe(1);+ expect(datum1?.max).toBe(3);+ expect(datum1?.mean).toBe(2);++ const datum2 = result.dataBySeriesAndXValue.get("series2")?.get("A");+ expect(datum2?.seriesIndex).toBe(1);+ expect(datum2?.min).toBe(10);+ expect(datum2?.max).toBe(30);+ expect(datum2?.mean).toBe(20);+ });+ });++ describe("boxDataset output", () => {+ it("should build boxDataset with correct stat keys", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ expect(result.boxDataset).toEqual([+ {+ [X_AXIS_DATA_KEY]: "A",+ [getBoxPlotStatKey("series1", "min")]: 1,+ [getBoxPlotStatKey("series1", "q1")]: 1.5,+ [getBoxPlotStatKey("series1", "median")]: 2,+ [getBoxPlotStatKey("series1", "q3")]: 2.5,+ [getBoxPlotStatKey("series1", "max")]: 3,+ [getBoxPlotStatKey("series1", "mean")]: 2,+ },+ ]);+ });++ it("should build boxDataset for multiple x-values and series", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1, series2: 10 },+ { [X_AXIS_DATA_KEY]: "B", series1: 2, series2: 20 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ createMockBoxPlotSeriesModel({ dataKey: "series2" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ expect(result.boxDataset).toEqual([+ {+ [X_AXIS_DATA_KEY]: "A",+ [getBoxPlotStatKey("series1", "min")]: 1,+ [getBoxPlotStatKey("series1", "q1")]: 1,+ [getBoxPlotStatKey("series1", "median")]: 1,+ [getBoxPlotStatKey("series1", "q3")]: 1,+ [getBoxPlotStatKey("series1", "max")]: 1,+ [getBoxPlotStatKey("series1", "mean")]: 1,+ [getBoxPlotStatKey("series2", "min")]: 10,+ [getBoxPlotStatKey("series2", "q1")]: 10,+ [getBoxPlotStatKey("series2", "median")]: 10,+ [getBoxPlotStatKey("series2", "q3")]: 10,+ [getBoxPlotStatKey("series2", "max")]: 10,+ [getBoxPlotStatKey("series2", "mean")]: 10,+ },+ {+ [X_AXIS_DATA_KEY]: "B",+ [getBoxPlotStatKey("series1", "min")]: 2,+ [getBoxPlotStatKey("series1", "q1")]: 2,+ [getBoxPlotStatKey("series1", "median")]: 2,+ [getBoxPlotStatKey("series1", "q3")]: 2,+ [getBoxPlotStatKey("series1", "max")]: 2,+ [getBoxPlotStatKey("series1", "mean")]: 2,+ [getBoxPlotStatKey("series2", "min")]: 20,+ [getBoxPlotStatKey("series2", "q1")]: 20,+ [getBoxPlotStatKey("series2", "median")]: 20,+ [getBoxPlotStatKey("series2", "q3")]: 20,+ [getBoxPlotStatKey("series2", "max")]: 20,+ [getBoxPlotStatKey("series2", "mean")]: 20,+ },+ ]);+ });+ });++ describe("points datasets", () => {+ it("should separate outliers above and below into different datasets", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: -100 },+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", series1: 4 },+ { [X_AXIS_DATA_KEY]: "A", series1: 5 },+ { [X_AXIS_DATA_KEY]: "A", series1: 100 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "tukey",+ yAxisScaleTransforms,+ );++ expect(result.outlierAbovePointsDataset).toEqual([+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 6, series1: 100 },+ ]);++ expect(result.outlierBelowPointsDataset).toEqual([+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 0, series1: -100 },+ ]);++ expect(result.nonOutlierPointsDataset).toEqual([+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 1, series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 2, series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 3, series1: 3 },+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 4, series1: 4 },+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 5, series1: 5 },+ ]);+ });++ it("should have empty outlier datasets when using min-max whiskers", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: 100 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ expect(result.outlierAbovePointsDataset).toEqual([]);+ expect(result.outlierBelowPointsDataset).toEqual([]);+ expect(result.nonOutlierPointsDataset).toEqual([+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 0, series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", [INDEX_KEY]: 1, series1: 100 },+ ]);+ });+ });++ describe("edge cases", () => {+ it("should handle empty dataset", () => {+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ [],+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ expect(result.xValues).toEqual([]);+ expect(result.boxDataset).toEqual([]);+ expect(result.outlierAbovePointsDataset).toEqual([]);+ expect(result.outlierBelowPointsDataset).toEqual([]);+ expect(result.nonOutlierPointsDataset).toEqual([]);+ expect(result.dataBySeriesAndXValue.get("series1")?.size).toBe(0);+ });++ it("should ignore non-numeric values", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: null },+ { [X_AXIS_DATA_KEY]: "A", series1: "invalid" },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ { [X_AXIS_DATA_KEY]: "A", series1: NaN },+ { [X_AXIS_DATA_KEY]: "A", series1: 3 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum?.rawDataPoints.length).toBe(3);+ expect(datum?.min).toBe(1);+ expect(datum?.max).toBe(3);+ expect(datum?.mean).toBe(2);+ });++ it("should ignore Infinity values", () => {+ const dataset: ChartDataset = [+ { [X_AXIS_DATA_KEY]: "A", series1: 1 },+ { [X_AXIS_DATA_KEY]: "A", series1: Infinity },+ { [X_AXIS_DATA_KEY]: "A", series1: -Infinity },+ { [X_AXIS_DATA_KEY]: "A", series1: 2 },+ ];+ const seriesModels = [+ createMockBoxPlotSeriesModel({ dataKey: "series1" }),+ ];++ const result = computeMultiSeriesBoxPlotData(+ dataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ "min-max",+ yAxisScaleTransforms,+ );++ const datum = result.dataBySeriesAndXValue.get("series1")?.get("A");+ expect(datum?.rawDataPoints.length).toBe(2);+ expect(datum?.min).toBe(1);+ expect(datum?.max).toBe(2);+ });+ });+});diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/model/index.ts b/frontend/src/metabase/visualizations/echarts/boxplot/model/index.tsnew file mode 100644index 00000000000..a290ae9cdfd--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/model/index.ts@@ -0,0 +1,485 @@+import { memoize } from "metabase/common/hooks/use-memoized-callback";+import { NULL_DISPLAY_VALUE } from "metabase/lib/constants";+import { formatValue } from "metabase/lib/formatting";+import {+ ECHARTS_CATEGORY_AXIS_NULL_VALUE,+ X_AXIS_DATA_KEY,+} from "metabase/visualizations/echarts/cartesian/constants/dataset";+import {+ computeSplit,+ getYAxisModel,+ shouldAutoSplitYAxis,+} from "metabase/visualizations/echarts/cartesian/model/axis";+import {+ getCardsColumnByDataKeyMap,+ getDatasetKey,+ getSortedSeriesModels,+ sortDataset,+} from "metabase/visualizations/echarts/cartesian/model/dataset";+import {+ getCardSeriesModels,+ getDimensionModel,+} from "metabase/visualizations/echarts/cartesian/model/series";+import { getAxisTransforms } from "metabase/visualizations/echarts/cartesian/model/transforms";+import type {+ CategoryXAxisModel,+ ChartDataset,+ DataKey,+ Datum,+ Extent,+ LabelFormatter,+ SeriesExtents,+ SeriesFormatters,+ YAxisModel,+} from "metabase/visualizations/echarts/cartesian/model/types";+import type { ShowWarning } from "metabase/visualizations/echarts/types";+import type { CartesianChartColumns } from "metabase/visualizations/lib/graph/columns";+import { getCartesianChartColumns } from "metabase/visualizations/lib/graph/columns";+import type { ComputedVisualizationSettings } from "metabase/visualizations/types";+import type {+ DatasetColumn,+ RawSeries,+ RowValue,+ XAxisScale,+} from "metabase-types/api";++import { computeMultiSeriesBoxPlotData } from "./dataset";+import type {+ BoxPlotChartModel,+ BoxPlotDatum,+ BoxPlotLabelFrequency,+ BoxPlotPointsMode,+ BoxPlotSeriesModel,+ BoxPlotShowValuesMode,+ BoxPlotWhiskerType,+} from "./types";++interface BoxPlotDisplaySettings {+ whiskerType: BoxPlotWhiskerType;+ pointsMode: BoxPlotPointsMode;+ showMean: boolean;+}++interface BoxPlotLabelSettings {+ showValuesMode: BoxPlotShowValuesMode | null;+ seriesLabelsFormatters: SeriesFormatters;+ labelFrequency: BoxPlotLabelFrequency;+}++const getBoxPlotSortScale = (+ settings: ComputedVisualizationSettings,+): XAxisScale => {+ if (settings["graph.x_axis._is_timeseries"]) {+ return "timeseries";+ }+ if (settings["graph.x_axis._is_numeric"]) {+ return "linear";+ }+ return "ordinal";+};++const createLabelFormatter = (+ metricColumn: DatasetColumn | undefined,+ settings: ComputedVisualizationSettings,+): LabelFormatter => {+ const columnSettings = metricColumn+ ? (settings.column?.(metricColumn) ?? {})+ : {};+ const formatting = settings["graph.label_value_formatting"];++ return memoize((value: RowValue) => {+ if (typeof value !== "number") {+ return "";+ }+ return String(+ formatValue(value, {+ column: metricColumn,+ ...columnSettings,+ jsx: false,+ compact: formatting === "compact",+ }),+ );+ });+};++const getBoxPlotDataset = (+ rawSeries: RawSeries,+ chartColumns: CartesianChartColumns,+): ChartDataset => {+ const hasBreakout = "breakout" in chartColumns;+ const breakoutIndex = hasBreakout ? chartColumns.breakout.index : -1;+ const dimensionIndex = chartColumns.dimension.index;++ return rawSeries.flatMap(({ card, data: { rows, cols } }) => {+ const precomputedKeys = hasBreakout+ ? null+ : cols.map((col) => getDatasetKey(col, card.id));++ return rows.map((row) => {+ const datum: Datum = { [X_AXIS_DATA_KEY]: row[dimensionIndex] };+ const breakoutValue = hasBreakout ? row[breakoutIndex] : undefined;++ for (let i = 0; i < cols.length; i++) {+ const key = precomputedKeys+ ? precomputedKeys[i]+ : getDatasetKey(cols[i], card.id, breakoutValue);+ datum[key] = row[i];+ }++ return datum;+ });+ });+};++const getDisplaySettings = (+ settings: ComputedVisualizationSettings,+): BoxPlotDisplaySettings => ({+ whiskerType: settings["boxplot.whisker_type"]!,+ pointsMode: settings["boxplot.points_mode"]!,+ showMean: settings["boxplot.show_mean"]!,+});++const getLabelSettings = (+ settings: ComputedVisualizationSettings,+ seriesModels: BoxPlotSeriesModel[],+): BoxPlotLabelSettings => {+ const showValues = settings["graph.show_values"]!;++ const seriesLabelsFormatters: SeriesFormatters = {};+ if (showValues) {+ seriesModels.forEach((seriesModel) => {+ seriesLabelsFormatters[seriesModel.dataKey] = createLabelFormatter(+ seriesModel.column,+ settings,+ );+ });+ }++ return {+ showValuesMode: showValues ? settings["boxplot.show_values_mode"]! : null,+ seriesLabelsFormatters,+ labelFrequency: settings["graph.label_value_frequency"]!,+ };+};++const computeSeriesExtent = (+ xValueMap: Map<RowValue, BoxPlotDatum>,+): Extent | null => {+ let minY = Infinity;+ let maxY = -Infinity;++ for (const datum of xValueMap.values()) {+ minY = Math.min(minY, datum.min, datum.mean);+ maxY = Math.max(maxY, datum.max, datum.mean);++ for (const outlier of datum.outliers) {+ minY = Math.min(minY, outlier);+ maxY = Math.max(maxY, outlier);+ }+ }++ if (!Number.isFinite(minY) || !Number.isFinite(maxY)) {+ return null;+ }+ return [minY, maxY];+};++const computeBoxPlotSeriesExtents = (+ dataBySeriesAndXValue: Map<DataKey, Map<RowValue, BoxPlotDatum>>,+): SeriesExtents => {+ const extents: SeriesExtents = {};++ for (const [dataKey, xValueMap] of dataBySeriesAndXValue) {+ const extent = computeSeriesExtent(xValueMap);+ if (extent) {+ extents[dataKey] = extent;+ }+ }++ return extents;+};++const computeCombinedExtent = (+ extents: SeriesExtents,+ dataKeys: DataKey[],+): Extent => {+ let minY = Infinity;+ let maxY = -Infinity;++ dataKeys.forEach((dataKey) => {+ const extent = extents[dataKey];+ if (extent) {+ if (extent[0] < minY) {+ minY = extent[0];+ }+ if (extent[1] > maxY) {+ maxY = extent[1];+ }+ }+ });++ return [Number.isFinite(minY) ? minY : 0, Number.isFinite(maxY) ? maxY : 100];+};++const createXAxisFormatter = (+ dimensionColumn: DatasetColumn | undefined,+ settings: ComputedVisualizationSettings,+): ((value: RowValue) => string) => {+ const columnSettings =+ dimensionColumn != null ? (settings.column?.(dimensionColumn) ?? {}) : {};++ return (value: RowValue) => {+ if (value == null || value === ECHARTS_CATEGORY_AXIS_NULL_VALUE) {+ return NULL_DISPLAY_VALUE;+ }++ return String(+ formatValue(value, {+ column: dimensionColumn,+ ...columnSettings,+ compact: settings["graph.x_axis.axis_enabled"] === "compact",+ }),+ );+ };+};++const createXAxisModel = (+ dimensionColumn: DatasetColumn | undefined,+ xValuesCount: number,+ settings: ComputedVisualizationSettings,+): CategoryXAxisModel => ({+ axisType: "category",+ label: dimensionColumn?.display_name,+ isHistogram: false,+ formatter: createXAxisFormatter(dimensionColumn, settings),+ valuesCount: xValuesCount,+ canBrush: false,+});++const getYAxisSplit = (+ seriesModels: BoxPlotSeriesModel[],+ seriesExtents: SeriesExtents,+ settings: ComputedVisualizationSettings,+): [Set<DataKey>, Set<DataKey>] => {+ const left: DataKey[] = [];+ const right: DataKey[] = [];+ const auto: DataKey[] = [];++ seriesModels.forEach((seriesModel) => {+ const seriesSettings = settings.series(+ seriesModel.legacySeriesSettingsObjectKey,+ );+ const axis = seriesSettings?.axis;++ if (axis === "left") {+ left.push(seriesModel.dataKey);+ } else if (axis === "right") {+ right.push(seriesModel.dataKey);+ } else {+ auto.push(seriesModel.dataKey);+ }+ });++ if (!shouldAutoSplitYAxis(settings, seriesModels, seriesExtents)) {+ return [new Set([...left, ...auto]), new Set(right)];+ }++ const [autoLeft, autoRight] = computeSplit(seriesExtents, left, right);+ return [new Set(autoLeft), new Set(autoRight)];+};++type BoxPlotYAxesModels = {+ leftAxisModel: YAxisModel | null;+ rightAxisModel: YAxisModel | null;+ leftAxisSeriesKeys: Set<DataKey>;+ rightAxisSeriesKeys: Set<DataKey>;+};++const createBoxPlotYAxisModel = (+ dataKeys: DataKey[],+ names: string[],+ dataset: ChartDataset,+ settings: ComputedVisualizationSettings,+ columnByDataKey: Record<string, DatasetColumn>,+ seriesExtents: SeriesExtents,+ yAxisScaleTransforms: ReturnType<typeof getAxisTransforms>,+): YAxisModel | null => {+ if (dataKeys.length === 0) {+ return null;+ }++ const yAxisModel = getYAxisModel(+ dataKeys,+ names,+ dataset,+ settings,+ columnByDataKey,+ );++ if (yAxisModel) {+ const [minY, maxY] = computeCombinedExtent(seriesExtents, dataKeys);+ const transformedMinY = yAxisScaleTransforms.toEChartsAxisValue(minY);+ const transformedMaxY = yAxisScaleTransforms.toEChartsAxisValue(maxY);+ yAxisModel.extent = [transformedMinY ?? minY, transformedMaxY ?? maxY];+ }++ return yAxisModel;+};++const getBoxPlotYAxesModels = (+ seriesModels: BoxPlotSeriesModel[],+ dataBySeriesAndXValue: Map<DataKey, Map<RowValue, BoxPlotDatum>>,+ rawDataset: ChartDataset,+ settings: ComputedVisualizationSettings,+ columnByDataKey: Record<string, DatasetColumn>,+ yAxisScaleTransforms: ReturnType<typeof getAxisTransforms>,+): BoxPlotYAxesModels => {+ const seriesExtents = computeBoxPlotSeriesExtents(dataBySeriesAndXValue);+ const [leftAxisSeriesKeys, rightAxisSeriesKeys] = getYAxisSplit(+ seriesModels,+ seriesExtents,+ settings,+ );++ const visibleLeftKeys: DataKey[] = [];+ const visibleLeftNames: string[] = [];+ const visibleRightKeys: DataKey[] = [];+ const visibleRightNames: string[] = [];++ seriesModels.forEach(({ dataKey, visible, name }) => {+ if (!visible) {+ return;+ }+ if (leftAxisSeriesKeys.has(dataKey)) {+ visibleLeftKeys.push(dataKey);+ visibleLeftNames.push(name);+ } else if (rightAxisSeriesKeys.has(dataKey)) {+ visibleRightKeys.push(dataKey);+ visibleRightNames.push(name);+ }+ });++ return {+ leftAxisModel: createBoxPlotYAxisModel(+ visibleLeftKeys,+ visibleLeftNames,+ rawDataset,+ settings,+ columnByDataKey,+ seriesExtents,+ yAxisScaleTransforms,+ ),+ rightAxisModel: createBoxPlotYAxisModel(+ visibleRightKeys,+ visibleRightNames,+ rawDataset,+ settings,+ columnByDataKey,+ seriesExtents,+ yAxisScaleTransforms,+ ),+ leftAxisSeriesKeys,+ rightAxisSeriesKeys,+ };+};++export const getBoxPlotModel = (+ rawSeries: RawSeries,+ settings: ComputedVisualizationSettings,+ hiddenSeries: string[] = [],+ showWarning?: ShowWarning,+): BoxPlotChartModel => {+ const [singleRawSeries] = rawSeries;+ const { data } = singleRawSeries;++ const chartColumns = getCartesianChartColumns(data.cols, settings);+ const cardsColumns = [chartColumns];+ const columnByDataKey = getCardsColumnByDataKeyMap(rawSeries, cardsColumns);+ const dimensionModel = getDimensionModel(rawSeries, cardsColumns);++ const unsortedSeriesModels = getCardSeriesModels(+ singleRawSeries,+ chartColumns,+ hiddenSeries,+ false,+ false,+ settings,+ );+ const seriesModels: BoxPlotSeriesModel[] = getSortedSeriesModels(+ unsortedSeriesModels,+ settings,+ );++ const unsortedDataset = getBoxPlotDataset(rawSeries, chartColumns);+ const sortScale = getBoxPlotSortScale(settings);+ const rawDataset = sortDataset(unsortedDataset, sortScale, showWarning);++ const displaySettings = getDisplaySettings(settings);+ const yAxisScaleTransforms = getAxisTransforms(+ settings["graph.y_axis.scale"],+ );++ const boxPlotData =+ seriesModels.length > 0+ ? computeMultiSeriesBoxPlotData(+ rawDataset,+ X_AXIS_DATA_KEY,+ seriesModels,+ displaySettings.whiskerType,+ yAxisScaleTransforms,+ )+ : null;++ const dataBySeriesAndXValue = boxPlotData?.dataBySeriesAndXValue ?? new Map();+ const xValues = boxPlotData?.xValues ?? [];+ const boxDataset = boxPlotData?.boxDataset ?? [];+ const outlierAbovePointsDataset =+ boxPlotData?.outlierAbovePointsDataset ?? [];+ const outlierBelowPointsDataset =+ boxPlotData?.outlierBelowPointsDataset ?? [];+ const nonOutlierPointsDataset = boxPlotData?.nonOutlierPointsDataset ?? [];++ const labelSettings = getLabelSettings(settings, seriesModels);++ const {+ leftAxisModel,+ rightAxisModel,+ leftAxisSeriesKeys,+ rightAxisSeriesKeys,+ } = getBoxPlotYAxesModels(+ seriesModels,+ dataBySeriesAndXValue,+ rawDataset,+ settings,+ columnByDataKey,+ yAxisScaleTransforms,+ );++ const breakoutColumn =+ "breakout" in chartColumns ? chartColumns.breakout.column : undefined;++ return {+ boxDataset,+ outlierAbovePointsDataset,+ outlierBelowPointsDataset,+ nonOutlierPointsDataset,+ dataBySeriesAndXValue,+ xValues,+ seriesModels,+ yAxisScaleTransforms,+ columnByDataKey,+ dimensionModel,+ breakoutColumn,+ xAxisModel: createXAxisModel(+ dimensionModel.column,+ xValues.length,+ settings,+ ),+ leftAxisModel,+ rightAxisModel,+ leftAxisSeriesKeys,+ rightAxisSeriesKeys,+ ...displaySettings,+ ...labelSettings,+ };+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/model/types.ts b/frontend/src/metabase/visualizations/echarts/boxplot/model/types.tsnew file mode 100644index 00000000000..f32fae5709a--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/model/types.ts@@ -0,0 +1,99 @@+import type {+ BoxPlotPointsMode,+ BoxPlotShowValuesMode,+ BoxPlotWhiskerType,+ DatasetColumn,+ RowValue,+} from "metabase-types/api";++import type {+ BreakoutSeriesModel,+ CategoryXAxisModel,+ ChartDataset,+ DataKey,+ DimensionModel,+ NumericAxisScaleTransforms,+ RegularSeriesModel,+ SeriesFormatters,+ YAxisModel,+} from "../../cartesian/model/types";++export type { BoxPlotPointsMode, BoxPlotShowValuesMode, BoxPlotWhiskerType };++export type BoxPlotRawDataPoint = {+ value: number;+ datum: Record<string, RowValue>;+ index: number;+};++export type BoxPlotDatum = {+ xValue: RowValue;+ seriesKey: DataKey;+ seriesIndex: number;+ min: number;+ q1: number;+ median: number;+ q3: number;+ max: number;+ mean: number;+ outliers: number[];+ rawDataPoints: BoxPlotRawDataPoint[];+};++export type BoxPlotLabelFrequency = "fit" | "all";++export type BoxPlotSeriesModel = RegularSeriesModel | BreakoutSeriesModel;++export type BoxPlotChartModel = {+ // Dataset for boxplot/mean/labels series - one row per x-value+ // Columns: X_AXIS_DATA_KEY, and for each series: min, q1, median, q3, max, mean+ boxDataset: ChartDataset;++ // Dense dataset for outliers above the upper whisker - labels positioned at top+ // Columns: X_AXIS_DATA_KEY, and for each series: dataKey (with transformed y-value)+ outlierAbovePointsDataset: ChartDataset;++ // Dense dataset for outliers below the lower whisker - labels positioned at bottom+ // Columns: X_AXIS_DATA_KEY, and for each series: dataKey (with transformed y-value)+ outlierBelowPointsDataset: ChartDataset;++ // Dense dataset for non-outlier scatter points+ // Columns: X_AXIS_DATA_KEY, and for each series: dataKey (with transformed y-value)+ nonOutlierPointsDataset: ChartDataset;++ // O(1) lookup: seriesKey -> xValue -> BoxPlotDatum (original scale values)+ dataBySeriesAndXValue: Map<DataKey, Map<RowValue, BoxPlotDatum>>;++ // Unique x-axis values, order preserved from sorted dataset+ xValues: RowValue[];++ // Dimension model for column info+ dimensionModel: DimensionModel;++ // Breakout column info (if using breakout mode)+ breakoutColumn?: DatasetColumn;++ // Column lookup+ columnByDataKey: Record<DataKey, DatasetColumn>;++ // Series models (multiple for multi-series)+ seriesModels: BoxPlotSeriesModel[];++ // Axis models+ xAxisModel: CategoryXAxisModel;+ leftAxisModel: YAxisModel | null;+ rightAxisModel: YAxisModel | null;+ yAxisScaleTransforms: NumericAxisScaleTransforms;++ // Series axis assignment for yAxisIndex+ leftAxisSeriesKeys: Set<DataKey>;+ rightAxisSeriesKeys: Set<DataKey>;++ // BoxPlot-specific display settings+ pointsMode: BoxPlotPointsMode;+ whiskerType: BoxPlotWhiskerType;+ showMean: boolean;+ showValuesMode: BoxPlotShowValuesMode | null;+ seriesLabelsFormatters: SeriesFormatters;+ labelFrequency: BoxPlotLabelFrequency;+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/option/index.ts b/frontend/src/metabase/visualizations/echarts/boxplot/option/index.tsnew file mode 100644index 00000000000..475a6a402bb--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/option/index.ts@@ -0,0 +1,237 @@+import type { EChartsCoreOption } from "echarts/core";+import type { YAXisOption } from "echarts/types/dist/shared";+import type { OptionSourceData } from "echarts/types/src/util/types";++import { X_AXIS_DATA_KEY } from "metabase/visualizations/echarts/cartesian/constants/dataset";+import { getSharedEChartsOptions } from "metabase/visualizations/echarts/cartesian/option";+import {+ buildCategoricalDimensionAxis,+ buildMetricAxis,+} from "metabase/visualizations/echarts/cartesian/option/axis";+import {+ getGoalLineParams,+ getGoalLineSeriesOption,+} from "metabase/visualizations/echarts/cartesian/option/goal-line";+import { getTimelineEventsSeries } from "metabase/visualizations/echarts/cartesian/timeline-events/option";+import type { TimelineEventsModel } from "metabase/visualizations/echarts/cartesian/timeline-events/types";+import type {+ ComputedVisualizationSettings,+ RenderingContext,+} from "metabase/visualizations/types";+import type { TimelineEventId } from "metabase-types/api";++import { BOXPLOT_STATS } from "../constants";+import type { BoxPlotLayoutModel } from "../layout/types";+import type { BoxPlotChartModel } from "../model/types";+import { getBoxPlotStatKey } from "../utils";++import {+ buildEChartsBoxPlotLabelsSeries,+ buildEChartsBoxPlotSeries,+ buildEChartsMeanSeries,+ buildEChartsPointsSeries,+} from "./series";++const buildBoxPlotYAxisOption = (+ chartModel: BoxPlotChartModel,+ settings: ComputedVisualizationSettings,+ renderingContext: RenderingContext,+ position: "left" | "right",+ ticksWidth: number,+ showAxisLine: boolean,+ labelOffset: number,+): YAXisOption | null => {+ const axisModel =+ position === "left" ? chartModel.leftAxisModel : chartModel.rightAxisModel;++ if (!axisModel) {+ return null;+ }++ const axisOption = buildMetricAxis(+ axisModel,+ chartModel.yAxisScaleTransforms,+ ticksWidth,+ settings,+ position,+ showAxisLine,+ renderingContext,+ );++ if (labelOffset > 0) {+ return { ...axisOption, offset: labelOffset };+ }+ return axisOption;+};++export const getBoxPlotOption = (+ chartModel: BoxPlotChartModel,+ layoutModel: BoxPlotLayoutModel,+ timelineEventsModel: TimelineEventsModel | null,+ selectedTimelineEventsIds: TimelineEventId[],+ settings: ComputedVisualizationSettings,+ isAnimated: boolean,+ renderingContext: RenderingContext,+): EChartsCoreOption => {+ const { xValues, xAxisModel } = chartModel;++ if (xValues.length === 0) {+ return {};+ }++ const { adjustedPadding, sideLabelOverflow, xAxisOffset, chartMeasurements } =+ layoutModel;++ const hasTimelineEvents = timelineEventsModel != null;+ const timelineEventsSeries = hasTimelineEvents+ ? getTimelineEventsSeries(+ timelineEventsModel,+ selectedTimelineEventsIds,+ renderingContext,+ )+ : null;++ const pointsDatasetIndices = {+ outlierAbove: chartModel.outlierAbovePointsDataset.length > 0 ? 1 : -1,+ outlierBelow: -1,+ nonOutlier: -1,+ };+ let nextIndex = pointsDatasetIndices.outlierAbove === 1 ? 2 : 1;+ if (chartModel.outlierBelowPointsDataset.length > 0) {+ pointsDatasetIndices.outlierBelow = nextIndex++;+ }+ if (chartModel.nonOutlierPointsDataset.length > 0) {+ pointsDatasetIndices.nonOutlier = nextIndex;+ }++ const boxPlotSeriesArray = buildEChartsBoxPlotSeries(+ chartModel,+ layoutModel,+ renderingContext,+ );+ const pointsSeries = buildEChartsPointsSeries(+ chartModel,+ layoutModel,+ renderingContext,+ settings,+ pointsDatasetIndices,+ );+ const meanSeries = buildEChartsMeanSeries(+ chartModel,+ layoutModel,+ renderingContext,+ );+ const labelsSeries = buildEChartsBoxPlotLabelsSeries(+ chartModel,+ layoutModel,+ renderingContext,+ settings,+ );++ const goalSeriesOption = getGoalLineSeriesOption(+ getGoalLineParams({+ ...chartModel,+ dataset: chartModel.boxDataset,+ }),+ settings,+ renderingContext,+ );++ const series = [+ ...boxPlotSeriesArray,+ ...pointsSeries,+ ...meanSeries,+ ...labelsSeries,+ goalSeriesOption,+ timelineEventsSeries,+ ].flatMap((option) => option ?? []);++ const xAxis = buildCategoricalDimensionAxis(+ {+ formatter: xAxisModel.formatter,+ column: chartModel.dimensionModel.column,+ datasetLength: xValues.length,+ },+ settings,+ chartMeasurements,+ renderingContext,+ );++ const { leftAxisModel, rightAxisModel } = chartModel;+ const hasDualYAxis = leftAxisModel != null && rightAxisModel != null;++ const leftYAxis = buildBoxPlotYAxisOption(+ chartModel,+ settings,+ renderingContext,+ "left",+ chartMeasurements.ticksDimensions.yTicksWidthLeft,+ true,+ sideLabelOverflow.leftYAxisOffset,+ );++ const rightYAxis = buildBoxPlotYAxisOption(+ chartModel,+ settings,+ renderingContext,+ "right",+ chartMeasurements.ticksDimensions.yTicksWidthRight,+ !hasDualYAxis,+ sideLabelOverflow.rightYAxisOffset,+ );++ const yAxis = [leftYAxis, rightYAxis].filter(Boolean);++ const boxDimensions = [+ X_AXIS_DATA_KEY,+ ...chartModel.seriesModels.flatMap((seriesModel) =>+ BOXPLOT_STATS.map((stat) => getBoxPlotStatKey(seriesModel.dataKey, stat)),+ ),+ ];++ const pointsDimensions = [+ X_AXIS_DATA_KEY,+ ...chartModel.seriesModels.map((seriesModel) => seriesModel.dataKey),+ ];++ const datasets: { source: OptionSourceData; dimensions: string[] }[] = [+ {+ source: chartModel.boxDataset as OptionSourceData,+ dimensions: boxDimensions,+ },+ ];++ if (pointsDatasetIndices.outlierAbove >= 0) {+ datasets.push({+ source: chartModel.outlierAbovePointsDataset as OptionSourceData,+ dimensions: pointsDimensions,+ });+ }+ if (pointsDatasetIndices.outlierBelow >= 0) {+ datasets.push({+ source: chartModel.outlierBelowPointsDataset as OptionSourceData,+ dimensions: pointsDimensions,+ });+ }+ if (pointsDatasetIndices.nonOutlier >= 0) {+ datasets.push({+ source: chartModel.nonOutlierPointsDataset as OptionSourceData,+ dimensions: pointsDimensions,+ });+ }++ return {+ ...getSharedEChartsOptions(isAnimated),+ grid: {+ ...adjustedPadding,+ outerBoundsMode: "none",+ },+ dataset: datasets,+ series,+ yAxis,+ xAxis: {+ ...xAxis,+ ...(xAxisOffset > 0 && { offset: xAxisOffset }),+ },+ };+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/option/series.ts b/frontend/src/metabase/visualizations/echarts/boxplot/option/series.tsnew file mode 100644index 00000000000..ce97d9d638a--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/option/series.ts@@ -0,0 +1,443 @@+import Color from "color";+import type {+ BoxplotSeriesOption,+ LineSeriesOption,+ ScatterSeriesOption,+} from "echarts/charts";++import { X_AXIS_DATA_KEY } from "metabase/visualizations/echarts/cartesian/constants/dataset";+import {+ CHART_STYLE,+ Z_INDEXES,+} from "metabase/visualizations/echarts/cartesian/constants/style";+import type {+ ComputedVisualizationSettings,+ RenderingContext,+} from "metabase/visualizations/types";++import {+ BLUR_OPACITY,+ BOXPLOT_DATA_LABEL_STYLE,+ BOXPLOT_MAX_BOX_WIDTH,+ BOXPLOT_MIN_BOX_WIDTH,+ BOXPLOT_SERIES_NAME,+ BOX_FILL_OPACITY,+ EMPHASIS_DARKEN_FACTOR,+ LABEL_DISTANCE,+ MEAN_COLOR_DARKEN_FACTOR,+ NON_OUTLIER_OPACITY,+} from "../constants";+import type { BoxPlotLayoutModel } from "../layout/types";+import type { BoxPlotChartModel } from "../model/types";+import {+ getBoxPlotStatKey,+ getDataPointsSeriesName,+ getMeanSeriesName,+ getOutliersSeriesName,+} from "../utils";++const getSeriesYAxisIndex = (+ chartModel: BoxPlotChartModel,+ dataKey: string,+): number => {+ const { leftAxisSeriesKeys, rightAxisSeriesKeys } = chartModel;++ if (rightAxisSeriesKeys.has(dataKey)) {+ return leftAxisSeriesKeys.size > 0 ? 1 : 0;+ }+ return 0;+};++export const buildEChartsBoxPlotSeries = (+ chartModel: BoxPlotChartModel,+ layoutModel: BoxPlotLayoutModel,+ renderingContext: RenderingContext,+): BoxplotSeriesOption[] => {+ const { seriesModels } = chartModel;+ const { boxWidth } = layoutModel;++ return seriesModels+ .filter((seriesModel) => seriesModel.visible)+ .map((seriesModel) => {+ const seriesColor =+ seriesModel.color ?? renderingContext.getColor("brand");+ const fillColor = Color(seriesColor).alpha(BOX_FILL_OPACITY).string();+ const yAxisIndex = getSeriesYAxisIndex(chartModel, seriesModel.dataKey);+ const dataKey = seriesModel.dataKey;++ return {+ type: "boxplot",+ id: dataKey,+ name: seriesModel.name ?? BOXPLOT_SERIES_NAME,+ datasetIndex: 0,+ encode: {+ x: X_AXIS_DATA_KEY,+ y: [+ getBoxPlotStatKey(dataKey, "min"),+ getBoxPlotStatKey(dataKey, "q1"),+ getBoxPlotStatKey(dataKey, "median"),+ getBoxPlotStatKey(dataKey, "q3"),+ getBoxPlotStatKey(dataKey, "max"),+ ],+ },+ z: Z_INDEXES.series,+ yAxisIndex,+ boxWidth: [+ BOXPLOT_MIN_BOX_WIDTH,+ Math.min(boxWidth, BOXPLOT_MAX_BOX_WIDTH),+ ],+ itemStyle: {+ color: fillColor,+ borderColor: seriesColor,+ borderWidth: 1,+ },+ emphasis: {+ focus: "series",+ scale: false,+ itemStyle: {+ color: fillColor,+ borderColor: Color(seriesColor)+ .darken(EMPHASIS_DARKEN_FACTOR)+ .string(),+ borderWidth: 1,+ shadowBlur: 0,+ shadowOffsetX: 0,+ shadowOffsetY: 0,+ shadowColor: "transparent",+ opacity: 1,+ },+ },+ blur: {+ itemStyle: {+ opacity: BLUR_OPACITY,+ },+ },+ };+ });+};++export const buildEChartsMeanSeries = (+ chartModel: BoxPlotChartModel,+ layoutModel: BoxPlotLayoutModel,+ renderingContext: RenderingContext,+): ScatterSeriesOption[] => {+ const { showMean, seriesModels } = chartModel;+ const { visibleSeriesOffsets } = layoutModel;++ if (!showMean) {+ return [];+ }++ return seriesModels+ .filter((seriesModel) => seriesModel.visible)+ .map((seriesModel) => {+ const seriesColor =+ seriesModel.color ?? renderingContext.getColor("brand");+ const meanColor = Color(seriesColor)+ .darken(MEAN_COLOR_DARKEN_FACTOR)+ .hex();+ const xOffsetPixels = visibleSeriesOffsets.get(seriesModel.dataKey) ?? 0;+ const yAxisIndex = getSeriesYAxisIndex(chartModel, seriesModel.dataKey);+ const meanKey = getBoxPlotStatKey(seriesModel.dataKey, "mean");++ return {+ type: "scatter",+ name: getMeanSeriesName(seriesModel.dataKey),+ datasetIndex: 0,+ encode: {+ x: X_AXIS_DATA_KEY,+ y: meanKey,+ },+ z: Z_INDEXES.series + 1,+ yAxisIndex,+ symbol: "diamond",+ symbolSize: layoutModel.meanSymbolSize,+ symbolOffset: [xOffsetPixels, 0],+ silent: true,+ itemStyle: {+ color: meanColor,+ opacity: 1,+ borderColor: renderingContext.getColor("background-primary"),+ borderWidth: 1,+ },+ emphasis: {+ disabled: true,+ },+ };+ });+};++export type PointsDatasetIndices = {+ outlierAbove: number;+ outlierBelow: number;+ nonOutlier: number;+};++export const buildEChartsPointsSeries = (+ chartModel: BoxPlotChartModel,+ layoutModel: BoxPlotLayoutModel,+ renderingContext: RenderingContext,+ settings: ComputedVisualizationSettings,+ datasetIndices: PointsDatasetIndices,+): ScatterSeriesOption[] => {+ const {+ pointsMode,+ seriesModels,+ yAxisScaleTransforms,+ showValuesMode,+ seriesLabelsFormatters,+ labelFrequency,+ } = chartModel;+ const { fromEChartsAxisValue } = yAxisScaleTransforms;+ const { visibleSeriesOffsets } = layoutModel;++ if (pointsMode === "none") {+ return [];+ }++ const hideOverlap = labelFrequency === "fit";++ return seriesModels+ .filter((seriesModel) => seriesModel.visible)+ .flatMap((seriesModel) => {+ const seriesSettings = settings?.series(+ seriesModel.legacySeriesSettingsObjectKey,+ );+ const showSeriesValues = seriesSettings?.show_series_values ?? true;+ const labelFormatter = seriesLabelsFormatters[seriesModel.dataKey];+ const showLabels =+ showValuesMode === "all" && labelFormatter != null && showSeriesValues;++ const seriesColor =+ seriesModel.color ?? renderingContext.getColor("brand");+ const xOffsetPixels = visibleSeriesOffsets.get(seriesModel.dataKey) ?? 0;+ const yAxisIndex = getSeriesYAxisIndex(chartModel, seriesModel.dataKey);+ const dataKey = seriesModel.dataKey;++ const getOutlierLabelConfig = (+ position: "top" | "bottom",+ ): Partial<ScatterSeriesOption> => {+ if (!showLabels || !labelFormatter) {+ return { label: { show: false } };+ }++ return {+ label: {+ show: true,+ position,+ distance: LABEL_DISTANCE,+ fontFamily: renderingContext.fontFamily,+ fontWeight: BOXPLOT_DATA_LABEL_STYLE.fontWeight,+ fontSize: BOXPLOT_DATA_LABEL_STYLE.fontSize,+ color: renderingContext.getColor("text-primary"),+ textBorderColor: renderingContext.getColor("background-primary"),+ textBorderWidth: BOXPLOT_DATA_LABEL_STYLE.textBorderWidth,+ formatter: (params) => {+ const data = params.data as Record<string, unknown> | undefined;+ const y = data?.[dataKey] as number | null | undefined;+ if (y == null || !Number.isFinite(y)) {+ return "";+ }+ const originalValue = fromEChartsAxisValue(y);+ return labelFormatter(originalValue);+ },+ },+ labelLayout: { hideOverlap },+ };+ };++ const createOutlierSeries = (+ datasetIndex: number,+ labelPosition: "top" | "bottom",+ ): ScatterSeriesOption => ({+ type: "scatter",+ name: getOutliersSeriesName(dataKey),+ datasetIndex,+ encode: {+ x: X_AXIS_DATA_KEY,+ y: dataKey,+ },+ z: Z_INDEXES.series + 1,+ yAxisIndex,+ symbolSize: layoutModel.symbolSize,+ symbolOffset: [xOffsetPixels, 0],+ itemStyle: {+ color: seriesColor,+ opacity: CHART_STYLE.opacity.scatter,+ borderColor: renderingContext.getColor("background-primary"),+ borderWidth: 1,+ },+ ...getOutlierLabelConfig(labelPosition),+ emphasis: { disabled: true },+ });++ const series: ScatterSeriesOption[] = [];++ if (datasetIndices.outlierAbove >= 0) {+ series.push(createOutlierSeries(datasetIndices.outlierAbove, "top"));+ }+ if (datasetIndices.outlierBelow >= 0) {+ series.push(createOutlierSeries(datasetIndices.outlierBelow, "bottom"));+ }+ if (pointsMode === "all" && datasetIndices.nonOutlier >= 0) {+ series.push({+ type: "scatter",+ name: getDataPointsSeriesName(dataKey),+ datasetIndex: datasetIndices.nonOutlier,+ encode: {+ x: X_AXIS_DATA_KEY,+ y: dataKey,+ },+ z: Z_INDEXES.series,+ yAxisIndex,+ symbolSize: layoutModel.symbolSize,+ symbolOffset: [xOffsetPixels, 0],+ itemStyle: {+ color: seriesColor,+ opacity: NON_OUTLIER_OPACITY,+ borderColor: renderingContext.getColor("background-primary"),+ borderWidth: 1,+ },+ label: { show: false },+ emphasis: { focus: "none", itemStyle: { opacity: 1 } },+ blur: { itemStyle: { opacity: BLUR_OPACITY } },+ });+ }++ return series;+ });+};++type LabelPosition = "min" | "q1" | "median" | "q3" | "max";++const LABEL_SIDES: Record<LabelPosition, "left" | "right"> = {+ min: "right",+ q1: "left",+ median: "right",+ q3: "left",+ max: "right",+};++const LABEL_VERTICALS: Record<LabelPosition, "top" | "bottom"> = {+ min: "bottom",+ q1: "bottom",+ median: "top",+ q3: "top",+ max: "top",+};++export const buildEChartsBoxPlotLabelsSeries = (+ chartModel: BoxPlotChartModel,+ layoutModel: BoxPlotLayoutModel,+ renderingContext: RenderingContext,+ settings: ComputedVisualizationSettings,+): LineSeriesOption[] => {+ const {+ seriesModels,+ showValuesMode,+ seriesLabelsFormatters,+ labelFrequency,+ yAxisScaleTransforms,+ } = chartModel;+ const { fromEChartsAxisValue } = yAxisScaleTransforms;+ const { labelLayoutMode, labelOffset, visibleSeriesOffsets } = layoutModel;++ if (showValuesMode == null) {+ return [];+ }++ const hideOverlap = labelFrequency === "fit";++ return seriesModels+ .filter((seriesModel) => {+ if (!seriesModel.visible) {+ return false;+ }+ const labelFormatter = seriesLabelsFormatters[seriesModel.dataKey];+ if (!labelFormatter) {+ return false;+ }+ const seriesSettings = settings?.series(+ seriesModel.legacySeriesSettingsObjectKey,+ );+ return seriesSettings?.show_series_values ?? true;+ })+ .flatMap((seriesModel) => {+ const xOffset = visibleSeriesOffsets.get(seriesModel.dataKey) ?? 0;+ const yAxisIndex = getSeriesYAxisIndex(chartModel, seriesModel.dataKey);+ const dataKey = seriesModel.dataKey;+ const labelFormatter = seriesLabelsFormatters[dataKey]!;++ const createLabelSeries = (position: LabelPosition): LineSeriesOption => {+ const useSideLabels = labelLayoutMode === "side";+ const side = LABEL_SIDES[position];+ const isLeft = side === "left";+ const vertical = LABEL_VERTICALS[position];+ const isTop = vertical === "top";+ const statKey = getBoxPlotStatKey(dataKey, position);++ return {+ type: "line",+ name: `BoxPlot ${position} labels_${dataKey}`,+ datasetIndex: 0,+ encode: {+ x: X_AXIS_DATA_KEY,+ y: statKey,+ },+ z: Z_INDEXES.dataLabels,+ yAxisIndex,+ symbol: "circle",+ symbolSize: 0,+ silent: true,+ lineStyle: {+ opacity: 0,+ },+ label: {+ show: true,+ position: useSideLabels ? side : vertical,+ align: useSideLabels ? (isLeft ? "right" : "left") : "center",+ verticalAlign: useSideLabels ? "middle" : isTop ? "bottom" : "top",+ fontFamily: renderingContext.fontFamily,+ fontWeight: BOXPLOT_DATA_LABEL_STYLE.fontWeight,+ fontSize: BOXPLOT_DATA_LABEL_STYLE.fontSize,+ color: renderingContext.getColor("text-primary"),+ textBorderColor: renderingContext.getColor("background-primary"),+ textBorderWidth: BOXPLOT_DATA_LABEL_STYLE.textBorderWidth,+ formatter: (params) => {+ const data = params.data as Record<string, unknown>;+ const yValue = data[statKey] as number | null;+ if (yValue == null || !Number.isFinite(yValue)) {+ return "";+ }+ const originalValue = fromEChartsAxisValue(yValue);+ return labelFormatter(originalValue);+ },+ },+ labelLayout: useSideLabels+ ? () => ({+ hideOverlap,+ dx: (isLeft ? -labelOffset : labelOffset) + xOffset,+ })+ : () => ({+ hideOverlap,+ dx: xOffset,+ }),+ emphasis: {+ disabled: true,+ },+ };+ };++ if (showValuesMode === "median") {+ return [createLabelSeries("median")];+ }++ return [+ createLabelSeries("min"),+ createLabelSeries("q1"),+ createLabelSeries("median"),+ createLabelSeries("q3"),+ createLabelSeries("max"),+ ];+ });+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/option/tooltip.tsx b/frontend/src/metabase/visualizations/echarts/boxplot/option/tooltip.tsxnew file mode 100644index 00000000000..c2d361c407c--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/option/tooltip.tsx@@ -0,0 +1,86 @@+import type { TooltipOption } from "echarts/types/dist/shared";++import { reactNodeToHtmlString } from "metabase/lib/react-to-html";+import { EChartsTooltip } from "metabase/visualizations/components/ChartTooltip/EChartsTooltip";+import {+ GOAL_LINE_SERIES_ID,+ TIMELINE_EVENT_SERIES_ID,+} from "metabase/visualizations/echarts/cartesian/constants/dataset";+import { getTooltipBaseOption } from "metabase/visualizations/echarts/tooltip";+import type { ComputedVisualizationSettings } from "metabase/visualizations/types";++import { getBoxPlotTooltipModel } from "../events";+import type { BoxPlotChartModel } from "../model/types";++interface BoxPlotTooltipProps {+ dataIndex: number;+ seriesName?: string;+ seriesId?: string | number;+ dataValue?: unknown;+ settings: ComputedVisualizationSettings;+ chartModel: BoxPlotChartModel;+}++const BoxPlotItemTooltip = ({+ chartModel,+ settings,+ dataIndex,+ seriesName,+ seriesId,+ dataValue,+}: BoxPlotTooltipProps) => {+ if (dataIndex == null) {+ return null;+ }++ const tooltipModel = getBoxPlotTooltipModel(+ chartModel,+ settings,+ dataIndex,+ seriesName,+ seriesId != null ? String(seriesId) : undefined,+ dataValue,+ );++ if (!tooltipModel) {+ return null;+ }++ return <EChartsTooltip {...tooltipModel} />;+};++export const getBoxPlotTooltipOption = (+ chartModel: BoxPlotChartModel,+ settings: ComputedVisualizationSettings,+ containerRef: React.RefObject<HTMLDivElement>,+): TooltipOption => {+ return {+ ...getTooltipBaseOption(containerRef),+ trigger: "item",+ formatter: (params) => {+ if (Array.isArray(params)) {+ return "";+ }++ const { dataIndex, seriesId, seriesName, data } = params;++ if (+ seriesId === TIMELINE_EVENT_SERIES_ID ||+ seriesId === GOAL_LINE_SERIES_ID+ ) {+ return "";+ }++ return reactNodeToHtmlString(+ <BoxPlotItemTooltip+ settings={settings}+ chartModel={chartModel}+ dataIndex={dataIndex}+ seriesName={seriesName}+ seriesId={seriesId}+ dataValue={data}+ />,+ );+ },+ };+};diff --git a/frontend/src/metabase/visualizations/echarts/boxplot/utils.ts b/frontend/src/metabase/visualizations/echarts/boxplot/utils.tsnew file mode 100644index 00000000000..9002e28d80c--- /dev/null+++ b/frontend/src/metabase/visualizations/echarts/boxplot/utils.ts@@ -0,0 +1,116 @@+import { NULL_CHAR } from "metabase/visualizations/echarts/cartesian/constants/dataset";+import type { RowValue } from "metabase-types/api";++import type { DataKey } from "../cartesian/model/types";++import type { BoxPlotStat } from "./constants";+import {+ BOXPLOT_BOX_WIDTH_RATIO,+ BOXPLOT_MAX_BOX_WIDTH,+ BOXPLOT_MAX_SYMBOL_SIZE,+ BOXPLOT_MIN_BOX_WIDTH,+ BOXPLOT_MIN_SYMBOL_SIZE,+ BOXPLOT_SYMBOL_SIZE_RATIO,+ DATA_POINTS_SERIES_NAME,+ MEAN_SERIES_NAME,+ OUTLIERS_SERIES_NAME,+ SIDE_LABELS_MIN_GAP_RATIO,+} from "./constants";++export type LabelLayoutMode = "side" | "vertical";++export const getBoxPlotBoxWidth = (categoryWidth: number): number => {+ const rawBoxWidth = categoryWidth * BOXPLOT_BOX_WIDTH_RATIO;+ return Math.max(+ BOXPLOT_MIN_BOX_WIDTH,+ Math.min(rawBoxWidth, BOXPLOT_MAX_BOX_WIDTH),+ );+};++export const getBoxPlotSymbolSize = (categoryWidth: number): number => {+ const rawSymbolSize = categoryWidth * BOXPLOT_SYMBOL_SIZE_RATIO;+ return Math.max(+ BOXPLOT_MIN_SYMBOL_SIZE,+ Math.min(rawSymbolSize, BOXPLOT_MAX_SYMBOL_SIZE),+ );+};++export const getLabelLayoutMode = (categoryWidth: number): LabelLayoutMode => {+ const boxWidth = getBoxPlotBoxWidth(categoryWidth);+ const gap = categoryWidth - boxWidth;+ return gap >= SIDE_LABELS_MIN_GAP_RATIO * boxWidth ? "side" : "vertical";+};++/**+ * Computes pixel offset from category center for a series in a multi-series boxplot.+ * This matches ECharts boxplot layout algorithm exactly (from boxplotLayout.js):+ * availableWidth = bandWidth * 0.8 - 2+ * boxGap = availableWidth / seriesCount * 0.3+ * boxWidth = (availableWidth - boxGap * (seriesCount - 1)) / seriesCount+ * offset = boxWidth/2 - availableWidth/2 + seriesIndex * (boxGap + boxWidth)+ */+export const computeSeriesXOffsetPixels = (+ categoryWidth: number,+ seriesIndex: number,+ seriesCount: number,+): number => {+ if (seriesCount <= 1) {+ return 0;+ }+ const availableWidth = categoryWidth * 0.8 - 2;+ const boxGap = (availableWidth / seriesCount) * 0.3;+ const seriesBoxWidth =+ (availableWidth - boxGap * (seriesCount - 1)) / seriesCount;+ const step = boxGap + seriesBoxWidth;+ const base = seriesBoxWidth / 2 - availableWidth / 2;+ return base + seriesIndex * step;+};++export const getBoxPlotStatKey = (+ seriesDataKey: DataKey,+ stat: BoxPlotStat,+): DataKey => `${seriesDataKey}${NULL_CHAR}${stat}`;++export const getSeriesXValueKey = (+ seriesKey: DataKey,+ xValue: RowValue,+): string => `${seriesKey}${NULL_CHAR}${String(xValue)}`;++export const getOutliersSeriesName = (dataKey: DataKey): string =>+ `${OUTLIERS_SERIES_NAME}_${dataKey}`;++export const getDataPointsSeriesName = (dataKey: DataKey): string =>+ `${DATA_POINTS_SERIES_NAME}_${dataKey}`;++export const getMeanSeriesName = (dataKey: DataKey): string =>+ `${MEAN_SERIES_NAME}_${dataKey}`;++const SCATTER_SERIES_PREFIXES = [+ `${OUTLIERS_SERIES_NAME}_`,+ `${DATA_POINTS_SERIES_NAME}_`,+ `${MEAN_SERIES_NAME}_`,+];++const POINT_SERIES_PREFIXES = [+ `${OUTLIERS_SERIES_NAME}_`,+ `${DATA_POINTS_SERIES_NAME}_`,+];++export const isBoxPlotScatterSeriesName = (seriesName: string): boolean =>+ SCATTER_SERIES_PREFIXES.some((prefix) => seriesName.startsWith(prefix));++export const isPointSeriesName = (seriesName: string | undefined): boolean =>+ seriesName != null &&+ POINT_SERIES_PREFIXES.some((prefix) => seriesName.startsWith(prefix));++export const isMeanSeriesName = (seriesName: string | undefined): boolean =>+ seriesName != null && seriesName.startsWith(`${MEAN_SERIES_NAME}_`);++export const extractSeriesDataKeyFromName = (+ seriesName: string,+): DataKey | null => {+ const matchingPrefix = SCATTER_SERIES_PREFIXES.find((prefix) =>+ seriesName.startsWith(prefix),+ );+ return matchingPrefix ? seriesName.slice(matchingPrefix.length) : null;+};diff --git a/frontend/src/metabase/visualizations/echarts/cartesian/chart-measurements/index.ts b/frontend/src/metabase/visualizations/echarts/cartesian/chart-measurements/index.tsindex 1ea9a613625..5a7cfdff787 100644--- a/frontend/src/metabase/visualizations/echarts/cartesian/chart-measurements/index.ts+++ b/frontend/src/metabase/visualizations/echarts/cartesian/chart-measurements/index.ts@@ -5,9 +5,10 @@ import { X_AXIS_DATA_KEY } from "metabase/visualizations/echarts/cartesian/constimport { CHART_STYLE } from "metabase/visualizations/echarts/cartesian/constants/style";import type {AxisFormatter,- BaseCartesianChartModel,ChartDataset,NumericAxisScaleTransforms,+ SeriesFormatters,+ SeriesModel,StackModel,XAxisModel,YAxisModel,@@ -31,6 +32,24 @@ import type {TicksDimensions,} from "./types";+export interface ChartMeasurementsInput {+ xAxisModel: XAxisModel;+ leftAxisModel: YAxisModel | null;+ rightAxisModel: YAxisModel | null;+ yAxisScaleTransforms: NumericAxisScaleTransforms;+ transformedDataset?: ChartDataset;+ dataset?: ChartDataset;+ seriesModels?: SeriesModel[];+ stackModels?: StackModel[];+ seriesLabelsFormatters?: SeriesFormatters;+}++// Cartesian charts use `transformedDataset` (scaled/transformed values) while simpler+// charts like boxplot only have `dataset`. This helper provides unified access.+const getDataset = (input: ChartMeasurementsInput): ChartDataset => {+ return input.transformedDataset ?? input.dataset ?? [];+};+const getEvenlySpacedIndices = (length: number,indicesCount: number,@@ -186,7 +205,7 @@ const getXAxisTicksWidth = () => {const { fontSize } = theme.cartesian.label;- if (!axisEnabledSetting) {+ if (!axisEnabledSetting || dataset.length === 0) {return { firstXTickWidth: 0, lastXTickWidth: 0 };}if (axisEnabledSetting === "rotate-90") {@@ -275,13 +294,14 @@ const X_LABEL_ROTATE_45_THRESHOLD_FACTOR = 2.1;const X_LABEL_ROTATE_90_THRESHOLD_FACTOR = 1.2;const getAutoAxisEnabledSetting = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,settings: ComputedVisualizationSettings,boundaryWidth: number,maxXTickWidth: number,outerHeight: number,renderingContext: RenderingContext,): ComputedVisualizationSettings["graph.x_axis.axis_enabled"] => {+ const { xAxisModel } = input;const { fontSize } = renderingContext.theme.cartesian.label;const shouldAutoSelectSetting =@@ -293,11 +313,11 @@ const getAutoAxisEnabledSetting = (return settings["graph.x_axis.axis_enabled"];}- const dimensionWidth = getDimensionWidth(chartModel, boundaryWidth);+ const dimensionWidth = getDimensionWidth(input, boundaryWidth);const shouldRotate = areHorizontalXAxisTicksOverlapping(- chartModel.transformedDataset,+ getDataset(input),dimensionWidth,- chartModel.xAxisModel.formatter,+ xAxisModel.formatter,renderingContext,);@@ -325,43 +345,41 @@ const X_TICKS_TO_MEASURE_COUNT = 50;// Formatting and measuring every x-axis value can be expensive on datasets with thousands of values,// therefore we want to reduce the number of measured ticks based on the x-axis column type and a single dimension width.const getXTicksToMeasure = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,dimensionWidth: number,renderingContext: RenderingContext,) => {+ const { xAxisModel } = input;const { fontSize } = renderingContext.theme.cartesian.label;+ const dataset = getDataset(input);- // On continuous axes, we measure a limited number of evenly spaced ticks, including the start and end points.- if (- isNumericAxis(chartModel.xAxisModel) ||- isTimeSeriesAxis(chartModel.xAxisModel)- ) {- return getEvenlySpacedIndices(- chartModel.dataset.length,- X_TICKS_TO_MEASURE_COUNT,- ).map((datumIndex) => chartModel.dataset[datumIndex][X_AXIS_DATA_KEY]);+ if (isNumericAxis(xAxisModel) || isTimeSeriesAxis(xAxisModel)) {+ return getEvenlySpacedIndices(dataset.length, X_TICKS_TO_MEASURE_COUNT).map(+ (datumIndex) => dataset[datumIndex][X_AXIS_DATA_KEY],+ );}// On category scales, when the dimension width is smaller than the tick font size,// meaning that even with 90-degree rotation the ticks will not fit,// we select the top N ticks based on character length for formatting and measurement.- if (isCategoryAxis(chartModel.xAxisModel) && dimensionWidth <= fontSize) {- return chartModel.dataset+ if (isCategoryAxis(xAxisModel) && dimensionWidth <= fontSize) {+ return dataset.map((datum) => datum[X_AXIS_DATA_KEY]).sort((a, b) => String(b).length - String(a).length).slice(0, X_TICKS_TO_MEASURE_COUNT);}- return chartModel.dataset.map((datum) => datum[X_AXIS_DATA_KEY]);+ return dataset.map((datum) => datum[X_AXIS_DATA_KEY]);};const getMaxXTickWidth = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,dimensionWidth: number,renderingContext: RenderingContext,) => {+ const { xAxisModel } = input;const valueToMeasure = getXTicksToMeasure(- chartModel,+ input,dimensionWidth,renderingContext,);@@ -375,22 +393,21 @@ const getMaxXTickWidth = (return Math.max(...valueToMeasure.map((value) =>- renderingContext.measureText(- chartModel.xAxisModel.formatter(value),- fontStyle,- ),+ renderingContext.measureText(xAxisModel.formatter(value), fontStyle),),);};const getTicksDimensions = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,chartWidth: number,outerHeight: number,settings: ComputedVisualizationSettings,hasTimelineEvents: boolean,renderingContext: RenderingContext,) => {+ const { xAxisModel, leftAxisModel, rightAxisModel, yAxisScaleTransforms } =+ input;const ticksDimensions: TicksDimensions = {yTicksWidthLeft: 0,yTicksWidthRight: 0,@@ -399,21 +416,21 @@ const getTicksDimensions = (lastXTickWidth: 0,};- if (chartModel.leftAxisModel) {+ if (leftAxisModel) {ticksDimensions.yTicksWidthLeft =getYAxisTicksWidth(- chartModel.leftAxisModel,- chartModel.yAxisScaleTransforms,+ leftAxisModel,+ yAxisScaleTransforms,settings,renderingContext,) + CHART_STYLE.axisTicksMarginY;}- if (chartModel.rightAxisModel) {+ if (rightAxisModel) {ticksDimensions.yTicksWidthRight =getYAxisTicksWidth(- chartModel.rightAxisModel,- chartModel.yAxisScaleTransforms,+ rightAxisModel,+ yAxisScaleTransforms,settings,renderingContext,) + CHART_STYLE.axisTicksMarginY;@@ -425,21 +442,21 @@ const getTicksDimensions = (ticksDimensions.yTicksWidthLeft -ticksDimensions.yTicksWidthRight;- const isTimeSeries = isTimeSeriesAxis(chartModel.xAxisModel);+ const isTimeSeries = isTimeSeriesAxis(xAxisModel);let axisEnabledSetting = settings["graph.x_axis.axis_enabled"];const hasBottomAxis = !!axisEnabledSetting;if (hasBottomAxis) {- const dimensionWidth = getDimensionWidth(chartModel, currentBoundaryWidth);+ const dimensionWidth = getDimensionWidth(input, currentBoundaryWidth);const maxXTickWidth = getMaxXTickWidth(- chartModel,+ input,dimensionWidth,renderingContext,);axisEnabledSetting = getAutoAxisEnabledSetting(- chartModel,+ input,settings,currentBoundaryWidth,maxXTickWidth,@@ -448,9 +465,9 @@ const getTicksDimensions = ();const { firstXTickWidth, lastXTickWidth } = getXAxisTicksWidth(- chartModel.transformedDataset,+ getDataset(input),axisEnabledSetting,- chartModel.xAxisModel,+ xAxisModel,renderingContext,);ticksDimensions.firstXTickWidth = firstXTickWidth;@@ -476,13 +493,14 @@ const getTicksDimensions = (const TICK_OVERFLOW_BUFFER = 4;export const getChartPadding = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,settings: ComputedVisualizationSettings,ticksDimensions: TicksDimensions,axisEnabledSetting: ComputedVisualizationSettings["graph.x_axis.axis_enabled"],chartWidth: number,{ theme }: RenderingContext,): Padding => {+ const { xAxisModel, leftAxisModel, rightAxisModel, seriesModels } = input;const { fontSize } = theme.cartesian.label;const axisNameFontSize = fontSize;@@ -519,12 +537,12 @@ export const getChartPadding = (const yAxisNameTotalWidth = axisNameFontSize + CHART_STYLE.axisNameMargin;padding.left += ticksDimensions.yTicksWidthLeft;- if (chartModel.leftAxisModel?.label) {+ if (leftAxisModel?.label) {padding.left += yAxisNameTotalWidth;}padding.right += ticksDimensions.yTicksWidthRight;- if (chartModel.rightAxisModel?.label) {+ if (rightAxisModel?.label) {padding.right += yAxisNameTotalWidth;}@@ -534,13 +552,14 @@ export const getChartPadding = (// We handle non-categorical scatter plots differently, because echarts places// the tick labels on the very edge of the x-axis for scatter plots only.- const isScatterPlot = chartModel.seriesModels.some((seriesModel) => {- const seriesSettings = settings.series(- seriesModel.legacySeriesSettingsObjectKey,- );- return seriesSettings.display === "scatter";- });- if (isScatterPlot && chartModel.xAxisModel.axisType !== "category") {+ const isScatterPlot =+ seriesModels?.some((seriesModel) => {+ const seriesSettings = settings.series(+ seriesModel.legacySeriesSettingsObjectKey,+ );+ return seriesSettings.display === "scatter";+ }) ?? false;+ if (isScatterPlot && xAxisModel.axisType !== "category") {firstTickOverflow = Math.min(Math.max(ticksDimensions.firstXTickWidth / 2 -@@ -561,7 +580,7 @@ export const getChartPadding = ();} else {const currentBoundaryWidth = chartWidth - padding.left - padding.right;- const dimensionWidth = getDimensionWidth(chartModel, currentBoundaryWidth);+ const dimensionWidth = getDimensionWidth(input, currentBoundaryWidth);firstTickOverflow = Math.min(Math.max(@@ -609,10 +628,9 @@ export const getChartBounds = (};const getDimensionWidth = (- chartModel: BaseCartesianChartModel,+ { xAxisModel }: ChartMeasurementsInput,boundaryWidth: number,) => {- const { xAxisModel } = chartModel;const xValuesCount =isTimeSeriesAxis(xAxisModel) || isNumericAxis(xAxisModel)? xAxisModel.intervalsCount + 1@@ -661,19 +679,21 @@ const areHorizontalXAxisTicksOverlapping = (};const countFittingLabels = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,barStack: StackModel,barWidth: number,renderingContext: RenderingContext,) => {+ const { seriesLabelsFormatters } = input;+ const dataset = getDataset(input);return barStack.seriesKeys.reduce((fitCounts, seriesKey) => {- const formatter = chartModel.seriesLabelsFormatters?.[seriesKey];+ const formatter = seriesLabelsFormatters?.[seriesKey];if (!formatter) {return fitCounts;}- const seriesFitCounts = chartModel.dataset.reduce(+ const seriesFitCounts = dataset.reduce((fitCounts, datum) => {const value = datum[seriesKey];@@ -714,11 +734,12 @@ const BAR_WIDTH_PRECISION = 0.85;const HORIZONTAL_LABELS_COUNT_THRESHOLD = 0.8;const getStackedBarTicksRotation = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,boundaryWidth: number,renderingContext: RenderingContext,) => {- const barStack = chartModel.stackModels.find(+ const { stackModels } = input;+ const barStack = stackModels?.find((stackModel) => stackModel.display === "bar",);@@ -727,7 +748,7 @@ const getStackedBarTicksRotation = (}const barWidth =- getDimensionWidth(chartModel, boundaryWidth) *+ getDimensionWidth(input, boundaryWidth) *CHART_STYLE.series.barWidth *BAR_WIDTH_PRECISION;@@ -736,7 +757,7 @@ const getStackedBarTicksRotation = (}const labelsFit = countFittingLabels(- chartModel,+ input,barStack,barWidth,renderingContext,@@ -755,7 +776,7 @@ const getStackedBarTicksRotation = (};export const getChartMeasurements = (- chartModel: BaseCartesianChartModel,+ input: ChartMeasurementsInput,settings: ComputedVisualizationSettings,hasTimelineEvents: boolean,width: number,@@ -763,7 +784,7 @@ export const getChartMeasurements = (renderingContext: RenderingContext,): ChartMeasurements => {const { ticksDimensions, axisEnabledSetting } = getTicksDimensions(- chartModel,+ input,width,height,settings,@@ -771,7 +792,7 @@ export const getChartMeasurements = (renderingContext,);const padding = getChartPadding(- chartModel,+ input,settings,ticksDimensions,axisEnabledSetting,@@ -788,7 +809,7 @@ export const getChartMeasurements = (ticksDimensions.yTicksWidthRight;const stackedBarTicksRotation = getStackedBarTicksRotation(- chartModel,+ input,boundaryWidth,renderingContext,);diff --git a/frontend/src/metabase/visualizations/echarts/cartesian/model/axis.ts b/frontend/src/metabase/visualizations/echarts/cartesian/model/axis.tsindex 185f5a8eb1c..626a7725546 100644--- a/frontend/src/metabase/visualizations/echarts/cartesian/model/axis.ts+++ b/frontend/src/metabase/visualizations/echarts/cartesian/model/axis.ts@@ -100,7 +100,7 @@ const getMetricColumnsCount = (seriesModels: SeriesModel[]) => {.length;};-function shouldAutoSplitYAxis(+export function shouldAutoSplitYAxis(settings: ComputedVisualizationSettings,seriesModels: SeriesModel[],seriesExtents: SeriesExtents,@@ -521,17 +521,28 @@ function getYAxisExtent(return combinedExtent != null ? combinedExtent : [0, 0];}+interface YAxisModelOptions {+ stackModels?: StackModel[];+ stackType?: StackType;+ formattingOptions?: OptionsType;+ gridSize?: VisualizationGridSize;+}+export function getYAxisModel(seriesKeys: string[],seriesNames: string[],- stackModels: StackModel[],transformedDataset: ChartDataset,settings: ComputedVisualizationSettings,columnByDataKey: Record<DataKey, DatasetColumn>,- stackType: StackType,- formattingOptions?: OptionsType,- gridSize?: VisualizationGridSize,+ options: YAxisModelOptions = {},): YAxisModel | null {+ const {+ stackModels = [],+ stackType = null,+ formattingOptions,+ gridSize,+ } = options;+if (seriesKeys.length === 0) {return null;}@@ -625,26 +636,31 @@ export function getYAxesModels(leftAxisModel: getYAxisModel(leftAxisSeriesKeys,leftAxisSeriesNames,- leftStackModels,transformedDataset,settings,columnByDataKey,- settings["stackable.stack_type"] ?? null,- { compact: isCompactFormatting },- gridSize,+ {+ stackModels: leftStackModels,+ stackType: settings["stackable.stack_type"] ?? null,+ formattingOptions: { compact: isCompactFormatting },+ gridSize,+ },),rightAxisModel: getYAxisModel(rightAxisSeriesKeys,rightAxisSeriesNames,- rightStackModels,transformedDataset,settings,columnByDataKey,- settings["stackable.stack_type"] === "normalized"- ? null- : (settings["stackable.stack_type"] ?? null),- { compact: isCompactFormatting },- gridSize,+ {+ stackModels: rightStackModels,+ stackType:+ settings["stackable.stack_type"] === "normalized"+ ? null+ : (settings["stackable.stack_type"] ?? null),+ formattingOptions: { compact: isCompactFormatting },+ gridSize,+ },),};}diff --git a/frontend/src/metabase/visualizations/echarts/cartesian/option/axis.ts b/frontend/src/metabase/visualizations/echarts/cartesian/option/axis.tsindex 55c2024bde2..2f5782a0982 100644--- a/frontend/src/metabase/visualizations/echarts/cartesian/option/axis.ts+++ b/frontend/src/metabase/visualizations/echarts/cartesian/option/axis.ts@@ -4,6 +4,7 @@ import type { AxisBaseOptionCommon } from "echarts/types/src/coord/axisCommonTypimport { parseNumberValue } from "metabase/lib/number";import { CHART_STYLE } from "metabase/visualizations/echarts/cartesian/constants/style";import type {+ AxisFormatter,BaseCartesianChartModel,NumericAxisScaleTransforms,NumericXAxisModel,@@ -16,6 +17,7 @@ import type {RenderingContext,} from "metabase/visualizations/types";import { isNumericBaseType } from "metabase-lib/v1/types/utils/isa";+import type { DatasetColumn } from "metabase-types/api";import type { ChartMeasurements } from "../chart-measurements/types";import { getScaledMinAndMax } from "../model/axis";@@ -109,7 +111,7 @@ export const getDimensionTicksDefaultOption = (};const getHistogramTicksOptions = (- chartModel: BaseCartesianChartModel,+ datasetLength: number,settings: ComputedVisualizationSettings,chartMeasurements: ChartMeasurements,{ theme }: RenderingContext,@@ -121,7 +123,7 @@ const getHistogramTicksOptions = (}const histogramDimensionWidth =- chartMeasurements.boundaryWidth / chartModel.transformedDataset.length;+ chartMeasurements.boundaryWidth / datasetLength;const options = { showMinLabel: false, showMaxLabel: true };if (settings["graph.x_axis.axis_enabled"] === "rotate-45") {@@ -219,7 +221,11 @@ export const buildDimensionAxis = (}return buildCategoricalDimensionAxis(- chartModel,+ {+ formatter: chartModel.xAxisModel.formatter,+ column: chartModel.dimensionModel.column,+ datasetLength: chartModel.transformedDataset.length,+ },settings,chartMeasurements,renderingContext,@@ -313,17 +319,18 @@ export const buildTimeSeriesDimensionAxis = (};};+interface CategoricalAxisParams {+ formatter: AxisFormatter;+ column: DatasetColumn | undefined;+ datasetLength: number;+}+export const buildCategoricalDimensionAxis = (- chartModel: BaseCartesianChartModel,+ { formatter, column, datasetLength }: CategoricalAxisParams,originalSettings: ComputedVisualizationSettings,chartMeasurements: ChartMeasurements,renderingContext: RenderingContext,): XAXisOption => {- const {- xAxisModel: { formatter },- dimensionModel: { column },- } = chartModel;-const autoAxisEnabled = chartMeasurements.axisEnabledSetting;const settings: ComputedVisualizationSettings = {...originalSettings,@@ -341,7 +348,7 @@ export const buildCategoricalDimensionAxis = (margin: CHART_STYLE.axisTicksMarginX,...getDimensionTicksDefaultOption(settings, renderingContext),...getHistogramTicksOptions(- chartModel,+ datasetLength,settings,chartMeasurements,renderingContext,@@ -349,7 +356,7 @@ export const buildCategoricalDimensionAxis = (interval: () => true,formatter: (value: string) => {const numberValue = parseNumberValue(value);- if (isNumericBaseType(column) && numberValue !== null) {+ if (column && isNumericBaseType(column) && numberValue !== null) {return getPaddedAxisLabel(formatter(numberValue));}diff --git a/frontend/src/metabase/visualizations/echarts/cartesian/option/goal-line.ts b/frontend/src/metabase/visualizations/echarts/cartesian/option/goal-line.tsindex a89c7c4cd4e..51f65ccabba 100644--- a/frontend/src/metabase/visualizations/echarts/cartesian/option/goal-line.ts+++ b/frontend/src/metabase/visualizations/echarts/cartesian/option/goal-line.ts@@ -4,11 +4,12 @@ import type {ComputedVisualizationSettings,RenderingContext,} from "metabase/visualizations/types";+import type { RowValue } from "metabase-types/api";import type { EChartsCartesianCoordinateSystem } from "../../types";import { GOAL_LINE_SERIES_ID, X_AXIS_DATA_KEY } from "../constants/dataset";import { CHART_STYLE, Z_INDEXES } from "../constants/style";-import type { BaseCartesianChartModel, ChartDataset } from "../model/types";+import type { ChartDataset } from "../model/types";export const GOAL_LINE_DASH = [3, 4];@@ -26,8 +27,33 @@ function getFirstNonNullXValue(dataset: ChartDataset) {return String(null);}+export interface GoalLineParams {+ dataset: ChartDataset;+ isNormalized: boolean;+ toEChartsAxisValue: (value: RowValue) => number | null;+ labelOnLeft: boolean;+}++interface GoalLineParamsSource {+ dataset: ChartDataset;+ leftAxisModel: { isNormalized?: boolean } | null;+ rightAxisModel: unknown;+ yAxisScaleTransforms: {+ toEChartsAxisValue: (value: RowValue) => number | null;+ };+}++export function getGoalLineParams(model: GoalLineParamsSource): GoalLineParams {+ return {+ dataset: model.dataset,+ isNormalized: model.leftAxisModel?.isNormalized ?? false,+ toEChartsAxisValue: model.yAxisScaleTransforms.toEChartsAxisValue,+ labelOnLeft: model.rightAxisModel != null,+ };+}+export function getGoalLineSeriesOption(- chartModel: BaseCartesianChartModel,+ { dataset, isNormalized, toEChartsAxisValue, labelOnLeft }: GoalLineParams,settings: ComputedVisualizationSettings,renderingContext: RenderingContext,): CustomSeriesOption | null {@@ -35,20 +61,17 @@ export function getGoalLineSeriesOption(return null;}- const value = chartModel.leftAxisModel?.isNormalized+ const value = isNormalized? settings["graph.goal_value"] / 100: settings["graph.goal_value"];- const scaleTransformedGoalValue =- chartModel.yAxisScaleTransforms.toEChartsAxisValue(value);+ const scaleTransformedGoalValue = toEChartsAxisValue(value);const { fontSize } = renderingContext.theme.cartesian.goalLine.label;return {id: GOAL_LINE_SERIES_ID,type: "custom",- data: [- [getFirstNonNullXValue(chartModel.dataset), scaleTransformedGoalValue],- ],+ data: [[getFirstNonNullXValue(dataset), scaleTransformedGoalValue]],z: Z_INDEXES.goalLine,blur: {opacity: 1,@@ -81,9 +104,8 @@ export function getGoalLineSeriesOption(},};- const hasRightYAxis = chartModel.rightAxisModel == null;- const align = hasRightYAxis ? ("right" as const) : ("left" as const);- const labelX = hasRightYAxis ? xEnd : xStart;+ const align = labelOnLeft ? ("left" as const) : ("right" as const);+ const labelX = labelOnLeft ? xStart : xEnd;const labelY = y - fontSize - CHART_STYLE.goalLine.label.margin;const label = {diff --git a/frontend/src/metabase/visualizations/echarts/cartesian/option/index.ts b/frontend/src/metabase/visualizations/echarts/cartesian/option/index.tsindex 7df8a2da5b6..c6c3e41f1f6 100644--- a/frontend/src/metabase/visualizations/echarts/cartesian/option/index.ts+++ b/frontend/src/metabase/visualizations/echarts/cartesian/option/index.ts@@ -23,7 +23,7 @@ import type { ChartMeasurements } from "../chart-measurements/types";import { CHART_STYLE } from "../constants/style";import { getBarSeriesDataLabelKey } from "../model/util";-import { getGoalLineSeriesOption } from "./goal-line";+import { getGoalLineParams, getGoalLineSeriesOption } from "./goal-line";import { getTrendLinesOption } from "./trend-line";import type { EChartsSeriesOption } from "./types";@@ -113,7 +113,7 @@ export const getCartesianChartOption = (renderingContext,);const goalSeriesOption = getGoalLineSeriesOption(- chartModel,+ getGoalLineParams(chartModel),settings,renderingContext,);diff --git a/frontend/src/metabase/visualizations/echarts/cartesian/scatter/option/index.ts b/frontend/src/metabase/visualizations/echarts/cartesian/scatter/option/index.tsindex adc9644c47b..aa535b3ea41 100644--- a/frontend/src/metabase/visualizations/echarts/cartesian/scatter/option/index.ts+++ b/frontend/src/metabase/visualizations/echarts/cartesian/scatter/option/index.ts@@ -12,7 +12,10 @@ import { X_AXIS_DATA_KEY } from "../../constants/dataset";import type { ScatterPlotModel } from "../../model/types";import { getSharedEChartsOptions } from "../../option";import { buildAxes } from "../../option/axis";-import { getGoalLineSeriesOption } from "../../option/goal-line";+import {+ getGoalLineParams,+ getGoalLineSeriesOption,+} from "../../option/goal-line";import { getTrendLinesOption } from "../../option/trend-line";import type { EChartsSeriesOption } from "../../option/types";import { getSeriesYAxisIndex } from "../../option/utils";@@ -51,7 +54,7 @@ export function getScatterPlotOption(),);const goalSeriesOption = getGoalLineSeriesOption(- chartModel,+ getGoalLineParams(chartModel),settings,renderingContext,);diff --git a/frontend/src/metabase/visualizations/echarts/cartesian/waterfall/model/index.ts b/frontend/src/metabase/visualizations/echarts/cartesian/waterfall/model/index.tsindex 4f3318bdd9e..7e667d0d3b5 100644--- a/frontend/src/metabase/visualizations/echarts/cartesian/waterfall/model/index.ts+++ b/frontend/src/metabase/visualizations/echarts/cartesian/waterfall/model/index.ts@@ -106,14 +106,14 @@ export const getWaterfallChartModel = (const leftAxisModel = getYAxisModel([WATERFALL_END_KEY],[],- [],transformedDataset,settings,{ [WATERFALL_END_KEY]: seriesModel.column },- null,{- compact:- settings["graph.label_value_formatting"] === "compact" || isCompact,+ formattingOptions: {+ compact:+ settings["graph.label_value_formatting"] === "compact" || isCompact,+ },},);diff --git a/frontend/src/metabase/visualizations/echarts/index.ts b/frontend/src/metabase/visualizations/echarts/index.tsindex 175d09dfb0d..db91992f648 100644--- a/frontend/src/metabase/visualizations/echarts/index.ts+++ b/frontend/src/metabase/visualizations/echarts/index.ts@@ -1,5 +1,6 @@import {BarChart,+ BoxplotChart,CustomChart,LineChart,SankeyChart,@@ -25,6 +26,7 @@ export const registerEChartsModules = () => {use([LineChart,BarChart,+ BoxplotChart,ScatterChart,CustomChart,SunburstChart,diff --git a/frontend/src/metabase/visualizations/echarts/types.ts b/frontend/src/metabase/visualizations/echarts/types.tsindex 92a55ec8344..a5ed0596622 100644--- a/frontend/src/metabase/visualizations/echarts/types.ts+++ b/frontend/src/metabase/visualizations/echarts/types.ts@@ -14,6 +14,7 @@ export type EChartsSeriesMouseEvent<TDatum = unknown> = {};dataIndex?: number;seriesId?: string;+ seriesName?: string;name?: string;value: any;dataType?: string;diff --git a/frontend/src/metabase/visualizations/hooks/use-chart-y-axis-visibility.ts b/frontend/src/metabase/visualizations/hooks/use-chart-y-axis-visibility.tsnew file mode 100644index 00000000000..d0b81d21850--- /dev/null+++ b/frontend/src/metabase/visualizations/hooks/use-chart-y-axis-visibility.ts@@ -0,0 +1,78 @@+import type { EChartsType } from "echarts/core";+import { useLayoutEffect, useMemo } from "react";++import type {+ DataKey,+ SeriesModel,+} from "metabase/visualizations/echarts/cartesian/model/types";+import { createAxisVisibilityOption } from "metabase/visualizations/echarts/cartesian/option/axis";+import type { HoveredObject } from "metabase/visualizations/types";+import { getHoveredSeriesDataKey } from "metabase/visualizations/visualizations/CartesianChart/utils";++type UseChartYAxisVisibilityProps = {+ chartRef: React.RefObject<EChartsType | undefined>;+ seriesModels: SeriesModel[];+ leftAxisModel: unknown | null;+ rightAxisModel: unknown | null;+ leftAxisSeriesKeys: Set<DataKey> | DataKey[];+ hovered: HoveredObject | null | undefined;+};++export function useChartYAxisVisibility({+ chartRef,+ seriesModels,+ leftAxisModel,+ rightAxisModel,+ leftAxisSeriesKeys,+ hovered,+}: UseChartYAxisVisibilityProps) {+ const hoveredSeriesDataKey = useMemo(+ () => getHoveredSeriesDataKey(seriesModels, hovered),+ [seriesModels, hovered],+ );++ useLayoutEffect(+ function updateYAxisVisibility() {+ const hasDualYAxis = leftAxisModel != null && rightAxisModel != null;++ if (!hasDualYAxis) {+ return;+ }++ let yAxisShowOption: ReturnType<typeof createAxisVisibilityOption>[];++ const noSeriesHovered = hoveredSeriesDataKey == null;+ const leftAxisHasHoveredSeries =+ hoveredSeriesDataKey != null &&+ (leftAxisSeriesKeys instanceof Set+ ? leftAxisSeriesKeys.has(hoveredSeriesDataKey)+ : leftAxisSeriesKeys.includes(hoveredSeriesDataKey));++ if (noSeriesHovered) {+ yAxisShowOption = [+ createAxisVisibilityOption({ show: true, splitLineVisible: true }),+ createAxisVisibilityOption({ show: true, splitLineVisible: false }),+ ];+ } else if (leftAxisHasHoveredSeries) {+ yAxisShowOption = [+ createAxisVisibilityOption({ show: true, splitLineVisible: true }),+ createAxisVisibilityOption({ show: false, splitLineVisible: false }),+ ];+ } else {+ yAxisShowOption = [+ createAxisVisibilityOption({ show: false, splitLineVisible: false }),+ createAxisVisibilityOption({ show: true, splitLineVisible: true }),+ ];+ }++ chartRef.current?.setOption({ yAxis: yAxisShowOption }, false, true);+ },+ [+ leftAxisModel,+ rightAxisModel,+ leftAxisSeriesKeys,+ chartRef,+ hoveredSeriesDataKey,+ ],+ );+}diff --git a/frontend/src/metabase/visualizations/lib/settings/graph.js b/frontend/src/metabase/visualizations/lib/settings/graph.jsindex 2785ad37c85..c7d6097493f 100644--- a/frontend/src/metabase/visualizations/lib/settings/graph.js+++ b/frontend/src/metabase/visualizations/lib/settings/graph.js@@ -6,6 +6,7 @@ import {getMaxDimensionsSupported,getMaxMetricsSupported,} from "metabase/visualizations";+import { ChartSettingEnumToggle } from "metabase/visualizations/components/settings/ChartSettingEnumToggle";import { ChartSettingMaxCategories } from "metabase/visualizations/components/settings/ChartSettingMaxCategories";import { ChartSettingSeriesOrder } from "metabase/visualizations/components/settings/ChartSettingSeriesOrder";import { dimensionIsNumeric } from "metabase/visualizations/lib/numeric";@@ -671,7 +672,8 @@ export const GRAPH_AXIS_SETTINGS = {"graph.x_axis._is_histogram",],isValid: isXAxisScaleValid,- getDefault: (series, vizSettings) => getDefaultXAxisScale(vizSettings),+ getDefault: (series, vizSettings) =>+ getDefaultXAxisScale(vizSettings, series[0]?.card?.display),getProps: (series, vizSettings) => ({options: getAvailableXAxisScales(series, vizSettings),}),@@ -959,3 +961,161 @@ export const GRAPH_AXIS_SETTINGS = {// DEPRECATED" replaced with "label" series setting"graph.series_labels": {},};++export const BOXPLOT_SETTINGS = {+ "boxplot.whisker_type": {+ get section() {+ return t`Display`;+ },+ get title() {+ return t`Whiskers extend to`;+ },+ widget: "radio",+ default: "tukey",+ props: {+ get options() {+ return [+ { name: t`1.5 × interquartile range`, value: "tukey" },+ { name: t`Min/Max`, value: "min-max" },+ ];+ },+ },+ },+ "boxplot.points_mode": {+ get section() {+ return t`Display`;+ },+ get title() {+ return t`Show points`;+ },+ widget: "radio",+ default: "outliers",+ getValue: (_series, settings) => {+ const isMinMax = settings["boxplot.whisker_type"] === "min-max";+ const savedValue = settings["boxplot.points_mode"];+ if (savedValue == null) {+ return isMinMax ? "none" : "outliers";+ }+ if (isMinMax && savedValue === "outliers") {+ return "none";+ }+ return savedValue;+ },+ getProps: (_series, settings) => {+ const isMinMax = settings["boxplot.whisker_type"] === "min-max";+ const options = [+ { name: t`None`, value: "none" },+ { name: t`Outliers only`, value: "outliers" },+ { name: t`All points`, value: "all" },+ ].filter((opt) => !isMinMax || opt.value !== "outliers");+ return { options };+ },+ readDependencies: ["boxplot.whisker_type"],+ },+ "boxplot.show_mean": {+ get section() {+ return t`Display`;+ },+ get title() {+ return t`Show mean`;+ },+ widget: "toggle",+ default: true,+ inline: true,+ },+ "graph.show_values": {+ get section() {+ return t`Display`;+ },+ get title() {+ return t`Show values on data points`;+ },+ widget: "toggle",+ default: false,+ inline: true,+ marginBottom: "1rem",+ },+ "boxplot.show_values_mode": {+ get section() {+ return t`Display`;+ },+ get title() {+ return t`Values to display`;+ },+ widget: "segmentedControl",+ default: "median",+ getHidden: (_series, vizSettings) => !vizSettings["graph.show_values"],+ props: {+ options: [+ {+ get name() {+ return t`Median only`;+ },+ value: "median",+ },+ {+ get name() {+ return t`All`;+ },+ value: "all",+ },+ ],+ },+ readDependencies: ["graph.show_values"],+ },+ "graph.label_value_frequency": {+ get section() {+ return t`Display`;+ },+ get title() {+ return t`Hide overlapping labels`;+ },+ widget: ChartSettingEnumToggle,+ default: "fit",+ inline: true,+ getHidden: (_series, vizSettings) => !vizSettings["graph.show_values"],+ props: {+ checkedValue: "fit",+ uncheckedValue: "all",+ },+ readDependencies: ["graph.show_values"],+ },+ "graph.label_value_formatting": {+ get section() {+ return t`Display`;+ },+ get title() {+ return t`Auto formatting`;+ },+ widget: "segmentedControl",+ default: "compact",+ getHidden: (_series, vizSettings) => !vizSettings["graph.show_values"],+ props: {+ options: [+ {+ get name() {+ return t`Compact`;+ },+ value: "compact",+ },+ {+ get name() {+ return t`Full`;+ },+ value: "full",+ },+ ],+ },+ readDependencies: ["graph.show_values"],+ },+};++export const BOXPLOT_DATA_SETTINGS = {+ ...GRAPH_DATA_SETTINGS,+ "graph.dimensions": {+ ...GRAPH_DATA_SETTINGS["graph.dimensions"],+ getDefault: (series, vizSettings) =>+ // As BoxPlot needs unaggregated data, we only default to one dimension even if there are multiple dimensions available+ getDefaultDimensions(series, vizSettings).slice(0, 1),+ },+};diff --git a/frontend/src/metabase/visualizations/register.js b/frontend/src/metabase/visualizations/register.jsindex e9e0390c11f..103499c8cc2 100644--- a/frontend/src/metabase/visualizations/register.js+++ b/frontend/src/metabase/visualizations/register.js@@ -7,6 +7,7 @@ import {import { AreaChart } from "./visualizations/AreaChart";import { BarChart } from "./visualizations/BarChart";+import { BoxPlot } from "./visualizations/BoxPlot";import { ComboChart } from "./visualizations/ComboChart";import { DashCardPlaceholder } from "./visualizations/DashCardPlaceholder";import { Funnel } from "./visualizations/Funnel";@@ -43,6 +44,7 @@ export default function () {registerVisualization(ComboChart);registerVisualization(RowChart);registerVisualization(ScatterPlot);+ registerVisualization(BoxPlot);registerVisualization(PieChart);registerVisualization(Map);registerVisualization(Funnel);diff --git a/frontend/src/metabase/visualizations/shared/settings-adjustments.ts b/frontend/src/metabase/visualizations/shared/settings-adjustments.tsnew file mode 100644index 00000000000..12efc49b047--- /dev/null+++ b/frontend/src/metabase/visualizations/shared/settings-adjustments.ts@@ -0,0 +1,40 @@+import type { ComputedVisualizationSettings } from "metabase/visualizations/types";++const HIDE_Y_AXIS_LABEL_WIDTH_THRESHOLD = 360;+const HIDE_X_AXIS_LABEL_HEIGHT_THRESHOLD = 200;+const HIDE_Y_AXIS_HEIGHT_THRESHOLD = 150;+const INTERPOLATE_LINE_THRESHOLD = 150;++export const getDashboardAdjustedSettings = (+ settings: ComputedVisualizationSettings,+ isDashboard: boolean,+ width: number,+ height: number,+): ComputedVisualizationSettings => {+ if (!isDashboard) {+ return settings;+ }++ const adjusted = { ...settings };++ if (+ width <= INTERPOLATE_LINE_THRESHOLD ||+ height <= INTERPOLATE_LINE_THRESHOLD+ ) {+ adjusted["line.interpolate"] = "cardinal";+ }++ if (width <= HIDE_Y_AXIS_LABEL_WIDTH_THRESHOLD) {+ adjusted["graph.y_axis.labels_enabled"] = false;+ }++ if (height <= HIDE_X_AXIS_LABEL_HEIGHT_THRESHOLD) {+ adjusted["graph.x_axis.labels_enabled"] = false;+ }++ if (height <= HIDE_Y_AXIS_HEIGHT_THRESHOLD) {+ adjusted["graph.y_axis.axis_enabled"] = false;+ }++ return adjusted;+};diff --git a/frontend/src/metabase/visualizations/shared/settings/cartesian-chart.ts b/frontend/src/metabase/visualizations/shared/settings/cartesian-chart.tsindex 04553e66f0a..6743aeae476 100644--- a/frontend/src/metabase/visualizations/shared/settings/cartesian-chart.ts+++ b/frontend/src/metabase/visualizations/shared/settings/cartesian-chart.ts@@ -286,7 +286,11 @@ export const getDefaultIsTimeSeries = (export const getDefaultXAxisScale = (vizSettings: ComputedVisualizationSettings,+ display?: string,) => {+ if (display === "boxplot") {+ return "ordinal";+ }if (vizSettings["graph.x_axis._is_histogram"]) {return "histogram";}@@ -308,9 +312,13 @@ export const getDefaultDataLabelsFrequency = () => "fit";export const getDefaultDataLabelsFormatting = () => "auto";export const getAvailableXAxisScales = (- [{ data }]: RawSeries,+ [{ data, card }]: RawSeries,settings: ComputedVisualizationSettings,) => {+ if (card.display === "boxplot") {+ return [{ name: t`Ordinal`, value: "ordinal" }];+ }+const options = [];const dimensionColumn = data.cols.find(diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.module.css b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.module.cssnew file mode 100644index 00000000000..0a56ff9893e--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.module.css@@ -0,0 +1,3 @@+.root {+ overflow: hidden;+}diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsxnew file mode 100644index 00000000000..ffe7013e3c8--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.tsx@@ -0,0 +1,252 @@+import type { EChartsType } from "echarts/core";+import { type MouseEvent, useCallback, useMemo, useRef, useState } from "react";+import { useSet } from "react-use";++import { isReducedMotionPreferred } from "metabase/lib/dom";+import { extractRemappings } from "metabase/visualizations";+import { ChartRenderingErrorBoundary } from "metabase/visualizations/components/ChartRenderingErrorBoundary";+import { ResponsiveEChartsRenderer } from "metabase/visualizations/components/EChartsRenderer";+import { LegendCaption } from "metabase/visualizations/components/legend/LegendCaption";+import {+ getBoxPlotLayoutModel,+ getBoxPlotModel,+ getBoxPlotOption,+ getBoxPlotTooltipOption,+} from "metabase/visualizations/echarts/boxplot";+import { getChartMeasurements } from "metabase/visualizations/echarts/cartesian/chart-measurements";+import { getLegendItems } from "metabase/visualizations/echarts/cartesian/model/legend";+import {+ useClickedStateTooltipSync,+ useCloseTooltipOnScroll,+} from "metabase/visualizations/echarts/tooltip";+import { useBrowserRenderingContext } from "metabase/visualizations/hooks/use-browser-rendering-context";+import { getDashboardAdjustedSettings } from "metabase/visualizations/shared/settings-adjustments";+import type { VisualizationProps } from "metabase/visualizations/types";+import {+ CartesianChartLegendLayout,+ CartesianChartRoot,+} from "metabase/visualizations/visualizations/CartesianChart/CartesianChart.styled";+import { useTooltipMouseLeave } from "metabase/visualizations/visualizations/CartesianChart/use-tooltip-mouse-leave";++import { BOXPLOT_CHART_DEFINITION } from "./chart-definition";+import { useBoxPlotEvents } from "./events";++function BoxPlotInner({+ rawSeries,+ settings: originalSettings,+ fontFamily,+ card,+ width,+ height,+ isDashboard,+ isEditing,+ isQueryBuilder,+ isFullscreen,+ hovered,+ clicked,+ showTitle,+ headerIcon,+ actionButtons,+ getHref,+ showAllLegendItems,+ onVisualizationClick,+ onHoverChange,+ visualizationIsClickable,+ onChangeCardAndRun,+ onRender,+ titleMenuItems,+}: VisualizationProps) {+ const containerRef = useRef<HTMLDivElement>(null);+ const chartRef = useRef<EChartsType>();+ const [chartSize, setChartSize] = useState({ width: 0, height: 0 });+ const [hiddenSeries, { toggle: toggleSeriesVisibility }] = useSet<string>();++ const rawSeriesWithRemappings = useMemo(+ () => extractRemappings(rawSeries),+ [rawSeries],+ );++ const settings = useMemo(+ () =>+ getDashboardAdjustedSettings(+ originalSettings,+ isDashboard ?? false,+ width,+ height,+ ),+ [originalSettings, isDashboard, width, height],+ );++ const renderingContext = useBrowserRenderingContext({ fontFamily });++ const showWarning = useCallback(+ (warning: string) => onRender?.({ warnings: [warning] }),+ [onRender],+ );++ const chartModel = useMemo(+ () =>+ getBoxPlotModel(+ rawSeriesWithRemappings,+ settings,+ Array.from(hiddenSeries),+ showWarning,+ ),+ [rawSeriesWithRemappings, settings, hiddenSeries, showWarning],+ );++ const description = settings["card.description"];++ const legendItems = useMemo(+ () => getLegendItems(chartModel.seriesModels, showAllLegendItems),+ [chartModel, showAllLegendItems],+ );+ const hasLegend = legendItems.length > 0;++ const canSelectTitle = !!onChangeCardAndRun;++ const handleToggleSeriesVisibility = useCallback(+ (_event: MouseEvent, seriesIndex: number) => {+ const seriesModel = chartModel.seriesModels[seriesIndex];+ const willShowSeries = hiddenSeries.has(seriesModel.dataKey);+ const hasMoreVisibleSeries =+ chartModel.seriesModels.length - hiddenSeries.size > 1;+ if (hasMoreVisibleSeries || willShowSeries) {+ toggleSeriesVisibility(seriesModel.dataKey);+ }+ },+ [chartModel, hiddenSeries, toggleSeriesVisibility],+ );++ const chartMeasurements = useMemo(+ () =>+ getChartMeasurements(+ { ...chartModel, dataset: chartModel.boxDataset },+ settings,+ false,+ chartSize.width,+ chartSize.height,+ renderingContext,+ ),+ [chartModel, settings, chartSize.width, chartSize.height, renderingContext],+ );++ const layoutModel = useMemo(+ () =>+ getBoxPlotLayoutModel({+ chartModel,+ chartMeasurements,+ settings,+ chartWidth: chartSize.width,+ renderingContext,+ }),+ [+ chartModel,+ chartMeasurements,+ settings,+ chartSize.width,+ renderingContext,+ ],+ );++ const option = useMemo(() => {+ if (chartSize.width === 0 || chartSize.height === 0) {+ return null;+ }++ const shouldAnimate = !isReducedMotionPreferred();++ return {+ ...getBoxPlotOption(+ chartModel,+ layoutModel,+ null,+ [],+ settings,+ shouldAnimate,+ renderingContext,+ ),+ tooltip: getBoxPlotTooltipOption(chartModel, settings, containerRef),+ };+ }, [chartModel, layoutModel, settings, chartSize, renderingContext]);++ const { eventHandlers } = useBoxPlotEvents({+ chartRef,+ chartModel,+ rawSeries,+ settings,+ hovered,+ onHoverChange,+ onVisualizationClick,+ visualizationIsClickable,+ onChangeCardAndRun,+ });++ const handleInit = useCallback((chart: EChartsType) => {+ chartRef.current = chart;+ }, []);++ const handleResize = useCallback((width: number, height: number) => {+ setChartSize({ width, height });+ }, []);++ useCloseTooltipOnScroll(chartRef);+ useTooltipMouseLeave(chartRef, onHoverChange, containerRef);+ useClickedStateTooltipSync(chartRef.current, clicked);++ const hasValidOption = option !== null;++ return (+ <CartesianChartRoot isQueryBuilder={isQueryBuilder}>+ {showTitle && (+ <LegendCaption+ title={settings["card.title"] ?? card.name}+ description={description}+ icon={headerIcon}+ actionButtons={actionButtons}+ hasInfoTooltip={!isDashboard || !isEditing}+ getHref={canSelectTitle ? getHref : undefined}+ onSelectTitle={+ canSelectTitle+ ? () => onChangeCardAndRun({ nextCard: card })+ : undefined+ }+ width={width}+ titleMenuItems={titleMenuItems}+ />+ )}+ <CartesianChartLegendLayout+ isReversed={settings["legend.is_reversed"]}+ hasLegend={hasLegend}+ items={legendItems}+ actionButtons={!showTitle ? actionButtons : undefined}+ hovered={hovered}+ isFullscreen={isFullscreen}+ isQueryBuilder={isQueryBuilder}+ onToggleSeriesVisibility={handleToggleSeriesVisibility}+ onHoverChange={onHoverChange}+ width={width}+ height={height}+ >+ <ResponsiveEChartsRenderer+ key={hasValidOption ? "chart" : "measuring"}+ ref={containerRef}+ option={option ?? {}}+ eventHandlers={hasValidOption ? eventHandlers : undefined}+ onInit={handleInit}+ onResize={handleResize}+ />+ </CartesianChartLegendLayout>+ </CartesianChartRoot>+ );+}++export function BoxPlot(props: VisualizationProps) {+ return (+ <ChartRenderingErrorBoundary onRenderError={props.onRenderError}>+ <BoxPlotInner {...props} />+ </ChartRenderingErrorBoundary>+ );+}++Object.assign(BoxPlot, BOXPLOT_CHART_DEFINITION);diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.unit.spec.ts b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.unit.spec.tsnew file mode 100644index 00000000000..bc6a7c65dc3--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/BoxPlot.unit.spec.ts@@ -0,0 +1,113 @@+import {+ createMockColumn,+ createMockDatasetData,+} from "metabase-types/api/mocks/dataset";++import { BOXPLOT_CHART_DEFINITION } from "./chart-definition";++const categoryColumn = createMockColumn({+ name: "Category",+ display_name: "Category",+ base_type: "type/Text",+});++const idColumn = createMockColumn({+ name: "ID",+ display_name: "ID",+ base_type: "type/Integer",+});++const metricColumn = createMockColumn({+ name: "Value",+ display_name: "Value",+ base_type: "type/Number",+ semantic_type: "type/Number",+});++const columns = [categoryColumn, idColumn, metricColumn];++describe("BoxPlot", () => {+ describe("isSensible", () => {+ it("should return true for data with two dimensions and a metric", () => {+ const data = createMockDatasetData({+ rows: [+ ["A", 1, 10],+ ["A", 2, 20],+ ["A", 3, 30],+ ["A", 4, 40],+ ["A", 5, 50],+ ],+ cols: columns,+ });++ expect(BOXPLOT_CHART_DEFINITION.isSensible(data)).toBe(true);+ });++ it("should return false when there is only one dimension column", () => {+ const data = createMockDatasetData({+ rows: [+ ["A", 10],+ ["A", 20],+ ["A", 30],+ ["A", 40],+ ["A", 50],+ ],+ cols: [categoryColumn, metricColumn],+ });++ expect(BOXPLOT_CHART_DEFINITION.isSensible(data)).toBe(false);+ });++ it("should return false when there are no rows", () => {+ const data = createMockDatasetData({+ rows: [],+ cols: columns,+ });++ expect(BOXPLOT_CHART_DEFINITION.isSensible(data)).toBe(false);+ });++ it("should return false when there is no metric column", () => {+ const columnsWithoutMetric = [+ createMockColumn({+ name: "Category1",+ display_name: "Category1",+ base_type: "type/Text",+ }),+ createMockColumn({+ name: "Category2",+ display_name: "Category2",+ base_type: "type/Text",+ }),+ ];++ const data = createMockDatasetData({+ rows: [+ ["A", "X"],+ ["B", "Y"],+ ["C", "Z"],+ ["D", "W"],+ ["E", "V"],+ ],+ cols: columnsWithoutMetric,+ });++ expect(BOXPLOT_CHART_DEFINITION.isSensible(data)).toBe(false);+ });++ it("should return true for multiple categories with sufficient total rows", () => {+ const data = createMockDatasetData({+ rows: [+ ["A", 1, 10],+ ["A", 2, 20],+ ["B", 3, 30],+ ["B", 4, 40],+ ["B", 5, 50],+ ],+ cols: columns,+ });++ expect(BOXPLOT_CHART_DEFINITION.isSensible(data)).toBe(true);+ });+ });+});diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/chart-definition.ts b/frontend/src/metabase/visualizations/visualizations/BoxPlot/chart-definition.tsnew file mode 100644index 00000000000..1ec43b94940--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/chart-definition.ts@@ -0,0 +1,57 @@+import { t } from "ttag";++import { GRAPH_GOAL_SETTINGS } from "metabase/visualizations/lib/settings/goal";+import {+ BOXPLOT_DATA_SETTINGS,+ BOXPLOT_SETTINGS,+ GRAPH_AXIS_SETTINGS,+} from "metabase/visualizations/lib/settings/graph";+import { validateChartDataSettings } from "metabase/visualizations/lib/settings/validation";+import {+ getDefaultSize,+ getMinSize,+} from "metabase/visualizations/shared/utils/sizes";+import type {+ ComputedVisualizationSettings,+ VisualizationSettingsDefinitions,+} from "metabase/visualizations/types";+import { transformSeries } from "metabase/visualizations/visualizations/CartesianChart/chart-definition-legacy";+import { isDimension, isMetric } from "metabase-lib/v1/types/utils/isa";+import type { DatasetData, RawSeries } from "metabase-types/api";++export const BOXPLOT_CHART_DEFINITION = {+ getUiName: () => t`Box Plot`,+ identifier: "boxplot",+ iconName: "boxplot",+ // eslint-disable-next-line ttag/no-module-declaration -- see metabase#55045+ noun: t`box plot`,+ minSize: getMinSize("boxplot"),+ defaultSize: getDefaultSize("boxplot"),+ maxMetricsSupported: Infinity,+ maxDimensionsSupported: 2,+ noHeader: true,+ transformSeries,++ isSensible: ({ cols, rows }: DatasetData) => {+ return (+ rows.length > 1 &&+ cols.length >= 3 &&+ cols.filter(isDimension).length >= 2 &&+ cols.filter(isMetric).length > 0+ );+ },++ checkRenderable: (+ _series: RawSeries,+ settings: ComputedVisualizationSettings,+ ) => {+ validateChartDataSettings(settings);+ },++ settings: {+ ...BOXPLOT_SETTINGS,+ ...GRAPH_GOAL_SETTINGS,+ ...GRAPH_AXIS_SETTINGS,+ ...BOXPLOT_DATA_SETTINGS,+ } as any as VisualizationSettingsDefinitions,+};diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/events.ts b/frontend/src/metabase/visualizations/visualizations/BoxPlot/events.tsnew file mode 100644index 00000000000..470aeda69d8--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/events.ts@@ -0,0 +1,180 @@+import type { EChartsType } from "echarts/core";+import { useCallback, useEffect, useMemo } from "react";++import {+ extractSeriesDataKeyFromName,+ getBoxPlotClickData,+ isBoxPlotSeriesEvent,+} from "metabase/visualizations/echarts/boxplot";+import type { BoxPlotChartModel } from "metabase/visualizations/echarts/boxplot/model/types";+import type { EChartsSeriesMouseEvent } from "metabase/visualizations/echarts/types";+import { useChartYAxisVisibility } from "metabase/visualizations/hooks/use-chart-y-axis-visibility";+import type {+ ComputedVisualizationSettings,+ HoveredObject,+ OnChangeCardAndRun,+ VisualizationProps,+} from "metabase/visualizations/types";+import type { EChartsEventHandler } from "metabase/visualizations/types/echarts";+import type { CardId, RawSeries } from "metabase-types/api";++type UseBoxPlotEventsProps = {+ chartRef: React.RefObject<EChartsType | undefined>;+ chartModel: BoxPlotChartModel;+ rawSeries: RawSeries;+ settings: ComputedVisualizationSettings;+ hovered: HoveredObject | null | undefined;+ onHoverChange: VisualizationProps["onHoverChange"];+ onVisualizationClick: VisualizationProps["onVisualizationClick"];+ visualizationIsClickable: VisualizationProps["visualizationIsClickable"];+ onChangeCardAndRun: VisualizationProps["onChangeCardAndRun"];+};++function handleOpenQuestion(+ cardId: CardId | undefined,+ rawSeries: RawSeries,+ onChangeCardAndRun: OnChangeCardAndRun | null | undefined,+) {+ if (cardId != null && onChangeCardAndRun) {+ const nextCard =+ rawSeries.find((series) => series.card.id === cardId)?.card ??+ rawSeries[0].card;+ onChangeCardAndRun({ nextCard });+ }+}++function getBoxPlotSeriesHovered(+ chartModel: BoxPlotChartModel,+ event: EChartsSeriesMouseEvent,+): HoveredObject | null {+ const { seriesType, seriesId, seriesName } = event;+ const { seriesModels } = chartModel;++ let seriesIndex = -1;++ if (seriesType === "boxplot" && seriesId) {+ seriesIndex = seriesModels.findIndex((s) => s.dataKey === seriesId);+ } else if (seriesName) {+ const extractedDataKey = extractSeriesDataKeyFromName(seriesName);+ if (extractedDataKey) {+ seriesIndex = seriesModels.findIndex(+ (s) => s.dataKey === extractedDataKey,+ );+ }+ }++ if (seriesIndex < 0) {+ return null;+ }++ return { index: seriesIndex };+}++export function useBoxPlotEvents({+ chartRef,+ chartModel,+ rawSeries,+ settings,+ hovered,+ onHoverChange,+ onVisualizationClick,+ visualizationIsClickable,+ onChangeCardAndRun,+}: UseBoxPlotEventsProps) {+ useChartYAxisVisibility({+ chartRef,+ seriesModels: chartModel.seriesModels,+ leftAxisModel: chartModel.leftAxisModel,+ rightAxisModel: chartModel.rightAxisModel,+ leftAxisSeriesKeys: chartModel.leftAxisSeriesKeys,+ hovered,+ });++ useEffect(+ function handleHoverStates() {+ const chart = chartRef.current;+ if (!chart || hovered == null || hovered.index == null) {+ return;+ }++ const hoveredSeriesModel = chartModel.seriesModels[hovered.index];+ if (!hoveredSeriesModel || !hoveredSeriesModel.visible) {+ return;+ }++ const hoveredDataKey = hoveredSeriesModel.dataKey;++ chart.dispatchAction({+ type: "highlight",+ seriesId: hoveredDataKey,+ });++ return () => {+ chart.dispatchAction({+ type: "downplay",+ seriesId: hoveredDataKey,+ });+ };+ },+ [chartRef, chartModel.seriesModels, hovered],+ );++ const handleClick = useCallback(+ (event: EChartsSeriesMouseEvent) => {+ if (!isBoxPlotSeriesEvent(event)) {+ return;+ }++ const clickData = getBoxPlotClickData(chartModel, settings, event);++ if (clickData && !visualizationIsClickable(clickData)) {+ handleOpenQuestion(clickData.cardId, rawSeries, onChangeCardAndRun);+ }++ onVisualizationClick(clickData);+ },+ [+ chartModel,+ rawSeries,+ settings,+ onVisualizationClick,+ visualizationIsClickable,+ onChangeCardAndRun,+ ],+ );++ const eventHandlers: EChartsEventHandler[] = useMemo(+ () => [+ {+ eventName: "mouseout",+ query: "series",+ handler: () => {+ onHoverChange?.(null);+ },+ },+ {+ eventName: "mousemove",+ query: "series",+ handler: (event: EChartsSeriesMouseEvent) => {+ if (!isBoxPlotSeriesEvent(event)) {+ return;+ }++ const hoveredObject = getBoxPlotSeriesHovered(chartModel, event);+ const isSameDatumHovered = hoveredObject?.index === hovered?.index;++ if (!isSameDatumHovered) {+ onHoverChange?.(hoveredObject);+ }+ },+ },+ {+ eventName: "click",+ handler: handleClick,+ },+ ],+ [handleClick, chartModel, hovered, onHoverChange],+ );++ return { eventHandlers };+}diff --git a/frontend/src/metabase/visualizations/visualizations/BoxPlot/index.ts b/frontend/src/metabase/visualizations/visualizations/BoxPlot/index.tsnew file mode 100644index 00000000000..dc6b9b1becc--- /dev/null+++ b/frontend/src/metabase/visualizations/visualizations/BoxPlot/index.ts@@ -0,0 +1 @@+export { BoxPlot } from "./BoxPlot";diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsxindex 735a2f85fec..5469f53e9c9 100644--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/CartesianChart.tsx@@ -22,12 +22,7 @@ import { useChartEvents } from "metabase/visualizations/visualizations/Cartesianimport { useChartDebug } from "./use-chart-debug";import { useModelsAndOption } from "./use-models-and-option";--const HIDE_Y_AXIS_LABEL_WIDTH_THRESHOLD = 360;-const HIDE_X_AXIS_LABEL_HEIGHT_THRESHOLD = 200;--const HIDE_Y_AXIS_HEIGHT_THRESHOLD = 150;-const INTERPOLATE_LINE_THRESHOLD = 150;+import { getDashboardAdjustedSettings } from "./utils";function CartesianChartInner(props: VisualizationProps) {const containerRef = useRef<HTMLDivElement>(null);@@ -61,30 +56,16 @@ function CartesianChartInner(props: VisualizationProps) {titleMenuItems,} = props;- const settings = useMemo(() => {- const settings = { ...originalSettings };- if (isDashboard) {- if (- outerWidth <= INTERPOLATE_LINE_THRESHOLD ||- outerHeight <= INTERPOLATE_LINE_THRESHOLD- ) {- settings["line.interpolate"] = "cardinal";- }-- if (outerWidth <= HIDE_Y_AXIS_LABEL_WIDTH_THRESHOLD) {- settings["graph.y_axis.labels_enabled"] = false;- }-- if (outerHeight <= HIDE_X_AXIS_LABEL_HEIGHT_THRESHOLD) {- settings["graph.x_axis.labels_enabled"] = false;- }-- if (outerHeight <= HIDE_Y_AXIS_HEIGHT_THRESHOLD) {- settings["graph.y_axis.axis_enabled"] = false;- }- }- return settings;- }, [originalSettings, isDashboard, outerWidth, outerHeight]);+ const settings = useMemo(+ () =>+ getDashboardAdjustedSettings(+ originalSettings,+ isDashboard ?? false,+ outerWidth,+ outerHeight,+ ),+ [originalSettings, isDashboard, outerWidth, outerHeight],+ );const { chartModel, timelineEventsModel, option } = useModelsAndOption({diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-chart-events.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-chart-events.tsindex 3ce4ea3361c..cb4a6eb6cb3 100644--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-chart-events.ts+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/use-chart-events.ts@@ -1,12 +1,6 @@import type { EChartsCoreOption, EChartsType } from "echarts/core";import type * as React from "react";-import {- useCallback,- useEffect,- useLayoutEffect,- useMemo,- useRef,-} from "react";+import { useCallback, useEffect, useMemo, useRef } from "react";import {GOAL_LINE_SERIES_ID,@@ -17,13 +11,13 @@ import type {BaseCartesianChartModel,ChartDataset,} from "metabase/visualizations/echarts/cartesian/model/types";-import { createAxisVisibilityOption } from "metabase/visualizations/echarts/cartesian/option/axis";import type { TimelineEventsModel } from "metabase/visualizations/echarts/cartesian/timeline-events/types";import { useClickedStateTooltipSync } from "metabase/visualizations/echarts/tooltip";import type {EChartsSeriesBrushEndEvent,EChartsSeriesMouseEvent,} from "metabase/visualizations/echarts/types";+import { useChartYAxisVisibility } from "metabase/visualizations/hooks/use-chart-y-axis-visibility";import type { VisualizationProps } from "metabase/visualizations/types";import type { EChartsEventHandler } from "metabase/visualizations/types/echarts";import {@@ -40,10 +34,7 @@ import { getVisualizerSeriesCardIndex } from "metabase/visualizer/utils";import type { CardId } from "metabase-types/api";import { useTooltipMouseLeave } from "./use-tooltip-mouse-leave";-import {- getHoveredEChartsSeriesDataKeyAndIndex,- getHoveredSeriesDataKey,-} from "./utils";+import { getHoveredEChartsSeriesDataKeyAndIndex } from "./utils";export const useChartEvents = (chartRef: React.MutableRefObject<EChartsType | undefined>,@@ -95,62 +86,14 @@ export const useChartEvents = (],);- const hoveredSeriesDataKey = useMemo(- () => getHoveredSeriesDataKey(chartModel.seriesModels, hovered),- [chartModel.seriesModels, hovered],- );-- /**- * We intentionally use useLayoutEffect here and not useEffect.- * This is so that chart.setOption is always called in a different tick than- * chart.setOption from useClickedStateTooltipSync. If they're called in the- * same tick (which may happen non-deterministically), then the 2nd chart.setOption- * call (whichever is 2nd) will throw "Cannot read property 'coordinateSystem' of undefined" error.- */- useLayoutEffect(- function updateYAxisVisibility() {- const hasSingleYAxis = !(- chartModel.leftAxisModel != null && chartModel.rightAxisModel != null- );-- if (hasSingleYAxis) {- return;- }-- let yAxisShowOption: ReturnType<typeof createAxisVisibilityOption>[];-- const noSeriesHovered = hoveredSeriesDataKey == null;- const leftAxisSeriesHovered =- hoveredSeriesDataKey != null &&- chartModel.leftAxisModel?.seriesKeys.includes(hoveredSeriesDataKey);-- if (noSeriesHovered) {- yAxisShowOption = [- createAxisVisibilityOption({ show: true, splitLineVisible: true }),- createAxisVisibilityOption({ show: true, splitLineVisible: false }),- ];- } else if (leftAxisSeriesHovered) {- yAxisShowOption = [- createAxisVisibilityOption({ show: true, splitLineVisible: true }),- createAxisVisibilityOption({ show: false, splitLineVisible: false }),- ];- } else {- // right axis series hovered- yAxisShowOption = [- createAxisVisibilityOption({ show: false, splitLineVisible: false }),- createAxisVisibilityOption({ show: true, splitLineVisible: true }),- ];- }-- chartRef.current?.setOption({ yAxis: yAxisShowOption }, false, true);- },- [- chartModel.leftAxisModel,- chartModel.rightAxisModel,- chartRef,- hoveredSeriesDataKey,- ],- );+ useChartYAxisVisibility({+ chartRef,+ seriesModels: chartModel.seriesModels,+ leftAxisModel: chartModel.leftAxisModel,+ rightAxisModel: chartModel.rightAxisModel,+ leftAxisSeriesKeys: chartModel.leftAxisModel?.seriesKeys ?? [],+ hovered,+ });const eventHandlers: EChartsEventHandler[] = useMemo(() => [diff --git a/frontend/src/metabase/visualizations/visualizations/CartesianChart/utils.ts b/frontend/src/metabase/visualizations/visualizations/CartesianChart/utils.tsindex ef48122fbcd..db2b8c4c015 100644--- a/frontend/src/metabase/visualizations/visualizations/CartesianChart/utils.ts+++ b/frontend/src/metabase/visualizations/visualizations/CartesianChart/utils.ts@@ -5,8 +5,11 @@ import type {DataKey,SeriesModel,} from "metabase/visualizations/echarts/cartesian/model/types";+import { getDashboardAdjustedSettings } from "metabase/visualizations/shared/settings-adjustments";import type { HoveredObject } from "metabase/visualizations/types";+export { getDashboardAdjustedSettings };+export const getHoveredSeriesDataKey = (seriesModels: SeriesModel[],hovered: HoveredObject | null | undefined,diff --git a/src/metabase/channel/render/card.clj b/src/metabase/channel/render/card.cljindex bdf8a24c09a..4580c53011c 100644--- a/src/metabase/channel/render/card.clj+++ b/src/metabase/channel/render/card.clj@@ -124,6 +124,7 @@:scalar:pie:scatter+ :boxplot:waterfall:row:linediff --git a/src/metabase/dashboards/constants.cljc b/src/metabase/dashboards/constants.cljcindex aa407101f87..483349dcabe 100644--- a/src/metabase/dashboards/constants.cljc+++ b/src/metabase/dashboards/constants.cljc@@ -12,6 +12,7 @@:bar {:min {:width 4 :height 3} :default {:width 12 :height 6}}:pie {:min {:width 4 :height 3} :default {:width 12 :height 8}}:scatter {:min {:width 4 :height 3} :default {:width 12 :height 6}}+ :boxplot {:min {:width 4 :height 3} :default {:width 12 :height 6}}:waterfall {:min {:width 4 :height 3} :default {:width 14 :height 6}}:combo {:min {:width 4 :height 3} :default {:width 12 :height 6}}:sankey {:min {:width 4 :height 3} :default {:width 16 :height 10}}