- Home
- Forum
- Xamarin.Forms
- 1970 in X-Axis when no series visible
1970 in X-Axis when no series visible
|
<chart:SfChart.PrimaryAxis>
<chart:DateTimeAxis Minimum="1/1/2015" Maximum="5/1/2015"/>
</chart:SfChart.PrimaryAxis>
|
|
series.Opacity = 0.1;
|
Hello,
The second solution does not fit to me since I can have more than one serie, and I need to make visible/invisible some of them to see others (changing the Y values).
So I tried with the first option. The problem is that when I try to put the minimum and maximum to their default values (null) in order to compute the series by themselves I encounter with this exception:
INIT EXCEPTION(iOS)----------------------------
2017-08-02 10:54:28.366 IDboxMobileiOS[96619:3378762] (iOS):System.ArgumentNullException: Value cannot be null.
Parameter name: value
at Syncfusion.SfChart.iOS.SFRangeAxisBase.set_Minimum (Foundation.NSObject value) [0x00006] in <c2fbd626cba24da8b1c7075fae21dfa4>:0
at Syncfusion.SfChart.XForms.iOS.ChartAxisMapping.OnDateTimeAxisPropertiesChanged (System.String propertyName, Syncfusion.SfChart.XForms.DateTimeAxis formDateTimeAxis, Syncfusion.SfChart.iOS.SFDateTimeAxis nativeDateTimeAxis) [0x00136] in <faf947cc9ca647adb02d7480416ea715>:0
at Syncfusion.SfChart.XForms.iOS.ChartAxisMapping.OnChartAxisPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0006d] in <faf947cc9ca647adb02d7480416ea715>:0
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:136
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.F
orms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x000f4] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:589
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0015b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:386
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:539
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Form
s.Core\BindableObject.cs:83
at Syncfusion.SfChart.XForms.DateTimeAxis.set_Minimum (System.Nullable`1[T] value) [0x00000] in <58bd539bfe7d461b894d1c0dd30b37a5>:0
at IDboxMobile.Views.GraphsView+<>c__DisplayClass15_1.<CreateLegend>b__0 (System.Object sender, System.EventArgs e) [0x00119] in C:\Proyectos\IDbox\src\trunk\Clients\AppMobile\IDboxMobile\IDboxMobile\Views\GraphsView.cs:278
at Xamarin.Forms.TapGestureRecognizer.SendTapped (Xamarin.Forms.View sender) [0x0002e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\TapGestureRecognizer.cs:46
at Xamarin.Forms.Platform.iOS.EventTracker+<>c__DisplayClass12_0.<GetNativeRecognizer>b__0 (UIKit.UITapGestureRecognizer r) [0x00045] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\EventTracker.cs:94
at UIKit.UITapGestureRecognizer+Callback.Activated (UIKit.UITapGestureRecognizer sender) [0x00000] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:211
--- End of stack trace from p
revious location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at IDboxMobile.iOS.Application.Main (System.String[] args) [0x00002] in C:\Proyectos\IDbox\src\trunk\Clients\AppMobile\IDboxMobile\IDboxMobile.iOS\Main.cs:19
2017-08-02 10:54:28.366 IDboxMobileiOS[96619:3378762] END EXCEPTION(iOS)-----------------------------
A code snippet so you can understand:
if (allSeriesInvisible)
{//just for not show 1970
((DateTimeAxis)chart.PrimaryAxis).Minimum = rangeNavigator.ViewRangeStart;
((DateTimeAxis)chart.PrimaryAxis).Maximum = rangeNavigator.ViewRangeEnd;
}
else
{//default values
((DateTimeAxis)chart.PrimaryAxis).Minimum = null;
((DateTimeAxis)chart.PrimaryAxis).Maximum = null;
}
Thanks!!!
|
(Chart.PrimaryAxis as DateTimeAxis).Minimum = new DateTime(2015, 01, 01);
(Chart.PrimaryAxis as DateTimeAxis).Minimum = new DateTime(2015, 01, 01);
|
With Volume 3, 2017 release I have been able to solve my problem.
Thanks!
Thanks for the update.
We are glad to know that the reported issue has been resolved at your end. Please let us know if you need any further assistance on this.
Regards,
Parthiban S
- 5 Replies
- 3 Participants
-
DP David Perera
- Aug 1, 2017 10:10 AM UTC
- Aug 17, 2017 11:48 AM UTC