-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to combine bar and line in same chart? #258
Comments
Hey @jannejava -- yes this should be possible if I understand you correctly. Below is a quick test I spun up using the example app inside this repo. You can provide multiple {({ points, chartBounds }) => (
<>
<Bar
points={points.sales}
chartBounds={chartBounds}
animate={{ type: "spring" }}
/>
<Line
points={points.sales}
curveType={curveType}
color={colors.stroke!}
strokeWidth={strokeWidth}
animate={{ type: "spring" }}
/>
<Scatter
radius={scatterRadius}
points={points.sales}
animate={{ type: "spring" }}
color={colors.scatter!}
/>
</>
)} |
I don't think we support multiple y-axes yet sorry! Feel free to make an issue requesting that and I can tag it as an enhancement/see where it fits on the roadmap. |
Closing since we addressed the initial issue! |
Question
Is it possible to combine bars and a line in the same chart. Eg I would like to show energy consumption as bars for each day and at the same time show temperatures as a line. In this way to can see if there is a correlation.
Background Info/Attempts
Tried bar groups and also adding line to chartesian chart with no luck.
Scanned the internet and documentation for examples too.
Thanks in advance!
The text was updated successfully, but these errors were encountered: