ps-python-pptx 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. pptx/__init__.py +84 -0
  2. pptx/action.py +270 -0
  3. pptx/api.py +49 -0
  4. pptx/chart/__init__.py +0 -0
  5. pptx/chart/axis.py +523 -0
  6. pptx/chart/category.py +200 -0
  7. pptx/chart/chart.py +280 -0
  8. pptx/chart/data.py +864 -0
  9. pptx/chart/datalabel.py +288 -0
  10. pptx/chart/legend.py +79 -0
  11. pptx/chart/marker.py +70 -0
  12. pptx/chart/plot.py +412 -0
  13. pptx/chart/point.py +101 -0
  14. pptx/chart/series.py +258 -0
  15. pptx/chart/xlsx.py +272 -0
  16. pptx/chart/xmlwriter.py +1840 -0
  17. pptx/dml/__init__.py +0 -0
  18. pptx/dml/chtfmt.py +40 -0
  19. pptx/dml/color.py +301 -0
  20. pptx/dml/effect.py +41 -0
  21. pptx/dml/fill.py +468 -0
  22. pptx/dml/line.py +100 -0
  23. pptx/enum/__init__.py +0 -0
  24. pptx/enum/action.py +71 -0
  25. pptx/enum/base.py +175 -0
  26. pptx/enum/chart.py +492 -0
  27. pptx/enum/dml.py +405 -0
  28. pptx/enum/lang.py +685 -0
  29. pptx/enum/shapes.py +1029 -0
  30. pptx/enum/text.py +371 -0
  31. pptx/exc.py +23 -0
  32. pptx/media.py +197 -0
  33. pptx/opc/__init__.py +0 -0
  34. pptx/opc/constants.py +331 -0
  35. pptx/opc/oxml.py +188 -0
  36. pptx/opc/package.py +762 -0
  37. pptx/opc/packuri.py +109 -0
  38. pptx/opc/serialized.py +296 -0
  39. pptx/opc/shared.py +20 -0
  40. pptx/opc/spec.py +44 -0
  41. pptx/oxml/__init__.py +492 -0
  42. pptx/oxml/action.py +53 -0
  43. pptx/oxml/chart/__init__.py +0 -0
  44. pptx/oxml/chart/axis.py +297 -0
  45. pptx/oxml/chart/chart.py +282 -0
  46. pptx/oxml/chart/datalabel.py +252 -0
  47. pptx/oxml/chart/legend.py +72 -0
  48. pptx/oxml/chart/marker.py +61 -0
  49. pptx/oxml/chart/plot.py +345 -0
  50. pptx/oxml/chart/series.py +254 -0
  51. pptx/oxml/chart/shared.py +219 -0
  52. pptx/oxml/coreprops.py +288 -0
  53. pptx/oxml/dml/__init__.py +0 -0
  54. pptx/oxml/dml/color.py +111 -0
  55. pptx/oxml/dml/fill.py +197 -0
  56. pptx/oxml/dml/line.py +12 -0
  57. pptx/oxml/ns.py +129 -0
  58. pptx/oxml/presentation.py +130 -0
  59. pptx/oxml/shapes/__init__.py +19 -0
  60. pptx/oxml/shapes/autoshape.py +455 -0
  61. pptx/oxml/shapes/connector.py +107 -0
  62. pptx/oxml/shapes/graphfrm.py +342 -0
  63. pptx/oxml/shapes/groupshape.py +280 -0
  64. pptx/oxml/shapes/picture.py +270 -0
  65. pptx/oxml/shapes/shared.py +523 -0
  66. pptx/oxml/simpletypes.py +740 -0
  67. pptx/oxml/slide.py +347 -0
  68. pptx/oxml/table.py +588 -0
  69. pptx/oxml/text.py +748 -0
  70. pptx/oxml/theme.py +29 -0
  71. pptx/oxml/xmlchemy.py +717 -0
  72. pptx/package.py +222 -0
  73. pptx/parts/__init__.py +0 -0
  74. pptx/parts/chart.py +95 -0
  75. pptx/parts/coreprops.py +167 -0
  76. pptx/parts/embeddedpackage.py +93 -0
  77. pptx/parts/image.py +275 -0
  78. pptx/parts/media.py +37 -0
  79. pptx/parts/presentation.py +126 -0
  80. pptx/parts/slide.py +297 -0
  81. pptx/parts/theme.py +13 -0
  82. pptx/presentation.py +113 -0
  83. pptx/py.typed +0 -0
  84. pptx/shapes/__init__.py +26 -0
  85. pptx/shapes/autoshape.py +355 -0
  86. pptx/shapes/base.py +293 -0
  87. pptx/shapes/connector.py +297 -0
  88. pptx/shapes/freeform.py +337 -0
  89. pptx/shapes/graphfrm.py +166 -0
  90. pptx/shapes/group.py +69 -0
  91. pptx/shapes/picture.py +203 -0
  92. pptx/shapes/placeholder.py +407 -0
  93. pptx/shapes/shapetree.py +1190 -0
  94. pptx/shared.py +82 -0
  95. pptx/slide.py +577 -0
  96. pptx/spec.py +632 -0
  97. pptx/table.py +520 -0
  98. pptx/templates/default.pptx +0 -0
  99. pptx/templates/docx-icon.emf +0 -0
  100. pptx/templates/generic-icon.emf +0 -0
  101. pptx/templates/notes.xml +23 -0
  102. pptx/templates/notesMaster.xml +352 -0
  103. pptx/templates/pptx-icon.emf +0 -0
  104. pptx/templates/theme.xml +321 -0
  105. pptx/templates/xlsx-icon.emf +0 -0
  106. pptx/text/__init__.py +0 -0
  107. pptx/text/fonts.py +399 -0
  108. pptx/text/layout.py +325 -0
  109. pptx/text/text.py +770 -0
  110. pptx/theme.py +135 -0
  111. pptx/types.py +36 -0
  112. pptx/util.py +284 -0
  113. ps_python_pptx-1.1.0.dist-info/METADATA +75 -0
  114. ps_python_pptx-1.1.0.dist-info/RECORD +117 -0
  115. ps_python_pptx-1.1.0.dist-info/WHEEL +5 -0
  116. ps_python_pptx-1.1.0.dist-info/licenses/LICENSE +20 -0
  117. ps_python_pptx-1.1.0.dist-info/top_level.txt +1 -0
