Class CorePlot
- Namespace
- SDKPlot
- Assembly
- SDKPlot.NET.dll
public class CorePlot : IDisposable
- Inheritance
-
CorePlot
- Implements
- Inherited Members
Constructors
CorePlot(IPlotInvoker)
public CorePlot(IPlotInvoker plotInvoker)
Parameters
plotInvokerIPlotInvoker
Fields
_annotations
List of annotations in the plot model
protected List<PointAnnotation> _annotations
Field Value
- List<PointAnnotation>
_dataSeries
List of data series in the plot model
protected List<Series> _dataSeries
Field Value
- List<Series>
_peaksInPlot
The peaks in plot with their respective SimpleCurves
protected Dictionary<SimpleCurve, List<PlotPeak>> _peaksInPlot
Field Value
_simpleCurvesInPlot
The SimpleCurves in the plot with their respective lineseries
protected Dictionary<SimpleCurve, LineSeries> _simpleCurvesInPlot
Field Value
- Dictionary<SimpleCurve, LineSeries>
_xAxis
The x axis
protected Axis _xAxis
Field Value
- Axis
_yAxis
The y axis
protected Axis _yAxis
Field Value
- Axis
_yAxisSecondary
The secondary y axis
protected Axis _yAxisSecondary
Field Value
- Axis
Properties
AxesColor
Gets or sets the color of the axes.
public OxyColor AxesColor { get; set; }
Property Value
- OxyColor
The color of the axis.
AxisTextColor
Gets or sets the color of the axis text.
public OxyColor AxisTextColor { get; set; }
Property Value
- OxyColor
The color of the axis text.
LegendTextColor
Gets or sets the color of the legend text.
public OxyColor LegendTextColor { get; set; }
Property Value
- OxyColor
The color of the legend text.
MarkerSize
The size of the markers indicating the datapoints in the plot. The default MarkerSize is 5.
public int MarkerSize { get; set; }
Property Value
- int
The size of the marker used for datapoints.
Exceptions
- Exception
Marker size must be a positive number
MarkerType
Gets or sets the datapoint MarkerType. The default MarkerType is a circle.
public MarkerType MarkerType { get; set; }
Property Value
- MarkerType
The marker type.
NSeries
Gets the amount of dataseries in the plot.
public int NSeries { get; }
Property Value
- int
The n series.
NSimpleCurves
Gets the amount of SimpleCurves in the plot.
public int NSimpleCurves { get; }
Property Value
- int
The n simple curves.
PlotBackgroundColor
Gets or sets the color of the plot background.
public OxyColor PlotBackgroundColor { get; set; }
Property Value
- OxyColor
The color of the plot background.
PlotModel
The plot model that contains the information for the PlotView
public PlotModel PlotModel { get; }
Property Value
- PlotModel
ShowGridLines
Gets or sets a value indicating whether to [show grid lines].
public bool ShowGridLines { get; set; }
Property Value
- bool
trueif [show grid lines]; otherwise,false.
Title
Gets or sets the title.
public string Title { get; set; }
Property Value
- string
The title.
XAxis
The bottom X Axis
public Axis XAxis { get; }
Property Value
- Axis
XAxisLabel
Gets or sets the x axis label.
public string XAxisLabel { get; set; }
Property Value
- string
The x axis label.
XAxisType
Gets or sets the type of the x axis.
public AxisType XAxisType { get; set; }
Property Value
- AxisType
The type of the x axis.
YAxis
The bottom X Axis
public Axis YAxis { get; }
Property Value
- Axis
YAxisLabel
Gets or sets the y axis label.
public string YAxisLabel { get; set; }
Property Value
- string
The y axis label.
YAxisSecondaryLabel
Gets or sets the secondary y axis label.
public string YAxisSecondaryLabel { get; set; }
Property Value
- string
The secondary y axis label.
YAxisSecondaryType
Gets or sets the type of the secondary y axis.
public AxisType YAxisSecondaryType { get; set; }
Property Value
- AxisType
The type of the y axis.
YAxisType
Gets or sets the type of the y axis.
public AxisType YAxisType { get; set; }
Property Value
- AxisType
The type of the y axis.
Methods
AddData(string, double[], double[], bool, bool)
Adds data to the plot.
public LineSeries AddData(string label, double[] x, double[] y, bool useSecondaryYAxis = false, bool update = true)
Parameters
labelstringThe data label.
xdouble[]array containing the x values.
ydouble[]array containing the y values.
useSecondaryYAxisboolif set to
true[use secondary y axis].updateboolif set to
true[update] plot.
Returns
- LineSeries
A reference to the lineseries of the data in the plot
Exceptions
- ArgumentException
The x and y data arrays must have equal lengths
AddData(string, double[], string, double[], string, bool, bool)
Adds data to the plot.
public LineSeries AddData(string label, double[] x, string xLabel, double[] y, string yLabel, bool useSecondaryYAxis = false, bool update = true)
Parameters
labelstringThe data label.
xdouble[]array containing the x values.
xLabelstringThe x axis label.
ydouble[]array containing the y values.
yLabelstringThe y axis label.
useSecondaryYAxisboolif set to
true[use secondary y axis].updateboolif set to
true[update] plot.
Returns
- LineSeries
A reference to the lineseries of the data in the plot
AddSimpleCurve(SimpleCurve, Method?, bool, bool)
Adds the specified SimpleCurve to the plot.
public virtual void AddSimpleCurve(SimpleCurve simpleCurve, Method? method = null, bool useSecondaryYAxis = false, bool update = true)
Parameters
simpleCurveSimpleCurveThe simple curve.
methodMethoduseSecondaryYAxisboolif set to
true[use secondary y axis].updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The specified SimpleCurve cannot be null
- ArgumentException
Plot allready contains the specified SimpleCurve
AddSimpleCurves(IEnumerable<SimpleCurve>, Method?, bool, bool)
Adds a collection of SimpleCurves to the plot.
public void AddSimpleCurves(IEnumerable<SimpleCurve> simpleCurves, Method? method = null, bool useSecondaryYAxis = false, bool update = true)
Parameters
simpleCurvesIEnumerable<SimpleCurve>Array of SimpleCurves.
methodMethoduseSecondaryYAxisboolif set to
true[use secondary y axis].updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The array of SimpleCurves cannot be null
ClearAll(bool)
Clears all data from the plot.
public void ClearAll(bool update = true)
Parameters
updateboolif set to
true[update].
ClearSimpleCurves(bool)
Clears all SimpleCurves from the plot.
public virtual void ClearSimpleCurves(bool update = true)
Parameters
updatebool
ContainsSimpleCurve(SimpleCurve)
Determines whether the plot [contains] [the specified simple curve].
public bool ContainsSimpleCurve(SimpleCurve simpleCurve)
Parameters
simpleCurveSimpleCurveThe simple curve.
Returns
- bool
trueif the plot [contains] [the specified simple curve]; otherwise,false.
Exceptions
- ArgumentNullException
The specified SimpleCurve cannot be null
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
RemoveData(Series)
Removes the specified data series from the plot.
public void RemoveData(Series data)
Parameters
dataSeriesThe data series.
Exceptions
- ArgumentNullException
The specified data series cannot be null
- ArgumentException
The plot does not contain the specified data series
RemoveSimpleCurve(SimpleCurve, bool)
Removes the specified SimpleCurve from the plot.
public virtual void RemoveSimpleCurve(SimpleCurve simpleCurve, bool update = true)
Parameters
simpleCurveSimpleCurveThe SimpleCurve.
updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The specified SimpleCurve cannot be null
- ArgumentException
The plot does not contain the specified SimpleCurve
- Exception
Could not get lineseries associated with the SimpleCurve
RemoveSimpleCurvePeaks(SimpleCurve, bool)
Removes the specified SimpleCurve's peaks from the plot.
public void RemoveSimpleCurvePeaks(SimpleCurve simpleCurve, bool update = true)
Parameters
simpleCurveSimpleCurveThe SimpleCurve.
updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The specified SimpleCurve cannot be null
- ArgumentException
The plot does not contain the specified SimpleCurve
RemoveSimpleCurves(SimpleCurve[], bool)
Removes a collection of SimpleCurves from the plot.
public void RemoveSimpleCurves(SimpleCurve[] simpleCurves, bool update = true)
Parameters
simpleCurvesSimpleCurve[]Array of SimpleCurves.
updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The array of SimpleCurves cannot be null
RemoveSimpleCurves(List<SimpleCurve>, bool)
Removes a collection of SimpleCurves from the plot.
public void RemoveSimpleCurves(List<SimpleCurve> simpleCurves, bool update = true)
Parameters
simpleCurvesList<SimpleCurve>List of SimpleCurves.
updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The list of SimpleCurves cannot be null
RemoveSimpleCurvesPeaks(SimpleCurve[], bool)
Removes the specified collection of SimpleCurves' peaks from the plot.
public void RemoveSimpleCurvesPeaks(SimpleCurve[] simpleCurves, bool update = true)
Parameters
simpleCurvesSimpleCurve[]updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The specified SimpleCurve cannot be null
- ArgumentException
The plot does not contain the specified SimpleCurve
RemoveSimpleCurvesPeaks(List<SimpleCurve>, bool)
Removes the specified collection of SimpleCurves' peaks from the plot.
public void RemoveSimpleCurvesPeaks(List<SimpleCurve> simpleCurves, bool update = true)
Parameters
simpleCurvesList<SimpleCurve>updateboolif set to
truethe plot is [updated].
Exceptions
- ArgumentNullException
The specified SimpleCurve cannot be null
- ArgumentException
The plot does not contain the specified SimpleCurve
SimpleCurve_CurveFinished(object, EventArgs)
Handles the CurveFinished event of the SimpleCurve control.
protected virtual void SimpleCurve_CurveFinished(object sender, EventArgs e)
Parameters
senderobjectThe source of the event.
eEventArgsThe EventArgs instance containing the event data.
SimpleCurve_DetectedPeaks(object, EventArgs)
Updates the SimpleCurve's peaks in the plot.
protected void SimpleCurve_DetectedPeaks(object sender, EventArgs e)
Parameters
senderobjectThe source of the event.
eEventArgsThe EventArgs instance containing the event data.
SimpleCurve_NewDataAdded(object, ArrayDataAddedEventArgs)
Adds the NewDataAdded of the SimpleCurve to the plot.
protected virtual void SimpleCurve_NewDataAdded(object sender, ArrayDataAddedEventArgs e)
Parameters
senderobjectThe source of the event.
eArrayDataAddedEventArgsThe PalmSens.Data.ArrayDataAddedEventArgs instance containing the event data.
UpdateAxes(Axis, AxisType)
public Axis UpdateAxes(Axis axis, AxisType type)
Parameters
axisAxistypeAxisType
Returns
- Axis
UpdatePlot(bool)
Updates the plot.
public virtual void UpdatePlot(bool force = false)
Parameters
forcebool
UpdateSimpleCurvePeaks(SimpleCurve, bool)
Updates the plot with the peaks of the specified SimpleCurve.
public void UpdateSimpleCurvePeaks(SimpleCurve simpleCurve, bool update = true)
Parameters
simpleCurveSimpleCurveThe SimpleCurve.
updatebool
Exceptions
- ArgumentNullException
The specified SimpleCurve cannot be null
- ArgumentException
The plot does not contain the specified SimpleCurve
UpdateSimpleCurvesPeaks(SimpleCurve[], bool)
Updates the plot with the peaks of the specified collection of SimpleCurves.
public void UpdateSimpleCurvesPeaks(SimpleCurve[] simpleCurves, bool update = true)
Parameters
simpleCurvesSimpleCurve[]Collection of SimpleCurves to update.
updateboolif set to
true[update] the plot.
UpdateSimpleCurvesPeaks(List<SimpleCurve>, bool)
Updates the plot with the peaks of the specified collection of SimpleCurves.
public void UpdateSimpleCurvesPeaks(List<SimpleCurve> simpleCurves, bool update = true)
Parameters
simpleCurvesList<SimpleCurve>Collection of SimpleCurves to update.
updateboolif set to
true[update] the plot.