Fetch the repository succeeded.
This action will force synchronization from jones2000/HQChart, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
<template>
<div id="app2">
<div id="minute" ref="minute" ></div>
</div>
</template>
<script>
import HQChart from 'hqchart'
function DefaultData(){}
DefaultData.GetMinuteOption=function()
{
var option=
{
Type:'分钟走势图', //创建图形类型
Windows: //窗口指标
[
],
IsAutoUpdate:true, //是自动更新数据
DayCount:1, //1 最新交易日数据 >1 多日走势图
IsShowCorssCursorInfo:true, //是否显示十字光标的刻度信息
IsShowRightMenu:true, //是否显示右键菜单
CorssCursorTouchEnd:true,
MinuteLine:
{
//IsDrawAreaPrice:false, //是否画价格面积图
},
Border: //边框
{
Left:1, //左边间距
Right:1, //右边间距
Top:20,
Bottom:20
},
Frame: //子框架设置
[
{SplitCount:3,StringFormat:0},
{SplitCount:2,StringFormat:0},
{SplitCount:3,StringFormat:0},
],
ExtendChart: //扩展图形
[
//{Name:'MinuteTooltip' } //手机端tooltip
],
};
return option;
}
export default
{
data()
{
var data=
{
Symbol:'600000.sh',
Minute:
{
JSChart:null,
Option:DefaultData.GetMinuteOption(),
}
};
return data;
},
created()
{
},
mounted()
{
this.OnSize();
window.onresize = ()=> { this.OnSize(); }
this.CreateMinuteChart();
},
methods:
{
OnSize()
{
var chartHeight = window.innerHeight-30;
var chartWidth = window.innerWidth-30;
var minute=this.$refs.minute;
minute.style.width=chartWidth+'px';
minute.style.height=chartHeight+'px';
if (this.Minute.JSChart) this.Minute.JSChart.OnSize();
},
CreateMinuteChart() //创建日线图
{
if (this.Minute.JSChart) return;
this.Minute.Option.Symbol=this.Symbol;
let chart=HQChart.Chart.JSChart.Init(this.$refs.minute);
chart.SetOption(this.Minute.Option);
this.Minute.JSChart=chart;
},
}
}
<template>
<div id="app2">
<div id="kline" ref='kline'></div>
</div>
</template>
<script>
import HQChart from 'hqchart'
function DefaultData(){}
DefaultData.GetKLineOption = function ()
{
let data =
{
Type: '历史K线图',
Windows: //窗口指标
[
{Index:"MA",Modify: false, Change: false},
{Index:"VOL",Modify: false, Change: false}
],
IsShowCorssCursorInfo:true,
Border: //边框
{
Left: 1,
Right: 1, //右边间距
Top: 25,
Bottom: 25,
},
KLine:
{
Right:1, //复权 0 不复权 1 前复权 2 后复权
Period:0, //周期: 0 日线 1 周线 2 月线 3 年线
PageSize:70,
IsShowTooltip:true
},
};
return data;
}
export default
{
data()
{
var data=
{
Symbol:'600000.sh',
KLine:
{
JSChart:null,
Option:DefaultData.GetKLineOption(),
},
};
return data;
},
created()
{
},
mounted()
{
this.OnSize();
window.onresize = ()=> { this.OnSize(); }
this.CreateKLineChart();
},
methods:
{
OnSize()
{
var chartHeight = window.innerHeight-30;
var chartWidth = window.innerWidth-30;
var kline=this.$refs.kline;
kline.style.width=chartWidth+'px';
kline.style.height=chartHeight+'px';
if (this.KLine.JSChart) this.KLine.JSChart.OnSize();
},
CreateKLineChart() //创建K线图
{
if (this.KLine.JSChart) return;
this.KLine.Option.Symbol=this.Symbol;
let chart=HQChart.Chart.JSChart.Init(this.$refs.kline);
chart.SetOption(this.KLine.Option);
this.KLine.JSChart=chart;
},
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。