xlabelstyle.as

来自「Open Flash Chart is a program for creati」· AS 代码 · 共 44 行

AS
44
字号
package elements.axis {
	import string.Utils;
		
	public class XLabelStyle
	{
		public var size:Number = 10;
		public var colour:Number = 0x000000;
		public var vertical:Boolean = false;
		public var diag:Boolean = false;
		public var step:Number = 1;
		public var show_labels:Boolean;

		public function XLabelStyle( json:Object )
		{
			if( !json )
				return;
				
			if( json.x_label_style == undefined )
				return;
			
			if( json.x_label_style.visible == undefined || json.x_label_style.visible )
			{
				this.show_labels = true;
				
				if( json.x_label_style.size != undefined )
					this.size = json.x_label_style.size;
					
				if( json.x_label_style.colour != undefined )
					this.colour = string.Utils.get_colour(json.x_label_style.colour);
	
				if( json.x_label_style.rotation != undefined )
				{
					this.vertical = (json.x_label_style.rotation==1);
					this.diag = (json.x_label_style.rotation==2);
				}
				
				if( json.x_label_style.step != undefined )
					this.step = json.x_label_style.step;
			}
			else
				this.show_labels = true;
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?