1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
var chart1 = new dojox.charting.DataChart("container", {
comparative:true
});
chart1.addAxis("x", {
min: data[0].min,
max: data[0].max,
majorTick: {
stroke: "black",
length: 10
},
minorTick: {
stroke: "gray",
length: 5
}
});
chart1..addAxis("y", {
vertical: true,
min: data[0].min,
max: data[0].max,
majorTick: {
stroke: "black",
length: 10
},
minorTick: {
stroke: "gray",
length: 5
}
});
var legend ;
dojo.xhrGet({
url: "GetTimeSubtool.php",
handleAs: "json",
content:{
subtoolId: id1
},
load: function(data){
chart1.addSeries("Serie1", data).render();
dojo.xhrGet({
url: "GetTimeSubtool.php",
handleAs: "json",
content:{
subtoolId: id2
},
load: function(data){
chart1.addSeries("Serie 2",data).render();
legend = new dojox.charting.widget.Legend({chart: chart1, horizontal: true}, "legend");
}
});
}
}); |
Partager