Hello
Is it possible to combine different type of chart type on the same graph? any example of code, i have seen an example where you can add two different graphs on same page but i want to be able to add the two charts on the same graph. So far i have managed to get only the two containers displaying properly but not showing the second chart (a line) and i use this code see below
thanks
Xav
code
window.onload = function(){
var chart1 = new dhtmlXChart({
view:“stackedArea”,
container:“chart”,
value:“#sales#”,
color:“#00ccff”,
alpha:0.6,
padding:{
left:30
},
yAxis:{
start:0,
end:1000,
step:100
},
xAxis:{
lines:true,
title:“Assets (in pounds) per month”,
template:“#year#”
},
legend:{
layout:“x”,
width: 75,
align:“center”,
valign:“top”,
marker:{
type:“round”,
width:15
},
values:[
{text:“Spontaneous financing”,color:“#00ccff”},
{text:“Sales”,color:“#0000ff”},
{text:“Trading assets”,color:“#cc33ff”}
]
}
})
chart1.addSeries({
value:“#sales1#”,
color:“#0000ff”
})
chart1.addSeries({
value:“#sales2#”,
color:“#cc33ff”
})
chart1.parse(data,“json”);
var chart2 = new dhtmlXChart({
view:“spline”,
container:“chart”,
value:“#sales#”,
item:{
borderColor: “#ffffff”,
color: “#000000”
},
line:{
color:“#ff9900”,
width:3
},
xAxis:{
template:“'#year#”
},
offset:0,
yAxis:{
start:0,
end:1000,
step:100,
template:function(obj){
return (obj%20?“”:obj)
}
}
})
chart2.parse(dataset,“json”);
}