All documentation

eXpress Chart

Build charts from eXpress scripts: chart types, options, methods, properties, and a worked 2200 example that pulls live values into a line chart.

Last updated May 8, 2008

What it is

eXpress Chart is the OLE-driveable charting component for the eXpress family. From a script you create a chart object, set its type and dimensions, push series data, and call DrawChart to render. The standalone application has a New Chart Wizard, a Grid view for editing values, and an Options dialog for chart, label, and color tabs.

Chart types and options

  • Line, Vertical Bar, Horizontal Bar, Pie (single series), Area, Scatter
  • Stacked, 3D Chart with adjustable 3D Amount
  • Show Guidelines and Set Range (Minimum / Maximum on Y-axis)
  • Header / Footer titles, X-axis / Y-axis labels, Label on each point
  • Default Series Color, AllValuesOneColor, RandomColors, SpecificColor

Key methods

  • AppToFront — bring the chart window to the front
  • ColHeaders(index, title) — set the header text for a series
  • SetData(col, row, value) — set one cell (col/row are 0-indexed; col 0 is the label column)
  • NewSeries — append a series
  • PasteData — paste from the clipboard into the grid
  • Print — print the current chart

Key properties

  • ChartType (0 Line, 1 VBar, 2 HBar, 3 Pie, 4 Area, 5 Scatter)
  • Rows / Columns — grid dimensions (Rows 0–100)
  • DataLabels (0 None, 1 Values, 2 Percentages)
  • UseRange + MinimumValue / MaximumValue — fixed Y-axis range
  • Xaxis / Yaxis — axis label strings

2200 example — live CPU utilization chart

chart.rows = 24
chart.columns = 2
chart.Header = "OSAM CPU Utilization"
chart.Charttype = 0          ' Line Chart
chart.chart3d = 1
chart.gridlines = 1
chart.DefaultSeriesColor = 1
chart.ColHeaders 0, ""
chart.ColHeaders 1, "Exec"
chart.ColHeaders 2, "User"
chart.UseRange = 1
chart.MinimumValue = 0
chart.MaximumValue = 100
chart.Stacked = 1
chart.YAxis = "Utilization Percent"
Note: When refreshing data on a timer, shift the existing values one position right before writing the newest sample, then call DrawChart once per refresh — not after every SetData.