Thumbnail

Ez Line Chart

How To Add This Control To Your Project

  1. Make sure you have the latest version of EZ-Builder installed.
  2. Select the Install button below to download the archive file.
  3. Double click the downloaded archive file to execute installer.
  4. The installer will add this control to EZ-Builder.
  5. Load EZ-Builder and press the Project -> Add Control button from the menu.
  6. Choose the Graphs category tab.
  7. Press the Ez Line Chart icon to add the control to your project.

Code example 1:

Code:


$multiplier = 0

ControlCommand("EZ Line Chart", SetTitle, "EZ Robot Sensors")

$Series1Name = "Sensor 1"
$Series2Name = "Sensor 2"
$Series3Name = "Acceptable"
$Series4Name = "Maximum"

ControlCommand("EZ Line Chart", SetSeriesTitle, 0, $Series1Name)
ControlCommand("EZ Line Chart", SetSeriesTitle, 1, $Series2Name)
ControlCommand("EZ Line Chart", SetSeriesTitle, 2, $Series3Name)
ControlCommand("EZ Line Chart", SetSeriesTitle, 3, $Series4Name)

# Set new bar colors
ControlCommand("EZ Line Chart", SetSeriesColor, 0, 0,0,200)
ControlCommand("EZ Line Chart", SetSeriesColor, 1, 50,50,50)
ControlCommand("EZ Line Chart", SetSeriesColor, 2, 0,200,0)
ControlCommand("EZ Line Chart", SetSeriesColor, 3, 200,0,0)

:loop
# Multiplier
$multiplier = $multiplier + .001
# Assign random numbers as grid values
$randSeries1 = GetRandom(0, 100 )
$randSeries1 = $randSeries1 * $multiplier
ControlCommand("EZ Line Chart", SetSeriesValue, $Series1Name, $randSeries1 + 25)
$randSeries2 = GetRandom( 0, 100 )
$randSeries2 = $randSeries2 * $multiplier
ControlCommand("EZ Line Chart", SetSeriesValue, $Series2Name, $randSeries2 + 5)
#Fixed Line Green
ControlCommand("EZ Line Chart", SetSeriesValue, $Series3Name, 5)
#Fixed Line Red
ControlCommand("EZ Line Chart", SetSeriesValue, $Series4Name, 45)

Sleep( 500 )
Goto (loop)


Clear Series Code Example:

Code:


ControlCommand("Ez Line Chart", ClearSeries, 0)
ControlCommand("Ez Line Chart", ClearSeries, 1)
ControlCommand("Ez Line Chart", ClearSeries, 2)
ControlCommand("Ez Line Chart", ClearSeries, 3)


Additional notes on X Axis time display:
if point count 120 then time format is "hh:mm:ss"
if point count > 1200 then time format is "hh:mm"
if point count > 12000 then time format is "mm/dd hh:mm"

Versions
10/29/2015 V1.0 Can change color of line. Can change color of lines conditionally using EZ-Script. See script example.