# openpyxl.chart.legend module

class openpyxl.chart.legend.Legend(legendPos='r', legendEntry=(), layout=None, overlay=None, spPr=None, txPr=None, extLst=None)

  Bases: `Serialisable`

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  graphicalProperties

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptive name is desired (eg. “underline” for “u”)

  layout

    Values must be of type <class ‘openpyxl.chart.layout.Layout’>

  legendEntry

    A sequence (list or tuple) that may only contain objects of the declared type

  legendPos

    Value must be one of [‘b’, ‘l’, ‘r’, ‘t’, ‘tr’]

  overlay

    Values must be of type <class ‘bool’>

  position

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptive name is desired (eg. “underline” for “u”)

  spPr

    Values must be of type <class ‘openpyxl.chart.shapes.GraphicalProperties’>

  tagname = 'legend'
  textProperties

    Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptive name is desired (eg. “underline” for “u”)

  txPr

    Values must be of type <class ‘openpyxl.chart.text.RichText’>

class openpyxl.chart.legend.LegendEntry(idx=0, delete=False, txPr=None, extLst=None)

  Bases: `Serialisable`

  delete

    Values must be of type <class ‘bool’>

  extLst

    Values must be of type <class ‘openpyxl.descriptors.excel.ExtensionList’>

  idx

    Values must be of type <class ‘int’>

  tagname = 'legendEntry'
  txPr

    Values must be of type <class ‘openpyxl.chart.text.RichText’>