Example:
excel = Workbook() charts = excel.getWorksheets().get(0).getCharts() # Create a chart chart = charts.get(charts.add(ChartType.COLUMN, 1, 1, 10, 10)) chart.getNSeries().add("A1:C5", True) # Filling the area of the 2nd NSeries with a gradient chart.getNSeries().get(1).getArea().getFillFormat().setOneColorGradient(Color.getLime(), 1, GradientStyleType.HORIZONTAL, 1)
Property Getters/Setters Summary | ||
---|---|---|
method | getFillType() | |
method | setFillType(value) | |
Gets and sets fill type The value of the property is FillType integer constant. | ||
method | getGradientColor1() | |
Returns the gradient color 1 for the the specified fill. | ||
method | getGradientColor2() | |
Returns the gradient color 2 for the the specified fill. | ||
method | getGradientColorType() | |
Returns the gradient color type for the specified fill. The value of the property is GradientColorType integer constant. | ||
method | getGradientDegree() | |
Returns the gradient degree for the the specified fill. Only applies for Excel 2007. | ||
method | getGradientFill() | |
Gets |
||
method | getGradientStyle() | |
Returns the gradient style for the specified fill. The value of the property is GradientStyleType integer constant. | ||
method | getGradientVariant() | |
Returns the gradient variant for the the specified fill. Only applies for Excel 2007. | ||
method | getImageData() | |
method | setImageData(value) | |
Gets and sets the picture image data. | ||
method | getPattern() | |
method | setPattern(value) | |
Represents an area's display pattern. The value of the property is FillPattern integer constant. | ||
method | getPatternFill() | |
Gets |
||
method | getPictureFormatType() | |
method | setPictureFormatType(value) | |
Gets and sets the picture format type. The value of the property is FillPictureType integer constant. | ||
method | getPresetColor() | |
Returns the gradient preset color for the the specified fill. The value of the property is GradientPresetType integer constant. | ||
method | getScale() | |
method | setScale(value) | |
Gets and sets the picture format scale. | ||
method | getSetType() | |
method | setSetType(value) | |
Gets the fill format set type. The value of the property is FormatSetType integer constant. | ||
method | getSolidFill() | |
Gets |
||
method | getTexture() | |
method | setTexture(value) | |
Represents the texture type for the specified fill. The value of the property is TextureType integer constant. | ||
method | getTextureFill() | |
Gets |
||
method | getTransparency() | |
method | setTransparency(value) | |
Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). | ||
method | getType() | |
method | setType(value) | |
Gets and sets the fill type. The value of the property is FillType integer constant. |
Method Summary | ||
---|---|---|
method | setOneColorGradient(color, degree, style, variant) | |
Sets the specified fill to a one-color gradient. Only applies for Excel 2007. | ||
method | setPresetColorGradient(presetColor, style, variant) | |
Sets the specified fill to a preset-color gradient. Only applies for Excel 2007. | ||
method | setTwoColorGradient(color1, color2, style, variant) | |
Sets the specified fill to a two-color gradient. Only applies for Excel 2007. | ||
method | setTwoColorGradient(color1, transparency1, color2, transparency2, style, variant) | |
Sets the specified fill to a two-color gradient. Only applies for Excel 2007. |
Property Getters/Setters Detail |
---|
getType/setType : int | |
int getType() / setType(value) |
getFillType/setFillType : int | |
int getFillType() / setFillType(value) |
getTransparency/setTransparency : float | |
float getTransparency() / setTransparency(value) |
getSetType/setSetType : int | |
int getSetType() / setSetType(value) |
getGradientFill : GradientFill | |
GradientFill getGradientFill() |
getTextureFill : TextureFill | |
TextureFill getTextureFill() |
getSolidFill : SolidFill | |
SolidFill getSolidFill() |
getPatternFill : PatternFill | |
PatternFill getPatternFill() |
getGradientColorType : int | |
int getGradientColorType() |
getGradientStyle : int | |
int getGradientStyle() |
getGradientColor1 : Color | |
Color getGradientColor1() |
getGradientColor2 : Color | |
Color getGradientColor2() |
getGradientDegree : float | |
float getGradientDegree() |
getGradientVariant : int | |
int getGradientVariant() |
getPresetColor : int | |
int getPresetColor() |
getTexture/setTexture : int | |
int getTexture() / setTexture(value) |
getPattern/setPattern : int | |
int getPattern() / setPattern(value) |
getPictureFormatType/setPictureFormatType : int | |
int getPictureFormatType() / setPictureFormatType(value) |
getScale/setScale : float | |
float getScale() / setScale(value) |
getImageData/setImageData : byte[] | |
byte[] getImageData() / setImageData(value) |
Method Detail |
---|
setOneColorGradient | |
setOneColorGradient(color, degree, style, variant) |
color: Color
- One gradient color.degree: float
- The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).style: int
- A variant: int
- The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.setTwoColorGradient | |
setTwoColorGradient(color1, color2, style, variant) |
color1: Color
- One gradient color.color2: Color
- Two gradient color.style: int
- A variant: int
- The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.setTwoColorGradient | |
setTwoColorGradient(color1, transparency1, color2, transparency2, style, variant) |
color1: Color
- One gradient color.transparency1: float
- The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).color2: Color
- Two gradient color.transparency2: float
- The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).style: int
- A variant: int
- The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.setPresetColorGradient | |
setPresetColorGradient(presetColor, style, variant) |
presetColor: int
- A style: int
- A variant: int
- The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.