Gets or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts, 0 to 360.
Gets or sets the distance between the data series in a 3-D chart, as a percentage of the marker width.
The value of this property must be between 0 and 500.
Returns or sets the space between bar or column clusters, as a percentage of the bar or column width.
The value of this property must be between 0 and 500.
Specifies the pivot controls that appear on the chart
getPivotSource/setPivotSource
public java.lang.String getPivotSource() / public void setPivotSource(java.lang.String value)
The source is the data of the pivotTable.
If PivotSource is not empty ,the chart is PivotChart.
If the pivot table "PivotTable1" in the Worksheet "Sheet1" in the file "Book1.xls".
The pivotSource could be "[Book1.xls]Sheet1!PivotTable1" if the chart and the PivotTable is not in the same workbook.
If you set this property ,the previous data source setting will be lost.
getPlotBy
public int getPlotBy()
Gets and sets whether plot by row or column.
The value of the property is PlotDataByType integer constant.
getPlotEmptyCellsType/setPlotEmptyCellsType
public int getPlotEmptyCellsType() / public void setPlotEmptyCellsType(int value)
Gets and sets how to plot the empty cells.
The value of the property is PlotEmptyCellsType integer constant.
getPlotVisibleCells/setPlotVisibleCells
public boolean getPlotVisibleCells() / public void setPlotVisibleCells(boolean value)
Indicates whether only plot visible cells.
getDisplayNaAsBlank/setDisplayNaAsBlank
public boolean getDisplayNaAsBlank() / public void setDisplayNaAsBlank(boolean value)
Indicates whether displaying #N/A as blank value.
getName/setName
public java.lang.String getName() / public void setName(java.lang.String value)
Gets and sets the name of the chart.
getSizeWithWindow/setSizeWithWindow
public boolean getSizeWithWindow() / public void setSizeWithWindow(boolean value)
True if Microsoft Excel resizes the chart to match the size of the chart sheet window.
public boolean getShowLegend() / public void setShowLegend(boolean value)
Gets or sets a value indicating whether the chart legend will be displayed. Default is true.
isRectangularCornered/setRectangularCornered
public boolean isRectangularCornered() / public void setRectangularCornered(boolean value)
Gets or sets a value indicating whether the chart area is rectangular cornered.
Default is true.
getShowDataTable/setShowDataTable
public boolean getShowDataTable() / public void setShowDataTable(boolean value)
Gets or sets a value indicating whether the chart displays a data table.
getFirstSliceAngle/setFirstSliceAngle
public int getFirstSliceAngle() / public void setFirstSliceAngle(int value)
Gets or sets the angle of the first pie-chart or doughnut-chart slice, in degrees (clockwise from vertical). Applies only to pie, 3-D pie, and doughnut charts, 0 to 360.
getGapWidth/setGapWidth
public int getGapWidth() / public void setGapWidth(int value)
Returns or sets the space between bar or column clusters, as a percentage of the bar or column width.
The value of this property must be between 0 and 500.
getGapDepth/setGapDepth
public int getGapDepth() / public void setGapDepth(int value)
Gets or sets the distance between the data series in a 3-D chart, as a percentage of the marker width.
The value of this property must be between 0 and 500.
Returns a Walls object that represents the side wall of a 3-D chart.
getWallsAndGridlines2D/setWallsAndGridlines2D
public boolean getWallsAndGridlines2D() / public void setWallsAndGridlines2D(boolean value)
True if gridlines are drawn two-dimensionally on a 3-D chart.
getRotationAngle/setRotationAngle
public int getRotationAngle() / public void setRotationAngle(int value)
Represents the rotation of the 3-D chart view (the rotation of the plot area around the z-axis, in degrees).
The value of this property must be from 0 to 360, except for 3-D bar charts, where the value must be from 0 to 44.
The default value is 20. Applies only to 3-D charts.
getElevation/setElevation
public int getElevation() / public void setElevation(int value)
Represents the elevation of the 3-D chart view, in degrees.
The chart elevation is the height at which you view the chart, in degrees.
The default is 15 for most chart types.
The value of this property must be between -90 and 90, except for 3-D bar charts, where it must be between 0 and 44.
getRightAngleAxes/setRightAngleAxes
public boolean getRightAngleAxes() / public void setRightAngleAxes(boolean value)
True if the chart axes are at right angles. Applies only for 3-D charts(except Column3D and 3-D Pie Charts).
If this property is True, the Perspective property is ignored.
getAutoScaling/setAutoScaling
public boolean getAutoScaling() / public void setAutoScaling(boolean value)
True if Microsoft Excel scales a 3-D chart so that it's closer in size to the equivalent 2-D chart.
The RightAngleAxes property must be True.
getHeightPercent/setHeightPercent
public int getHeightPercent() / public void setHeightPercent(int value)
Returns or sets the height of a 3-D chart as a percentage of the chart width (between 5 and 500 percent).
getPerspective/setPerspective
public short getPerspective() / public void setPerspective(short value)
Returns or sets the perspective for the 3-D chart view. Must be between 0 and 100.
This property is ignored if the RightAngleAxes property is True.
getIs3D
public boolean getIs3D()
Indicates whether the chart is a 3d chart.
getDepthPercent/setDepthPercent
public int getDepthPercent() / public void setDepthPercent(int value)
Represents the depth of a 3-D chart as a percentage of the chart width (between 20 and 2000 percent).
getActualChartSize
public java.awt.Dimension getActualChartSize()
Gets actual size of chart in unit of pixels.
NOTE: This member is now obsolete. Instead,
please use Chart.GetActualSize() method.
This property will be removed 12 months later since July 2022.
Aspose apologizes for any inconvenience you may have experienced.
getPlacement/setPlacement
public int getPlacement() / public void setPlacement(int value)
Represents the way the chart is attached to the cells below it.
The value of the property is PlacementType integer constant.
Represents the chartShape;
NOTE: This member is now obsolete. Instead,
please use Aspose.Cells.Charts.Chart.ChartObject property.
This property will be removed 12 months later since JANUARY 2012.
Aspose apologizes for any inconvenience you may have experienced.
public void toImage(java.lang.String imageFile)
throws java.lang.Exception
Creates the chart image and saves it to a file.
The extension of the file name determines the format of the image.
The format of the image is specified by using the extension of the file name.
For example, if you specify "myfile.png", then the image will be saved
in the PNG format. The following file extensions are recognized:
.bmp, .gif, .png, .jpg, .jpeg, .tiff, .tif, .emf.
If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Parameters:
imageFile - The image file name with full path.
toImage
public void toImage(java.lang.String imageFile, ImageFormat imageFormat)
throws java.lang.Exception
Creates the chart image and saves it to a file in the specified format.
NOTE: This member is now obsolete. Instead,
please use Chart.ToImage(string, ImageType) method.
This property will be removed 12 months later since July 2022.
Aspose apologizes for any inconvenience you may have experienced.
Parameters:
imageFile - The image file name with full path.
imageFormat - The format in which to save the image.
toImage
public void toImage(java.lang.String imageFile, int imageType)
throws java.lang.Exception
Creates the chart image and saves it to a file in the specified image type.
The type of the image is specified by using imageType.
The following types are supported:
ImageType.Bmp, ImageType.Gif, ImageType.Png, ImageType.Jpeg, ImageType.Tiff, ImageType.Emf.
If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Parameters:
imageFile - The image file name with full path.
imageType - A ImageType value. The image type in which to save the image.
toImage
public void toImage(java.lang.String imageFile, long jpegQuality)
throws java.lang.Exception
Creates the chart image and saves it to a file in the Jpeg format.
If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Parameters:
imageFile - The image file name with full path.
jpegQuality - Jpeg quality.
toPdf
public void toPdf(java.lang.String fileName)
throws java.lang.Exception
Saves the chart to a pdf file.
Parameters:
fileName - the pdf file name with full path
toPdf
public void toPdf(java.lang.String fileName, float desiredPageWidth, float desiredPageHeight, int hAlignmentType, int vAlignmentType)
throws java.lang.Exception
Saves the chart to a pdf file.
Parameters:
fileName - the pdf file name with full path
desiredPageWidth - The desired page width in inches.
desiredPageHeight - The desired page height in inches.
hAlignmentType - A PageLayoutAlignmentType value. The chart horizontal alignment type in the output page.
vAlignmentType - A PageLayoutAlignmentType value. The chart vertical alignment type in the output page.
toPdf
public void toPdf(java.io.OutputStream stream)
throws java.lang.Exception
Creates the chart pdf and saves it to a stream.
Parameters:
stream - The output stream.
toPdf
public void toPdf(java.io.OutputStream stream, float desiredPageWidth, float desiredPageHeight, int hAlignmentType, int vAlignmentType)
throws java.lang.Exception
Creates the chart pdf and saves it to a stream.
Parameters:
stream - The output stream.
desiredPageWidth - The desired page width in inches.
desiredPageHeight - The desired page height in inches.
hAlignmentType - A PageLayoutAlignmentType value. The chart horizontal alignment type in the output page.
vAlignmentType - A PageLayoutAlignmentType value. The chart vertical alignment type in the output page.
toImage
public void toImage(java.lang.String imageFile, ImageOrPrintOptions options)
throws java.lang.Exception
Creates the chart image and saves it to a file.
The extension of the file name determines the format of the image.
The format of the image is specified by using the extension of the file name.
For example, if you specify "myfile.png", then the image will be saved
in the PNG format. The following file extensions are recognized:
.bmp, .gif, .png, .jpg, .jpeg, .tiff, .tif, .emf.
If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Please refer to Supported Charts List for more details.
Parameters:
imageFile - The image file name with full path.
options - Additional image creation options
Example:
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.setHorizontalResolution(300);
options.setVerticalResolution(300);
options.setTiffCompression(TiffCompression.COMPRESSION_CCITT_4);
Workbook book = new Workbook("test.xls");
book.getWorksheets().get(0).getCharts().get(0).toImage("chart.Tiff", options);
toImage
public void toImage(java.io.OutputStream stream, ImageOrPrintOptions options)
throws java.lang.Exception
Creates the chart image and saves it to a stream in the specified format.
The format of the image is specified by using options.ImageFormat.
The following formats are supported:
ImageFormat.Bmp, ImageFormat.Gif, ImageFormat.Png, ImageFormat.Jpeg, ImageFormat.Tiff, ImageFormat.Emf.
If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing.
Please refer to Supported Charts List for more details.
Parameters:
stream - The output stream.
options - Additional image creation options
getActualSize
public int[] getActualSize()
Gets actual size of chart in unit of pixels.
Returns:
Actual size in an array(width and height).
[0] is width; [1] is height.
hasAxis
public boolean hasAxis(int aixsType, boolean isPrimary)
Returns which axes exist on the chart.
Normally, Pie, PieExploded, PiePie,PieBar, Pie3D, Pie3DExploded,Doughnut, DoughnutExploded is no axis.
Gets the data source range of the chart.
Only supports range.
Returns:
The data source.
setChartDataRange
public void setChartDataRange(java.lang.String area, boolean isVertical)
Specifies data range for a chart.
Parameters:
area - Specifies values from which to plot the data series
isVertical - Specifies whether to plot the series from a range of cell values by row or by column.
isChartDataChanged
public boolean isChartDataChanged()
throws java.lang.Exception
Detects if a chart's data source has changed.
The method detects the changes in the chart's data source before rendering the chart to image format.
At first Chart.toImage call, the chart source data (e.g. XValuesParseData, ValuesParseData) will be recorded.
Before calling the Chart.toImage method again, call IsChartDataChanged method to check if Chart needs re-rendering.
Returns:
Returns true if the chart has changed otherwise returns false
refreshPivotData
public void refreshPivotData()
Refreshes pivot chart's data from it's pivot data source.
We will gather data from pivot data source to the pivot chart cache.
This method is only used to gather all data to a pivot chart.
move
public void move(int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)
Moves the chart to a specified location.
Parameters:
upperLeftColumn - Upper left column index.
upperLeftRow - Upper left row index.
lowerRightColumn - Lower right column index
lowerRightRow - Lower right row index
calculate
public void calculate()
throws java.lang.Exception
Calculates the custom position of plot area, axes if the position of them are auto assigned.