From 24628a567253319ff68d07328291ad2be90c57f9 Mon Sep 17 00:00:00 2001 From: vee <897831508@qq.com> Date: Mon, 19 Sep 2022 09:50:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/kline/kline.vue | 3 ++- components/kline/tradingView/chartConfig.js | 3 ++- static/charting_library/datafeed-api.d.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/kline/kline.vue b/components/kline/kline.vue index 2c6fcd1..5be4469 100644 --- a/components/kline/kline.vue +++ b/components/kline/kline.vue @@ -136,7 +136,8 @@ // 给chartConfig添加展示周期 chartConfig.interval = index_activeCycle // 给chartConfig添加展示产品 - chartConfig.symbol = this.symbol + chartConfig.symbol = this.symbol + chartConfig.resolutions=[1]; //设置图表宽高 chartConfig.width = this.chartWidth chartConfig.height = this.chartHeight diff --git a/components/kline/tradingView/chartConfig.js b/components/kline/tradingView/chartConfig.js index e29ad8b..fc5f92f 100644 --- a/components/kline/tradingView/chartConfig.js +++ b/components/kline/tradingView/chartConfig.js @@ -9,7 +9,8 @@ var chartConfig = { supports_group_request: false, supported_resolutions: ['1', '5', '15', '30', '60', '1D', '1W', '1M'], supports_marks: true, - supports_timescale_marks: true, + supports_timescale_marks: true, + resolutions:['1', '5', '15', '30', '60', '1D', '1W', '1M'], // debug: true, width: 0, //宽度 height: 0, //高度 diff --git a/static/charting_library/datafeed-api.d.ts b/static/charting_library/datafeed-api.d.ts index fff1d33..b72e343 100644 --- a/static/charting_library/datafeed-api.d.ts +++ b/static/charting_library/datafeed-api.d.ts @@ -50,7 +50,7 @@ export interface DOMLevel { } export interface DatafeedConfiguration { exchanges?: Exchange[]; - supported_resolutions?: ResolutionString[]; + supported_resolutions?: ResolutionString[1]; units?: Record; currency_codes?: string[]; supports_marks?: boolean;