Thanks a lot!
Well I am binding chart at code behind .
I have four Collections Hour , Weekly , Monthly , Yearly and inside view I have one chart control and four buttons on each button click I change the ItemSource property of the chart.
I call this method on each click and my view bind the chart with four different collections.
public void OnFilterGraphByType()
{
switch (FilterType)
{
case "Daily":
this.BindingContext = MyWellness.VMViewModelStatic.Temperature_HourData;
break;
case "Weekly":
this.BindingContext = MyWellness.VMViewModelStatic.Temperature_WeekData;
break;
case "Monthly":
this.BindingContext = MyWellness.VMViewModelStatic.Temperature_MonthData;
break;
case "Yearly":
this.BindingContext = MyWellness.VMViewModelStatic.Temperature_YearData;
break;
}
}
If I use your technique it works perfect but I have different data on each filter that's why I have four collections
Right now on Add and update methods I am using Messaging of xamarin forms to achieve the result but I would love to have automatic mechanism because I have 10 different charts in my app.
Thanks.