DevExtreme React - Overview

Each series point can be accompanied with a label that displays the point's value or custom data.

DevExtreme HTML5 JavaScript PieChart SeriesPointLabels

To configure point labels, use the label object. You can declare it as follows.

jQuery
JavaScript
$(function() {
    $("#pieChartContainer").dxPieChart({
        // ...
        series: [{
            label: {
                // Settings for all point labels of an individual series
            }
        }, {
            // ...  
        }],
        commonSeriesSettings: {
            label: {
                // Settings for all point labels in the PieChart
            }
        }
    });
});
Angular
HTML
TypeScript
<dx-pie-chart ... >
    <dxi-series>
        <dxo-label ... >
            <!-- Settings for all point labels of an individual series -->
        </dxo-label>
    </dxi-series>
    <dxo-common-series-settings ... >
        <dxo-label ... >
            <!-- Settings for all point labels in the PieChart -->
        </dxo-label>
    </dxo-common-series-settings>
</dx-pie-chart>
import { DxPieChartModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxPieChartModule
    ],
    // ...
})

Point labels are not visible by default. To make them visible, assign true to the label.visible option. With this configuration, point labels are displayed detached from their respective series points. You can make the connection between labels and points more evident by making label connectors visible. For this purpose, assign true to the label.connector.visible option.

jQuery
JavaScript
$(function() {
    $("#pieChartContainer").dxPieChart({
        // ...
        series: {
            label: {
                visible: true,
                connector: {
                    visible: true
                }
            }
        }
    });
});
Angular
HTML
TypeScript
<dx-pie-chart ... >
    <dxi-series>
        <dxo-label [visible]="true">
            <dxo-connector [visible]="true"></dxo-connector>
        </dxo-label>
    </dxi-series>
</dx-pie-chart>
import { DxPieChartModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxPieChartModule
    ],
    // ...
})

For details on other options of point labels, refer to the label section of the API reference and to other topics in this section.

See Also