Controlling Automatic Layout of Ordinal Axis Labels

The axisAutoLayout properties control automatic layout of ordinal axis labels.



Syntax: How to Control Automatic Layout of Ordinal Axis Labels

"axisAutoLayout": {
   "rotate45": boolean,
   "rotate90": boolean,
   "truncate": boolean,
   "stagger": boolean,
   "skip": boolean},

where:

"rotate45": boolean

Can be:

true, which allows auto-layout to rotate labels 45 degrees in order to achieve the best automatic layout of ordinal axis labels. The default value is true.

false, which does not allow auto-layout to rotate labels 45 degrees.

"rotate90": boolean

Can be:

true, to allow auto-layout to rotate labels 90 degrees in order to achieve the best automatic layout of ordinal axis labels. The default value is true.

false, which does not allow auto-layout to rotate labels 90 degrees.

"truncate": boolean

Can be:

true, which allows auto-layout to truncate labels in order to achieve the best automatic layout of ordinal axis labels. The default value is true.

false, which does not allow auto-layout to truncate labels.

"stagger": boolean

Can be:

true, which allows auto-layout to stagger labels in order to achieve the best automatic layout of ordinal axis labels. The default value is true.

false, which does not allow auto-layout to stagger labels.

Note: Staggering is not supported for numeric axis labels.

"skip": boolean

Can be:

  • true, which allows auto-layout to skip labels in order to achieve the best automatic layout of ordinal axis labels. The default value is true.
  • false, which does not allow auto-layout to skip labels.



Example: Controlling Automatic Layout of Ordinal Axis Labels

The following request generates a vertical line chart. The axisAutoLayout properties do not allow rotation, truncation, or skipping of group labels, but they are allowed to be staggered:

GRAPH FILE WF_RETAIL_LITE
SUM COGS_US
ACROSS PRODUCT_CATEGORY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
*GRAPH_JS
"blaProperties": {"lineConnection": "curved"},
	"xaxis": {"labels": {"visible": true,
		"font": "bold 12pt Bookman Old Style",
		"color": "red",
		"rotation": 0
	}},
"axisAutoLayout": {
	"rotate45": false,
	"rotate90": false,
	"truncate": false,
	"stagger": true,
	"skip": false
	}
*END
ENDSTYLE
END

On the output, the labels are staggered:

Changing the axisAutoLayout properties to the following makes skipping allowed, but not staggering:

"axisAutoLayout":{"rotate45":false, "rotate90":false, "truncate":false, "stagger":false, "skip":true}

With these properties, the output is:

Changing the axisAutoLayout properties to the following rotates the labels 45 degrees:

"axisAutoLayout":{"rotate45":true, "rotate90":false, "truncate":false, "stagger":false, "skip":false}

With these properties, the output is:


Information Builders