GearedExamples | A set of examples for the LiveCharts.Geared package | Data Visualization library
kandi X-RAY | GearedExamples Summary
kandi X-RAY | GearedExamples Summary
A set of examples for the LiveCharts.Geared package
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GearedExamples
GearedExamples Key Features
GearedExamples Examples and Code Snippets
Community Discussions
Trending Discussions on GearedExamples
QUESTION
I have modified the scrollable example to use Rachel Lim's VMMV navigation example and to fetch data from our database. I have also moved some code-behind logic to VM. Everything works fine with LiveCharts.ChartValues, but when using LiveCharts.Geared.GearedValues the library crashes when zoomed in/out to specific point.
The data has 6 hourly values with timestamp. I group and sum values by hour. Timestamp and values are never null and neither are calculated sums. I do not update data after the chart has been drawn.
If I fetch 1000 values(~1000/6 datapoints) from database, the library crashes when zoomed out approximately 5 times of data's range. If i fetch 10000 values(~10000/6 datapoints) the crash happens as soon as the user has navigated to usercontrol where the chart is. If i fetch 100000 values the crash happens when zooming in approximately to same minvalue & maxvalue.
However when using ChartValues instead of GearedValues or using just a few datapoints I can zoom in as close as I want and zoom out to DateTime.minvalue.
My view.xaml(Pretty much the example one but using ICommand RangeChangedCommand):
...ANSWER
Answered 2019-Mar-26 at 09:33Well it took a work day but I guess I found out what was so different with my implementation compared to the official example... THE LIST ORDER.
If I sort the original data by property on x-axis before calling AsGearedValues(), I get no crashes. This is not an issue in the free versions AsChartValues. I guess it has something to do with virtualization/optimization and AsGearedValues isn't smart enough to sort the list itself for future use. Also nowhere in documentation this is mentioned. I'll open an issue on github regarding this.
Simple demo:
MainWindow.xaml.cs
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GearedExamples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page