DocBook|Search
Class Reference
%ZEN.SVGComponent.pieChart
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%ZEN] >  [SVGComponent] >  [pieChart]
Private  Storage  

class %ZEN.SVGComponent.pieChart extends chart

This is an SVG chart component that displays a pie chart.
The plotBy property specifies how the slices of the chart and their labels should be calculated.
The size of each slice is adjusted proportionally so that a complete circle is formed.
The colors of the slice is determined by the seriesColors property. If there are more slices than colors, then the colors are repeated.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 6 14


Summary

Properties
%condition %controller %import %includeFiles
%page %resource appearance autoScaleText
aux axisLineStyle axisTitleStyle backgroundStyle
bandLower bandLowerStyle bandUpper bandUpperStyle
borderRadius borderStyle boundless composite
controller controllerId currYAxis document
gridStyle hasZoom height hidden
holeSize id index labelStyle
labelsVisible legendHeight legendLabelStyle legendStyle
legendTitle legendVisible legendWidth legendX
legendY marginBottom marginLeft marginRight
marginTop markerScale markerShapes markerStyle
markersVisible multipleTitleStyle name onclick
onelementClick ongetData ongetLabelX ongetLabelY
onnotifyView onrenderData onrenderPlotArea onshowTooltip
onupdate parent pieHeight pieScale
plotAreaStyle plotBy plotEdgeStyle plotStyle
plotToEdge position preserveAspectRatio rotateBy
scrollButtonStyle selectedItem selectedItemStyle selectedSeries
seriesColorScheme seriesColors seriesColorsOverride seriesCount
seriesNames seriesNumber seriesSize seriesYAxes
showMultiples showPercentage stripeStyle stripesVisible
svgComponent svgGroup textSize title
titleBoxStyle titleStyle titleX titleY
tuple valueLabelStyle valueLabelsVisible viewBoxHeight
viewBoxWidth visible width window
x xAxis y yAxis
yAxisList

Methods
%%OIDGet %AddToSaveSet %Attr %BindExport
%ClassIsLatestVersion %ClassName %ConstructClone %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %DrawHTML %DrawJSStrings
%Eval %Extends %ForceClientRender %GetEventHandlers
%GetParameter %GetXMLName %IsA %IsModified
%MakeId %New %NormalizeObject %ObjectModified
%OnAddToPageAfter %OnAddToPageBefore %OnDrawObjectProperties %OnObjectSynch
%OnZENDeserialize %OriginalNamespace %PackageName %QuoteValue
%QuoteValueL10N %RemoveFromSaveSet %Self %SerializeObject
%SetModified %ValidateObject XMLDTD XMLExport
XMLExportToStream XMLExportToString XMLNew XMLSchema
XMLSchemaNamespace XMLSchemaType addCommas adjustChartTitle
beginWaitState calculateAxisConstraints calculateViewBox calculateXAxisHeight
calculateXAxisTitleHeight calculateYAxisWidth chartElementClickHandler clickHandler
computeEffectiveExtents computeStyle createMarker createSVGTextNode
createXLabelNode embedStyle endWaitState findElement
findSVGElement fireOnUpdateEvent getChartElement getChartElementStyle
getChartRelatedElements getChartTitle getColorSchemeArray getComputedFontSize
getController getFrame getLegendLabels getMarkerShape
getNumericAbbreviation getPelToPixelHRatio getPelToPixelVRatio getPlotBy
getPlotX getPlotY getProperty getRangeGroupForSeries
getSelectedItem getSelectedSeries getSeriesColor getSeriesCount
getSeriesData getSeriesNames getSeriesSVGGroup getSeriesSize
getSeriesType getSettings getSizeAbsolute getType
getXAxis getXAxisTitle getXAxisType getXLabelText
getYAxis getYAxisCount getYAxisIndexForSeries getYAxisTitle
getYAxisType getYLabelText hasAxes hasMultiples
initializeAxisProperties integrateStyleSpec invokeSuper is3D
isOfType makeId mouseupHandler notifyViewHandler
onCreate onDelete onSerialize onloadHandler
onunloadHandler onupdateHandler pickVerticalSkips plotLineForSeries
prepareAxisGroup refreshContents removeChildNodes render
renderAxes renderBands renderContents renderLegend
renderPlotArea renderSVG renderSeries renderSeriesGroup
renderTitle renderXAxisTitle renderXLabels renderYAxisTitle
renderYLabels selectElement sendEventToController setControllerId
setCurrYAxis setOverlayMode setPosition setPositionHandler
setProperty setSize setSizeHandler setTextNode
setXAxis setYAxis sizingMouseDownHandler stripWhitespace
unrender updateChart usePercentForRange useSumForRange
wrapMethod


