Behavior Control
This control is developed by:
Avatarleversofpower
Created October 22 2015
Updated November 12 2015
Help Index

Ez Line Chart

How To Download and Use This Control

  1. Make sure you have the latest version of EZ-Builder installed.
  2. Select Download This Control button below to download the file.
  3. Double click the downloaded file to open it.
  4. The installer will automatically add this control to EZ-Builder.
Download This Control

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.