Skip to main content

Chart Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Simple chart with a single series. Not a standard .NET widget: the API mirrors TinyCLR's Chart for ease of porting.

class Chart(Widget): ...

Constructors​

Chart(Widget parent)​

def __init__(self, parent: Widget):

Create a chart inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Properties​

DivisionAxisY​

DivisionAxisY: int # @property / @setter

Number of horizontal division lines on the Y axis. Getter returns the last value set.

Returns int

Mode​

Mode: ChartMode # @property / @setter

How the series is drawn. Getter returns the last value set (LVGL has no read-back).

Returns ChartMode

Methods​

SetColors(uint pointColor, uint areaColor, uint labelColor)​

def SetColors(self, pointColor: int, areaColor: int, labelColor: int) -> None:

Set the chart's drawing colors.

ParameterTypeDescription
pointColoruintLine / column color as 0x00RRGGBB.
areaColoruintFill color under the line as 0x00RRGGBB (used when Chart.Mode is ChartMode.Area).
labelColoruintAxis label color as 0x00RRGGBB.

SetPoints(int[] values)​

def SetPoints(self, values: list[int]) -> None:

Replace the full series with values. The chart redraws in order left-to-right.

ParameterTypeDescription
valuesint[]Point values; may be null or empty to clear.