We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Make IsVisible a bindable property on a tertiary YAxis NumericalAxis?

Thread ID:

Created:

Updated:

Platform:

Replies:

121276 Nov 25,2015 07:38 PM UTC Dec 1,2015 11:19 AM UTC Xamarin.Forms 2
loading
Tags: SfChart
Jeff Dalby
Asked On November 25, 2015 07:38 PM UTC

I was happy to see that although it doesn't appear to be documented SfChart on Xamarin Forms mostly supports the following:

            <chart:LineSeries x:Name="MyChart" XBindingPath="MyDate" YBindingPath="MyDouble" ItemsSource="{Binding MyData}" Color="Blue" StrokeWidth="5" IsVisible="{Binding LineSeriesVisiblity}">
                  <chart:LineSeries.YAxis>
                    <chart:NumericalAxis Minimum="0" Maximum="120" ShowMajorGridLines="False"  OpposedPosition="True" TickPosition="Outside" IsVisible="{Binding LineSeriesVisiblity}">
                      <chart:NumericalAxis.LabelStyle>
                        <chart:ChartAxisLabelStyle TextColor="{StaticResource WeFeelDarkBlue}">
                        </chart:ChartAxisLabelStyle>
                      </chart:NumericalAxis.LabelStyle>
                    </chart:NumericalAxis>
                  </chart:LineSeries.YAxis>
                </chart:LineSeries>

What doesn't work is the binding for IsVisible="{Binding LineSeriesVisiblity}" on the <chart:NumericalAxis.... line in order to hide the YAxis with its labels as needed.  

The use case is this particular series has a much different minimum and maximum, and the user has the option to hide the series itself via a button which toggles the LineSeriesVisiblity to false.  That part works fine, but we also want to had the actually axis on the right since we aren't showing the data, and without the data the Axis makes the chart confusing. This works on WinRT.   I can just set IsVisible to False in the XAML instead of using a binding and that actually will hide the axis.  It seems like IsVisible either isn't backed by a bindable property, or some how the property changed event isn't being picked up when I change LineSeriesVisiblity from the view model.

Any workarounds for this?

Manivannan Elangovan [Syncfusion]
Replied On November 26, 2015 01:07 PM UTC

Hi Jeff,

We have logged a defect report for the reported issue "BindingContext is not working for YAxis" and the fix for the issue is estimated to be available in our Volume 3 Service Pack 2 release, which is scheduled to roll out by the end of this month.

Regards,
Manivannan.E

Manivannan Elangovan [Syncfusion]
Replied On December 1, 2015 11:19 AM UTC

Hi Jeff,

We are glad to announce that our Essential Studio service pack 2 for Volume 3, 2015 is rolled out and is available for download under the following link:

http://www.syncfusion.com/forums/121314/essential-studio-2015-volume-3-service-pack-2-release-v13-3-0-18-available-for-download

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Manivannan E

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;