fillString|Object
Defines the fill options of the polyline.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: "lightblue"
}));
return group;
}
}]
});
</script>
fill.colorString
Defines the fill color of the polyline.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
color: "yellow"
}
}));
return group;
}
}]
});
</script>
fill.opacityNumber(default: 1)
Defines the fill opacity of the polyline.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
color: "red",
opacity: 0.3
}
}));
return group;
}
}]
});
</script>
fill.gradientObject
Defines the gradient fill of the polyline.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [1, 1],
stops: [
{ offset: 0, color: "red" },
{ offset: 1, color: "blue" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.typeString(default: "linear")
The type of the gradient. Supported values are:
- linear
- radial
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "radial",
center: [0.5, 0.5],
stops: [
{ offset: 0, color: "white" },
{ offset: 1, color: "black" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.centerArray
The center of the radial gradient.
Coordinates are relative to the shape bounding box. For example [0, 0] is top left and [1, 1] is bottom right.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "radial",
center: [0.3, 0.7],
stops: [
{ offset: 0, color: "yellow" },
{ offset: 1, color: "red" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.radiusNumber(default: 1)
The radius of the radial gradient relative to the shape bounding box.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "radial",
center: [0.5, 0.5],
radius: 0.8,
stops: [
{ offset: 0, color: "green" },
{ offset: 1, color: "blue" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.startArray
The start point of the linear gradient.
Coordinates are relative to the shape bounding box. For example [0, 0] is top left and [1, 1] is bottom right.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "linear",
start: [0, 0.5],
end: [1, 0.5],
stops: [
{ offset: 0, color: "purple" },
{ offset: 1, color: "orange" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.endArray
The end point of the linear gradient.
Coordinates are relative to the shape bounding box. For example [0, 0] is top left and [1, 1] is bottom right.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [0.5, 1],
stops: [
{ offset: 0, color: "cyan" },
{ offset: 1, color: "magenta" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.stopsArray
The array of gradient color stops.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [1, 0],
stops: [
{ offset: 0, color: "red" },
{ offset: 0.5, color: "yellow" },
{ offset: 1, color: "green" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.stops.offsetNumber
The stop offset from the start of the element. Ranges from 0 (start of gradient) to 1 (end of gradient).
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [1, 0],
stops: [
{ offset: 0, color: "blue" },
{ offset: 0.3, color: "white" },
{ offset: 1, color: "red" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.stops.colorString
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.
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [1, 0],
stops: [
{ offset: 0, color: "#ff0000" },
{ offset: 0.5, color: "rgb(0, 255, 0)" },
{ offset: 1, color: "blue" }
]
}
}
}));
return group;
}
}]
});
</script>
fill.gradient.stops.opacityNumber
The fill opacity. Ranges from 0 (completely transparent) to 1 (completely opaque).
Example
<div id="diagram"></div>
<script>
$("#diagram").kendoDiagram({
shapes: [{
visual: function() {
var group = new kendo.dataviz.diagram.Group();
group.append(new kendo.dataviz.diagram.Polyline({
points: [{x: 0, y: 0}, {x: 50, y: 0}, {x: 100, y: 100}],
fill: {
gradient: {
type: "linear",
start: [0, 0],
end: [1, 0],
stops: [
{ offset: 0, color: "red", opacity: 1 },
{ offset: 0.5, color: "yellow", opacity: 0.5 },
{ offset: 1, color: "blue", opacity: 0.2 }
]
}
}
}));
return group;
}
}]
});
</script>