New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI for Angular StockChart component.

The StockChart displays financial data with a navigator for date range selection. It combines a main chart with a smaller navigator chart for easy data exploration.

Definition

Package:@progress/kendo-angular-charts

Selector:kendo-stockchart

Export Name:Accessible in templates as #kendoStockChartInstance="kendoStockChart"

Syntax:

ts
import { Component } from '@angular/core';

@Component({
  selector: 'my-app',
  template: `
      <kendo-stockchart>
          <kendo-chart-series>
              <kendo-chart-series-item type="line" [data]="data" field="value" categoryField="date">
              </kendo-chart-series-item>
          </kendo-chart-series>
          <kendo-chart-navigator>
              <kendo-chart-navigator-select to="2017/02/01">
              </kendo-chart-navigator-select>
              <kendo-chart-navigator-series>
                  <kendo-chart-navigator-series-item type="area" [data]="data" field="value" categoryField="date">
                  </kendo-chart-navigator-series-item>
              </kendo-chart-navigator-series>
          </kendo-chart-navigator>
      </kendo-stockchart>
  `,
})
export class AppComponent {
}

Inputs

Defines the default configuration for all axes.

Defines the category axis configuration.

Defines the Chart area configuration.

Defines the Chart legend configuration.

Specifies the configuration options for the data navigator.

The navigator provides a way to select and filter data ranges.

noData

boolean

Defines whether to show the no-data template when the Chart has no data.

Default:

true

Defines the default configuration for all panes.

Defines the Chart panes configuration.

Defines the plot area configuration.

Defines the settings for the tooltip popup.

renderAs

"svg" | "canvas"

Defines the rendering mode of the Chart.

Default:

'svg'

Limits the automatic resizing of the Chart. Sets the maximum number of times per second that the component redraws its content when the size of its container changes. To disable the automatic resizing, set it to 0.

Default:

10

Defines the Chart series configuration.

seriesColors

string[]

Defines the default colors for the Chart series.

Defines the default configuration for all series.

Defines the subtitle configuration of the Chart.

title

string | Title

Defines the title configuration of the Chart.

Defines the Chart tooltip configuration.

Defines whether the Chart plays animations when it displays the series. By default, animations are enabled.

Default:

true

Defines the value axis configuration.

Defines the X axis configuration.

Defines the Y axis configuration.

Fields

surface

Surface

Represents the Drawing Surface of the Chart.

Events

Fires when you click an axis label (see example).

Fires as long as you drag the Chart with the mouse or through swipe gestures.

Fires when you stop dragging the Chart.

Fires when you start dragging the Chart.

Fires when a legend item is clicked before the selected series visibility is toggled. You can prevent this event.

Fires when you hover over a legend item (see example).

Fires when the cursor leaves a legend item.

Fires when the navigator range is changed.

Use this event to respond to user interactions with the navigator.

Fires when you click a note.

Fires when you hover over a note.

Fires when the cursor leaves a note.

Fires when a pane is rendered because the Chart is rendered, performs panning or zooming, or is exported with different options. The event is used to render custom visuals in the panes.

Fires when you click the plot area (see example). The click event is triggered by the tap and contextmenu events. To distinguish between the original events, inspect the e.originalEvent.type field.

Fires when you hover the plot area (see example).

Fires when the cursor leaves the plot area.

Fires when the Chart is ready to render on screen (see example). For example, you can use it to remove loading indicators. Any changes made to the options are ignored.

Fires when you modify the selection.

The range units include a generic axis category index (0-based) and a date axis represented by a date instance.

Fires when you complete the modification of the selection.

The range units include a generic axis category index (0-based) and a date axis represented by a date instance.

Fires when you start modifying the axis selection.

The range units include a generic axis category index (0-based) and a date axis represented by a date instance.

Fires when you click the Chart series.

The click event will be triggered by the tap and contextmenu events (see example). To distinguish between the original events, inspect the e.originalEvent.type field.

Fires when you hover the Chart series (see example).

Fires when the cursor leaves a series.

Fires when the cursor enters a series.

Fires as long as you zoom the Chart by using the mousewheel operation.

Fires when you stop zooming the Chart.

Fires when you use the mousewheel to zoom the Chart.

Methods

Exports the Chart as an image. The export operation is asynchronous and returns a promise.

Parameters:optionsImageExportOptions

The parameters for the exported image.

Returns:

Promise​<string>

A promise that resolves with a PNG image encoded as a Data URI.

Exports the Chart as an SVG document. The export operation is asynchronous and returns a promise.

Parameters:optionsChartSVGExportOptions

The parameters for the exported file.

Returns:

Promise​<string>

A promise that resolves with an SVG document encoded as a Data URI.

Exports the Chart as a Drawing Scene.

Parameters:optionsany

The parameters for the export operation.

Returns:

Group

The root Group of the scene.

Returns the axis with the specified name.

Parameters:namestring

The axis name.

Returns:

ChartAxis

The axis with a corresponding name.

Returns the pane at the specified index.

Parameters:indexnumber

The pane index.

Returns:

ChartPane

The pane at the specified index.

Returns the pane with the specified name.

Parameters:namestring

The name of the pane.

Returns:

ChartPane

The pane with the provided name.

Returns the plot area of the Chart.

Returns:

ChartPlotArea

The plot area of the Chart.

Hides the tooltip of the Chart.

Updates the component fields with the specified values and refreshes the Chart.

Use this method when the configuration values cannot be set through the template.

Parameters:changesany

An object containing the updated input fields.

Reloads the Chart appearance settings from the current Kendo UI Theme.

Call this method after loading a different theme stylesheet.

Detects the size of the container and redraws the Chart. Resizing is automatic unless you set the resizeRateLimit option to 0.

Shows the Chart tooltip of a specific point or the shared tooltip of a specific category.

Parameters:filterstring | number | Date | (point: SeriesPoint) => boolean

The category for a shared tooltip or a function which will be called for each point until the function returns true.

Prevents the navigator pane from redrawing when the StockChart options are updated.

Use this method when you need to update only the main series data for the selected period. Call this method before updating the Chart options to improve performance.

Highlights the series points or the segments of a Pie, Donut, Funnel, or Pyramid Charts.

See Series Highlight for more details (with an example).

Parameters:showboolean

A Boolean value that indicates whether the highlight is shown or hidden.

filterstring | { category: string; series: string } | (point: SeriesPoint) => boolean

A string that represents the series or category name, an object with the series and category name, or a function which will be called for each point. The function should return true for the points for which the highlight is toggled.