hqchart 1.1.12536 → 1.1.12542

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.
@@ -5726,7 +5726,7 @@ this.Canvas.strokeStyle=this.PointColor;if(isMoveOn)this.Canvas.lineWidth=1*pixe
5726
5726
  {this.Canvas.beginPath();this.Canvas.arc(item.X,item.Y,this.PointRadius*pixel,0,360,false);this.Canvas.fill();//画实心圆
5727
5727
  this.Canvas.closePath();}}this.Canvas.restore();};//计算2个点线的,左右的延长线的点
5728
5728
  this.CalculateExtendLinePoint=function(ptStart,ptEnd){var result={};var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var top=this.Frame.ChartBorder.GetTopEx();var bottom=this.Frame.ChartBorder.GetBottom();var a=ptEnd.X-ptStart.X;var b=ptEnd.Y-ptStart.Y;if(a>0){var b2=bottom-ptStart.Y;var a2=a*b2/b;var pt=new Point();pt.X=ptStart.X+a2;pt.Y=bottom;result.End=pt;var b2=ptEnd.Y-top;var a2=a*b2/b;var pt2=new Point();pt2.Y=top;pt2.X=ptEnd.X-a2;result.Start=pt2;}else{var b2=bottom-ptStart.Y;var a2=Math.abs(a)*b2/b;var pt=new Point();pt.X=ptStart.X-a2;;pt.Y=bottom;result.End=pt;var b2=ptEnd.Y-top;var a2=Math.abs(a)*b2/b;var pt2=new Point();pt2.Y=top;pt2.X=ptEnd.X+a2;result.Start=pt2;}return result;};//计算2个点线的,点0->点1->延长线的点
5729
- this.CalculateExtendLineEndPoint=function(aryPoint){var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var bottom=this.Frame.ChartBorder.GetBottomEx();var top=this.Frame.ChartBorder.GetTopEx();var a=aryPoint[1].X-aryPoint[0].X;var b=aryPoint[1].Y-aryPoint[0].Y;if(a>0){var a1=right-aryPoint[0].X;var b1=a1*b/a;var y=b1+aryPoint[0].Y;if(y>=top&&y<=bottom){var pt=new Point();pt.X=right;pt.Y=y;return pt;}if(b>0){var b2=bottom-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=bottom;return pt2;}else{var b2=top-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=top;return pt2;}}else{var a1=aryPoint[0].X-left;var b1=a1*b/Math.abs(a);var y=b1+aryPoint[0].Y;if(y>=top&&y<=bottom){var pt=new Point();pt.X=left;pt.Y=y;return pt;}if(b>0){var b2=bottom-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=bottom;return pt2;}else{var b2=top-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=top;return pt2;}}};//坐标是否在点上 返回在第几个点上
5729
+ this.CalculateExtendLineEndPoint=function(aryPoint){var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var bottom=this.Frame.ChartBorder.GetBottomEx();var top=this.Frame.ChartBorder.GetTopEx();var a=aryPoint[1].X-aryPoint[0].X;var b=aryPoint[1].Y-aryPoint[0].Y;if(a>0){var a1=right-aryPoint[0].X;var b1=a1*b/a;var y=b1+aryPoint[0].Y;if(y>=top&&y<=bottom){var pt=new Point();pt.X=right;pt.Y=y;return pt;}if(b>0){var b2=bottom-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=bottom;return pt2;}else if(b==0){var pt2=new Point();pt2.X=right;pt2.Y=aryPoint[0].Y;return pt2;}else{var b2=top-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=top;return pt2;}}else{var a1=aryPoint[0].X-left;var b1=a1*b/Math.abs(a);var y=b1+aryPoint[0].Y;if(y>=top&&y<=bottom){var pt=new Point();pt.X=left;pt.Y=y;return pt;}if(b>0){var b2=bottom-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=bottom;return pt2;}else if(b==0){var pt2=new Point();pt2.X=left;pt2.Y=aryPoint[0].Y;return pt2;}else{var b2=top-aryPoint[0].Y;var a2=a*b2/b;var x=a2+aryPoint[0].X;var pt2=new Point();pt2.X=x;pt2.Y=top;return pt2;}}};//坐标是否在点上 返回在第几个点上
5730
5730
  this.IsPointInXYValue=function(x,y,option){if(!this.Frame)return-1;var data=this.Frame.Data;if(!data)return-1;if(!this.Value)return-1;var radius=5;if(option&&IFrameSplitOperator.IsNumber(option.Zoom))radius+=option.Zoom;else if(this.Option&&IFrameSplitOperator.IsNumber(this.Option.Zoom))radius+=this.Option.Zoom;var isHScreen=this.Frame.IsHScreen;radius*=GetDevicePixelRatio();for(var i=0;i<this.Value.length;++i)//是否在点上
5731
5731
  {var item=this.Value[i];var pt=new Point();if(isHScreen){pt.Y=this.Frame.GetXFromIndex(item.XValue-data.DataOffset);pt.X=this.Frame.GetYFromData(item.YValue);}else{pt.X=this.Frame.GetXFromIndex(item.XValue-data.DataOffset);pt.Y=this.Frame.GetYFromData(item.YValue);}this.Canvas.beginPath();this.Canvas.arc(pt.X,pt.Y,radius,0,360);if(this.Canvas.isPointInPath(x,y))return i;}return-1;};//坐标是否在线段上 返回在第几个线段上
