O'Reilly logo

Enterprise Curl by Paul Sheehan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required