The color in any of the following formats.
| Format | Description
| --- | --- | ---
| red | Basic or Extended CSS Color name
| #ff0000 | Hex RGB value
| rgb(255, 0, 0) | RGB value
Specifying 'none', 'transparent' or '' (empty string) will clear the fill.
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Path({
data: "M 80 0 C 100 0 100 0 100 20 L 100 80 C 100 100 100 100 80 100 L 20 100 C 0 100 0 100 0 80 L 0 20 C 0 0 0 0 20 0Z",
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [1, 1],
stops: [
{ offset: 0, color: "#ff0000" },
{ offset: 0.5, color: "rgb(0, 255, 0)" },
{ offset: 1, color: "blue" }
]
}
}
}));
return group;
}
}]
});
</script>