v2.0.0-rc5
Pre-releaseThis release brings a lot of improvements to the library, more than 400 commits from the last release; The library it is now compatible with net 9 on Maui, uses SkiaSharp 3 by default (when the UI framework supports it), it supports now GPU rendering (when the UI framework supports it), fixes a lot of pointer-interaction-related issues, improves events, visual elements are easier to customize, and also the drawing engine was re-structured.
Drawing engine improvements
The drawing engine in older versions was really simple, as the library evolved new features were required, like Layouts, but there was one thing missing, when an element was inside a layout, Canvas transform was not applied to the children, this is now supported and required important changes in the internal code of the library that handles drawing, this feature is now used by default on tooltips:
The opacity and scale from the tooltip geometry is also applied to the content inside the tooltip, that was missing in the library and was impossible in older versions, it is a small detail but was required.
The drawing engine code is much cleaner now, the library used interfaces to define all shapes in the core of library, for example the IRoundedRectangleGeometry
, then on the SkiaSharp assembly, there was an implementation of this interface; Now instead there is a base abstract class in the core of the library (BaseRoundedRectangleGeometry that inherits from DrawnGeometry), this base class handles animations and transforms, then on the SkiaSharp assembly, we inherit from this base class and just use SkiaSharp to draw the rectangle (see RoundedRectangleGeometry), this is much cleaner and has the potential to remove the dependency of the library on SkiaSharp.
More info at #1705.
Maui Net 9 friendly
in older versions, Maui handlers were not registered following the Maui logic, this caused issues like #1684, or #1703 this is now fixed, but there are breaking changes, you must now call .UseLiveCharts()
in the MauiProgram.cs
file, more info in the installation guide.
New Visual elements
VisualElements felt hacky, they were hard to customize, now it is much easier to draw anything we need in the canvas, there a lot of new examples in the web site, the old Visuals are still supported but some of them are marked as obsolete.
GPU rendering
When your app starts, you can now call LiveCharts.UseGPU = true
this will use the Hardware accelerated view provided by SkiaSharp, there are known limitations, this is not supported on NetFramework due #3111, and also not on Avalonia or Eto, where they provide the Skia assemblies.
New FPS log
We can now know the frames per second on a chart by setting LiveCharts.ShowFPS = true;
and even try to get more, for example LiveCharts.MaxFps = 90;
, the default is 65, not supported on Avalonia, where frames are handled by the framework.
How many FPS can Blazor render?
About 60, not bad! but that was only the tooltip, now let's move the chart:
Still decent ❤️
Pointer interaction
There is a lot of feedback about how users try to interact with the chart, this version tries to take all that feedback and provide a solution for all the cases, the FindingStrategy property on a CartesianChart, is more flexible, this property allows the user to configure how the library selects points on the chart, the library provides 8 different strategies, but when that is not enough you also create your own logic now, more info at #1687.
The events article was also updated to explain more about this common scenario.
Axis scales
The axis scale is now completely flexible, there is a new article in the site that explains it.
Bye Xamarin
Xamarin is no longer supported.
Breaking Changes
In general, if you are not doing any customization like drawing your own legend, tooltip, a custom visual element or any call to the internal API in the library to draw things, then you are ok, there are no changes, but as explained the Drawing engine was re-structured, this means that any custom draw is probably affected by the API changes, in general the migration should be easy, all your code will be marked as obsolete, and should give you a hint on how to update your code, also the web site is completely updated to the new API, here is a list with the most used features in the library that changed:
IChartLegend<T>
no longer requires the generic param here is an example to migrate to the new api.IChartTooltip<T>
no longer requires the generic param, here is an example to migrate to the new api.- The type of the Chart.VisualElements property, changed from
ChartElement<T>
toChartElement
, alsoVisualElement<T>
cchanged toVisualElement
example here and here. - There are probably more braking changes if you are drawing directly on the canvas, please refer to the articles in the web site to see how to use the new API, in general most of the changes just removed the
TDrawingContext
generic param, or the object was renamed (objects were marked as obsolete and there should be a hint in your code with the new name).
For more help on breaking changes, please see #1705.
Fixed issues
Alot :( there is no list here now.
What's Changed
- Update uno by @beto-rodriguez in #1668
- Update master by @beto-rodriguez in #1669
- Update web site samples to master by @beto-rodriguez in #1671
- Update master to rc 4.5 by @beto-rodriguez in #1672
- Update values type by @beto-rodriguez in #1679
- Clean motion canvas code by @beto-rodriguez in #1680
- improve bounce logic by @beto-rodriguez in #1690
- Pointer interaction review by @beto-rodriguez in #1687
- feat: add global toggle for GPU rendering. closes #1645 by @Kay-STL in #1685
- Continue #1685 by @beto-rodriguez in #1692
- Rename to findingstrategy by @beto-rodriguez in #1696
- Improve chart methods accessibility by @beto-rodriguez in #1697
- This was for the events branch :( by @beto-rodriguez in #1698
- Keep improving event docs by @beto-rodriguez in #1695
- Restructure by @beto-rodriguez in #1708
- Update overview.md by @dpmaddy in #1706
- Bye xamarin by @beto-rodriguez in #1729
- Fix touch gestures not working on MAUI iOS once packaged by @albyrock87 in #1704
- Simplify Drawing API by @beto-rodriguez in #1705
- removes obsolete interface by @beto-rodriguez in #1742
- Fix 1710 by @beto-rodriguez in #1743
- No nullable dp by @beto-rodriguez in #1746
- Axis range by @beto-rodriguez in #1752
- Skiasharp 3 by @beto-rodriguez in #1756
- Update blazor by @beto-rodriguez in #1758
- Axis events by @beto-rodriguez in #1760
- Fix 1589 by @beto-rodriguez in #1763
- rc5 by @beto-rodriguez in #1764
- rc5 docs changes by @beto-rodriguez in #1769
- rc.5.1 by @beto-rodriguez in #1771
New Contributors
- @dpmaddy made their first contribution in #1706
- @albyrock87 made their first contribution in #1704
Full Changelog: v2.0.0-rc4...v2.0.0-rc5