3D Pie DataPoints API





Special Features for Pie Charts
Data Mapping
Enable Data Refresh
Data Points

Set Color
Set Sort Order
Hide Zero-Value data Points
Drill Down
Dynamic Drill Down
Hyperlinks
3D Property Set

Note that this chart type does not support data series, time-based zooming and histogram.

Special Features for Pie Charts

// create an IPiePropertySet object
IPiePropertySet hPieProperties = chart.gethPieProperties();

// setExplodeRadialPos(float x)
hPieProperties.setExplodeRadialPos( .05f );

// get the number of pie slices
int pieSliceCount = chart.gethLegend().areItemsHidden(0).length;

// explode every sector
for( int i=0; i<pieSliceCount; i++){
  hPieProperties.setExploded( i, true);
}

// show data value in label
// gethValueLabel(int intA) returns handle to all labels
hPieProperties.gethValueLabel(0).setVisible(true);

// show percentage value in label
// gethPercentLabel(int intA) returns handle to all labels
hPieProperties.gethPercentLabel(0).setVisible(true);

// make percentage value visible in legend
hPieProperties.setPercentVisibleInLegend(true);

// sets pie sector labels visible,
// gethLabel(int intA) return handle to ALL labels
hPieProperties.gethLabel(0).setVisible(true);

// sets label distance from center
hPieProperties.setLabelRadialPos( (float)1.35 );

// set to “sector gap” mode
hPieProperties.setExplodeUsingSectorGap( true );

Data Mapping
For information on Data Mapping, please refer to Data Mapping in 2D DataPoints API.

Enable Data Refresh
For information on Data Refresh, please refer to Enable Data Refresh in 2D DataPoints API.

Data Points
To set properties on the Data Points such as top label, set color, sort data points...etc, first create an IDataPointSet object that has a handle on the chart's DataPoints.  Then, the properties can be edited through methods in the IDataPointSet.

// create an IDataPointSet object, “hDataPoints”
// that has a handle on the chart’s DataPoints
IDataPointSet hDataPoints = chart.gethDataPoints();

Set Color

// set data points’ color, use  void setColors(java.awt.Color[] color)
// color array dimension must be equal to the number of data point objects
Color[] colorSet = new Color[]{Color.yellow, Color.red, Color.blue, Color.cyan};
hDataPoints.setColors(colorSet);
Set Sort Order
// sort value data, use public void setValueSortOrder(int type)
// QbChart.ASCENDING, or DESCENDING
hDataPoints.setValueSortOrder( QbChart.ASCENDING);

// sort data, use public void setSortOrder(int seriesType, int type)
// QbChart.VALUE, CATEGORY, or SERIES
hDataPoints.setSortOrder( QbChart.CATEGORY, QbChart.ASCENDING);

Hide Zero-Value Data Points
// set data to be null if it is zero, so it would not show
// up in the chart as a thick black line
hDataPoints.setZeroAsNullData(true);
Drill Down
For information on Drill Down, please refer to Drill Down in 2D DataPoints API.

Dynamic Drill Down
For information on Dynamic Drill Down, please refer to Dynamic Drill Down in 2D DataPoints API.

Hyperlinks
For information on Hyperlinks, please refer to Hyperlinks in 2D DataPoints API.

3D Property Set
For information on 3D Property Set, please refer to 3D Property Set in 3D DataPoints API.

Please refer to QbChart, ColInfo, IColumnMap, IDataPointSet, IZoomInfo, IDrillDown, IHyperLinkSet, HyperLink, I3DPropertySet, & I3DControlPanel in EspressChart APIDocs for additional information.