\Kendo\Dataviz\UI\ChartSeriesItemLabels
A PHP class representing the labels setting of ChartSeriesItem.
Methods
align
The label alignment when series.type is set to "donut", "funnel", "pyramid" or "pie".The supported values for "donut" and "pie" are: "circle" - the labels are positioned in circle around the chart. or "column" - the labels are positioned in columns to the left and right of the chart.. The supported values for "funnel" and "pyramid" are: "center" - the labels are positioned in the center over the segment.; "right" - the labels are positioned on the right side of the chart and do not (if there is enough space) overlap the segment(s). or "left" - the labels are positioned on the left side of the chart and do not (if there is enough space) overlap the segment(s)..
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value string
Example
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->align('value');
?>
ariaTemplate
The template which renders the ARIA label for the series labels.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, 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 only for 100% stacked charts.; series - the data series or value - the point value. Can be a number or object containing each bound field..
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->ariaTemplate('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->ariaTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>
background
The background color of the labels. Accepts a valid CSS color string, including hex and rgb.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->background('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->background(new \Kendo\JavaScriptFunction('function() { }'));
?>
border
The border of the labels.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value \Kendo\Dataviz\UI\ChartSeriesItemLabelsBorder|array
Example - using \Kendo\Dataviz\UI\ChartSeriesItemLabelsBorder
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$border = new \Kendo\Dataviz\UI\ChartSeriesItemLabelsBorder();
$color = 'value';
$border->color($color);
$labels->border($border);
?>
Example - using array
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$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\ChartSeriesItemLabels
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->color('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->color(new \Kendo\JavaScriptFunction('function() { }'));
?>
distance
The distance of the labels when series.type is set to "donut" or "pie".
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value float
Example
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->distance(1);
?>
font
The font style of the labels. Accepts a valid CSS font string, for example "20px Courier New'".
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->font('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->font(new \Kendo\JavaScriptFunction('function() { }'));
?>
format
The format of the labels. Uses kendo.format.Format placeholders: Area, bar, column, line, pie, radarArea, radarColumn and radarLine{0} - value; Bubble{0} - x value{1} - y value{2} - size value{3} - category name; Bullet{0} - value{1} - target value; Scatter, scatterLine{0} - x value{1} - y value; PolarArea, polarLine and polarScatter{0} - x value (degrees){1} - y value; Candlestick and OHLC{0} - open value{1} - high value{2} - low value{3} - close value{4} - category name or RangeArea, rangeBar, rangeColumn{0} - from value{1} - to value.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->format('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->format(new \Kendo\JavaScriptFunction('function() { }'));
?>
from
The chart series from label configuration.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value \Kendo\Dataviz\UI\ChartSeriesItemLabelsFrom|array
Example - using \Kendo\Dataviz\UI\ChartSeriesItemLabelsFrom
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$from = new \Kendo\Dataviz\UI\ChartSeriesItemLabelsFrom();
$background = 'value';
$from->background($background);
$labels->from($from);
?>
Example - using array
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$background = 'value';
$labels->from(array('background' => $background));
?>
margin
The margin of the labels. A numeric value will set all margins.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value float|\Kendo\Dataviz\UI\ChartSeriesItemLabelsMargin|array
Example - using float
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->margin(1);
?>
Example - using \Kendo\Dataviz\UI\ChartSeriesItemLabelsMargin
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$margin = new \Kendo\Dataviz\UI\ChartSeriesItemLabelsMargin();
$bottom = 1;
$margin->bottom($bottom);
$labels->margin($margin);
?>
Example - using array
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$bottom = 1;
$labels->margin(array('bottom' => $bottom));
?>
padding
The padding of the labels. A numeric value will set all paddings.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value float|\Kendo\Dataviz\UI\ChartSeriesItemLabelsPadding|array
Example - using float
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->padding(1);
?>
Example - using \Kendo\Dataviz\UI\ChartSeriesItemLabelsPadding
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$padding = new \Kendo\Dataviz\UI\ChartSeriesItemLabelsPadding();
$bottom = 1;
$padding->bottom($bottom);
$labels->padding($padding);
?>
Example - using array
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$bottom = 1;
$labels->padding(array('bottom' => $bottom));
?>
position
The position of the labels. "above" - the label is positioned at the top of the marker. Applicable for series that render points, incl. bubble.; "below" - the label is positioned at the bottom of the marker. Applicable for series that render points, incl. bubble.; "center" - the label is positioned at the point center. Applicable for bar, column, donut, pie, funnel, pyramid, radarColumn and waterfall series.; "insideBase" - the label is positioned inside, near the base of the bar. Applicable for bar, column and waterfall series.; "insideEnd" - the label is positioned inside, near the end of the point. Applicable for bar, column, donut, pie, radarColumn and waterfall series.; "left" - the label is positioned to the left of the marker. Applicable for series that render points, incl. bubble.; "outsideEnd" - the label is positioned outside, near the end of the point. Applicable for bar, column, donut, pie, radarColumn and waterfall series. Not applicable for stacked series.; "right" - the label is positioned to the right of the marker. Applicable for series that render points, incl. bubble.; "top" - the label is positioned at the top of the segment. Applicable for funnel series.; "bottom" - the label is positioned at the bottom of the segment. Applicable for funnel and pyramid series. or "auto" - the from and to labels area positioned at the top/bottom(rangeArea series) or left/right(verticalRangeArea series) so that they are outside the filled area. Applicable for rangeArea and verticalRangeArea series..
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->position('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->position(new \Kendo\JavaScriptFunction('function() { }'));
?>
rotation
The rotation angle of the labels. By default, the labels are not rotated.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value string|float
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->rotation('value');
?>
Example - using float
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$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, line, pie and waterfall 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 only for donut, pie and 100% stacked charts.; series - the data series; stackValue - the cumulative point value on the stack. Available only for stackable 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\ChartSeriesItemLabels
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->template('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->template(new \Kendo\JavaScriptFunction('function() { }'));
?>
to
The chart series to label configuration.
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value \Kendo\Dataviz\UI\ChartSeriesItemLabelsTo|array
Example - using \Kendo\Dataviz\UI\ChartSeriesItemLabelsTo
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$to = new \Kendo\Dataviz\UI\ChartSeriesItemLabelsTo();
$background = 'value';
$to->background($background);
$labels->to($to);
?>
Example - using array
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$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\ChartSeriesItemLabels
Parameters
$value boolean|\Kendo\JavaScriptFunction
Example - using boolean
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->visible(true);
?>
Example - using \Kendo\JavaScriptFunction
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->visible(new \Kendo\JavaScriptFunction('function() { }'));
?>
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.; options - the label options.; createVisual - a function that can be used to get the default visual.; sender - the chart instance (may be undefined).; value - The point value.; category - The point category.; stackValue - The cumulative point value on the stack. Available only for the stackable series.; dataItem - The point dataItem.; series - The point series.; percentage - The point value that is represented as a percentage value. Available only for the Donut, Pie, and 100% stacked charts.; runningTotal - The sum of point values from the last runningTotal summary point onwards. Available for the Waterfall series. or total - The sum of all previous series values. Available for the Waterfall series..
Returns
\Kendo\Dataviz\UI\ChartSeriesItemLabels
Parameters
$value \Kendo\JavaScriptFunction
Example
<?php
$labels = new \Kendo\Dataviz\UI\ChartSeriesItemLabels();
$labels->visual(new \Kendo\JavaScriptFunction('function() { }'));
?>