pptx/enum/base.py ADDED
@@ -0,0 +1,175 @@
1
+ """Base classes and other objects used by enumerations."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import enum
6
+ import textwrap
7
+ from typing import TYPE_CHECKING, Any, Type, TypeVar
8
+
9
+ if TYPE_CHECKING:
10
+ from typing_extensions import Self
11
+
12
+ _T = TypeVar("_T", bound="BaseXmlEnum")
13
+
14
+
15
+ class BaseEnum(int, enum.Enum):
16
+ """Base class for Enums that do not map XML attr values.
17
+
18
+ The enum's value will be an integer, corresponding to the integer assigned the
19
+ corresponding member in the MS API enum of the same name.
20
+ """
21
+
22
+ def __new__(cls, ms_api_value: int, docstr: str):
23
+ self = int.__new__(cls, ms_api_value)
24
+ self._value_ = ms_api_value
25
+ self.__doc__ = docstr.strip()
26
+ return self
27
+
28
+ def __str__(self):
29
+ """The symbolic name and string value of this member, e.g. 'MIDDLE (3)'."""
30
+ return f"{self.name} ({self.value})"
31
+
32
+
33
+ class BaseXmlEnum(int, enum.Enum):
34
+ """Base class for Enums that also map XML attr values.
35
+
36
+ The enum's value will be an integer, corresponding to the integer assigned the
37
+ corresponding member in the MS API enum of the same name.
38
+ """
39
+
40
+ xml_value: str | None
41
+
42
+ def __new__(cls, ms_api_value: int, xml_value: str | None, docstr: str):
43
+ self = int.__new__(cls, ms_api_value)
44
+ self._value_ = ms_api_value
45
+ self.xml_value = xml_value
46
+ self.__doc__ = docstr.strip()
47
+ return self
48
+
49
+ def __str__(self):
50
+ """The symbolic name and string value of this member, e.g. 'MIDDLE (3)'."""
51
+ return f"{self.name} ({self.value})"
52
+
53
+ @classmethod
54
+ def from_xml(cls, xml_value: str) -> Self:
55
+ """Enumeration member corresponding to XML attribute value `xml_value`.
56
+
57
+ Raises `ValueError` if `xml_value` is the empty string ("") or is not an XML attribute
58
+ value registered on the enumeration. Note that enum members that do not correspond to one
59
+ of the defined values for an XML attribute have `xml_value == ""`. These
60
+ "return-value only" members cannot be automatically mapped from an XML attribute value and
61
+ must be selected explicitly by code, based on the appropriate conditions.
62
+
63
+ Example::
64
+
65
+ >>> WD_PARAGRAPH_ALIGNMENT.from_xml("center")
66
+ WD_PARAGRAPH_ALIGNMENT.CENTER
67
+
68
+ """
69
+ # -- the empty string never maps to a member --
70
+ member = (
71
+ next((member for member in cls if member.xml_value == xml_value), None)
72
+ if xml_value
73
+ else None
74
+ )
75
+
76
+ if member is None:
77
+ raise ValueError(f"{cls.__name__} has no XML mapping for {repr(xml_value)}")
78
+
79
+ return member
80
+
81
+ @classmethod
82
+ def to_xml(cls: Type[_T], value: int | _T) -> str:
83
+ """XML value of this enum member, generally an XML attribute value."""
84
+ # -- presence of multi-arg `__new__()` method fools type-checker, but getting a
85
+ # -- member by its value using EnumCls(val) works as usual.
86
+ member = cls(value)
87
+ xml_value = member.xml_value
88
+ if not xml_value:
89
+ raise ValueError(f"{cls.__name__}.{member.name} has no XML representation")
90
+ return xml_value
91
+
92
+ @classmethod
93
+ def validate(cls: Type[_T], value: _T):
94
+ """Raise |ValueError| if `value` is not an assignable value."""
95
+ if value not in cls:
96
+ raise ValueError(f"{value} not a member of {cls.__name__} enumeration")
97
+
98
+
99
+ class DocsPageFormatter(object):
100
+ """Formats a reStructuredText documention page (string) for an enumeration."""
101
+
102
+ def __init__(self, clsname: str, clsdict: dict[str, Any]):
103
+ self._clsname = clsname
104
+ self._clsdict = clsdict
105
+
106
+ @property
107
+ def page_str(self):
108
+ """
109
+ The RestructuredText documentation page for the enumeration. This is
110
+ the only API member for the class.
111
+ """
112
+ tmpl = ".. _%s:\n\n%s\n\n%s\n\n----\n\n%s"
113
+ components = (
114
+ self._ms_name,
115
+ self._page_title,
116
+ self._intro_text,
117
+ self._member_defs,
118
+ )
119
+ return tmpl % components
120
+
121
+ @property
122
+ def _intro_text(self):
123
+ """
124
+ The docstring of the enumeration, formatted for use at the top of the
125
+ documentation page
126
+ """
127
+ try:
128
+ cls_docstring = self._clsdict["__doc__"]
129
+ except KeyError:
130
+ cls_docstring = ""
131
+
132
+ if cls_docstring is None:
133
+ return ""
134
+
135
+ return textwrap.dedent(cls_docstring).strip()
136
+
137
+ def _member_def(self, member: BaseEnum | BaseXmlEnum):
138
+ """Return an individual member definition formatted as an RST glossary entry.
139
+
140
+ Output is wrapped to fit within 78 columns.
141
+ """
142
+ member_docstring = textwrap.dedent(member.__doc__ or "").strip()
143
+ member_docstring = textwrap.fill(
144
+ member_docstring,
145
+ width=78,
146
+ initial_indent=" " * 4,
147
+ subsequent_indent=" " * 4,
148
+ )
149
+ return "%s\n%s\n" % (member.name, member_docstring)
150
+
151
+ @property
152
+ def _member_defs(self):
153
+ """
154
+ A single string containing the aggregated member definitions section
155
+ of the documentation page
156
+ """
157
+ members = self._clsdict["__members__"]
158
+ member_defs = [self._member_def(member) for member in members if member.name is not None]
159
+ return "\n".join(member_defs)
160
+
161
+ @property
162
+ def _ms_name(self):
163
+ """
164
+ The Microsoft API name for this enumeration
165
+ """
166
+ return self._clsdict["__ms_name__"]
167
+
168
+ @property
169
+ def _page_title(self):
170
+ """
171
+ The title for the documentation page, formatted as code (surrounded
172
+ in double-backtics) and underlined with '=' characters
173
+ """
174
+ title_underscore = "=" * (len(self._clsname) + 4)
175
+ return "``%s``\n%s" % (self._clsname, title_underscore)
pptx/enum/chart.py ADDED
@@ -0,0 +1,492 @@
1
+ """Enumerations used by charts and related objects."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pptx.enum.base import BaseEnum, BaseXmlEnum
6
+
7
+
8
+ class XL_AXIS_CROSSES(BaseXmlEnum):
9
+ """Specifies the point on an axis where the other axis crosses.
10
+
11
+ Example::
12
+
13
+ from pptx.enum.chart import XL_AXIS_CROSSES
14
+
15
+ value_axis.crosses = XL_AXIS_CROSSES.MAXIMUM
16
+
17
+ MS API Name: `XlAxisCrosses`
18
+
19
+ https://msdn.microsoft.com/en-us/library/office/ff745402.aspx
20
+ """
21
+
22
+ AUTOMATIC = (-4105, "autoZero", "The axis crossing point is set automatically, often at zero.")
23
+ """The axis crossing point is set automatically, often at zero."""
24
+
25
+ CUSTOM = (-4114, "", "The .crosses_at property specifies the axis crossing point.")
26
+ """The .crosses_at property specifies the axis crossing point."""
27
+
28
+ MAXIMUM = (2, "max", "The axis crosses at the maximum value.")
29
+ """The axis crosses at the maximum value."""
30
+
31
+ MINIMUM = (4, "min", "The axis crosses at the minimum value.")
32
+ """The axis crosses at the minimum value."""
33
+
34
+
35
+ class XL_CATEGORY_TYPE(BaseEnum):
36
+ """Specifies the type of the category axis.
37
+
38
+ Example::
39
+
40
+ from pptx.enum.chart import XL_CATEGORY_TYPE
41
+
42
+ date_axis = chart.category_axis
43
+ assert date_axis.category_type == XL_CATEGORY_TYPE.TIME_SCALE
44
+
45
+ MS API Name: `XlCategoryType`
46
+
47
+ https://msdn.microsoft.com/EN-US/library/office/ff746136.aspx
48
+ """
49
+
50
+ AUTOMATIC_SCALE = (-4105, "The application controls the axis type.")
51
+ """The application controls the axis type."""
52
+
53
+ CATEGORY_SCALE = (2, "Axis groups data by an arbitrary set of categories")
54
+ """Axis groups data by an arbitrary set of categories"""
55
+
56
+ TIME_SCALE = (3, "Axis groups data on a time scale of days, months, or years.")
57
+ """Axis groups data on a time scale of days, months, or years."""
58
+
59
+
60
+ class XL_CHART_TYPE(BaseEnum):
61
+ """Specifies the type of a chart.
62
+
63
+ Example::
64
+
65
+ from pptx.enum.chart import XL_CHART_TYPE
66
+
67
+ assert chart.chart_type == XL_CHART_TYPE.BAR_STACKED
68
+
69
+ MS API Name: `XlChartType`
70
+
71
+ http://msdn.microsoft.com/en-us/library/office/ff838409.aspx
72
+ """
73
+
74
+ THREE_D_AREA = (-4098, "3D Area.")
75
+ """3D Area."""
76
+
77
+ THREE_D_AREA_STACKED = (78, "3D Stacked Area.")
78
+ """3D Stacked Area."""
79
+
80
+ THREE_D_AREA_STACKED_100 = (79, "100% Stacked Area.")
81
+ """100% Stacked Area."""
82
+
83
+ THREE_D_BAR_CLUSTERED = (60, "3D Clustered Bar.")
84
+ """3D Clustered Bar."""
85
+
86
+ THREE_D_BAR_STACKED = (61, "3D Stacked Bar.")
87
+ """3D Stacked Bar."""
88
+
89
+ THREE_D_BAR_STACKED_100 = (62, "3D 100% Stacked Bar.")
90
+ """3D 100% Stacked Bar."""
91
+
92
+ THREE_D_COLUMN = (-4100, "3D Column.")
93
+ """3D Column."""
94
+
95
+ THREE_D_COLUMN_CLUSTERED = (54, "3D Clustered Column.")
96
+ """3D Clustered Column."""
97
+
98
+ THREE_D_COLUMN_STACKED = (55, "3D Stacked Column.")
99
+ """3D Stacked Column."""
100
+
101
+ THREE_D_COLUMN_STACKED_100 = (56, "3D 100% Stacked Column.")
102
+ """3D 100% Stacked Column."""
103
+
104
+ THREE_D_LINE = (-4101, "3D Line.")
105
+ """3D Line."""
106
+
107
+ THREE_D_PIE = (-4102, "3D Pie.")
108
+ """3D Pie."""
109
+
110
+ THREE_D_PIE_EXPLODED = (70, "Exploded 3D Pie.")
111
+ """Exploded 3D Pie."""
112
+
113
+ AREA = (1, "Area")
114
+ """Area"""
115
+
116
+ AREA_STACKED = (76, "Stacked Area.")
117
+ """Stacked Area."""
118
+
119
+ AREA_STACKED_100 = (77, "100% Stacked Area.")
120
+ """100% Stacked Area."""
121
+
122
+ BAR_CLUSTERED = (57, "Clustered Bar.")
123
+ """Clustered Bar."""
124
+
125
+ BAR_OF_PIE = (71, "Bar of Pie.")
126
+ """Bar of Pie."""
127
+
128
+ BAR_STACKED = (58, "Stacked Bar.")
129
+ """Stacked Bar."""
130
+
131
+ BAR_STACKED_100 = (59, "100% Stacked Bar.")
132
+ """100% Stacked Bar."""
133
+
134
+ BUBBLE = (15, "Bubble.")
135
+ """Bubble."""
136
+
137
+ BUBBLE_THREE_D_EFFECT = (87, "Bubble with 3D effects.")
138
+ """Bubble with 3D effects."""
139
+
140
+ COLUMN_CLUSTERED = (51, "Clustered Column.")
141
+ """Clustered Column."""
142
+
143
+ COLUMN_STACKED = (52, "Stacked Column.")
144
+ """Stacked Column."""
145
+
146
+ COLUMN_STACKED_100 = (53, "100% Stacked Column.")
147
+ """100% Stacked Column."""
148
+
149
+ CONE_BAR_CLUSTERED = (102, "Clustered Cone Bar.")
150
+ """Clustered Cone Bar."""
151
+
152
+ CONE_BAR_STACKED = (103, "Stacked Cone Bar.")
153
+ """Stacked Cone Bar."""
154
+
155
+ CONE_BAR_STACKED_100 = (104, "100% Stacked Cone Bar.")
156
+ """100% Stacked Cone Bar."""
157
+
158
+ CONE_COL = (105, "3D Cone Column.")
159
+ """3D Cone Column."""
160
+
161
+ CONE_COL_CLUSTERED = (99, "Clustered Cone Column.")
162
+ """Clustered Cone Column."""
163
+
164
+ CONE_COL_STACKED = (100, "Stacked Cone Column.")
165
+ """Stacked Cone Column."""
166
+
167
+ CONE_COL_STACKED_100 = (101, "100% Stacked Cone Column.")
168
+ """100% Stacked Cone Column."""
169
+
170
+ CYLINDER_BAR_CLUSTERED = (95, "Clustered Cylinder Bar.")
171
+ """Clustered Cylinder Bar."""
172
+
173
+ CYLINDER_BAR_STACKED = (96, "Stacked Cylinder Bar.")
174
+ """Stacked Cylinder Bar."""
175
+
176
+ CYLINDER_BAR_STACKED_100 = (97, "100% Stacked Cylinder Bar.")
177
+ """100% Stacked Cylinder Bar."""
178
+
179
+ CYLINDER_COL = (98, "3D Cylinder Column.")
180
+ """3D Cylinder Column."""
181
+
182
+ CYLINDER_COL_CLUSTERED = (92, "Clustered Cone Column.")
183
+ """Clustered Cone Column."""
184
+
185
+ CYLINDER_COL_STACKED = (93, "Stacked Cone Column.")
186
+ """Stacked Cone Column."""
187
+
188
+ CYLINDER_COL_STACKED_100 = (94, "100% Stacked Cylinder Column.")
189
+ """100% Stacked Cylinder Column."""
190
+
191
+ DOUGHNUT = (-4120, "Doughnut.")
192
+ """Doughnut."""
193
+
194
+ DOUGHNUT_EXPLODED = (80, "Exploded Doughnut.")
195
+ """Exploded Doughnut."""
196
+
197
+ LINE = (4, "Line.")
198
+ """Line."""
199
+
200
+ LINE_MARKERS = (65, "Line with Markers.")
201
+ """Line with Markers."""
202
+
203
+ LINE_MARKERS_STACKED = (66, "Stacked Line with Markers.")
204
+ """Stacked Line with Markers."""
205
+
206
+ LINE_MARKERS_STACKED_100 = (67, "100% Stacked Line with Markers.")
207
+ """100% Stacked Line with Markers."""
208
+
209
+ LINE_STACKED = (63, "Stacked Line.")
210
+ """Stacked Line."""
211
+
212
+ LINE_STACKED_100 = (64, "100% Stacked Line.")
213
+ """100% Stacked Line."""
214
+
215
+ PIE = (5, "Pie.")
216
+ """Pie."""
217
+
218
+ PIE_EXPLODED = (69, "Exploded Pie.")
219
+ """Exploded Pie."""
220
+
221
+ PIE_OF_PIE = (68, "Pie of Pie.")
222
+ """Pie of Pie."""
223
+
224
+ PYRAMID_BAR_CLUSTERED = (109, "Clustered Pyramid Bar.")
225
+ """Clustered Pyramid Bar."""
226
+
227
+ PYRAMID_BAR_STACKED = (110, "Stacked Pyramid Bar.")
228
+ """Stacked Pyramid Bar."""
229
+
230
+ PYRAMID_BAR_STACKED_100 = (111, "100% Stacked Pyramid Bar.")
231
+ """100% Stacked Pyramid Bar."""
232
+
233
+ PYRAMID_COL = (112, "3D Pyramid Column.")
234
+ """3D Pyramid Column."""
235
+
236
+ PYRAMID_COL_CLUSTERED = (106, "Clustered Pyramid Column.")
237
+ """Clustered Pyramid Column."""
238
+
239
+ PYRAMID_COL_STACKED = (107, "Stacked Pyramid Column.")
240
+ """Stacked Pyramid Column."""
241
+
242
+ PYRAMID_COL_STACKED_100 = (108, "100% Stacked Pyramid Column.")
243
+ """100% Stacked Pyramid Column."""
244
+
245
+ RADAR = (-4151, "Radar.")
246
+ """Radar."""
247
+
248
+ RADAR_FILLED = (82, "Filled Radar.")
249
+ """Filled Radar."""
250
+
251
+ RADAR_MARKERS = (81, "Radar with Data Markers.")
252
+ """Radar with Data Markers."""
253
+
254
+ STOCK_HLC = (88, "High-Low-Close.")
255
+ """High-Low-Close."""
256
+
257
+ STOCK_OHLC = (89, "Open-High-Low-Close.")
258
+ """Open-High-Low-Close."""
259
+
260
+ STOCK_VHLC = (90, "Volume-High-Low-Close.")
261
+ """Volume-High-Low-Close."""
262
+
263
+ STOCK_VOHLC = (91, "Volume-Open-High-Low-Close.")
264
+ """Volume-Open-High-Low-Close."""
265
+
266
+ SURFACE = (83, "3D Surface.")
267
+ """3D Surface."""
268
+
269
+ SURFACE_TOP_VIEW = (85, "Surface (Top View).")
270
+ """Surface (Top View)."""
271
+
272
+ SURFACE_TOP_VIEW_WIREFRAME = (86, "Surface (Top View wireframe).")
273
+ """Surface (Top View wireframe)."""
274
+
275
+ SURFACE_WIREFRAME = (84, "3D Surface (wireframe).")
276
+ """3D Surface (wireframe)."""
277
+
278
+ XY_SCATTER = (-4169, "Scatter.")
279
+ """Scatter."""
280
+
281
+ XY_SCATTER_LINES = (74, "Scatter with Lines.")
282
+ """Scatter with Lines."""
283
+
284
+ XY_SCATTER_LINES_NO_MARKERS = (75, "Scatter with Lines and No Data Markers.")
285
+ """Scatter with Lines and No Data Markers."""
286
+
287
+ XY_SCATTER_SMOOTH = (72, "Scatter with Smoothed Lines.")
288
+ """Scatter with Smoothed Lines."""
289
+
290
+ XY_SCATTER_SMOOTH_NO_MARKERS = (73, "Scatter with Smoothed Lines and No Data Markers.")
291
+ """Scatter with Smoothed Lines and No Data Markers."""
292
+
293
+
294
+ class XL_DATA_LABEL_POSITION(BaseXmlEnum):
295
+ """Specifies where the data label is positioned.
296
+
297
+ Example::
298
+
299
+ from pptx.enum.chart import XL_LABEL_POSITION
300
+
301
+ data_labels = chart.plots[0].data_labels
302
+ data_labels.position = XL_LABEL_POSITION.OUTSIDE_END
303
+
304
+ MS API Name: `XlDataLabelPosition`
305
+
306
+ http://msdn.microsoft.com/en-us/library/office/ff745082.aspx
307
+ """
308
+
309
+ ABOVE = (0, "t", "The data label is positioned above the data point.")
310
+ """The data label is positioned above the data point."""
311
+
312
+ BELOW = (1, "b", "The data label is positioned below the data point.")
313
+ """The data label is positioned below the data point."""
314
+
315
+ BEST_FIT = (5, "bestFit", "Word sets the position of the data label.")
316
+ """Word sets the position of the data label."""
317
+
318
+ CENTER = (
319
+ -4108,
320
+ "ctr",
321
+ "The data label is centered on the data point or inside a bar or a pie slice.",
322
+ )
323
+ """The data label is centered on the data point or inside a bar or a pie slice."""
324
+
325
+ INSIDE_BASE = (
326
+ 4,
327
+ "inBase",
328
+ "The data label is positioned inside the data point at the bottom edge.",
329
+ )
330
+ """The data label is positioned inside the data point at the bottom edge."""
331
+
332
+ INSIDE_END = (3, "inEnd", "The data label is positioned inside the data point at the top edge.")
333
+ """The data label is positioned inside the data point at the top edge."""
334
+
335
+ LEFT = (-4131, "l", "The data label is positioned to the left of the data point.")
336
+ """The data label is positioned to the left of the data point."""
337
+
338
+ MIXED = (6, "", "Data labels are in multiple positions (read-only).")
339
+ """Data labels are in multiple positions (read-only)."""
340
+
341
+ OUTSIDE_END = (
342
+ 2,
343
+ "outEnd",
344
+ "The data label is positioned outside the data point at the top edge.",
345
+ )
346
+ """The data label is positioned outside the data point at the top edge."""
347
+
348
+ RIGHT = (-4152, "r", "The data label is positioned to the right of the data point.")
349
+ """The data label is positioned to the right of the data point."""
350
+
351
+
352
+ XL_LABEL_POSITION = XL_DATA_LABEL_POSITION
353
+
354
+
355
+ class XL_LEGEND_POSITION(BaseXmlEnum):
356
+ """Specifies the position of the legend on a chart.
357
+
358
+ Example::
359
+
360
+ from pptx.enum.chart import XL_LEGEND_POSITION
361
+
362
+ chart.has_legend = True
363
+ chart.legend.position = XL_LEGEND_POSITION.BOTTOM
364
+
365
+ MS API Name: `XlLegendPosition`
366
+
367
+ http://msdn.microsoft.com/en-us/library/office/ff745840.aspx
368
+ """
369
+
370
+ BOTTOM = (-4107, "b", "Below the chart.")
371
+ """Below the chart."""
372
+
373
+ CORNER = (2, "tr", "In the upper-right corner of the chart border.")
374
+ """In the upper-right corner of the chart border."""
375
+
376
+ CUSTOM = (-4161, "", "A custom position (read-only).")
377
+ """A custom position (read-only)."""
378
+
379
+ LEFT = (-4131, "l", "Left of the chart.")
380
+ """Left of the chart."""
381
+
382
+ RIGHT = (-4152, "r", "Right of the chart.")
383
+ """Right of the chart."""
384
+
385
+ TOP = (-4160, "t", "Above the chart.")
386
+ """Above the chart."""
387
+
388
+
389
+ class XL_MARKER_STYLE(BaseXmlEnum):
390
+ """Specifies the marker style for a point or series in a line, scatter, or radar chart.
391
+
392
+ Example::
393
+
394
+ from pptx.enum.chart import XL_MARKER_STYLE
395
+
396
+ series.marker.style = XL_MARKER_STYLE.CIRCLE
397
+
398
+ MS API Name: `XlMarkerStyle`
399
+
400
+ http://msdn.microsoft.com/en-us/library/office/ff197219.aspx
401
+ """
402
+
403
+ AUTOMATIC = (-4105, "auto", "Automatic markers")
404
+ """Automatic markers"""
405
+
406
+ CIRCLE = (8, "circle", "Circular markers")
407
+ """Circular markers"""
408
+
409
+ DASH = (-4115, "dash", "Long bar markers")
410
+ """Long bar markers"""
411
+
412
+ DIAMOND = (2, "diamond", "Diamond-shaped markers")
413
+ """Diamond-shaped markers"""
414
+
415
+ DOT = (-4118, "dot", "Short bar markers")
416
+ """Short bar markers"""
417
+
418
+ NONE = (-4142, "none", "No markers")
419
+ """No markers"""
420
+
421
+ PICTURE = (-4147, "picture", "Picture markers")
422
+ """Picture markers"""
423
+
424
+ PLUS = (9, "plus", "Square markers with a plus sign")
425
+ """Square markers with a plus sign"""
426
+
427
+ SQUARE = (1, "square", "Square markers")
428
+ """Square markers"""
429
+
430
+ STAR = (5, "star", "Square markers with an asterisk")
431
+ """Square markers with an asterisk"""
432
+
433
+ TRIANGLE = (3, "triangle", "Triangular markers")
434
+ """Triangular markers"""
435
+
436
+ X = (-4168, "x", "Square markers with an X")
437
+ """Square markers with an X"""
438
+
439
+
440
+ class XL_TICK_MARK(BaseXmlEnum):
441
+ """Specifies a type of axis tick for a chart.
442
+
443
+ Example::
444
+
445
+ from pptx.enum.chart import XL_TICK_MARK
446
+
447
+ chart.value_axis.minor_tick_mark = XL_TICK_MARK.INSIDE
448
+
449
+ MS API Name: `XlTickMark`
450
+
451
+ http://msdn.microsoft.com/en-us/library/office/ff193878.aspx
452
+ """
453
+
454
+ CROSS = (4, "cross", "Tick mark crosses the axis")
455
+ """Tick mark crosses the axis"""
456
+
457
+ INSIDE = (2, "in", "Tick mark appears inside the axis")
458
+ """Tick mark appears inside the axis"""
459
+
460
+ NONE = (-4142, "none", "No tick mark")
461
+ """No tick mark"""
462
+
463
+ OUTSIDE = (3, "out", "Tick mark appears outside the axis")
464
+ """Tick mark appears outside the axis"""
465
+
466
+
467
+ class XL_TICK_LABEL_POSITION(BaseXmlEnum):
468
+ """Specifies the position of tick-mark labels on a chart axis.
469
+
470
+ Example::
471
+
472
+ from pptx.enum.chart import XL_TICK_LABEL_POSITION
473
+
474
+ category_axis = chart.category_axis
475
+ category_axis.tick_label_position = XL_TICK_LABEL_POSITION.LOW
476
+
477
+ MS API Name: `XlTickLabelPosition`
478
+
479
+ http://msdn.microsoft.com/en-us/library/office/ff822561.aspx
480
+ """
481
+
482
+ HIGH = (-4127, "high", "Top or right side of the chart.")
483
+ """Top or right side of the chart."""
484
+
485
+ LOW = (-4134, "low", "Bottom or left side of the chart.")
486
+ """Bottom or left side of the chart."""
487
+
488
+ NEXT_TO_AXIS = (4, "nextTo", "Next to axis (where axis is not at either side of the chart).")
489
+ """Next to axis (where axis is not at either side of the chart)."""
490
+
491
+ NONE = (-4142, "none", "No tick labels.")
492
+ """No tick labels."""