ChartLegend
- class ChartLegend
The legend of a chart, accessed via
mychart.legend:>>> chart = xw.books['Book1'].sheets[0].charts[0] >>> chart.legend.position = "bottom" >>> chart.legend.visible = False
Added in version 0.37.3.
- property position: str | None
"top","bottom","left","right"or"corner". ReturnsNoneif the legend is hidden. Setting a position shows the legend.On xlwings Lite and xlwings Server, reading it only works after it has been set in the same script.
- Type:
Returns or sets the position of the legend
- Setter type:
str