sfChart series binding failure when chart is located on any TabItemExt other than the first.
I am implementing an application which implements a UserControl as a window in a DocumentContainer (MDI Mode) .
Attachment: ChartInTabControl_7e0cce9a.zip
The UserControl is a TabControlExt which consists of two TabExtItems.
I need to display two SfCharts (one on each tab) which are updated by a timer tick.
When both the charts are placed on the first TabExtItems 'Tab' the databinding of the chart works perfectly.
However, when either one or both charts are moved to the second tab, databinding fails and the chart(s) on the second tab does not update (although the FastLineSeries data are correctly updated).
I've attached a 'skeletal' project which illustrates the problem.
Can you advise me?
Yours Sincerely,
Dr Andy Pybus
Attachment: ChartInTabControl_7e0cce9a.zip
SIGN IN To post a reply.
3 Replies
DA
Devi Aruna Maharasi Murugan
Syncfusion Team
May 3, 2017 01:10 PM UTC
Hi Andy,
Thanks for contacting Syncfusion Support.
We have analyzed the provided sample and the reported problem can be resolved by setting data context for user control(DeviceWindow) instead of using ElementName binding for setting Minimum and Maximum property of secondary axis.
Please find the modified code snippet,
DeviceWindow.xaml.cs
| public DeviceWindow() { InitializeComponent(); this.DataContext = this; } |
DeviceWindow.Xaml
| <syncfusion:TabControlExt <syncfusion:TabItemExt Header="DEFIBRILLATOR"> <syncfusion:SfChart > <syncfusion:SfChart.SecondaryAxis> <syncfusion:NumericalAxis Minimum="{Binding W1MinValue}" Maximum="{Binding W1MaxValue}"/> </syncfusion:SfChart.SecondaryAxis> </syncfusion:SfChart> </syncfusion:TabItemExt> <syncfusion:TabItemExt Header="VENTILATOR"> <Grid> <syncfusion:SfChart > <syncfusion:SfChart.SecondaryAxis> <syncfusion:NumericalAxis Minimum="{Binding W2MinValue}" Maximum="{Binding W2MaxValue}" /> </syncfusion:SfChart.SecondaryAxis> </syncfusion:SfChart> </syncfusion:TabItemExt> </syncfusion:TabControlExt> |
Please find the output image
We have modified the provided sample and it can be downloaded from below link,
Sample: ChartInTabControlModified
Regards,
Devi
AP
Andy Pybus
May 3, 2017 06:31 PM UTC
Dear Devi,
Many thanks for your prompt answer. It solves the problem perfectly.
Yours Sincerely,
Andy Pybus
DA
Devi Aruna Maharasi Murugan
Syncfusion Team
May 4, 2017 03:26 AM UTC
Hi Andy,
Thanks for your update.
Please let us know, if you need any further assistance on this.
Regards,
Devi
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AP Andy Pybus
- May 2, 2017 08:56 PM UTC
- May 4, 2017 03:26 AM UTC