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) clears the fill.
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapeDefaults: {
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [1, 0],
stops: [
{ offset: 0, color: "red" },
{ offset: 0.5, color: "#00ff00" },
{ offset: 1, color: "rgb(0, 0, 255)" }
]
}
}
},
shapes: [{
id: "1",
content: { text: "Color Formats" },
x: 100,
y: 20
}]
});
</script>