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
| Type | Name | Methods |
|---|---|---|
float | DefaultDataWidthDefault width of line traces | get, set |
string | MarkerClassCustom USS class to assign to all marker glyphs. | get, set |
bool | ShowMarkersIf true, will display additional marker glyphs on each datapoint. | get, set |
bool | SmearMarkerUpdatesBecause 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
| Returns | Name |
|---|---|
void | RemoveDataSeries(string series) |
void | SetLineWidth(float width, string series)Sets the line width of an individual data series without affecting others. |
Protected methods
| Returns | Name |
|---|---|
void | DrawChart(Painter2D p, MeshGenerationContext mgc, Vector2 dataRangeX, Vector2 dataRangeY, Vector2 eleRangeX, Vector2 eleRangeY) |
void | OnRefreshVisuals() |
Details
Inheritance
Nested types
Classes
UxmlFactoryUxmlTraits
Constructors
LineChart
public LineChart()
Methods
RemoveDataSeries
public override void RemoveDataSeries(string series)
Arguments
| Type | Name | Description |
|---|---|---|
string | series |
DrawChart
protected override void DrawChart(Painter2D p, MeshGenerationContext mgc, Vector2 dataRangeX, Vector2 dataRangeY, Vector2 eleRangeX, Vector2 eleRangeY)
Arguments
| Type | Name | Description |
|---|---|---|
Painter2D | p | |
MeshGenerationContext | mgc | |
Vector2 | dataRangeX | |
Vector2 | dataRangeY | |
Vector2 | eleRangeX | |
Vector2 | eleRangeY |
SetLineWidth
public void SetLineWidth(float width, string series)
Arguments
| Type | Name | Description |
|---|---|---|
float | width | Width, in pixels |
string | series | Name 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.