FLEX FusionCharts 的样式

如果数据都已经和fusionCharts 绑定了,剩下的就是表现样式的问题了。这篇文章只说明了显示文字的部分。

分别为 标题,子标题,横轴(X轴)说明,纵轴(Y轴)说明,内容X轴显示,内容Y轴显示。

 

-----代码

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="com.fusioncharts.components.*">
    <ns1:FusionCharts x="10" y="10"
     FCChartType="Column3D"
     FCDataXML="{xmlData}" />
    <mx:Script>
       <![CDATA[
         [Bindable]
         private var xmlData:String="<chart caption='Weekly Sales' xAxisName='Week' yAxisName='Revenue' " +
            " numberPrefix='$' >" +
            "   <set value='40800' label='Week 1' alpha='50' dashed='0' />" +
            "   <set value='31400' label='Week 2' />" +
            "   <vLine color='FF5904' thickness='2' />"   +
            "   <set value='26700' label='Week 3' />" +
            "   <set value='54400' label='Week 4' />" +
            "   <styles>" +
            "       <definition>" +
            "         <style name='FontStyle' type='font' font='Verdana' size='15'  />" +
            "       </definition>" +
            "       <application>" +
            "          <apply toObject='CAPTION' styles='FontStyle'/>" +
            "          <apply toObject='XAXISNAME' styles='FontStyle' />" +
            "          <apply toObject='YAXISNAME' styles='FontStyle' />" +
            "          <apply toObject='DATALABELS' styles='FontStyle' />" +
            "          <apply toObject='YAXISVALUES' styles='FontStyle' />" +
            "       </application>" +
            "    </styles>" +
            "</chart>";
      ]]>
   </mx:Script>
</mx:Application>

 

----说明

1)  CAPTION  主标题

2)  XAXISNAME  X轴说明

3)  YAXISNAME  Y轴说明

4)  DATALABELS  X轴内容

5)  YAXISVALUES  Y轴内容

你可能感兴趣的:(String,Flex,layout,application,encoding,styles)