var chart = sb . chart . render ( "#chartWrap" , {
data : {
types : {
data1 : "scatter" ,
data2 : "line"
},
xs : {
data1 : "data1_x" ,
data2 : "data2_x"
},
columns : [
[ "data1_x" , 3.5 , 3.6 , 3.4 , 3.8 , 3.2 , 3.3 , 3.2 , 3.5 , 3.6 , 2.9 , 3.0 , 3.1 , 3.1 , 3.0 , 3.3 , 3.7 , 2.9 , 3.3 , 3.6 , 3.5 , 3.1 , 3.3 , 3.7 , 3.4 ],
[ "data2_x" , 2.1 , 2.4 , 2.7 , 2.2 , 2.7 , 3.0 , 2.8 , 2.3 , 2.4 , 2.6 , 2.9 , 2.5 , 3.1 , 2.7 , 2.4 , 2.2 , 2.8 , 2.7 , 2.4 , 3.7 , 2.9 , 2.6 , 2.4 , 2.5 ],
[ "data1" , 1.1 , 1.0 , 1.6 , 1.4 , 1.3 , 1.1 , 1.5 , 1.1 , 1.5 , 1.1 , 1.0 , 1.5 , 1.2 , 1.7 , 0.9 , 1.3 , 1.1 , 0.9 , 1.3 , 1.2 , 1.0 , 1.4 , 1.5 , 1.2 ],
[ "data2" , 2.0 , 2.2 , 2.4 , 2.3 , 1.6 , 2.1 , 1.9 , 2.2 , 1.6 , 1.9 , 1.8 , 2.0 , 2.2 , 1.7 , 2.2 , 1.9 , 2.1 , 1.7 , 1.7 , 2.0 , 1.7 , 2.3 , 1.9 , 1.8 ]
]
},
});
document . getElementById ( "txtColumns" ). onchange = function () {
chart . data ({
columns : JSON . parse ( this . value )
}). render ();
};