flex4 amcharts 删除水印「建议收藏」

flex4 amcharts 删除水印

大家好,又见面了,我是全栈君。

package com.twobowl.component.manualTopo
{
	
	import com.amcharts.AmPieChart;
	import com.amcharts.chartClasses.AmChart;
	
	public class MYAmPieChart extends AmPieChart
	{
		
		
		
		public function MYAmPieChart()
		{
			super();
		}
		override protected function createChildren():void{
			super.createChildren();
			if(_amchartsLink){
				_amchartsLink.alpha=0;
				_amchartsLink.width=0;
				_amchartsLink.height=0;
			}
			_amchartsLink.visible = false;
			return;
		}
	}
}

package com.twobowl.component.manualTopo//自己定义包名
{
	import com.amcharts.AmSerialChart;
	import com.amcharts.chartClasses.AmChart;
	
	public class MYAmchartst extends AmSerialChart
	{
		
			
		
				public function MYAmchartst()
				{
					super();
				}
				override protected function createChildren():void{
					super.createChildren();
					if(_amchartsLink){
						_amchartsLink.alpha=0;
						_amchartsLink.width=0;
						_amchartsLink.height=0;
					}
					_amchartsLink.visible = false;
					return;
				}
			}
		}

2.

<?xml version="1.0" encoding="utf-8"?>


<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" 
               xmlns:amcharts="http://www.amcharts.com/com_internal"
			   xmlns:am="com.twobowl.component.manualTopo.*"
               backgroundColor="#FFFFFF"
               width="100%" height="100%"
               >
	<s:layout>
		<s:VerticalLayout horizontalAlign="center" paddingTop="30"/>
	</s:layout>
    <fx:Script>
        <![CDATA[
			import com.amcharts.events.PieChartEvent;
			import com.twobowl.component.manualTopo.*;
			
			import mx.collections.ArrayCollection;
            [Bindable]
            private var chartData:ArrayCollection = new ArrayCollection( [
				{year:"2000",a:20,b:5,c:10,d:5},
				{year:"2001",a:21,b:6,c:10,d:10},
				{year:"2002",a:24,b:7,c:9,d:10},
				{year:"2003",a:21,b:5,c:10,d:8},
				{year:"2004",a:24,b:4,c:10,d:8},
				{year:"2005",a:26,b:8,c:10,d:9},
				{year:"2006",a:27,b:9,c:12,d:9},
				{year:"2007",a:29,b:9,c:13,d:8},
				{year:"2008",a:30,b:10,c:14,d:7},
				{year:"2009",a:26,b:12,c:15,d:8},
				{year:"2010",a:24,b:11,c:13,d:9},
				{year:"2011",a:22,b:14,c:11,d:8},
				{year:"2012",a:21,b:16,c:11,d:7},
				{year:"2013",a:20,b:17,c:13,d:6},
				{year:"2014",a:15,b:19,c:13,d:5},
				{year:"2015",a:14,b:18,c:14,d:3}]);
			[Bindable]
			private var chartDatas:ArrayCollection = new ArrayCollection([
				{year:2005,income:23.5,expenses:18.1},
				{year:2006,income:26.2,expenses:22.8},
				{year:2007,income:30.1,expenses:23.9},
				{year:2008,income:29.5,expenses:25.1},
				{year:2009,income:24.6,expenses:25.0}
			]);    
			protected function myampiechart1_clickHandler(event:PieChartEvent):void
			{
				// TODO Auto-generated method stub
				//event.item.dataContext.
				chart.dataProvider=chartDatas;
			}
			
		]]>
    </fx:Script>
	<s:HGroup width="100%" height="50%"> 
		<s:VGroup  width="50%" height="100%">
			<am:MYAmPieChart width="50%" height="100%" dataProvider="{chartData}" titleField="year" valueField="a" clickSlice=" myampiechart1_clickHandler(event)" />
			
		</s:VGroup>
		<s:VGroup  width="50%" height="100%">
				<am:MYAmchartst
					width="50%"
					height="100%"
					id="chart2"
					dataProvider="{chartData}"
					categoryField="year"
					plotAreaFillAlphas="[0]">
					<am:graphs>
						<amcharts:AmGraph 
							color="#FFFFFF" 
							title="Sample a" 
							valueField="a" 
							type="line" 
							lineThickness="2"
							lineAlpha="1" 
							fillAlphas="[0.7]"
							showBalloon="false"/>                        
						<amcharts:AmGraph 
							color="#FFFFFF" 
							title="Sample b" 
							valueField="b" 
							type="line" 
							lineThickness="2"
							lineAlpha="1" 
							fillAlphas="[0.7]"/>
						<amcharts:AmGraph 
							color="#FFFFFF" 
							title="Sample c" 
							valueField="c" 
							type="line" 
							lineThickness="2"
							lineAlpha="1" 
							fillAlphas="[0.7]"
							showBalloon="false"/>
						<amcharts:AmGraph 
							color="#FFFFFF" 
							title="Sample d" 
							valueField="d" 
							type="line" 
							lineThickness="2"
							lineAlpha="1"
							fillAlphas="[0.7]"/>
					</am:graphs>
					
					<am:valueAxes>
						<amcharts:ValueAxis stackType="regular" gridAlpha="0.1"/>                    
					</am:valueAxes>
					
					<am:categoryAxis>
						<amcharts:CategoryAxis gridAlpha="0.1" fontWeight="bold" startOnAxis="true" position="top"/>
					</am:categoryAxis>
					
					<am:chartScrollbar>
						<amcharts:ChartScrollbar height="20"/>                    
					</am:chartScrollbar>
					
					<am:chartCursor>
						<amcharts:ChartCursor/>                    
					</am:chartCursor>
					
				</am:MYAmchartst>
				
				<amcharts:AmLegend 
					fontWeight="bold"
					reversedOrder="true" 
					rollOverGraphAlpha="0.1" 
					dataProvider="{chart2}" 
					width="100%"
					marginLeft="35"
					marginRight="15"
					markerType="circle"
					switchType="v"/>
		</s:VGroup>	
    </s:HGroup>
	
	<s:VGroup width="100%" height="50%">
		<am:MYAmchartst 
			width="100%"
			height="100%" 
			id="chart" 
			dataProvider="{chartDatas}" 
			categoryField="year" 
			startDuration="1" 
			angle="30" 
			depth3D="30">
			
			<am:categoryAxis>
				<amcharts:CategoryAxis gridPosition="start"/>
			</am:categoryAxis>
			
			<am:graphs>
				<amcharts:AmGraph title="Income" id="g0" valueField="income" type="column" lineAlpha="0" fillAlphas="[1]"/>                        
				<amcharts:AmGraph title="Expenses" id="g1" valueField="expenses" type="line" lineThickness="2" bullet="round"/>                        
			</am:graphs>
		</am:MYAmchartst>
		
		<amcharts:AmLegend dataProvider="{chart}" width="100%" switchType="v" marginRight="20" marginLeft="40" textClickEnabled="false" marginBottom="15"/>
	</s:VGroup>    
