Skip to content

feat: How to Efficiently Plot a Spectrogram #60

Description

@zhouandke

Problem or use case

I want to plot a spectrogram with one million points at 30 fps. Currently, each time I delete the original line and then add a new line, which affects plotting efficiency.

Is there a way to update the data directly without deleting the line?

`
if (spectrumSeriesStore.value) {
chartInstance.value.removeSeries(spectrumSeriesStore.value)
}
const waveData = ...

spectrumSeriesStore.value = chartInstance.value.addLine({ dataset: new StaticDataset(waveData.x, waveData.y), name: "line" }, { lineWidth: 2 })
`

Proposed solution

I want to plot a spectrogram with one million points at 30 fps. Currently, each time I delete the original line and then add a new line, which affects plotting efficiency.

Is there a way to update the data directly without deleting the line?

Area

Dataset / data pipeline

Alternatives considered

No response

Data shape and scale

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions