Plugins / leversofpower / EZ Chart

EZ Chart

Basic 4 series bar chart for comparing your robots sensor values at a glance.

Register   Download Plugin

This plugin is version 4, was last modified on 11/12/2015, and is 10,537 Bytes. The author is leversofpower.

Requirements

This plugin requires EZ-Builder for Microsoft Windows PC.

  Get EZ-Builder for Windows

Plugin Details

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.