\Kendo\Dataviz\UI\DiagramShapeDefaults

A PHP class representing the shapeDefaults setting of Diagram.

Methods

connectorDefaults

Defines the default options for the shape connectors.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value \Kendo\Dataviz\UI\DiagramShapeDefaultsConnectorDefaults|array

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsConnectorDefaults

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$connectorDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaultsConnectorDefaults();
$fill = 'value';
$connectorDefaults->fill($fill);
$shapeDefaults->connectorDefaults($connectorDefaults);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$fill = 'value';
$shapeDefaults->connectorDefaults(array('fill' => $fill));
?>

addConnector

Adds one or more DiagramShapeDefaultsConnector to the DiagramShapeDefaults.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value[, $value2, ...] \Kendo\Dataviz\UI\DiagramShapeDefaultsConnector|array

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsConnector

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$connector = new \Kendo\Dataviz\UI\DiagramShapeDefaultsConnector();
$fill = 'value';
$connector->fill($fill);
$shapeDefaults->addConnector($connector);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$fill = 'value';
$shapeDefaults->addConnector(array('fill' => $fill));
?>

Example - adding more than one DiagramShapeDefaultsConnector

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$first  = new \Kendo\Dataviz\UI\DiagramShapeDefaultsConnector();
$second = new \Kendo\Dataviz\UI\DiagramShapeDefaultsConnector();
$shapeDefaults->addConnector($first, $second);
?>

content

Defines the default shapes content settings.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value \Kendo\Dataviz\UI\DiagramShapeDefaultsContent|array

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsContent

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$content = new \Kendo\Dataviz\UI\DiagramShapeDefaultsContent();
$align = 'value';
$content->align($align);
$shapeDefaults->content($content);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$align = 'value';
$shapeDefaults->content(array('align' => $align));
?>

editable

Defines the shape editable options.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value boolean|\Kendo\Dataviz\UI\DiagramShapeDefaultsEditable|array

Example - using boolean

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->editable(true);
?>

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsEditable

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$editable = new \Kendo\Dataviz\UI\DiagramShapeDefaultsEditable();
$connect = true;
$editable->connect($connect);
$shapeDefaults->editable($editable);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$connect = true;
$shapeDefaults->editable(array('connect' => $connect));
?>

fill

Defines the fill options of the shape. Use these settings to apply a single-color or a gradient background to all shapes in the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value string|\Kendo\Dataviz\UI\DiagramShapeDefaultsFill|array

Example - using string

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->fill('value');
?>

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsFill

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$fill = new \Kendo\Dataviz\UI\DiagramShapeDefaultsFill();
$color = 'value';
$fill->color($color);
$shapeDefaults->fill($fill);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$color = 'value';
$shapeDefaults->fill(array('color' => $color));
?>

height

Defines the default height of shapes in the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value float

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->height(1);
?>

hover

Defines the hover configuration.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value \Kendo\Dataviz\UI\DiagramShapeDefaultsHover|array

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsHover

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$hover = new \Kendo\Dataviz\UI\DiagramShapeDefaultsHover();
$fill = 'value';
$hover->fill($fill);
$shapeDefaults->hover($hover);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$fill = 'value';
$shapeDefaults->hover(array('fill' => $fill));
?>

minHeight

Defines the minimum height the shape can have. Use this setting to apply a lower limit to the height of shapes when users resize them.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value float

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->minHeight(1);
?>

minWidth

Defines the minimum width the shape can have. Use this setting to apply a lower limit to the width of shapes when users resize them.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value float

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->minWidth(1);
?>

path

The path option of a Shape is a description of a custom geometry. The format follows the standard SVG format (https://www.w3.org/TR/SVG/paths.html#PathData "SVG Path data.").

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value string

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->path('value');
?>

rotation

Defines the rotation of the shape.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value \Kendo\Dataviz\UI\DiagramShapeDefaultsRotation|array

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsRotation

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$rotation = new \Kendo\Dataviz\UI\DiagramShapeDefaultsRotation();
$angle = 1;
$rotation->angle($angle);
$shapeDefaults->rotation($rotation);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$angle = 1;
$shapeDefaults->rotation(array('angle' => $angle));
?>

selectable

Specifies if Diagram shapes can be selected.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value boolean

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->selectable(true);
?>

source

The path/URL to the shape image. Applicable when the type is set to "image".

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value string

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->source('value');
?>

stroke

Defines the configuration of the border around Diagram shapes.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value \Kendo\Dataviz\UI\DiagramShapeDefaultsStroke|array

Example - using \Kendo\Dataviz\UI\DiagramShapeDefaultsStroke

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$stroke = new \Kendo\Dataviz\UI\DiagramShapeDefaultsStroke();
$color = 'value';
$stroke->color($color);
$shapeDefaults->stroke($stroke);
?>

Example - using array

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$color = 'value';
$shapeDefaults->stroke(array('color' => $color));
?>

type

Specifies the type of the Shape using any of the built-in shape type. "rectangle": this is the default option; "circle": a circle/ellipse; "image": an image or "text": some text.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value string

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->type('value');
?>

visual

A function that returns a visual element to render for a given shape. The following primitives can be used to construct a composite visual: Circle; Rectangle; Path; Line; Polyline; TextBlock; Image or Layout.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->visual(new \Kendo\JavaScriptFunction('function() { }'));
?>

width

Defines the default width of shapes in the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value float

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->width(1);
?>

x

Defines the x-coordinate of shapes added to the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value float

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->x(1);
?>

y

Defines the y-coordinate of shapes added to the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShapeDefaults

Parameters

$value float

Example

<?php
$shapeDefaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shapeDefaults->y(1);
?>
In this article
Not finding the help you need?