Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

How to specify different color for each tile

$
0
0

I am creating a tree-map. Treemap is static. It will always have 3 tiles. The data can change but the number of tiles will remain fixed. I looked at the below example. 

How can I force each tile to have a unique color from the array of colors I have specified.  

<div id="treemap"></div>
<script>
  $("#treemap").kendoTreeMap({
    dataSource: {
      data: [{
        name: "Root",
        items: [{ name: "foo", value: 1 }, { name: "bar", value: 2 }, { name: "baz", value: 3 }]
      }]
    },
    valueField: "value",
    textField: "name",
    colors: ["red", "green", "yellow"]
  });
</script>


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>