DevExtreme v23.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.
Pie Charts

Pie with Custom Fill Styles

This demo uses custom patterns and gradients for PieChart slices.


Call the registerGradient() method to obtain a gradient ID. Specify method arguments as follows:

  • type
    This method supports two gradient types: 'linear' and 'radial'.

  • options
    An object for gradient options.

    • colors
      An array of gradient colors. Each color is an object that includes color and offset fields. The offset field specifies the starting point for each color.

    • rotationAngle (linear gradients only)
      You can use this option to rotate linear gradients.


To obtain a pattern ID, call the registerPattern() method. Specify method arguments as follows:

  • options
    An object with pattern options.

    • height
      Template height.

    • width
      Template width.

    • template
      A repeating SVG-based template that creates the required pattern.

Fill the PieChart

To fill all slices with the same pattern or gradient, assign a pattern ID to series.color.fillId. If you want to customize each slice individually, implement the customizePoint function (review this demo for more information).

Custom patterns and gradients are not limited to the PieChart. The following DevExtreme components support the use of patterns/gradients:

Thank you for your interest in our ASP.NET Core product libraries and UI component suite. We are moving ASP.NET Core-related demos and content to Please make sure to update your bookmarks with our new URL.

View Demo