deprecatedclass %ZEN.SVGComponent.treeMapChart
extends chart
This is an SVG chart component that displays a tree map.
A tree map displays a series of values as a set of rectangles. The area of
each rectangle is proportional to its value. Negative values are ignored.
property ongetColorScaleData
as %ZEN.Datatype.eventHandler;
ongetColorScaleData event handler:
This event handler, if defined, is called by the chart to compute the color scale
for a given data item. It should match the format of ongetData,
returning corresponding color scale values for each data point returned by
ongetData. For example, to scale the colors of each data point
according to the "value" of that data point itself, set this property to the
same event handler as ongetData.
The scaled colors will be using the first color defined in
seriesColorScheme, optionally overridden by
seriesColors.
property showPercentage
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, percentage values (rounded to 2 decimal places integer) are displayed as
part of the label for each box.
method convertToRGB(string)
[ Language = javascript ]
Returns a 3-element array containing the RGB values for the string input.
Supporte inputs:
- RGB format: fe 'rgb(123,45,67)' => { 123, 45, 67 }
- HEX format, with or without leading #: fe '#ff0000' => { 255, 0, 0 }
- predefined CSS colors: fe 'white' => { 255, 255, 255 }
Throws a simple string error message if unsupported input is being supplied (such as "url(#glow-red)")
method getChartElementStyle(series, item)
[ Language = javascript ]
Return default style for slice element.
method getFGColor(background)
[ Language = javascript ]
Based on the supplied background color, return an appropriately contrasting foreground
color (for text labels). Currently, returns either black or white based on background
brightness
method getLegendLabels()
[ Language = javascript ]
Return an array of labels to display within the Legend box.
Override to get appropriate labels for TreeMap Chart.
method getSeriesColor(index, series, itemNo)
[ Language = javascript ]
Return the CSS color that should be used for the given series.
method hasAxes()
[ Language = javascript ]
Indicates that this chart has no axes and associated grids
method hasMultiples()
[ Language = javascript ]
Indicates that this chart supports "show multiples" mode.
method is3D()
[ Language = javascript ]
Do not show 3-D plot area.
method plotItems(group, dataItems, width, height, x, y, qCount, seriesNumber)
[ Language = javascript ]
Plot map items onto the chart.
method plotOneBox(group, seriesNo, itemNo, x, y, width, height, value)
[ Language = javascript ]
Render one item in the chart.
method renderSeries(group)
[ Language = javascript ]
Draw data series for this chart.
group is the SVG container for the chart components.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.