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

manishjohar picture manishjohar  路  3Comments

patientplatypus picture patientplatypus  路  3Comments

p2227 picture p2227  路  3Comments

alexandersoto picture alexandersoto  路  3Comments

alexliu-github picture alexliu-github  路  3Comments