Skip to content

Commit

Permalink
Merge pull request #445 from bento-platform/chore/new-bento-charts
Browse files Browse the repository at this point in the history
chore: update bento-charts to 2.9.0
  • Loading branch information
davidlougheed authored Sep 11, 2024
2 parents d89af3b + f9b6b8b commit 2ffa3df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"ansi_up": "^6.0.2",
"antd": "^5.20.6",
"bento-auth-js": "^6.0.1",
"bento-charts": "~2.6.8",
"bento-charts": "~2.9.0",
"cross-fetch": "^4.0.0",
"dayjs": "^1.11.13",
"file-saver": "^2.0.5",
Expand Down
4 changes: 2 additions & 2 deletions src/components/charts/Histogram.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import PropTypes from "prop-types";
import { BarChart } from "bento-charts";
import { Histogram as BentoHistogram } from "bento-charts";
import ChartContainer from "./ChartContainer";

const transformAgeData = (data) => data && data.map(({ ageBin, count }) => ({ x: ageBin, y: count }));
Expand All @@ -10,7 +10,7 @@ const Histogram = ({ title = "Histogram", data = [], chartHeight = 300, unit = "

return (
<ChartContainer title={title} empty={!Array.isArray(data) || !data.length}>
<BarChart data={transformedData} height={chartHeight} removeEmpty={false} units={unit} />
<BentoHistogram data={transformedData} height={chartHeight} removeEmpty={false} units={unit} />
</ChartContainer>
);
};
Expand Down

0 comments on commit 2ffa3df

Please sign in to comment.