\Kendo\Dataviz\UI\StockChart

A PHP wrapper for Kendo UI StockChart.

Inherits from \Kendo\UI\Widget.

Usage

To use StockChart in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo StockChart

<?php
// Create a new instance of StockChart and specify its id
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');

// Configure it
$stockChart->autoBind(true)

// Output it

echo $stockChart->render();
?>

Methods

autoBind

Indicates whether the chart will call read on the data source initially.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value boolean

Example

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->autoBind(true);
?>

axisDefaults

Default options for all chart axes.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value ``

axisLabelClick

Fires when an axis label is clicked. For additional information check the axisLabelClick event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->axisLabelClick('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onAxisLabelClick(e) {
        // handle the axisLabelClick event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->axisLabelClick('onAxisLabelClick');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->axisLabelClick(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

addCategoryAxisItem

Adds one or more StockChartCategoryAxisItem to the StockChart.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartCategoryAxisItem

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$categoryAxisItem = new \Kendo\Dataviz\UI\StockChartCategoryAxisItem();
$background = 'value';
$categoryAxisItem->background($background);
$stockChart->addCategoryAxisItem($categoryAxisItem);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$background = 'value';
$stockChart->addCategoryAxisItem(array('background' => $background));
?>

Example - adding more than one StockChartCategoryAxisItem

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$first  = new \Kendo\Dataviz\UI\StockChartCategoryAxisItem();
$second = new \Kendo\Dataviz\UI\StockChartCategoryAxisItem();
$stockChart->addCategoryAxisItem($first, $second);
?>

chartArea

The chart area configuration options. This is the entire visible area of the chart.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartChartArea

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$chartArea = new \Kendo\Dataviz\UI\StockChartChartArea();
$background = 'value';
$chartArea->background($background);
$stockChart->chartArea($chartArea);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$background = 'value';
$stockChart->chartArea(array('background' => $background));
?>

dataBound

Fires when the chart has received data from the data source and is about to render it. For additional information check the dataBound event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dataBound('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBound(e) {
        // handle the dataBound event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dataBound('onDataBound');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dataBound(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataSource

Sets the data source of the widget.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value \Kendo\Data\DataSource |array

Example - using \Kendo\Data\DataSource

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$dataSource = new \Kendo\Data\DataSource();
$stockChart->dataSource($dataSource);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$schema = new \Kendo\Data\DataSourceSchema();
$stockChart->dataSource(array('schema' => $schema));
?>

dateField

The field containing the point date. It is used as a default categoryField for all series.The data item field value must be either: Date instance; String parsable by new Date([field value]) or String in ASP.NET JSON format, i.e. "\/Date(1320825600000-0800)\/".

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string

Example

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dateField('value');
?>

drag

Fires as long as the user is dragging the chart using the mouse or swipe gestures. For additional information check the drag event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->drag('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDrag(e) {
        // handle the drag event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->drag('onDrag');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->drag(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dragEnd

Fires when the user stops dragging the chart. For additional information check the dragEnd event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dragEnd('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDragEnd(e) {
        // handle the dragEnd event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dragEnd('onDragEnd');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dragEnd(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dragStart

Fires when the user has used the mouse or a swipe gesture to drag the chart.The drag operation can be aborted by calling e.preventDefault(). For additional information check the dragStart event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dragStart('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDragStart(e) {
        // handle the dragStart event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dragStart('onDragStart');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->dragStart(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

legend

The chart legend configuration options.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartLegend

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$legend = new \Kendo\Dataviz\UI\StockChartLegend();
$background = 'value';
$legend->background($background);
$stockChart->legend($legend);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$background = 'value';
$stockChart->legend(array('background' => $background));
?>

legendItemClick

Fires when an legend item is clicked, before the selected series visibility is toggled. Can be cancelled. For additional information check the legendItemClick event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->legendItemClick('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onLegendItemClick(e) {
        // handle the legendItemClick event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->legendItemClick('onLegendItemClick');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->legendItemClick(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

legendItemHover

Fires when an legend item is hovered. For additional information check the legendItemHover event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->legendItemHover('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onLegendItemHover(e) {
        // handle the legendItemHover event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->legendItemHover('onLegendItemHover');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->legendItemHover(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

navigator

The data navigator configuration options.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartNavigator

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$navigator = new \Kendo\Dataviz\UI\StockChartNavigator();
$autoBind = true;
$navigator->autoBind($autoBind);
$stockChart->navigator($navigator);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$autoBind = true;
$stockChart->navigator(array('autoBind' => $autoBind));
?>

noteClick

Fired when the user clicks one of the notes.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the noteClick event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->noteClick('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onNoteClick(e) {
        // handle the noteClick event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->noteClick('onNoteClick');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->noteClick(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

noteHover

Fired when the user hovers one of the notes.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the noteHover event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->noteHover('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onNoteHover(e) {
        // handle the noteHover event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->noteHover('onNoteHover');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->noteHover(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

addPane

Adds one or more StockChartPane to the StockChart.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartPane

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$pane = new \Kendo\Dataviz\UI\StockChartPane();
$background = 'value';
$pane->background($background);
$stockChart->addPane($pane);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$background = 'value';
$stockChart->addPane(array('background' => $background));
?>

Example - adding more than one StockChartPane

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$first  = new \Kendo\Dataviz\UI\StockChartPane();
$second = new \Kendo\Dataviz\UI\StockChartPane();
$stockChart->addPane($first, $second);
?>

pdf

Configures the export settings for the saveAsPDF method.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartPdf

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$pdf = new \Kendo\Dataviz\UI\StockChartPdf();
$author = 'value';
$pdf->author($author);
$stockChart->pdf($pdf);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$author = 'value';
$stockChart->pdf(array('author' => $author));
?>

plotArea

The plot area configuration options. This is the area containing the plotted series.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartPlotArea

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$plotArea = new \Kendo\Dataviz\UI\StockChartPlotArea();
$background = 'value';
$plotArea->background($background);
$stockChart->plotArea($plotArea);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$background = 'value';
$stockChart->plotArea(array('background' => $background));
?>

plotAreaClick

Fires when plot area is clicked. For additional information check the plotAreaClick event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->plotAreaClick('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onPlotAreaClick(e) {
        // handle the plotAreaClick event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->plotAreaClick('onPlotAreaClick');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->plotAreaClick(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

plotAreaHover

Fired when the user hovers the plot area. For additional information check the plotAreaHover event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->plotAreaHover('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onPlotAreaHover(e) {
        // handle the plotAreaHover event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->plotAreaHover('onPlotAreaHover');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->plotAreaHover(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

renderEvent

Fired when the chart is ready to render on screen.Can be used, for example, to remove loading indicators. Changes to options will be ignored.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the render event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->renderEvent('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onRender(e) {
        // handle the render event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->renderEvent('onRender');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->renderEvent(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

renderAs

Sets the preferred rendering engine. If it is not supported by the browser, the Chart will switch to the first available mode.The supported values are: "svg" - renders the widget as inline SVG document, if available or "canvas" - renders the widget as a Canvas element, if available..

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string

Example

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->renderAs('value');
?>

select

Fired when the user modifies the selection.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the select event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->select('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSelect(e) {
        // handle the select event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->select('onSelect');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->select(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

selectEnd

Fired when the user completes modifying the selection.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the selectEnd event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->selectEnd('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSelectEnd(e) {
        // handle the selectEnd event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->selectEnd('onSelectEnd');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->selectEnd(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

selectStart

Fired when the user starts modifying the axis selection.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the selectStart event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->selectStart('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSelectStart(e) {
        // handle the selectStart event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->selectStart('onSelectStart');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->selectStart(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

addSeriesItem

Adds one or more StockChartSeriesItem to the StockChart.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartSeriesItem

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$seriesItem = new \Kendo\Dataviz\UI\StockChartSeriesItem();
$aggregate = 'value';
$seriesItem->aggregate($aggregate);
$stockChart->addSeriesItem($seriesItem);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$aggregate = 'value';
$stockChart->addSeriesItem(array('aggregate' => $aggregate));
?>

Example - adding more than one StockChartSeriesItem

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$first  = new \Kendo\Dataviz\UI\StockChartSeriesItem();
$second = new \Kendo\Dataviz\UI\StockChartSeriesItem();
$stockChart->addSeriesItem($first, $second);
?>

seriesClick

Fires when chart series are clicked. For additional information check the seriesClick event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->seriesClick('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSeriesClick(e) {
        // handle the seriesClick event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->seriesClick('onSeriesClick');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->seriesClick(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

seriesColors

The default colors for the chart's series. When all colors are used, new colors are pulled from the start again.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value array

Example

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->seriesColors(array());
?>

seriesDefaults

Default values for each series.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartSeriesDefaults

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$seriesDefaults = new \Kendo\Dataviz\UI\StockChartSeriesDefaults();
$gap = 1;
$seriesDefaults->gap($gap);
$stockChart->seriesDefaults($seriesDefaults);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$gap = 1;
$stockChart->seriesDefaults(array('gap' => $gap));
?>

seriesHover

Fires when chart series are hovered. For additional information check the seriesHover event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->seriesHover('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSeriesHover(e) {
        // handle the seriesHover event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->seriesHover('onSeriesHover');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->seriesHover(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

theme

The chart theme. This can be either a built-in theme or "sass". When set to "sass" the chart will read the variables from the Sass-based themes.The supported values are: "sass" - special value, see notes; "black"; "blueopal"; "bootstrap"; "default"; "highcontrast"; "metro"; "metroblack"; "moonlight"; "silver" or "uniform".

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string

Example

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->theme('value');
?>

title

The chart title configuration options or text.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartTitle

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$title = new \Kendo\Dataviz\UI\StockChartTitle();
$align = 'value';
$title->align($align);
$stockChart->title($title);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$align = 'value';
$stockChart->title(array('align' => $align));
?>

tooltip

The data point tooltip configuration options.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartTooltip

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$tooltip = new \Kendo\Dataviz\UI\StockChartTooltip();
$background = 'value';
$tooltip->background($background);
$stockChart->tooltip($tooltip);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$background = 'value';
$stockChart->tooltip(array('background' => $background));
?>

transitions

A value indicating if transition animations should be played.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value boolean

Example

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->transitions(true);
?>

addValueAxisItem

Adds one or more StockChartValueAxisItem to the StockChart.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

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

Example - using \Kendo\Dataviz\UI\StockChartValueAxisItem

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$valueAxisItem = new \Kendo\Dataviz\UI\StockChartValueAxisItem();
$background = 'value';
$valueAxisItem->background($background);
$stockChart->addValueAxisItem($valueAxisItem);
?>

Example - using array

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$background = 'value';
$stockChart->addValueAxisItem(array('background' => $background));
?>

Example - adding more than one StockChartValueAxisItem

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$first  = new \Kendo\Dataviz\UI\StockChartValueAxisItem();
$second = new \Kendo\Dataviz\UI\StockChartValueAxisItem();
$stockChart->addValueAxisItem($first, $second);
?>

zoom

Fires as long as the user is zooming the chart using the mousewheel. For additional information check the zoom event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoom('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onZoom(e) {
        // handle the zoom event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoom('onZoom');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoom(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

zoomEnd

Fires when the user stops zooming the chart. For additional information check the zoomEnd event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoomEnd('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onZoomEnd(e) {
        // handle the zoomEnd event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoomEnd('onZoomEnd');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoomEnd(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

zoomStart

Fires when the user has used the mousewheel to zoom the chart.The zoom operation can be aborted by calling e.preventDefault(). For additional information check the zoomStart event documentation.

Returns

\Kendo\Dataviz\UI\StockChart

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoomStart('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onZoomStart(e) {
        // handle the zoomStart event.
    }
</script>
<?php
$stockChart = new \Kendo\Dataviz\UI\StockChart('StockChart');
$stockChart->zoomStart('onZoomStart');
?>

Example - using \Kendo\JavaScriptFunction

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

Give article feedback

Tell us how we can improve this article

close
Dummy