Sign in to follow this  
whatthewhat

Javascript Error On Missing Data

Recommended Posts

Wow, so this couldn't be more simple of an example, yet Fusioncharts barfs.

 

I'm doing a chart of type: StackedColumn2D

 

With data: { "chart": {"showlegend": "1", "bgColor": "FFFFFF", "showborder": "0", "borderColorXXX": "343434", "showlabels": "1", "showvalues": "1", "showsum": "1", "decimals": "0", "legendborderalpha": "0", "palette": "2" , "ed": "rules", "yaxisname": "(Number of Calls)"}, "categories": [{"category": [{"value": "1353196800000"}, {"value": "1353283200000"}, {"value": "1353369600000"}, {"value": "1353456000000"}, {"value": "1353542400000"}, {"value": "1353628800000"}, {"value": "1353715200000"}, {"value": "1353801600000"}, {"value": "1353888000000"}, {"value": "1353974400000"}, {"value": "1354060800000"}, {"value": "1354147200000"}, {"value": "1354233600000"}, {"value": "1354320000000"}, {"value": "1354406400000"}, {"value": "1354492800000"}, {"value": "1354579200000"}, {"value": "1354665600000"}, {"value": "1354752000000"}, {"value": "1354838400000"}, {"value": "1354924800000"}, {"value": "1355011200000"}, {"value": "1355097600000"}, {"value": "1355184000000"}, {"value": "1355270400000"}, {"value": "1355356800000"}, {"value": "1355443200000"}, {"value": "1355529600000"}, {"value": "1355616000000"}, {"value": "1355702400000"}, {"value": "1355788800000"}]}], "dataset": [{"seriesname": "Bad Calls", "color": "#FF0000", "showvalues": "0", "data": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}, {"seriesname": "Good Calls", "color": "#00FF00", "showvalues": "0", "data": [{}, {}, {}, {"value": "2"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {"value": "2"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}] }

 

I get this error: TypeError:z is undefined on line 501 in FusionChartsHC.js

 

If I put "value": "1" into the empty {} then it works.

 

It seems to me this should be working, not that Fusioncharts has any current examples. Why XML would be listed as the default everywhere is stupid. Also, it seems like I could write the structure with "set" tags but from the link below it seems this should work

 

 

http://docs.fusioncharts.com/widgets/Contents/Advanced/DiscData.html

Share this post


Link to post
Share on other sites

Hi,

 

As you are using StackedColumn2D, so you have to start the series for fist series,

and first series is having no value then it gives error (looking for that in detail)

 

 

Below code is working,

{ "chart": {"showlegend": "1", "bgColor": "FFFFFF", "showborder": "0", "borderColorXXX": "343434", "showlabels": "1", "showvalues": "1", "showsum": "1", "decimals": "0", "legendborderalpha": "0", "palette": "2" , "ed": "rules", "yaxisname": "(Number of Calls)"}, "categories": [{"category": [{"value": "1353196800000"}, {"value": "1353283200000"}, {"value": "1353369600000"}, {"value": "1353456000000"}, {"value": "1353542400000"}, {"value": "1353628800000"}, {"value": "1353715200000"}, {"value": "1353801600000"}, {"value": "1353888000000"}, {"value": "1353974400000"}, {"value": "1354060800000"}, {"value": "1354147200000"}, {"value": "1354233600000"}, {"value": "1354320000000"}, {"value": "1354406400000"}, {"value": "1354492800000"}, {"value": "1354579200000"}, {"value": "1354665600000"}, {"value": "1354752000000"}, {"value": "1354838400000"}, {"value": "1354924800000"}, {"value": "1355011200000"}, {"value": "1355097600000"}, {"value": "1355184000000"}, {"value": "1355270400000"}, {"value": "1355356800000"}, {"value": "1355443200000"}, {"value": "1355529600000"}, {"value": "1355616000000"}, {"value": "1355702400000"}, {"value": "1355788800000"}]}], "dataset": [{"seriesname": "Bad Calls", "color": "#FF0000", "showvalues": "0", "data": [{"value":"2"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}, {"seriesname": "Good Calls", "color": "#00FF00", "showvalues": "0", "data": [{"value":"2"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}] }

 

post-28409-0-34200900-1355900899_thumb.png

Share this post


Link to post
Share on other sites
Guest Sumedh

Wow, so this couldn't be more simple of an example, yet Fusioncharts barfs.

 

I'm doing a chart of type: StackedColumn2D

 

With data: { "chart": {"showlegend": "1", "bgColor": "FFFFFF", "showborder": "0", "borderColorXXX": "343434", "showlabels": "1", "showvalues": "1", "showsum": "1", "decimals": "0", "legendborderalpha": "0", "palette": "2" , "ed": "rules", "yaxisname": "(Number of Calls)"}, "categories": [{"category": [{"value": "1353196800000"}, {"value": "1353283200000"}, {"value": "1353369600000"}, {"value": "1353456000000"}, {"value": "1353542400000"}, {"value": "1353628800000"}, {"value": "1353715200000"}, {"value": "1353801600000"}, {"value": "1353888000000"}, {"value": "1353974400000"}, {"value": "1354060800000"}, {"value": "1354147200000"}, {"value": "1354233600000"}, {"value": "1354320000000"}, {"value": "1354406400000"}, {"value": "1354492800000"}, {"value": "1354579200000"}, {"value": "1354665600000"}, {"value": "1354752000000"}, {"value": "1354838400000"}, {"value": "1354924800000"}, {"value": "1355011200000"}, {"value": "1355097600000"}, {"value": "1355184000000"}, {"value": "1355270400000"}, {"value": "1355356800000"}, {"value": "1355443200000"}, {"value": "1355529600000"}, {"value": "1355616000000"}, {"value": "1355702400000"}, {"value": "1355788800000"}]}], "dataset": [{"seriesname": "Bad Calls", "color": "#FF0000", "showvalues": "0", "data": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}, {"seriesname": "Good Calls", "color": "#00FF00", "showvalues": "0", "data": [{}, {}, {}, {"value": "2"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {"value": "2"}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}] }

 

I get this error: TypeError:z is undefined on line 501 in FusionChartsHC.js

 

If I put "value": "1" into the empty {} then it works.

 

It seems to me this should be working, not that Fusioncharts has any current examples. Why XML would be listed as the default everywhere is stupid. Also, it seems like I could write the structure with "set" tags but from the link below it seems this should work

 

 

http://docs.fusionch...d/DiscData.html

 

 

Hi,

 

We are looking into this issue. And we will update you on the same.

 

As a temporary work-around, you can use "showSum" attribute as "0" under the chart element.

 

Ref. Code:

<chart ... showSum='0'>

Share this post


Link to post
Share on other sites

Great, thanks. Your data does work, but supplying a data value for the first entry in each series doesn't. It seems like it needs a couple or more data points per series.

 

Hi,

 

We are looking into this issue. And we will update you on the same.

 

As a temporary work-around, you can use "showSum" attribute as "0" under the chart element.

 

Ref. Code:

<chart ... showSum='0'>

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

This has been identified as an issue with JavaScript chart already. And it has been fixed internally also.

 

The fix would be available in the next service release version.

 

However, we are unable to commit any time-line for this.

 

Thanks for your time and support.

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