Bug Workaround for JS Charts Error: Not enough data to display chart

If you get this alert using JSCharts, here's a quick hack to fix it:

nullData = new Array( ); myChart.setDataArray(nullData,"null");

Add these 2 lines to your javascript.

Basically, if the first data set has only 1 data point, JSCharts will fire the alert. If it has 0 or 2+ data points, it won't. This fix creates an empty data series which disables this alert.



Posted 02/16/2010
blog comments powered by Disqus