做Flex柱状图报表时候 参考Demo如下
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
{HospitalNo:"1", HospitalName:"Jan", Profit:2000, Expenses:1500},
{HospitalNo:"2",HospitalName:"Jan", Profit:1000, Expenses:200},
{HospitalNo:"3",HospitalName:"Mar", Profit:1500, Expenses:500}
]);
</mx:Script>
<mx:Panel title="Column Chart">
<mx:ColumnChart id="myChart" dataProvider="{expenses}">
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{expenses}"
categoryField="HospitalName" />
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries xField="HospitalName" yField="Profit"
displayName="Profit" />
<mx:ColumnSeries xField="HospitalName" yField="Expenses"
displayName="Expenses" />
</mx:series>
</mx:ColumnChart>
<mx:Legend dataProvider="{myChart}" />
</mx:Panel>
</mx:Application>
当x轴绑定的是HospitalName,若HospitalName相同,则在x轴上显示数据有错误,若绑定HospitalNo 则在x轴上显示数字,不符合需求,实在没有想到好的办法,求解!