hqchart 1.1.13001 → 1.1.13003

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.
@@ -1953,6 +1953,7 @@ this.LineColor=g_JSChartResource.FrameSplitPen;//线段颜色
1953
1953
  this.LineDash=null;//当线段类型==2时 可以设置虚线样式
1954
1954
  this.LineType=1;//线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
1955
1955
  this.LineWidth;//线段宽度
1956
+ this.ExtendLine;//延长线长度[ ] { Width:长度 } [0]=左 [1]=右 实例: [null, { Width: 50}];
1956
1957
  this.ExtendData;//扩展属性
1957
1958
  //百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
1958
1959
  //自定义刻度 { Custom:{ Position: 1=强制内部 }}
@@ -2151,7 +2152,8 @@ var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i
2151
2152
  {if(borderRight<10||position==1){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
2152
2153
  var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=bottom-itemText.Width;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(top,bgTop,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){if(this.GetEventCallback){var bgTop=yText-textHeight/2-1*pixelTatio;var sendData={Top:bgTop,Right:right,Height:null,IsShow:true,BGColor:item.LineColor,TextColor:item.TextColor,PixelTatio:pixelTatio,Position:"Right",IsInside:true};if(this.SendDrawCountDownEvent(sendData)){if(IFrameSplitOperator.IsPlusNumber(sendData.Height))yText+=textHeight+1*pixelTatio;}}}else{var bgTop=yText-textHeight/2-1*pixelTatio;var textLeft=right-itemText.Width;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);//文本背景区域
2153
2154
  if(itemText.TextColor)this.Canvas.fillStyle=itemText.TextColor;else this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);if(i==0)this.DrawLine(left,textLeft,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}if(item.Type==3||item.Type==4){if(item.Title){var width=this.Canvas.measureText(item.Title).width+2*pixelTatio;if(this.IsHScreen){var bgTop=bottom-itemText.Width-width;var textLeft=y-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,width);this.DrawHScreenText({X:y,Y:bgTop},{Text:item.Title,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});}else{var bgTop=y-textHeight/2-1*pixelTatio;var textLeft=right-textWidth-width-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Title,textLeft+1*pixelTatio,y);}}}}else{if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var preTextRect=null;if(mapTextRect&&mapTextRect.has(3))preTextRect=mapTextRect.get(3);var yText=y;var rtText={};for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=bottom;//bgTop+=(textWidth-itemText.Width);
2154
- var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(top,bgTop,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){if(this.GetEventCallback){var bgTop=yText-textHeight/2-1*pixelTatio;var sendData={Top:bgTop,Left:right,Right:this.ChartBorder.GetChartWidth(),Height:null,IsShow:true,BGColor:item.LineColor,TextColor:item.TextColor,PixelTatio:pixelTatio,Position:"Right",IsInside:false};if(this.SendDrawCountDownEvent(sendData)){if(IFrameSplitOperator.IsPlusNumber(sendData.Height))yText+=textHeight+1*pixelTatio;}}}else{var bgTop=yText-textHeight/2-1*pixelTatio;if(i==0){var textLeft=right;rtText.Left=textLeft;if(preTextRect&&bgTop<preTextRect.Rect.Bottom){yText=preTextRect.Rect.Bottom;bgTop=yText-textHeight/2-1*pixelTatio;}}else{var textLeft=right+textWidth-itemText.Width;}if(emptyBGColor){this.Canvas.fillStyle=emptyBGColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width+1,textHeight);this.Canvas.strokeStyle=item.LineColor;this.Canvas.strokeRect(ToFixedPoint(textLeft),ToFixedPoint(bgTop),ToFixedRect(itemText.Width+1),ToFixedRect(textHeight));this.Canvas.fillStyle=item.LineColor;this.Canvas.fillText(itemText.Text,textLeft+2*pixelTatio,yText);}else{this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);if(itemText.TextColor)this.Canvas.fillStyle=itemText.TextColor;else this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);}if(i==0)this.DrawLine(left,right,y,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;rtText.Bottom=yText;}}}if(mapTextRect&&IFrameSplitOperator.IsNumber(rtText.Left)&&IFrameSplitOperator.IsNumber(rtText.Bottom)){mapTextRect.set(3,{Rect:rtText,Item:item});}if(item.Type==3||item.Type==4){if(item.Title){var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
2155
+ var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(top,bgTop,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){if(this.GetEventCallback){var bgTop=yText-textHeight/2-1*pixelTatio;var sendData={Top:bgTop,Left:right,Right:this.ChartBorder.GetChartWidth(),Height:null,IsShow:true,BGColor:item.LineColor,TextColor:item.TextColor,PixelTatio:pixelTatio,Position:"Right",IsInside:false};if(this.SendDrawCountDownEvent(sendData)){if(IFrameSplitOperator.IsPlusNumber(sendData.Height))yText+=textHeight+1*pixelTatio;}}}else{var bgTop=yText-textHeight/2-1*pixelTatio;if(i==0){var textLeft=right;rtText.Left=textLeft;if(preTextRect&&bgTop<preTextRect.Rect.Bottom){yText=preTextRect.Rect.Bottom;bgTop=yText-textHeight/2-1*pixelTatio;}}else{var textLeft=right+textWidth-itemText.Width;}if(item.ExtendLine&&item.ExtendLine[1])//右侧延长线
2156
+ {var exLine=item.ExtendLine[1];if(IFrameSplitOperator.IsNumber(exLine.Width)){if(i==0)this.DrawLine(right,right+exLine.Width,y,item.LineColor,item.LineType,item);textLeft+=exLine.Width;}}if(emptyBGColor){this.Canvas.fillStyle=emptyBGColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width+1,textHeight);this.Canvas.strokeStyle=item.LineColor;this.Canvas.strokeRect(ToFixedPoint(textLeft),ToFixedPoint(bgTop),ToFixedRect(itemText.Width+1),ToFixedRect(textHeight));this.Canvas.fillStyle=item.LineColor;this.Canvas.fillText(itemText.Text,textLeft+2*pixelTatio,yText);}else{this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);if(itemText.TextColor)this.Canvas.fillStyle=itemText.TextColor;else this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);}if(i==0)this.DrawLine(left,right,y,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;rtText.Bottom=yText;}}}if(mapTextRect&&IFrameSplitOperator.IsNumber(rtText.Left)&&IFrameSplitOperator.IsNumber(rtText.Bottom)){mapTextRect.set(3,{Rect:rtText,Item:item});}if(item.Type==3||item.Type==4){if(item.Title){var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
2155
2157
  var width=this.Canvas.measureText(item.Title).width+2*pixelTatio;if(this.IsHScreen){var bgTop=bottom-width;var textLeft=y-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,width);this.DrawHScreenText({X:y,Y:bgTop},{Text:item.Title,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});}else{var bgTop=y-textHeight/2-1*pixelTatio;var textLeft=right-width-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Title,textLeft+1*pixelTatio,y);}}}}}};this.SendDrawCountDownEvent=function(sendData){if(!this.GetEventCallback)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_COUNTDOWN);if(!event||!event.Callback)return false;event.Callback(event,sendData,this);return true;};this.DrawDotLine=function(left,right,y,color,option){var pixelTatio=GetDevicePixelRatio();this.Canvas.save();this.Canvas.strokeStyle=color;if(option&&IFrameSplitOperator.IsPlusNumber(option.LineWidth))this.Canvas.lineWidth=option.LineWidth*pixelTatio;if(option.LineDash)this.Canvas.setLineDash(option.LineDash);else this.Canvas.setLineDash([5*pixelTatio,5*pixelTatio]);//虚线
2156
2158
  this.Canvas.beginPath();if(this.IsHScreen){this.Canvas.moveTo(ToFixedPoint(y),left);this.Canvas.lineTo(ToFixedPoint(y),right);}else{this.Canvas.moveTo(left,ToFixedPoint(y));this.Canvas.lineTo(right,ToFixedPoint(y));}this.Canvas.stroke();this.Canvas.restore();};this.DrawLine=function(left,right,y,color,lineType,option){if(lineType==-1)return;if(lineType==0){var pixelRatio=GetDevicePixelRatio();this.Canvas.strokeStyle=color;var bChangeLineWidth=false;if(option&&IFrameSplitOperator.IsPlusNumber(option.LineWidth)){this.Canvas.lineWidth=option.LineWidth*pixelRatio;bChangeLineWidth=true;}this.Canvas.beginPath();if(this.IsHScreen){this.Canvas.moveTo(ToFixedPoint(y),left);this.Canvas.lineTo(ToFixedPoint(y),right);}else{this.Canvas.moveTo(left,ToFixedPoint(y));this.Canvas.lineTo(right,ToFixedPoint(y));}this.Canvas.stroke();if(bChangeLineWidth){this.Canvas.lineWidth=pixelRatio;}}else{this.DrawDotLine(left,right,y,color,option);}};this.DrawHScreenText=function(center,data){this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillStyle=data.Color;this.Canvas.save();this.Canvas.translate(center.X,center.Y);this.Canvas.rotate(90*Math.PI/180);this.Canvas.fillText(data.Text,data.XOffset,data.YOffset);this.Canvas.restore();};this.RGBToStruct=function(rgb){if(/^(rgb|RGB)/.test(rgb)){var aColor=rgb.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");var result={};if(aColor.length!=3)return null;result.R=Number(aColor[0]);result.G=Number(aColor[1]);result.B=Number(aColor[2]);return result;}return null;};this.GetMulitTextMaxWidth=function(aryData){var width=null;for(var i=0;i<aryData.length;++i){var item=aryData[i];var text=item.Text;if(!text)continue;var value=this.Canvas.measureText(text).width;if(width==null)width=value;else if(width<value)width=value;}return width;};this.GetScaleTextWidth=function(){var border=this.ChartBorder.GetBorder();var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
2157
2159
  if(this.IsHScreen){var borderTop=this.ChartBorder.Top;var borderBottom=this.ChartBorder.Bottom;var isDrawLeft=borderTop>10*pixelTatio&&this.IsShowYText[0]===true&&this.YTextPosition[0]!=2;var isDrawRight=borderBottom>10*pixelTatio&&this.IsShowYText[1]===true&&this.YTextPosition[1]!=2;}else{var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var isDrawLeft=borderLeft>10&&this.IsShowYText[0]===true&&this.YTextPosition[0]!=2;var isDrawRight=borderRight>10&&this.IsShowYText[1]===true&&this.YTextPosition[1]!=2;}if(!isDrawRight&&!isDrawLeft)return null;var width={Left:null,Right:null};var rightExtendWidth=0;var isYPercentage=false;//是否是百分比坐标
@@ -4959,9 +4961,9 @@ if(!isLast||option.PositionEx===1){var config={};if(!isLast)config.EmptyBGColor=
4959
4961
  info.ExtendData={Custom:config};}return info;};this.GetFirstOpenPrice=function()//获取显示第1个数据的开盘价
4960
4962
  {if(!this.Data)return null;var xPointCount=this.Frame.XPointCount;for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length&&j<xPointCount;++i,++j){var data=this.Data.Data[i];if(data.Open==null||data.High==null||data.Low==null||data.Close==null)continue;if(ChartData.IsTickPeriod(this.Period))return data.YClose;else return data.Open;}return null;};this.GetLast2ndClose=function()//获取最后第2根K线收盘加
