-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Empty data is causing chart to break #142
Comments
This is UI-specific and in my opinion should be handled on your end. For instance, you can test |
There are few more things here. Lets take the below timeline of events.
Like you have suggested, i can handle it in the UI. Everyone who implements or encounters such situation have to implement this placeholder message by themselves. Instead, if we can handle it in the Library itself then everyone can get benefited from it and library is more defensive. Lets go with placeholder approach
I'd recommend to implement this feature within the library itself so that library is more defensive to such runtime problems. |
can we provide this solution, it really helps wider audience. |
There will not be a placeholder by default in morris.js it's up to you to provide a meaningful message to your users that fits the formatting of your site. However, if there's an issue where an empty data object breaks the chart with setData, then we should fix that. |
The idea is to make sure that the library doesn't break when there is empty chart data. Possible solutions can be either to show a placeholder message or show a empty graph. (or any other solution which makes the library usable after empty dataset is passed to it) |
+1 for nareshv sugestion, it's very usefull. |
Is there a setting, option or way to just render the empty graph if no data? My use case is a "30 day earnings" line chart, and if there are no earnings, there are no earnings, and it should still reflect that. |
Very good library. Thanks for creating.
I have faced an issue. For some of the time series data there are no results and its causing the chart not to render anything
Its helpful to show a message (configurable) when the chart is rendered but without any data
See http://jsbin.com/otaxef/35/edit for the problem
This is needed mostly when we are using .setData() function to render the chart from dynamically fetched data from server.
The text was updated successfully, but these errors were encountered: