LineChart class

February 20, 2023 ยท View on GitHub

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph NB.Charts
  NB.Charts.LineChart[[LineChart]]
  NB.Charts.TimeSeriesChartBase[[TimeSeriesChartBase]]
  class NB.Charts.TimeSeriesChartBase abstractStyle;
  end
NB.Charts.TimeSeriesChartBase --> NB.Charts.LineChart

Members

Properties

Public properties

TypeNameMethods
floatDefaultDataWidth
Default width of line traces
get, set
stringMarkerClass
Custom USS class to assign to all marker glyphs.
get, set
boolShowMarkers
If true, will display additional marker glyphs
on each datapoint.
get, set
boolSmearMarkerUpdates
Because updating large sets of marker glyphs can be expensive,
setting this to true will spread glyph updates across multiple
frames. This can yield a smoother experience, but comes with
the cost of some visual artifacts during frequent updates.
get, set

Methods

Public methods

ReturnsName
voidRemoveDataSeries(string series)
voidSetLineWidth(float width, string series)
Sets the line width of an individual data series without affecting others.

Protected methods

ReturnsName
voidDrawChart(Painter2D p, MeshGenerationContext mgc, Vector2 dataRangeX, Vector2 dataRangeY, Vector2 eleRangeX, Vector2 eleRangeY)
voidOnRefreshVisuals()

Details

Inheritance

Nested types

Classes

  • UxmlFactory
  • UxmlTraits

Constructors

LineChart

public LineChart()

Methods

RemoveDataSeries

public override void RemoveDataSeries(string series)
Arguments
TypeNameDescription
stringseries

DrawChart

protected override void DrawChart(Painter2D p, MeshGenerationContext mgc, Vector2 dataRangeX, Vector2 dataRangeY, Vector2 eleRangeX, Vector2 eleRangeY)
Arguments
TypeNameDescription
Painter2Dp
MeshGenerationContextmgc
Vector2dataRangeX
Vector2dataRangeY
Vector2eleRangeX
Vector2eleRangeY

SetLineWidth

public void SetLineWidth(float width, string series)
Arguments
TypeNameDescription
floatwidthWidth, in pixels
stringseriesName of the series to modify
Summary

Sets the line width of an individual data series without affecting others.

OnRefreshVisuals

protected override void OnRefreshVisuals()

Properties

DefaultDataWidth

public float DefaultDataWidth { get; set; }
Summary

Default width of line traces

ShowMarkers

public bool ShowMarkers { get; set; }
Summary

If true, will display additional marker glyphs on each datapoint.

MarkerClass

public string MarkerClass { get; set; }
Summary

Custom USS class to assign to all marker glyphs.

SmearMarkerUpdates

public bool SmearMarkerUpdates { get; set; }
Summary

Because updating large sets of marker glyphs can be expensive, setting this to true will spread glyph updates across multiple frames. This can yield a smoother experience, but comes with the cost of some visual artifacts during frequent updates.