ooodev.format.inner.direct.chart2.chart.area.gradient module

class ooodev.format.inner.direct.chart2.chart.area.gradient.Gradient(chart_doc, *, style=GradientStyle.LINEAR, step_count=0, offset=Offset(x=50, y=50), angle=0, border=0, grad_color=ColorRange(start=0, end=16777215), grad_intensity=IntensityRange(start=100, end=100), name='')[source]

Bases: Gradient

Style for Chart Area Fill Gradient.

New in version 0.9.4.

__init__(chart_doc, *, style=GradientStyle.LINEAR, step_count=0, offset=Offset(x=50, y=50), angle=0, border=0, grad_color=ColorRange(start=0, end=16777215), grad_intensity=IntensityRange(start=100, end=100), name='')[source]

Constructor

Parameters:
  • chart_doc (XChartDocument) – Chart document.

  • style (GradientStyle, optional) – Specifies the style of the gradient. Defaults to GradientStyle.LINEAR.

  • step_count (int, optional) – Specifies the number of steps of change color. Defaults to 0.

  • offset (Offset, int, optional) – Specifies the X and Y coordinate, where the gradient begins. X is effectively the center of the RADIAL, ELLIPTICAL, SQUARE and RECT style gradients. Defaults to Offset(50, 50).

  • angle (Angle, int, optional) – Specifies angle of the gradient. Defaults to 0.

  • border (int, optional) – Specifies percent of the total width where just the start color is used. Defaults to 0.

  • grad_color (ColorRange, optional) – Specifies the color at the start point and stop point of the gradient. Defaults to ColorRange(Color(0), Color(16777215)).

  • grad_intensity (IntensityRange, optional) – Specifies the intensity at the start point and stop point of the gradient. Defaults to IntensityRange(100, 100).

  • name (str, optional) – Specifies the Fill Gradient Name.

Return type:

None

copy()[source]
copy(**kwargs)
copy(**kwargs)

Copy the current instance.

Returns:

The copied instance.

Return type:

Hatch

classmethod from_obj(chart_doc, obj)[source]
classmethod from_obj(chart_doc, obj, **kwargs)
classmethod from_obj(chart_doc, obj, **kwargs)

Gets instance from object.

Parameters:
  • chart_doc (XChartDocument) – Chart document.

  • obj (object) – UNO object.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Instance that represents Gradient color.

Return type:

Gradient

classmethod from_preset(chart_doc, preset)[source]
classmethod from_preset(chart_doc, preset, **kwargs)
classmethod from_preset(chart_doc, preset, **kwargs)

Gets instance from preset.

Parameters:
Returns:

Gradient from a preset.

Return type:

Gradient

classmethod from_struct(chart_doc, struct, name='', **kwargs)[source]

Gets instance from GradientStruct instance

Parameters:
  • chart_doc (XChartDocument) – Chart document.

  • struct (GradientStruct) – Gradient Struct instance.

  • name (str, optional) – Name of Gradient.

Return type:

Gradient

default

Descriptor to raise an exception when an attribute is accessed after deletion.

property prop_format_kind: FormatKind

Gets the kind of style

Return type:

FormatKind