Angular Chart - Relocate the Legend

The legend can be moved inside the chart using the position property, and also aligned in the horizontal or vertical direction using the horizontalAlignment or verticalAlignment property.

HTML
TypeScript
  • <dx-chart>
  • <dxo-legend
  • position="inside"
  • horizontalAlignment="center"
  • verticalAlignment="top">
  • </dxo-legend>
  • </dx-chart>
  • import { DxChartModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • // ...
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxChartModule
  • ],
  • // ...
  • })

Below, you can try out these properties in action.

Embedded applications are not available for the selected DevExtreme version (v24.2).
We recommend that you upgrade to the most recent version of DevExtreme to access the latest features, bug fixes, and security updates.
See Also