Recharts: Nothing displayed when data array is empty

Created on 9 Nov 2016  Â·  3Comments  Â·  Source: recharts/recharts

Currently nothing gets rendered if data is an empty array. Is there a way to have it either display an empty chart or have a chart with a message such as "No data to display"?

Most helpful comment

Fair enough, but what about nothing rendering when the data array is empty?
Wouldn't it be better to render an empty graph?

On Wed, Nov 9, 2016 at 7:15 PM xile611 [email protected] wrote:

Closed #334 https://github.com/recharts/recharts/issues/334.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/recharts/recharts/issues/334#event-853919595, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACNrMoSQOcpquvetZVafRJlCH3C5YPpHks5q8oxMgaJpZM4KuFCt
.

All 3 comments

@FabioFleitas Such empty message could be very different. So It's recommended to write the message yourself, because you can judge whether the data is empty.

Fair enough, but what about nothing rendering when the data array is empty?
Wouldn't it be better to render an empty graph?

On Wed, Nov 9, 2016 at 7:15 PM xile611 [email protected] wrote:

Closed #334 https://github.com/recharts/recharts/issues/334.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/recharts/recharts/issues/334#event-853919595, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACNrMoSQOcpquvetZVafRJlCH3C5YPpHks5q8oxMgaJpZM4KuFCt
.

@FabioFleitas The problem is that nothing can be rendered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amitava82 picture amitava82  Â·  3Comments

abhayjeetgupta picture abhayjeetgupta  Â·  3Comments

jetpack3331 picture jetpack3331  Â·  3Comments

adrianmcli picture adrianmcli  Â·  3Comments

alexandersoto picture alexandersoto  Â·  3Comments