hqchart 1.1.13565 → 1.1.13569

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.
@@ -2017,7 +2017,7 @@ this.GetOverlayIndexInfo=function(aryIndex){for(var i=0,j=0,k=0;i<this.Frame.Sub
2017
2017
  {info.Args=[];for(k=0;k<indexData.Arguments.length;++k){var argItem=indexData.Arguments[k];info.Args.push({Name:argItem.Name,Value:argItem.Value});}}aryIndex.push(info);}}};//点tab弹菜单
2018
2018
  this.PopupMenuByTab=function(menuData,rtTab){if(!this.JSPopMenu)return;var pixelRatio=GetDevicePixelRatio();var rtCell={Left:rtTab.Left/pixelRatio,Right:rtTab.Right/pixelRatio,Bottom:rtTab.Bottom/pixelRatio,Top:rtTab.Top/pixelRatio};rtCell.Width=rtCell.Right-rtCell.Left;rtCell.Height=rtCell.Bottom-rtCell.Top;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var offsetLeft=rtClient.left+rtScroll.Left;var offsetTop=rtClient.top+rtScroll.Top;rtCell.Left+=offsetLeft;rtCell.Right+=offsetLeft;rtCell.Top+=offsetTop;rtCell.Bottom+=offsetTop;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByTab(rtCell);};//下拉菜单
2019
2019
  this.PopupMenuByDrapdown=function(menuData,rtButton){if(!this.JSPopMenu)return;var pixelRatio=GetDevicePixelRatio();var rtCell={Left:rtButton.Left/pixelRatio,Right:rtButton.Right/pixelRatio,Bottom:rtButton.Bottom/pixelRatio,Top:rtButton.Top/pixelRatio};rtCell.Width=rtCell.Right-rtCell.Left;rtCell.Height=rtCell.Bottom-rtCell.Top;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var offsetLeft=rtClient.left+rtScroll.Left;var offsetTop=rtClient.top+rtScroll.Top;rtCell.Left+=offsetLeft;rtCell.Right+=offsetLeft;rtCell.Top+=offsetTop;rtCell.Bottom+=offsetTop;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByDrapdown(rtCell);};//右键菜单
