<axes>

The <axes> element provides the ability to control chart labels and axes scales/ranges. A single <axes> element must be contained within a <chart> element.

Syntax

<dynamic>
  <widget class_="graphics"> 
    [1010data_QUERY] 
      <graphspec> 
        <chart> 
          <data x="" y=""/> 
          <legend/> 
         <axes/> 
          <ticks/> 
        </chart> 
    </graphspec> 
  </widget> 
</dynamic> 

The [1010data_QUERY] may be specified between the opening and closing tags of the <widget>. The results of the query provide data for the <widget> to display.

Attributes

xlabel
Specifies the label for the x-axis of the chart.

Valid values are strings.

The default is the column's name/label.

ylabel
Specifies the label for the y-axis of the chart.

Valid values are strings.

The default is the column's name/label.

zlabel
Specifies the label for the z-axis of the chart.

Valid values are strings.

The default is the column's name/label.

y2label
Specifies the label of a secondary y-axis data series.

Secondary y-axis is notated in the <data> element containing the attribute/value pair: yaxis="s".

xscale
Specifies the scale of the x-axis of the chart.

Valid values are:

  • linear
  • log

The default is linear.

yscale
Specifies the scale of the y-axis of the chart.

Valid values are:

  • linear
  • log

The default is linear.

zscale
Specifies the scale of the z-axis of the chart.

Valid values are:

  • linear
  • log

The default is linear.

xmin
Specifies the minimum x-axis range of a chart.

Valid values are numeric values that correspond to the raw data representation of the data series columns.

xmax
Specifies the maximum x-axis range of a chart.

Valid values are numeric values that correspond to the raw data representation of the data series columns.

ymin
Specifies the minimum y-axis range of a chart.

Valid values are numeric values that correspond to the raw data representation of the data series columns.

ymax
Specifies the maximum y-axis range of a chart.

Valid values are numeric values that correspond to the raw data representation of the data series columns.

zmin
Specifies the minimum z-axis range of a chart.

Valid values are numeric values that correspond to the raw data representation of the data series columns.

zmax
Specifies the maximum z-axis range of a chart.

Valid values are numeric values that correspond to the raw data representation of the data series columns.

Example: Bar Chart

This example creates a simple bar chart showing sales totals for three stores.

<dynamic>
  <widget class_="graphics" base_="pub.demo.retail.item" 
   width_="600" height_="400">
    <tabu label="Tabulation on Sales Item Detail" breaks="store">
      <tcol source="sales" fun="sum" label="Sum of`Sales"/>
    </tabu>
    <graphspec width="600" height="400">
      <chart type="bar" title="Sales by Store" samples="25">
        <data x="store" y="t0"/>
        <legend hide="0"/>
        <axes xlabel="Store" ylabel="Sales"/>
        <ticks xrot="25"/>
        <style titlesize="36" bg="lightblue"/>
      </chart>
    </graphspec>
  </widget>
</dynamic>