Controlling the Direction of a Numeric Axis

How to:

The invert property controls the direction of a numeric axis, ascending or descending.


Top of page

x
Syntax: How to Control the Direction of a Numeric Axis
axisname: {
  invert: boolean  }  

where:

axisname

Can be:

  • xaxis
  • yaxis
  • y2axis
invert: boolean

Specifies whether the axis should be descending. Can be:

  • true, which draws a descending axis.
  • false, which draws an ascending axis. This is the default value.


Example: Controlling the Direction of a Numeric Axis

The following request draws a descending y-axis:

GRAPH FILE WFLITE
SUM COGS_US 
BY MODEL
WHERE PRODUCT_CATEGORY EQ 'Computers'
ON GRAPH HOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_JS
border: {width: 2, color: 'teal'},
blaProperties: {lineConnection: 'curved'},
yaxis: {
    invert:true   
}
*END
ENDSTYLE
END

The output is:


Information Builders