Flex 去水印

Flex Chart 技巧 - 移除浮水印 (中国人真聪明啊!)
Flex Chart 雖然有提供完整的試用功能
不過編譯完成的圖表會加上浮水印
Flex Data Visualization Trial

以上的浮水印其實是以 AS3 動態加上的

既然是 AS,那事情就簡單了
只要在 Flex Project 內自行加上以下 Class
  • package mx.charts.chartClasses {
  • public class ChartsLicenseHandler {
  • }
  • }

    然後在 MXML 內明確引用該 Class,或是用 Metadata Tag 強迫編譯
    這樣就可以去除浮水印了~!

    1. <?xml version="1.0"?>
    2. <mx:Application backgroundColor="#DDDDDD"
    3. xmlns:mx="http://www.adobe.com/2006/mxml">
    4. <mx:Script>
    5. <![CDATA[
    6. [Frame(extraClass="mx.charts.chartClasses.ChartsLicenseHandler")]
    7. import mx.collections.ArrayCollection;
    8. [Bindable]
    9. private var expensesAC:ArrayCollection = new ArrayCollection( [
    10. { Month: "Jan", Profit: -200, Expenses: 1500, Amount: 500 },
    11. { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
    12. { Month: "Mar", Profit: 1500, Expenses: -500, Amount: 300 } ]);
    13. ]]>
    14. </mx:Script>
    15. <mx:SolidColor id="sc1" color="blue" alpha=".3"/>
    16. <mx:SolidColor id="sc2" color="red" alpha=".3"/>
    17. <mx:SolidColor id="sc3" color="green" alpha=".3"/>
    18. <mx:Stroke id="s1" color="blue" weight="1"/>
    19. <mx:Stroke id="s2" color="red" weight="1"/>
    20. <mx:Stroke id="s3" color="green" weight="1"/>
    21. <mx:Panel title="PlotChart Control Example" height="100%" width="100%">
    22. <mx:PlotChart id="plot" height="100%" width="100%"
    23. paddingLeft="5" paddingRight="5"
    24. showDataTips="true" dataProvider="{expensesAC}" >
    25. <mx:series>
    26. <mx:PlotSeries xField="Expenses" yField="Profit"
    27. displayName="Plot 1" fill="{sc1}" stroke="{s1}" />
    28. <mx:PlotSeries xField="Amount" yField="Expenses"
    29. displayName="Plot 2" fill="{sc2}" stroke="{s2}" />
    30. <mx:PlotSeries xField="Profit" yField="Amount"
    31. displayName="Plot 3" fill="{sc3}" stroke="{s3}" />
    32. </mx:series>
    33. </mx:PlotChart>
    34. </mx:Panel>
    35. </mx:Application>

    转自:http://www.blogjava.net/flexjava/archive/2009/04/23/257041.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值