|
1 | 1 | from office365.entity import Entity
|
| 2 | +from office365.entity_collection import EntityCollection |
2 | 3 | from office365.onedrive.workbooks.charts.axes import WorkbookChartAxes
|
3 | 4 | from office365.onedrive.workbooks.charts.data_labels import WorkbookChartDataLabels
|
| 5 | +from office365.onedrive.workbooks.charts.legend import WorkbookChartLegend |
| 6 | +from office365.onedrive.workbooks.charts.series.series import WorkbookChartSeries |
| 7 | +from office365.onedrive.workbooks.charts.title import WorkbookChartTitle |
4 | 8 | from office365.runtime.client_result import ClientResult
|
5 | 9 | from office365.runtime.paths.resource_path import ResourcePath
|
6 | 10 | from office365.runtime.queries.function import FunctionQuery
|
@@ -55,14 +59,44 @@ def axes(self):
|
55 | 59 |
|
56 | 60 | @property
|
57 | 61 | def data_labels(self):
|
58 |
| - """Represents the datalabels on the chart.""" |
| 62 | + """Represents the data labels on the chart.""" |
59 | 63 | return self.properties.get(
|
60 | 64 | "dataLabels",
|
61 | 65 | WorkbookChartDataLabels(
|
62 | 66 | self.context, ResourcePath("dataLabels", self.resource_path)
|
63 | 67 | ),
|
64 | 68 | )
|
65 | 69 |
|
| 70 | + @property |
| 71 | + def legend(self): |
| 72 | + """Represents the legend on the chart.""" |
| 73 | + return self.properties.get( |
| 74 | + "legend", |
| 75 | + WorkbookChartLegend( |
| 76 | + self.context, ResourcePath("legend", self.resource_path) |
| 77 | + ), |
| 78 | + ) |
| 79 | + |
| 80 | + @property |
| 81 | + def series(self): |
| 82 | + """Represents chart series.""" |
| 83 | + return self.properties.get( |
| 84 | + "series", |
| 85 | + EntityCollection( |
| 86 | + self.context, |
| 87 | + WorkbookChartSeries, |
| 88 | + ResourcePath("series", self.resource_path), |
| 89 | + ), |
| 90 | + ) |
| 91 | + |
| 92 | + @property |
| 93 | + def title(self): |
| 94 | + """Represents the title on the chart.""" |
| 95 | + return self.properties.get( |
| 96 | + "title", |
| 97 | + WorkbookChartTitle(self.context, ResourcePath("title", self.resource_path)), |
| 98 | + ) |
| 99 | + |
66 | 100 | @property
|
67 | 101 | def worksheet(self):
|
68 | 102 | """The worksheet containing the current chart."""
|
|
0 commit comments