Reusing an existing DataLogger with a different Plot (WPF)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- data-visualization, desktop
Research direction
Start by reviewing the WPF DataLogger and Plot.Add APIs, along with the PlottableList behavior shown in the issue. Determine whether an existing logger can be attached to a second plot while preserving its live data, and define the expected behavior for the original plot and the shared data source.
Written by the indexing model from the issue text.
Description
Hello,
I'm working on a WPF application using ScottPlot 5.0.55 , and I have a situation where I want to reuse a DataLogger that was already created and added to a plot.
For example:
// First plot
var logger = WpfPlot1.Plot.Add.DataLogger();
for (int x = 0; x < 10; x++)
{
logger.Add(x, Generate.RandomWalker.Next());
}
WpfPlot1.Refresh();
Later, I would like to move or reuse this same logger on another plot, like this:
// Reuse the same logger in a different plot
WpfPlot2.Plot.Add(logger);
WpfPlot2.Refresh();
I also tried adding the logger manually to the PlottableList, but this doesn't seem to work properly:
// is someThing wrong
WpfPlot2.Plot.PlottableList.Add(logger);
WpfPlot2.Refresh();
WpfPlot1
WpfPlot2
However, it seems there is no direct API to attach an existing DataLogger to a different Plot.
Is there a recommended way to do this? Or would it require recreating the logger and copying its data manually?
Use case: I want to toggle between different views that share the same live data source without duplicating the data unnecessarily.
Thank you!
- Dominant language
- C#
- Stars
- 6.8k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ScottPlot/ScottPlot
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in ScottPlot/ScottPlot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100