Edit this page

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"
     }]
});

Example

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

            // Use default theme color
         }
     }]
});
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy