Skip to content

Commit

Permalink
fix: stackoffset
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Oct 30, 2023
1 parent 26f1fcb commit ccbfda3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/chart-elements/BarChart/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
XAxis,
YAxis,
} from "recharts";
import { AxisDomain } from "recharts/types/util/types";

import BaseChartProps from "../common/BaseChartProps";
import ChartLegend from "../common/ChartLegend";
Expand All @@ -21,6 +20,7 @@ import NoData from "../common/NoData";
import { constructCategoryColors, deepEqual, getYAxisDomain } from "../common/utils";

import { BaseColors, defaultValueFormatter, themeColorRange } from "lib";
import { AxisDomain } from "recharts/types/util/types";

const renderShape = (
props: any,
Expand Down Expand Up @@ -142,7 +142,7 @@ const BarChart = React.forwardRef<HTMLDivElement, BarChartProps>((props, ref) =>
{data?.length ? (
<ReChartsBarChart
data={data}
stackOffset={relative || stack ? "sign" : "none"}
stackOffset={stack ? "sign" : relative ? "expand" : "none"}
layout={layout === "vertical" ? "vertical" : "horizontal"}
onClick={
hasOnValueChange && (activeLegend || activeBar)
Expand Down

0 comments on commit ccbfda3

Please sign in to comment.