VERSION 1.14 @ 2019-04-04 08:32:01.655131

x axis retains previous scale after restoring layout #3828
getVisiblePriceRange() not working in 1.14 (unstable) #3774
uppercase_instrument_names doesn't work for compare/overlay #3746
API method to trigger the Zoom Out #3739
Provide event that study properties was changed #3736
Fixed security issue in master #3699
widget.save have old data #3623
JS error on switching chart types #3602
Add a way to prevent scrolling beyond the beginning of bars #3597
Chart customization - overrides #3572
Theme override colors from saved_data #3557
Error while applying Pivot Points Indicator #3521
Month timeframe combining months #3510
initialSettings from settings adapter does not work #3479
Add Indexed to 100 mode for price scale #3391
RTL #3335
Add warning about incorrect usage disable_resolution_rebuild and has_empty_bars #3329
Unable to load DOME and Bottom Widget when open_account_manager disabled #3312
Randomly clickable area on chart that redirects user to tradingview.com #3299
Apply to all #3298
Save container element while charting library's life #3297
Gap appearing in chart layout #3246
User's colors not working when theme is enabled #3232
Chart is outside of visible range when in auto scale and load study template or load chart #3229
Please make getVisibleRange return the range in UTC #3173
Remove TradingView.onready from API #3162
Add API to export data from the chart #3152
Market status is not updated properly #3122
Placeholders disappear in "Compare or Add Symbol" popup when the cursor is set into the fields #2966
getVisibleRange to return 0, any way of getting the last bar in active chart ? #2757
"onListAdded" event is not fired when user click on "Save Watchlist As" #2654
Error report : Parabolic SAR #2205
TERMINAL: make a flag to disable support of stop orders #2181
Add Change % in the OHLC label Charting Library #2120
Request more bars for indicators #1362
Drawing tool does not work on Samsung Edge and  Note 5 #984
This commit is contained in:
Jenkins
2019-04-04 11:32:07 +03:00
parent e38d004695
commit 9d8b63e068
142 changed files with 38224 additions and 2420 deletions

View File

@@ -1,7 +1,10 @@
import { getErrorMessage, logMessage, } from './helpers';
function extractField(data, field, arrayIndex) {
function extractField(data, field, arrayIndex, valueIsArray) {
var value = data[field];
return Array.isArray(value) ? value[arrayIndex] : value;
if (Array.isArray(value) && (!valueIsArray || Array.isArray(value[0]))) {
return value[arrayIndex];
}
return value;
}
var SymbolsStorage = /** @class */ (function () {
function SymbolsStorage(datafeedUrl, datafeedSupportedResolutions, requester) {
@@ -143,10 +146,10 @@ var SymbolsStorage = /** @class */ (function () {
type: extractField(data, 'type', symbolIndex),
session: extractField(data, 'session-regular', symbolIndex),
timezone: extractField(data, 'timezone', symbolIndex),
supported_resolutions: definedValueOrDefault(extractField(data, 'supported-resolutions', symbolIndex), this._datafeedSupportedResolutions),
supported_resolutions: definedValueOrDefault(extractField(data, 'supported-resolutions', symbolIndex, true), this._datafeedSupportedResolutions),
force_session_rebuild: extractField(data, 'force-session-rebuild', symbolIndex),
has_daily: definedValueOrDefault(extractField(data, 'has-daily', symbolIndex), true),
intraday_multipliers: definedValueOrDefault(extractField(data, 'intraday-multipliers', symbolIndex), ['1', '5', '15', '30', '60']),
intraday_multipliers: definedValueOrDefault(extractField(data, 'intraday-multipliers', symbolIndex, true), ['1', '5', '15', '30', '60']),
has_weekly_and_monthly: extractField(data, 'has-weekly-and-monthly', symbolIndex),
has_empty_bars: extractField(data, 'has-empty-bars', symbolIndex),
volume_precision: definedValueOrDefault(extractField(data, 'volume-precision', symbolIndex), 0),