\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

A PHP class representing the rangeLabels setting of ChartCategoryAxisItem.

Methods

background

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

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value string

Example

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

border

The border of the labels.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

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

Example - using \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsBorder

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$border = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsBorder();
$color = 'value';
$border->color($color);
$rangeLabels->border($border);
?>

Example - using array

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$color = 'value';
$rangeLabels->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\ChartCategoryAxisItemRangeLabels

Parameters

$value string

Example

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

culture

The culture to use when formatting date values. See the globalization overview for more information.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value string

Example

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$rangeLabels->culture('value');
?>

dateFormats

The format used to display date range labels for date category axis. The {0} placeholder represents the category value.The chart will choose the appropriate format for the current categoryAxis.baseUnit. Setting the categoryAxis.rangeLabels.format option will override the date formats.See also: kendo.format.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

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

Example - using \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsDateFormats

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$dateFormats = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsDateFormats();
$days = 'value';
$dateFormats->days($days);
$rangeLabels->dateFormats($dateFormats);
?>

Example - using array

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$days = 'value';
$rangeLabels->dateFormats(array('days' => $days));
?>

font

The font style of the labels. Accepts a valid CSS color string, for example "20px 'Courier New'".

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value string

Example

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

format

The format used to display the labels. Uses kendo.format.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value string

Example

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

margin

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

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

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

Example - using float

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

Example - using \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsMargin

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$margin = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsMargin();
$bottom = 1;
$margin->bottom($bottom);
$rangeLabels->margin($margin);
?>

Example - using array

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

mirror

If set to true the chart will mirror the axis labels and ticks. If the labels are normally on the left side of the axis, mirroring the axis will render them to the right.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value boolean

Example

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$rangeLabels->mirror(true);
?>

padding

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

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

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

Example - using float

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

Example - using \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsPadding

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$padding = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsPadding();
$bottom = 1;
$padding->bottom($bottom);
$rangeLabels->padding($padding);
?>

Example - using array

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

rotation

The rotation angle of the date range labels. By default the labels are not rotated. Can be set to "auto" if the axis is horizontal in which case the labels will be rotated only if the slot size is not sufficient for the entire labels.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value float|string|\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsRotation|array

Example - using float

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

Example - using string

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

Example - using \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsRotation

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$rotation = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabelsRotation();
$align = 'value';
$rotation->align($align);
$rangeLabels->rotation($rotation);
?>

Example - using array

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$align = 'value';
$rangeLabels->rotation(array('align' => $align));
?>

template

The template which renders the labels.The fields which can be used in the template are: value - the category value; dataItem - the data item, in case a field has been specified. If the category does not have a corresponding item in the data then an empty object will be passed.; format - the default format of the label; culture - the default culture (if set) on the label; text - The default label text.; index - The index of the label. or count - The total number of rendered labels..

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

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

Example - using \Kendo\JavaScriptFunction

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

visible

If set to true, the Chart displays the category axis date range labels. By default, the category axis date range labels are not visible.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value boolean

Example

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

visual

A function that can be used to create a custom visual for the date range labels. The available argument fields are: createVisual - a function that can be used to get the default visual.; culture - the default culture (if set) on the label; dataItem - the data item, in case a field has been specified; format - the default format of the label; options - the label options.; rect - the kendo.geometry.Rect that defines where the visual should be rendered.; sender - the chart instance (may be undefined).; text - the label text. or value - the category value.

Returns

\Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$rangeLabels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemRangeLabels();
$rangeLabels->visual(new \Kendo\JavaScriptFunction('function() { }'));
?>
In this article
Not finding the help you need?