I want to set the width of the line to 0 in Line chat if the data is 0.
My code:
var data = [
{ “A”:“15.9”, “B”:21, “C”:31,year:“1” },
{ “A”:“13.8”, “B”:23, “C”:32, year:“2” },
{ “A”:“13.4”, “B”:23, “C”:33, year:“3” },
{ “A”:“14.1”, “B”:23, “C”:33, year:“4” },
{ “A”:“14.3”, “B”:24, “C”:34, year:“5” },
{ “A”:“15.9”, “B”:25, “C”:35, year:“6” },
{ “A”:“16.1”, “B”:27, “C”:36, year:“7” },
{ “A”:“16.5”, “B”:23, “C”:34, year:“8” },
{ “A”:“15.2”, “B”:25, “C”:33, year:“9” },
{ “A”:“14.8”, “B”:26, “C”:32, year:“10” },
];
window.onload = function(){
var chart1 = new dhtmlXChart({
view:"spline",
container:"chart1",
value:"#A#",
item:{
borderColor: "#3399ff",
color: "#ffffff"
},
line:{
color:"#3399ff",
width:3
},
xAxis:{
template:"#year#",
lines:true,
title:'Age (Years)'
},
yAxis:{
start:12,
step:1,
end:38,
lines:true,
title:'BMI'
},
padding:{
left:50,
bottom:40
},
origin:0,
})
chart1.addSeries({
value:"#B#",
item:{
borderColor: "#66cc00",
color: "#ffffff"
},
line:{
color:"#66cc00",
width:3
}
})
chart1.addSeries({
value:"#C#",
item:{
borderColor: "#66cc00",
color: "#ffffff"
},
line:{
color:"#66cc00",
width:3
}
})
chart1.parse(data,"json");
}
Is it possible???