radiusNumber(default: 1)

The radius of the radial gradient relative to the shape bounding box.

Example

<div id="surface" />
<script>
  var draw = kendo.drawing;
  var geom = kendo.geometry;

  var gradient = new draw.RadialGradient({
    center: [0.5, 0.5],
    radius: 0.3, // Small radius for concentrated gradient
    stops: [
      { offset: 0, color: "#00ffff", opacity: 1 },
      { offset: 1, color: "#0088ff", opacity: 0.2 }
    ]
  });

  var rect = new geom.Rect([0, 0], [120, 120]);
  var path = draw.Path.fromRect(rect, {
    stroke: null,
    fill: gradient
  });

  var surface = draw.Surface.create($("#surface"));
  surface.draw(path);
</script>
In this article
radius
Not finding the help you need?
Contact Support