rans
8 Nov 2012, 7:39 AM
hi,
I am having problem with filtering my chart fields.
I have a chart pie that contain some fields. the user can filtering the chart pie and select which fields he want to see.
the problem is if the pie had 8 fields and now the user selecet only 6 fields, the filtering filter only the data but not filter the fields as well.
for example, if I have the fields
{name:'Asia','data1':9, sex:'Male'},
{name:'Africa','data1':2, sex:'Male'},
{name:'Europe','data1':5, sex:'Female'},
{name:'USA','data1':3, sex:'Male'},
and I want to filter Asia, Africa and Europe, I can still see the USA name fields.
the code:
storeIng.filterBy(function(record,id){
var fieldName = record.get('name')
for(var i = 0; i < fields.length; i++) {
if (fields[i] === fieldName)
return true;
}
return false;
});
I add screen shots as well
3992439925
thanks
ran
I am having problem with filtering my chart fields.
I have a chart pie that contain some fields. the user can filtering the chart pie and select which fields he want to see.
the problem is if the pie had 8 fields and now the user selecet only 6 fields, the filtering filter only the data but not filter the fields as well.
for example, if I have the fields
{name:'Asia','data1':9, sex:'Male'},
{name:'Africa','data1':2, sex:'Male'},
{name:'Europe','data1':5, sex:'Female'},
{name:'USA','data1':3, sex:'Male'},
and I want to filter Asia, Africa and Europe, I can still see the USA name fields.
the code:
storeIng.filterBy(function(record,id){
var fieldName = record.get('name')
for(var i = 0; i < fields.length; i++) {
if (fields[i] === fieldName)
return true;
}
return false;
});
I add screen shots as well
3992439925
thanks
ran