new ChartPanel(config)
Describes chart panel.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | The configuration object.
Properties
|
Extends
Members
-
<readonly> canvas :jQuery
-
Gets canvas element.
Type:
- jQuery
-
<readonly> chart :StockChartX.Chart
-
Gets parent chart.
Type:
-
<readonly> chartPanelsContainer :StockChartX.ChartPanelsContainer
-
Gets parent chart panels container.
Type:
-
<readonly> contentFrame :StockChartX.Rect
-
Gets content frame rectangle.
Type:
-
<readonly> context :CanvasRenderingContext2D
-
Gets canvas rendering context.
Type:
- CanvasRenderingContext2D
-
<readonly> drawings :Array.<StockChartX.Drawing>
-
Gets array of drawings on the panel.
Type:
- Array.<StockChartX.Drawing>
-
formatter :StockChartX.IntlNumberFormat|StockChartX.CustomNumberFormat
-
Gets/Sets value formatter.
Type:
-
heightRatio :Number
-
Gets/Sets current height ratio. The value must be in range [minHeightRatio..maxHeightRatio].
Type:
- Number
-
<readonly> indicators :Array.<StockChartX.Indicator>
-
Gets array of indicators on the chart panel.
Type:
- Array.<StockChartX.Indicator>
-
maxHeightRatio :number
-
Gets/Sets maximum allowed height ratio. The value must be in range [minHeightRatio..1].
Type:
- number
-
minHeightRatio :number
-
Gets/Sets minimum allowed height ratio. The value must be in range [0..maxHeightRatio].
Type:
- number
-
moveDirection :StockChartX.PanelMoveDirection
-
Gets/Sets allowed move direction.
Type:
-
moveKind :StockChartX.PanelMoveKind
-
Gets/Sets panel's move kind.
Type:
-
<readonly> plots :Array.<StockChartX.Plot>
-
Gets array of plots on the panel.
Type:
- Array.<StockChartX.Plot>
-
<readonly> projection :StockChartX.Projection
-
Gets projection object to convert coordinates.
Type:
-
theme :object
-
Gets/Sets theme.
Type:
- object
-
<readonly> titleDiv :jQuery
-
Gets title div element.
Type:
- jQuery
-
<readonly> valueScale :StockChartX.ChartPanelValueScale
-
Gets value scale.
Type:
-
<readonly> valueScales :Array.<StockChartX.ChartPanelValueScale>
-
Gets array of value scales.
Type:
- Array.<StockChartX.ChartPanelValueScale>
-
xGridVisible :boolean
-
Gets/Sets flag that indicates whether X grid is visible.
Type:
- boolean
-
yGridVisible :boolean
-
Gets/Sets flag that indicates whether Y grid is visible.
Type:
- boolean
Methods
-
addDrawings(drawings)
-
Adds drawings.
Parameters:
Name Type Description drawingsStockChartX.Drawing | Array.<StockChartX.Drawing> The drawing or an array of drawings to add. - See:
-
removeDrawingsto remove drawings.
-
addPlot(plot)
-
Adds new plot.
Parameters:
Name Type Description plotStockChartX.Plot | Array.<StockChartX.Plot> The plot or an array of plots to add. - See:
-
removePlotto remove plot.
-
destroy()
-
Destroys chart panel (removes event subscriptions, html elements, etc.).
- Overrides:
-
draw()
-
Draws control.
- Inherited From:
-
formatValue(value)
-
Returns the string representation of a given value.
Parameters:
Name Type Description valuenumber The value. Returns:
- Type
- string
-
get()
-
The actual theme.
-
getAutoScaledMinMaxValues(valueScale)
-
Returns min/max values for auto-scaling.
Parameters:
Name Type Argument Description valueScaleStockChartX.ChartValueScale <optional>
The value scale. Returns:
- Type
- Object
-
getMinMaxValues(startIndex, count, valueScale)
-
Returns minimum and maximum plot's values.
Parameters:
Name Type Argument Description startIndexnumber <optional>
The starting index of the range to search. countnumber <optional>
The length of the range to search. valueScaleStockChartX.ValueScale <optional>
The value scale. - See:
-
getAutoScaledMinMaxValuesto min/max values in visible range.
Returns:
An object that contains min and max values.- Type
- Object
-
handleEvent(event)
-
Handles event.
Parameters:
Name Type Description eventStockChartX.WindowEvent The event object. - Inherited From:
Returns:
- Type
- boolean
-
hitTest(point)
-
Checks if a given point belongs to a frame rectangle.
Parameters:
Name Type Description pointStockChartX.Point The point. - Inherited From:
Returns:
- Type
- boolean
-
layout(frame)
-
Layouts controls.
Parameters:
Name Type Description frameStockChartX.Rect The frame rectangle related to parent container. - Inherited From:
-
loadState(state)
-
Loads state.
Parameters:
Name Type Description stateobject The state saved by saveState function. - See:
-
saveStateto save state.
-
removeDrawings(drawings)
-
Removes one or more drawings.
Parameters:
Name Type Argument Description drawingsStockChartX.Drawing | Array.<StockChartX.Drawing> <optional>
The drawing or an array of drawings to remove. All drawings are removed if omitted. - See:
-
addDrawingsto add drawings.
-
removePlot(plot)
-
Removes given plot or an array of plots.
Parameters:
Name Type Description plotStockChartX.Plot | Array.<StockChartX.Plot> The plot or an array of plots to remove. - See:
-
addPlotto add plot.
-
saveState()
-
Saves state.
- See:
-
loadStateto load state.
Returns:
- Type
- object
-
setNeedsAutoScale()
-
Marks that value scale needs to be auto-scaled on next layout.
-
update()
-
Layouts and draws chart panel.