posts - 13,comments - 19,trackbacks - 0
          Flex Chart 技巧 - 移除浮水印 (中國人真聰明啊!)
          Flex Chart 雖然有提供完整的試用功能
          不過編譯完成的圖表會加上浮水印
          Flex Data Visualization Trial
          

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

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

          然後在 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.   
          7.   [Frame(extraClass="mx.charts.chartClasses.ChartsLicenseHandler")]
          8.   
          9.   import mx.collections.ArrayCollection;
          10.   
          11.   [Bindable]
          12.   private var expensesAC:ArrayCollection = new ArrayCollection( [
          13.    { Month: "Jan", Profit: -200, Expenses: 1500, Amount: 500 },
          14.    { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
          15.    { Month: "Mar", Profit: 1500, Expenses: -500, Amount: 300 } ]);
          16.   ]]>
          17.  </mx:Script>
          18.  
          19.  <mx:SolidColor id="sc1" color="blue" alpha=".3"/>
          20.  <mx:SolidColor id="sc2" color="red" alpha=".3"/>
          21.  <mx:SolidColor id="sc3" color="green" alpha=".3"/>
          22.  
          23.  <mx:Stroke id="s1" color="blue" weight="1"/>
          24.  <mx:Stroke id="s2" color="red" weight="1"/>
          25.  <mx:Stroke id="s3" color="green" weight="1"/>
          26.  
          27.  <mx:Panel title="PlotChart Control Example" height="100%" width="100%">
          28.   <mx:PlotChart id="plot" height="100%" width="100%"
          29.     paddingLeft="5" paddingRight="5"
          30.     showDataTips="true" dataProvider="{expensesAC}" >
          31.    <mx:series>
          32.     <mx:PlotSeries xField="Expenses" yField="Profit"
          33.      displayName="Plot 1" fill="{sc1}" stroke="{s1}" />
          34.     <mx:PlotSeries xField="Amount" yField="Expenses"
          35.      displayName="Plot 2" fill="{sc2}" stroke="{s2}" />
          36.     <mx:PlotSeries xField="Profit" yField="Amount"
          37.      displayName="Plot 3" fill="{sc3}" stroke="{s3}" />
          38.    </mx:series>
          39.   </mx:PlotChart>
          40.  </mx:Panel>
          41. </mx:Application>
          posted on 2009-02-27 15:20 南山隱士 閱讀(2171) 評論(3)  編輯  收藏

          FeedBack:
          # re: Flex中如何去掉水印(轉帖)[未登錄]
          2009-04-23 10:17 | 菜鳥
          大俠救命啊,我是菜鳥,急!!!

          我照你說的弄,可是第7行[Frame(extraClass="mx.charts.chartClasses.ChartsLicenseHandler")]
          有個錯誤:Metadata requires an associated definition.  回復  更多評論
            
          # re: Flex中如何去掉水印(轉帖)
          2009-05-06 13:04 | 南山隱士
          @菜鳥
          mx.charts.chartClasses.ChartsLicenseHandler
          這是一個類,你建這么一個類就可以了,里面什么都不用寫  回復  更多評論
            
          # re: Flex中如何去掉水印(轉帖)
          2011-03-04 19:18 | 地方
          @南山隱士
          那是空的類啊,什么都么寫啊,也報那個錯呢。  回復  更多評論
            

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 临夏县| 巴南区| 沁水县| 海兴县| 虎林市| 赞皇县| 淄博市| 庆元县| 和田市| 新乡市| 安康市| 平罗县| 涿州市| 全椒县| 安吉县| 祁门县| 集安市| 朝阳区| 运城市| 子长县| 六枝特区| 北海市| 江北区| 九江县| 东安县| 上栗县| 南投县| 丘北县| 华安县| 芦山县| 兴国县| 重庆市| 河曲县| 安福县| 乐至县| 福海县| 图木舒克市| 衢州市| 太湖县| 宿州市| 东宁县|