MCPcopy Create free account
hub / github.com/scanny/python-pptx / Marker

Class Marker

src/pptx/chart/marker.py:13–70  ·  view source on GitHub ↗

Represents a data point marker, such as a diamond or circle, on a line-type chart.

Source from the content-addressed store, hash-verified

11
12
13class Marker(ElementProxy):
14 """
15 Represents a data point marker, such as a diamond or circle, on
16 a line-type chart.
17 """
18
19 @lazyproperty
20 def format(self):
21 """
22 The |ChartFormat| instance for this marker, providing access to shape
23 properties such as fill and line.
24 """
25 marker = self._element.get_or_add_marker()
26 return ChartFormat(marker)
27
28 @property
29 def size(self):
30 """
31 An integer between 2 and 72 inclusive indicating the size of this
32 marker in points. A value of |None| indicates no explicit value is
33 set and the size is inherited from a higher-level setting or the
34 PowerPoint default (which may be 9). Assigning |None| removes any
35 explicitly assigned size, causing this value to be inherited.
36 """
37 marker = self._element.marker
38 if marker is None:
39 return None
40 return marker.size_val
41
42 @size.setter
43 def size(self, value):
44 marker = self._element.get_or_add_marker()
45 marker._remove_size()
46 if value is None:
47 return
48 size = marker._add_size()
49 size.val = value
50
51 @property
52 def style(self):
53 """
54 A member of the :ref:`XlMarkerStyle` enumeration indicating the shape
55 of this marker. Returns |None| if no explicit style has been set,
56 which corresponds to the "Automatic" option in the PowerPoint UI.
57 """
58 marker = self._element.marker
59 if marker is None:
60 return None
61 return marker.symbol_val
62
63 @style.setter
64 def style(self, value):
65 marker = self._element.get_or_add_marker()
66 marker._remove_symbol()
67 if value is None:
68 return
69 symbol = marker._add_symbol()
70 symbol.val = value

Callers 7

markerMethod · 0.90
markerMethod · 0.90
format_fixtureMethod · 0.90
size_get_fixtureMethod · 0.90
size_set_fixtureMethod · 0.90
style_get_fixtureMethod · 0.90
style_set_fixtureMethod · 0.90

Calls

no outgoing calls

Tested by 5

format_fixtureMethod · 0.72
size_get_fixtureMethod · 0.72
size_set_fixtureMethod · 0.72
style_get_fixtureMethod · 0.72
style_set_fixtureMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…