ChartPlot
ConsoleMonster.Interactive
What a ChartView explores, so any chart can take its crosshair, legend toggles, zoom and pan: points along X (index 0 to ChartPlot.Count - 1), each series' value at a point, and a drawing at a zoom level and pan position. A level shows a fixed fraction of the X domain; the pan fraction places that window, 0 at the start and 1 at the end. LineChart computes any level; ConsoleMonster.Graphics draws a ChartForgeX chart from the levels ChartForgeX prepared.
Inheritance
- object
- ChartPlot
Usage
Explore 7 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
- Method ChartPlotExtensions.ToChartPlot
- Method ChartPlot.op_Implicit
- Property ChartView.Chart
- Property ChartViewInputOptions.Chart
Accepted by parameters 3
- Constructor ChartView.ChartView
- Extension method ChartViewInputOptions.Chart
- Method InteractiveFluent.Chart
Methods
public virtual bool CanHide(int series) #Whether a series can be hidden (default: every series).
Parameters
- series int
- The series position, from 0.
Returns
bool True when it can be hidden.public abstract string FormatValue(double value, RenderContext context) #A value as the readout shows it, with its unit.
Parameters
- value double
- The value.
- context ConsoleMonster.Canvas.RenderContext
- The render context, for its culture.
Returns
string The text.public abstract double Magnification(int level) #The magnification a level is read out as (1 at level 0).
Parameters
- level int
- The level.
Returns
double The magnification.public abstract Size Measure(Constraints constraints, RenderContext context) #The natural size of the drawing.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The available space.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
public static ChartPlot op_Implicit(LineChart chart) #Explores a native line chart: its points are value indices, aligned from each series' first value.
Parameters
- chart ConsoleMonster.Widgets.LineChart
- The chart.
Returns
ChartPlotpublic abstract double Position(int index) #Where a point sits in the X domain, from 0 to 1.
Parameters
- index int
- The point index.
Returns
double The position.public abstract ChartPlotLayout Render(Region region, RenderContext context, int level, double pan, ICollection<int> hidden) #Draws the window a level and pan show, without the hidden series, and reports where it drew.
Parameters
- region ConsoleMonster.Canvas.Region
- The area below the readout row.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
- level int
- The zoom level.
- pan double
- The pan fraction, from 0 to 1.
- hidden System.Collections.Generic.ICollection<int>
- The positions of the hidden series.
public abstract string SeriesName(int series) #A series' name, read out with its value.
Parameters
- series int
- The series position, from 0.
Returns
string The name.public abstract Style SeriesStyle(int series, RenderContext context) #The style of a series' number in the readout and legend.
Parameters
- series int
- The series position, from 0.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
public abstract double? Value(int series, int index) #A series' value at a point, or null where it has none.
Parameters
- series int
- The series position, from 0.
- index int
- The point index.
Returns
double? The value.public abstract double WindowFraction(int level) #The fraction of the X domain a level shows (1 at level 0).
Parameters
- level int
- The level.
Returns
double The fraction.public abstract string? XLabel(int index, RenderContext context) #A label for a point when the view has none of its own, or null to show its number.
Parameters
- index int
- The point index.
- context ConsoleMonster.Canvas.RenderContext
- The render context.
Returns
string? The label.