![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | Animations not working in Xamarin.Forms | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | narcís calvet <narcis> |
| Component: | Xamarin.Forms | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | pep |
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://www.teechart.net/support/viewtopic.php?f=4&t=16144&sid=a6651f4400871484613801c0141d1dd5#p71750 | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
Animations are not working in Xamarin.Forms as in WinForms. This WinForms code works: public Form1() { InitializeComponent(); InitializeChart(); } Steema.TeeChart.Animations.ChartPartAnimation animation; private void InitializeChart() { var series = new Steema.TeeChart.Styles.Points(tChart1.Chart); series.FillSampleValues(); animation = new Steema.TeeChart.Animations.ChartPartAnimation(tChart1.Chart); animation.Series = series; animation.EasingFunction = new Steema.TeeChart.Animations.EasingFunctions.BounceEase(); animation.EasingMode = Steema.TeeChart.Animations.EasingFunctions.EasingMode.EaseOut; animation.Target = Steema.TeeChart.ChartClickedPartStyle.SeriesPointer; animation.TranslateStyle = Steema.TeeChart.Animations.TransformTranslate.FromRight; var timer1 = new Timer(); timer1.Interval = 3000; timer1.Tick += Timer1_Tick; timer1.Start(); } private void Timer1_Tick(object sender, EventArgs e) { animation.Play(); } While the same in Xamarin.Forms doesn't: Steema.TeeChart.Chart tChart1; const int NumPoints = 50; const int MinValue = 0; const int MaxValue = 1000; Steema.TeeChart.Animations.ChartPartAnimation animation; public App() { tChart1 = new Chart(this); tChart1.Aspect.View3D = false; var series = new Steema.TeeChart.Styles.Points(tChart1.Chart); series.FillSampleValues(); animation = new Steema.TeeChart.Animations.ChartPartAnimation(tChart1.Chart); animation.Series = series; animation.EasingFunction = new Steema.TeeChart.Animations.EasingFunctions.BounceEase(); animation.EasingMode = Steema.TeeChart.Animations.EasingFunctions.EasingMode.EaseOut; animation.Target = Steema.TeeChart.ChartClickedPartStyle.SeriesPointer; animation.TranslateStyle = Steema.TeeChart.Animations.TransformTranslate.FromRight; Device.StartTimer(TimeSpan.FromMilliseconds(3000), OnTimerTick); ChartView chartView = new ChartView { VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, WidthRequest = 400, HeightRequest = 500 }; chartView.Model = tChart1; MainPage = new ContentPage { Content = new StackLayout { Children = { chartView, } }, }; } private bool OnTimerTick() { animation.Play(); return true; }