\Kendo\Dataviz\UI\DiagramShape

A PHP class representing the shape setting of DiagramShapes.

Methods

connectorDefaults

Defines default options for the shape connectors.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using \Kendo\Dataviz\UI\DiagramShapeConnectorDefaults

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$connectorDefaults = new \Kendo\Dataviz\UI\DiagramShapeConnectorDefaults();
$fill = 'value';
$connectorDefaults->fill($fill);
$shape->connectorDefaults($connectorDefaults);
?>

Example - using array

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

addConnector

Adds one or more DiagramShapeConnector to the DiagramShape.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using \Kendo\Dataviz\UI\DiagramShapeConnector

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$connector = new \Kendo\Dataviz\UI\DiagramShapeConnector();
$description = 'value';
$connector->description($description);
$shape->addConnector($connector);
?>

Example - using array

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$description = 'value';
$shape->addConnector(array('description' => $description));
?>

Example - adding more than one DiagramShapeConnector

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$first  = new \Kendo\Dataviz\UI\DiagramShapeConnector();
$second = new \Kendo\Dataviz\UI\DiagramShapeConnector();
$shape->addConnector($first, $second);
?>

content

Defines the shapes content settings.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using \Kendo\Dataviz\UI\DiagramShapeContent

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$content = new \Kendo\Dataviz\UI\DiagramShapeContent();
$align = 'value';
$content->align($align);
$shape->content($content);
?>

Example - using array

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

editable

Defines the shape editable options.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using boolean

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

Example - using \Kendo\Dataviz\UI\DiagramShapeEditable

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$editable = new \Kendo\Dataviz\UI\DiagramShapeEditable();
$connect = true;
$editable->connect($connect);
$shape->editable($editable);
?>

Example - using array

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

fill

Defines the fill options of the shape.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using string

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

Example - using \Kendo\Dataviz\UI\DiagramShapeFill

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$fill = new \Kendo\Dataviz\UI\DiagramShapeFill();
$color = 'value';
$fill->color($color);
$shape->fill($fill);
?>

Example - using array

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

height

Defines the height of the shape when added to the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value float

Example

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

hover

Defines the hover configuration.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using \Kendo\Dataviz\UI\DiagramShapeHover

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$hover = new \Kendo\Dataviz\UI\DiagramShapeHover();
$fill = 'value';
$hover->fill($fill);
$shape->hover($hover);
?>

Example - using array

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

id

The unique identifier for a Shape.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value string

Example

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$shape->id('value');
?>

minHeight

Defines the minimum height the shape should have, that is, it cannot be resized to a value smaller than the given one.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value float

Example

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

minWidth

Defines the minimum width the shape should have, that is, it cannot be resized to a value smaller than the given one.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value float

Example

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

path

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

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value string

Example

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

rotation

The function that positions the connector.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using \Kendo\Dataviz\UI\DiagramShapeRotation

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$rotation = new \Kendo\Dataviz\UI\DiagramShapeRotation();
$angle = 1;
$rotation->angle($angle);
$shape->rotation($rotation);
?>

Example - using array

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

source

The source of the shape image. Applicable when the type is set to "image".

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value string

Example

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

stroke

Defines the stroke configuration.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

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

Example - using \Kendo\Dataviz\UI\DiagramShapeStroke

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$stroke = new \Kendo\Dataviz\UI\DiagramShapeStroke();
$color = 'value';
$stroke->color($color);
$shape->stroke($stroke);
?>

Example - using array

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

type

Specifies the type of the Shape using any of the built-in shape type.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value string

Example

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

visual

A function returning a visual element to render for this shape. For more information, refer to visual.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value \Kendo\JavaScriptFunction

Example

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

width

Defines the width of the shape when added to the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value float

Example

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

x

Defines the x-coordinate of the shape when added to the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value float

Example

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

y

Defines the y-coordinate of the shape when added to the Diagram.

Returns

\Kendo\Dataviz\UI\DiagramShape

Parameters

$value float

Example

<?php
$shape = new \Kendo\Dataviz\UI\DiagramShape();
$shape->y(1);
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve the information

close
Dummy