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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.