1 | package charts.series.bars {
|
---|
2 |
|
---|
3 | import charts.series.bars.Base;
|
---|
4 | import flash.display.Sprite;
|
---|
5 | import flash.geom.Point;
|
---|
6 |
|
---|
7 |
|
---|
8 | public class Stack extends Base {
|
---|
9 | private var total:Number;
|
---|
10 |
|
---|
11 | public function Stack( index:Number, props:Properties, group:Number ) {
|
---|
12 |
|
---|
13 | // we are not passed a string value, the value
|
---|
14 | // is set by the parent collection later
|
---|
15 | this.total = props.get('total');
|
---|
16 |
|
---|
17 | super(index, props, group);
|
---|
18 | }
|
---|
19 |
|
---|
20 | protected override function replace_magic_values( t:String ): String {
|
---|
21 |
|
---|
22 | t = super.replace_magic_values(t);
|
---|
23 | t = t.replace('#total#', NumberUtils.formatNumber( this.total ));
|
---|
24 |
|
---|
25 | return t;
|
---|
26 | }
|
---|
27 |
|
---|
28 | public function replace_x_axis_label( t:String ): void {
|
---|
29 |
|
---|
30 | this.tooltip = this.tooltip.replace('#x_label#', t );
|
---|
31 | }
|
---|
32 |
|
---|
33 | public override function resize( sc:ScreenCoordsBase ):void {
|
---|
34 |
|
---|
35 | var h:Object = this.resize_helper( sc as ScreenCoords );
|
---|
36 |
|
---|
37 | this.graphics.clear();
|
---|
38 | this.graphics.beginFill( this.colour, 1.0 );
|
---|
39 | this.graphics.moveTo( 0, 0 );
|
---|
40 | this.graphics.lineTo( h.width, 0 );
|
---|
41 | this.graphics.lineTo( h.width, h.height );
|
---|
42 | this.graphics.lineTo( 0, h.height );
|
---|
43 | this.graphics.lineTo( 0, 0 );
|
---|
44 | this.graphics.endFill();
|
---|
45 | }
|
---|
46 | }
|
---|
47 | }
|
---|