Class: $.LineGraph

Inherits:
Toybox.Lang.Object show all

Overview

A simple line graph drawing class

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _graphArray as Lang.Array<Lang.Number or Lang.Float or Null>

var _graphColor as Graphics.ColorType

var _graphIndex as Lang.Number

var _graphMinRange as Lang.Number

var _graphRange as Lang.Array<Lang.Number or Lang.Float or Null>

Instance Method Details

addItem(value as Lang.Number or Lang.Float) as Void

Add an item to the line graph

Parameters:

  • value —

    Number to add to the graph

draw(dc as Graphics.Dc, topLeft as Lang.Array<Lang.Number>, bottomRight as Lang.Array<Lang.Number>) as Void

Draw the line graph

Parameters:

  • dc —

    Device context

  • topLeft —

    Array [x, y] of the top left corner

  • bottomRight —

    Array [x, y] of the bottom right corner

initialize(size as Lang.Number, minRange as Lang.Number, color as Graphics.ColorType)

Constructor

Parameters:

  • size —

    Number of points in the graph

  • minRange —

    Smallest range to use for the graph

  • color —

    Color to use to draw the graph


Generated Jun 9, 2026, 8:46:00 AM