2020
- this.PopupMenuByRClick=function(menuData,x,y){var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();x+=rtClient.left+rtScroll.Left;y+=rtClient.top+rtScroll.Top;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByRight(x,y);};//菜单命令
2020
+ this.PopupMenuByRClick=function(menuData,x,y){if(!this.JSPopMenu)return;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();x+=rtClient.left+rtScroll.Left;y+=rtClient.top+rtScroll.Top;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByRight(x,y);};//菜单命令
2021
2021
  this.ExecuteMenuCommand=function(cmdID,aryArgs){JSConsole.Chart.Log('[JSChartContainer::ExecuteMenuCommand] cmdID=, aryArgs=',cmdID,aryArgs);var param=null,srcParam=null;//原始值
2022
2022
  if(IFrameSplitOperator.IsNonEmptyArray(aryArgs)){srcParam=aryArgs[0];if(IFrameSplitOperator.IsNumber(aryArgs[0]))param=aryArgs[0];}switch(cmdID){case JSCHART_MENU_ID.CMD_CHANGE_PERIOD_ID:if(this.ChangePeriod&&param!=null)this.ChangePeriod(param);break;case JSCHART_MENU_ID.CMD_CHANGE_WINDOW_COUNT_ID:if(this.ChangeIndexWindowCount&&param!=null)this.ChangeIndexWindowCount(param);break;case JSCHART_MENU_ID.CMD_CHANGE_RIGHT_ID:if(this.ChangeRight&&param!=null)this.ChangeRight(param);break;case JSCHART_MENU_ID.CMD_CHANGE_INDEX_ID:if(this.ChangeIndex&&param!=null&&aryArgs[1])this.ChangeIndex(param,aryArgs[1]);break;case JSCHART_MENU_ID.CMD_CHANGE_API_INDEX_ID:if(this.ChangeAPIIndex&&param!=null&&aryArgs[1])this.ChangeAPIIndex(param,aryArgs[1]);break;case JSCHART_MENU_ID.CMD_CHANGE_SCRIPT_INDEX_ID:if(this.ChangeScriptIndex&&param!=null&&aryArgs[1])this.ChangeScriptIndex(param,aryArgs[1],aryArgs[2]);break;case JSCHART_MENU_ID.CMD_CHANGE_COLOR_INDEX_ID:case JSCHART_MENU_ID.CMD_CHANGE_TRADE_INDEX_ID:if(this.ChangeInstructionIndex&&aryArgs[0])this.ChangeInstructionIndex(aryArgs[0]);break;case JSCHART_MENU_ID.CMD_DELETE_COLOR_INDEX_ID://删除五彩K线指标
2023
2023
  case JSCHART_MENU_ID.CMD_DELETE_TRADE_INDEX_ID://删除专家系统(交易指标)
@@ -5858,7 +5858,7 @@ for(var i=0;i<colorArr.length;i++){var hex=Number(colorArr[i]).toString(16);if(h
5858
5858
  var sep=rgb.indexOf(",")>-1?",":" ";// Turn "rgb(r,g,b)" into [r,g,b]
5859
5859
  rgb=rgb.substr(4).split(")")[0].split(sep);var r=(+rgb[0]).toString(16),g=(+rgb[1]).toString(16),b=(+rgb[2]).toString(16);if(r.length==1)r="0"+r;if(g.length==1)g="0"+g;if(b.length==1)b="0"+b;return"#"+r+g+b;};//16进制颜色转rgb
5860
5860
  IChartDrawPicture.HexToRGB=function(color){color=color.toLowerCase();var reg=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;if(color&&reg.test(color)){if(color.length===4){var sColorNew="#";for(var i=1;i<4;i+=1){sColorNew+=color.slice(i,i+1).concat(color.slice(i,i+1));}color=sColorNew;}//处理六位的颜色值
5861
- var sColorChange=[];for(var i=1;i<7;i+=2){sColorChange.push(parseInt("0x"+color.slice(i,i+2)));}return"rgb("+sColorChange.join(",")+")";}return null;};IChartDrawPicture.ArrayDrawPricture=[{Name:"线段",ClassName:'ChartDrawPictureLine',Create:function Create(){return new ChartDrawPictureLine();}},{Name:"射线",ClassName:'ChartDrawPictureHaflLine',Create:function Create(){return new ChartDrawPictureHaflLine();}},{Name:"箭头",ClassName:"ChartDrawArrowLine",Create:function Create(){return new ChartDrawArrowLine();}},{Name:"水平线",ClassName:'ChartDrawPictureHorizontalLine',Create:function Create(){return new ChartDrawPictureHorizontalLine();}},{Name:"水平射线",ClassName:"ChartDrawPictureHorizontalRay",Create:function Create(){return new ChartDrawPictureHorizontalRay();}},{Name:"趋势线",ClassName:'ChartDrawPictureTrendLine',Create:function Create(){return new ChartDrawPictureTrendLine();}},{Name:"矩形",ClassName:'ChartDrawPictureRect',Create:function Create(){return new ChartDrawPictureRect();}},{Name:"圆弧线",ClassName:'ChartDrawPictureArc',Create:function Create(){return new ChartDrawPictureArc();}},{Name:"M头W底",ClassName:'ChartDrawPictureWaveMW',Create:function Create(){return new ChartDrawPictureWaveMW();}},{Name:"头肩型",ClassName:"ChartDrawHeadShouldersBT",Create:function Create(){return new ChartDrawHeadShouldersBT();}},{Name:"平行线",ClassName:'ChartDrawPictureParallelLines',Create:function Create(){return new ChartDrawPictureParallelLines();}},{Name:"平行通道",ClassName:'ChartDrawPictureParallelChannel',Create:function Create(){return new ChartDrawPictureParallelChannel();}},{Name:"价格通道线",ClassName:'ChartDrawPicturePriceChannel',Create:function Create(){return new ChartDrawPicturePriceChannel();}},{Name:"文本",ClassName:'ChartDrawPictureText',Create:function Create(){return new ChartDrawPictureText();}},{Name:"江恩角度线",ClassName:'ChartDrawPictureGannFan',Create:function Create(){return new ChartDrawPictureGannFan();}},{Name:"阻速线",ClassName:'ChartDrawPictureResistanceLine',Create:function Create(){return new ChartDrawPictureResistanceLine();}},{Name:"黄金分割",ClassName:'ChartDrawPictureGoldenSection',Create:function Create(){return new ChartDrawPictureGoldenSection();}},{Name:"百分比线",ClassName:'ChartDrawPicturePercentage',Create:function Create(){return new ChartDrawPicturePercentage();}},{Name:"波段线",ClassName:'ChartDrawPictureWaveBand',Create:function Create(){return new ChartDrawPictureWaveBand();}},{Name:"三角形",ClassName:'ChartDrawPictureTriangle',Create:function Create(){return new ChartDrawPictureTriangle();}},{Name:"对称角度",ClassName:'ChartDrawPictureSymmetryAngle',Create:function Create(){return new ChartDrawPictureSymmetryAngle();}},{Name:"圆",ClassName:'ChartDrawPictureCircle',Create:function Create(){return new ChartDrawPictureCircle();}},{Name:"平行四边形",ClassName:'ChartDrawPictureQuadrangle',Create:function Create(){return new ChartDrawPictureQuadrangle();}},{Name:"斐波那契周期线",ClassName:'ChartDrawPictureFibonacci',Create:function Create(){return new ChartDrawPictureFibonacci();}},{Name:"线形回归线",ClassName:"ChartDrawLinearRegression",Create:function Create(){return new ChartDrawLinearRegression();}},{Name:"线形回归带",ClassName:"ChartDrawLinearRegression",Create:function Create(){return new ChartDrawLinearRegression({IsShowMaxMinLine:true});}},{Name:"延长线形回归带",ClassName:"ChartDrawLinearRegression",Create:function Create(){return new ChartDrawLinearRegression({IsShowMaxMinLine:true,IsShowExtendLine:true});}},{Name:"尺子",ClassName:"ChartDrawRuler",Create:function Create(){return new ChartDrawRuler();}},{Name:"标价线",ClassName:"ChartDrawPriceLine",Create:function Create(){return new ChartDrawPriceLine();}},{Name:"标价线2",ClassName:"ChartDrawPriceLineV2",Create:function Create(){return new ChartDrawPriceLineV2();}},{Name:"垂直线",ClassName:"ChartDrawVerticalLine",Create:function Create(){return new ChartDrawVerticalLine();}},{Name:"十字线",ClassName:"ChartDrawCrosshair",Create:function Create(){return new ChartDrawCrosshair();}},{Name:"波浪尺",ClassName:"ChartDrawWaveRuler",Create:function Create(){return new ChartDrawWaveRuler();}},{Name:"AB波浪尺",ClassName:"ChartDrawWaveRuler2Point",Create:function Create(){return new ChartDrawWaveRuler2Point();}},{Name:"箱型线",ClassName:"ChartDrawBox",Create:function Create(){return new ChartDrawBox();}},{Name:"2点画图例子",ClassName:"ChartDrawTwoPointDemo",Create:function Create(){return new ChartDrawTwoPointDemo();}},{Name:"3点画图例子",ClassName:"ChartDrawThreePointDemo",Create:function Create(){return new ChartDrawThreePointDemo();}},{Name:"水平线段",ClassName:"ChartDrawHLineSegment",Create:function Create(){return new ChartDrawHLineSegment();}},{Name:"平行射线",ClassName:"ChartDrawParallelRaysLines",Create:function Create(){return new ChartDrawParallelRaysLines();}},{ClassName:'ChartDrawPictureIconFont',Create:function Create(){return new ChartDrawPictureIconFont();}},//涂鸦 不绑定K线坐标
5861
+ var sColorChange=[];for(var i=1;i<7;i+=2){sColorChange.push(parseInt("0x"+color.slice(i,i+2)));}return"rgb("+sColorChange.join(",")+")";}return null;};IChartDrawPicture.ArrayDrawPricture=[{Name:"线段",ClassName:'ChartDrawPictureLine',Create:function Create(){return new ChartDrawPictureLine();}},{Name:"射线",ClassName:'ChartDrawPictureHaflLine',Create:function Create(){return new ChartDrawPictureHaflLine();}},{Name:"箭头",ClassName:"ChartDrawArrowLine",Create:function Create(){return new ChartDrawArrowLine();}},{Name:"水平线",ClassName:'ChartDrawPictureHorizontalLine',Create:function Create(){return new ChartDrawPictureHorizontalLine();}},{Name:"水平射线",ClassName:"ChartDrawPictureHorizontalRay",Create:function Create(){return new ChartDrawPictureHorizontalRay();}},{Name:"趋势线",ClassName:'ChartDrawPictureTrendLine',Create:function Create(){return new ChartDrawPictureTrendLine();}},{Name:"矩形",ClassName:'ChartDrawPictureRect',Create:function Create(){return new ChartDrawPictureRect();}},{Name:"圆弧线",ClassName:'ChartDrawPictureArc',Create:function Create(){return new ChartDrawPictureArc();}},{Name:"M头W底",ClassName:'ChartDrawPictureWaveMW',Create:function Create(){return new ChartDrawPictureWaveMW();}},{Name:"头肩型",ClassName:"ChartDrawHeadShouldersBT",Create:function Create(){return new ChartDrawHeadShouldersBT();}},{Name:"平行线",ClassName:'ChartDrawPictureParallelLines',Create:function Create(){return new ChartDrawPictureParallelLines();}},{Name:"平行通道",ClassName:'ChartDrawPictureParallelChannel',Create:function Create(){return new ChartDrawPictureParallelChannel();}},{Name:"价格通道线",ClassName:'ChartDrawPicturePriceChannel',Create:function Create(){return new ChartDrawPicturePriceChannel();}},{Name:"文本",ClassName:'ChartDrawPictureText',Create:function Create(){return new ChartDrawPictureText();}},{Name:"江恩角度线",ClassName:'ChartDrawPictureGannFan',Create:function Create(){return new ChartDrawPictureGannFan();}},{Name:"阻速线",ClassName:'ChartDrawPictureResistanceLine',Create:function Create(){return new ChartDrawPictureResistanceLine();}},{Name:"阻速线2",ClassName:'ChartDrawPictureResistanceLineV2',Create:function Create(){return new ChartDrawPictureResistanceLineV2();}},{Name:"黄金分割",ClassName:'ChartDrawPictureGoldenSection',Create:function Create(){return new ChartDrawPictureGoldenSection();}},{Name:"百分比线",ClassName:'ChartDrawPicturePercentage',Create:function Create(){return new ChartDrawPicturePercentage();}},{Name:"波段线",ClassName:'ChartDrawPictureWaveBand',Create:function Create(){return new ChartDrawPictureWaveBand();}},{Name:"三角形",ClassName:'ChartDrawPictureTriangle',Create:function Create(){return new ChartDrawPictureTriangle();}},{Name:"对称角度",ClassName:'ChartDrawPictureSymmetryAngle',Create:function Create(){return new ChartDrawPictureSymmetryAngle();}},{Name:"圆",ClassName:'ChartDrawPictureCircle',Create:function Create(){return new ChartDrawPictureCircle();}},{Name:"平行四边形",ClassName:'ChartDrawPictureQuadrangle',Create:function Create(){return new ChartDrawPictureQuadrangle();}},{Name:"斐波那契周期线",ClassName:'ChartDrawPictureFibonacci',Create:function Create(){return new ChartDrawPictureFibonacci();}},{Name:"线形回归线",ClassName:"ChartDrawLinearRegression",Create:function Create(){return new ChartDrawLinearRegression();}},{Name:"线形回归带",ClassName:"ChartDrawLinearRegression",Create:function Create(){return new ChartDrawLinearRegression({IsShowMaxMinLine:true});}},{Name:"延长线形回归带",ClassName:"ChartDrawLinearRegression",Create:function Create(){return new ChartDrawLinearRegression({IsShowMaxMinLine:true,IsShowExtendLine:true});}},{Name:"尺子",ClassName:"ChartDrawRuler",Create:function Create(){return new ChartDrawRuler();}},{Name:"标价线",ClassName:"ChartDrawPriceLine",Create:function Create(){return new ChartDrawPriceLine();}},{Name:"标价线2",ClassName:"ChartDrawPriceLineV2",Create:function Create(){return new ChartDrawPriceLineV2();}},{Name:"垂直线",ClassName:"ChartDrawVerticalLine",Create:function Create(){return new ChartDrawVerticalLine();}},{Name:"十字线",ClassName:"ChartDrawCrosshair",Create:function Create(){return new ChartDrawCrosshair();}},{Name:"波浪尺",ClassName:"ChartDrawWaveRuler",Create:function Create(){return new ChartDrawWaveRuler();}},{Name:"AB波浪尺",ClassName:"ChartDrawWaveRuler2Point",Create:function Create(){return new ChartDrawWaveRuler2Point();}},{Name:"箱型线",ClassName:"ChartDrawBox",Create:function Create(){return new ChartDrawBox();}},{Name:"2点画图例子",ClassName:"ChartDrawTwoPointDemo",Create:function Create(){return new ChartDrawTwoPointDemo();}},{Name:"3点画图例子",ClassName:"ChartDrawThreePointDemo",Create:function Create(){return new ChartDrawThreePointDemo();}},{Name:"水平线段",ClassName:"ChartDrawHLineSegment",Create:function Create(){return new ChartDrawHLineSegment();}},{Name:"平行射线",ClassName:"ChartDrawParallelRaysLines",Create:function Create(){return new ChartDrawParallelRaysLines();}},{ClassName:'ChartDrawPictureIconFont',Create:function Create(){return new ChartDrawPictureIconFont();}},//涂鸦 不绑定K线坐标
5862
5862
  {Name:"涂鸦线段",ClassName:'ChartDrawGraffitiLine',Create:function Create(){return new ChartDrawGraffitiLine();}},{Name:"固定范围成交量分布图",ClassName:"ChartDrawVolProfile",Create:function Create(){return new ChartDrawVolProfile();}},{Name:"DisjointChannel",ClassName:"ChartDrawDisjontChannel",Create:function Create(){return new ChartDrawDisjontChannel();}},{Name:"FlatTop",ClassName:"ChartDrawFlatTop",Create:function Create(){return new ChartDrawFlatTop();}},{Name:"水平线2",ClassName:"ChartDrawHLine",Create:function Create(){return new ChartDrawHLine();}},{Name:"MonitorLine",ClassName:"ChartDrawMonitorLine",Create:function Create(){return new ChartDrawMonitorLine();}},//trading view样式
5863
5863
  {Name:"Note",ClassName:"ChartDrawNote",Create:function Create(){return new ChartDrawNote();}},{Name:"AnchoredText",ClassName:"ChartDrawAnchoredText",Create:function Create(){return new ChartDrawAnchoredText();}},{Name:"PriceLabel",ClassName:"ChartDrawPriceLabel",Create:function Create(){return new ChartDrawPriceLabel();}},{Name:"PriceNote",ClassName:"ChartDrawPriceNote",Create:function Create(){return new ChartDrawPriceNote();}},{Name:"FibWedge",ClassName:"ChartDrawFibWedge",Create:function Create(){return new ChartDrawFibWedge();}},{Name:"FibRetracement",ClassName:"ChartFibRetracement",Create:function Create(){return new ChartFibRetracement();}},//斐波那契回测
5864
5864
  {Name:"FibSpeedResistanceFan",ClassName:"ChartFibSpeedResistanceFan",Create:function Create(){return new ChartFibSpeedResistanceFan();}},//斐波那契扇形
@@ -6084,34 +6084,20 @@ this.SetOption=function(option){if(!option)return;if(option.LineColor)this.LineC
6084
6084
  this.Canvas.restore();};//根据设置动态生成字体
6085
6085
  this.GetTextFont=function(){if(!this.FontOption||!this.FontOption.Family||this.FontOption.Size<=0)return null;var font='';if(this.FontOption.Size>=0)font+=this.FontOption.Size*GetDevicePixelRatio()+'px ';font+=this.FontOption.Family;return font;};this.IsPointIn=function(x,y){if(!this.Frame||this.Status!=10)return-1;var data=this.Frame.Data;if(!data)return-1;if(!this.TextRect)return-1;var offset=0;if(this.Option&&this.Option.Zoom>=1){offset=this.Option.Zoom*GetDevicePixelRatio();}this.Canvas.beginPath();this.Canvas.rect(this.TextRect.Left-offset,this.TextRect.Top-offset,this.TextRect.Width+offset*2,this.TextRect.Height+offset*2);if(this.Canvas.isPointInPath(x,y))return 100;return-1;};}//江恩角度线(Gann Fan),亦又称作甘氏线的
6086
6086
  function ChartDrawPictureGannFan(){this.newMethod=IChartDrawPicture;//派生
6087
- this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureGannFan';this.IsPointIn=this.IsPointIn_XYValue_Line;this.LinePoint=[];this.Font=16*GetDevicePixelRatio()+"px 微软雅黑";this.Draw=function(){this.LinePoint=[];if(this.IsFrameMinSize())return;if(!this.IsShow)return;var drawPoint=this.CalculateDrawPoint({IsCheckX:true,IsCheckY:true});if(!drawPoint)return;if(drawPoint.length!=2)return;this.AreaColor=IChartDrawPicture.ColorToRGBA(this.LineColor,0.3);this.ClipFrame();var quadrant=this.GetQuadrant(drawPoint[0],drawPoint[1]);this.SetLineWidth();if(quadrant===1||quadrant===4){this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);this.DrawArea();for(var i in this.LinePoint){var item=this.LinePoint[i];this.DrawLine(item.Start,item.End,item.IsDottedLine);}for(var i in this.LinePoint){var item=this.LinePoint[i];if(item.Text&&item.PtEnd)this.DrawTitle(item.PtEnd,item.Text);}}else{this.DrawLine(drawPoint[0],drawPoint[1],false);}this.RestoreLineWidth();this.Canvas.restore();this.DrawPoint(drawPoint);//画点
6087
+ this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureGannFan';this.IsPointIn=this.IsPointIn_XYValue_Line;this.LinePoint=[];this.Font=16*GetDevicePixelRatio()+"px 微软雅黑";this.LineDash=[5,10];this.EnableDottedLine=false;//辅助线是否使用虚线
6088
+ this.EnableArea=true;//是否绘制面积图
6089
+ this.Super_SetOption=this.SetOption;//父类函数
6090
+ this.SetOption=function(option){if(this.Super_SetOption)this.Super_SetOption(option);if(option){if(option.Font)this.Font=option.Font;if(Array.isArray(option.LineDash))this.LineDash=option.LineDash;if(IFrameSplitOperator.IsBool(option.EnableDottedLine))this.EnableDottedLine=option.EnableDottedLine;if(IFrameSplitOperator.IsBool(option.EnableArea))this.EnableArea=option.EnableArea;}};this.Draw=function(){this.LinePoint=[];if(this.IsFrameMinSize())return;if(!this.IsShow)return;var drawPoint=this.CalculateDrawPoint({IsCheckX:true,IsCheckY:true});if(!drawPoint)return;if(drawPoint.length!=2)return;this.AreaColor=IChartDrawPicture.ColorToRGBA(this.LineColor,0.3);this.ClipFrame();var quadrant=this.GetQuadrant(drawPoint[0],drawPoint[1]);this.SetLineWidth();if(quadrant===1||quadrant===2||quadrant===3||quadrant===4){this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);if(this.EnableArea)this.DrawArea();for(var i in this.LinePoint){var item=this.LinePoint[i];this.DrawLine(item.Start,item.End,item.IsDottedLine);}for(var i in this.LinePoint){var item=this.LinePoint[i];if(item.Text&&item.PtEnd)this.DrawTitle(item.PtEnd,item.Text);}}else{this.DrawLine(drawPoint[0],drawPoint[1],false);}this.RestoreLineWidth();this.Canvas.restore();this.DrawPoint(drawPoint);//画点
6088
6091
  };//获取在第几象限
6089
- 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;};//isDotline 是否是虚线
6090
- this.DrawLine=function(ptStart,ptEnd,isDottedline){if(isDottedline)this.Canvas.setLineDash([5,10]);this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(ptStart.X,ptStart.Y);this.Canvas.lineTo(ptEnd.X,ptEnd.Y);this.Canvas.stroke();if(isDottedline)this.Canvas.setLineDash([]);};this.DrawTitle=function(pt,text){this.Canvas.fillStyle=this.LineColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";this.Canvas.font=this.Font;this.Canvas.fillText(text,pt.X,pt.Y);};this.DrawArea=function(){var lineStart=null,lineEnd=null;for(var i in this.LinePoint){var item=this.LinePoint[i];if(item.Text=='1:8')lineStart=this.LinePoint[i];else if(item.Text=='8:1')lineEnd=this.LinePoint[i];}if(!lineStart||!lineEnd)return;this.Canvas.fillStyle=this.AreaColor;this.Canvas.beginPath();this.Canvas.moveTo(lineStart.End.X,lineStart.End.Y);this.Canvas.lineTo(lineStart.Start.X,lineStart.Start.Y);this.Canvas.lineTo(lineEnd.End.X,lineEnd.End.Y);this.Canvas.closePath();this.Canvas.fill();};//计算线段
6091
- this.CalculateLines=function(ptStart,ptEnd,quadrant){if(!this.Frame)return false;var top=this.Frame.ChartBorder.GetTopEx();var right=this.Frame.ChartBorder.GetRight();var bottom=this.Frame.ChartBorder.GetBottom();var SPLIT_LINE_VALUE=[0.5,1.0/3,0.25,0.125,2.0/3];var SPLIT_LINE_X_TITLE=["1:2","1:3","1:4","1:8","2:3"];var SPLIT_LINE_Y_TITLE=["2:1","3:1","4:1","8:1","3:2"];var ptLineStart=new Point();var ptLineEnd=new Point();ptLineStart.X=ptStart.X;ptLineStart.Y=ptStart.Y;ptLineEnd.X=ptEnd.X;ptLineEnd.Y=ptEnd.Y;var lineWidth=Math.abs(ptStart.X-ptEnd.X);var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);if(quadrant===1){/*
6092
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
6093
- line.End.X=ptStart.X;
6094
- line.End.Y=top;
6095
- this.LinePoint.push(line);
6096
-
6097
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
6098
- line.End.X=right;
6099
- line.End.Y=ptStart.Y;
6100
- this.LinePoint.push(line);
6101
- */var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.Start,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i in SPLIT_LINE_VALUE){if(lineWidth>5){line={Start:ptLineStart,End:null,IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};line.PtEnd.Y=ptEnd.Y;line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}}}else if(quadrant==4){/*
6102
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
6103
- line.End.X=ptStart.X;
6104
- line.End.Y=bottom;
6105
- this.LinePoint.push(line);
6106
-
6107
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
6108
- line.End.X=right;
6109
- line.End.Y=ptStart.Y;
6110
- this.LinePoint.push(line);
6111
- */var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.End,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i in SPLIT_LINE_VALUE){if(lineWidth>5){line={Start:ptLineStart,End:null,IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};line.PtEnd.Y=ptEnd.Y;line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}}}else return false;return true;};}//阻速线 (高 3等份)
6092
+ 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;};//isDotline 是否是虚线
6093
+ this.DrawLine=function(ptStart,ptEnd,isDottedline){if(isDottedline)this.Canvas.setLineDash(this.LineDash);this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(ptStart.X,ptStart.Y);this.Canvas.lineTo(ptEnd.X,ptEnd.Y);this.Canvas.stroke();if(isDottedline)this.Canvas.setLineDash([]);};this.DrawTitle=function(pt,text){this.Canvas.fillStyle=this.LineColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";this.Canvas.font=this.Font;this.Canvas.fillText(text,pt.X,pt.Y);};this.DrawArea=function(){var lineStart=null,lineEnd=null;for(var i in this.LinePoint){var item=this.LinePoint[i];if(item.Text=='1:8')lineStart=this.LinePoint[i];else if(item.Text=='8:1')lineEnd=this.LinePoint[i];}if(!lineStart||!lineEnd)return;this.Canvas.fillStyle=this.AreaColor;this.Canvas.beginPath();this.Canvas.moveTo(lineStart.End.X,lineStart.End.Y);this.Canvas.lineTo(lineStart.Start.X,lineStart.Start.Y);this.Canvas.lineTo(lineEnd.End.X,lineEnd.End.Y);this.Canvas.closePath();this.Canvas.fill();};//计算线段
6094
+ this.CalculateLines=function(ptStart,ptEnd,quadrant){if(!this.Frame)return false;var top=this.Frame.ChartBorder.GetTopEx();var right=this.Frame.ChartBorder.GetRight();var bottom=this.Frame.ChartBorder.GetBottom();var SPLIT_LINE_VALUE=[0.5,1.0/3,0.25,0.125,2.0/3];var SPLIT_LINE_X_TITLE=["1:2","1:3","1:4","1:8","2:3"];var SPLIT_LINE_Y_TITLE=["2:1","3:1","4:1","8:1","3:2"];var ptLineStart=new Point();var ptLineEnd=new Point();ptLineStart.X=ptStart.X;ptLineStart.Y=ptStart.Y;ptLineEnd.X=ptEnd.X;ptLineEnd.Y=ptEnd.Y;var lineWidth=Math.abs(ptStart.X-ptEnd.X);var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);if(quadrant===1){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.Start,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineWidth>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};line.PtEnd.Y=ptEnd.Y;line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}}}else if(quadrant==2){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.Start,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineWidth>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};line.PtEnd.Y=ptEnd.Y;line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}}}else if(quadrant==3){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.End,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineWidth>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};line.PtEnd.Y=ptEnd.Y;line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}}}else if(quadrant==4){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.End,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineWidth>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};line.PtEnd.Y=ptEnd.Y;line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}}}else{return false;}return true;};}//阻速线 (高 3等份)
6112
6095
  function ChartDrawPictureResistanceLine(){this.newMethod=ChartDrawPictureGannFan;//派生
6113
6096
  this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureResistanceLine';//计算线段
6114
- this.CalculateLines=function(ptStart,ptEnd,quadrant){if(!this.Frame)return false;var top=this.Frame.ChartBorder.GetTopEx();var right=this.Frame.ChartBorder.GetRight();var bottom=this.Frame.ChartBorder.GetBottom();var SPLIT_LINE_VALUE=[1.0/3,2.0/3];var SPLIT_LINE_Y_TITLE=["3:1","3:2"];var ptLineStart=new Point();var ptLineEnd=new Point();ptLineStart.X=ptStart.X;ptLineStart.Y=ptStart.Y;ptLineEnd.X=ptEnd.X;ptLineEnd.Y=ptEnd.Y;var lineWidth=Math.abs(ptStart.X-ptEnd.X);var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);if(quadrant===1){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.Start,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i in SPLIT_LINE_VALUE){if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}}}else if(quadrant==4){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.End,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i in SPLIT_LINE_VALUE){if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}}}else return false;return true;};this.DrawArea=function(){var lineStart=null,lineEnd=null;for(var i in this.LinePoint){var item=this.LinePoint[i];if(item.Text=='1:1')lineStart=this.LinePoint[i];else if(item.Text=='3:1')lineEnd=this.LinePoint[i];}if(!lineStart||!lineEnd)return;this.Canvas.fillStyle=this.AreaColor;this.Canvas.beginPath();this.Canvas.moveTo(lineStart.End.X,lineStart.End.Y);this.Canvas.lineTo(lineStart.Start.X,lineStart.Start.Y);this.Canvas.lineTo(lineEnd.End.X,lineEnd.End.Y);this.Canvas.closePath();this.Canvas.fill();};}//黄金分割线
6097
+ this.CalculateLines=function(ptStart,ptEnd,quadrant){if(!this.Frame)return false;var top=this.Frame.ChartBorder.GetTopEx();var right=this.Frame.ChartBorder.GetRight();var bottom=this.Frame.ChartBorder.GetBottom();var SPLIT_LINE_VALUE=[1.0/3,2.0/3];var SPLIT_LINE_Y_TITLE=["3:1","3:2"];var ptLineStart=new Point();var ptLineEnd=new Point();ptLineStart.X=ptStart.X;ptLineStart.Y=ptStart.Y;ptLineEnd.X=ptEnd.X;ptLineEnd.Y=ptEnd.Y;var lineWidth=Math.abs(ptStart.X-ptEnd.X);var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);if(quadrant===1){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.Start,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}}}else if(quadrant==2){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.Start,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.Start;this.LinePoint.push(line);}}}else if(quadrant==3){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.End,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}}}else if(quadrant==4){var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);var line={Start:ptLineStart,End:extendLine.End,IsDottedLine:false,PtEnd:ptLineEnd,Text:'1:1'};this.LinePoint.push(line);for(var i=0;i<SPLIT_LINE_VALUE.length;++i){if(lineHeight>5){line={Start:ptLineStart,End:null,IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_Y_TITLE[i]};line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];line.PtEnd.X=ptEnd.X;var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);line.End=extendLine.End;this.LinePoint.push(line);}}}else{return false;}return true;};this.DrawArea=function(){var lineStart=null,lineEnd=null;for(var i in this.LinePoint){var item=this.LinePoint[i];if(item.Text=='1:1')lineStart=this.LinePoint[i];else if(item.Text=='3:1')lineEnd=this.LinePoint[i];}if(!lineStart||!lineEnd)return;this.Canvas.fillStyle=this.AreaColor;this.Canvas.beginPath();this.Canvas.moveTo(lineStart.End.X,lineStart.End.Y);this.Canvas.lineTo(lineStart.Start.X,lineStart.Start.Y);this.Canvas.lineTo(lineEnd.End.X,lineEnd.End.Y);this.Canvas.closePath();this.Canvas.fill();};}//阻速线2 (高 3等份)通达信版本
6098
+ function ChartDrawPictureResistanceLineV2(){this.newMethod=ChartDrawPictureResistanceLine;//派生
6099
+ this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureResistanceLineV2';this.EnableDottedLine=true;//辅助线是否使用虚线
6100
+ this.LineDash=[4,8];this.EnableArea=false;}//黄金分割线
6115
6101
  function ChartDrawPictureGoldenSection(){this.newMethod=IChartDrawPicture;//派生
6116
6102
  this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureGoldenSection';this.IsPointIn=this.IsPointIn_XYValue_Line;this.Font=14*GetDevicePixelRatio()+"px 微软雅黑";this.GetSectionData=function(){var GOLDEN_SECTION_DATA=[0,0.236,0.382,0.5,0.618,0.80,1,1.236,1.382,1.5,1.618,1.8,2];return GOLDEN_SECTION_DATA;};this.Draw=function(){this.LinePoint=[];if(this.IsFrameMinSize())return;if(!this.IsShow)return;var drawPoint=this.CalculateDrawPoint();if(!drawPoint)return;if(drawPoint.length!=2)return;this.AreaColor=IChartDrawPicture.ColorToRGBA(this.LineColor,0.3);this.CalculateLines(drawPoint[0],drawPoint[1]);this.ClipFrame();this.SetLineWidth();for(var i in this.LinePoint){var item=this.LinePoint[i];this.DrawLine(item.Start,item.End,item.IsDottedLine);}this.RestoreLineWidth();for(var i in this.LinePoint){var item=this.LinePoint[i];if(item.Text)this.DrawTitle(item.Start,item.Text);}this.DrawPoint(drawPoint);//画点
6117
6103
  this.Canvas.restore();};this.CalculateHSCreenLines=function(ptStart,ptEnd){var sectionData=this.GetSectionData();var left=this.Frame.ChartBorder.GetTop();var right=this.Frame.ChartBorder.GetBottom();var lineHeight=ptStart.X-ptEnd.X;for(var i=0;i<sectionData.length;++i){var yMove=lineHeight*sectionData[i];var line={Start:new Point(),End:new Point()};line.Start.X=ptStart.X-yMove;line.Start.Y=left;line.End.X=ptStart.X-yMove;line.End.Y=right;var text='';if(i==0)text='Base ';else text=(sectionData[i]*100).toFixed(2)+'% ';var yValue=this.Frame.GetYData(line.Start.X);text+=yValue.toFixed(2);line.Text=text;this.LinePoint.push(line);}};this.CalculateLines=function(ptStart,ptEnd){if(this.Frame.IsHScreen){this.CalculateHSCreenLines(ptStart,ptEnd);return;}var sectionData=this.GetSectionData();var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var lineHeight=ptStart.Y-ptEnd.Y;for(var i=0;i<sectionData.length;++i){var yMove=lineHeight*sectionData[i];var line={Start:new Point(),End:new Point()};line.Start.Y=ptStart.Y-yMove;line.Start.X=left;line.End.Y=ptStart.Y-yMove;line.End.X=right;var text='';if(i==0)text='Base ';else text=(sectionData[i]*100).toFixed(2)+'% ';var yValue=this.Frame.GetYData(line.Start.Y);text+=yValue.toFixed(2);line.Text=text;this.LinePoint.push(line);}};this.DrawLine=function(ptStart,ptEnd){this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(ptStart.X,ptStart.Y);this.Canvas.lineTo(ptEnd.X,ptEnd.Y);this.Canvas.stroke();};this.DrawTitle=function(pt,text){this.Canvas.fillStyle=this.LineColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";this.Canvas.font=this.Font;if(this.Frame.IsHScreen){this.Canvas.save();this.Canvas.translate(pt.X,pt.Y);this.Canvas.rotate(90*Math.PI/180);this.Canvas.fillText(text,0,0);this.Canvas.restore();}else{this.Canvas.fillText(text,pt.X,pt.Y);}};}//百分比线
@@ -13287,7 +13273,7 @@ JSPopMenu.SEPARATOR_LINE_NAME="MENU_SEPARATOR";//分割线
13287
13273
  CMD_DELETE_DRAW_CHART_ID:6,CMD_CHANGE_FONT_COLOR_ID:7,//切换字体颜色
13288
13274
  CMD_CHANGE_BG_COLOR_ID:8,//切换背景色
13289
13275
  CMD_CHANGE_BORDER_COLOR_ID:9//边框颜色
13290
- };function JSDialogDrawTool(){this.AryChartGroup=[{Title:"线段",AryChart:[{Title:'线段',ClassName:'hqchart_drawtool icon-draw_line',Type:0,Data:{ID:"线段"}},{Title:'线段信息',ClassName:'hqchart_drawtool icon-infoline',Type:0,Data:{ID:"InfoLine"}},{Title:'射线',ClassName:'hqchart_drawtool icon-draw_rays',Type:0,Data:{ID:"射线"}},{Title:"趋势线角度",ClassName:"hqchart_drawtool icon-qushixianjiaodu",Type:0,Data:{ID:"TrendAngle"}},{Title:'标价线',ClassName:'hqchart_drawtool icon-price_line',Type:0,Data:{ID:"标价线"}},{Title:'垂直线',ClassName:'hqchart_drawtool icon-vertical_line',Type:0,Data:{ID:"垂直线"}},{Title:'十字线',ClassName:'hqchart_drawtool icon-tubiao_shizixian',Type:0,Data:{ID:"十字线"}},{Title:'箭头',ClassName:'hqchart_drawtool icon-draw_rays',Type:0,Data:{ID:"箭头"}},{Title:'趋势线',ClassName:'hqchart_drawtool icon-draw_trendline',Type:0,Data:{ID:"趋势线"}},{Title:'水平线',ClassName:'hqchart_drawtool icon-draw_hline',Type:0,Data:{ID:"水平线"}},{Title:'水平射线',ClassName:'hqchart_drawtool icon-tubiao_shuipingshexian',Type:0,Data:{ID:"水平射线"}},{Title:'涂鸦线段',ClassName:'hqchart_drawtool icon-draw_line',Type:0,Data:{ID:"涂鸦线段"}},{Title:'阻速线',ClassName:'hqchart_drawtool icon-draw_resline',Type:0,Data:{ID:"阻速线"}},{Title:'江恩角度线',ClassName:'hqchart_drawtool icon-jiangenjiaoduxian',Type:0,Data:{ID:"江恩角度线"}}]},{Title:"通道",AryChart:[{Title:'平行线',ClassName:'hqchart_drawtool icon-draw_parallel_lines',Type:0,Data:{ID:"平行线"}},{Title:'水平线段',ClassName:'hqchart_drawtool icon-draw_hlinesegment',Type:0,Data:{ID:"水平线段"}},{Title:'平行射线',ClassName:'hqchart_drawtool icon-draw_p_rays_lines',Type:0,Data:{ID:"平行射线"}},{Title:'平行通道',ClassName:'hqchart_drawtool icon-draw_parallelchannel',Type:0,Data:{ID:"平行通道"}},{Title:'价格通道线',ClassName:'hqchart_drawtool icon-draw_pricechannel',Type:0,Data:{ID:"价格通道线"}},{Title:'箱型线',ClassName:'hqchart_drawtool icon-draw_box',Type:0,Data:{ID:"箱型线"}},{Title:"不相交通道",ClassName:"hqchart_drawtool icon-buxiangjiaojiao",Type:0,Data:{ID:"DisjointChannel"}},{Title:"平滑顶/底",ClassName:"hqchart_drawtool icon-tubiao_buxiangjiaotongdao",Type:0,Data:{ID:"FlatTop"}},{Title:"波段线",ClassName:'hqchart_drawtool icon-draw_waveband',Type:0,Data:{ID:"波段线"}},{Title:"百分比线",ClassName:'hqchart_drawtool icon-PercentageLine',Type:0,Data:{ID:"百分比线"}},{Title:"黄金分割",ClassName:'hqchart_drawtool icon-GoldenSection',Type:0,Data:{ID:"黄金分割"}},{Title:"线形回归线",ClassName:'hqchart_drawtool icon-linear_3',Type:0,Data:{ID:"线形回归线"}},{Title:"线形回归带",ClassName:'hqchart_drawtool icon-linear_1',Type:0,Data:{ID:"线形回归带"}},{Title:"延长线形回归带",ClassName:'hqchart_drawtool icon-linear_2',Type:0,Data:{ID:"延长线形回归带"}}]},{Title:"形状",AryChart:[{Title:'圆弧线',ClassName:'hqchart_drawtool icon-draw_arc',Type:0,Data:{ID:"圆弧线"}},{Title:'矩形',ClassName:'hqchart_drawtool icon-rectangle',Type:0,Data:{ID:"矩形"}},{Title:'平行四边形',ClassName:'hqchart_drawtool icon-draw_quadrangle',Type:0,Data:{ID:"平行四边形"}},{Title:'三角形',ClassName:'hqchart_drawtool icon-draw_triangle',Type:0,Data:{ID:"三角形"}},{Title:'圆',ClassName:'hqchart_drawtool icon-draw_circle',Type:0,Data:{ID:"圆"}},{Title:'对称角度',ClassName:'hqchart_drawtool icon-draw_symangle',Type:0,Data:{ID:"对称角度"}}]},{Title:"波浪线",AryChart:[{Title:'M头W底',ClassName:'hqchart_drawtool icon-draw_wavemw',Type:0,Data:{ID:"M头W底"}},{Title:'头肩型',ClassName:'hqchart_drawtool icon-draw_head_shoulders_bt',Type:0,Data:{ID:"头肩型"}},{Title:'波浪尺',ClassName:'hqchart_drawtool icon-waveruler',Type:0,Data:{ID:"波浪尺"}},{Title:'AB波浪尺',ClassName:'hqchart_drawtool icon-waveruler',Type:0,Data:{ID:"AB波浪尺"}}]},{Title:"斐波那契",AryChart:[{Title:'斐波那契周期线',ClassName:'hqchart_drawtool icon-feibonaqizhouqixian',Type:0,Data:{ID:"斐波那契周期线"}},{Title:'斐波那契楔形',ClassName:'hqchart_drawtool icon-feibonaqiqixing',Type:0,Data:{ID:"FibWedge"}},{Title:'斐波那契回撤',ClassName:'hqchart_drawtool icon-feibonaqihuiche',Type:0,Data:{ID:"FibRetracement"}},{Title:'斐波那契速度阻力扇',ClassName:'hqchart_drawtool icon-feibonaqisuduzulishan',Type:0,Data:{ID:"FibSpeedResistanceFan"}}]},{Title:"测量工具",AryChart:[{Title:'价格范围',ClassName:'hqchart_drawtool icon-shijianfanwei',Type:0,Data:{ID:"PriceRange"}},{Title:'时间范围',ClassName:'hqchart_drawtool icon-jiagefanwei',Type:0,Data:{ID:"DateRange"}},{Title:"监测线",ClassName:"hqchart_drawtool icon-jiance",Type:0,Data:{ID:"MonitorLine"}}]},{Title:"文字",AryChart:[{Title:"文字",ClassName:'hqchart_drawtool icon-draw_text',Type:0,Data:{ID:"文本"}},{Title:"锚点文字",ClassName:'hqchart_drawtool icon-maodianwenzi',Type:0,Data:{ID:"AnchoredText"}},{Title:"注释",ClassName:'hqchart_drawtool icon-maodian ',Type:0,Data:{ID:"Note"}},{Title:'价格标签',ClassName:'hqchart_drawtool icon-Tooltip',Type:0,Data:{ID:"PriceLabel"}},{Title:'价格注释',ClassName:'hqchart_drawtool icon-tooltiptext',Type:0,Data:{ID:"PriceNote"}},{Title:'向上箭头',ClassName:'iconfont icon-arrow_up',Type:0,Data:{ID:"icon-arrow_up"}},{Title:'向下箭头',ClassName:'iconfont icon-arrow_down',Type:0,Data:{ID:"icon-arrow_down"}},{Title:'向左箭头',ClassName:'iconfont icon-arrow_left',Type:0,Data:{ID:"icon-arrow_left"}},{Title:'向右箭头',ClassName:'iconfont icon-arrow_right',Type:0,Data:{ID:"icon-arrow_right"}}]}];this.ToolConfig={Title:"工具",AryTool:[{Title:"选中",ClassName:'hqchart_drawtool icon-arrow',Type:1,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID}},{Title:'尺子',ClassName:'hqchart_drawtool icon-ruler',Type:0,Data:{ID:"尺子"}},{Title:"磁铁",ClassName:'hqchart_drawtool icon-xifu',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_ENABLE_MAGNET_ID}},{Title:"点击切换颜色",ClassName:'hqchart_drawtool icon-fangkuai',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID}},{Title:"擦除画线",ClassName:'hqchart_drawtool icon-a-xiangpicachuxiangpica',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID}},{Title:"删除所有画线",ClassName:'hqchart_drawtool icon-recycle_bin',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID}}]};this.DivDialog=null;this.AryDivChart=[];this.HQChart=null;this.LineColor='rgb(255,140,0)';this.LineColorIndex=0;this.RandomLineColor=["rgb(255,69,0)","rgb(0,191,255)","rgb(255,0,255)","rgb(255,105,180)"];this.LineWidth=1*GetDevicePixelRatio();this.ColumnCount=5;this.DragTitle=null;this.Inital=function(hqchart){this.LineColor=g_JSChartResource.DrawPicture.LineColor[0];this.RandomLineColor.splice(0,0,this.LineColor);this.HQChart=hqchart;};this.Create=function(){var _this73=this;var divDom=document.createElement("div");divDom.className='UMyChart_DrawTool_Dialog_Div';var divTitle=document.createElement("div");divTitle.className='UMyChart_DrawTool_Title_Div';divTitle.innerText="画图工具";divTitle.onmousedown=function(e){_this73.OnMouseDownTitle(e);};var divClose=document.createElement("div");divClose.className='UMyChart_DrawTool_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this73.Close(e);};divTitle.appendChild(divClose);divDom.appendChild(divTitle);var table=document.createElement("table");table.className="UMyChart_DrawTool_Table";divDom.appendChild(table);var tbody=document.createElement("tbody");tbody.className="UMyChart_DrawTool_Tbody";table.appendChild(tbody);for(var i=0;i<this.AryChartGroup.length;++i){var item=this.AryChartGroup[i];if(!IFrameSplitOperator.IsNonEmptyArray(item.AryChart))continue;this.CreateChartGroupItem(item,tbody);var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_End_Tr';tbody.appendChild(trDom);}//工具栏
13276
+ };function JSDialogDrawTool(){this.AryChartGroup=[{Title:"线段",AryChart:[{Title:'线段',ClassName:'hqchart_drawtool icon-draw_line',Type:0,Data:{ID:"线段"}},{Title:'线段信息',ClassName:'hqchart_drawtool icon-infoline',Type:0,Data:{ID:"InfoLine"}},{Title:'射线',ClassName:'hqchart_drawtool icon-draw_rays',Type:0,Data:{ID:"射线"}},{Title:"趋势线角度",ClassName:"hqchart_drawtool icon-qushixianjiaodu",Type:0,Data:{ID:"TrendAngle"}},{Title:'标价线',ClassName:'hqchart_drawtool icon-price_line',Type:0,Data:{ID:"标价线"}},{Title:'垂直线',ClassName:'hqchart_drawtool icon-vertical_line',Type:0,Data:{ID:"垂直线"}},{Title:'十字线',ClassName:'hqchart_drawtool icon-tubiao_shizixian',Type:0,Data:{ID:"十字线"}},{Title:'箭头',ClassName:'hqchart_drawtool icon-draw_rays',Type:0,Data:{ID:"箭头"}},{Title:'趋势线',ClassName:'hqchart_drawtool icon-draw_trendline',Type:0,Data:{ID:"趋势线"}},{Title:'水平线',ClassName:'hqchart_drawtool icon-draw_hline',Type:0,Data:{ID:"水平线"}},{Title:'水平射线',ClassName:'hqchart_drawtool icon-tubiao_shuipingshexian',Type:0,Data:{ID:"水平射线"}},{Title:'涂鸦线段',ClassName:'hqchart_drawtool icon-draw_line',Type:0,Data:{ID:"涂鸦线段"}},{Title:'阻速线',ClassName:'hqchart_drawtool icon-draw_resline',Type:0,Data:{ID:"阻速线"}},{Title:'通达信阻速线',ClassName:'hqchart_drawtool icon-draw_resline',Type:0,Data:{ID:"阻速线2"}},{Title:'江恩角度线',ClassName:'hqchart_drawtool icon-jiangenjiaoduxian',Type:0,Data:{ID:"江恩角度线"}}]},{Title:"通道",AryChart:[{Title:'平行线',ClassName:'hqchart_drawtool icon-draw_parallel_lines',Type:0,Data:{ID:"平行线"}},{Title:'水平线段',ClassName:'hqchart_drawtool icon-draw_hlinesegment',Type:0,Data:{ID:"水平线段"}},{Title:'平行射线',ClassName:'hqchart_drawtool icon-draw_p_rays_lines',Type:0,Data:{ID:"平行射线"}},{Title:'平行通道',ClassName:'hqchart_drawtool icon-draw_parallelchannel',Type:0,Data:{ID:"平行通道"}},{Title:'价格通道线',ClassName:'hqchart_drawtool icon-draw_pricechannel',Type:0,Data:{ID:"价格通道线"}},{Title:'箱型线',ClassName:'hqchart_drawtool icon-draw_box',Type:0,Data:{ID:"箱型线"}},{Title:"不相交通道",ClassName:"hqchart_drawtool icon-buxiangjiaojiao",Type:0,Data:{ID:"DisjointChannel"}},{Title:"平滑顶/底",ClassName:"hqchart_drawtool icon-tubiao_buxiangjiaotongdao",Type:0,Data:{ID:"FlatTop"}},{Title:"波段线",ClassName:'hqchart_drawtool icon-draw_waveband',Type:0,Data:{ID:"波段线"}},{Title:"百分比线",ClassName:'hqchart_drawtool icon-PercentageLine',Type:0,Data:{ID:"百分比线"}},{Title:"黄金分割",ClassName:'hqchart_drawtool icon-GoldenSection',Type:0,Data:{ID:"黄金分割"}},{Title:"线形回归线",ClassName:'hqchart_drawtool icon-linear_3',Type:0,Data:{ID:"线形回归线"}},{Title:"线形回归带",ClassName:'hqchart_drawtool icon-linear_1',Type:0,Data:{ID:"线形回归带"}},{Title:"延长线形回归带",ClassName:'hqchart_drawtool icon-linear_2',Type:0,Data:{ID:"延长线形回归带"}}]},{Title:"形状",AryChart:[{Title:'圆弧线',ClassName:'hqchart_drawtool icon-draw_arc',Type:0,Data:{ID:"圆弧线"}},{Title:'矩形',ClassName:'hqchart_drawtool icon-rectangle',Type:0,Data:{ID:"矩形"}},{Title:'平行四边形',ClassName:'hqchart_drawtool icon-draw_quadrangle',Type:0,Data:{ID:"平行四边形"}},{Title:'三角形',ClassName:'hqchart_drawtool icon-draw_triangle',Type:0,Data:{ID:"三角形"}},{Title:'圆',ClassName:'hqchart_drawtool icon-draw_circle',Type:0,Data:{ID:"圆"}},{Title:'对称角度',ClassName:'hqchart_drawtool icon-draw_symangle',Type:0,Data:{ID:"对称角度"}}]},{Title:"波浪线",AryChart:[{Title:'M头W底',ClassName:'hqchart_drawtool icon-draw_wavemw',Type:0,Data:{ID:"M头W底"}},{Title:'头肩型',ClassName:'hqchart_drawtool icon-draw_head_shoulders_bt',Type:0,Data:{ID:"头肩型"}},{Title:'波浪尺',ClassName:'hqchart_drawtool icon-waveruler',Type:0,Data:{ID:"波浪尺"}},{Title:'AB波浪尺',ClassName:'hqchart_drawtool icon-waveruler',Type:0,Data:{ID:"AB波浪尺"}}]},{Title:"斐波那契",AryChart:[{Title:'斐波那契周期线',ClassName:'hqchart_drawtool icon-feibonaqizhouqixian',Type:0,Data:{ID:"斐波那契周期线"}},{Title:'斐波那契楔形',ClassName:'hqchart_drawtool icon-feibonaqiqixing',Type:0,Data:{ID:"FibWedge"}},{Title:'斐波那契回撤',ClassName:'hqchart_drawtool icon-feibonaqihuiche',Type:0,Data:{ID:"FibRetracement"}},{Title:'斐波那契速度阻力扇',ClassName:'hqchart_drawtool icon-feibonaqisuduzulishan',Type:0,Data:{ID:"FibSpeedResistanceFan"}}]},{Title:"测量工具",AryChart:[{Title:'价格范围',ClassName:'hqchart_drawtool icon-shijianfanwei',Type:0,Data:{ID:"PriceRange"}},{Title:'时间范围',ClassName:'hqchart_drawtool icon-jiagefanwei',Type:0,Data:{ID:"DateRange"}},{Title:"监测线",ClassName:"hqchart_drawtool icon-jiance",Type:0,Data:{ID:"MonitorLine"}}]},{Title:"文字",AryChart:[{Title:"文字",ClassName:'hqchart_drawtool icon-draw_text',Type:0,Data:{ID:"文本"}},{Title:"锚点文字",ClassName:'hqchart_drawtool icon-maodianwenzi',Type:0,Data:{ID:"AnchoredText"}},{Title:"注释",ClassName:'hqchart_drawtool icon-maodian ',Type:0,Data:{ID:"Note"}},{Title:'价格标签',ClassName:'hqchart_drawtool icon-Tooltip',Type:0,Data:{ID:"PriceLabel"}},{Title:'价格注释',ClassName:'hqchart_drawtool icon-tooltiptext',Type:0,Data:{ID:"PriceNote"}},{Title:'向上箭头',ClassName:'iconfont icon-arrow_up',Type:0,Data:{ID:"icon-arrow_up"}},{Title:'向下箭头',ClassName:'iconfont icon-arrow_down',Type:0,Data:{ID:"icon-arrow_down"}},{Title:'向左箭头',ClassName:'iconfont icon-arrow_left',Type:0,Data:{ID:"icon-arrow_left"}},{Title:'向右箭头',ClassName:'iconfont icon-arrow_right',Type:0,Data:{ID:"icon-arrow_right"}}]}];this.ToolConfig={Title:"工具",AryTool:[{Title:"选中",ClassName:'hqchart_drawtool icon-arrow',Type:1,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID}},{Title:'尺子',ClassName:'hqchart_drawtool icon-ruler',Type:0,Data:{ID:"尺子"}},{Title:"磁铁",ClassName:'hqchart_drawtool icon-xifu',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_ENABLE_MAGNET_ID}},{Title:"点击切换颜色",ClassName:'hqchart_drawtool icon-fangkuai',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID}},{Title:"擦除画线",ClassName:'hqchart_drawtool icon-a-xiangpicachuxiangpica',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID}},{Title:"删除所有画线",ClassName:'hqchart_drawtool icon-recycle_bin',Type:2,Data:{ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID}}]};this.DivDialog=null;this.AryDivChart=[];this.HQChart=null;this.LineColor='rgb(255,140,0)';this.LineColorIndex=0;this.RandomLineColor=["rgb(255,69,0)","rgb(0,191,255)","rgb(255,0,255)","rgb(255,105,180)"];this.LineWidth=1*GetDevicePixelRatio();this.ColumnCount=5;this.DragTitle=null;this.Inital=function(hqchart){this.LineColor=g_JSChartResource.DrawPicture.LineColor[0];this.RandomLineColor.splice(0,0,this.LineColor);this.HQChart=hqchart;};this.Create=function(){var _this73=this;var divDom=document.createElement("div");divDom.className='UMyChart_DrawTool_Dialog_Div';var divTitle=document.createElement("div");divTitle.className='UMyChart_DrawTool_Title_Div';divTitle.innerText="画图工具";divTitle.onmousedown=function(e){_this73.OnMouseDownTitle(e);};var divClose=document.createElement("div");divClose.className='UMyChart_DrawTool_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this73.Close(e);};divTitle.appendChild(divClose);divDom.appendChild(divTitle);var table=document.createElement("table");table.className="UMyChart_DrawTool_Table";divDom.appendChild(table);var tbody=document.createElement("tbody");tbody.className="UMyChart_DrawTool_Tbody";table.appendChild(tbody);for(var i=0;i<this.AryChartGroup.length;++i){var item=this.AryChartGroup[i];if(!IFrameSplitOperator.IsNonEmptyArray(item.AryChart))continue;this.CreateChartGroupItem(item,tbody);var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_End_Tr';tbody.appendChild(trDom);}//工具栏
13291
13277
  this.CreateToolGroup(tbody);this.DivDialog=divDom;document.body.appendChild(divDom);};this.Destroy=function(){this.AryDivChart=[];document.body.remove(this.DivDialog);this.DivDialog=null;};this.CreateChartGroupItem=function(groupItem,tbody){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_Tr';tbody.appendChild(trDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Group_Td";tdDom.innerText=groupItem.Title;tdDom.colSpan=this.ColumnCount;trDom.appendChild(tdDom);var chartCount=groupItem.AryChart.length;for(var i=0,j=0;i<chartCount;){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Tr';for(j=0;j<this.ColumnCount&&i<chartCount;++j,++i){var item=groupItem.AryChart[i];this.CreateChartItem(item,trDom);}tbody.appendChild(trDom);}};this.CreateChartItem=function(item,trDom){var _this74=this;var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Td";tdDom.title=item.Title;trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className=item.ClassName;spanDom.classList.add("UMyChart_DrawTool_Span");tdDom.appendChild(spanDom);var data={Item:item,TD:tdDom,Span:spanDom};tdDom.onmousedown=function(e){_this74.OnClickItem(e,data);};//点击
13292
13278
  this.AryDivChart.push(data);};this.OnClickItem=function(e,data){console.log('[JSDialogDrawTool::OnClickChartItem] ',data);if(!data.Item||!data.Item.Data)return;var type=data.Item.Type;var id=data.Item.Data.ID;if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID){this.OnChangeLineColor(data);}else if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_DELETE_ALL_DRAW_CHART_ID){this.DeleteAllChart();}else if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_ERASE_DRAW_CHART_ID){this.ClearAllSelectedChart();this.ClearCurrnetDrawPicture();this.EnableEraseChart(true);}else if(type==1&&id==JS_DRAWTOOL_MENU_ID.CMD_SELECTED_ID){this.ClearAllSelectedChart();this.ClearCurrnetDrawPicture();this.EnableEraseChart(false);}else if(type==2&&id==JS_DRAWTOOL_MENU_ID.CMD_ENABLE_MAGNET_ID){this.ChangeMagnet(data);}else if(type==0){this.ClearAllSelectedChart();this.EnableEraseChart(false);data.Span.classList.remove("UMyChart_DrawTool_Span");data.Span.classList.add("UMyChart_DrawTool_Span_Selected");this.CreateDrawPicture(data);}};//清空选中状态
