<mx:Panel title="各线路受影响人数对比图"
width="100%"
height="100%">
<common:AmSerialCharts id="char2"
width="100%"
height="100%"
dataProvider="{linePeopArr}"
categoryField="lineName"
marginBottom="60"
marginLeft="50"
startDuration="1">
<!--数据显示样式
balloonText 绑定数据源显示的内容
bullet 折角的点样式(圆点,方框等)
lineThickness="2" 线条的粗细
type 类型(曲线、折现、柱状图等)
visibleInLegend=false //图示内容不显示
showBalloon=false //柱状图不显示
fillAlphas="[1]" 柱状图的填充
fillColors="[#5eb451]" 柱状图的填充颜色
-->
<common:graphs>
<amcharts:AmGraph title="滞留人数"
balloonText="[[lineName]] :[[peoplenum]]人"
valueField="peoplenum"
lineColor="#5eb451"
color="#000000"
type="column"
lineThickness="2"
bullet="square"
fillAlphas="[1]"
fillColors="[#5eb451]"/>
</common:graphs>
<!--设置X轴可显示的最多数据条数
gridCount={数据源的长度}
gridAlpha 设置背景线的轻重
labelRotation="30" 倾斜角度 如果有汉字显示则不加此属性,就能显示汉字
styleName 样式,可显示X轴内容-->
<common:categoryAxis>
<amcharts:CategoryAxis gridAlpha="0.1"
gridCount="{linePeopArr.length}"/>
</common:categoryAxis>
<!--设置Y轴最大最小数值
min="0"
max="6"-->
<common:valueAxes>
<amcharts:ValueAxis position="left"
axisThickness="2"
axisColor="#FF0000"/>
</common:valueAxes>
<!--设置显示数据框的边框颜色及样式-->
<common:balloon>
<amcharts:AmBalloon cornerRadius="10"
borderThickness="2"
borderColor="#FFFFFF"
borderAlpha="1"/>
</common:balloon>
<!--鼠标滑过即显示数据-->
<common:chartCursor>
<amcharts:ChartCursor zoomable="false"
cursorAlpha="0"
categoryBalloonEnabled="false"/>
</common:chartCursor>
</common:AmSerialCharts>
<!--显示每条线路可点击实现线路隐藏-->
<common:AmLegends dataProvider="{chart2}"
width="100%"
switchType="v"
textClickEnabled="false"
color="#000000"
valueWidth="30"
marginBottom="0"
marginTop="0"
marginRight="0"
marginLeft="40"/>
</mx:Panel>
Flex 柱状图2
最新推荐文章于 2017-12-07 17:17:32 发布