5732
5732
  this.IsPointInLine=function(x,y,option){if(!this.LinePoint)return-1;var lineWidth=5;if(option&&IFrameSplitOperator.IsNumber(option.Zoom))lineWidth+=option.Zoom;else if(this.Option&&IFrameSplitOperator.IsNumber(this.Option.Zoom))lineWidth+=this.Option.Zoom;var pixel=GetDevicePixelRatio();lineWidth*=pixel;for(var i=0;i<this.LinePoint.length;++i){var item=this.LinePoint[i];var ptStart=item.Start;var ptEnd=item.End;this.Canvas.beginPath();if(ptStart.X==ptEnd.X)//竖线
@@ -6209,13 +6209,14 @@ if(this.ExtendLine.Right)xRight=this.Frame.ChartBorder.GetRight();if(this.Extend
6209
6209
  var clrArea=null;this.Canvas.font=this.Font;if(this.ExtendLine.Left)this.Canvas.textAlign="left";else this.Canvas.textAlign="right";this.Canvas.textBaseline="bottom";for(var i=0;i<aryArea.length;++i){var item=aryArea[i];var y=yBottom-height*item.Value;//var yValue=baseValue+diffValue*item.Value;
6210
6210
  yValue=this.Frame.GetYData(y,false);y=ToFixedPoint(y);if(this.EnableBGColor&&IFrameSplitOperator.IsNumber(yPre)){var rtBG={Left:xLeft,Right:xRight,Top:yPre,Bottom:y};rtBG.Width=rtBG.Right-rtBG.Left;rtBG.Height=rtBG.Bottom-rtBG.Top;this.Canvas.fillStyle=clrArea;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}this.Canvas.strokeStyle=item.Color;this.Canvas.beginPath();this.Canvas.moveTo(xLeft,y);this.Canvas.lineTo(xRight,y);this.Canvas.stroke();var line={Start:{X:xLeft,Y:y},End:{X:xRight,Y:y}};this.LinePoint.push(line);//文字
6211
6211
  var text=item.Value+' ('+yValue.toFixed(2)+')';this.Canvas.fillStyle=item.Color;if(this.ExtendLine.Left)this.Canvas.fillText(text,xLeft+2,y-2);else this.Canvas.fillText(text,xLeft-2,y-2);yPre=y;clrArea=IChartDrawPicture.ColorToRGBA(item.Color,this.AreaConfig.Opacity);}};}function ChartFibSpeedResistanceFan(){this.newMethod=IChartDrawPicture;//派生
6212
- this.newMethod();delete this.newMethod;this.ClassName='ChartFibSpeedResistanceFan';this.PointCount=2;this.Font=12*GetDevicePixelRatio()+"px 微软雅黑";this.IsPointIn=this.IsPointIn_XYValue_Line;this.GetXYCoordinate=this.GetXYCoordinate_default;this.PointToValue_Default=this.PointToValue;this.OnlyMoveXIndex=true;this.IsSupportMagnet=true;this.LineWidth=1;this.EnableBGColor=true;this.AreaConfig={AryYData:[{Value:0,Color:"rgb(128,128,128)",Enable:true},{Value:0.25,Color:"rgb(242,52,69)",Enable:true},{Value:0.382,Color:"rgb(255,152,0)",Enable:true},{Value:0.5,Color:"rgb(76,175,80)",Enable:true},{Value:0.618,Color:"rgb(8,153,129)",Enable:true},{Value:0.75,Color:"rgb(0,188,212)",Enable:true},{Value:1,Color:"rgb(120,123,134)",Enable:true}],AryXData:[{Value:0,Color:"rgb(128,128,128)",Enable:true},{Value:0.25,Color:"rgb(242,52,69)",Enable:true},{Value:0.382,Color:"rgb(255,152,0)",Enable:true},{Value:0.5,Color:"rgb(76,175,80)",Enable:true},{Value:0.618,Color:"rgb(8,153,129)",Enable:true},{Value:0.75,Color:"rgb(0,188,212)",Enable:true},{Value:1,Color:"rgb(120,123,134)",Enable:true}],Opacity:0.3};this.Draw=function(){this.LinePoint=[];if(this.IsFrameMinSize())return;var bCheckXY=false;var drawPoint=this.CalculateDrawPoint({IsCheckX:bCheckXY,IsCheckY:bCheckXY});if(!drawPoint)return;if(drawPoint.length!=2)return;this.ClipFrame();var ptStart=drawPoint[0];var ptEnd=drawPoint[1];this.SetLineWidth();this.DrawBlock(ptEnd,ptStart);this.RestoreLineWidth();this.DrawPoint(drawPoint);//画点
6212
+ this.newMethod();delete this.newMethod;this.ClassName='ChartFibSpeedResistanceFan';this.PointCount=2;this.Font=12*GetDevicePixelRatio()+"px 微软雅黑";this.IsPointIn=this.IsPointIn_XYValue_Line;this.GetXYCoordinate=this.GetXYCoordinate_default;this.PointToValue_Default=this.PointToValue;this.OnlyMoveXIndex=true;this.IsSupportMagnet=true;this.LineWidth=1;this.EnableBGColor=true;this.AreaConfig={AryYData:[{Value:0,Color:"rgb(128,128,128)",Enable:true},{Value:0.25,Color:"rgb(242,52,69)",Enable:true},{Value:0.382,Color:"rgb(255,152,0)",Enable:true},{Value:0.5,Color:"rgb(76,175,80)",Enable:true},{Value:0.618,Color:"rgb(8,153,129)",Enable:true},{Value:0.75,Color:"rgb(0,188,212)",Enable:true},{Value:1,Color:"rgb(120,123,134)",Enable:true}],AryXData:[{Value:0,Color:"rgb(128,128,128)",Enable:true},{Value:0.25,Color:"rgb(242,52,69)",Enable:true},{Value:0.382,Color:"rgb(255,152,0)",Enable:true},{Value:0.5,Color:"rgb(76,175,80)",Enable:true},{Value:0.618,Color:"rgb(8,153,129)",Enable:true},{Value:0.75,Color:"rgb(0,188,212)",Enable:true},{Value:1,Color:"rgb(120,123,134)",Enable:true}],Opacity:0.3};this.SetOption=function(option){if(!option)return;if(option.Font)this.Font=option.Font;if(option.LineWidth)this.LineWidth=option.LineWidth;if(IFrameSplitOperator.IsBool(option.EnableBGColor))this.EnableBGColor=option.EnableBGColor;if(option.AreaConfig)this.AreaConfig=option.AreaConfig;};//导出成存储格式
6213
+ this.ExportStorageData=function(){var storageData=this.ExportBaseData();storageData.Value=[];for(var i=0;i<this.Value.length&&i<this.PointCount;++i){var item=this.Value[i];storageData.Value.push({XValue:item.XValue,YValue:item.YValue});}storageData.Font=this.Font;storageData.EnableBGColor=this.EnableBGColor;storageData.AreaConfig=CloneData(this.AreaConfig);return storageData;};this.ImportStorageData=function(storageData){if(storageData.Font)this.Font=storageData.Font;if(IFrameSplitOperator.IsBool(storageData.EnableBGColor))this.EnableBGColor=storageData.EnableBGColor;if(storageData.AreaConfig)this.AreaConfig=storageData.AreaConfig;};this.Draw=function(){this.LinePoint=[];if(this.IsFrameMinSize())return;var bCheckXY=false;var drawPoint=this.CalculateDrawPoint({IsCheckX:bCheckXY,IsCheckY:bCheckXY});if(!drawPoint)return;if(drawPoint.length!=2)return;this.ClipFrame();var ptStart=drawPoint[0];var ptEnd=drawPoint[1];this.SetLineWidth();this.DrawBlock(ptEnd,ptStart);this.RestoreLineWidth();this.DrawPoint(drawPoint);//画点
6213
6214
  this.Canvas.restore();};//获取在第几象限
6214
6215
  this.GetQuadrant=function(ptStart,ptEnd){if(ptStart.X<ptEnd.X&&ptStart.Y>ptEnd.Y)return 1;else if(ptStart.X>ptEnd.X&&ptStart.Y>ptEnd.Y)return 2;else if(ptStart.X<ptEnd.X&&ptStart.Y<ptEnd.Y)return 4;else return 3;};this.DrawBlock=function(ptStart,ptEnd){var center=ptEnd;var xDiff=ptEnd.X-ptStart.X;var yDiff=ptEnd.Y-ptStart.Y;var quadrant=this.GetQuadrant(center,ptStart);//象限
6215
6216
  var aryYData=this.GetArrayAreaConfig(this.AreaConfig.AryYData);var ptPre=null;//上一个点
6216
- var clrArea=null;this.Canvas.font=this.Font;var textOffset=4;if(quadrant==1||quadrant==4){this.Canvas.textAlign="right";textOffset=-4;}else{this.Canvas.textAlign="left";textOffset=4;}this.Canvas.textBaseline="middle";for(var i=0;i<aryYData.length;++i){var item=aryYData[i];var y=item.Value*yDiff+ptStart.Y;var pt=this.CalculateExtendLineEndPoint([center,{X:ptStart.X,Y:y}]);if(ptPre){this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(ptPre.X,ptPre.Y);this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.closePath();this.Canvas.fillStyle=clrArea;this.Canvas.fill();}this.Canvas.strokeStyle=item.Color;this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.stroke();this.LinePoint.push({Start:center,End:pt});if(item.Value!=1){this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(center.X,y);this.Canvas.lineTo(ptStart.X,y);this.Canvas.stroke();}ptPre=pt;clrArea=IChartDrawPicture.ColorToRGBA(item.Color,this.AreaConfig.Opacity);//文字
6217
+ var clrArea=null;this.Canvas.font=this.Font;var border=this.Frame.GetBorder();var ptLeftTop={X:border.Left,Y:border.TopEx};var ptRightTop={X:border.Right,Y:border.TopEx};var ptLeftBottom={X:border.Left,Y:border.BottomEx};var ptRightBottom={X:border.Right,Y:border.BottomEx};var textOffset=4;if(quadrant==1||quadrant==4){this.Canvas.textAlign="right";textOffset=-4;}else{this.Canvas.textAlign="left";textOffset=4;}this.Canvas.textBaseline="middle";for(var i=0;i<aryYData.length;++i){var item=aryYData[i];var y=item.Value*yDiff+ptStart.Y;var pt=this.CalculateExtendLineEndPoint([center,{X:ptStart.X,Y:y}]);if(ptPre){this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(ptPre.X,ptPre.Y);if(quadrant==1){if(ptPre.X>=ptRightTop.X&&pt.X<ptRightTop.X){this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);}}else if(quadrant==2){if(ptPre.X<=ptLeftTop.X&&pt.X>ptLeftTop.X){this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);}}else if(quadrant==3){if(ptPre.X<=ptLeftBottom.X&&pt.X>ptLeftBottom.X){this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);}}else if(quadrant==4){if(ptPre.X>=ptRightBottom.X&&pt.X<ptRightBottom.X){this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);}}this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.closePath();this.Canvas.fillStyle=clrArea;this.Canvas.fill();}this.Canvas.strokeStyle=item.Color;this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.stroke();this.LinePoint.push({Start:center,End:pt});if(item.Value!=1){this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(center.X,y);this.Canvas.lineTo(ptStart.X,y);this.Canvas.stroke();}ptPre=pt;clrArea=IChartDrawPicture.ColorToRGBA(item.Color,this.AreaConfig.Opacity);//文字
6217
6218
  var text=''+item.Value;this.Canvas.fillStyle=item.Color;this.Canvas.fillText(text,center.X+textOffset,y);}var aryXData=this.GetArrayAreaConfig(this.AreaConfig.AryXData);var ptPre=null;this.Canvas.textAlign="center";if(quadrant==3||quadrant==4){this.Canvas.textBaseline="bottom";textOffset=-5;}else{this.Canvas.textBaseline="top";textOffset=5;}for(var i=0;i<aryXData.length;++i){var item=aryXData[i];var x=item.Value*xDiff+ptStart.X;var pt=this.CalculateExtendLineEndPoint([center,{X:x,Y:ptStart.Y}]);if(ptPre)//面积
6218
- {this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(ptPre.X,ptPre.Y);this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.closePath();this.Canvas.fillStyle=clrArea;this.Canvas.fill();}this.Canvas.strokeStyle=item.Color;this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.stroke();this.LinePoint.push({Start:center,End:pt});if(item.Value!=1){this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(x,center.Y);this.Canvas.lineTo(x,ptStart.Y);this.Canvas.stroke();}ptPre=pt;clrArea=IChartDrawPicture.ColorToRGBA(item.Color,this.AreaConfig.Opacity);//文字
6219
+ {this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(ptPre.X,ptPre.Y);if(quadrant==1){if(ptPre.X<ptRightTop.X&&pt.X>=ptRightTop.X){this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);}}else if(quadrant==2){if(ptPre.X>ptLeftTop.X&&pt.X<=ptLeftTop.X){this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);}}else if(quadrant==3){if(ptPre.X>ptLeftBottom.X&&pt.X<=ptLeftBottom.X){this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);}}else if(quadrant==4){if(ptPre.X<ptRightBottom.X&&pt.X>=ptRightBottom.X){this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);}}this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.closePath();this.Canvas.fillStyle=clrArea;this.Canvas.fill();}this.Canvas.strokeStyle=item.Color;this.Canvas.beginPath();this.Canvas.moveTo(center.X,center.Y);this.Canvas.lineTo(pt.X,pt.Y);this.Canvas.stroke();this.LinePoint.push({Start:center,End:pt});if(item.Value!=1){this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(x,center.Y);this.Canvas.lineTo(x,ptStart.Y);this.Canvas.stroke();}ptPre=pt;clrArea=IChartDrawPicture.ColorToRGBA(item.Color,this.AreaConfig.Opacity);//文字
6219
6220
  var text=''+item.Value;this.Canvas.fillStyle=item.Color;this.Canvas.fillText(text,x,center.Y+textOffset);}};this.GetArrayAreaConfig=function(aryData){var aryArea=[];for(var i=0;i<aryData.length;++i){var item=aryData[i];if(item.Enable)aryArea.push(item);}aryArea.sort(function(left,right){return right.Value-left.Value;});return aryArea;};}function ChartDrawStorage(){this.DrawData=new _map2.default();//画图工具数据 key=symbol-Period, value=Map() Key:Guid, Value:{Guid, Symbol, Period, ClassName, Value}
6220
6221
  this.StorageKey;this.GetEventCallback;//事件回调
6221
6222
  this.Load=function(key)//从本地读取画图工具
@@ -11488,7 +11489,8 @@ outItem.IsShowTitle=false;break;}if(attr.indexOf('COLOR')==0){outItem.Color=attr
11488
11489
  {var lockData={IsLocked:true,Callback:this.LockCallback,IndexName:this.Name,ID:this.LockID,BG:this.LockBG,Text:this.LockText,TextColor:this.LockTextColor,Font:this.LockFont,Count:this.LockCount,MinWidth:this.LockMinWidth};hqChart.Frame.SubFrame[windowIndex].Frame.SetLock(lockData);}hqChart.UpdataDataoffset();//更新数据偏移
11489
11490
  hqChart.UpdateFrameMaxMin();//调整坐标最大 最小值
11490
11491
  if(data.Redraw===false)//是否重绘
11491
- {}else{hqChart.Draw();}if(hqChart.GetIndexEvent){var event=hqChart.GetIndexEvent();//指标计算完成回调
11492
+ {}else{if(this.IsSync===false)//同步的指标不用刷新
11493
+ hqChart.Draw();}if(hqChart.GetIndexEvent){var event=hqChart.GetIndexEvent();//指标计算完成回调
11492
11494
  if(event){var data={OutVar:this.OutVar,WindowIndex:windowIndex,Name:this.Name,Arguments:this.Arguments,HistoryData:hisData,Stock:{Symbol:hqChart.Symbol,Name:hqChart.Name}};event.Callback(event,data,this);}}};this.FittingArray=function(sourceData,date,time,hqChart,arrayType)//arrayType 0=单值数组 1=结构体
11493
11495
  {var kdata=hqChart.ChartPaint[0].Data;//K线
11494
11496
  var arySingleData=[];for(var i in sourceData){var value=sourceData[i];var indexItem=new SingleData();//单列指标数据
@@ -12640,7 +12642,7 @@ function HQChartScriptWorker(){this.Create=function(){var _this60=this;addEventL
12640
12642
  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);};}/********************************************************************************
12641
12643
  * 版本信息输出
12642
12644
  *
12643
- */var HQCHART_VERSION="1.1.12535";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();//把给外界调用的方法暴露出来
12645
+ */var HQCHART_VERSION="1.1.12541";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();//把给外界调用的方法暴露出来
12644
12646
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
12645
12647
  // BaseIndex:BaseIndex,
12646
12648
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hqchart",
3
3
  "description": "stock chart",
4
4
  "author": "jones2000",
5
- "version": "1.1.12536",
5
+ "version": "1.1.12542",
6
6
  "main": "lib/main.js",
7
7
  "private": false,
8
8
  "license": "Apache License 2.0",
@@ -22865,7 +22865,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
22865
22865
  }
22866
22866
  else
22867
22867
  {
22868
- hqChart.Draw();
22868
+ if (this.IsSync===false) //同步的指标不用刷新
22869
+ hqChart.Draw();
22869
22870
  }
22870
22871
 
22871
22872
  if (hqChart.GetIndexEvent)
@@ -51412,6 +51412,13 @@ function IChartDrawPicture()
51412
51412
  pt2.Y=bottom;
51413
51413
  return pt2;
51414
51414
  }
