Sign in to follow this  
knalli

How To Handle "empty Chart" / "no Data" Situations Properly

Recommended Posts

Hi,

 

we use in our application several different charts (of all three libraries: FusionCharts, Widgets, and Power) in dedicated areas or in aggregations like dashboards. Because of generalization, all charts are be configured with parameters like PBarLoadingText, XMLLoadingText, ParsingDataText, ChartNoDataText, RenderingChartText, LoadDataErrorText, InvalidXMLText. This works fine incases of errors, and so on.

 

However, some SWFs -- Widgets like Gauge or Circle -- won't use this but will only render a, well, ugly chart. The x/y axis is bad, sometimes all is grey.. because of a missing value as we render a chart xml without a <value> tag. (Example http://www.fusioncharts.com/demos/gallery/gauges/chart.asp?id=cylinder_9)

 

So, in order to fix this, I would to know what is the best practice (hopefully a common way, otherwise a chart-by-chart way) to fulfill following conditions for custom error messages:

 

1. If chart data is available, render it. (This work's fine.).

2. If no chart data is available (let's say, i.e., the "current cpu usage" is not available) it should present either only a text box with an error message (perhaps a text string which is provided via the remote xml) or a chart but with an additional, _overlaying_ text box.

3. If the chart is invalid (let's say, i.e., there is no metric "current cpu usage") it should present another text.

 

If the server will return a simple 404 on an error, this would be acceptable in most cases.. but not, if a dashboard construction cannot guarantee that a chart could have be no data (and therefor should be render a custom error message).

 

We generate the xml completely server side which means we have the whole xml generation under control. I tried using annotations but they will be displayed behind the chart (lower z-index). Additionally, they have to be rendered width-independently.

 

Maybe someone has an idea how to archive this..?

Edited by knalli

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this