flex amcharts line demo 2
3119 ワード
xmlns:chart="chart.*" xmlns:amcharts="http://www.amcharts.com/com_internal"
==========
[Bindable]
private var chartData:ArrayCollection = new ArrayCollection([
{stcd:"01-08 09:00",avg:"0.0",sw:12.31},
{stcd:"01-08 10:00",avg:1.5,sw:12.71},
{stcd:"01-08 11:00",avg:2.5,sw:13.31}]);
==========
<viewer:WidgetTemplate width="100%" height="100%">
<s:BorderContainer x="0" y="0" left="2" top="2" right="2" width="100%" height="100%" id="bc1" borderAlpha="0" backgroundAlpha="0">
<chart:SerialChart id="sqchart" x="0" y="0" width="100%" height="100%" categoryField="stcd"
color="#000000" columnSpacing="0" columnWidth="0.6"
dataProvider="{chartData}" plotAreaFillAlphas="1" startDuration="0.3"
plotAreaFillColors="[#d6ebf7,#ffffff,#d6ebf7]">
<chart:graphs>
<amcharts:AmGraph title=" " valueField="avg" type="column" fillAlphas="1"
fillColors="[#7EEAE3,#50BBF0,#2C90E3]"
lineAlpha="0" balloonText=" : [[value]]mm" valueAxis="{rain}"/>
<amcharts:AmGraph title=" " valueField="sw" type="smoothedLine" lineColor="#FF7A82"
lineAlpha="1" balloonText=" : [[value]]m" lineThickness="2"/>
</chart:graphs>
<chart:balloon>
<amcharts:AmBalloon borderThickness="2" borderAlpha="1" cornerRadius="3" fontSize="13"
fontWeight="bold"/>
</chart:balloon>
<chart:valueAxes>
<amcharts:ValueAxis gridAlpha="0.1" axisColor="#0000ff" axisThickness="2" color="#0000ff"
min="5" max="30"></amcharts:ValueAxis>
<amcharts:ValueAxis gridAlpha="0" axisColor="#000000" id="rain" position="right" reversed="true"
min="0" max="32"></amcharts:ValueAxis>
</chart:valueAxes>
<chart:categoryAxis>
<amcharts:CategoryAxis gridAlpha="0.1" axisColor="#E0559C" title=" " tickLength="0" titleTextColor="#4AABDB"
titleTextSize="14" startOnAxis="true"
axisThickness="2" color="#E0559C"></amcharts:CategoryAxis>
</chart:categoryAxis>
<chart:chartCursor>
<amcharts:ChartCursor/>
</chart:chartCursor>
</chart:SerialChart>
</s:BorderContainer>
</viewer:WidgetTemplate>