This control is developed by:
Avatarleversofpower

EZ Chart

Control Thumbnail

How To Download and Use This Control

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

EZ-Script Basic Example Usage:

Code:


#Set Titles
ControlCommand("EZ Chart", SetTitle, "EZ Robot Sensors")
ControlCommand("EZ Chart", SetSeriesTitle, 0, "Front Sensor")
ControlCommand("EZ Chart", SetSeriesTitle, 1, "Right Sensor")
ControlCommand("EZ Chart", SetSeriesTitle, 2, "Left Sensor")
ControlCommand("EZ Chart", SetSeriesTitle, 3, "Back Sensor")

#Set inital bar colors
ControlCommand("EZ Chart", SetSeriesColor, 0, 50,50,50)
ControlCommand("EZ Chart", SetSeriesColor, 1, 100,100,100)
ControlCommand("EZ Chart", SetSeriesColor, 2, 150,150,150)
ControlCommand("EZ Chart", SetSeriesColor, 3, 200,200,200)

:loop
# Assign random numbers as grid values
$randSeries1 = GetRandom(70, 100 )
ControlCommand("EZ Chart", SetSeriesValue, 0, $randSeries1)
$randSeries2 = GetRandom( 90, 100 )
ControlCommand("EZ Chart", SetSeriesValue, 1, $randSeries2)
$randSeries3 = GetRandom( 0, 90 )
ControlCommand("EZ Chart", SetSeriesValue, 2, $randSeries3)
$randSeries4 = GetRandom( 0, 30 )
ControlCommand("EZ Chart", SetSeriesValue, 3, $randSeries4)

#Conditional warning coloring
if ($randSeries1 > 95) then
ControlCommand("EZ Chart", SetSeriesColor, 0, 255,0,0)
Else
ControlCommand("EZ Chart", SetSeriesColor, 0, 50,50,50)
endif

Sleep( 100 )
Goto (loop)


Versions
10/22/2015 V3.0 Can change color of bars. Can change color of bars conditionally using EZ-Script. See script example.

11/12/2015 V4.0 RGB Colors are now integers. Refer to series by number instead of string. Additional code clean up.