51415
+ else if (b==0)
51416
+ {
51417
+ var pt2=new Point();
51418
+ pt2.X=right;
51419
+ pt2.Y=aryPoint[0].Y;
51420
+ return pt2;
51421
+ }
51415
51422
  else
51416
51423
  {
51417
51424
  var b2=top-aryPoint[0].Y;
@@ -51449,6 +51456,13 @@ function IChartDrawPicture()
51449
51456
  pt2.Y=bottom;
51450
51457
  return pt2;
51451
51458
  }
51459
+ else if (b==0)
51460
+ {
51461
+ var pt2=new Point();
51462
+ pt2.X=left;
51463
+ pt2.Y=aryPoint[0].Y;
51464
+ return pt2;
51465
+ }
51452
51466
  else
51453
51467
  {
51454
51468
  var b2=top-aryPoint[0].Y;
@@ -59755,6 +59769,42 @@ function ChartFibSpeedResistanceFan()
59755
59769
  Opacity:0.3
59756
59770
  }
59757
59771
 
59772
+ this.SetOption=function(option)
59773
+ {
59774
+ if (!option) return;
59775
+
59776
+ if (option.Font) this.Font=option.Font;
59777
+ if (option.LineWidth) this.LineWidth=option.LineWidth;
59778
+ if (IFrameSplitOperator.IsBool(option.EnableBGColor)) this.EnableBGColor=option.EnableBGColor;
59779
+ if (option.AreaConfig) this.AreaConfig=option.AreaConfig;
59780
+ }
59781
+
59782
+ //导出成存储格式
59783
+ this.ExportStorageData=function()
59784
+ {
59785
+ var storageData=this.ExportBaseData();
59786
+
59787
+ storageData.Value=[];
59788
+ for(var i=0;i<this.Value.length && i<this.PointCount;++i)
59789
+ {
59790
+ var item=this.Value[i];
59791
+ storageData.Value.push( { XValue:item.XValue, YValue:item.YValue } );
59792
+ }
59793
+
59794
+ storageData.Font=this.Font;
59795
+ storageData.EnableBGColor=this.EnableBGColor;
59796
+ storageData.AreaConfig=CloneData(this.AreaConfig);
59797
+
59798
+ return storageData;
59799
+ }
59800
+
59801
+ this.ImportStorageData=function(storageData)
59802
+ {
59803
+ if (storageData.Font) this.Font=storageData.Font;
59804
+ if (IFrameSplitOperator.IsBool(storageData.EnableBGColor)) this.EnableBGColor=storageData.EnableBGColor;
59805
+ if (storageData.AreaConfig) this.AreaConfig=storageData.AreaConfig;
59806
+ }
59807
+
59758
59808
  this.Draw=function()
