Introduction
Adding
a Secondary Chart
Set Axis
Scale
Axis
Thickness/Show Axis
Set Axis
Scale Using Primary Y-Axis
Swap
Primary & Secondary Axis
Format
Axis Color
Show
2D Arrowhead
Label
and Ticker
Note: The Secondary Y-Axis is not supported in radar, pie, dial, bubble, and scatter charts.
Introduction
To set properties on the
Axis grid, labels, range, intervals...etc, first create an IAxis object
that has a handle on the chart's Axis that would be edited. Then,
the minimum, maximum, step intervals...etc can be set by using the setMinScale,
setMaxScale, setScaleStep... etc. Please refer to IAxis in the EspressChart
API DOCS if additional information is desired. Some API examples
are provided below.
// the data mapping for the secondary y values is included in the colInfoSet Axis Scale
// it is specified by the “subvalue” parameter
// ColInfo(int series, int category, int sumBy, int value, int subvalue)
ColInfo colInfo = new ColInfo(-1, 0, -1, 1, 2);// create chart object
chart = new QbChart(this, QbChart.VIEW2D, QbChart.COL, data, colInfo, null);// create an ISecondary object that has a handle on the Secondary Chart
ISecondaryChart hSecondaryChart = chart.gethSecondaryChart();// set the secondary chart type, available options are COMBO_LINE
// COMBO_STACKAREA, COMBO_COL, COMBO_OVERLAY
hSecondaryChart.setCombinationType(QbChart.COMBO_LINE);// create an IAxis object that has a handle on the Secondary Y-Axis
IAxis hSAxis = hSecondaryChart.gethAxis();
Axis
Thickness/Show Axis
For information on Axis
Thickness/Show Axis, please refer to Axis Thickness/Show
Axis in 2D Axis API.
Set Axis Scale Using Primary Y-Axis
// OR, we can set the scale to be the same as the Primary Y-AxisSwap Primary & Secondary Axis
hSecondaryChart.setUsingPrimaryAxis(true);
// swap Y and Secondary Y-AxisFormat Axis Color
hSecondaryChart.setSwapAxis(true);
Show
2D Arrowhead
For information on Show
2D Arrowhead, please refer to Show 2D Arrowhead
in 2D Axis API.
Label
and Ticker
For information on Label
and Ticker, please refer to Axis Label API.
Please refer to IAxis,
IDataPointSet,
DateTimeFormat,
&
IZoomInfo in EspressChart
APIDocs for additional information.