0
votes

I've got a dashboard with a ChartRangeFilter and a LineChart in my JSF page. before I added the dashboard and filter, my clear chart function using chart.clear() worked fine on the LineChart alone, now however I can't get rid of the ChartRangeFilter. I'm hacking it with location.reload(), but I'd love to find a neater solution.

Thanks

Tom

1

1 Answers

0
votes

If you want to remove them, you could do:

 var node= document.getElementById('dashboard');
 while (node.hasChildNodes()) {
     node.removeChild(node.lastChild);
 }  

If you only want to hide them:

 var node= document.getElementById('dashboard');
 for(var i=0;i<node.children.length;i++){
     node.children[i].style.display='none';
 }