DevExtreme v23.1 is now available.

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

Your search did not match any results.
Tree Map


This demo shows options that you can use to colorize TreeMap tiles. To see each option, use the drop-down editor below the component.

To colorize the TreeMap tiles, you can use the colorizer object. This object allows you to specify the colorization type:

  • "discrete" (default)
    This colorization algorithm paints each tile within a group in a color from the palette. When there are multiple groups, the way in which groups are colorized depends on the colorizeGroups property setting:

    • If colorizeGroups is set to false (Discrete mode in the demo):
      Each group is painted independently - regardless of the colors used in other groups.

    • If colorizeGroups is set to true (Grouped mode in the demo):
      Each group is painted with a different color from the palette.

  • "gradient"
    If you choose this algorithm, the palette should contain only two colors that the component uses to colorize the smallest and the largest tile, respectively. The other tiles will have a tint of either the first or the second color depending on their size. In order to use the "gradient" algorithm, you need to set the range property to an array of only two values.

  • "range"
    This algorithm is similar to "gradient", but the array assigned to the range property should contain more than two values. This array specifies the ranges between each value. The palette of two colors will generate multiple tints - one for each range.

If you use the "gradient" or "range" colorization algorithm, the color of the tile depends on the value. Normally, the value field supplies this value to the component. However, you can use the colorCodeField property to assign another field to supply the value.

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

View Demo