4961
4963
  {if(!this.Data)return null;if(this.Data.Data.length<=0)return null;var xPointCount=this.Frame.XPointCount;var endIndex=this.Data.DataOffset+xPointCount-1;if(endIndex>=this.Data.Data.length)endIndex=this.Data.Data.length-1;var price=null;for(var i=endIndex,count=0;i>=0&&i<this.Data.Data.length;--i){var data=this.Data.Data[i];if(data.Open==null||data.High==null||data.Low==null||data.Close==null)continue;if(count==0)price=data.Open;else if(count==1)price=data.Close;++count;if(count>=2)break;}return price;};this.CustomFixedCoordinate=function(option)//固定坐标刻度
4962
- {var defaultfloatPrecision=GetfloatPrecision(this.Symbol);for(var i in option.Data){var item=option.Data[i];var info=new CoordinateInfo();info.Type=1;info.TextColor=item.TextColor;info.LineColor=item.Color;info.LineType=2;//虚线
4964
+ {var defaultfloatPrecision=GetfloatPrecision(this.Symbol);for(var i=0;i<option.Data.length;++i){var item=option.Data[i];var info=new CoordinateInfo();info.Type=1;info.TextColor=item.TextColor;info.LineColor=item.Color;info.LineType=2;//虚线
4963
4965
  if(IFrameSplitOperator.IsNumber(option.LineType))info.LineType=option.LineType;if(IFrameSplitOperator.IsPlusNumber(option.LineWidth))info.LineWidth=option.LineWidth;if(option.LineDash)info.LineDash=option.LineDash;if(option.IsShowLine==false)info.LineType=-1;info.Value=item.Value;var text;if(item.Text)text=item.Text;else text=info.Value.toFixed(defaultfloatPrecision);if(option.Position=='left')info.Message[0]=text;else info.Message[1]=text;if(option.PositionEx===1)info.ExtendData={Custom:{Position:1}};//强制画在内部
4964
- this.Frame.CustomHorizontalInfo.push(info);}};//////////////////////
4966
+ if(IFrameSplitOperator.IsNonEmptyArray(item.ExtendLine))info.ExtendLine=item.ExtendLine.slice();this.Frame.CustomHorizontalInfo.push(info);}};//////////////////////
4965
4967
  // data.Min data.Max data.Interval data.Count
