series.color String|Function

The series base color. The supported values are:

  • CSS color string, including hex and rgb
  • function(point) - user-defined function that will be evaluated for each point. Returning undefined will assume the default series color.

Example

$("#sparkline").kendoSparkline({
     series: [{
         type: "column",
         data: [200, 450, 300, 125],
         color: "#ff0000"
     }]
});
</script>

Example

<span id="sparkline"></span>
<script>
$("#sparkline").kendoSpar<span id="sparkline"></span>
<script>kline({
     series: [{
         type: "column",
         data: [200, 450, 300, 125],
         color: function(point) {
            if (point.value > 300) {
                // Colorize matching points
                return "#f00";
            }

            // Use default theme color
         }
     }]
});
</script>
In this article