59759
59809
  {
59760
59810
  this.LinePoint=[];
@@ -59797,6 +59847,13 @@ function ChartFibSpeedResistanceFan()
59797
59847
  var ptPre=null; //上一个点
59798
59848
  var clrArea=null;
59799
59849
  this.Canvas.font=this.Font;
59850
+
59851
+ var border=this.Frame.GetBorder();
59852
+ var ptLeftTop={ X:border.Left, Y:border.TopEx };
59853
+ var ptRightTop={X:border.Right, Y:border.TopEx };
59854
+ var ptLeftBottom={ X:border.Left, Y:border.BottomEx };
59855
+ var ptRightBottom={ X:border.Right, Y:border.BottomEx };
59856
+
59800
59857
  var textOffset=4;
59801
59858
  if (quadrant==1 || quadrant==4)
59802
59859
  {
@@ -59808,6 +59865,8 @@ function ChartFibSpeedResistanceFan()
59808
59865
  this.Canvas.textAlign="left";
59809
59866
  textOffset=4;
59810
59867
  }
59868
+
59869
+
59811
59870
  this.Canvas.textBaseline="middle";
59812
59871
  for(var i=0;i<aryYData.length;++i)
59813
59872
  {
@@ -59821,6 +59880,36 @@ function ChartFibSpeedResistanceFan()
59821
59880
  this.Canvas.beginPath();
59822
59881
  this.Canvas.moveTo(center.X,center.Y);
59823
59882
  this.Canvas.lineTo(ptPre.X,ptPre.Y);
59883
+
59884
+ if (quadrant==1)
59885
+ {
59886
+ if (ptPre.X>=ptRightTop.X && pt.X<ptRightTop.X)
59887
+ {
59888
+ this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);
59889
+ }
59890
+ }
59891
+ else if (quadrant==2)
59892
+ {
59893
+ if (ptPre.X<=ptLeftTop.X && pt.X>ptLeftTop.X)
59894
+ {
59895
+ this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);
59896
+ }
59897
+ }
59898
+ else if (quadrant==3)
59899
+ {
59900
+ if (ptPre.X<=ptLeftBottom.X && pt.X>ptLeftBottom.X)
59901
+ {
59902
+ this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);
59903
+ }
59904
+ }
59905
+ else if (quadrant==4)
59906
+ {
59907
+ if (ptPre.X>=ptRightBottom.X && pt.X<ptRightBottom.X)
59908
+ {
59909
+ this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);
59910
+ }
59911
+ }
59912
+
59824
59913
  this.Canvas.lineTo(pt.X,pt.Y);
