Hi i am using D3 Dashboard chart.
This is my reference D3 Dashboard Chart.
https://plnkr.co/edit/Q8OqJF3pOt8eGmwlreaf?p=preview
Here all the data's are coming from variable. For my usage I want to get the data from json file. I have changed that also.
But the filter function is not working here. "if i clicked the pie chart, the data is not filtered. if i hard code the filter value means it will filter as per the pie chart value" can any one tell me how to correct my mistake.
Here is my plunker code.
https://plnkr.co/edit/fAl9l9INrFmxO94yHaV4?p=preview
d3.json("d1.json", function(datasetBarChart){
// set initial group value
var group = "MAB"; // if i changed group value as per the pie chart it will filter in the bar chart.
function datasetBarChosen(group) {
debugger;
var ds = [];
for (x in datasetBarChart) {
if(datasetBarChart[x].group==group){
ds.push(datasetBarChart[x]);
}
}
return ds;
}
Thanks