From 8ebcd11979aa53a03888a5849dc2d11c9b102f35 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Tue, 1 Apr 2025 17:17:38 -0600 Subject: [PATCH] change colors --- .../hooks/useChartSpecificOptions/labelOptionConfig.ts | 2 +- .../BusterChartJS/hooks/useSeriesOptions/barSeriesBuilder.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/labelOptionConfig.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/labelOptionConfig.ts index b19a1cef8..5d1ebc6fa 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/labelOptionConfig.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useChartSpecificOptions/labelOptionConfig.ts @@ -4,7 +4,7 @@ import { isServer } from '@tanstack/react-query'; const backgroundColor = isServer ? '#e6e6e6' - : getComputedStyle(document.documentElement).getPropertyValue('--color-background'); + : getComputedStyle(document.documentElement).getPropertyValue('--color-page-background'); const borderColor = isServer ? '#e0e0e0' diff --git a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/barSeriesBuilder.ts b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/barSeriesBuilder.ts index 532d05f18..ed813d8b0 100644 --- a/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/barSeriesBuilder.ts +++ b/web/src/components/ui/charts/BusterChartJS/hooks/useSeriesOptions/barSeriesBuilder.ts @@ -37,6 +37,7 @@ export const barSeriesBuilder = ({ (dataset) => !dataset.hidden && !dataset.isTrendline ); const canDisplay = context.datasetIndex === shownDatasets.length - 1; + console.log('hit!'); if (canDisplay && !hasBeenDrawn) { const chartLayout = context.chart.options.layout; const padding = { ...DEFAULT_CHART_LAYOUT.padding, top: 24 }; @@ -62,6 +63,8 @@ export const barSeriesBuilder = ({ }, anchor: 'end', align: 'end', + clamp: true, + clip: false, ...defaultLabelOptionConfig } as NonNullable['stackTotal']; }