Rev | Line | |
---|
[7849] | 1 | package elements.axis {
|
---|
| 2 | import string.Utils;
|
---|
| 3 |
|
---|
| 4 | public class XLabelStyle
|
---|
| 5 | {
|
---|
| 6 | public var size:Number = 10;
|
---|
| 7 | public var colour:Number = 0x000000;
|
---|
| 8 | public var vertical:Boolean = false;
|
---|
| 9 | public var diag:Boolean = false;
|
---|
| 10 | public var step:Number = 1;
|
---|
| 11 | public var show_labels:Boolean;
|
---|
| 12 |
|
---|
| 13 | public function XLabelStyle( json:Object )
|
---|
| 14 | {
|
---|
| 15 | if( !json )
|
---|
| 16 | return;
|
---|
| 17 |
|
---|
| 18 | if( json.x_label_style == undefined )
|
---|
| 19 | return;
|
---|
| 20 |
|
---|
| 21 | if( json.x_label_style.visible == undefined || json.x_label_style.visible )
|
---|
| 22 | {
|
---|
| 23 | this.show_labels = true;
|
---|
| 24 |
|
---|
| 25 | if( json.x_label_style.size != undefined )
|
---|
| 26 | this.size = json.x_label_style.size;
|
---|
| 27 |
|
---|
| 28 | if( json.x_label_style.colour != undefined )
|
---|
| 29 | this.colour = string.Utils.get_colour(json.x_label_style.colour);
|
---|
| 30 |
|
---|
| 31 | if( json.x_label_style.rotation != undefined )
|
---|
| 32 | {
|
---|
| 33 | this.vertical = (json.x_label_style.rotation==1);
|
---|
| 34 | this.diag = (json.x_label_style.rotation==2);
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | if( json.x_label_style.step != undefined )
|
---|
| 38 | this.step = json.x_label_style.step;
|
---|
| 39 | }
|
---|
| 40 | else
|
---|
| 41 | this.show_labels = true;
|
---|
| 42 | }
|
---|
| 43 | }
|
---|
| 44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.