-
Notifications
You must be signed in to change notification settings - Fork 981
Description
Updating values in RadarPlot
Feature description: The Update() method in several Plottables is quite useful especially when plotting data continously. Unfortunately, the RadarPlot doesn't seem to implement any updating at all, which can become a nuisance for continous data plotting.
I first hoped to create a RadarPlot derived-control in order to implement the value updating using a simple and straightforward code:
class ClassPlotRadar : ScottPlot.Plottable.RadarPlot
{
public ClassPlotRadar(double[,] values, Color[] lineColors, Color[] fillColors, bool independentAxes, double[] maxValues = null)
:base(values, lineColors, fillColors, independentAxes, maxValues)
{
}
public void Update(double[,] values, double[] maxValues = null)
{
base.Norm = new double[values.GetLength(0), values.GetLength(1)];
Array.Copy(values, 0, base.Norm, 0, values.Length);
if (this.IndependentAxes)
base.NormMaxes = base.NormalizeSeveralInPlace(base.Norm, maxValues);
else
base.NormMax = base.NormalizeInPlace(base.Norm, maxValues);
}
}Unfortunately, the above code doesn't work because Norm, NormMaxes, NormMax, NormalizeSeveralInPlace, and NormalizeInPlace are all defined as private.
So, as far as I understand, the only option is to resort to the "Clear and Replot" strategy suggested in #1042, althought the user-code becomes slightly cumbersome as the plot format has to be re-set each time new data is received and the Clear() method is called. Therefore, it would be useful if some updating options could be provided for RadarPlot.