13293
13279
  this.ClearAllSelectedChart=function(){for(var i=0;i<this.AryDivChart.length;++i){var item=this.AryDivChart[i];if(item.Item.Type==2)continue;item.Span.classList.remove("UMyChart_DrawTool_Span_Selected");item.Span.classList.add("UMyChart_DrawTool_Span");}};this.CreateToolGroup=function(tbody){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Group_Tr';tbody.appendChild(trDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Group_Td";tdDom.innerText=this.ToolConfig.Title;tdDom.colSpan=this.ColumnCount;trDom.appendChild(tdDom);var chartCount=this.ToolConfig.AryTool.length;for(var i=0,j=0;i<chartCount;){var trDom=document.createElement("tr");trDom.className='UMyChart_DrawTool_Tr';for(j=0;j<this.ColumnCount&&i<chartCount;++j,++i){var item=this.ToolConfig.AryTool[i];this.CreateToolItem(item,trDom);}tbody.appendChild(trDom);}};this.CreateToolItem=function(item,trDom){var _this75=this;var tdDom=document.createElement("td");tdDom.className="UMyChart_DrawTool_Td";tdDom.title=item.Title;trDom.appendChild(tdDom);var spanDom=document.createElement("span");spanDom.className=item.ClassName;spanDom.classList.add("UMyChart_DrawTool_Span");tdDom.appendChild(spanDom);var data={Item:item,TD:tdDom,Span:spanDom};if(item.Type==2&&item.Data.ID==JS_DRAWTOOL_MENU_ID.CMD_CHANGE_LINE_COLOR_ID)//颜色
@@ -13327,7 +13313,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13327
13313
  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);};}/********************************************************************************
13328
13314
  * 版本信息输出
13329
13315
  *
13330
- */var HQCHART_VERSION="1.1.13564";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13316
+ */var HQCHART_VERSION="1.1.13568";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13331
13317
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13332
13318
  // BaseIndex:BaseIndex,
