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

Radar chart with different colors for each column

$
0
0
Hi Daniël,

Please take a look at this Telerik Dojo illustrating an updated version of your sample.

Here are the changes:
1.   The data is stored in a Kendo DataSource so I can use the dataItems.

2.   The colors are set by using the dataIndex for each item in the series. (I outputted to the console each object for your observation.)
series: [{
  ...
  color: function(e) {
    var colors =  ["#CF5B6B", "#96945C", "#7C647E", "#7D8EBD", "#F1C736"];
    var index = e.index % colors.length;
    return colors[index];   
  }
}],

You can also keep your color scheme if you add more items in your data as shown in this dojo.

3.   To add the name of each item, use the dataItems with a template in the tooltip:
tooltip:{
       template: "#=dataItem.name # #=value #",
       visible: true
     }

Hopefully, this helps.

Regards,
Patrick
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 

Viewing all articles
Browse latest Browse all 84751

Trending Articles



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