Repository navigation
Quick Charts 2.0.0
A major version may rename or remove public names, and its upgrading guide lists each one, old to new, with how saved state carries over. 2.0 names everything a host writes against in the chart's own words: the stylesheet's cascade layers, the data source a symbol search row names, timeframe for every timeframe, indicator for every indicator, the drawing toolbar's models and the context menu's row builder. Saved state is read under the 2.0 names alone, and the guide lists what 1.x saved that opens at its default.
Every modal dialog opens and closes with the modal motion, as the symbol search and chart settings do: the indicator browser, the indicator settings, the saved-layouts browser, the name and confirm prompts, go to date, and every drawing dialog (drawing settings, the image picker and the template prompts) fade their backdrop in and fade and scale their box from motion.scaleEnter over motion.durationBase. A closing dialog stops taking input and returns focus at once, and under a reduced-motion preference it closes at once.
Upgrading to 2.0
Declare the cascade layers under their 2.0 names in your first stylesheet, before any product stylesheet loads. Layers of your own product go between quickcharts.chart and host:
@layer reset, quickcharts.tokens, quickcharts.chart, host;Then replace each 1.x name with its 2.0 name:
| 1.x | 2.0 |
|---|---|
cascade layer trdrs.tokens |
quickcharts.tokens |
cascade layer trdrs.chart |
quickcharts.chart |
SymbolRow.provider |
SymbolRow.dataSource |
providerMark on ChartWidgetOptions and SymbolSearchOptions |
dataSourceMark |
ProviderMarkPainter, called with { provider, host, size } |
DataSourceMarkPainter, called with { dataSource, host, size } |
MarkPainters.provider, which an extension reads as ctx.painters.provider |
MarkPainters.dataSource, read as ctx.painters.dataSource |
LayoutSyncFlags.interval, in layout.sync, layoutSync, widget.layout.sync(), widget.layout.setSync and the widget.layout.setSync command |
LayoutSyncFlags.timeframe |
ChartReplayApi.interval() |
ChartReplayApi.timeframe() |
ChartReplayApi.setInterval(token) |
ChartReplayApi.setTimeframe(token) |
ChartReplayApi.resolvedInterval() |
ChartReplayApi.resolvedTimeframe() |
ChartReplayApi.subIntervals() |
ChartReplayApi.subTimeframes() |
command chart.replay.setInterval |
chart.replay.setTimeframe |
ChartPreferences.replayInterval |
ChartPreferences.replayTimeframe |
autoIntervalFor |
autoTimeframeFor |
subIntervalsFor |
subTimeframesFor |
IntervalVisibility |
TimeframeVisibility |
IntervalBucket |
TimeframeBucket |
IntervalContext |
TimeframeContext |
parseIntervalContext |
parseTimeframeContext |
IDrawing.setIntervalContext(context) |
IDrawing.setTimeframeContext(context) |
TemplateKind 'study' |
'indicator' |
RestTemplateKind 'study' |
'indicator' |
REST paths /templates/study and /templates/study/{id} |
/templates/indicator and /templates/indicator/{id} |
info.version 1 in dist/rest-openapi.json |
2 |
data-role="legend-study-value" on an indicator row's value |
data-role="legend-indicator-value" |
RAIL_PLAN |
DRAWING_TOOLBAR_PLAN |
buildRailGroups |
buildDrawingToolbarGroups |
RailGroup |
DrawingToolbarGroup |
RailSection |
DrawingToolbarSection |
railFaceOf |
drawingToolbarFaceOf |
rememberRailTool |
rememberDrawingToolbarTool |
DrawingPreferences.railTools |
DrawingPreferences.drawingToolbarTools |
ChartExtensionMenuProvider, which contributeContextMenu takes |
ChartExtensionMenuBuilder |
A dictionary of your own (ChartCustomLocale, ChartDictionary) uses the 2.0 catalog keys and placeholders:
| 1.x | 2.0 |
|---|---|
layouts.syncInterval |
layouts.syncTimeframe |
layouts.syncIntervalTip |
layouts.syncTimeframeTip |
layouts.syncIntervalToggle |
layouts.syncTimeframeToggle |
replay.interval |
replay.timeframe |
replay.intervalHelp |
replay.timeframeHelp |
replay.intervalNone |
replay.timeframeNone |
replay.autoSelectInterval |
replay.autoSelectTimeframe |
command.replayInterval |
command.replayTimeframe |
drawing.visibilityOnIntervals |
drawing.visibilityOnTimeframes |
drawing.intervalPinnedNote |
drawing.timeframePinnedNote |
{interval} in range.tip and layouts.listingFacts |
{timeframe} |
Every English string about a timeframe says timeframe, and each language writes its own word for timeframe in the layout sync switch. legend.showRows and legend.hideRows read Show indicator rows and Hide indicator rows in every language, and the remove control on a comparison's legend row is named Remove comparison.
Delete via from the rows your feed's search returns. A row names the venue its market lists on in exchange and where its data comes from in dataSource, and its source cell shows the venue, or the data source for a row with no venue, each with the host's mark from venueMark or dataSourceMark.
A layoutSync list that names interval is a setup error from createChart; name timeframe.
Saved state is read under the 2.0 names alone. What 1.x saved under these names opens at its default:
- a saved layout's timeframe sync switch, saved as
sync.interval: the valuelayout.syncgives it, else off; - each drawing toolbar group's remembered tool, stored as
railToolsin the drawing preference recordquickcharts.drawingPrefs.v1: the group's first tool; - the replay update timeframe, stored under
quickcharts.replayIv.v1:preferences.replayTimeframe, elseauto.
Hosts that keep templates by kind file them under indicator: the chart asks templates('indicator'), and the REST adapter asks /templates/indicator.
A RecentsPort of yours that stores rows stores dataSource, the field the source cell reads.