Skip to content

beta.800

Pre-release
Pre-release
Compare
Choose a tag to compare
@beto-rodriguez beto-rodriguez released this 12 Jun 21:54
· 901 commits to master since this release
b3cfef4

This 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:

ttp
(source: https://github.com/beto-rodriguez/LiveCharts2/blob/master/samples/ViewModelsSamples/Axes/LabelsRotation/ViewModel.cs)

gg
(source: https://github.com/beto-rodriguez/LiveCharts2/blob/master/samples/ViewModelsSamples/Financial/BasicCandlesticks/ViewModel.cs)

image

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:

bounce
(source: https://github.com/beto-rodriguez/LiveCharts2/blob/master/samples/ViewModelsSamples/General/TemplatedTooltips)

anim

Better legends

Same as tooltips, now legends behave much better, and by default wrap the content when there is not enough space:

wrap

Customs legends are more flexible:

image
(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

New Contributors

Full Changelog: v2.0.0-beta.700...v2.0.0-beta.800