Provides properties for manipulating axis title.
| 243 | |
| 244 | |
| 245 | class AxisTitle(ElementProxy): |
| 246 | """Provides properties for manipulating axis title.""" |
| 247 | |
| 248 | def __init__(self, title): |
| 249 | super(AxisTitle, self).__init__(title) |
| 250 | self._title = title |
| 251 | |
| 252 | @lazyproperty |
| 253 | def format(self): |
| 254 | """|ChartFormat| object providing access to shape formatting. |
| 255 | |
| 256 | Return the |ChartFormat| object providing shape formatting properties |
| 257 | for this axis title, such as its line color and fill. |
| 258 | """ |
| 259 | return ChartFormat(self._element) |
| 260 | |
| 261 | @property |
| 262 | def has_text_frame(self): |
| 263 | """Read/write Boolean specifying presence of a text frame. |
| 264 | |
| 265 | Return |True| if this axis title has a text frame, and |False| |
| 266 | otherwise. Assigning |True| causes a text frame to be added if not |
| 267 | already present. Assigning |False| causes any existing text frame to |
| 268 | be removed along with any text contained in the text frame. |
| 269 | """ |
| 270 | if self._title.tx_rich is None: |
| 271 | return False |
| 272 | return True |
| 273 | |
| 274 | @has_text_frame.setter |
| 275 | def has_text_frame(self, value): |
| 276 | if bool(value) is True: |
| 277 | self._title.get_or_add_tx_rich() |
| 278 | else: |
| 279 | self._title._remove_tx() |
| 280 | |
| 281 | @property |
| 282 | def text_frame(self): |
| 283 | """|TextFrame| instance for this axis title. |
| 284 | |
| 285 | Return a |TextFrame| instance allowing read/write access to the text |
| 286 | of this axis title and its text formatting properties. Accessing this |
| 287 | property is destructive as it adds a new text frame if not already |
| 288 | present. |
| 289 | """ |
| 290 | rich = self._title.get_or_add_tx_rich() |
| 291 | return TextFrame(rich, self) |
| 292 | |
| 293 | |
| 294 | class CategoryAxis(_BaseAxis): |
no outgoing calls
searching dependent graphs…