4966
4968
  //
4967
4969
  this.IntegerCoordinateSplit2=function(data){var splitItem=this.FrameSplitData2.Find(data.Interval);if(!splitItem)return false;if(data.Interval==splitItem.FixInterval)return true;//调整到整数倍数,不能整除的 +1
@@ -12624,7 +12626,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
12624
12626
  this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
12625
12627
  * 版本信息输出
12626
12628
  *
12627
- */var HQCHART_VERSION="1.1.13000";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();//把给外界调用的方法暴露出来
12629
+ */var HQCHART_VERSION="1.1.13002";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();//把给外界调用的方法暴露出来
12628
12630
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
12629
12631
  // BaseIndex:BaseIndex,
12630
12632
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13001",
3
+ "version": "1.1.13003",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -9100,6 +9100,7 @@ function CoordinateInfo()
9100
9100
  this.LineDash=null; //当线段类型==2时 可以设置虚线样式
9101
9101
  this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
9102
9102
  this.LineWidth; //线段宽度
9103
+ this.ExtendLine; //延长线长度[ ] { Width:长度 } [0]=左 [1]=右 实例: [null, { Width: 50}];
9103
9104
  this.ExtendData; //扩展属性
9104
9105
  //百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
9105
9106
  //自定义刻度 { Custom:{ Position: 1=强制内部 }}
@@ -11529,6 +11530,16 @@ function AverageWidthFrame()
11529
11530
  var textLeft=right+textWidth-itemText.Width;
11530
11531
  }
