deprecatedclass %ZEN.Report.Display.COSChart.cchart
extends %ZEN.Report.Display.node, %ZEN.Report.Display.tableOutput
This is the abstract base class from which all SVG chart components are derived.
A chart provides a base on which to display a specific type
of chart (such as a barChart, lineChart, or pieChart).
This base class defines the data, grid (axes and scales), styles, and legend
used by charts.
All charts are plotted onto a virtual coordinate space that
measures 100 units by 100 units.
You can adjust the visual aspects of a chart by setting the various properties of this
class (plus any additional properties added by the specific chart subclass).
You can adjust the x and y axis settings (such as scaling and range) via the
xAxis and yAxis properties (which are objects of the type %ZEN.Auxiliary.axis).
parameter DEFAULTAPPEARANCE = "2D";
Default appearance of this component.
parameter DEFAULTASPECT = "none";
Do not worry about preserving the aspect ratio.
parameter DEFAULTAUTOSCALETEXT = 1;
Default setting for autoscaling text as chart resizes
parameter DEFAULTMARKERSVISIBLE = 0;
Default value for the markersVisible property.
parameter DEFAULTPLOTTOEDGE = 1;
Parameter SYSMODULE = "chart";
Default value for the plotToEdge property.
parameter DEFAULTVALUELABELSVISIBLE = 0;
Default value for the valueLabelsVisible property.
parameter DEFAULTVIEWBOXHEIGHT;
Default viewBoxHeight of this component.
This is set to 100 to provide a fixed coordinate system for meters.
parameter DEFAULTVIEWBOXWIDTH;
Default viewBoxWidth of this component.
This is set to 100 to provide a fixed coordinate system for meters.
property %controlBarH
as %Double(XMLPROJECTION="none");
property %dataDrivenSeriesColors
as %List(XMLPROJECTION="none");
Internal used by DeepSee to support data-driven series colors
property %dataSeries
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %date1900
as Date(XMLPROJECTION="none");
property %endUnits
as %String(XMLPROJECTION="none");
property %firstXLabelWidth
as %Double(XMLPROJECTION="none");
property %hzMaxStep
as %Double(XMLPROJECTION="none");
property %labelBottom
as %Double(XMLPROJECTION="none");
property %labelPad
as %Double(XMLPROJECTION="none");
property %labelPadL
as %Double(XMLPROJECTION="none");
property %labelPadR
as %Double(XMLPROJECTION="none");
property %lastXLabelWidth
as %Double(XMLPROJECTION="none");
property %legendHeight
as %Double(XMLPROJECTION="none");
property %legendRight
as %Double(XMLPROJECTION="none");
property %legendVisible
as %Boolean(XMLPROJECTION="none");
property %legendWidth
as %Double(XMLPROJECTION="none");
property %majorUnits
as %String(XMLPROJECTION="none");
property %marginBottom
as %Double(XMLPROJECTION="none");
property %marginLeft
as %Double(XMLPROJECTION="none");
property %marginRight
as %Double(XMLPROJECTION="none");
property %marginTop
as %Double(XMLPROJECTION="none");
property %maxScrollLeft
as %Double(XMLPROJECTION="none");
property %maxXHeight
as %Double(XMLPROJECTION="none");
property %minorUnits
as %String(XMLPROJECTION="none");
property %offset
as %String(XMLPROJECTION="none");
property %oldXMax
as %Double(XMLPROJECTION="none");
property %pixPerSec
as %Double(XMLPROJECTION="none");
property %plotBottom
as %Double(XMLPROJECTION="none");
property %plotBottomOut
as %Double(XMLPROJECTION="none");
property %plotHeight
as %Double(XMLPROJECTION="none");
property %plotLeft
as %Double(XMLPROJECTION="none");
property %plotLeftOut
as %Double(XMLPROJECTION="none");
property %plotRight
as %Double(XMLPROJECTION="none");
property %plotRightOut
as %Double(XMLPROJECTION="none");
property %plotTop
as %Double(XMLPROJECTION="none");
property %plotTopOut
as %Double(XMLPROJECTION="none");
property %plotWidth
as %Double(XMLPROJECTION="none");
property %rplotRight
as %Double(XMLPROJECTION="none");
property %rplotRightOut
as %Double(XMLPROJECTION="none");
property %rplotWidth
as %Double(XMLPROJECTION="none");
property %scaleX
as %Double(XMLPROJECTION="none");
property %scaleY
as %Double(XMLPROJECTION="none");
property %seriesColors
as %List(XMLPROJECTION="none") [ MultiDimensional ];
property %startUnits
as %String(XMLPROJECTION="none");
property %timeEvents
as %String(XMLPROJECTION="none") [ MultiDimensional ];
property %titleHeight
as %Double(XMLPROJECTION="none");
property %titleImageLeft
as %Double(XMLPROJECTION="none");
property %titleImageTop
as %Double(XMLPROJECTION="none");
property %titleImageWidth
as %Double(XMLPROJECTION="none");
property %xAxisLabelH
as %Double(XMLPROJECTION="none");
property %xAxisTitle
as %String(XMLPROJECTION="none");
property %xAxisTitleH
as %Double(XMLPROJECTION="none");
property %xBaseValue
as %Double(XMLPROJECTION="none");
property %xGridType
as %Double(XMLPROJECTION="none");
property %xLabelAngle
as %Double(XMLPROJECTION="none");
property %xLabelOnTheBottom
as %Boolean(XMLPROJECTION="none");
property %xLabelOnTheTop
as %Boolean(XMLPROJECTION="none");
property %xLabelStyle
as %Double(XMLPROJECTION="none");
property %xLabelUnits
as %Double(XMLPROJECTION="none");
property %xMajorGrid
as %Double(XMLPROJECTION="none");
property %xMajorGridStyle
as %Double(XMLPROJECTION="none");
property %xMajorUnits
as %Double(XMLPROJECTION="none");
property %xMaxValue
as %Double(XMLPROJECTION="none");
property %xMinValue
as %Double(XMLPROJECTION="none");
property %xMinorGrid
as %Double(XMLPROJECTION="none");
property %xMinorGridStyle
as %Double(XMLPROJECTION="none");
property %xMinorUnits
as %Double(XMLPROJECTION="none");
property %xRange
as %Double(XMLPROJECTION="none");
property %yAxisForSeries
as %List(XMLPROJECTION="none") [ MultiDimensional ];
property %yAxisTitle
as %String(XMLPROJECTION="none");
property %yBaseValue
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %yGridType
as %Double(XMLPROJECTION="none");
property %yLabelAngle
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %yLabelOnTheLeft
as %Boolean(XMLPROJECTION="none");
property %yLabelOnTheRight
as %Boolean(XMLPROJECTION="none");
property %yLabelStyle
as %String(XMLPROJECTION="none") [ MultiDimensional ];
property %yLabelUnits
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %yMajorGrid
as %Double(XMLPROJECTION="none");
property %yMajorGridStyle
as %Double(XMLPROJECTION="none");
property %yMajorUnits
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %yMaxValue
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %yMinValue
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %yMinorGrid
as %Double(XMLPROJECTION="none");
property %yMinorGridStyle
as %Double(XMLPROJECTION="none");
property %yMinorUnits
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property %yRange
as %Double(XMLPROJECTION="none") [ MultiDimensional ];
property FontXScale
as %ZEN.Datatype.float [ InitialExpression = .75 ];
adjust calculated width of text by multiplying by FontXScale
property FontYScale
as %ZEN.Datatype.float [ InitialExpression = 1.0 ];
adjust calculated height of text by multiplying by FontYScale
property appearance
as %ZEN.Datatype.string(VALUELIST=",2D,3D") [ InitialExpression = ..#DEFAULTAPPEARANCE ];
Controls the appearance of this chart.
Set this to "2D" (the default) for a standard chart appearance.
Setting this to "3D" will give the chart a 3-D appearance; the
plot area will appear to be recessed. Certain chart types, such are
bar charts, will display items with a 3-D look.
For pie charts, setting this to "3D" will display a pie chart with
a 3-D appearance, but will not affect the plot area.
property autoScaleText
as %ZEN.Datatype.boolean [ InitialExpression = ..#DEFAULTAUTOSCALETEXT ];
Specifies how the text elements of a chart should be handled when a chart is
resized. If True, the text scales in proportion to the chart itself and all
requested labels are rendered regardless of legibility. If false, the size of
the text elements is fixed with respect to the page and some lables may be
omitted to avoid visual overlap if insufficient space is provided to render the
values should the chart be scaled down beyond certain thresholds
property axisLineStyle
as %ZEN.Datatype.svgStyle;
Optional: style applied to line drawn for x and y axes.
property axisTitleStyle
as %ZEN.Datatype.svgStyle [ InitialExpression = "opacity:0.5;" ];
Optional: default style applied to axis titles for this chart.
This is applied in addition to the style supplied by labelStyle.
property backgroundStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for chart background panel.
property bandLeft
as %ZEN.Datatype.float;
If defined, then a colored band (specified by bandLeftStyle)
is displayed on the plot area covering the range lower than this value;
property bandLeftStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for left band on plot area.
property bandLower
as %ZEN.Datatype.float;
If defined, then a colored band (specified by bandLowerStyle)
is displayed on the plot area covering the range lower than this value;
property bandLowerStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for upper band on plot area.
property bandRight
as %ZEN.Datatype.float;
If defined, then a colored band (specified by bandRightStyle)
is displayed on the plot area covering the range greater than this value;
property bandRightStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for right band on plot area.
property bandUpper
as %ZEN.Datatype.float;
If defined, then a colored band (specified by bandUpperStyle)
is displayed on the plot area covering the range greater than this value;
property bandUpperStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for upper band on plot area.
property baseLineStyle
as %ZEN.Datatype.svgStyle;
Optional: style applied to base line.
property borderOffset
as %ZEN.Datatype.integer [ InitialExpression = 8 ];
Optional: distance (in pixels) between the background rectangle and the border.
property borderRadius
as %ZEN.Datatype.integer [ InitialExpression = 0 ];
Optional: radius applied to the chart's background rectangle and border.
property borderStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for border line inset from outer edge of chart.
property chartPivot
as %ZEN.Datatype.boolean;
property children
as list of node(XMLPROJECTION="NONE");
property controllerId
as %ZEN.Datatype.id(COMPONENTTYPE="dataController");
Optional. The id of the %ZEN.Report.Display.COSChart.abstractController object that
provides data for this chart.
If provided, this must be the valid id of a %ZEN.Report.Display.COSChart.abstractController object.
property currYAxis
as %ZEN.Datatype.integer(MINVAL=0) [ InitialExpression = 0 ];
Specifies which yAxis definition is used to drive the chart yaxis (0 based).
property dataDrivenSeriesColors
as %String(XMLPROJECTION="none");
Internal used by DeepSee to support data-driven series colors
property dataSeries
as list of dataSeries(XMLNAME="dataSeries",XMLPROJECTION="ELEMENT");
A dataSeries used to provide a series-worth of data for the report
property dateFormat
as %String(XMLPROJECTION="none");
property debugBBox
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
used for debugging label placement JSL3955
property endTime
as %ZEN.Datatype.string;
Latest displayed time (as YYYY-MM-DD HH:MM:SS).
This is used for the x axis in a timeBased chart.
property field
as %ZEN.Datatype.string(XMLPROJECTION="NONE");
property gridStyle
as %ZEN.Datatype.svgStyle;
Optional: default style applied to all grid line elements for this chart.
If defined, this style overrides any styles define in the CSS style
definition for the page, but is in turn overridden by any styles defined
by a specific axis element.
property group
as %ZEN.Datatype.string(XMLPROJECTION="NONE");
property hasZoom
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Optional: if true, display zoom in/out buttons (for certain chart types).
property height
as %ZEN.Datatype.length;
Height of the chart within the report.
property indicatorStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for indicators.
property indicatorsVisible
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Specifies whether indicator lines should be displayed for the selected item
within the chart.
This only applies to charts that display indicator lines.
property labelStyle
as %ZEN.Datatype.svgStyle;
Optional: default style applied to all grid label elements for this chart.
If defined, this style overrides any styles define in the CSS style
definition for the page, but is in turn overridden by any styles defined
by a specific axis element.
property labelsVisible
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, display axis labels for this chart (or slice labels in the
case of a pie chart).
property legendHeight
as %ZEN.Datatype.length;
If this chart has a legend, height (within the chart coordinate space) of legend box.
If not specified a default height (based on number of data series) will be used.
property legendLabelStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for text within the legend box.
property legendLabels
as %ZEN.Datatype.csv;
Optional: legendLabels
property legendPosition
as %ZEN.Datatype.string(VALUELIST=",top,left,bottom,right,none");
Optional: legend position
property legendRectStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for rectangle indicating the current legend within the legend box.
property legendStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for background of the legend box.
property legendTitle
as %ZEN.Datatype.caption;
Title to display for legend box.
property legendVisible
as %ZEN.Datatype.string(VALUELIST=",auto,false,true") [ InitialExpression = "auto" ];
If true, display a legend for this chart.
If "auto" then the legend is displayed if there is more than one data series
for the chart.
property legendWidth
as %ZEN.Datatype.length;
If this chart has a legend, width (within the chart coordinate space) of legend box.
If not specified a default width will be used.
property legendX
as %ZEN.Datatype.length;
If this chart has a legend, x-position (within the chart coordinate space) of legend box.
If not specified a default position will be used.
property legendY
as %ZEN.Datatype.length;
If this chart has a legend, y-position (within the chart coordinate space) of legend box.
If not specified a default position will be used.
property lineStyle
as %ZEN.Datatype.svgStyle;
Optional: default style applied to svg line elements within line-style charts.
property marginBottom
as %ZEN.Datatype.length;
Margin (within the chart coordinate space) from bottom edge of chart to bottom edge of grid (plot area).
If not specified, then this value will be automatically calculated.
property marginLeft
as %ZEN.Datatype.length;
Margin (within the chart coordinate space) from left edge of chart to left edge of grid (plot area).
If not specified, then this width will be automatically calculated.
property marginRight
as %ZEN.Datatype.length;
Margin (within the chart coordinate space) from right edge of chart to right edge of grid (plot area).
If not specified, then this width will be automatically calculated.
property marginTop
as %ZEN.Datatype.length;
Margin (within the chart coordinate space) from top edge of chart to top edge of grid (plot area).
If not specified, then this value will be automatically calculated.
property markerScale
as %ZEN.Datatype.float [ InitialExpression = 1 ];
Scaling applied to chart markers:
A value of 1.0 (or '') will display markers with their default size.
This only applies to charts that support markers.
property markerShapes
as %ZEN.Datatype.csv [ InitialExpression = "circle,up,down,square" ];
Comma-delimited list of marker shapes used for data series markers.
Possible values are 'up','down','square','circle'.
This only applies to charts that support markers.
property markerStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for series markers.
property markersVisible
as %ZEN.Datatype.boolean [ InitialExpression = ..#DEFAULTMARKERSVISIBLE ];
Specifies whether markers should be displayed for the data
points within the chart.
This only applies to charts that display markers.
property maxLabelLen
as %ZEN.Datatype.integer [ InitialExpression = 20 ];
Maximum number of characters to display for an axis label.
property msgIfNoData
as %ZEN.Datatype.caption [ InitialExpression = "No Data" ];
localized warning message if chart has no data
property multipleTitleStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for title text within each "multiple" charts.
Used when showMultiples is enabled.
property noDataFill
as %ZEN.Datatype.color [ InitialExpression = "red" ];
fill color rectange
property noDataOpacity
as %ZEN.Datatype.float [ InitialExpression = 1.0 ];
opacity of no data message background rectangle
property noDataStroke
as %ZEN.Datatype.color [ InitialExpression = "white" ];
color of message
property oldLabelCalc
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
turns on category value calcuation of JMD1100 (this is in JSL3955)
property ongetData
as %ZEN.Datatype.string;
ongetData method
This method is called by the chart
to get an array of values to plot for a data series.
The array has the format values(s,i) where s is the series
and is i is the member of the series and values(s,i) is numeric.
The method is passed an argument, chart,
that is this chart object.
property ongetLabelX
as %ZEN.Datatype.string;
ongetLabelX event handler:
This method, if defined, is called by the chart
to get the text for a given label on the x axis.
The method is passed an argument, value,
that contains the ordinal number (0-based) of the label.
The method is passed an argument, chart,
that is this chart object.
property ongetLabelY
as %ZEN.Datatype.string;
ongetLabelY event handler:
This method, if defined, is called by the chart
to get the text for a given label on the y axis.
The method is passed an argument, value,
that contains the ordinal number (0-based) of the label.
The method is passed an argument, chart,
that is this chart object.
property ongetSeriesName
as %ZEN.Datatype.string;
ongetSeriesName event handler:
This method, if defined, is called by the chart
to get the text for a given series number.
The method is passed an argument
that contains the ordinal number (0-based) of the series name.
The method is passed an argument, chart,
that is this chart object.
property ongetTimeEvents
as %ZEN.Datatype.eventHandler;
ongetTimeEvents event handler:
This event handler, if defined, is called by the chart
to get an array of "time events" to display for a time chart.
property onrenderData
as %ZEN.Datatype.eventHandler;
onrenderData callback:
This callback, if defined, is called by the chart
just after it is finished displaying grid lines and data.
The event handler is passed an argument, chart,
that is this chart object. If it also passed group,
which is the SVG group to which any new svg content should be added.
property passChartObject
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
pass the chart object to onget... methods, set it to false for old behavior where no chart object passed
property plotAreaStyle
as %ZEN.Datatype.svgStyle [ InitialExpression = "fill:url(#glow-silverDiag);" ];
Optional: style used for chart plot area panel.
property plotEdgeStyle
as %ZEN.Datatype.svgStyle;
Optional: for charts with a 3D look, this style is applied
to the edges on the left and bottom.
property plotStyle
as %ZEN.Datatype.svgStyle;
Optional: default style applied to svg elements used for plotting
data by this chart (such as the bars within a bar chart).
Note: lines within line charts use the lineStyle property.
property plotToEdge
as %ZEN.Datatype.boolean [ InitialExpression = ..#DEFAULTPLOTTOEDGE ];
Specifies how values should be plotted along a category axis.
If true, plot the first and last values on the edges of the plotArea
(as in a line chart). If false, plot values in the centers of each
unit (as in a bar chart).
This is specified by subclasses.
property removeEmpty
as %ZEN.Datatype.boolean(XMLPROJECTION="NONE") [ InitialExpression = 0 ];
property scrollButtonStyle
as %ZEN.Datatype.svgStyle;
Optional: style applied to zoom and scroll buttons when visible.
property selectedItem
as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Item number (0-based) of currently selected chart element, if any.
property selectedItemStyle
as %ZEN.Datatype.svgStyle [ InitialExpression = "stroke:darkgreen;stroke-width:3px;" ];
Optional: style used to indicate the current selected chart element.
property selectedSeries
as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Series number (0-based) of currently selected chart element, if any.
property seriesColorScheme
as %ZEN.Datatype.string(VALUELIST=",urban,tuscan,caribbean,rustbelt,bright,glow,gray,pastel,solid") [ InitialExpression = "tuscan" ];
This is the name of a built-in color scheme used to plot
data series for the chart.
If seriesColors is defined, then this
property is ignored.
property seriesColors
as %ZEN.Datatype.csv;
Comma-delimited list of CSS color values used for data series.
This can be set to a list of SVG fill color values, e.g.,
"red,green,blue" or "url(#glow-red),url(#glow-green),url(#glow-blue)".
The first color is used by the first data series and so on. If there are
more data series than colors, the colors are repeated.
If this is not defined the colors defined by seriesColorScheme
are used.
property seriesColorsOverride
as %ZEN.Datatype.csv;
Additional Comma-delimited list of CSS color values used for data series.
If supplied, this is merged with the colors in the seriesColors list.
This makes it possible to override specific colors within a chart while preserving
the underlying default colors.
property seriesCount
as %ZEN.Datatype.integer(MINVAL=0);
Number of data series to display on this chart.
If "", then this is computed automatically from the chart's data source when the
chart is connected to a dataController.
property seriesNames
as %ZEN.Datatype.csv;
Comma-delimited list of names used to label each data series in the legend box.
This is a localized value (the entire list is treated as one localized string).
property seriesNumber
as %ZEN.Datatype.integer(MINVAL=0);
Optional. If defined then the chart will only plot the specified data series (0-based) when connected
to a data controller. This is used by DeepSee in some cases.
property seriesSize
as %ZEN.Datatype.integer(MINVAL=0);
Number of items within each data series to display on this chart.
If "", then this is computed automatically from the chart's data source when the
chart is connected to a dataController.
property seriesYAxes
as %ZEN.Datatype.csv;
Optional. If defined, specifies which y-axis should be used for each data
series. This is a csv-list of y-axis numbers (0-based).
By default, the every data series uses y-axis 0.
property showMultiples
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Optional: If true, display chart as number of small multiple charts, one per data series.
This is only used by charts that support small multiples otherwise it is ignored.
property startTime
as %ZEN.Datatype.string;
Earliest displayed time (as YYYY-MM-DD HH:MM:SS).
This is used for the x axis in a timeBased chart.
property stripeStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for grid stripes (when enabled).
property stripesVisible
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Optional: if true, draw stripes over value axis grid lines.
property subtitle
as %ZEN.Datatype.caption;
Subtitle to display for chart.
property subtitleStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for subtitle text.
property svgGroup
as %ZEN.Report.Display.COSChart.node;
property textSize
as %ZEN.Datatype.string(VALUELIST=",small,medium,large") [ InitialExpression = "medium" ];
Optional: if "medium", use the default font sizes specified by the CSS for the chart.
if "small" or "large" adjust the size of any text in the chart that does not have an explicit
style set (via a property).
property timeBased
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Optional: If true, then the x-axis for this chart is a time line displaying date values
from startTime to endTime.
In this case, the series names for data are interpreted as time values (YYYY-MM-DD HH:MM:SS).
This setting only works in a few cases, namely non-pivotted line charts. For all other
cases this setting is ignored.
property title
as %ZEN.Datatype.caption;
Title to display for chart.
property titleAlign
as %ZEN.Datatype.string(VALUELIST=",center,left,right") [ InitialExpression = "center" ];
Optional: alignment for title and subtitle.
property titleBoxStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for box underneath title text.
property titleImage
as %ZEN.Datatype.uri;
Optional: URL of image to display within the title area.
property titleImageStyle
as %ZEN.Datatype.svgStyle;
Optional. Style for titleImage: left,top,width, and height.
property titleStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for title text.
property titleX
as %ZEN.Datatype.length;
If this chart has a title, x-position (within the chart coordinate space) of the title.
If not specified, then a default value is calculated.
property titleY
as %ZEN.Datatype.length;
If this chart has a title, y-position (within the chart coordinate space) of the title.
If not specified, then a default value is calculated.
property topLevel
as %ZEN.Report.Display.COSChart.node;
property unselectedItemStyle
as %ZEN.Datatype.svgStyle [ InitialExpression = "opacity:0.5;" ];
Optional: style used to indicate unselected chart elements.
This is used when there is a selected element.
property valueBoxStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for boxes around value labels.
This only applies to charts that display element values (such as bar charts).
property valueLabelFormat
as %ZEN.Datatype.string;
Optional: numeric format applied to value labels.
This only applies to charts that display element values (such as bar charts).
property valueLabelStyle
as %ZEN.Datatype.svgStyle;
Optional: style used for value labels.
This only applies to charts that display element values (such as bar charts).
property valueLabelsVisible
as %ZEN.Datatype.boolean [ InitialExpression = ..#DEFAULTVALUELABELSVISIBLE ];
Specifies whether values should be displayed for elements within the chart.
This only applies to charts that display element values (such as bar charts).
property viewBoxHeight
as %ZEN.Datatype.integer [ InitialExpression = ..#DEFAULTVIEWBOXHEIGHT ];
If defined, this is used to calculate the height of the
viewBox attribute of the enclosing svg element.
property viewBoxWidth
as %ZEN.Datatype.integer [ InitialExpression = ..#DEFAULTVIEWBOXWIDTH ];
If defined, this is used to calculate the width of the
viewBox attribute of the enclosing svg element.
property warnIfNoData
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Set to 1 to display a localized warning message if chart has no data
property xAxis
as caxis(XMLPROJECTION="ELEMENT");
x axis specification for this chart.
property yAxis
as caxis(XMLPROJECTION="none");
Deprecated. y axis specifications for this chart.
This is replaced by yAxisList. This property is kept here so that
applications that set yAxis directly will still function.
property yAxisList
as list of caxis(XMLPROJECTION="ELEMENT",XMLREF=1,XMLTYPECONSTRAINT="CHOICE");
List of y axis specifications for this chart.
property zenMonthShortNames
as %ZEN.Datatype.caption(XMLPROJECTION="none") [ InitialExpression = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" ];
method %DrawToHTML(ByRef context As %String, XSL As %GlobalCharacterStream, delay As %GlobalCharacterStream, ByRef incell As %Boolean)
as %Status
This method outputs the necessary stylesheet information for the HTML report.
Every tag should override this method.
method %DrawToXSLFO(ByRef context As %String, XSL As %GlobalCharacterStream, delay As %GlobalCharacterStream, ByRef incell As %Boolean)
as %Status
This method outputs the necessary stylesheet information for the PDF report.
Every tag should override this method.
method GetBBox(text As node, rotate, scaleX, scaleY, align)
as bbox
classmethod ParseCSSStyle(pClassName As %String, ByRef pParsedClasses As %String)
Parse an SVGStyle XData block and put results in pParseClasses
pParsedClasses(classname, attribute)=value
classmethod Test()
method adjustChartTitle()
Adjust position of chart title and legend (if needed).
method calcVertex(x0, y0, x, y, theta, Output x2, Output y2)
method calculateAxisConstraints()
If the plot has axes, pre-calculate the internal values that will be used
to govern how those axes are rendered
method calculateLegendDimensions()
Draw the legend for the chart.
method calculateViewBox()
JMD1100 - this is in canvas in ZEN
Calculate the value of the viewBox attribute of this
component's enclosing svg element.
Subclasses can override this, should they need to provide
a different behavior.
The default behavior is to use the width and height of this component
to come up with a 1 to 1 coordinate mapping; If the component
provides values for the viewboxWidth and
viewboxHeight properties, then these are used to
calculate the viewBox (and thus define a fixed coordinate system for the component).
method calculateXAxisHeight()
method calculateXAxisTitleHeight()
method computeEffectiveExtents(x, y, w, h, angle)
as extent
method computeScale(size, axis)
method computeStyle(className, idName)
Compute and return the effective style that governs the rendering
of a given SVG element based on class and Id
method computeXAxisTimeLine()
Compute scaling information for a time-based x-axis.
method computeXFontSize(text As node, size As %Double)
method computeYFontSize(text As node, size As %Double)
method createMarker(series, item, x, y, color, type, noevents)
as node
Create a plot marker.
This may be used by subclasses to display markers.
type can be 'up','down','circle','square'.
method createSVGTextNode(caption, fontSize, autoScale, align, rotate, parentNode, txtClass, txtStyle)
as node
Create a text node.
method createXLabelNode(index, fontSize, style, angle, group)
method embedStyle(element, styleNVP)
Embed the various settings of a computed style name-value object
as direct attributes of the given node.
method getCellInfo(cell, majorUnits, minorUnits, index)
Return information about a cell within a time line grid.
method getChartSubtitle()
Get subtitle for the chart.
method getChartTitle()
Get title for the chart.
method getColorSchemeArray(scheme)
as %List
Return an array of color values for given data series
color scheme.
method getComputedFontSize(styleNVP, defaultMedium, defaultSmall, defaultLarge)
Given a resolved style name-value pairing object, return the specified font
size, if none has been specified, return one of three default values based on the
value of the textSize property.
method getComputedTextLength(text As node)
as %Double
method getCurrYAxis(which)
Get the current y Axis definition used for this chart.
which is "left" or "right".
method getDataSeriesCount()
method getDataSeriesLength()
Return the length of %dataSeries(0)
method getEndTime()
Get the end time for a time-based chart.
method getLegendLabels()
Return an array of labels to display within the Legend box.
Default implementation is to return a list of series names.
method getLegendRectStyle(s)
Use in chart to give a specifc style to legend
Can be overriden by descendent class
method getLegendsCount(legends)
method getMarkerShape(series)
Return the marker type that should be used for the given series.
method getNumericAbbreviation(val, min, max)
Return a numeric abbreviation for a value.
min and max are range that value falls within.
E.g., 10K for 10000
method getPelToPixelHRatio()
The Normalized viewbox ranges from 0 0 to 100 100, the physical space
occupied by the chart is specified as the width and height (in pixels) of
the base SVG group. This function returns a mapping of logical picture
units to pixels in the horizontal direction.
method getPelToPixelVRatio()
The Normalized viewbox ranges from 0 0 to 100 100, the physical space
occupied by the chart is specified as the width and height (in pixels) of
the base SVG group. This function returns a mapping of logical picture
units to pixels in the vertical direction.
method getPlotX(val)
Given a logical value, return the corresponding x-axis
coordinate.
method getPlotY(val, yAxisNo)
Given a logical value, return the corresponding y-axis
coordinate.
method getRangeGroupForSeries(series)
Indicate which "group" should be used for computing axis ranges.
This is overridden by combo charts.
method getSelectedItem()
Returns index number (0-based) of the
current selected item, or -1 if there is no current selection.
method getSelectedSeries()
Returns index number (0-based) of the data series of the
current selected item, or -1 if there is no current selection.
method getSelectedStyle(series, item, isMarker)
Return any addition select/unselect style to apply to a chart element.
method getSeriesColor(series)
Return the CSS color that should be used for the given series.
0 based
method getSeriesCount()
Return the number of data series for this chart.
method getSeriesData(series)
as %List
Return data values for the given series (0-based)
from the chart's data cache. Return data in %List format.
method getSeriesNames()
as %List
Return an array containing the names of the data series for this chart.
If a name is missing, the series number is used.
method getSeriesNamesSize()
method getSeriesSVGGroup()
Return svg group elemment that contains the data series elements.
method getSeriesSize()
Return the number of items within each data series
(this assumes that all data series have the same number of items).
method getSeriesType(series)
Return the type (how a series should be displayed) for the given data series (0-based).
This is used by combo chart and ignored by all others.
method getStartTime()
Get the start time for a time-based chart.
method getStyleArray(styles As %String, ByRef array As %String)
method getTextWidth(text, xfontsize)
method getTimeX(time)
For a given time value, YYYY-MM-DD, find the corresponding x coordinate in virtual pixels.
method getXAxis()
Return the x Axis definition for this chart.
method getXAxisTitle()
Return the x axis title.
method getXAxisType()
Return the type of x axis (category or value) used by
this chart.
method getXLabelText(val, base, noformat)
Given a logical value, return the text to use for an axis label.
Subclasses can override this for custom behavior.
method getYAxis(index)
Return the y Axis definition for this chart.
method getYAxisCount()
Return the number of y Axis definitions for this chart.
method getYAxisTitle(which)
Return the y axis title.
method getYAxisType()
Return the type of y axis (category or value) used by
this chart.
method getYLabelText(val, yAxisNo, base)
Given a logical value, return the text to use for an axis label.
Subclasses can override this for custom behavior.
method hasAxes()
Indicates that this chart has axes and associated grids
A subclass may override this to turn off axis display.
method hasMultiples()
Indicates that this chart supports and is in "show multiples" mode.
A subclass may override this.
method hasSelectedItem()
Returns if there is a current selected element.
method initializeAxisProperties()
method integrateStyleSpec(styleNVP As styleNVP, newRule As %String)
Integrate a new Style specification into an existing set of
name-value style pairs, adding and overwriting existing styles
as appropriate
method is3D()
Indicates whether this chart should be drawn with a 3-D
appearance.
method isTimeBased()
Test if a time-based x axis should be used.
This is overridden in subclasses.
method makeId(id As %String)
method max(x1, x2, x3, x4)
method min(x1, x2, x3, x4)
method myCountSpaces(text)
method pickVerticalSkips(flag, max)
This is the core of the vertical decimation algorithm. Given a maximum number of label
to choose from an array, pick a subset that will (hopefully) use the available
space effectively and keep things visually balanced.
method plotLineForSeries(group, s, ByRef data, stacked, chartFilled, markersVisible, hasEvents)
Draw a line for one data series, s (0-based).
data contains the data for all series as an array of arrays.
in Java Script s was 0-based, in this code it is 0 based
Data is 0-based, colors and shapes are 0-based
method prepareAxisGroup(idName, parentNode)
Prepare the axis group for population with axis information
method removeChildNodes(node As node)
method renderAxes()
Draw the x and y axes and grid lines.
method renderBands()
Draw the upper/lower bands for the chart.
method renderContents()
Client-side method to render control.
method renderLegend()
Draw the legend for the chart.
method renderPlotArea()
Draw the plot area of the chart.
method renderSeries(group)
Draw data series for this chart.
This is implemented by subclasses.
group is the SVG container for the chart components.
method renderSeriesGroup()
Draw the data series for this chart.
This method renders the container for the data series and
then invokes a sub-class specific renderSeries method.
method renderTimeEvents(group)
Render a set of time-events within the chart.
method renderTitle()
Draw the title for the chart. Return the height of the title.
method renderXAxisTimeLine(timeCellGroup, y)
Render x-axis labels and tick marks for time-based x-axis.
method renderXAxisTitle(group)
Draw the title section for the Y axis (if any) and
return the height reserved for the rendering
method renderXLabels()
Draw the labels for the x axis.
method renderYAxisTitle(group, which, xpos)
Draw the title section for the Y axis (if any) and
return the width reserved for the rendering
method renderYLabels(which)
Draw the labels for the y axis.
If test is true, then this is a "test" plot to determine
the max width of the labels.
classmethod split(str As %String, delim As %String, isXMLEscaped As %Boolean = 0)
as %List
method stripWhitespace(str)
method unrender()
Remove the inner SVG for this component.
See %ZEN.Display.COSCHart.node for methods being called
method updateIndicator()
Update the "indicator" (crosshairs) for the selected item.
method usePercentForRange()
This method returns true if data series is a "percentage bar chart" and so
calculated data range should be 0 to 100%
method useSumForRange()
This method returns true if data series should be summed
when calculating data range for the chart.
Typically a chart will return true if it is in "stacked" mode.
method xToLogical(val)
Convert a user-provided x-coordinate into 0-100 logical space.
This means: 10 returns 10, but "10px" is converted using the current width of the chart.
method yToLogical(val)
Convert a user-provided y-coordinate into 0-100 logical space.
This means: 10 returns 10, but "10px" is converted using the current height of the chart.
classmethod zenGet(value, defvalue)
zen