@@ -9280,6 +9280,7 @@ var CandleTooltipView = /** @class */ (function (_super) {
92809280 var current = data.current;
92819281 var prevClose = (_b = (_a = data.prev) === null || _a === void 0 ? void 0 : _a.close) !== null && _b !== void 0 ? _b : current.close;
92829282 var changeValue = current.close - prevClose;
9283+ var amplitude = (current.high - current.low) / current.high * 100;
92839284 var pricePrecision = precision.price, volumePrecision = precision.volume;
92849285 var mapping = {
92859286 '{time}': customApi.formatDate(dateTimeFormat, current.timestamp, 'YYYY-MM-DD HH:mm', exports.FormatDateType.Tooltip),
@@ -9288,17 +9289,18 @@ var CandleTooltipView = /** @class */ (function (_super) {
92889289 '{low}': formatThousands(formatPrecision(current.low, pricePrecision), thousandsSeparator),
92899290 '{close}': formatThousands(formatPrecision(current.close, pricePrecision), thousandsSeparator),
92909291 '{volume}': formatThousands(customApi.formatBigNumber(formatPrecision((_c = current.volume) !== null && _c !== void 0 ? _c : tooltipStyles.defaultValue, volumePrecision)), thousandsSeparator),
9291- '{change}': prevClose === 0 ? tooltipStyles.defaultValue : "".concat(formatPrecision(changeValue / prevClose * 100), "%")
9292+ '{change}': prevClose === 0 ? tooltipStyles.defaultValue : "".concat(formatPrecision(changeValue / prevClose * 100), "%"),
9293+ '{amplitude}': "".concat(formatPrecision(amplitude), "%")
92929294 };
92939295 var labelValues = (_e = (isFunction(tooltipStyles.custom)
92949296 ? (_d = tooltipStyles.custom) === null || _d === void 0 ? void 0 : _d.call(tooltipStyles, data, styles)
92959297 : tooltipStyles.custom)) !== null && _e !== void 0 ? _e : [
9296- { title: 'time ', value: '{time}' },
9297- { title: 'open ', value: '{open}' },
9298- { title: 'high ', value: '{high}' },
9299- { title: 'low ', value: '{low}' },
9300- { title: 'close ', value: '{close}' },
9301- { title: 'volume ', value: '{volume}' }
9298+ { title: 'T ', value: '{time}' },
9299+ { title: 'O ', value: '{open}' },
9300+ { title: 'H ', value: '{high}' },
9301+ { title: 'L ', value: '{low}' },
9302+ { title: 'C ', value: '{close}' },
9303+ { title: 'V ', value: '{volume}' }
93029304 ];
93039305 return labelValues.map(function (_a) {
93049306 var _b;
0 commit comments