DiagramShapeDefaultsFillGradientSettingsStopBuilder
Methods
Offset(System.Double)
Defines the stop offset from the start of the element. The range is from 0 (start of gradient) to 1 (end of gradient).
Parameters
value - System.Double
The value that configures the offset.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Fill(f => f.Gradient(g => g.Stops(s =>
{
s.Add().Offset(0);;
s.Add().Offset(0.5);
})))
)
)
Color(System.String)
Defines the color. The option accepts a valid CSS color string, including HEX and Rgb.
Parameters
value - System.String
The value that configures the color.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Fill(f => f.Gradient(g => g.Stops(s =>
{
s.Add().Color("rgb(124,252,0)");
s.Add().Color("#ff0000");
})))
)
)
Opacity(System.Double)
Defines the fill opacity. The range is from 0 (completely transparent) to 1 (completely opaque).
Parameters
value - System.Double
The value that configures the opacity.
Example
@(Html.Kendo().Diagram()
.Name("diagram")
.ShapeDefaults(sd => sd
.Fill(f => f.Gradient(g => g.Stops(s =>
{
s.Add().Opacity(0.5);
s.Add().Opacity(0.8);
})))
)
)