59825
59914
  this.Canvas.closePath();
59826
59915
  this.Canvas.fillStyle=clrArea;
@@ -59879,6 +59968,36 @@ function ChartFibSpeedResistanceFan()
59879
59968
  this.Canvas.beginPath();
59880
59969
  this.Canvas.moveTo(center.X,center.Y);
59881
59970
  this.Canvas.lineTo(ptPre.X,ptPre.Y);
59971
+
59972
+ if (quadrant==1)
59973
+ {
59974
+ if (ptPre.X<ptRightTop.X && pt.X>=ptRightTop.X)
59975
+ {
59976
+ this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);
59977
+ }
59978
+ }
59979
+ else if (quadrant==2)
59980
+ {
59981
+ if (ptPre.X>ptLeftTop.X && pt.X<=ptLeftTop.X)
59982
+ {
59983
+ this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);
59984
+ }
59985
+ }
59986
+ else if (quadrant==3)
59987
+ {
59988
+ if (ptPre.X>ptLeftBottom.X && pt.X<=ptLeftBottom.X)
59989
+ {
59990
+ this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);
59991
+ }
59992
+ }
59993
+ else if (quadrant==4)
59994
+ {
59995
+ if (ptPre.X<ptRightBottom.X && pt.X>=ptRightBottom.X)
59996
+ {
59997
+ this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);
59998
+ }
59999
+ }
60000
+
59882
60001
  this.Canvas.lineTo(pt.X,pt.Y);
