beta.800
Pre-releaseThis release fixes a bunch of bugs and visual glitches (thanks for all the reports!) and also reinforces the layout system of the library, useful to create custom legends or tooltips (and more, no docs about it yet), Now the library has its own version of Stack/wrap panels and also tables, a lot of new tests were introduced and helped to clean and find a lot of issues in the library.
Should I update?
Yes! this should be a mature version of the library; there a bunch of new tests introduced in this version, a lot of fixed issues, it is recommended to update if you are using an older version, there are only a couple of braking changes, and they should only affect you if you built a custom legend or tooltip.
Most of the known issues of the library should be solved now, there is a low change to introduce a new braking change after this release in the way to version 2.0.0.
What is the state of the library now?
In general, the core features of the library seem really solid (there are a few issues like #834 that need to be fixed yet), soon the next step will be to spend more time on the supported platform specific bugs, please keep reporting it helps a lot.
Better tooltips
Tooltips changed a lot in the last couple of releases, now the library completely draws them instead of using the Framework to render them, this introduced some new bugs and that is why the layout system of the library was reinforced, ToolTips look better and are placed in a smarter way:
(source: https://github.com/beto-rodriguez/LiveCharts2/blob/master/samples/ViewModelsSamples/Axes/LabelsRotation/ViewModel.cs)
(source: https://github.com/beto-rodriguez/LiveCharts2/blob/master/samples/ViewModelsSamples/Financial/BasicCandlesticks/ViewModel.cs)
Now it is easier to customize tooltips, in general VisualElements in the library had a deep review, in the next case, there is a bounce animation for the tooltip, this demonstrates the flexibility of LiveCharts to build animations and drawn controls:
(source: https://github.com/beto-rodriguez/LiveCharts2/blob/master/samples/ViewModelsSamples/General/TemplatedTooltips)
Better legends
Same as tooltips, now legends behave much better, and by default wrap the content when there is not enough space:
Customs legends are more flexible:
(source: https://github.com/beto-rodriguez/LiveCharts2/tree/v2.0.0-beta.700/samples/ViewModelsSamples/General/TemplatedLegends)
Fixed issues
#410
#519
#731
#747
#764
#793
#795
#832
#845
#849
#859
#861
#869
#928
#934
#937
#953
#964
#970
#987
#990
#1046
Breaking changes
1. Custom legends
IChartLegend changed, this should only affect you if you built a custom legend.
Previously
public interface IChartLegend<TDrawingContext>
{
void Draw(Chart<TDrawingContext> chart);
}
Now
public interface IChartLegend<TDrawingContext>
{
void Draw(Chart<TDrawingContext> chart);
LvcSize Measure(Chart<TDrawingContext> chart);
}
2. Custom tooltips
This should only affect you if you built a custom tooltip, this change prevents a tooltip to hold a refence to the chart, instead LiveCharts will inject the chart.
IChartTooltip<SkiaSharpDrawingContext>.Hide()
method changed to IChartTooltip<SkiaSharpDrawingContext>.Hide(Chart<TDrawingContext> chart)
This is an example of how to migrate a custom tooltip from version beta.710
and lower:
Previously
public class SKDefaultTooltip : IChartTooltip<SkiaSharpDrawingContext>
{
private Chart<SkiaSharpDrawingContext> _chart;
// then we used to set the _chart in the Show() method.
public void Hide()
{
if (_chart is null || _panel is null) return;
_chart.RemoveVisual(_panel);
}
}
Now
public class SKDefaultTooltip : IChartTooltip<SkiaSharpDrawingContext>
{
public void Hide(Chart<SkiaSharpDrawingContext> chart)
{
if (chart is null || _panel is null) return;
chart.RemoveVisual(_panel);
}
}
3. Some event handlers were simplified.
For the series: LineSeries, StepLineSeries, StackedAreaSeries and StackedStepAreaSeries the ChartPointPointerDown
, ChartPointPointerHover
and ChartPointPointerHoverLost
events are now much simpler, if you are using any of those events in any of those series, you must update the handler method. This makes all the series events consistent.
This is an example of how to migrate from beta.710
and lower:
Previously
var lineSeries = new LineSeries<int>();
lineSeries.ChartPointPointerDown +=
(IChartView chart, ChartPoint<int, BezierPoint<CircleGeometry>, LabelGeometry>? point) =>
{
// point was clicked!
};
Now
var lineSeries = new LineSeries<int>();
lineSeries.ChartPointPointerDown +=
(IChartView chart, ChartPoint<int, CircleGeometry, LabelGeometry>? point) =>
{
// point was clicked!
};
What's Changed
- Null label text can ruin whole app by @pkindruk in #831
- Better unit tests by @beto-rodriguez in #841
- New tests and call pack script instead by @beto-rodriguez in #842
- New tests to CI by @beto-rodriguez in #843
- New tests to CI by @beto-rodriguez in #844
- Non latin chars by @beto-rodriguez in #848
- Improves multiline labels measure by @beto-rodriguez in #866
- beta 701 by @beto-rodriguez in #902
- Expose MiniatureShapeSize on ISeries interface by @MithrilMan in #880
- update mvvm nuget package to 8.1.0 by @heartacker in #891
- Max limit and Low Limit typo by @ilang-redler in #897
- Fix Add registrar:static option for Mobile Sample by @ChrisPulman in #923
- Update Samples to CommunityToolkit.Mvvm 8.1.0. Fix Breaking Changes by @Kugelhaufen in #986
- Update uno by @beto-rodriguez in #994
- Update master by @beto-rodriguez in #997
- Dev by @beto-rodriguez in #1003
- Update Generic.xaml by @ali50m in #1005
- Update legends.md by @ignacioinnovo in #1012
- #859 Do not override tooltip in InitializeCore method by @maagy in #985
- Better own visuals by @beto-rodriguez in #1021
- Improve tooltips by @beto-rodriguez in #1028
- Fixes 731 by @beto-rodriguez in #1041
- Mappers docs by @beto-rodriguez in #1052
- Data labels by @beto-rodriguez in #1055
- beta.800 by @beto-rodriguez in #1056
New Contributors
- @MithrilMan made their first contribution in #880
- @heartacker made their first contribution in #891
- @ilang-redler made their first contribution in #897
- @Kugelhaufen made their first contribution in #986
- @ali50m made their first contribution in #1005
- @ignacioinnovo made their first contribution in #1012
- @maagy made their first contribution in #985
Full Changelog: v2.0.0-beta.700...v2.0.0-beta.800