Hi, Im new to OFC, i tried a sample of creating a chart which is working fine,
here is the code working for me
var so = new SWFObject("open-flash-chart.swf","chart1",'100%','80%',"1.2.3","BLACK");
so.addVariable("data-file", "scripts/graph/data-2.txt");
so.write("chart");
where data-2.txt contain json data
my question is i need to give the input as a json string not the file,
i tried using addVariables to SWFObject as follows
Hi, Im new to OFC, i tried a sample of creating a chart which is working fine,
here is the code working for me
var so = new SWFObject("open-flash-chart.swf","chart1",'100%','80%',"1.2.3","BLACK");
so.addVariable("data-file", "scripts/graph/data-2.txt");
so.write("chart");
where data-2.txt contain json data
my question is i need to give the input as a json string not the file,
i tried using addVariables to SWFObject as follows
so.addVariable("variables","true");
so.addVariable("x_axis","{steps:4}");
so.addVariable("title",'{"text":"Portreath beach","style":"{color: #736AFF; font-size: 25;}"}"');
so.addVariable("x_legend",'{"text": "Waves in Feburary","style": "{color: #736AFF; font-size: 25;}"}');
so.addVariable("y_legend",'{"text": "Wave height (cm)","style": "{color: #736AFF; font-size: 15;}"}');
so.addVariable("elements",'[{"type":"line","colour": "#87421F","width": 3,"values" : [1.5,1.69,1.88,2.06,2.21,2.34,2.43,2.48,2.49,2.47,2.40,2.30,2.17,2.01,1.83,1.64,1.44,1.24,1.05,0.88,0.74,0.62,0.54,0.50,0.50,0.54,0.61,0.72,0.86,1.03,1.22,1.41,1.61,1.81,1.99,2.15,2.29,2.39,2.46,2.49]}]');
so.addVariable("y_axis",'{"max": 3,"colour": "#FF0000","grid-colour": "#FF0000"}');
so.addVariable("bg_colour",'#E0E0FF');
but it didnt work for me,
do we have any option of giving straightly json string instead of a file path.. if yes please help me in this..
awaiting for replies
Thanks
Vijay