13333
13319
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13565",
3
+ "version": "1.1.13569",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -45,6 +45,7 @@ function JSDialogDrawTool()
45
45
  { Title: '水平射线', ClassName: 'hqchart_drawtool icon-tubiao_shuipingshexian', Type:0, Data:{ ID:"水平射线" } },
46
46
  { Title: '涂鸦线段', ClassName: 'hqchart_drawtool icon-draw_line', Type:0, Data:{ ID:"涂鸦线段" } },
47
47
  { Title: '阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线" } },
48
+ { Title: '通达信阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线2" } },
48
49
  { Title: '江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线" } },
49
50
  ]
50
51
  },
@@ -9298,6 +9298,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9298
9298
  //右键菜单
9299
9299
  this.PopupMenuByRClick=function(menuData, x, y)
9300
9300
  {
9301
+ if (!this.JSPopMenu) return;
9302
+
9301
9303
  var rtClient=this.UIElement.getBoundingClientRect();
9302
9304
  var rtScroll=GetScrollPosition();
9303
9305
 
@@ -56357,6 +56359,7 @@ IChartDrawPicture.ArrayDrawPricture=
56357
56359
  { Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
56358
56360
  { Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
56359
56361
  { Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
56362
+ { Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
56360
56363
  { Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
56361
56364
  { Name:"百分比线", ClassName:'ChartDrawPicturePercentage', Create:function() { return new ChartDrawPicturePercentage(); }},
56362
56365
  { Name:"波段线", ClassName:'ChartDrawPictureWaveBand', Create:function() { return new ChartDrawPictureWaveBand(); }},
@@ -59750,6 +59753,23 @@ function ChartDrawPictureGannFan()
59750
59753
  this.IsPointIn=this.IsPointIn_XYValue_Line;
59751
59754
  this.LinePoint=[];
59752
59755
  this.Font=16*GetDevicePixelRatio() +"px 微软雅黑";
59756
+ this.LineDash=[5,10];
59757
+ this.EnableDottedLine=false; //辅助线是否使用虚线
59758
+ this.EnableArea=true; //是否绘制面积图
59759
+
59760
+ this.Super_SetOption=this.SetOption; //父类函数
59761
+
59762
+ this.SetOption=function(option)
59763
+ {
59764
+ if (this.Super_SetOption) this.Super_SetOption(option);
59765
+ if (option)
59766
+ {
59767
+ if (option.Font) this.Font=option.Font;
59768
+ if (Array.isArray(option.LineDash)) this.LineDash=option.LineDash;
59769
+ if (IFrameSplitOperator.IsBool(option.EnableDottedLine)) this.EnableDottedLine=option.EnableDottedLine;
59770
+ if (IFrameSplitOperator.IsBool(option.EnableArea)) this.EnableArea=option.EnableArea;
59771
+ }
59772
+ }
59753
59773
 
59754
59774
 
59755
59775
  this.Draw=function()
@@ -59767,10 +59787,10 @@ function ChartDrawPictureGannFan()
59767
59787
  var quadrant=this.GetQuadrant(drawPoint[0],drawPoint[1]);
59768
59788
 
59769
59789
  this.SetLineWidth();
59770
- if (quadrant===1 || quadrant===4)
59790
+ if (quadrant===1 || quadrant===2 || quadrant===3 || quadrant===4)
59771
59791
  {
59772
59792
  this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
59773
- this.DrawArea();
59793
+ if (this.EnableArea) this.DrawArea();
59774
59794
 
59775
59795
  for(var i in this.LinePoint)
59776
59796
  {
@@ -59798,7 +59818,7 @@ function ChartDrawPictureGannFan()
59798
59818
  this.GetQuadrant=function(ptStart,ptEnd)
59799
59819
  {
59800
59820
  if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 1;
59801
- else if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
59821
+ else if (ptStart.X>ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
59802
59822
  else if (ptStart.X < ptEnd.X && ptStart.Y< ptEnd.Y) return 4;
59803
59823
  else return 3;
59804
59824
  }
@@ -59807,7 +59827,7 @@ function ChartDrawPictureGannFan()
59807
59827
  //isDotline 是否是虚线
59808
59828
  this.DrawLine=function(ptStart,ptEnd,isDottedline)
59809
59829
  {
59810
- if (isDottedline) this.Canvas.setLineDash([5,10]);
59830
+ if (isDottedline) this.Canvas.setLineDash(this.LineDash);
59811
59831
 
59812
59832
  this.Canvas.strokeStyle=this.LineColor;
59813
59833
  this.Canvas.beginPath();
@@ -59869,27 +59889,15 @@ function ChartDrawPictureGannFan()
59869
59889
  var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);
59870
59890
  if (quadrant===1)
59871
59891
  {
59872
- /*
59873
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
59874
- line.End.X=ptStart.X;
59875
- line.End.Y=top;
59876
- this.LinePoint.push(line);
59877
-
59878
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
59879
- line.End.X=right;
59880
- line.End.Y=ptStart.Y;
59881
- this.LinePoint.push(line);
59882
- */
59883
-
59884
59892
  var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
59885
59893
  var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
59886
59894
  this.LinePoint.push(line);
59887
59895
 
59888
- for(var i in SPLIT_LINE_VALUE)
59896
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
59889
59897
  {
59890
59898
  if (lineWidth>5)
59891
59899
  {
59892
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
59900
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
59893
59901
  line.PtEnd.Y=ptEnd.Y;
59894
59902
  line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
59895
59903
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -59898,7 +59906,7 @@ function ChartDrawPictureGannFan()
59898
59906
  }
59899
59907
  if (lineHeight>5)
59900
59908
  {
59901
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
59909
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
59902
59910
  line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
59903
59911
  line.PtEnd.X=ptEnd.X;
59904
59912
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -59908,29 +59916,77 @@ function ChartDrawPictureGannFan()
59908
59916
  }
59909
59917
 
59910
59918
  }
59911
- else if (quadrant==4)
59919
+ else if (quadrant==2)
59912
59920
  {
59913
- /*
59914
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
59915
- line.End.X=ptStart.X;
59916
- line.End.Y=bottom;
59921
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
59922
+ var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
59917
59923
  this.LinePoint.push(line);
59918
59924
 
59919
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
59920
- line.End.X=right;
59921
- line.End.Y=ptStart.Y;
59925
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
59926
+ {
59927
+
59928
+ if (lineWidth>5)
59929
+ {
59930
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
59931
+ line.PtEnd.Y=ptEnd.Y;
59932
+ line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];
59933
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
59934
+ line.End=extendLine.Start;
59935
+ this.LinePoint.push(line);
59936
+ }
59937
+
59938
+
59939
+ if (lineHeight>5)
59940
+ {
59941
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
59942
+ line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
59943
+ line.PtEnd.X=ptEnd.X;
59944
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
59945
+ line.End=extendLine.Start;
59946
+ this.LinePoint.push(line);
59947
+ }
59948
+
59949
+ }
59950
+ }
59951
+ else if (quadrant==3)
59952
+ {
59953
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
59954
+ var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
59922
59955
  this.LinePoint.push(line);
59923
- */
59924
59956
 
59957
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
59958
+ {
59959
+ if (lineWidth>5)
59960
+ {
59961
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
59962
+ line.PtEnd.Y=ptEnd.Y;
59963
+ line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];
59964
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
59965
+ line.End=extendLine.End;
59966
+ this.LinePoint.push(line);
59967
+ }
59968
+ if (lineHeight>5)
59969
+ {
59970
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
59971
+ line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
59972
+ line.PtEnd.X=ptEnd.X;
59973
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
59974
+ line.End=extendLine.End;
59975
+ this.LinePoint.push(line);
59976
+ }
59977
+ }
59978
+ }
59979
+ else if (quadrant==4)
59980
+ {
59925
59981
  var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
59926
59982
  var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
59927
59983
  this.LinePoint.push(line);
59928
59984
 
59929
- for(var i in SPLIT_LINE_VALUE)
59985
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
59930
59986
  {
59931
59987
  if (lineWidth>5)
59932
59988
  {
59933
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
59989
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
59934
59990
  line.PtEnd.Y=ptEnd.Y;
59935
59991
  line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
59936
59992
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -59939,7 +59995,7 @@ function ChartDrawPictureGannFan()
59939
59995
  }
59940
59996
  if (lineHeight>5)
59941
59997
  {
59942
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
59998
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
59943
59999
  line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
59944
60000
  line.PtEnd.X=ptEnd.X;
59945
60001
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -59948,7 +60004,10 @@ function ChartDrawPictureGannFan()
59948
60004
  }
59949
60005
  }
59950
60006
  }
59951
- else return false;
60007
+ else
60008
+ {
60009
+ return false;
60010
+ }
59952
60011
 
59953
60012
  return true;
59954
60013
  }
@@ -59987,11 +60046,11 @@ function ChartDrawPictureResistanceLine()
59987
60046
  var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
59988
60047
  this.LinePoint.push(line);
59989
60048
 
59990
- for(var i in SPLIT_LINE_VALUE)
60049
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
59991
60050
  {
59992
60051
  if (lineHeight>5)
59993
60052
  {
59994
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
60053
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
59995
60054
  line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
59996
60055
  line.PtEnd.X=ptEnd.X;
59997
60056
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -59999,7 +60058,45 @@ function ChartDrawPictureResistanceLine()
59999
60058
  this.LinePoint.push(line);
60000
60059
  }
60001
60060
  }
60002
-
60061
+ }
60062
+ else if (quadrant==2)
60063
+ {
60064
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
60065
+ var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
60066
+ this.LinePoint.push(line);
60067
+
60068
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
60069
+ {
60070
+ if (lineHeight>5)
60071
+ {
60072
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
60073
+ line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
60074
+ line.PtEnd.X=ptEnd.X;
60075
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
60076
+ line.End=extendLine.Start;
60077
+ this.LinePoint.push(line);
60078
+ }
60079
+
60080
+ }
60081
+ }
60082
+ else if (quadrant==3)
60083
+ {
60084
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
60085
+ var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
60086
+ this.LinePoint.push(line);
60087
+
60088
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
60089
+ {
60090
+ if (lineHeight>5)
60091
+ {
60092
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
60093
+ line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
60094
+ line.PtEnd.X=ptEnd.X;
60095
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
60096
+ line.End=extendLine.End;
60097
+ this.LinePoint.push(line);
60098
+ }
60099
+ }
60003
60100
  }
60004
60101
  else if (quadrant==4)
60005
60102
  {
@@ -60007,11 +60104,11 @@ function ChartDrawPictureResistanceLine()
60007
60104
  var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
60008
60105
  this.LinePoint.push(line);
60009
60106
 
60010
- for(var i in SPLIT_LINE_VALUE)
60107
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
60011
60108
  {
60012
60109
  if (lineHeight>5)
60013
60110
  {
60014
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
60111
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
60015
60112
  line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
60016
60113
  line.PtEnd.X=ptEnd.X;
60017
60114
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -60020,7 +60117,10 @@ function ChartDrawPictureResistanceLine()
60020
60117
  }
60021
60118
  }
60022
60119
  }
60023
- else return false;
60120
+ else
60121
+ {
60122
+ return false;
60123
+ }
60024
60124
 
60025
60125
  return true;
60026
60126
  }
@@ -60047,6 +60147,22 @@ function ChartDrawPictureResistanceLine()
60047
60147
  }
60048
60148
  }
60049
60149
 
60150
+ //阻速线2 (高 3等份)通达信版本
60151
+ function ChartDrawPictureResistanceLineV2()
60152
+ {
60153
+ this.newMethod=ChartDrawPictureResistanceLine; //派生
60154
+ this.newMethod();
60155
+ delete this.newMethod;
60156
+
60157
+ this.ClassName='ChartDrawPictureResistanceLineV2';
60158
+ this.EnableDottedLine=true; //辅助线是否使用虚线
60159
+ this.LineDash=[4,8];
60160
+ this.EnableArea=false;
60161
+ }
60162
+
60163
+
60164
+
60165
+
60050
60166
  //黄金分割线
60051
60167
  function ChartDrawPictureGoldenSection()
60052
60168
  {
@@ -13223,6 +13223,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13223
13223
  //右键菜单
13224
13224
  this.PopupMenuByRClick=function(menuData, x, y)
13225
13225
  {
13226
+ if (!this.JSPopMenu) return;
13227
+
13226
13228
  var rtClient=this.UIElement.getBoundingClientRect();
13227
13229
  var rtScroll=GetScrollPosition();
13228
13230
 
@@ -60282,6 +60284,7 @@ IChartDrawPicture.ArrayDrawPricture=
60282
60284
  { Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
60283
60285
  { Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
60284
60286
  { Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
60287
+ { Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
60285
60288
  { Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
60286
60289
  { Name:"百分比线", ClassName:'ChartDrawPicturePercentage', Create:function() { return new ChartDrawPicturePercentage(); }},
60287
60290
  { Name:"波段线", ClassName:'ChartDrawPictureWaveBand', Create:function() { return new ChartDrawPictureWaveBand(); }},
@@ -63675,6 +63678,23 @@ function ChartDrawPictureGannFan()
63675
63678
  this.IsPointIn=this.IsPointIn_XYValue_Line;
63676
63679
  this.LinePoint=[];
63677
63680
  this.Font=16*GetDevicePixelRatio() +"px 微软雅黑";
63681
+ this.LineDash=[5,10];
63682
+ this.EnableDottedLine=false; //辅助线是否使用虚线
63683
+ this.EnableArea=true; //是否绘制面积图
63684
+
63685
+ this.Super_SetOption=this.SetOption; //父类函数
63686
+
63687
+ this.SetOption=function(option)
63688
+ {
63689
+ if (this.Super_SetOption) this.Super_SetOption(option);
63690
+ if (option)
63691
+ {
63692
+ if (option.Font) this.Font=option.Font;
63693
+ if (Array.isArray(option.LineDash)) this.LineDash=option.LineDash;
63694
+ if (IFrameSplitOperator.IsBool(option.EnableDottedLine)) this.EnableDottedLine=option.EnableDottedLine;
63695
+ if (IFrameSplitOperator.IsBool(option.EnableArea)) this.EnableArea=option.EnableArea;
63696
+ }
63697
+ }
63678
63698
 
63679
63699
 
63680
63700
  this.Draw=function()
@@ -63692,10 +63712,10 @@ function ChartDrawPictureGannFan()
63692
63712
  var quadrant=this.GetQuadrant(drawPoint[0],drawPoint[1]);
63693
63713
 
63694
63714
  this.SetLineWidth();
63695
- if (quadrant===1 || quadrant===4)
63715
+ if (quadrant===1 || quadrant===2 || quadrant===3 || quadrant===4)
63696
63716
  {
63697
63717
  this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
63698
- this.DrawArea();
63718
+ if (this.EnableArea) this.DrawArea();
63699
63719
 
63700
63720
  for(var i in this.LinePoint)
63701
63721
  {
@@ -63723,7 +63743,7 @@ function ChartDrawPictureGannFan()
63723
63743
  this.GetQuadrant=function(ptStart,ptEnd)
63724
63744
  {
63725
63745
  if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 1;
63726
- else if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
63746
+ else if (ptStart.X>ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
63727
63747
  else if (ptStart.X < ptEnd.X && ptStart.Y< ptEnd.Y) return 4;
63728
63748
  else return 3;
63729
63749
  }
@@ -63732,7 +63752,7 @@ function ChartDrawPictureGannFan()
63732
63752
  //isDotline 是否是虚线
63733
63753
  this.DrawLine=function(ptStart,ptEnd,isDottedline)
63734
63754
  {
63735
- if (isDottedline) this.Canvas.setLineDash([5,10]);
63755
+ if (isDottedline) this.Canvas.setLineDash(this.LineDash);
63736
63756
 
63737
63757
  this.Canvas.strokeStyle=this.LineColor;
63738
63758
  this.Canvas.beginPath();
@@ -63794,27 +63814,15 @@ function ChartDrawPictureGannFan()
63794
63814
  var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);
63795
63815
  if (quadrant===1)
63796
63816
  {
63797
- /*
63798
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63799
- line.End.X=ptStart.X;
63800
- line.End.Y=top;
63801
- this.LinePoint.push(line);
63802
-
63803
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63804
- line.End.X=right;
63805
- line.End.Y=ptStart.Y;
63806
- this.LinePoint.push(line);
63807
- */
63808
-
63809
63817
  var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63810
63818
  var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63811
63819
  this.LinePoint.push(line);
63812
63820
 
63813
- for(var i in SPLIT_LINE_VALUE)
63821
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63814
63822
  {
63815
63823
  if (lineWidth>5)
63816
63824
  {
63817
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63825
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63818
63826
  line.PtEnd.Y=ptEnd.Y;
63819
63827
  line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
63820
63828
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63823,7 +63831,7 @@ function ChartDrawPictureGannFan()
63823
63831
  }
63824
63832
  if (lineHeight>5)
63825
63833
  {
63826
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63834
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63827
63835
  line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
63828
63836
  line.PtEnd.X=ptEnd.X;
63829
63837
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63833,29 +63841,77 @@ function ChartDrawPictureGannFan()
63833
63841
  }
63834
63842
 
63835
63843
  }
63836
- else if (quadrant==4)
63844
+ else if (quadrant==2)
63837
63845
  {
63838
- /*
63839
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63840
- line.End.X=ptStart.X;
63841
- line.End.Y=bottom;
63846
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63847
+ var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63842
63848
  this.LinePoint.push(line);
63843
63849
 
63844
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63845
- line.End.X=right;
63846
- line.End.Y=ptStart.Y;
63850
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63851
+ {
63852
+
63853
+ if (lineWidth>5)
63854
+ {
63855
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63856
+ line.PtEnd.Y=ptEnd.Y;
63857
+ line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];
63858
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63859
+ line.End=extendLine.Start;
63860
+ this.LinePoint.push(line);
63861
+ }
63862
+
63863
+
63864
+ if (lineHeight>5)
63865
+ {
63866
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63867
+ line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
63868
+ line.PtEnd.X=ptEnd.X;
63869
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63870
+ line.End=extendLine.Start;
63871
+ this.LinePoint.push(line);
63872
+ }
63873
+
63874
+ }
63875
+ }
63876
+ else if (quadrant==3)
63877
+ {
63878
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63879
+ var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63847
63880
  this.LinePoint.push(line);
63848
- */
63849
63881
 
63882
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63883
+ {
63884
+ if (lineWidth>5)
63885
+ {
63886
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63887
+ line.PtEnd.Y=ptEnd.Y;
63888
+ line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];
63889
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63890
+ line.End=extendLine.End;
63891
+ this.LinePoint.push(line);
63892
+ }
63893
+ if (lineHeight>5)
63894
+ {
63895
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63896
+ line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
63897
+ line.PtEnd.X=ptEnd.X;
63898
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63899
+ line.End=extendLine.End;
63900
+ this.LinePoint.push(line);
63901
+ }
63902
+ }
63903
+ }
63904
+ else if (quadrant==4)
63905
+ {
63850
63906
  var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63851
63907
  var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63852
63908
  this.LinePoint.push(line);
63853
63909
 
63854
- for(var i in SPLIT_LINE_VALUE)
63910
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63855
63911
  {
63856
63912
  if (lineWidth>5)
63857
63913
  {
63858
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63914
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63859
63915
  line.PtEnd.Y=ptEnd.Y;
63860
63916
  line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
63861
63917
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63864,7 +63920,7 @@ function ChartDrawPictureGannFan()
63864
63920
  }
63865
63921
  if (lineHeight>5)
63866
63922
  {
63867
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63923
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63868
63924
  line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
63869
63925
  line.PtEnd.X=ptEnd.X;
63870
63926
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63873,7 +63929,10 @@ function ChartDrawPictureGannFan()
63873
63929
  }
63874
63930
  }
63875
63931
  }
63876
- else return false;
63932
+ else
63933
+ {
63934
+ return false;
63935
+ }
63877
63936
 
63878
63937
  return true;
63879
63938
  }
@@ -63912,11 +63971,11 @@ function ChartDrawPictureResistanceLine()
63912
63971
  var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63913
63972
  this.LinePoint.push(line);
63914
63973
 
63915
- for(var i in SPLIT_LINE_VALUE)
63974
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63916
63975
  {
63917
63976
  if (lineHeight>5)
63918
63977
  {
63919
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63978
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63920
63979
  line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
63921
63980
  line.PtEnd.X=ptEnd.X;
63922
63981
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63924,7 +63983,45 @@ function ChartDrawPictureResistanceLine()
63924
63983
  this.LinePoint.push(line);
63925
63984
  }
63926
63985
  }
63927
-
63986
+ }
63987
+ else if (quadrant==2)
63988
+ {
63989
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63990
+ var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63991
+ this.LinePoint.push(line);
63992
+
63993
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63994
+ {
63995
+ if (lineHeight>5)
63996
+ {
63997
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63998
+ line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
63999
+ line.PtEnd.X=ptEnd.X;
64000
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
64001
+ line.End=extendLine.Start;
64002
+ this.LinePoint.push(line);
64003
+ }
64004
+
64005
+ }
64006
+ }
64007
+ else if (quadrant==3)
64008
+ {
64009
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
64010
+ var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
64011
+ this.LinePoint.push(line);
64012
+
64013
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
64014
+ {
64015
+ if (lineHeight>5)
64016
+ {
64017
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
64018
+ line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
64019
+ line.PtEnd.X=ptEnd.X;
64020
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
64021
+ line.End=extendLine.End;
64022
+ this.LinePoint.push(line);
64023
+ }
64024
+ }
63928
64025
  }
63929
64026
  else if (quadrant==4)
63930
64027
  {
@@ -63932,11 +64029,11 @@ function ChartDrawPictureResistanceLine()
63932
64029
  var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63933
64030
  this.LinePoint.push(line);
63934
64031
 
63935
- for(var i in SPLIT_LINE_VALUE)
64032
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63936
64033
  {
63937
64034
  if (lineHeight>5)
63938
64035
  {
63939
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
64036
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63940
64037
  line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
63941
64038
  line.PtEnd.X=ptEnd.X;
63942
64039
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63945,7 +64042,10 @@ function ChartDrawPictureResistanceLine()
63945
64042
  }
63946
64043
  }
63947
64044
  }
63948
- else return false;
64045
+ else
64046
+ {
64047
+ return false;
64048
+ }
63949
64049
 
63950
64050
  return true;
63951
64051
  }
@@ -63972,6 +64072,22 @@ function ChartDrawPictureResistanceLine()
63972
64072
  }
63973
64073
  }
63974
64074
 
64075
+ //阻速线2 (高 3等份)通达信版本
64076
+ function ChartDrawPictureResistanceLineV2()
64077
+ {
64078
+ this.newMethod=ChartDrawPictureResistanceLine; //派生
64079
+ this.newMethod();
64080
+ delete this.newMethod;
64081
+
64082
+ this.ClassName='ChartDrawPictureResistanceLineV2';
64083
+ this.EnableDottedLine=true; //辅助线是否使用虚线
64084
+ this.LineDash=[4,8];
64085
+ this.EnableArea=false;
64086
+ }
64087
+
64088
+
64089
+
64090
+
63975
64091
  //黄金分割线
63976
64092
  function ChartDrawPictureGoldenSection()
63977
64093
  {
@@ -135869,7 +135985,7 @@ function ScrollBarBGChart()
135869
135985
 
135870
135986
 
135871
135987
 
135872
- var HQCHART_VERSION="1.1.13564";
135988
+ var HQCHART_VERSION="1.1.13568";
135873
135989
 
135874
135990
  function PrintHQChartVersion()
135875
135991
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13564";
8
+ var HQCHART_VERSION="1.1.13568";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -13267,6 +13267,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13267
13267
  //右键菜单
13268
13268
  this.PopupMenuByRClick=function(menuData, x, y)
13269
13269
  {
13270
+ if (!this.JSPopMenu) return;
13271
+
13270
13272
  var rtClient=this.UIElement.getBoundingClientRect();
13271
13273
  var rtScroll=GetScrollPosition();
13272
13274
 
@@ -60326,6 +60328,7 @@ IChartDrawPicture.ArrayDrawPricture=
60326
60328
  { Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
60327
60329
  { Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
60328
60330
  { Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
60331
+ { Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
60329
60332
  { Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
60330
60333
  { Name:"百分比线", ClassName:'ChartDrawPicturePercentage', Create:function() { return new ChartDrawPicturePercentage(); }},
60331
60334
  { Name:"波段线", ClassName:'ChartDrawPictureWaveBand', Create:function() { return new ChartDrawPictureWaveBand(); }},
@@ -63719,6 +63722,23 @@ function ChartDrawPictureGannFan()
63719
63722
  this.IsPointIn=this.IsPointIn_XYValue_Line;
63720
63723
  this.LinePoint=[];
63721
63724
  this.Font=16*GetDevicePixelRatio() +"px 微软雅黑";
63725
+ this.LineDash=[5,10];
63726
+ this.EnableDottedLine=false; //辅助线是否使用虚线
63727
+ this.EnableArea=true; //是否绘制面积图
63728
+
63729
+ this.Super_SetOption=this.SetOption; //父类函数
63730
+
63731
+ this.SetOption=function(option)
63732
+ {
63733
+ if (this.Super_SetOption) this.Super_SetOption(option);
63734
+ if (option)
63735
+ {
63736
+ if (option.Font) this.Font=option.Font;
63737
+ if (Array.isArray(option.LineDash)) this.LineDash=option.LineDash;
63738
+ if (IFrameSplitOperator.IsBool(option.EnableDottedLine)) this.EnableDottedLine=option.EnableDottedLine;
63739
+ if (IFrameSplitOperator.IsBool(option.EnableArea)) this.EnableArea=option.EnableArea;
63740
+ }
63741
+ }
63722
63742
 
63723
63743
 
63724
63744
  this.Draw=function()
@@ -63736,10 +63756,10 @@ function ChartDrawPictureGannFan()
63736
63756
  var quadrant=this.GetQuadrant(drawPoint[0],drawPoint[1]);
63737
63757
 
63738
63758
  this.SetLineWidth();
63739
- if (quadrant===1 || quadrant===4)
63759
+ if (quadrant===1 || quadrant===2 || quadrant===3 || quadrant===4)
63740
63760
  {
63741
63761
  this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
63742
- this.DrawArea();
63762
+ if (this.EnableArea) this.DrawArea();
63743
63763
 
63744
63764
  for(var i in this.LinePoint)
63745
63765
  {
@@ -63767,7 +63787,7 @@ function ChartDrawPictureGannFan()
63767
63787
  this.GetQuadrant=function(ptStart,ptEnd)
63768
63788
  {
63769
63789
  if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 1;
63770
- else if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
63790
+ else if (ptStart.X>ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
63771
63791
  else if (ptStart.X < ptEnd.X && ptStart.Y< ptEnd.Y) return 4;
63772
63792
  else return 3;
63773
63793
  }
@@ -63776,7 +63796,7 @@ function ChartDrawPictureGannFan()
63776
63796
  //isDotline 是否是虚线
63777
63797
  this.DrawLine=function(ptStart,ptEnd,isDottedline)
63778
63798
  {
63779
- if (isDottedline) this.Canvas.setLineDash([5,10]);
63799
+ if (isDottedline) this.Canvas.setLineDash(this.LineDash);
63780
63800
 
63781
63801
  this.Canvas.strokeStyle=this.LineColor;
63782
63802
  this.Canvas.beginPath();
@@ -63838,27 +63858,15 @@ function ChartDrawPictureGannFan()
63838
63858
  var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);
63839
63859
  if (quadrant===1)
63840
63860
  {
63841
- /*
63842
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63843
- line.End.X=ptStart.X;
63844
- line.End.Y=top;
63845
- this.LinePoint.push(line);
63846
-
63847
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63848
- line.End.X=right;
63849
- line.End.Y=ptStart.Y;
63850
- this.LinePoint.push(line);
63851
- */
63852
-
63853
63861
  var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63854
63862
  var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63855
63863
  this.LinePoint.push(line);
63856
63864
 
63857
- for(var i in SPLIT_LINE_VALUE)
63865
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63858
63866
  {
63859
63867
  if (lineWidth>5)
63860
63868
  {
63861
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63869
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63862
63870
  line.PtEnd.Y=ptEnd.Y;
63863
63871
  line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
63864
63872
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63867,7 +63875,7 @@ function ChartDrawPictureGannFan()
63867
63875
  }
63868
63876
  if (lineHeight>5)
63869
63877
  {
63870
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63878
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63871
63879
  line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
63872
63880
  line.PtEnd.X=ptEnd.X;
63873
63881
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63877,29 +63885,77 @@ function ChartDrawPictureGannFan()
63877
63885
  }
63878
63886
 
63879
63887
  }
63880
- else if (quadrant==4)
63888
+ else if (quadrant==2)
63881
63889
  {
63882
- /*
63883
- var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63884
- line.End.X=ptStart.X;
63885
- line.End.Y=bottom;
63890
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63891
+ var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63886
63892
  this.LinePoint.push(line);
63887
63893
 
63888
- line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
63889
- line.End.X=right;
63890
- line.End.Y=ptStart.Y;
63894
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63895
+ {
63896
+
63897
+ if (lineWidth>5)
63898
+ {
63899
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63900
+ line.PtEnd.Y=ptEnd.Y;
63901
+ line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];
63902
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63903
+ line.End=extendLine.Start;
63904
+ this.LinePoint.push(line);
63905
+ }
63906
+
63907
+
63908
+ if (lineHeight>5)
63909
+ {
63910
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63911
+ line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
63912
+ line.PtEnd.X=ptEnd.X;
63913
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63914
+ line.End=extendLine.Start;
63915
+ this.LinePoint.push(line);
63916
+ }
63917
+
63918
+ }
63919
+ }
63920
+ else if (quadrant==3)
63921
+ {
63922
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63923
+ var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63891
63924
  this.LinePoint.push(line);
63892
- */
63893
63925
 
63926
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63927
+ {
63928
+ if (lineWidth>5)
63929
+ {
63930
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63931
+ line.PtEnd.Y=ptEnd.Y;
63932
+ line.PtEnd.X=ptStart.X-lineWidth*SPLIT_LINE_VALUE[i];
63933
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63934
+ line.End=extendLine.End;
63935
+ this.LinePoint.push(line);
63936
+ }
63937
+ if (lineHeight>5)
63938
+ {
63939
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63940
+ line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
63941
+ line.PtEnd.X=ptEnd.X;
63942
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
63943
+ line.End=extendLine.End;
63944
+ this.LinePoint.push(line);
63945
+ }
63946
+ }
63947
+ }
63948
+ else if (quadrant==4)
63949
+ {
63894
63950
  var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
63895
63951
  var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63896
63952
  this.LinePoint.push(line);
63897
63953
 
63898
- for(var i in SPLIT_LINE_VALUE)
63954
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63899
63955
  {
63900
63956
  if (lineWidth>5)
63901
63957
  {
63902
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63958
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
63903
63959
  line.PtEnd.Y=ptEnd.Y;
63904
63960
  line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
63905
63961
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63908,7 +63964,7 @@ function ChartDrawPictureGannFan()
63908
63964
  }
63909
63965
  if (lineHeight>5)
63910
63966
  {
63911
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63967
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63912
63968
  line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
63913
63969
  line.PtEnd.X=ptEnd.X;
63914
63970
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63917,7 +63973,10 @@ function ChartDrawPictureGannFan()
63917
63973
  }
63918
63974
  }
63919
63975
  }
63920
- else return false;
63976
+ else
63977
+ {
63978
+ return false;
63979
+ }
63921
63980
 
63922
63981
  return true;
63923
63982
  }
@@ -63956,11 +64015,11 @@ function ChartDrawPictureResistanceLine()
63956
64015
  var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63957
64016
  this.LinePoint.push(line);
63958
64017
 
63959
- for(var i in SPLIT_LINE_VALUE)
64018
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63960
64019
  {
63961
64020
  if (lineHeight>5)
63962
64021
  {
63963
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
64022
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63964
64023
  line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
63965
64024
  line.PtEnd.X=ptEnd.X;
63966
64025
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63968,7 +64027,45 @@ function ChartDrawPictureResistanceLine()
63968
64027
  this.LinePoint.push(line);
63969
64028
  }
63970
64029
  }
63971
-
64030
+ }
64031
+ else if (quadrant==2)
64032
+ {
64033
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
64034
+ var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
64035
+ this.LinePoint.push(line);
64036
+
64037
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
64038
+ {
64039
+ if (lineHeight>5)
64040
+ {
64041
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
64042
+ line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
64043
+ line.PtEnd.X=ptEnd.X;
64044
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
64045
+ line.End=extendLine.Start;
64046
+ this.LinePoint.push(line);
64047
+ }
64048
+
64049
+ }
64050
+ }
64051
+ else if (quadrant==3)
64052
+ {
64053
+ var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
64054
+ var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
64055
+ this.LinePoint.push(line);
64056
+
64057
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
64058
+ {
64059
+ if (lineHeight>5)
64060
+ {
64061
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
64062
+ line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
64063
+ line.PtEnd.X=ptEnd.X;
64064
+ var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
64065
+ line.End=extendLine.End;
64066
+ this.LinePoint.push(line);
64067
+ }
64068
+ }
63972
64069
  }
63973
64070
  else if (quadrant==4)
63974
64071
  {
@@ -63976,11 +64073,11 @@ function ChartDrawPictureResistanceLine()
63976
64073
  var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
63977
64074
  this.LinePoint.push(line);
63978
64075
 
63979
- for(var i in SPLIT_LINE_VALUE)
64076
+ for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
63980
64077
  {
63981
64078
  if (lineHeight>5)
63982
64079
  {
63983
- line={Start:ptLineStart, End:null, IsDottedLine:false,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
64080
+ line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
63984
64081
  line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
63985
64082
  line.PtEnd.X=ptEnd.X;
63986
64083
  var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
@@ -63989,7 +64086,10 @@ function ChartDrawPictureResistanceLine()
63989
64086
  }
63990
64087
  }
63991
64088
  }
63992
- else return false;
64089
+ else
64090
+ {
64091
+ return false;
64092
+ }
63993
64093
 
63994
64094
  return true;
63995
64095
  }
@@ -64016,6 +64116,22 @@ function ChartDrawPictureResistanceLine()
64016
64116
  }
64017
64117
  }
64018
64118
 
64119
+ //阻速线2 (高 3等份)通达信版本
64120
+ function ChartDrawPictureResistanceLineV2()
64121
+ {
64122
+ this.newMethod=ChartDrawPictureResistanceLine; //派生
64123
+ this.newMethod();
64124
+ delete this.newMethod;
64125
+
64126
+ this.ClassName='ChartDrawPictureResistanceLineV2';
64127
+ this.EnableDottedLine=true; //辅助线是否使用虚线
64128
+ this.LineDash=[4,8];
64129
+ this.EnableArea=false;
64130
+ }
64131
+
64132
+
64133
+
64134
+
64019
64135
  //黄金分割线
64020
64136
  function ChartDrawPictureGoldenSection()
64021
64137
  {
@@ -138740,6 +138856,7 @@ function JSDialogDrawTool()
138740
138856
  { Title: '水平射线', ClassName: 'hqchart_drawtool icon-tubiao_shuipingshexian', Type:0, Data:{ ID:"水平射线" } },
138741
138857
  { Title: '涂鸦线段', ClassName: 'hqchart_drawtool icon-draw_line', Type:0, Data:{ ID:"涂鸦线段" } },
138742
138858
  { Title: '阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线" } },
138859
+ { Title: '通达信阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线2" } },
138743
138860
  { Title: '江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线" } },
138744
138861
  ]
138745
138862
  },
@@ -139823,7 +139940,7 @@ function HQChartScriptWorker()
139823
139940
 
139824
139941
 
139825
139942
 
139826
- var HQCHART_VERSION="1.1.13564";
139943
+ var HQCHART_VERSION="1.1.13568";
139827
139944
 
139828
139945
  function PrintHQChartVersion()
139829
139946
  {