New to Kendo UI for jQuery? Download free 30-day trial

Set the TreeMap Header Items Color


Product Progress® Kendo UI® Chart for jQuery
Operating System Windows 10 64bit
Visual Studio Version Visual Studio 2017
Preferred Language JavaScript


How can I set the Kendo UI TreeMap tiles color from the items?


Obtain the node elements in the dataBound event handler and apply the style through the css() jQuery method.

  • When you use a Sass-based theme, apply an additional .k-treemap .k-treemap-title { background-color: inherit; } style.
  • R1 2023 is the last official release of Kendo jQuery, which supports and ships Less themes with the product.

The following example demonstrates how to set the Kendo UI TreeMap tiles color from the items.

      .k-treemap .k-treemap-title {
        background-color: inherit;

    <div id="treemap">

        dataSource: {
          data: [{
            name: "Root",
            color: "red",
            items: [{
              name: "Group A",
              value: 1,
              color: "green",
              items: [{ name: "foo", value: 1, color: "blue" }, { name: "bar", value: 2, color: "orange"}]
        valueField: "value",
        textField: "name",
        colorField: "color",
        dataBound: function (e) {
          if (e.node) {
            var element = this.findByUid(e.node.uid);
            element.css("background-color", e.node.color);

See Also

In this article