59883
60002
  this.Canvas.closePath();
59884
60003
  this.Canvas.fillStyle=clrArea;
@@ -55492,6 +55492,13 @@ function IChartDrawPicture()
55492
55492
  pt2.Y=bottom;
55493
55493
  return pt2;
55494
55494
  }
55495
+ else if (b==0)
55496
+ {
55497
+ var pt2=new Point();
55498
+ pt2.X=right;
55499
+ pt2.Y=aryPoint[0].Y;
55500
+ return pt2;
55501
+ }
55495
55502
  else
55496
55503
  {
55497
55504
  var b2=top-aryPoint[0].Y;
@@ -55529,6 +55536,13 @@ function IChartDrawPicture()
55529
55536
  pt2.Y=bottom;
55530
55537
  return pt2;
55531
55538
  }
55539
+ else if (b==0)
55540
+ {
55541
+ var pt2=new Point();
55542
+ pt2.X=left;
55543
+ pt2.Y=aryPoint[0].Y;
55544
+ return pt2;
55545
+ }
55532
55546
  else
55533
55547
  {
55534
55548
  var b2=top-aryPoint[0].Y;
@@ -63835,6 +63849,42 @@ function ChartFibSpeedResistanceFan()
63835
63849
  Opacity:0.3
63836
63850
  }
63837
63851
 
63852
+ this.SetOption=function(option)
63853
+ {
63854
+ if (!option) return;
63855
+
63856
+ if (option.Font) this.Font=option.Font;
63857
+ if (option.LineWidth) this.LineWidth=option.LineWidth;
63858
+ if (IFrameSplitOperator.IsBool(option.EnableBGColor)) this.EnableBGColor=option.EnableBGColor;
63859
+ if (option.AreaConfig) this.AreaConfig=option.AreaConfig;
63860
+ }
63861
+
63862
+ //导出成存储格式
63863
+ this.ExportStorageData=function()
63864
+ {
63865
+ var storageData=this.ExportBaseData();
63866
+
63867
+ storageData.Value=[];
63868
+ for(var i=0;i<this.Value.length && i<this.PointCount;++i)
63869
+ {
63870
+ var item=this.Value[i];
63871
+ storageData.Value.push( { XValue:item.XValue, YValue:item.YValue } );
63872
+ }
63873
+
63874
+ storageData.Font=this.Font;
63875
+ storageData.EnableBGColor=this.EnableBGColor;
63876
+ storageData.AreaConfig=CloneData(this.AreaConfig);
63877
+
63878
+ return storageData;
63879
+ }
63880
+
63881
+ this.ImportStorageData=function(storageData)
63882
+ {
63883
+ if (storageData.Font) this.Font=storageData.Font;
63884
+ if (IFrameSplitOperator.IsBool(storageData.EnableBGColor)) this.EnableBGColor=storageData.EnableBGColor;
63885
+ if (storageData.AreaConfig) this.AreaConfig=storageData.AreaConfig;
63886
+ }
63887
+
63838
63888
  this.Draw=function()
63839
63889
  {
63840
63890
  this.LinePoint=[];
@@ -63877,6 +63927,13 @@ function ChartFibSpeedResistanceFan()
63877
63927
  var ptPre=null; //上一个点
63878
63928
  var clrArea=null;
63879
63929
  this.Canvas.font=this.Font;
63930
+
63931
+ var border=this.Frame.GetBorder();
63932
+ var ptLeftTop={ X:border.Left, Y:border.TopEx };
63933
+ var ptRightTop={X:border.Right, Y:border.TopEx };
63934
+ var ptLeftBottom={ X:border.Left, Y:border.BottomEx };
63935
+ var ptRightBottom={ X:border.Right, Y:border.BottomEx };
63936
+
63880
63937
  var textOffset=4;
63881
63938
  if (quadrant==1 || quadrant==4)
63882
63939
  {
@@ -63888,6 +63945,8 @@ function ChartFibSpeedResistanceFan()
63888
63945
  this.Canvas.textAlign="left";
63889
63946
  textOffset=4;
63890
63947
  }
63948
+
63949
+
63891
63950
  this.Canvas.textBaseline="middle";
63892
63951
  for(var i=0;i<aryYData.length;++i)
63893
63952
  {
@@ -63901,6 +63960,36 @@ function ChartFibSpeedResistanceFan()
63901
63960
  this.Canvas.beginPath();
63902
63961
  this.Canvas.moveTo(center.X,center.Y);
63903
63962
  this.Canvas.lineTo(ptPre.X,ptPre.Y);
63963
+
63964
+ if (quadrant==1)
63965
+ {
63966
+ if (ptPre.X>=ptRightTop.X && pt.X<ptRightTop.X)
63967
+ {
63968
+ this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);
63969
+ }
63970
+ }
63971
+ else if (quadrant==2)
63972
+ {
63973
+ if (ptPre.X<=ptLeftTop.X && pt.X>ptLeftTop.X)
63974
+ {
63975
+ this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);
63976
+ }
63977
+ }
63978
+ else if (quadrant==3)
63979
+ {
63980
+ if (ptPre.X<=ptLeftBottom.X && pt.X>ptLeftBottom.X)
63981
+ {
63982
+ this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);
63983
+ }
63984
+ }
63985
+ else if (quadrant==4)
63986
+ {
63987
+ if (ptPre.X>=ptRightBottom.X && pt.X<ptRightBottom.X)
63988
+ {
63989
+ this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);
63990
+ }
63991
+ }
63992
+
63904
63993
  this.Canvas.lineTo(pt.X,pt.Y);