11531
11532
 
11533
+ if (item.ExtendLine && item.ExtendLine[1]) //右侧延长线
11534
+ {
11535
+ var exLine=item.ExtendLine[1];
11536
+ if (IFrameSplitOperator.IsNumber(exLine.Width))
11537
+ {
11538
+ if (i==0) this.DrawLine(right,right+exLine.Width,y,item.LineColor,item.LineType,item);
11539
+ textLeft+=exLine.Width;
11540
+ }
11541
+ }
11542
+
11532
11543
  if (emptyBGColor)
11533
11544
  {
11534
11545
  this.Canvas.fillStyle=emptyBGColor;
@@ -44738,7 +44749,7 @@ function FrameSplitKLinePriceY()
44738
44749
  this.CustomFixedCoordinate=function(option) //固定坐标刻度
44739
44750
  {
44740
44751
  var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
44741
- for(var i in option.Data)
44752
+ for(var i=0; i<option.Data.length; ++i)
44742
44753
  {
44743
44754
  var item=option.Data[i];
44744
44755
  var info=new CoordinateInfo();
@@ -44759,6 +44770,7 @@ function FrameSplitKLinePriceY()
44759
44770
  else info.Message[1]=text;
44760
44771
 
44761
44772
  if (option.PositionEx===1) info.ExtendData={ Custom:{ Position:1 } }; //强制画在内部
44773
+ if (IFrameSplitOperator.IsNonEmptyArray(item.ExtendLine)) info.ExtendLine=item.ExtendLine.slice();
44762
44774
 
44763
44775
  this.Frame.CustomHorizontalInfo.push(info);
44764
44776
  }
@@ -12992,6 +12992,7 @@ function CoordinateInfo()
12992
12992
  this.LineDash=null; //当线段类型==2时 可以设置虚线样式
12993
12993
  this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
12994
12994
  this.LineWidth; //线段宽度
12995
+ this.ExtendLine; //延长线长度[ ] { Width:长度 } [0]=左 [1]=右 实例: [null, { Width: 50}];
12995
12996
  this.ExtendData; //扩展属性
12996
12997
  //百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
12997
12998
  //自定义刻度 { Custom:{ Position: 1=强制内部 }}
@@ -15421,6 +15422,16 @@ function AverageWidthFrame()
15421
15422
  var textLeft=right+textWidth-itemText.Width;
15422
15423
  }
15423
15424
 
15425
+ if (item.ExtendLine && item.ExtendLine[1]) //右侧延长线
15426
+ {
15427
+ var exLine=item.ExtendLine[1];
15428
+ if (IFrameSplitOperator.IsNumber(exLine.Width))
15429
+ {
15430
+ if (i==0) this.DrawLine(right,right+exLine.Width,y,item.LineColor,item.LineType,item);
15431
+ textLeft+=exLine.Width;
15432
+ }
15433
+ }
15434
+
15424
15435
  if (emptyBGColor)
15425
15436
  {
15426
15437
  this.Canvas.fillStyle=emptyBGColor;
@@ -48630,7 +48641,7 @@ function FrameSplitKLinePriceY()
48630
48641
  this.CustomFixedCoordinate=function(option) //固定坐标刻度
48631
48642
  {
48632
48643
  var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
48633
- for(var i in option.Data)
48644
+ for(var i=0; i<option.Data.length; ++i)
48634
48645
  {
48635
48646
  var item=option.Data[i];
48636
48647
  var info=new CoordinateInfo();
@@ -48651,6 +48662,7 @@ function FrameSplitKLinePriceY()
48651
48662
  else info.Message[1]=text;
48652
48663
 
48653
48664
  if (option.PositionEx===1) info.ExtendData={ Custom:{ Position:1 } }; //强制画在内部
48665
+ if (IFrameSplitOperator.IsNonEmptyArray(item.ExtendLine)) info.ExtendLine=item.ExtendLine.slice();
48654
48666
 
48655
48667
  this.Frame.CustomHorizontalInfo.push(info);
48656
48668
  }
@@ -129545,7 +129557,7 @@ function ScrollBarBGChart()
129545
129557
 
129546
129558
 
129547
129559
 
129548
- var HQCHART_VERSION="1.1.13000";
129560
+ var HQCHART_VERSION="1.1.13002";
129549
129561
 
129550
129562
  function PrintHQChartVersion()
129551
129563
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13000";
8
+ var HQCHART_VERSION="1.1.13002";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -13036,6 +13036,7 @@ function CoordinateInfo()
13036
13036
  this.LineDash=null; //当线段类型==2时 可以设置虚线样式
13037
13037
  this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
13038
13038
  this.LineWidth; //线段宽度
13039
+ this.ExtendLine; //延长线长度[ ] { Width:长度 } [0]=左 [1]=右 实例: [null, { Width: 50}];
13039
13040
  this.ExtendData; //扩展属性
13040
13041
  //百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
13041
13042
  //自定义刻度 { Custom:{ Position: 1=强制内部 }}
@@ -15465,6 +15466,16 @@ function AverageWidthFrame()
15465
15466
  var textLeft=right+textWidth-itemText.Width;
15466
15467
  }
15467
15468
 
15469
+ if (item.ExtendLine && item.ExtendLine[1]) //右侧延长线
15470
+ {
15471
+ var exLine=item.ExtendLine[1];
15472
+ if (IFrameSplitOperator.IsNumber(exLine.Width))
15473
+ {
15474
+ if (i==0) this.DrawLine(right,right+exLine.Width,y,item.LineColor,item.LineType,item);
15475
+ textLeft+=exLine.Width;
15476
+ }
15477
+ }
15478
+
15468
15479
  if (emptyBGColor)
15469
15480
  {
15470
15481
  this.Canvas.fillStyle=emptyBGColor;
@@ -48674,7 +48685,7 @@ function FrameSplitKLinePriceY()
48674
48685
  this.CustomFixedCoordinate=function(option) //固定坐标刻度
48675
48686
  {
48676
48687
  var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
48677
- for(var i in option.Data)
48688
+ for(var i=0; i<option.Data.length; ++i)
48678
48689
  {
48679
48690
  var item=option.Data[i];
48680
48691
  var info=new CoordinateInfo();
@@ -48695,6 +48706,7 @@ function FrameSplitKLinePriceY()
48695
48706
  else info.Message[1]=text;
48696
48707
 
48697
48708
  if (option.PositionEx===1) info.ExtendData={ Custom:{ Position:1 } }; //强制画在内部
48709
+ if (IFrameSplitOperator.IsNonEmptyArray(item.ExtendLine)) info.ExtendLine=item.ExtendLine.slice();
48698
48710
 
48699
48711
  this.Frame.CustomHorizontalInfo.push(info);
48700
48712
  }
@@ -129703,7 +129715,7 @@ function HQChartScriptWorker()
129703
129715
 
129704
129716
 
129705
129717
 
129706
- var HQCHART_VERSION="1.1.13000";
129718
+ var HQCHART_VERSION="1.1.13002";
129707
129719
 
129708
129720
  function PrintHQChartVersion()
129709
129721
  {