Chart Legend

Legend Positioning

In order to set the legend properties. Please follow the steps below:

  • Create an instance of Presentation class.
  • Get the reference of the slide.
  • Adding a chart on slide.
  • Setting the properties of legend.
  • Write the presentation as a PPTX file.

In the example given below, we have set the position and size for Chart legend.

Set Font Size of Legend

The Aspose.Slides for C++ lets developers allow to set the font size of the legend. Please follow the steps below: 

  • Instantiate Presentation class.
  • Creating the default chart.
  • Set the Font Size.
  • Set minimum axis value.
  • Set maximum axis value.
  • Write a presentation to disk.

Set Font Size of Individual Legend

The Aspose.Slides for C++ lets developers allow to set the font size of individual legend entries. Please follow the steps below: 

  • Instantiate Presentation class.
  • Creating the default chart.
  • Access legend entry.
  • Set the Font Size.
  • Set minimum axis value.
  • Set maximum axis value.
  • Write a presentation to disk.