API Reference
LineChart
A line or scatter chart on a sub-cell canvas: braille (2x4 dots per cell) on Full, half blocks on Basic and characters on Ascii. A y axis with min/max labels sits on the left, a legend below when there are several series. Live operation: add (Key = series, Value).
Inheritance
- LiveWidget
- LineChart
Usage
Explore 25 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 13
- Extension method LineChart.WithCapacity
- Extension method LineChart.WithHeight
- Extension method LineChart.WithMax
- Extension method LineChart.WithMin
- Extension method LineChart.WithScatter
- Extension method LineChart.WithUnit
- Method LineChart.Add
- Method LineChartFluent.WithCapacity
- Method LineChartFluent.WithHeight
- Method LineChartFluent.WithMax
- Method LineChartFluent.WithMin
- Method LineChartFluent.WithScatter
- Method LineChartFluent.WithUnit
Accepted by parameters 12
- Extension method LineChart.WithCapacity
- Extension method LineChart.WithHeight
- Extension method LineChart.WithMax
- Extension method LineChart.WithMin
- Extension method LineChart.WithScatter
- Extension method LineChart.WithUnit
- Method LineChartFluent.WithCapacity
- Method LineChartFluent.WithHeight
- Method LineChartFluent.WithMax
- Method LineChartFluent.WithMin
- Method LineChartFluent.WithScatter
- Method LineChartFluent.WithUnit
Constructors
public LineChart(String name = "chart") #Creates a chart.
Parameters
- name System.String = "chart"
- The live name (default chart).
Methods
public LineChart Add(String series, Double value) #LineChartAppends a value to a series (created when missing).
Parameters
- series System.String
- The series name.
- value System.Double
- The value.
Returns
This instance.
public ChartSeries AddSeries(RichText name, ThemeToken? token = null) #ChartSeriesAdds a series with a multicolour legend name (its plain text is the key), or returns the existing one.
Parameters
- name ConsoleMonster.Text.RichText
- The rich name.
- token ConsoleMonster.Styling.ThemeToken? = null
- The colour token, or null for the next series colour.
Returns
The series.
public ChartSeries AddSeries(String name, ThemeToken? token = null) #ChartSeriesAdds a series, or returns the existing one with that name.
Parameters
- name System.String
- The name.
- token ConsoleMonster.Styling.ThemeToken? = null
- The colour token, or null for the next series colour.
Returns
The series.
public override Void Apply(LiveEvent liveEvent) #VoidApplies an event to the widget's state.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event.
public SparklineHandle Handle(ILiveDispatcher dispatcher) #SparklineHandleReturns a handle that appends values through a dispatcher.
Parameters
- dispatcher ConsoleMonster.Live.ILiveDispatcher
- The dispatcher.
Returns
The handle.
public override Size Measure(Constraints constraints, RenderContext context) #SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public override Void Render(Region region, RenderContext context) #VoidRenders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
public virtual String? Describe(LiveEvent liveEvent) #String?Parameters
- liveEvent LiveEvent
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public Int32 Height { get; set; } #Rows for the plot including the x axis (default 8).
public Boolean Scatter { get; set; } #Whether points are joined by lines (default) or drawn as a scatter.
public Int32 Capacity { get; set; } #How many values each series keeps (default 512).
public Double? Min { get; set; } #A fixed minimum for the y axis, or null (0 when all values are positive).
Inherited Properties
Extension Methods
public static LineChart WithCapacity(LineChart lineChart, Int32 value) #LineChartSets LineChart.Capacity: How many values each series keeps (default 512).
Parameters
- lineChart ConsoleMonster.Widgets.LineChart
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static LineChart WithHeight(LineChart lineChart, Int32 value) #LineChartSets LineChart.Height: Rows for the plot including the x axis (default 8).
Parameters
- lineChart ConsoleMonster.Widgets.LineChart
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static LineChart WithMax(LineChart lineChart, Double? value) #LineChartSets LineChart.Max: A fixed maximum for the y axis, or null.
Parameters
- lineChart ConsoleMonster.Widgets.LineChart
- The instance.
- value System.Double?
- The value.
Returns
The same instance.
public static LineChart WithMin(LineChart lineChart, Double? value) #LineChartSets LineChart.Min: A fixed minimum for the y axis, or null (0 when all values are positive).
Parameters
- lineChart ConsoleMonster.Widgets.LineChart
- The instance.
- value System.Double?
- The value.
Returns
The same instance.
public static LineChart WithScatter(LineChart lineChart, Boolean value = true) #LineChartSets LineChart.Scatter: Whether points are joined by lines (default) or drawn as a scatter.
Parameters
- lineChart ConsoleMonster.Widgets.LineChart
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static LineChart WithUnit(LineChart lineChart, String? value) #LineChartSets LineChart.Unit: A unit appended to axis labels.
Parameters
- lineChart ConsoleMonster.Widgets.LineChart
- The instance.
- value System.String?
- The value.
Returns
The same instance.