BubbleChart气泡图,气泡采用不同颜色,如何实现?万分感谢
想在flex的BubbleChart气泡图根据数据源某个字段选用不同的颜色,怎么处理?
谢谢。
例如:下面代码:根据color列的数据值,添加不同的气泡的颜色,万分感谢
<?xml version="1.0"?>
<!-- Simple example to demonstrate the BubbleChart control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var expensesAC:ArrayCollection = new ArrayCollection( [
{ Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 ,color"#11111"},
{ Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 ,color""#222222"},
{ Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 ,color""#333333"},
{ Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 ,color""#444444"},
{ Month: "May", Profit: 2400, Expenses: 575, Amount: 500,color""#555555"} ]);
]]>
</mx:Script>
<!-- Define custom color and line style for the bubbles. -->
<mx:SolidColor id="sc1" color="blue" alpha=".3"/>
<mx:Stroke id="stroke1" color="blue" weight="1"/>
<mx:Panel title="BubbleChart Control Example" height="100%" width="100%">
<mx:BubbleChart id="bubblechart"
height="100%" width="100%"
paddingRight="5" paddingLeft="5"
showDataTips="true" maxRadius="20"
dataProvider="{expensesAC}">
<mx:series>
<mx:BubbleSeries
displayName="Profit/Expenses/Amount"
xField="Profit"
yField="Expenses"
radiusField="Amount"
fill="{sc1}"
stroke="{stroke1}"
/>
</mx:series>
</mx:BubbleChart>
<mx:Legend dataProvider="{bubblechart}"/>
</mx:Panel>
</mx:Application>
[解决办法]
没接触过这东西,只能悄然路过~~~~~
[解决办法]
BubbleChart 没用过
友情帮顶