XML/SWF Charts| SlickBoard| Timeline Eons(New)

 < previousnext > 

 

axis_category

 

<axis_category skip='number'
               font='string' 
               bold='boolean' 
               size='number'
               color='string' 
               alpha='number'
               orientation='string'
               
               shadow='string'
               bevel='string'
               glow='string'
               blur='string'
               
               <!-- area, stacked area, line charts -->
               margin='boolean' 
               
               <!-- scatter and bubble charts -->
               min='number' 
               max='number'
               steps='number'
               mode='string'  
               prefix='string'
               suffix='string' 
               decimals='number'
               decimal_char='string'  
               separator='string'               
               />
               


Description

axis_category sets the label attributes for the category-axis.

The category-axis is the horizontal axis with the red labels below (this axis appears vertical in bar charts):

 

The category labels are the strings passed in the first row of chart_data


<chart_data>
  <row>
	 <null/>
	 <string>2007</string>        
	 <string>2008</string>
	 <string>2009</string>
  </row>
  <row>
	 <string>Region A</string>
	 <number>20</number>
	 <number>75</number>
	 <number>85</number>
  </row>
</chart_data>

 

The axis_category attributes are:

  • skip: If this axis holds too many labels, the skip key allows skipping (hiding) some labels. A zero value doesn't hide any labels. If the skip value is 1, then the first label is displayed, the following label is skipped, and so on. If the skip value is 2, then the first label is displayed, the following 2 are skipped, and so on. Another way to hide labels is by passing empty strings to chart_data in place of category labels. The default is zero.

  • font: The font used in the category-axis (see Fonts). The default is Arial.

  • bold: A boolean that indicates whether the font is bold or not. The default is true.

  • size: The font's size. The default font size is calculated based on the chart size.

  • color: The font's color. This is a string holding triple hexadecimal values representing the red, green, and blue components of a color. The default is "000000" (black).

  • alpha: This affects the labels' transparency only when the embedded font is used (see Fonts). Valid values are 0 (fully transparent) to 100 (fully opaque). The default is 90. To hide all labels in this axis, set the alpha to 0.

  • orientation: This affects the labels' orientation only when the embedded font is used (see Fonts). Valid values are horizontal, diagonal_up, diagonal_down, vertical_up, and vertical_down. Polar charts also accept the value circular. The default value is horizontal.



  • shadow: The ID of a shadow filter to apply to the category labels. This is omitted by default (no shadow).

  • bevel: The ID of a bevel filter to apply to the category labels. This is omitted by default (no bevel).

  • glow: The ID of a glow filter to apply to the category labels. This is omitted by default (no glow).

  • blur: The ID of a blur filter to apply to the category labels. This is omitted by default (no blur).



  • margin: This applies to area, stacked area, and line charts only. It is a boolean that indicates whether to leave a margin on the left and right of the graph, or bump it against the left and right chart borders. The default is true (leave a margin). In mixed charts, there's always a margin to algin area and line charts with column charts.



  • min: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the minimum value to start this axis with. The default is calculated from the chart's data.

  • max: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the maximum value to end this axis with. The default is calculated from the chart's data.

  • steps: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the number of steps between the minimum and maximum values. If the minimum value is negative, and the maximum value is positive, then 'steps' is the number of steps between zero and the larger of max and absolute min. The default is 4.

  • mode: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the way the above min and max values are adjusted. Valid values are:

    • all: Min and max are adjusted to show all the chart values. This is the default value.

    • trim: Min and max are not adjusted, even if a chart value falls outside of this range and becomes partially or totally invisible.

  • prefix: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the characters to add before the labels (example: $10). The default is nothing.

  • suffix: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the characters to add after the labels (example: 10%). The default is nothing.

  • decimals: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the number of decimal places to the right of the decimal point (example: 10.45). The default is zero (no decimals).

  • decimal_char: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the character to use at the left of a decimal fraction (example: 1.5). The default is '.' (dot or full stop).

  • separator: This applies to scatter and bubble charts only, when the category-axis is calculated like the value-axis. This determines the character to place between every group of thousands (example: 1,00,000). The default is nothing.

 


Hiding Labels

To hide all the category labels, set axis_category's alpha attribute to zero (make all labels fully transparent):

<axis_category alpha='0' />   

 

To hide some category labels, use axis_category's skip attribute or pass empty strings instead of label text in chart_data:


<chart_data>
  <row>
	 <null/>
	 <string>2007</string>
	 <string></string> <!-- hide this label -->             
	 <string>2009</string>
  </row>
  <row>
	 <string>Region A</string>
	 <number>20</number>
	 <number>75</number>
	 <number>85</number>
  </row>
</chart_data>

 

 

Example


<chart>

   <!-- make category labels red, diagonal_down, size 10 -->   
   <axis_category size='10' color='FF0000' alpha='75' orientation='diagonal_down' />   

</chart>

 

 < previousnext > 


Copyright 2003-2014, maani.us