Hi,
I have a chart where I add two series to it. I want to remove a serie when I click on a button, but I have read that it wasn’t possible. So What i will do is repaint the graph without adding the second serie.
when I click on a button it call a function that I made:
function filter(cat,color){
chart.clearAll();
chart = createChart(cat,color);
chart.load("../../../ProcessDescriptor/descriptor/L2/HRB/HRB_grafiek_woon_werk_provwoonpl_cat.xml");
}
this will clear my previous chart and will recreate my chart calling the function createChart():
[code]function createChart(cat,colorBar){
chart = new dhtmlXChart({
view: “bar”,
container: document.getElementById(“chart1”),
value: “#”+cat+“#”,
color: colorBar,
width: 40,
label: “#”+cat+“#”,
tooltip: {template: "#"+cat+"#"}
,xAxis: { width: 120,template: "#cprov_rr#",title:"Aantallen per provincie van de woonplaats" }
,legend: { width: 20,
align: "center",
valign: top,
marker: {type: "round",
width: 10},
values: [{text: "Offr", color: "#FF0000"},
{text: "OOffr", color: "#6699FF"},
{text: "Vrijw", color: "#FFFF66"}
]}
});
return chart;
}[/code]
Now I don’t add the two series. It works a bit, but not everything. I see the tooltip and the label of the bars like I want, but the bars itself doesn’t appear. See picture docs.google.com/file/d/0B3-Cnf0 … 001elVxN3c