Recharts: Chart break (leave gap) when data is null

Created on 22 May 2017  路  3Comments  路  Source: recharts/recharts

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Leave a gap if the data is null

http://jsfiddle.net/ktwfp03m/5/

What is the expected behavior?

Drawing continuous line
Look like this http://jsfiddle.net/ktwfp03m/6/

Bug

Most helpful comment

Why was this reverted? This is also happening for bar charts - is there a way to stop the chart from breaking for stacked bar charts?

All 3 comments

I found that there is a support for connectNulls props for Area, Line but it doesn't look same as it should be when data is 0, supposed to look like expected behavior jsfiddle

@chin-idean When use connectNulls for Line or Area, If the second point is Null, we'll skip the second point, and connect the first point and the third point now, just like the behavior of Area.
There's some bug of connectNulls of Line now.

In you case, it's recommended to fill 0 for null entries before added to charts.

Why was this reverted? This is also happening for bar charts - is there a way to stop the chart from breaking for stacked bar charts?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scottdickerson picture scottdickerson  路  3Comments

adrianmcli picture adrianmcli  路  3Comments

sdoomz picture sdoomz  路  3Comments

FabioFleitas picture FabioFleitas  路  3Comments

amitava82 picture amitava82  路  3Comments