Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To reposition the title of a donut chart created with Syncfusion Chart in ASP.NET Core and write the center label, you can use the following code:

<ej-chart id="donutChart" width="600">
    <e-series>
        <e-series-items>
            ...
        </e-series-items>
    </e-series>
    <e-title text="Donut Chart" alignment="center" position="top"></e-title>
    <e-series-points tooltip="false">
        <e-marker visible="false"></e-marker>
        <e-data-labels visible="true" connector-type="line" position="outside" margin="3" />
    </e-series-points>
    <e-center-region>
        <e-center-label text="45%" font-size="20" font-weight="bold" />
    </e-center-region>
</ej-chart>

To reposition the title, you can use the alignment and position properties of the e-title element. The alignment property specifies the horizontal alignment of the title (e.g. "center", "left", "right"), while the position property specifies the vertical position of the title (e.g. "top", "bottom", "center").

To write the center label, you can use the e-center-region and e-center-label elements. The e-center-label element specifies the text of the label, as well as its text properties such as font size and font weight.