1 | package global {
|
---|
2 |
|
---|
3 | import elements.axis.AxisLabel;
|
---|
4 | import elements.labels.XLegend;
|
---|
5 | import elements.axis.XAxisLabels;
|
---|
6 |
|
---|
7 | public class Global {
|
---|
8 | private static var instance:Global = null;
|
---|
9 | private static var allowInstantiation:Boolean = false;
|
---|
10 |
|
---|
11 | public var x_labels:XAxisLabels;
|
---|
12 | public var x_legend:XLegend;
|
---|
13 | private var tooltip:String;
|
---|
14 |
|
---|
15 | public function Global() {
|
---|
16 | }
|
---|
17 |
|
---|
18 | public static function getInstance() : Global {
|
---|
19 | if ( Global.instance == null ) {
|
---|
20 | Global.allowInstantiation = true;
|
---|
21 | Global.instance = new Global();
|
---|
22 | Global.allowInstantiation = false;
|
---|
23 | }
|
---|
24 | return Global.instance;
|
---|
25 | }
|
---|
26 |
|
---|
27 | public function get_x_label( pos:Number ):String {
|
---|
28 |
|
---|
29 | // PIE charts don't have X Labels
|
---|
30 |
|
---|
31 | tr.ace('xxx');
|
---|
32 | tr.ace( this.x_labels == null )
|
---|
33 | tr.ace(pos);
|
---|
34 | // tr.ace( this.x_labels.get(pos))
|
---|
35 |
|
---|
36 |
|
---|
37 | if ( this.x_labels == null )
|
---|
38 | return null;
|
---|
39 | else
|
---|
40 | return this.x_labels.get(pos);
|
---|
41 | }
|
---|
42 |
|
---|
43 | public function get_x_legend(): String {
|
---|
44 |
|
---|
45 | // PIE charts don't have X Legend
|
---|
46 | if( this.x_legend == null )
|
---|
47 | return null;
|
---|
48 | else
|
---|
49 | return this.x_legend.text;
|
---|
50 | }
|
---|
51 |
|
---|
52 | public function set_tooltip_string( s:String ):void {
|
---|
53 | tr.ace('@@@@@@@');
|
---|
54 | tr.ace(s);
|
---|
55 | this.tooltip = s;
|
---|
56 | }
|
---|
57 |
|
---|
58 | public function get_tooltip_string():String {
|
---|
59 | return this.tooltip;
|
---|
60 | }
|
---|
61 | }
|
---|
62 | }
|
---|