</s:Application>

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/116648.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • jax java,用JAX WS实现java调用webServic「建议收藏」

    jax java,用JAX WS实现java调用webServic「建议收藏」来个简单点的:1.建个具体的服务实现:packagecom.webservice;@WebServicepublicclassWarehouse{privateMapprices;publicWarehouse(){prices=newHashMap();prices.put(“BlackwellToaster”,24.95);prices.put(“ZapXpress…

  • 十字路口plc交通灯程序_十字路口红绿灯plc编程实训

    十字路口plc交通灯程序_十字路口红绿灯plc编程实训知识点和关键字:定时器触点比较指令传送指令变址应用数据块控制要求示意图时序图工艺流程图当该路口是红灯时,另外一个路口是通行时间,绿灯亮和黄灯闪亮;当另外一个路口转红灯时,该路口成为通行时间,绿灯亮和黄灯闪亮。程序控制1十字路口交通灯控制程序1,使用了一个定时器来控制,该定时器在一个动作周期内,从0开始随着时间经过逐步增大一直到140,使用定时器过程值来控制红绿灯,如图…

  • java属于什么语言_java是什么语言 ?是什么系统?

    java属于什么语言_java是什么语言 ?是什么系统?一开始了解计算机这个专业,大家都会经常性听到Java这一词语,那么大家有真正的了解什么是Java吗?Java是属于什么语言呢?JAVA语言,其实是混合型的一种语言,Java语言是一个支持网络计算的面向对象程序设计语言。Java语言吸收了Smalltalk语言和C++语言的优点。下面来介绍一些Java的主要特征:1)Java语言是简单的。Java语言的语法与C语言和C++语言相似,这让很多程序员可…

  • Git使用流程_git提交流程

    Git使用流程_git提交流程以coding为例,演示如何使用git首先理解下整个流程,如图一,将本地代码上传到远程仓库1.(电脑里得先下载git)登录coding,新建一个仓库,点击代码浏览可以看到2.在本地新建一个文件夹,作为项目根目录,再此启动GitBash,进入目录,并输入gitinit初始化一个本地git仓库3.将本地仓库和我们在coding上创建的远程仓库对接起来,输入gitre…

  • 为什么引入ReLU激活函数

    为什么引入ReLU激活函数https://blog.csdn.net/fredinators/article/details/79443386ReLu是神经网络中的一个激活函数,其优于tanh和sigmoid函数。1.为何引入非线性的激活函数?如果不用激活函数,在这种情况下每一层输出都是上层输入的线性函数。容易验证,无论神经网络有多少层,输出都是输入的线性组合,与没有隐藏层效果相当,这种情况就是最原始的感知机(…

  • 关于vscode断点调试

    关于vscode断点调试很多人习惯在Chrome的调试窗口中调试Vue代码,或者直接使用console.log来观察变量值,这是非常痛苦的一件事,需要同时打开至少3个窗体。个人还是更加习惯于断点调试。这篇文章将介绍如何配置VisualStudioCode和Chrome来完成直接在VSCode断点调试代码,并且在VSCode的调试窗口看到Chrome中console相同的值。设置…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号