beto-rodriguez / LiveCharts2

Simple, flexible, interactive & powerful charts, maps and gauges for .Net, LiveCharts2 can now practically run everywhere Maui, Uno Platform, Blazor-wasm, WPF, WinForms, Xamarin, Avalonia, WinUI, UWP.
https://livecharts.dev
MIT License
4.37k stars 569 forks source link

Can new LineSeries<double []>be implemented,TKS #1676

Closed lixiaoxiang1369 closed 2 weeks ago

lixiaoxiang1369 commented 3 weeks ago

May I ask if it is possible to achieve high-speed data acquisition display, such as batch writing of 50kHz data and double [4096] data, as follows: new LineSeries<double []>, batch addition and deletion, thank you. OS:Windows10 Avalonia 11.2.0-rc1, LiveChartsCore.SkiaSharpView.Avalonia 2.0.0-rc4.5

beto-rodriguez commented 2 weeks ago

Hello

To plot the type double[] you could use mappers:

var values = new double[][]
{
    [0,1],
    [1,2],
    [2,3],
    [3,5],
    [4,3],
    [5,4],
    [6,6]
};

Series = [
    new LineSeries<double[]>{
        Values = values,
        Mapping = (array, index) => new(array[0], array[1])
    }
];

About that amount of data, you can try it, let me know your results, there is also a high-performance package that is not publicly available yet https://github.com/beto-rodriguez/LiveCharts2/releases/tag/v2.0.0-rc2.