Thursday, 15 July 2010

javascript - How to use stack area High chart using Dynamic values? -


This is my code whore I have to bring compdata = new array () data on

 ; Compdata = '& lt;? Php echo $ compdata; ? & Gt; '; Compdata = JSON.parse (compdata); Var dlen = compdata.length; Var Seamename = New Array (); Var CMDT = new array (); Var crank = []; War emetshare = new array (); I = 0; (The key in Compdata) for {cmname [i] = compdata [key] .MFG_NAME; Cmdate [i] months.name = (new date (compdata [key] .cal_wid) .getMonth ()) + "-" + new date (compdata [key] .cal_wid) .getFullYear (); Mktshare [i] = parseFloat (compdata [key] .MKT_SHARE); I ++; } Alert (semaphore); Alert (CMDT); Alerts (amketshare);  

Alert I am getting value as below:

  cmname for new APC, MSD, RBC // March 2013 April 2013 August 2013 For the cmdate for October // 2013 // 1,2,5,7 mktshare  

I need to display these values ​​and show it in graph http: //www.highcharts.com/demo/area-stacked

The link here should be js-fiidle

in the X-axis cmdate Y-axis should be mktshare and countries like Asia, Africa, Europe, etc. that should be replaced by cmname i.e. New APC, MSD, RBC < / Code> In my case

The problem where I am unable to give X-axis, Y-axis and cmname

Thanks in advance


No comments:

Post a Comment