From 931886526c1e767e5f9da1020a0d91cd04c19675 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Mon, 7 Jul 2025 13:34:52 -0600 Subject: [PATCH 1/2] Delete .nvmrc --- apps/web/.nvmrc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 apps/web/.nvmrc diff --git a/apps/web/.nvmrc b/apps/web/.nvmrc deleted file mode 100644 index 44e031ba9..000000000 --- a/apps/web/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -22.2.0 From 6323c96467d035780ec8659598672dc118354be5 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Mon, 7 Jul 2025 13:59:55 -0600 Subject: [PATCH 2/2] update defaults for web --- .../stories/BusterChart.BarChart.stories.tsx | 54 +++++--- .../BusterChart.ComboChart.stories.tsx | 3 +- .../stories/BusterChart.LineChart.stories.tsx | 120 ++++++++++++------ apps/web/src/mocks/metric.ts | 3 +- 4 files changed, 120 insertions(+), 60 deletions(-) diff --git a/apps/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx b/apps/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx index fd1ce303a..75731666e 100644 --- a/apps/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx +++ b/apps/web/src/components/ui/charts/stories/BusterChart.BarChart.stories.tsx @@ -172,7 +172,8 @@ export const WithCategory: Story = { barAndLineAxis: { x: ['region'], y: ['sales'], - category: ['product'] + category: ['product'], + tooltip: null }, columnLabelFormats: { region: { @@ -216,7 +217,8 @@ export const WithCategoryAndMultipleYAxis: Story = { barAndLineAxis: { x: ['region'], y: ['sales', 'units'], - category: ['product'] + category: ['product'], + tooltip: null }, columnLabelFormats: { region: { @@ -263,7 +265,8 @@ export const DateXAxis: Story = { barAndLineAxis: { x: ['date'], y: ['sales', 'units'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { date: { @@ -300,7 +303,8 @@ export const HorizontalBar: Story = { barAndLineAxis: { x: ['category'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { category: { @@ -342,7 +346,8 @@ export const WithDataLabels: Story = { barAndLineAxis: { x: ['category'], y: ['sales', 'units'], - category: [] + category: [], + tooltip: null }, columnSettings: { sales: { @@ -394,7 +399,8 @@ export const WithDataLabelsAndStackTotal: Story = { barAndLineAxis: { x: ['category'], y: ['units', 'sales'], - category: [] + category: [], + tooltip: null }, barGroupType: 'stack', barShowTotalAtTop: true, @@ -495,7 +501,8 @@ export const LargeDataset: Story = { barAndLineAxis: { x: ['category'], y: ['sales', 'units', 'returns'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { category: { @@ -534,7 +541,8 @@ export const LargeDatasetWithDualYAxis: Story = { x: ['category'], y: ['sales', 'returns'], y2: ['units'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { category: { @@ -573,7 +581,8 @@ export const WithSorting: Story = { barAndLineAxis: { x: ['category'], y: ['sales'], - category: [] + category: [], + tooltip: null }, barSortBy: ['asc'] } @@ -589,7 +598,8 @@ export const WithDatesInXAxis: Story = { barAndLineAxis: { x: ['date'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { date: { @@ -616,7 +626,8 @@ export const WithDatesInXAxisAndSorting: Story = { barAndLineAxis: { x: ['date'], y: ['sales'], - category: [] + category: [], + tooltip: null }, barSortBy: ['asc'], columnLabelFormats: { @@ -645,7 +656,8 @@ export const HorizontalBarWithGoalLine: Story = { barAndLineAxis: { x: ['category'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { category: { @@ -710,7 +722,8 @@ export const GroupedBar: Story = { barAndLineAxis: { x: ['region'], y: ['sales'], - category: ['product'] + category: ['product'], + tooltip: null }, barGroupType: 'group', columnLabelFormats: { @@ -770,7 +783,8 @@ export const PercentageStackedBar: Story = { barAndLineAxis: { x: ['region'], y: ['sales'], - category: ['product'] + category: ['product'], + tooltip: null }, barGroupType: 'percentage-stack', columnSettings: { @@ -830,7 +844,8 @@ export const ExtraLargeDataset: Story = { barAndLineAxis: { x: ['category'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { category: { @@ -871,7 +886,8 @@ export const ExtraLargeDatasetWithCategory: Story = { barAndLineAxis: { x: ['product'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { category: { @@ -1035,7 +1051,8 @@ export const WithMultipleXAxis: Story = { barAndLineAxis: { x: ['month', 'year'], y: ['sales'], - category: [] + category: [], + tooltip: null } satisfies BarAndLineAxis } }; @@ -1137,7 +1154,8 @@ export const ProblematicBarChart: Story = { barAndLineAxis: { x: ['metric_clv_all_time'], y: ['customer_name'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { customer_name: { diff --git a/apps/web/src/components/ui/charts/stories/BusterChart.ComboChart.stories.tsx b/apps/web/src/components/ui/charts/stories/BusterChart.ComboChart.stories.tsx index 02fe9881a..6fbc4046f 100644 --- a/apps/web/src/components/ui/charts/stories/BusterChart.ComboChart.stories.tsx +++ b/apps/web/src/components/ui/charts/stories/BusterChart.ComboChart.stories.tsx @@ -579,7 +579,8 @@ export const ProblematicData: Story = { category: [], x: ['quarter_date'], y: ['metric_discountimpact', 'orders_with_discount'], - y2: [] + y2: [], + tooltip: null }, columnMetadata: [ { diff --git a/apps/web/src/components/ui/charts/stories/BusterChart.LineChart.stories.tsx b/apps/web/src/components/ui/charts/stories/BusterChart.LineChart.stories.tsx index f42ea2ba3..e5ada808a 100644 --- a/apps/web/src/components/ui/charts/stories/BusterChart.LineChart.stories.tsx +++ b/apps/web/src/components/ui/charts/stories/BusterChart.LineChart.stories.tsx @@ -27,7 +27,8 @@ export const Default: Story = { barAndLineAxis: { x: ['date'], y: ['revenue', 'profit', 'customers'], - category: [] + category: [], + tooltip: null }, className: 'resize overflow-auto min-w-[250px] h-[400px]', columnLabelFormats: { @@ -68,7 +69,8 @@ export const AutoDateFormat_TimeIntervalTest_MonthWithForcedUnit_ManyMonths: Sto barAndLineAxis: { x: ['date'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { date: { @@ -124,7 +126,8 @@ export const AutoDateFormat_TimeIntervalTest_MonthWithForcedUnit: Story = { barAndLineAxis: { x: ['date'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { date: { @@ -180,7 +183,8 @@ export const AutoDateFormat_TimeIntervalTest_Days_WithForcedUnit: Story = { barAndLineAxis: { x: ['date'], y: ['sales'], - category: [] + category: [], + tooltip: null }, columnLabelFormats: { date: { @@ -434,7 +438,8 @@ export const NumericXY: Story = { barAndLineAxis: { x: ['score'], y: ['value'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -460,7 +465,8 @@ export const NumericXYThatCorrespondToAMonth: Story = { barAndLineAxis: { x: ['month'], y: ['sales'], - category: [] + category: [], + tooltip: null }, xAxisTimeInterval: 'month', className: 'w-[800px] h-[400px]', @@ -489,7 +495,8 @@ export const CategoricalXNumericY: Story = { barAndLineAxis: { x: ['category'], y: ['value'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -519,7 +526,8 @@ export const MultiYearDate: Story = { barAndLineAxis: { x: ['date'], y: ['value'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px] resize overflow-auto', columnLabelFormats: { @@ -563,7 +571,8 @@ export const MultipleYAxes: Story = { barAndLineAxis: { x: ['date'], y: ['revenue', 'units', 'satisfaction'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -612,7 +621,8 @@ export const UnevenlySpacedDates: Story = { barAndLineAxis: { x: ['date'], y: ['value'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', @@ -651,7 +661,8 @@ export const CloselySpacedDates: Story = { barAndLineAxis: { x: ['date'], y: ['value'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px] resize overflow-auto', columnSettings: { @@ -696,7 +707,8 @@ export const WithCategory: Story = { barAndLineAxis: { x: ['month'], y: ['sales'], - category: ['region'] + category: ['region'], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -781,7 +793,8 @@ export const MultipleYAxesWithCategory: Story = { barAndLineAxis: { x: ['date'], y: ['revenue', 'satisfaction'], - category: ['product'] + category: ['product'], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -830,7 +843,8 @@ export const NumericMonthX: Story = { barAndLineAxis: { x: ['month'], y: ['sales', 'customers'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', @@ -864,7 +878,8 @@ export const PercentageStackedLineSingle: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -897,7 +912,8 @@ export const PercentageStackedLineMultiple: Story = { barAndLineAxis: { x: ['date'], y: ['revenue', 'profit', 'customers'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -930,7 +946,8 @@ export const PercentageStackedLineSingleWithDataLabels: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnSettings: { @@ -968,7 +985,8 @@ export const StackedAreaLineMultipleWithDataLabels: Story = { barAndLineAxis: { x: ['date'], y: ['revenue', 'profit', 'customers'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnSettings: { @@ -1017,7 +1035,8 @@ export const StackedAreaLineSingleWithDataLabels: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnSettings: { @@ -1055,7 +1074,8 @@ export const PercentageStackedLineMultipleWithDataLabels: Story = { barAndLineAxis: { x: ['date'], y: ['revenue', 'profit', 'customers'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnSettings: { @@ -1106,7 +1126,8 @@ export const HasMixedNullAndNumberValuesSingleLineWithMissingDataZero: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnSettings: { @@ -1142,7 +1163,8 @@ export const HasMixedNullAndNumberValuesSingleLineWithMissingDataNull: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnSettings: { @@ -1179,7 +1201,8 @@ export const HasMixedNullAndNumberValuesSingleMultiLine: Story = { barAndLineAxis: { x: ['date'], y: ['revenue', 'profit'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', @@ -1228,7 +1251,8 @@ export const HasNullValuesWithCategoryMultiLine: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: ['category'] + category: ['category'], + tooltip: null }, columnSettings: { revenue: { @@ -1265,7 +1289,8 @@ export const WithTrendline_MaxMinAverageMedian: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1327,7 +1352,8 @@ export const WithTrendline_DateXAxisLinearRegression: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1365,7 +1391,8 @@ export const WithTrendline_NumericalXAxisLinearRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1404,7 +1431,8 @@ export const WithTrendline_StringXAxisLinearRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1454,7 +1482,8 @@ export const WithTrendline_DateXAxisExponentialRegression: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1505,7 +1534,8 @@ export const WithTrendline_NumericalXAxisExponentialRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1555,7 +1585,8 @@ export const WithTrendline_StringXAxisExponentialRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1605,7 +1636,8 @@ export const WithTrendline_DateXAxisLogarithmicRegression: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1656,7 +1688,8 @@ export const WithTrendline_NumericalXAxisLogarithmicRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1706,7 +1739,8 @@ export const WithTrendline_StringXAxisLogarithmicRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1753,7 +1787,8 @@ export const ExponentialDecreaseWithTrendline: Story = { barAndLineAxis: { x: ['date'], y: ['value'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', columnLabelFormats: { @@ -1803,7 +1838,8 @@ export const WithTrendline_DateXAxisPolynomialRegression: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1854,7 +1890,8 @@ export const WithTrendline_NumericalXAxisPolynomialRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1904,7 +1941,8 @@ export const WithTrendline_StringXAxisPolynomialRegression: Story = { barAndLineAxis: { x: ['index'], y: ['revenue'], - category: [] + category: [], + tooltip: null }, className: 'w-[800px] h-[400px]', trendlines: [ @@ -1940,7 +1978,8 @@ export const With2ThousandPoints: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: ['category'] + category: ['category'], + tooltip: null }, columnLabelFormats: { date: { @@ -1960,7 +1999,8 @@ export const With5ThousandPoints: Story = { barAndLineAxis: { x: ['date'], y: ['revenue'], - category: ['category'] + category: ['category'], + tooltip: null }, columnLabelFormats: { date: { diff --git a/apps/web/src/mocks/metric.ts b/apps/web/src/mocks/metric.ts index fae6a01b5..5cb589455 100644 --- a/apps/web/src/mocks/metric.ts +++ b/apps/web/src/mocks/metric.ts @@ -66,7 +66,8 @@ const createMockChartConfig = (id: string): ChartConfigProps => { barAndLineAxis: { x: ['date'], y: ['sales'], - category: [] + category: [], + tooltip: null }, pieChartAxis: { x: ['product'],