How to: |
On a numeric axis, the intervalMode and intervalValue properties control the number of major grid lines, ticks, and labels.
"axisname": { "intervalMode": "string", "intervalValue": number}
where:
Can be:
Is a string that defines the interval mode. Valid values are:
The default value is "undefined", which automatically calculates the number and frequency of major grid lines.
Is a number that depends on the intervalMode. if intervalMode is "count", set this property to the number of major grid lines to draw. If intervalMode is "interval", set this property to the interval at which major grid lines are drawn. If intervalMode is "skip", set this property to the number of grid lines to skip. The default value is "undefined" which automatically calculates the number and frequency of major grid lines.
Note: The first and last grid lines are always drawn regardless of the intervalMode or intervalValue.
The following request generates a vertical line chart with major grid lines calculated automatically:
GRAPH FILE WF_RETAIL_LITE
SUM COGS_US
BY MODEL
WHERE PRODUCT_CATEGORY EQ 'Computers'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_JS
"border": {"width": 2, "color": "teal"},
"blaProperties": {"lineConnection": "curved"},
"yaxis": {
"intervalMode": "undefined",
"intervalValue": "undefined",
"majorGrid": {
"visible": true,
"aboveRisers": true,
"lineStyle": {"color": "red"}
}}
*END
ENDSTYLE
END
The output is:
The following version of the request draws 5 major grid lines:
GRAPH FILE WF_RETAIL_LITE
SUM COGS_US
BY MODEL
WHERE PRODUCT_CATEGORY EQ 'Computers'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_JS
"border": {"width": 2, "color": "teal"},
"blaProperties": {"lineConnection": "curved"},
"yaxis": {
"majorGrid": {"visible": true},
"intervalMode": "count",
"intervalValue": 5}
*END
ENDSTYLE
END
The output is:
The following version of the request draws major grid lines at intervals of two thousand:
GRAPH FILE WF_RETAIL_LITE
SUM COGS_US
BY MODEL
WHERE PRODUCT_CATEGORY EQ 'Computers'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_JS
"border": {"width": 2, "color": "teal"},
"blaProperties": {"lineConnection": "curved"},
"yaxis": {
"majorGrid": {"visible": true},
"intervalMode": "interval",
"intervalValue": 2000}
*END
ENDSTYLE
END
The output is:
The following version skips every other automatic major grid line:
GRAPH FILE WF_RETAIL_LITE
SUM COGS_US
BY MODEL
WHERE PRODUCT_CATEGORY EQ 'Computers'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_JS
"border": {"width": 2, "color": "teal"},
"blaProperties": {"lineConnection": "curved"},
"yaxis": {
"majorGrid": {"visible": true},
"intervalMode": "skip",
"intervalValue": 1
}
*END
ENDSTYLE
END
The output is:
WebFOCUS | |
Feedback |