63905
63994
  this.Canvas.closePath();
63906
63995
  this.Canvas.fillStyle=clrArea;
@@ -63959,6 +64048,36 @@ function ChartFibSpeedResistanceFan()
63959
64048
  this.Canvas.beginPath();
63960
64049
  this.Canvas.moveTo(center.X,center.Y);
63961
64050
  this.Canvas.lineTo(ptPre.X,ptPre.Y);
64051
+
64052
+ if (quadrant==1)
64053
+ {
64054
+ if (ptPre.X<ptRightTop.X && pt.X>=ptRightTop.X)
64055
+ {
64056
+ this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);
64057
+ }
64058
+ }
64059
+ else if (quadrant==2)
64060
+ {
64061
+ if (ptPre.X>ptLeftTop.X && pt.X<=ptLeftTop.X)
64062
+ {
64063
+ this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);
64064
+ }
64065
+ }
64066
+ else if (quadrant==3)
64067
+ {
64068
+ if (ptPre.X>ptLeftBottom.X && pt.X<=ptLeftBottom.X)
64069
+ {
64070
+ this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);
64071
+ }
64072
+ }
64073
+ else if (quadrant==4)
64074
+ {
64075
+ if (ptPre.X<ptRightBottom.X && pt.X>=ptRightBottom.X)
64076
+ {
64077
+ this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);
64078
+ }
64079
+ }
64080
+
63962
64081
  this.Canvas.lineTo(pt.X,pt.Y);
63963
64082
  this.Canvas.closePath();
63964
64083
  this.Canvas.fillStyle=clrArea;
@@ -116067,7 +116186,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
116067
116186
  }
116068
116187
  else
116069
116188
  {
116070
- hqChart.Draw();
116189
+ if (this.IsSync===false) //同步的指标不用刷新
116190
+ hqChart.Draw();
116071
116191
  }
116072
116192
 
116073
116193
  if (hqChart.GetIndexEvent)
@@ -128950,7 +129070,7 @@ function ScrollBarBGChart()
128950
129070
 
128951
129071
 
128952
129072
 
128953
- var HQCHART_VERSION="1.1.12535";
129073
+ var HQCHART_VERSION="1.1.12541";
128954
129074
 
128955
129075
  function PrintHQChartVersion()
128956
129076
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12535";
8
+ var HQCHART_VERSION="1.1.12541";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -55536,6 +55536,13 @@ function IChartDrawPicture()
55536
55536
  pt2.Y=bottom;
55537
55537
  return pt2;
55538
55538
  }
55539
+ else if (b==0)
55540
+ {
55541
+ var pt2=new Point();
55542
+ pt2.X=right;
55543
+ pt2.Y=aryPoint[0].Y;
55544
+ return pt2;
55545
+ }
55539
55546
  else
55540
55547
  {
55541
55548
  var b2=top-aryPoint[0].Y;
@@ -55573,6 +55580,13 @@ function IChartDrawPicture()
55573
55580
  pt2.Y=bottom;
55574
55581
  return pt2;
55575
55582
  }
55583
+ else if (b==0)
55584
+ {
55585
+ var pt2=new Point();
55586
+ pt2.X=left;
55587
+ pt2.Y=aryPoint[0].Y;
55588
+ return pt2;
55589
+ }
55576
55590
  else
55577
55591
  {
55578
55592
  var b2=top-aryPoint[0].Y;
@@ -63879,6 +63893,42 @@ function ChartFibSpeedResistanceFan()
63879
63893
  Opacity:0.3
63880
63894
  }
63881
63895
 
63896
+ this.SetOption=function(option)
63897
+ {
63898
+ if (!option) return;
63899
+
63900
+ if (option.Font) this.Font=option.Font;
63901
+ if (option.LineWidth) this.LineWidth=option.LineWidth;
63902
+ if (IFrameSplitOperator.IsBool(option.EnableBGColor)) this.EnableBGColor=option.EnableBGColor;
63903
+ if (option.AreaConfig) this.AreaConfig=option.AreaConfig;
63904
+ }
63905
+
63906
+ //导出成存储格式
63907
+ this.ExportStorageData=function()
63908
+ {
63909
+ var storageData=this.ExportBaseData();
63910
+
63911
+ storageData.Value=[];
63912
+ for(var i=0;i<this.Value.length && i<this.PointCount;++i)
63913
+ {
63914
+ var item=this.Value[i];
63915
+ storageData.Value.push( { XValue:item.XValue, YValue:item.YValue } );
63916
+ }
63917
+
63918
+ storageData.Font=this.Font;
63919
+ storageData.EnableBGColor=this.EnableBGColor;
63920
+ storageData.AreaConfig=CloneData(this.AreaConfig);
63921
+
63922
+ return storageData;
63923
+ }
63924
+
63925
+ this.ImportStorageData=function(storageData)
63926
+ {
63927
+ if (storageData.Font) this.Font=storageData.Font;
63928
+ if (IFrameSplitOperator.IsBool(storageData.EnableBGColor)) this.EnableBGColor=storageData.EnableBGColor;
63929
+ if (storageData.AreaConfig) this.AreaConfig=storageData.AreaConfig;
63930
+ }
63931
+
63882
63932
  this.Draw=function()
