\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

A PHP class representing the labels setting of ChartSeriesDefaults.

Methods

background

The background color of the labels. Accepts a valid CSS color string, including hex and rgb.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value string

Example

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->background('value');
?>

border

The border of the labels.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

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

Example - using \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsBorder

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$border = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsBorder();
$color = 'value';
$border->color($color);
$labels->border($border);
?>

Example - using array

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$color = 'value';
$labels->border(array('color' => $color));
?>

color

The text color of the labels. Accepts a valid CSS color string, including hex and rgb.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value string

Example

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->color('value');
?>

font

The font style of the labels.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value string

Example

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->font('value');
?>

format

The format of the labels. Uses kendo.format.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value string

Example

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->format('value');
?>

from

The chart series from label configuration.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

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

Example - using \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsFrom

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$from = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsFrom();
$background = 'value';
$from->background($background);
$labels->from($from);
?>

Example - using array

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$background = 'value';
$labels->from(array('background' => $background));
?>

margin

The margin of the labels. A numeric value will set all margins.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value float |\Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsMargin |array

Example - using float

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->margin(1);
?>

Example - using \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsMargin

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$margin = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsMargin();
$bottom = 1;
$margin->bottom($bottom);
$labels->margin($margin);
?>

Example - using array

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$bottom = 1;
$labels->margin(array('bottom' => $bottom));
?>

padding

The padding of the labels. A numeric value will set all margins.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value float |\Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsPadding |array

Example - using float

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->padding(1);
?>

Example - using \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsPadding

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$padding = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsPadding();
$bottom = 1;
$padding->bottom($bottom);
$labels->padding($padding);
?>

Example - using array

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$bottom = 1;
$labels->padding(array('bottom' => $bottom));
?>

rotation

The rotation angle of the labels. By default, the labels are not rotated.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value string |float

Example - using string

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->rotation('value');
?>

Example - using float

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->rotation(1);
?>

template

The template which renders the chart series label.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, funnel, line and pie series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available for donut, funnel and pie series.; series - the data series; value - the point value. Can be a number or object containing each bound field.; runningTotal - the sum of point values since the last "runningTotal" summary point. Available for waterfall series. or total - the sum of all previous series values. Available for waterfall series..

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->template('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->template(new \Kendo\JavaScriptFunction('function() { }'));
?>

to

The chart series to label configuration.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

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

Example - using \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsTo

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$to = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabelsTo();
$background = 'value';
$to->background($background);
$labels->to($to);
?>

Example - using array

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$background = 'value';
$labels->to(array('background' => $background));
?>

visible

If set to true the chart will display the series labels. By default chart series labels are not displayed.

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value boolean

Example

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->visible(true);
?>

visual

A function that can be used to create a custom visual for the labels. The available argument fields are: text - the label text.; rect - the kendo.geometry.Rect that defines where the visual should be rendered.; sender - the chart instance (may be undefined).; options - the label options. or createVisual - a function that can be used to get the default visual..

Returns

\Kendo\Dataviz\UI\ChartSeriesDefaultsLabels

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesDefaultsLabels();
$labels->visual(new \Kendo\JavaScriptFunction('function() { }'));
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy