PieChart

The PieChart class is an example of how to create a specific implementation of GraphItem, which in this case provides functionality to display data within a 2D pie chart. The constructor and class fields required to support this functionality are shown in Figure 15-27.

Figure 15-27. PieChart.constructor method listing.
 {define-class final public PieChart {inherits GraphItem} field private _segments:{Array-of Percent} field private _colors:{Array-of FillPattern} field private _labels:#StringVec = null field private _second-labels:#StringVec = null field private _type:PieSizeAndPosition field private _label-color:FillPattern = GraphItem.black field private _piece-offset:Distance = 10pt {constructor public {default graph:SimpleGraph, segments:{Array-of ...

Get Enterprise Curl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.