63883
63933
  {
63884
63934
  this.LinePoint=[];
@@ -63921,6 +63971,13 @@ function ChartFibSpeedResistanceFan()
63921
63971
  var ptPre=null; //上一个点
63922
63972
  var clrArea=null;
63923
63973
  this.Canvas.font=this.Font;
63974
+
63975
+ var border=this.Frame.GetBorder();
63976
+ var ptLeftTop={ X:border.Left, Y:border.TopEx };
63977
+ var ptRightTop={X:border.Right, Y:border.TopEx };
63978
+ var ptLeftBottom={ X:border.Left, Y:border.BottomEx };
63979
+ var ptRightBottom={ X:border.Right, Y:border.BottomEx };
63980
+
63924
63981
  var textOffset=4;
63925
63982
  if (quadrant==1 || quadrant==4)
63926
63983
  {
@@ -63932,6 +63989,8 @@ function ChartFibSpeedResistanceFan()
63932
63989
  this.Canvas.textAlign="left";
63933
63990
  textOffset=4;
63934
63991
  }
63992
+
63993
+
63935
63994
  this.Canvas.textBaseline="middle";
63936
63995
  for(var i=0;i<aryYData.length;++i)
63937
63996
  {
@@ -63945,6 +64004,36 @@ function ChartFibSpeedResistanceFan()
63945
64004
  this.Canvas.beginPath();
63946
64005
  this.Canvas.moveTo(center.X,center.Y);
63947
64006
  this.Canvas.lineTo(ptPre.X,ptPre.Y);
64007
+
64008
+ if (quadrant==1)
64009
+ {
64010
+ if (ptPre.X>=ptRightTop.X && pt.X<ptRightTop.X)
64011
+ {
64012
+ this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);
64013
+ }
64014
+ }
64015
+ else if (quadrant==2)
64016
+ {
64017
+ if (ptPre.X<=ptLeftTop.X && pt.X>ptLeftTop.X)
64018
+ {
64019
+ this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);
64020
+ }
64021
+ }
64022
+ else if (quadrant==3)
64023
+ {
64024
+ if (ptPre.X<=ptLeftBottom.X && pt.X>ptLeftBottom.X)
64025
+ {
64026
+ this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);
64027
+ }
64028
+ }
64029
+ else if (quadrant==4)
64030
+ {
64031
+ if (ptPre.X>=ptRightBottom.X && pt.X<ptRightBottom.X)
64032
+ {
64033
+ this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);
64034
+ }
64035
+ }
64036
+
63948
64037
  this.Canvas.lineTo(pt.X,pt.Y);
63949
64038
  this.Canvas.closePath();
63950
64039
  this.Canvas.fillStyle=clrArea;
@@ -64003,6 +64092,36 @@ function ChartFibSpeedResistanceFan()
64003
64092
  this.Canvas.beginPath();
64004
64093
  this.Canvas.moveTo(center.X,center.Y);
64005
64094
  this.Canvas.lineTo(ptPre.X,ptPre.Y);
64095
+
64096
+ if (quadrant==1)
64097
+ {
64098
+ if (ptPre.X<ptRightTop.X && pt.X>=ptRightTop.X)
64099
+ {
64100
+ this.Canvas.lineTo(ptRightTop.X,ptRightTop.Y);
64101
+ }
64102
+ }
64103
+ else if (quadrant==2)
64104
+ {
64105
+ if (ptPre.X>ptLeftTop.X && pt.X<=ptLeftTop.X)
64106
+ {
64107
+ this.Canvas.lineTo(ptLeftTop.X,ptLeftTop.Y);
64108
+ }
64109
+ }
64110
+ else if (quadrant==3)
64111
+ {
64112
+ if (ptPre.X>ptLeftBottom.X && pt.X<=ptLeftBottom.X)
64113
+ {
64114
+ this.Canvas.lineTo(ptLeftBottom.X,ptLeftBottom.Y);
64115
+ }
64116
+ }
64117
+ else if (quadrant==4)
64118
+ {
64119
+ if (ptPre.X<ptRightBottom.X && pt.X>=ptRightBottom.X)
64120
+ {
64121
+ this.Canvas.lineTo(ptRightBottom.X,ptRightBottom.Y);
64122
+ }
64123
+ }
64124
+
64006
64125
  this.Canvas.lineTo(pt.X,pt.Y);
64007
64126
  this.Canvas.closePath();
64008
64127
  this.Canvas.fillStyle=clrArea;
@@ -116111,7 +116230,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
116111
116230
  }
116112
116231
  else
116113
116232
  {
116114
- hqChart.Draw();
116233
+ if (this.IsSync===false) //同步的指标不用刷新
116234
+ hqChart.Draw();
116115
116235
  }
116116
116236
 
116117
116237
  if (hqChart.GetIndexEvent)
@@ -129103,7 +129223,7 @@ function HQChartScriptWorker()
129103
129223
 
129104
129224
 
129105
129225
 
129106
- var HQCHART_VERSION="1.1.12535";
129226
+ var HQCHART_VERSION="1.1.12541";
129107
129227
 
129108
129228
  function PrintHQChartVersion()
129109
129229
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12534";
8
+ var HQCHART_VERSION="1.1.12538";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -9232,6 +9232,7 @@ function MinuteChartContainer(uielement)
9232
9232
  var aryMinuteData=this.SourceData.Data;
9233
9233
  var upperSymbol = this.Symbol.toUpperCase();
9234
9234
  var isFutures = MARKET_SUFFIX_NAME.IsFutures(upperSymbol);
9235
+ var yClose=minuteData.YClose;
9235
9236
  if (data.stock[0].yclearing && isFutures) yClose = data.stock[0].yclearing; //期货使用前结算价
9236
9237
  this.CaclutateLimitPrice(yClose, data.stock[0].limitprice); //计算涨停价格
9237
9238
  var extendData = { High: data.stock[0].high, Low: data.stock[0].low };