- Since:
-
9.4.0
Type Definitions
-
CallbackData
-
Data object passed to CallbackFunction.
Type:
- object
- Since:
-
9.4.0
Properties:
Name Type Argument Description qcCompactChart <optional>
Compact Chart instance.
actionstring <optional>
If applicable, action performed that triggered the callback.
appendingboolean <optional>
If applicable, indicate data is supplementing end of existing data.
appendToDateDate <optional>
If applicable, date to truncate existing data to so new data can be added from that date onward.
forceboolean <optional>
If applicable, whether to force a load of new data after periodicity change.
prevPeriodicityPeriodicity <optional>
If applicable, periodicity before the change.
symbolstring <optional>
If applicable, symbol that triggered the callback.
-
CallbackFunction( [data])
-
Listener function for CompactChart#addCallbackListener.
Parameters:
Name Type Argument Description dataCallbackData <optional>
Data object passed to listener function.
- Since:
-
9.4.0
-
ChartConfig
-
All configurations, including themeing, relating to the chart object go here. The chart object controls anything going on the canvas, though the x-axis and y-axis can be configured specifically in their own sections. Note: The
ChartInitobject this inherits from has all optional properties.Type:
- Since:
-
9.4.0
Properties:
Name Type Argument Description colorstring <optional>
Default color for rendering.
backgroundColorstring Background color for chart.
gaplinesGapFillTheme | string | boolean <optional>
Default configuration for gap rendering.
-
ChartInit
-
Properties relating to the chart that are set by default to certain values. The chart object controls anything going on the canvas, though the x-axis and y-axis can be configured specifically in their own sections.
Type:
- object
- Since:
-
- 9.4.0 Introduced
- 10.1.0 added
decimalPlaces,labelandextendLastTick.
Properties:
Name Type Argument Default Description candleColorByDirectionboolean <optional>
Up/Down colors used for bar charts are determined based on the previous close. Set this flag to true to base it on the bar's open.
candleWidthPercentnumber <optional>
0.65 Ratio of candle body width to reserved area for the record. Note setting to 1 will cause adjacent candles to touch.
cleanupGapsstring <optional>
<nullable>
Determines how gaps in the data are treated in the rendering. Not yet implemented.
currentPriceLineboolean <optional>
Set to true to enable the dotted line that appears across the chart at the current price position when looking at current data.
dataZonestring <optional>
<nullable>
Specifies the time zone of the data in masterData, default is local time.
decimalPlacesnumber | DecimalPlacesFunction <optional>
Specifies minimum number of decimals to display on y-axes, can be overridden by setting on y-axis config.
defaultPlotFieldstring <optional>
'Close' The field which contains the data used to draw a line chart.
displayZonestring <optional>
<nullable>
Specifies the time zone of the display (x-axis), default is local time.
dontRollboolean <optional>
Set to true to accept weekly or monthly data from the quotefeed, otherwise this is rolled up from daily data.
extendLastTickboolean <optional>
<nullable>
For line-type charts, extend the line to the current date if the last point is in the past. Setting can be overridden by setting in line/mountain configuration.
focusableboolean <optional>
Set to true to enable focus on the chart container.
includeOverlaysInMinMaxboolean <optional>
Set to false to exclude study data from computing the minimum/maximum y-axis values to display.
initialWhitespacenumber <optional>
60 Pixels to pad the right side of the chart.
labelboolean <optional>
<nullable>
Set to true to force all axis labels to show on all plots, set to false to not show by default (but can be overridden by renderer config setting).
lineApproximationboolean <optional>
Set to false to prevent optimization of line drawing when minimum candleWidth < 1.
lockScrollboolean <optional>
Set to true to prevent y-axis scrolling when chart is panned.
maxDataSetSizenumber <optional>
20000 Maximum number of records to keep in data set.
maxTicksnumber <optional>
Initial number of bars to show on the chart, if not automatically calculated.
maximumCandleWidthnumber <optional>
100 Maximum width allowed for a bar in pixels.
minimumCandleWidthnumber <optional>
1 Minimum width allowed for a bar in pixels.
minimumZoomTicksnumber <optional>
9 Minimum number of bars allowed on a screen when zooming in.
noWicksOnCandlesArray.<string> <optional>
List of chart types which should not have wicks drawn on their candles.
preserveCandleWidthOnResizeboolean <optional>
Set to true to lock candle width when resizing the chart, otherwise number of bars is locked.
scrollnumber <optional>
Initial number of bars back to start on the left of the chart, if not automatically calculated.
tensionnumber <optional>
<nullable>
Set to a number between 0 and 1 to draw smooth curves between data points.
useInflectionPointForIntradayboolean <optional>
Set to true to cause consolidation to occur from the point on the left of the span.
yaxisPaddingLeftnumber <optional>
<nullable>
If set, will control width of left y-axis. Setting to 0 will cause floating effect.
yaxisPaddingRightnumber <optional>
<nullable>
If set, will control width of right y-axis. Setting to 0 will cause floating effect.
-
ColorFunction(qc, quote, isGap)
-
Returns a color given a set of conditions.
Parameters:
Name Type Description qcCompactChart The CompactChart instance.
quoteDataRecord A quote record to examine. A DataRecord is an internal object which represents data for a specific time.
isGapboolean Whether the record represents a gap in the data.
- Since:
-
9.4.0
Returns:
A color or color object, or null.
- Type
- LineTheme | string | null
-
DataRecord
-
Record that holds data for a given time. The data can take the form of many different objects. The key can be either a symbol, under which another data object is found, or a study value, or a meta field for the data. The following fields will always be present at the top level:
Type:
- Record.<string, *>
- Since:
-
9.4.0
Properties:
Name Type Description dTDate Date of record.
ticknumber Tick number, this matches the index of this record in the data set.
-
DecimalPlacesFunction( [masterData] [, symbolObject])
-
Function used to determine number of decimal places to display on y-axis. This is set in the ChartInit when the number of decimals depends on the symbol or the actual data present. If the decimal places is to be a constant, do not set this function.
Parameters:
Name Type Argument Description masterDataArray.<MasterRecord> <optional>
Data records.
symbolObjectobject <optional>
A symbol object.
Properties
Name Type Description symbolstring Ticker symbol.
- Since:
-
10.1.0
Returns:
Number of decimal places do display.
- Type
- number
-
GapFillTheme
-
Defines an object that represents the rendering of a gap area on the chart.
Type:
- Since:
-
9.4.0
Properties:
Name Type Argument Description fillMountainboolean <optional>
True to fill in underneath the gap region of a mountain chart.
-
LineTheme
-
Defines an object that represents the rendering of a line.
Type:
- object
- Since:
-
9.4.0
Properties:
Name Type Argument Default Description colorstring Line color in a valid css format.
pattern'solid' | 'dashed' | 'dotted' | Array.<number> <optional>
'solid' Line pattern expressed either as "solid", "dashed", "dotted"; or an array of numbers representing number of pixels to turn plotter on and off.
widthnumber <optional>
1 Line width in pixels.
-
MasterRecord
-
Aggregated data from data sources, which is eventually formatted, considated, and used to create a data set. Data is stored in an array, and a Master Record represents the data for one point in time.
Type:
- Record.<string, (Date|number|MasterRecord|undefined)>
- Since:
-
9.4.0
Properties:
Name Type Argument Description dTDate The date of the record.
displayDateDate <optional>
Date in user-selected time zone (internally generated).
consolidatedTicksnumber <optional>
Number of ticks consolidated into this record (internally generated).
_key_MasterRecord | undefined Any symbol representing fields of data. There can be multiple keys, each unique to a security. If the key is the symbol, such as "IBM" or "ORCL", then the value will be a MasterRecord but with all fields optional.
_field_number Any field representing data. There can be multiple field keys, each unique to a data point, such as "Close", "High".