Parameters

• parameter DEFAULTAPPEARANCE = "3D";
Default appearance of this component.
• parameter DEFAULTHOLESIZE = 0;
Default size of hole in center of the chart.

Properties

• property holeSize as %ZEN.Datatype.float(MAXVAL="0.9",MINVAL=0) [ InitialExpression = ..#DEFAULTHOLESIZE ];
This controls whether a hole is displayed in the center of the pie chart, and if so, how big the hole is.
The value of this property is a percentange of the chart's radius along the x axis. If the size of the chart is changed, the size of the center hole will maintain its proportional size.
The value can range from 0 to 0.9. The default value is 0. Set this to 0.2 to display a "donut chart".
• property pieHeight as %ZEN.Datatype.float(MAXVAL=1,MINVAL=0) [ InitialExpression = 0.33 ];
For pie charts with appearance set to "3D", this controls the apparent height of 3D pie chart.
The value of this property is a percentange of the chart's radius along the x axis. If the size of the chart is changed, its depth will maintain its proportional size.
The value can range from 0 to 1. The default value is 0.33.
• property pieScale as %ZEN.Datatype.float [ InitialExpression = 1.0 ];
Scaling factor used to compute size of pie within the chart.
The default scaling value is 1.0. A value larger than 1.0 makes the pie bigger relative to the chart's plot area; a value smaller than 1.0 makes the pie smaller.
• property plotBy as %ZEN.Datatype.string(VALUELIST=",auto,items,series,both") [ InitialExpression = "auto" ];
Specifies how the pie chart will plot its data.
  • "items" - plot a slice for every item within this chart's data. If there are multiple data series, each slice represents the total of each item summed across the data series.
    The labels for the slices are treated as Y axis labels: the onGetLabelY event handler is called to get the label values, or the labels are provided by a %ZEN.Auxiliary.dataController if present.
  • "series" - plot a slice for every data series within this chart's data. Each slice represents the total value of all items within each series.
    The labels for the slices are specified by the seriesNames property.
  • "both" - plot a slice for each item within each data series (that is, there will be seriesCount * seriesSize slices).
    The slices are labeled as items; the chart legend will display the series names.
  • "auto" - automatically select the appropriate way to display data based on how many data series and items are present.
• property rotateBy as %ZEN.Datatype.float [ InitialExpression = 0 ];
If specified, rotate the pie chart by this amount (in degrees).
• property showPercentage as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, percentage values (rounded to nearest integer) are displayed as part of the label for each slice.

Methods

• method getChartElementStyle(series, item) [ Language = javascript ]
Return default style for slice element.
• method getChartRelatedElements(series, item) [ Language = javascript ]
Return an array of related svg objects for a specified data element (if any). (such as the edges of a 3d rendering).
• method getLegendLabels() [ Language = javascript ]
Return an array of labels to display within the Legend box.
Override to get appropriate labels for Pie Chart.
• method getPlotBy() [ Language = javascript ]
Determine the actual plot by method for this chart.
• 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 mouseupHandler(evt) [ Language = javascript ]
Mouse up handler for frame.
• method renderContents() [ Language = javascript ]
Client-side method to render control.
• 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.