Open joaovfabri opened 1 day ago
Hey, sorry that this is still an issue. That issue was a closed a long time ago before any of the current maintainers were around.
Reproduction https://codesandbox.io/p/sandbox/simple-line-chart-forked-tl8mw4
Looks like the intention is that a dot should be rendered if there is one datapoint. The problem being one data point is different than many datapoints with only 1 of them having a Y value
Don't see any issue with Bar chart https://codesandbox.io/p/sandbox/simple-line-chart-forked-9f449v
Hey! that's a lightning fast response, thanks a lot for that. It can be a problem as well when a set of points for a line contains multiple Nulls and a single point in between, like
{ varX: "Mon", varY: 10 },
{ varX: "Tue", varY: 8 },
{ varX: "Wed", varY: 5 },
{ varX: "Thu" },
{ varX: "Fri" },
{ varX: "Sat", varY: 10 },
{ varX: "Sun" },
I believe if you are using the dot
prop the dot will show in that case. If you are not using the dot prop I'm not sure what to do there - If you want those lines connected you can use connectNulls, otherwise it's just a point (without a dot) that isn't connected to anything.
Open to suggestions I guess.
Will look at this again tomorrow (it's late my time). Thanks!
with dot
Do you want to request a feature or report a bug?
What is the current behavior?
Current Version of Recharts (2.12.7) still presents a bug identical to the one reported in this issue #149.
Rendering an Area / Bar chart with isolated points (not only with single data points) will not display any representation in the chart for that point.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar (template: https://codesandbox.io/p/sandbox/simple-line-chart-v25dl4).
Reproduction is the same as mentioned issue, #149
What is the expected behavior?
Similar libraries will represent these points with e.g. lines coming from the x axis and back:
Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?
(2.12.7) Any browser