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 specified fill.
|
||
method | getGradientColor2() | |
Returns the gradient color 2 for 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 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 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 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 | equals(obj) | |
method | hashCode() | |
Gets the hash code.
|
||
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.
|
int getType() / setType(value)
int getFillType() / setFillType(value)
float getTransparency() / setTransparency(value)
int getSetType() / setSetType(value)
GradientFill getGradientFill()
TextureFill getTextureFill()
PatternFill getPatternFill()
int getGradientColorType()
int getGradientStyle()
Color getGradientColor1()
Color getGradientColor2()
float getGradientDegree()
int getGradientVariant()
int getPresetColor()
int getTexture() / setTexture(value)
int getPattern() / setPattern(value)
int getPictureFormatType() / setPictureFormatType(value)
float getScale() / setScale(value)
byte[] getImageData() / setImageData(value)
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(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(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(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.boolean equals(obj)
obj: Object
- int hashCode()