xml画图的一些属性说明

2009-02-18 13:26:50 php Views(459)

<graph caption='Product Sales' subCaption='Sales            in Dollars' xAxisName='Month' yAxisName='Sales'
canvasBgColor='F6DFD9' canvasBaseColor='FE6E54' hovercapbgColor='FFECAA'            hovercapborder='F47E00' divlinecolor='F47E00' yaxisminvalue='0' yaxismaxvalue='10000'            numberPrefix='$' limitsDecimalPrecision='0' divLineDecimalPrecision='0'>
<categories>
<category name='Jan' hoverText='January'/>
<category name='Feb' hoverText='February'/>
<category name='Mar' hoverText='March'/>
<category name='Apr' hoverText='April'/>
<category name='May' hoverText='May'/>
<category name='Jun' hoverText='June'/>
</categories>
<dataset            seriesname='Product A' color='F0807F' showValue='1'>
<set            value='8343' />
<set value='6983'            />
<set value='7658' />
<set value='8345' />
<set            value='8195' />
<set value='7684'/>
</dataset>
<dataset seriesname='Product            B' color='B22222' showValue='1'>
<set            value='2446' />
<set value='3935'            />
<set value='3452' />
<set value='4424' />
<set            value='4925' />
<set value='4328'            />
</dataset>
</graph>

The <graph> element for            this chart can have the following properties:

Background Properties

  • bgColor="HexColorCode" : This                  attribute sets the background color for the chart. You can set any hex                  color code as the value of this attribute. Remember that you DO NOT                  need to assign a "#" at the beginning of the hex color code.                  In fact, whenever you need to provide any hex color code in FusionCharts                  XML data document, you do not have to assign the # at the beginning.
  • bgAlpha="NumericalValue(0-100)" : This attribute helps you set the alpha (transparency) of the                  graph. This is particularly useful when you need to load the chart in                  one of your Flash movies or when you want to set a background image                  (.swf) for the chart.
  • bgSWF="Path of SWF File" :                  This attribute helps you load an external .swf file as a background                  for the chart.

Canvas Properties

  • canvasBgColor="HexColorCode" :                  This attribute helps you set the background color of the canvas. The                  background of the canvas is the one behind the columns.
  • canvasBaseColor="HexColorCode" :                  This attribute helps you set the color of the canvas base. The canvas                  abse is the on which the base of the columns are placed..
  • canvasBaseDepth="Numerical Value" : This attribute helps you set the height (3D Depth) of the canvas                  base.
  • canvasBaseDepth="Numerical Value" : This attribute helps you set the height (3D Depth) of the canvas                  base.
  • canvasBgDepth="Numerical Value" : This attribute helps you set the 3D Depth of the canvas background.
  • showCanvasBg="1/0" : This                  attribute helps us set whether we need to show the canvas background.
  • showCanvasBase="1/0" : This                  attribute helps us set whether we need to show the canvas base.

Chart and Axis Titles

  • caption="String" : This attribute                  determines the caption of the chart that would appear at the top of                  the chart.
  • subCaption="String" : Sub-caption                  of the chart
  • xAxisName= "String" : x-Axis                  text title (if the chart supports axis)
  • yAxisName= "String" : y-Axis                  text title (if the chart supports axis)

Chart Numerical Limits

  • yAxisMinValue="value": This                  attribute determines the lower limit of y-axis.
  • yAxisMaxValue="value" : This                  attribute determines the upper limit of y-axis.
    If you don't specify any of the above values, it is automatically calculated                  by FusionCharts based on the data provided by you.

Generic Properties

  • shownames="1/0" : This attribute                  can have either of the two possible values: 1,0. It sets the configuration                  whether the x-axis values (for the data sets) will be displayed or not.                  By default, this attribute assumes the value 1, which means that the                  x-axis names will be displayed.
  • showValues="1/0" : This attribute                  can have either of the two possible values: 1,0. It sets the configuration                  whether the data numerical values will be displayed along with the columns,                  bars, lines and the pies. By default, this attribute assumes the value                  1, which means that the values will be displayed.
  • showLimits="1/0" : Option                  whether to show/hide the chart limit textboxes.
  • rotateNames="1/0" : Configuration                  that sets whether the category name text boxes would be rotated or not.
  • animation="1/0" : This attribute                  sets whether the animation is to be played or whether the entire chart                  would be rendered at one go.
  • showLegend="1/0" : This attribute                  sets whether the legend would be displayed at the bottom of the chart.

Font Properties

  • baseFont="FontName" : This                  attribute sets the base font family of the chart font which lies on                  the canvas i.e., all the values and the names in the chart which lie                  on the canvas will be displayed using the font name provided here.
  • baseFontSize="FontSize" :                  This attribute sets the base font size of the chart i.e., all the values                  and the names in the chart which lie on the canvas will be displayed                  using the font size provided here.
  • baseFontColor="HexColorCode" :                  This attribute sets the base font color of the chart i.e., all the values                  and the names in the chart which lie on the canvas will be displayed                  using the font color provided here.
  • outCnvBaseFont = "FontName" : This attribute sets the base font family of the chart font which lies                  outside the canvas i.e., all the values and the names in the chart which                  lie outside the canvas will be displayed using the font name provided                  here.
  • outCnvBaseFontSze="FontSize" : This attribute sets the base font size of the chart i.e., all the                  values and the names in the chart which lie outside the canvas will                  be displayed using the font size provided here.
  • outCnvBaseFontColor="HexColorCode": This attribute sets the base font color of the chart i.e., all the values                  and the names in the chart which lie outside the canvas will be displayed                  using the font color provided here.

Number Formatting Options

  • numberPrefix="$" : Using this                  attribute, you could add prefix to all the numbers visible on the graph.                  For example, to represent all dollars figure on the chart, you could                  specify this attribute to ' $' to show like $40000, $50000.
  • numberSuffix="p.a" : Using                  this attribute, you could add prefix to all the numbers visible on the                  graph. For example, to represent all figure quantified as per annum                  on the chart, you could specify this attribute to ' /a' to show like                  40000/a, 50000/a.
    To use special characters for numberPrefix or numberSuffix, you'll need to URL Encode                  them. That is, suppose you wish to have numberSuffix as % (like 30%),                  you'll need to specify it as under:
    numberSuffix='%25'
  • formatNumber="1/0" : This                  configuration determines whether the numbers displayed on the chart                  will be formatted using commas, e.g., 40,000 if formatNumber='1' and                  40000 if formatNumber='0 '
  • formatNumberScale="1/0" : Configuration whether to add K (thousands) and M (millions) to a number                  after truncating and rounding it - e.g., if formatNumberScale is set                  to 1, 10434 would become 1.04K (with decimalPrecision set to 2 places).                  Same with numbers in millions - a M will added at the end.
  • decimalSeparator="." : This                  option helps you specify the character to be used as the decimal separator                  in a number.
  • thousandSeparator="," : This                  option helps you specify the character to be used as the thousands separator                  in a number.
  • decimalPrecision="2" : Number                  of decimal places to which all numbers on the chart would be rounded                  to.
  • divLineDecimalPrecision="2": Number of decimal places to which all divisional line (horizontal) values                  on the chart would be rounded to.
  • limitsDecimalPrecision="2" : Number of decimal places to which upper and lower limit values on the                  chart would be rounded to.

转自http://www.appfire.com/appfire-flashcharts-plugin/FusionChartsFree/Contents/ChartSS/XML_MSColumn3D.html

Comments

guest

很好,很强大

2009-02-18 19:22:49

Leave a Comment

Name
Content
Verification Type the characters you see in the picture below