Class: Chart

Chart

The main Chart class

new Chart

Parameters:
Name Type Argument Description
canvas String | HTMLCanvasElement <optional>
Optional canvas id or element.
Properties:
Name Type Description
canvas HTMLCanvasElement The canvas where this chart will paint to.
bounds Tee.Rectangle The rectangle where this chart will be painted inside canvas.
palette Tee.Palette The list of colors to use as default colors for series and points.
aspect Tee.Chart.Aspect Contains properties related to 3D and graphics parameters.
panel Tee.Chart.Panel Contains properties used to fill the chart background.
walls Tee.Chart.Walls Contains properties used to draw chart walls around axes.
axes Tee.Chart.Axes Contains a list of axis used to draw series.
legend Tee.Chart.Legend Contains properties to control the legend, a panel showing the list of series or values.
series Tee.Chart.SeriesList Contains a list of Tee.Series objects that belong to this chart.
title Tee.Chart.Title Properties to draw text at top side of chart.
footer Tee.Chart.Title Properties to draw text at bottom side of chart.
zoom Tee.Chart.Zoom Properties to control mouse/touch dragging to zoom chart axes scales.
scroll Tee.Chart.Scroll Properties to control mouse/touch dragging to scroll or pan contents inside chart axes.
tools Tee.Chart.Tools Contains a list of Tee.Tool objects that belong to this chart.
Source:
  • ../../src/teechart.js, line 5336
Example
var Chart1 = new Tee.Chart("canvas");
Chart1.addSeries(new Tee.Bar([1,2,3,4]));
Chart1.draw();

Classes

Axes
Axis
Legend
Panel
Scroll
SeriesList
this.aspect
this.walls
Title
Tools
Wall
Zoom

Methods

addSeries

Parameters:
Name Type Description
series Tee.Series The series object to add to chart.
Source:
  • ../../src/teechart.js, line 5868
Returns:
Returns the series parameter
Type
Tee.Series

draw

Main Chart draw method. Repaints all chart contents.

Source:
  • ../../src/teechart.js, line 5917

getSeries

Parameters:
Name Type Description
index Integer The index of the chart series list to obtain.
Source:
  • ../../src/teechart.js, line 5910
Returns:
Returns the index'th series in chart series list
Type
Tee.Series

toImage

Paints chart to image parameter, as PNG or JPEG picture made from canvas.

Parameters:
Name Type Description
image String The id of an Image HTML component.
format String Can be "image/png" or "image/jpeg"
quality Number From 0% to 100%, jpeg compression quality.
Source:
  • ../../src/teechart.js, line 6021