Skip to content

Commit

Permalink
feat ⚡️: adjust xScale on grouped bar charts
Browse files Browse the repository at this point in the history
  • Loading branch information
squiles committed Dec 10, 2024
1 parent 5d2b5fb commit f291994
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/charts/bar/bars-grouped-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ const useBarsGroupedState = (
) ?? 0,
0
);
const xScale = scaleLinear().domain([maxValue, minValue]).nice();
const xScale = scaleLinear().domain([minValue, maxValue]).nice();

const minPaddingValue = getMinX(paddingData, (d) =>
getXErrorRange ? getXErrorRange(d)[0] : getX(d)
Expand Down Expand Up @@ -352,7 +352,7 @@ const useBarsGroupedState = (
yScaleInteraction.range([0, chartHeight]);
yScaleIn.range([0, yScale.bandwidth()]);
yScaleTimeRange.range([0, chartHeight]);
xScale.range([chartWidth, 0]);
xScale.range([0, chartWidth]);

const isMobile = useIsMobile();

Expand Down

0 comments on commit f291994

Please sign in to comment.