Skip to content

Why don't we have a method to remove elements? #96

@MadaraKiriko

Description

@MadaraKiriko

Version 8.0.8. When we configure the chart using XXXChartConfig, we can set the default initial data. Of course, we can also initialize the object without any data, like this:

_config1.Data.Labels = new List<string>();
_config1.Data.Datasets.Add(new LineDataset()
{
        Label = "Value",
        Data = new List<decimal? >(),
        BackgroundColor = "red",
        BorderColor = "red"
});

However, if you want to dynamically add data, you can only use the AddData method. Simply adding data directly to _config1.Data.Labels and _config1.Data.Datasets[0].Data will not be reflected in the corresponding charts. Removing elements from them is also the same. But there is no corresponding method for removing data available for use.

Think about electrocardiograms. We can't see the entire measurement data on the screen; we can only see the data from the most recent period. I believe this is still necessary for some projects that require observing real-time data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions