abstract class CSPX.Dashboard.Chart
extends Meter
Base class for SVG-based Charts for Dashboard.
parameter CHARTTYPE = "Chart";
Overridden by subclasses to specify which JS object to use for chart.
parameter MINHEIGHT = 75;
Minimum height, in logical units, of this meter.
parameter MINWIDTH = 75;
Minimum width, in logical units, of this meter.
property AutoScale
as %Boolean(XMLPROJECTION="ATTRIBUTE") [ InitialExpression = 0 ];
If true, then scale for this chart is adjusted automatically
to match current data values. RangeUpper and RangeLower are ignored.
By default, AutoScale is false.
If RangeUpper and RangeLower are not defined, then this will be set to true as a convenience.
property IndependentScale
as %Boolean(XMLPROJECTION="ATTRIBUTE") [ InitialExpression = 0 ];
If false, then all series for this chart share the same y-axis scale.
If true, then the range for each series is specified by each series.
By default, IndependentScale is true.
property LabelSource
as %String(MAXLEN=64,XMLPROJECTION="ATTRIBUTE");
Optional source for labels (along x-axis for line and bar charts).
This is the name of multi-dimensional metric property that contains
a list of label names.
If XDimensions is set to "instances", then this value is ignored.
property Points
as %Integer(XMLPROJECTION="ATTRIBUTE");
Number of points to display
property SeriesList
as list of ChartSeries(XMLNAME="Series",XMLPROJECTION="ELEMENT");
Optional collection of Series definitions for this chart.
If Series are defined the Property defined for this chart is ignored.
property Style
as %String(MAXLEN=100,XMLPROJECTION="ATTRIBUTE");
Style to apply to chart (this is a string and is dependent on the chart type).
Currently, the only available style is 'filled' for LineCharts.
property XDimension
as %String(MAXLEN=20,VALUELIST=",instances,series,history",XMLPROJECTION="ATTRIBUTE");
Specifies the source of X-series data:
By default, ("history") values are based on the elements within multi-dimensional Metric property;
If set to "instances", then values are based on the set of Metric instances for the Metric property.
If set to "series", then values are based on the first value of each data series associated with the chart.
property XGridLines
as %Integer(MINVAL=0,XMLPROJECTION="ATTRIBUTE") [ InitialExpression = 10 ];
Number of vertical grid lines
property XLabels
as %String(MAXLEN=10000,XMLPROJECTION="NONE");
Internal holder for initial x labels for series.
property YGridLines
as %Integer(MINVAL=0,XMLPROJECTION="ATTRIBUTE") [ InitialExpression = 8 ];
Number of horizontal grid lines
method GenerateCode(pCode As %CharacterStream, pLevel As %Integer = 1)
as %Status
Called by Dashboard class to generate code to
create an instance of this object.
The object instance is called tMeter.
method GetPoints()
as %String
Returns the number of points used for the metric associated with this meter.
This is relevant for multidimensional metrics and is based on the
AUTOHISTORY parameter (if defined).
method OnSVGBody()
Draw the body of this SVG meter
classmethod OnSVGHead()
Called before any scripts, styles, defs are written
Usually used to pick up include files
method OnSVGInitJS()
Generate JavaScript to initialize client-side
meter object
classmethod OnSVGScript()
Draw the script section of this SVG meter
classmethod OnSVGStyle()
Draw the style section of this SVG meter