hqchart 1.1.12565 → 1.1.12570
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/umychart.NetworkFilterTest.vue.js +2 -2
- package/lib/umychart.vue.js +5 -5
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +13 -1
- package/src/jscommon/umychart.complier.js +1 -0
- package/src/jscommon/umychart.js +5 -4
- package/src/jscommon/umychart.testdata.js +13 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +7 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +13 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +7 -5
package/lib/umychart.vue.js
CHANGED
|
@@ -2541,8 +2541,8 @@ this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(x));this.Canvas.lin
|
|
|
2541
2541
|
this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(x));this.Canvas.lineTo(right,ToFixedPoint(x));this.Canvas.stroke();this.Canvas.setLineDash([]);}else//实线
|
|
2542
2542
|
{this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(x));this.Canvas.lineTo(right,ToFixedPoint(x));this.Canvas.stroke();}}if(this.VerticalInfo[i].Message[0]!=null){if(this.VerticalInfo[i].Font!=null)this.Canvas.font=this.VerticalInfo[i].Font;this.Canvas.fillStyle=this.VerticalInfo[i].TextColor;var testWidth=this.Canvas.measureText(this.VerticalInfo[i].Message[0]).width;if(x<testWidth/2){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";}else{this.Canvas.textAlign="center";this.Canvas.textBaseline="top";}var xText=left,yText=x;this.Canvas.save();this.Canvas.translate(xText,yText);this.Canvas.rotate(90*Math.PI/180);this.Canvas.fillText(this.VerticalInfo[i].Message[0],0,this.XBottomOffset);this.Canvas.restore();}xPrev=x;}};//Y坐标转y轴数值
|
|
2543
2543
|
this.GetYData=function(x,isLimit){var border=this.ChartBorder.GetHScreenBorder();if(isLimit===false){var width=border.RightEx-border.LeftEx;return(x-border.LeftEx)/width*(this.HorizontalMax-this.HorizontalMin)+this.HorizontalMin;}else{if(x<border.LeftEx)return this.HorizontalMin;if(x>border.RightEx)return this.HorizontalMax;var width=border.RightEx-border.LeftEx;return(x-border.LeftEx)/width*(this.HorizontalMax-this.HorizontalMin)+this.HorizontalMin;}};//X坐标转x轴数值
|
|
2544
|
-
this.GetXData=function(y,isLimit){var border=this.ChartBorder.GetHScreenBorder();var left=border.TopEx+g_JSChartResource.FrameLeftMargin;var right=border.BottomEx;var distanceWidth=this.DistanceWidth;var dataWidth=this.DataWidth;if(isLimit==false){if(y<left){var index=-1;var xPoint=left-(distanceWidth/2+dataWidth+distanceWidth);while(index>-
|
|
2545
|
-
{if(xPoint>=y)break;xPoint+=dataWidth+distanceWidth;++index;}return index;}}else{if(y<=border.TopEx)return 0;if(y>=border.BottomEx)return this.XPointCount-1;var index=0;var xPoint=left+distanceWidth/2+dataWidth+distanceWidth;while(xPoint<right&&index<
|
|
2544
|
+
this.GetXData=function(y,isLimit){var border=this.ChartBorder.GetHScreenBorder();var left=border.TopEx+g_JSChartResource.FrameLeftMargin;var right=border.BottomEx;var distanceWidth=this.DistanceWidth;var dataWidth=this.DataWidth;var maxDataCount=10000*50;if(isLimit==false){if(y<left){var index=-1;var xPoint=left-(distanceWidth/2+dataWidth+distanceWidth);while(index>-maxDataCount){if(xPoint<=y)break;xPoint-=dataWidth+distanceWidth;--index;}return index;}else{var index=0;var xPoint=left+distanceWidth/2+dataWidth+distanceWidth;while(index<maxDataCount)//自己算x的数值
|
|
2545
|
+
{if(xPoint>=y)break;xPoint+=dataWidth+distanceWidth;++index;}return index;}}else{if(y<=border.TopEx)return 0;if(y>=border.BottomEx)return this.XPointCount-1;var index=0;var xPoint=left+distanceWidth/2+dataWidth+distanceWidth;while(xPoint<right&&index<maxDataCount&&index+1<this.XPointCount)//自己算x的数值
|
|
2546
2546
|
{if(xPoint>y)break;xPoint+=dataWidth+distanceWidth;++index;}return index;}//return (y-this.ChartBorder.GetTop())*(this.XPointCount*1.0/this.ChartBorder.GetHeight());
|
|
2547
2547
|
};this.DrawBottons=function(){};//计算数据宽度
|
|
2548
2548
|
/*
|
|
@@ -7131,7 +7131,7 @@ if(IFrameSplitOperator.IsBool(item.IsShowToolbar))frame.IsShowToolbar=item.IsSho
|
|
|
7131
7131
|
}overlayFrame.Frame=frame;if(apiItem){var apiIndex=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,obj,true);apiIndex.OverlayIndex={IsOverlay:true,Identify:overlayFrame.Identify,WindowIndex:windowIndex,Frame:overlayFrame};//叠加指标信息
|
|
7132
7132
|
overlayFrame.Script=apiIndex;}else if(indexInfo){var args=indexInfo.Args;if(obj.Args)args=obj.Args;//外部可以设置参数
|
|
7133
7133
|
var indexData={Name:indexInfo.Name,Script:indexInfo.Script,Args:args,ID:indexName,//扩展属性 可以是空
|
|
7134
|
-
KLineType:indexInfo.KLineType,YSpecificMaxMin:indexInfo.YSpecificMaxMin,YSplitScale:indexInfo.YSplitScale,FloatPrecision:indexInfo.FloatPrecision,Condition:indexInfo.Condition,OutName:indexInfo.OutName};if(IFrameSplitOperator.IsNumber(obj.FloatPrecision))indexData.FloatPrecision=obj.FloatPrecision;var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData);//脚本执行
|
|
7134
|
+
KLineType:indexInfo.KLineType,YSpecificMaxMin:indexInfo.YSpecificMaxMin,YSplitScale:indexInfo.YSplitScale,FloatPrecision:indexInfo.FloatPrecision,Condition:indexInfo.Condition,OutName:indexInfo.OutName};if(IFrameSplitOperator.IsNumber(obj.FloatPrecision))indexData.FloatPrecision=obj.FloatPrecision;if(IFrameSplitOperator.IsNumber(obj.StringFormat))indexData.StringFormat=obj.StringFormat;var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData);//脚本执行
|
|
7135
7135
|
scriptIndex.OverlayIndex={IsOverlay:true,Identify:overlayFrame.Identify,WindowIndex:windowIndex,Frame:overlayFrame};//叠加指标信息
|
|
7136
7136
|
overlayFrame.Script=scriptIndex;}else{var scriptIndex=indexCustom.Create();scriptIndex.OverlayIndex={IsOverlay:true,Identify:overlayFrame.Identify,WindowIndex:windowIndex,Frame:overlayFrame};//叠加指标信息
|
|
7137
7137
|
scriptIndex.Create(this,windowIndex);overlayFrame.Script=scriptIndex;}subFrame.OverlayIndex.push(overlayFrame);return overlayFrame;};this.DeleteOverlayWindowsIndex=function(identify)//删除叠加指标
|
|
@@ -11415,7 +11415,7 @@ if(IFrameSplitOperator.IsNumber(this.YSplitType))this.OverlayIndex.Frame.Frame.Y
|
|
|
11415
11415
|
var titleInfo={Data:[],Title:this.Name,Frame:this.OverlayIndex.Frame.Frame,Script:this};var indexParam='';for(var i in this.Arguments){var _item34=this.Arguments[i];if(indexParam.length>0)indexParam+=',';indexParam+=_item34.Value.toString();}if(indexParam.length>0)titleInfo.Title=this.Name+'('+indexParam+')';var titleIndex=windowIndex+1;var titlePaint=hqChart.TitlePaint[titleIndex];titlePaint.OverlayIndex.set(this.OverlayIndex.Identify,titleInfo);this.OverlayIndex.Frame.Frame.Title=titleInfo.Title;//给子框架设置标题
|
|
11416
11416
|
if(this.OutName&&this.OutName.length>0&&this.Arguments&&this.Arguments.length>0){titlePaint.SetDynamicTitle(this.OutName,this.Arguments,this.OverlayIndex.Identify);}for(var i=0;i<this.OutVar.length;++i){var _item35=this.OutVar[i];if(_item35.IsExData===true)continue;//扩展数据不显示图形
|
|
11417
11417
|
if(_item35.Type==0){this.CreateLine(hqChart,windowIndex,_item35,i,_item35.Type);}else if(_item35.Type==1){switch(_item35.Draw.DrawType){case'STICKLINE':this.CreateBar(hqChart,windowIndex,_item35,i);break;case'DRAWTEXT':this.CreateDrawTextV2(hqChart,windowIndex,_item35,i);break;case'SUPERDRAWTEXT':this.CreateText(hqChart,windowIndex,_item35,i);break;case'DRAWLINE':this.CreateStraightLine(hqChart,windowIndex,_item35,i);break;case'DRAWBAND':this.CreateBand(hqChart,windowIndex,_item35,i);break;case'DRAWKLINE':this.CreateKLine(hqChart,windowIndex,_item35,i);break;case'DRAWKLINE_IF':this.CreateKLine(hqChart,windowIndex,_item35,i);break;case'POLYLINE':this.CreatePolyLine(hqChart,windowIndex,_item35,i);break;case'DRAWNUMBER':case"DRAWNUMBER_FIX":case'DRAWTEXT_FIX':this.CreateNumberText(hqChart,windowIndex,_item35,i);break;case'DRAWICON':this.CreateIcon(hqChart,windowIndex,_item35,i);break;case'DRAWCHANNEL':this.CreateChannel(hqChart,windowIndex,_item35,i);break;case'DRAWTEXT_LINE':this.CreateTextLine(hqChart,windowIndex,_item35,i);break;case"VERTLINE":this.CreateChartVericaltLine(hqChart,windowIndex,_item35,i);break;case"HORLINE":this.CreateChartHorizontalLine(hqChart,windowIndex,_item35,i);break;case'MULTI_LINE':this.CreateMultiLine(hqChart,windowIndex,_item35,i);break;case"MULTI_POINT":this.CreateMultiPoint(hqChart,windowIndex,_item35,i);break;case'MULTI_BAR':this.CreateMultiBar(hqChart,windowIndex,_item35,i);break;case'MULTI_TEXT':this.CreateMultiText(hqChart,windowIndex,_item35,i);break;case'MULTI_SVGICON':this.CreateMultiSVGIcon(hqChart,windowIndex,_item35,i);break;case"DRAWSVG":this.CreateChartDrawSVG(hqChart,windowIndex,_item35,i);break;case"MULTI_HTMLDOM":this.CreateMulitHtmlDom(hqChart,windowIndex,_item35,i);break;case"KLINE_BG":this.CreateBackgroud(hqChart,windowIndex,_item35,i);break;case'PARTLINE':this.CreatePartLine(hqChart,windowIndex,_item35,i);break;case"DRAWTEXTABS":case"DRAWTEXTREL":this.CreateDrawText(hqChart,windowIndex,_item35,i);break;case SCRIPT_CHART_NAME.OVERLAY_BARS:this.CreateStackedBar(hqChart,windowIndex,_item35,i);break;default:{var find=g_ScriptIndexChartFactory.Get(_item35.Draw.DrawType);//外部挂接
|
|
11418
|
-
if(find&&find.CreateChartCallback)find.CreateChartCallback(hqChart,windowIndex,_item35,i,this);}break;}}else if(_item35.Type==2){this.CreateMACD(hqChart,windowIndex,_item35,i);}else if(_item35.Type==3){this.CreatePointDot(hqChart,windowIndex,_item35,i,hisData);}else if(_item35.Type==4){this.CreateLineStick(hqChart,windowIndex,_item35,i);}else if(_item35.Type==5){this.CreateStick(hqChart,windowIndex,_item35,i);}else if(_item35.Type==6){this.CreateVolStick(hqChart,windowIndex,_item35,i,hisData);}else if(_item35.Type==7){this.CreateLine(hqChart,windowIndex,_item35,i,_item35.Type);}else if(_item35.Type==8){this.CreateLine(hqChart,windowIndex,_item35,i,_item35.Type);}var titleData=titleInfo.Data[i];if(titleData){if(this.FloatPrecision>=0)titleData.FloatPrecision=this.FloatPrecision;}}/*
|
|
11418
|
+
if(find&&find.CreateChartCallback)find.CreateChartCallback(hqChart,windowIndex,_item35,i,this);}break;}}else if(_item35.Type==2){this.CreateMACD(hqChart,windowIndex,_item35,i);}else if(_item35.Type==3){this.CreatePointDot(hqChart,windowIndex,_item35,i,hisData);}else if(_item35.Type==4){this.CreateLineStick(hqChart,windowIndex,_item35,i);}else if(_item35.Type==5){this.CreateStick(hqChart,windowIndex,_item35,i);}else if(_item35.Type==6){this.CreateVolStick(hqChart,windowIndex,_item35,i,hisData);}else if(_item35.Type==7){this.CreateLine(hqChart,windowIndex,_item35,i,_item35.Type);}else if(_item35.Type==8){this.CreateLine(hqChart,windowIndex,_item35,i,_item35.Type);}var titleData=titleInfo.Data[i];if(titleData){if(this.FloatPrecision>=0)titleData.FloatPrecision=this.FloatPrecision;if(IFrameSplitOperator.IsNumber(this.StringFormat))titleData.StringFormat=this.StringFormat;}}/*
|
|
11419
11419
|
hqChart.TitlePaint[titleIndex].Title=this.Name;
|
|
11420
11420
|
|
|
11421
11421
|
let indexParam='';
|
|
@@ -12657,7 +12657,7 @@ function HQChartScriptWorker(){this.Create=function(){var _this60=this;addEventL
|
|
|
12657
12657
|
hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,Stock:{Symbol:message.Symbol},Request:{MaxDataCount:500,MaxMinuteDayCount:5},Period:message.Period,Right:message.Right,Data:hisData};if(IFrameSplitOperator.IsNumber(message.HQDataType))stockObj.HQDataType=message.HQDataType;indexConsole.ExecuteScript(stockObj);};this.OnRecvMessage=function(message){var data=message.data;if(!data)return;if(data.ID==JSCHART_WORKER_MESSAGE_ID.EXECUTE_SCRIPT){if(!IFrameSplitOperator.IsNonEmptyArray(data.AryIndex))return;for(var i=0;i<data.AryIndex.length;++i){var item=data.AryIndex[i];this.ExecuteScript(item,data);}}};this.OnExecuteFinish=function(data,indexInfo,jsExectute){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT};postMessage(message);};this.OnExecuteError=function(error,indexInfo){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
|
|
12658
12658
|
* 版本信息输出
|
|
12659
12659
|
*
|
|
12660
|
-
*/var HQCHART_VERSION="1.1.
|
|
12660
|
+
*/var HQCHART_VERSION="1.1.12569";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
12661
12661
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
12662
12662
|
// BaseIndex:BaseIndex,
|
|
12663
12663
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -48784,7 +48784,19 @@ HQData.RequestMinuteRealtimeData=function(data,callback)
|
|
|
48784
48784
|
|
|
48785
48785
|
console.log(`[HQData::RequestMinuteRealtimeData] Symbol=${symbol}`);
|
|
48786
48786
|
|
|
48787
|
-
var hqchartData=KLINE_1MINUTE_DATA;
|
|
48787
|
+
var hqchartData=JSON.parse(JSON.stringify(KLINE_1MINUTE_DATA));
|
|
48788
|
+
|
|
48789
|
+
var kItem=hqchartData.data[0];
|
|
48790
|
+
var price=kItem[5];
|
|
48791
|
+
var value=Math.ceil(Math.random()*10)/1000*price;
|
|
48792
|
+
var bUp=Math.ceil(Math.random()*10)>=5;
|
|
48793
|
+
|
|
48794
|
+
if (bUp) price+=value;
|
|
48795
|
+
else price-=value;
|
|
48796
|
+
kItem[5]=price;
|
|
48797
|
+
kItem[3]=Math.max(price, kItem[3]);
|
|
48798
|
+
kItem[4]=Math.min(price, kItem[4]);
|
|
48799
|
+
|
|
48788
48800
|
hqchartData.name=symbol;
|
|
48789
48801
|
hqchartData.symbol=symbol;
|
|
48790
48802
|
callback(hqchartData);
|
|
@@ -21336,6 +21336,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
21336
21336
|
if (titleData)
|
|
21337
21337
|
{
|
|
21338
21338
|
if (this.FloatPrecision>=0) titleData.FloatPrecision=this.FloatPrecision;
|
|
21339
|
+
if (IFrameSplitOperator.IsNumber(this.StringFormat)) titleData.StringFormat=this.StringFormat;
|
|
21339
21340
|
}
|
|
21340
21341
|
}
|
|
21341
21342
|
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -15410,14 +15410,14 @@ function KLineHScreenFrame()
|
|
|
15410
15410
|
var right=border.BottomEx;
|
|
15411
15411
|
var distanceWidth=this.DistanceWidth;
|
|
15412
15412
|
var dataWidth=this.DataWidth;
|
|
15413
|
-
|
|
15413
|
+
var maxDataCount=10000*50;
|
|
15414
15414
|
if (isLimit==false)
|
|
15415
15415
|
{
|
|
15416
15416
|
if (y<left)
|
|
15417
15417
|
{
|
|
15418
15418
|
var index=-1;
|
|
15419
15419
|
var xPoint=left-(distanceWidth/2+dataWidth+distanceWidth);
|
|
15420
|
-
while(index>-
|
|
15420
|
+
while(index>-maxDataCount)
|
|
15421
15421
|
{
|
|
15422
15422
|
if (xPoint<=y)
|
|
15423
15423
|
break;
|
|
@@ -15431,7 +15431,7 @@ function KLineHScreenFrame()
|
|
|
15431
15431
|
{
|
|
15432
15432
|
var index=0;
|
|
15433
15433
|
var xPoint=left+distanceWidth/2+dataWidth+distanceWidth;
|
|
15434
|
-
while(index<
|
|
15434
|
+
while(index<maxDataCount) //自己算x的数值
|
|
15435
15435
|
{
|
|
15436
15436
|
if (xPoint>=y) break;
|
|
15437
15437
|
xPoint+=(dataWidth+distanceWidth);
|
|
@@ -15448,7 +15448,7 @@ function KLineHScreenFrame()
|
|
|
15448
15448
|
|
|
15449
15449
|
var index=0;
|
|
15450
15450
|
var xPoint=left+distanceWidth/2+ dataWidth+distanceWidth;
|
|
15451
|
-
while(xPoint<right && index<
|
|
15451
|
+
while(xPoint<right && index<maxDataCount && index+1<this.XPointCount) //自己算x的数值
|
|
15452
15452
|
{
|
|
15453
15453
|
if (xPoint>y) break;
|
|
15454
15454
|
xPoint+=(dataWidth+distanceWidth);
|
|
@@ -67899,6 +67899,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67899
67899
|
};
|
|
67900
67900
|
|
|
67901
67901
|
if (IFrameSplitOperator.IsNumber(obj.FloatPrecision)) indexData.FloatPrecision=obj.FloatPrecision;
|
|
67902
|
+
if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexData.StringFormat=obj.StringFormat;
|
|
67902
67903
|
|
|
67903
67904
|
var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData); //脚本执行
|
|
67904
67905
|
scriptIndex.OverlayIndex={ IsOverlay:true, Identify:overlayFrame.Identify, WindowIndex:windowIndex, Frame:overlayFrame }; //叠加指标信息
|
|
@@ -131,7 +131,19 @@ HQData.RequestMinuteRealtimeData=function(data,callback)
|
|
|
131
131
|
|
|
132
132
|
console.log(`[HQData::RequestMinuteRealtimeData] Symbol=${symbol}`);
|
|
133
133
|
|
|
134
|
-
var hqchartData=KLINE_1MINUTE_DATA;
|
|
134
|
+
var hqchartData=JSON.parse(JSON.stringify(KLINE_1MINUTE_DATA));
|
|
135
|
+
|
|
136
|
+
var kItem=hqchartData.data[0];
|
|
137
|
+
var price=kItem[5];
|
|
138
|
+
var value=Math.ceil(Math.random()*10)/1000*price;
|
|
139
|
+
var bUp=Math.ceil(Math.random()*10)>=5;
|
|
140
|
+
|
|
141
|
+
if (bUp) price+=value;
|
|
142
|
+
else price-=value;
|
|
143
|
+
kItem[5]=price;
|
|
144
|
+
kItem[3]=Math.max(price, kItem[3]);
|
|
145
|
+
kItem[4]=Math.min(price, kItem[4]);
|
|
146
|
+
|
|
135
147
|
hqchartData.name=symbol;
|
|
136
148
|
hqchartData.symbol=symbol;
|
|
137
149
|
callback(hqchartData);
|
|
@@ -19490,14 +19490,14 @@ function KLineHScreenFrame()
|
|
|
19490
19490
|
var right=border.BottomEx;
|
|
19491
19491
|
var distanceWidth=this.DistanceWidth;
|
|
19492
19492
|
var dataWidth=this.DataWidth;
|
|
19493
|
-
|
|
19493
|
+
var maxDataCount=10000*50;
|
|
19494
19494
|
if (isLimit==false)
|
|
19495
19495
|
{
|
|
19496
19496
|
if (y<left)
|
|
19497
19497
|
{
|
|
19498
19498
|
var index=-1;
|
|
19499
19499
|
var xPoint=left-(distanceWidth/2+dataWidth+distanceWidth);
|
|
19500
|
-
while(index>-
|
|
19500
|
+
while(index>-maxDataCount)
|
|
19501
19501
|
{
|
|
19502
19502
|
if (xPoint<=y)
|
|
19503
19503
|
break;
|
|
@@ -19511,7 +19511,7 @@ function KLineHScreenFrame()
|
|
|
19511
19511
|
{
|
|
19512
19512
|
var index=0;
|
|
19513
19513
|
var xPoint=left+distanceWidth/2+dataWidth+distanceWidth;
|
|
19514
|
-
while(index<
|
|
19514
|
+
while(index<maxDataCount) //自己算x的数值
|
|
19515
19515
|
{
|
|
19516
19516
|
if (xPoint>=y) break;
|
|
19517
19517
|
xPoint+=(dataWidth+distanceWidth);
|
|
@@ -19528,7 +19528,7 @@ function KLineHScreenFrame()
|
|
|
19528
19528
|
|
|
19529
19529
|
var index=0;
|
|
19530
19530
|
var xPoint=left+distanceWidth/2+ dataWidth+distanceWidth;
|
|
19531
|
-
while(xPoint<right && index<
|
|
19531
|
+
while(xPoint<right && index<maxDataCount && index+1<this.XPointCount) //自己算x的数值
|
|
19532
19532
|
{
|
|
19533
19533
|
if (xPoint>y) break;
|
|
19534
19534
|
xPoint+=(dataWidth+distanceWidth);
|
|
@@ -71979,6 +71979,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71979
71979
|
};
|
|
71980
71980
|
|
|
71981
71981
|
if (IFrameSplitOperator.IsNumber(obj.FloatPrecision)) indexData.FloatPrecision=obj.FloatPrecision;
|
|
71982
|
+
if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexData.StringFormat=obj.StringFormat;
|
|
71982
71983
|
|
|
71983
71984
|
var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData); //脚本执行
|
|
71984
71985
|
scriptIndex.OverlayIndex={ IsOverlay:true, Identify:overlayFrame.Identify, WindowIndex:windowIndex, Frame:overlayFrame }; //叠加指标信息
|
|
@@ -115036,6 +115037,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
115036
115037
|
if (titleData)
|
|
115037
115038
|
{
|
|
115038
115039
|
if (this.FloatPrecision>=0) titleData.FloatPrecision=this.FloatPrecision;
|
|
115040
|
+
if (IFrameSplitOperator.IsNumber(this.StringFormat)) titleData.StringFormat=this.StringFormat;
|
|
115039
115041
|
}
|
|
115040
115042
|
}
|
|
115041
115043
|
|
|
@@ -129449,7 +129451,7 @@ function ScrollBarBGChart()
|
|
|
129449
129451
|
|
|
129450
129452
|
|
|
129451
129453
|
|
|
129452
|
-
var HQCHART_VERSION="1.1.
|
|
129454
|
+
var HQCHART_VERSION="1.1.12569";
|
|
129453
129455
|
|
|
129454
129456
|
function PrintHQChartVersion()
|
|
129455
129457
|
{
|
|
@@ -48784,7 +48784,19 @@ HQData.RequestMinuteRealtimeData=function(data,callback)
|
|
|
48784
48784
|
|
|
48785
48785
|
console.log(`[HQData::RequestMinuteRealtimeData] Symbol=${symbol}`);
|
|
48786
48786
|
|
|
48787
|
-
var hqchartData=KLINE_1MINUTE_DATA;
|
|
48787
|
+
var hqchartData=JSON.parse(JSON.stringify(KLINE_1MINUTE_DATA));
|
|
48788
|
+
|
|
48789
|
+
var kItem=hqchartData.data[0];
|
|
48790
|
+
var price=kItem[5];
|
|
48791
|
+
var value=Math.ceil(Math.random()*10)/1000*price;
|
|
48792
|
+
var bUp=Math.ceil(Math.random()*10)>=5;
|
|
48793
|
+
|
|
48794
|
+
if (bUp) price+=value;
|
|
48795
|
+
else price-=value;
|
|
48796
|
+
kItem[5]=price;
|
|
48797
|
+
kItem[3]=Math.max(price, kItem[3]);
|
|
48798
|
+
kItem[4]=Math.min(price, kItem[4]);
|
|
48799
|
+
|
|
48788
48800
|
hqchartData.name=symbol;
|
|
48789
48801
|
hqchartData.symbol=symbol;
|
|
48790
48802
|
callback(hqchartData);
|
|
@@ -19534,14 +19534,14 @@ function KLineHScreenFrame()
|
|
|
19534
19534
|
var right=border.BottomEx;
|
|
19535
19535
|
var distanceWidth=this.DistanceWidth;
|
|
19536
19536
|
var dataWidth=this.DataWidth;
|
|
19537
|
-
|
|
19537
|
+
var maxDataCount=10000*50;
|
|
19538
19538
|
if (isLimit==false)
|
|
19539
19539
|
{
|
|
19540
19540
|
if (y<left)
|
|
19541
19541
|
{
|
|
19542
19542
|
var index=-1;
|
|
19543
19543
|
var xPoint=left-(distanceWidth/2+dataWidth+distanceWidth);
|
|
19544
|
-
while(index>-
|
|
19544
|
+
while(index>-maxDataCount)
|
|
19545
19545
|
{
|
|
19546
19546
|
if (xPoint<=y)
|
|
19547
19547
|
break;
|
|
@@ -19555,7 +19555,7 @@ function KLineHScreenFrame()
|
|
|
19555
19555
|
{
|
|
19556
19556
|
var index=0;
|
|
19557
19557
|
var xPoint=left+distanceWidth/2+dataWidth+distanceWidth;
|
|
19558
|
-
while(index<
|
|
19558
|
+
while(index<maxDataCount) //自己算x的数值
|
|
19559
19559
|
{
|
|
19560
19560
|
if (xPoint>=y) break;
|
|
19561
19561
|
xPoint+=(dataWidth+distanceWidth);
|
|
@@ -19572,7 +19572,7 @@ function KLineHScreenFrame()
|
|
|
19572
19572
|
|
|
19573
19573
|
var index=0;
|
|
19574
19574
|
var xPoint=left+distanceWidth/2+ dataWidth+distanceWidth;
|
|
19575
|
-
while(xPoint<right && index<
|
|
19575
|
+
while(xPoint<right && index<maxDataCount && index+1<this.XPointCount) //自己算x的数值
|
|
19576
19576
|
{
|
|
19577
19577
|
if (xPoint>y) break;
|
|
19578
19578
|
xPoint+=(dataWidth+distanceWidth);
|
|
@@ -72023,6 +72023,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72023
72023
|
};
|
|
72024
72024
|
|
|
72025
72025
|
if (IFrameSplitOperator.IsNumber(obj.FloatPrecision)) indexData.FloatPrecision=obj.FloatPrecision;
|
|
72026
|
+
if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexData.StringFormat=obj.StringFormat;
|
|
72026
72027
|
|
|
72027
72028
|
var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData); //脚本执行
|
|
72028
72029
|
scriptIndex.OverlayIndex={ IsOverlay:true, Identify:overlayFrame.Identify, WindowIndex:windowIndex, Frame:overlayFrame }; //叠加指标信息
|
|
@@ -115080,6 +115081,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
115080
115081
|
if (titleData)
|
|
115081
115082
|
{
|
|
115082
115083
|
if (this.FloatPrecision>=0) titleData.FloatPrecision=this.FloatPrecision;
|
|
115084
|
+
if (IFrameSplitOperator.IsNumber(this.StringFormat)) titleData.StringFormat=this.StringFormat;
|
|
115083
115085
|
}
|
|
115084
115086
|
}
|
|
115085
115087
|
|
|
@@ -129602,7 +129604,7 @@ function HQChartScriptWorker()
|
|
|
129602
129604
|
|
|
129603
129605
|
|
|
129604
129606
|
|
|
129605
|
-
var HQCHART_VERSION="1.1.
|
|
129607
|
+
var HQCHART_VERSION="1.1.12569";
|
|
129606
129608
|
|
|
129607
129609
|
function PrintHQChartVersion()
|
|
129608
129610
|
{
|