hqchart 1.1.13569 → 1.1.13573
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/umychart.vue.js +10 -7
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +1 -0
- package/src/jscommon/umychart.js +67 -6
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +68 -7
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +69 -7
package/lib/umychart.vue.js
CHANGED
|
@@ -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&®.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:"阻速线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线坐标
|
|
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:"江恩角度线2",ClassName:'ChartDrawPictureGannFan',Create:function Create(){return new ChartDrawPictureGannFanV2();}},{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();}},//斐波那契扇形
|
|
@@ -6086,18 +6086,21 @@ this.GetTextFont=function(){if(!this.FontOption||!this.FontOption.Family||this.F
|
|
|
6086
6086
|
function ChartDrawPictureGannFan(){this.newMethod=IChartDrawPicture;//派生
|
|
6087
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
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
|
|
6089
|
+
this.IsShowTitle=true;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;if(IFrameSplitOperator.IsBool(option.IsShowTitle))this.IsShowTitle=option.IsShowTitle;}};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=0;i<this.LinePoint.length;++i){var item=this.LinePoint[i];this.DrawLine(item.Start,item.End,item.IsDottedLine);}if(this.IsShowTitle){for(var i=0;i<this.LinePoint.length;++i){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);//画点
|
|
6091
6091
|
};//获取在第几象限
|
|
6092
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
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;};}
|
|
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;};}//江恩角度线(Gann Fan) 通达信版本
|
|
6095
|
+
function ChartDrawPictureGannFanV2(){this.newMethod=ChartDrawPictureGannFan;//派生
|
|
6096
|
+
this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureGannFanV2';this.EnableDottedLine=true;//辅助线是否使用虚线
|
|
6097
|
+
this.LineDash=[4,8];this.EnableArea=false;this.Super_CalculateLines=this.CalculateLines;this.CalculateLines=function(ptStart,ptEnd,quadrant){if(!this.Super_CalculateLines(ptStart,ptEnd,quadrant))return false;var border=this.Frame.ChartBorder.GetBorder();if(quadrant==1){var line={Start:ptStart,End:{X:border.Right,Y:ptStart.Y},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);var line={Start:ptStart,End:{X:ptStart.X,Y:border.TopEx},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);}else if(quadrant==2){var line={Start:ptStart,End:{X:ptStart.X,Y:border.TopEx},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);var line={Start:ptStart,End:{X:border.Left,Y:ptStart.Y},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);}else if(quadrant==3){var line={Start:ptStart,End:{X:border.Left,Y:ptStart.Y},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);var line={Start:ptStart,End:{X:ptStart.X,Y:border.BottomEx},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);}else if(quadrant==4){var line={Start:ptStart,End:{X:ptStart.X,Y:border.BottomEx},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);var line={Start:ptStart,End:{X:border.Right,Y:ptStart.Y},IsDottedLine:false,PtEnd:null,Text:null};this.LinePoint.push(line);}};}//阻速线 (高 3等份)
|
|
6095
6098
|
function ChartDrawPictureResistanceLine(){this.newMethod=ChartDrawPictureGannFan;//派生
|
|
6096
6099
|
this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureResistanceLine';//计算线段
|
|
6097
6100
|
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
6101
|
function ChartDrawPictureResistanceLineV2(){this.newMethod=ChartDrawPictureResistanceLine;//派生
|
|
6099
6102
|
this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureResistanceLineV2';this.EnableDottedLine=true;//辅助线是否使用虚线
|
|
6100
|
-
this.LineDash=[4,8];this.EnableArea=false;}//黄金分割线
|
|
6103
|
+
this.LineDash=[4,8];this.EnableArea=false;this.IsShowTitle=false;}//黄金分割线
|
|
6101
6104
|
function ChartDrawPictureGoldenSection(){this.newMethod=IChartDrawPicture;//派生
|
|
6102
6105
|
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);//画点
|
|
6103
6106
|
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);}};}//百分比线
|
|
@@ -13273,7 +13276,7 @@ JSPopMenu.SEPARATOR_LINE_NAME="MENU_SEPARATOR";//分割线
|
|
|
13273
13276
|
CMD_DELETE_DRAW_CHART_ID:6,CMD_CHANGE_FONT_COLOR_ID:7,//切换字体颜色
|
|
13274
13277
|
CMD_CHANGE_BG_COLOR_ID:8,//切换背景色
|
|
13275
13278
|
CMD_CHANGE_BORDER_COLOR_ID:9//边框颜色
|
|
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);}//工具栏
|
|
13279
|
+
};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:'通达信江恩角度线',ClassName:'hqchart_drawtool icon-jiangenjiaoduxian',Type:0,Data:{ID:"江恩角度线2"}}]},{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);}//工具栏
|
|
13277
13280
|
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);};//点击
|
|
13278
13281
|
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);}};//清空选中状态
|
|
13279
13282
|
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)//颜色
|
|
@@ -13313,7 +13316,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13313
13316
|
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);};}/********************************************************************************
|
|
13314
13317
|
* 版本信息输出
|
|
13315
13318
|
*
|
|
13316
|
-
*/var HQCHART_VERSION="1.1.
|
|
13319
|
+
*/var HQCHART_VERSION="1.1.13572";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();//把给外界调用的方法暴露出来
|
|
13317
13320
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13318
13321
|
// BaseIndex:BaseIndex,
|
|
13319
13322
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -47,6 +47,7 @@ function JSDialogDrawTool()
|
|
|
47
47
|
{ Title: '阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线" } },
|
|
48
48
|
{ Title: '通达信阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线2" } },
|
|
49
49
|
{ Title: '江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线" } },
|
|
50
|
+
{ Title: '通达信江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线2" } },
|
|
50
51
|
]
|
|
51
52
|
},
|
|
52
53
|
{
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -56358,6 +56358,7 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
56358
56358
|
{ Name:"价格通道线", ClassName:'ChartDrawPicturePriceChannel', Create:function() { return new ChartDrawPicturePriceChannel(); }},
|
|
56359
56359
|
{ Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
|
|
56360
56360
|
{ Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
|
|
56361
|
+
{ Name:"江恩角度线2", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFanV2(); }},
|
|
56361
56362
|
{ Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
|
|
56362
56363
|
{ Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
|
|
56363
56364
|
{ Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
|
|
@@ -59756,6 +59757,7 @@ function ChartDrawPictureGannFan()
|
|
|
59756
59757
|
this.LineDash=[5,10];
|
|
59757
59758
|
this.EnableDottedLine=false; //辅助线是否使用虚线
|
|
59758
59759
|
this.EnableArea=true; //是否绘制面积图
|
|
59760
|
+
this.IsShowTitle=true;
|
|
59759
59761
|
|
|
59760
59762
|
this.Super_SetOption=this.SetOption; //父类函数
|
|
59761
59763
|
|
|
@@ -59768,10 +59770,10 @@ function ChartDrawPictureGannFan()
|
|
|
59768
59770
|
if (Array.isArray(option.LineDash)) this.LineDash=option.LineDash;
|
|
59769
59771
|
if (IFrameSplitOperator.IsBool(option.EnableDottedLine)) this.EnableDottedLine=option.EnableDottedLine;
|
|
59770
59772
|
if (IFrameSplitOperator.IsBool(option.EnableArea)) this.EnableArea=option.EnableArea;
|
|
59773
|
+
if (IFrameSplitOperator.IsBool(option.IsShowTitle)) this.IsShowTitle=option.IsShowTitle;
|
|
59771
59774
|
}
|
|
59772
59775
|
}
|
|
59773
59776
|
|
|
59774
|
-
|
|
59775
59777
|
this.Draw=function()
|
|
59776
59778
|
{
|
|
59777
59779
|
this.LinePoint=[];
|
|
@@ -59792,16 +59794,19 @@ function ChartDrawPictureGannFan()
|
|
|
59792
59794
|
this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
|
|
59793
59795
|
if (this.EnableArea) this.DrawArea();
|
|
59794
59796
|
|
|
59795
|
-
for(var i
|
|
59797
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
59796
59798
|
{
|
|
59797
59799
|
var item=this.LinePoint[i];
|
|
59798
59800
|
this.DrawLine(item.Start,item.End,item.IsDottedLine);
|
|
59799
59801
|
}
|
|
59800
59802
|
|
|
59801
|
-
|
|
59803
|
+
if (this.IsShowTitle)
|
|
59802
59804
|
{
|
|
59803
|
-
var
|
|
59804
|
-
|
|
59805
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
59806
|
+
{
|
|
59807
|
+
var item =this.LinePoint[i];
|
|
59808
|
+
if (item.Text && item.PtEnd) this.DrawTitle(item.PtEnd,item.Text);
|
|
59809
|
+
}
|
|
59805
59810
|
}
|
|
59806
59811
|
}
|
|
59807
59812
|
else
|
|
@@ -60013,13 +60018,68 @@ function ChartDrawPictureGannFan()
|
|
|
60013
60018
|
}
|
|
60014
60019
|
}
|
|
60015
60020
|
|
|
60021
|
+
|
|
60022
|
+
//江恩角度线(Gann Fan) 通达信版本
|
|
60023
|
+
function ChartDrawPictureGannFanV2()
|
|
60024
|
+
{
|
|
60025
|
+
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
60026
|
+
this.newMethod();
|
|
60027
|
+
delete this.newMethod;
|
|
60028
|
+
|
|
60029
|
+
this.ClassName='ChartDrawPictureGannFanV2';
|
|
60030
|
+
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
60031
|
+
this.LineDash=[4,8];
|
|
60032
|
+
this.EnableArea=false;
|
|
60033
|
+
|
|
60034
|
+
this.Super_CalculateLines=this.CalculateLines;
|
|
60035
|
+
|
|
60036
|
+
this.CalculateLines=function(ptStart,ptEnd,quadrant)
|
|
60037
|
+
{
|
|
60038
|
+
if (!this.Super_CalculateLines(ptStart,ptEnd,quadrant)) return false;
|
|
60039
|
+
|
|
60040
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
60041
|
+
if (quadrant==1)
|
|
60042
|
+
{
|
|
60043
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60044
|
+
this.LinePoint.push(line);
|
|
60045
|
+
|
|
60046
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60047
|
+
this.LinePoint.push(line);
|
|
60048
|
+
}
|
|
60049
|
+
else if (quadrant==2)
|
|
60050
|
+
{
|
|
60051
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60052
|
+
this.LinePoint.push(line);
|
|
60053
|
+
|
|
60054
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60055
|
+
this.LinePoint.push(line);
|
|
60056
|
+
}
|
|
60057
|
+
else if (quadrant==3)
|
|
60058
|
+
{
|
|
60059
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60060
|
+
this.LinePoint.push(line);
|
|
60061
|
+
|
|
60062
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60063
|
+
this.LinePoint.push(line);
|
|
60064
|
+
}
|
|
60065
|
+
else if (quadrant==4)
|
|
60066
|
+
{
|
|
60067
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60068
|
+
this.LinePoint.push(line);
|
|
60069
|
+
|
|
60070
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
60071
|
+
this.LinePoint.push(line);
|
|
60072
|
+
}
|
|
60073
|
+
}
|
|
60074
|
+
}
|
|
60075
|
+
|
|
60016
60076
|
//阻速线 (高 3等份)
|
|
60017
60077
|
function ChartDrawPictureResistanceLine()
|
|
60018
60078
|
{
|
|
60019
60079
|
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
60020
60080
|
this.newMethod();
|
|
60021
60081
|
delete this.newMethod;
|
|
60022
|
-
|
|
60082
|
+
|
|
60023
60083
|
this.ClassName='ChartDrawPictureResistanceLine';
|
|
60024
60084
|
|
|
60025
60085
|
//计算线段
|
|
@@ -60158,6 +60218,7 @@ function ChartDrawPictureResistanceLineV2()
|
|
|
60158
60218
|
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
60159
60219
|
this.LineDash=[4,8];
|
|
60160
60220
|
this.EnableArea=false;
|
|
60221
|
+
this.IsShowTitle=false;
|
|
60161
60222
|
}
|
|
60162
60223
|
|
|
60163
60224
|
|
|
@@ -60283,6 +60283,7 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
60283
60283
|
{ Name:"价格通道线", ClassName:'ChartDrawPicturePriceChannel', Create:function() { return new ChartDrawPicturePriceChannel(); }},
|
|
60284
60284
|
{ Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
|
|
60285
60285
|
{ Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
|
|
60286
|
+
{ Name:"江恩角度线2", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFanV2(); }},
|
|
60286
60287
|
{ Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
|
|
60287
60288
|
{ Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
|
|
60288
60289
|
{ Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
|
|
@@ -63681,6 +63682,7 @@ function ChartDrawPictureGannFan()
|
|
|
63681
63682
|
this.LineDash=[5,10];
|
|
63682
63683
|
this.EnableDottedLine=false; //辅助线是否使用虚线
|
|
63683
63684
|
this.EnableArea=true; //是否绘制面积图
|
|
63685
|
+
this.IsShowTitle=true;
|
|
63684
63686
|
|
|
63685
63687
|
this.Super_SetOption=this.SetOption; //父类函数
|
|
63686
63688
|
|
|
@@ -63693,10 +63695,10 @@ function ChartDrawPictureGannFan()
|
|
|
63693
63695
|
if (Array.isArray(option.LineDash)) this.LineDash=option.LineDash;
|
|
63694
63696
|
if (IFrameSplitOperator.IsBool(option.EnableDottedLine)) this.EnableDottedLine=option.EnableDottedLine;
|
|
63695
63697
|
if (IFrameSplitOperator.IsBool(option.EnableArea)) this.EnableArea=option.EnableArea;
|
|
63698
|
+
if (IFrameSplitOperator.IsBool(option.IsShowTitle)) this.IsShowTitle=option.IsShowTitle;
|
|
63696
63699
|
}
|
|
63697
63700
|
}
|
|
63698
63701
|
|
|
63699
|
-
|
|
63700
63702
|
this.Draw=function()
|
|
63701
63703
|
{
|
|
63702
63704
|
this.LinePoint=[];
|
|
@@ -63717,16 +63719,19 @@ function ChartDrawPictureGannFan()
|
|
|
63717
63719
|
this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
|
|
63718
63720
|
if (this.EnableArea) this.DrawArea();
|
|
63719
63721
|
|
|
63720
|
-
for(var i
|
|
63722
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
63721
63723
|
{
|
|
63722
63724
|
var item=this.LinePoint[i];
|
|
63723
63725
|
this.DrawLine(item.Start,item.End,item.IsDottedLine);
|
|
63724
63726
|
}
|
|
63725
63727
|
|
|
63726
|
-
|
|
63728
|
+
if (this.IsShowTitle)
|
|
63727
63729
|
{
|
|
63728
|
-
var
|
|
63729
|
-
|
|
63730
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
63731
|
+
{
|
|
63732
|
+
var item =this.LinePoint[i];
|
|
63733
|
+
if (item.Text && item.PtEnd) this.DrawTitle(item.PtEnd,item.Text);
|
|
63734
|
+
}
|
|
63730
63735
|
}
|
|
63731
63736
|
}
|
|
63732
63737
|
else
|
|
@@ -63938,13 +63943,68 @@ function ChartDrawPictureGannFan()
|
|
|
63938
63943
|
}
|
|
63939
63944
|
}
|
|
63940
63945
|
|
|
63946
|
+
|
|
63947
|
+
//江恩角度线(Gann Fan) 通达信版本
|
|
63948
|
+
function ChartDrawPictureGannFanV2()
|
|
63949
|
+
{
|
|
63950
|
+
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
63951
|
+
this.newMethod();
|
|
63952
|
+
delete this.newMethod;
|
|
63953
|
+
|
|
63954
|
+
this.ClassName='ChartDrawPictureGannFanV2';
|
|
63955
|
+
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
63956
|
+
this.LineDash=[4,8];
|
|
63957
|
+
this.EnableArea=false;
|
|
63958
|
+
|
|
63959
|
+
this.Super_CalculateLines=this.CalculateLines;
|
|
63960
|
+
|
|
63961
|
+
this.CalculateLines=function(ptStart,ptEnd,quadrant)
|
|
63962
|
+
{
|
|
63963
|
+
if (!this.Super_CalculateLines(ptStart,ptEnd,quadrant)) return false;
|
|
63964
|
+
|
|
63965
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
63966
|
+
if (quadrant==1)
|
|
63967
|
+
{
|
|
63968
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63969
|
+
this.LinePoint.push(line);
|
|
63970
|
+
|
|
63971
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63972
|
+
this.LinePoint.push(line);
|
|
63973
|
+
}
|
|
63974
|
+
else if (quadrant==2)
|
|
63975
|
+
{
|
|
63976
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63977
|
+
this.LinePoint.push(line);
|
|
63978
|
+
|
|
63979
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63980
|
+
this.LinePoint.push(line);
|
|
63981
|
+
}
|
|
63982
|
+
else if (quadrant==3)
|
|
63983
|
+
{
|
|
63984
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63985
|
+
this.LinePoint.push(line);
|
|
63986
|
+
|
|
63987
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63988
|
+
this.LinePoint.push(line);
|
|
63989
|
+
}
|
|
63990
|
+
else if (quadrant==4)
|
|
63991
|
+
{
|
|
63992
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63993
|
+
this.LinePoint.push(line);
|
|
63994
|
+
|
|
63995
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
63996
|
+
this.LinePoint.push(line);
|
|
63997
|
+
}
|
|
63998
|
+
}
|
|
63999
|
+
}
|
|
64000
|
+
|
|
63941
64001
|
//阻速线 (高 3等份)
|
|
63942
64002
|
function ChartDrawPictureResistanceLine()
|
|
63943
64003
|
{
|
|
63944
64004
|
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
63945
64005
|
this.newMethod();
|
|
63946
64006
|
delete this.newMethod;
|
|
63947
|
-
|
|
64007
|
+
|
|
63948
64008
|
this.ClassName='ChartDrawPictureResistanceLine';
|
|
63949
64009
|
|
|
63950
64010
|
//计算线段
|
|
@@ -64083,6 +64143,7 @@ function ChartDrawPictureResistanceLineV2()
|
|
|
64083
64143
|
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
64084
64144
|
this.LineDash=[4,8];
|
|
64085
64145
|
this.EnableArea=false;
|
|
64146
|
+
this.IsShowTitle=false;
|
|
64086
64147
|
}
|
|
64087
64148
|
|
|
64088
64149
|
|
|
@@ -135985,7 +136046,7 @@ function ScrollBarBGChart()
|
|
|
135985
136046
|
|
|
135986
136047
|
|
|
135987
136048
|
|
|
135988
|
-
var HQCHART_VERSION="1.1.
|
|
136049
|
+
var HQCHART_VERSION="1.1.13572";
|
|
135989
136050
|
|
|
135990
136051
|
function PrintHQChartVersion()
|
|
135991
136052
|
{
|
|
@@ -60327,6 +60327,7 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
60327
60327
|
{ Name:"价格通道线", ClassName:'ChartDrawPicturePriceChannel', Create:function() { return new ChartDrawPicturePriceChannel(); }},
|
|
60328
60328
|
{ Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
|
|
60329
60329
|
{ Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
|
|
60330
|
+
{ Name:"江恩角度线2", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFanV2(); }},
|
|
60330
60331
|
{ Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
|
|
60331
60332
|
{ Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
|
|
60332
60333
|
{ Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
|
|
@@ -63725,6 +63726,7 @@ function ChartDrawPictureGannFan()
|
|
|
63725
63726
|
this.LineDash=[5,10];
|
|
63726
63727
|
this.EnableDottedLine=false; //辅助线是否使用虚线
|
|
63727
63728
|
this.EnableArea=true; //是否绘制面积图
|
|
63729
|
+
this.IsShowTitle=true;
|
|
63728
63730
|
|
|
63729
63731
|
this.Super_SetOption=this.SetOption; //父类函数
|
|
63730
63732
|
|
|
@@ -63737,10 +63739,10 @@ function ChartDrawPictureGannFan()
|
|
|
63737
63739
|
if (Array.isArray(option.LineDash)) this.LineDash=option.LineDash;
|
|
63738
63740
|
if (IFrameSplitOperator.IsBool(option.EnableDottedLine)) this.EnableDottedLine=option.EnableDottedLine;
|
|
63739
63741
|
if (IFrameSplitOperator.IsBool(option.EnableArea)) this.EnableArea=option.EnableArea;
|
|
63742
|
+
if (IFrameSplitOperator.IsBool(option.IsShowTitle)) this.IsShowTitle=option.IsShowTitle;
|
|
63740
63743
|
}
|
|
63741
63744
|
}
|
|
63742
63745
|
|
|
63743
|
-
|
|
63744
63746
|
this.Draw=function()
|
|
63745
63747
|
{
|
|
63746
63748
|
this.LinePoint=[];
|
|
@@ -63761,16 +63763,19 @@ function ChartDrawPictureGannFan()
|
|
|
63761
63763
|
this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
|
|
63762
63764
|
if (this.EnableArea) this.DrawArea();
|
|
63763
63765
|
|
|
63764
|
-
for(var i
|
|
63766
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
63765
63767
|
{
|
|
63766
63768
|
var item=this.LinePoint[i];
|
|
63767
63769
|
this.DrawLine(item.Start,item.End,item.IsDottedLine);
|
|
63768
63770
|
}
|
|
63769
63771
|
|
|
63770
|
-
|
|
63772
|
+
if (this.IsShowTitle)
|
|
63771
63773
|
{
|
|
63772
|
-
var
|
|
63773
|
-
|
|
63774
|
+
for(var i=0; i<this.LinePoint.length; ++i)
|
|
63775
|
+
{
|
|
63776
|
+
var item =this.LinePoint[i];
|
|
63777
|
+
if (item.Text && item.PtEnd) this.DrawTitle(item.PtEnd,item.Text);
|
|
63778
|
+
}
|
|
63774
63779
|
}
|
|
63775
63780
|
}
|
|
63776
63781
|
else
|
|
@@ -63982,13 +63987,68 @@ function ChartDrawPictureGannFan()
|
|
|
63982
63987
|
}
|
|
63983
63988
|
}
|
|
63984
63989
|
|
|
63990
|
+
|
|
63991
|
+
//江恩角度线(Gann Fan) 通达信版本
|
|
63992
|
+
function ChartDrawPictureGannFanV2()
|
|
63993
|
+
{
|
|
63994
|
+
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
63995
|
+
this.newMethod();
|
|
63996
|
+
delete this.newMethod;
|
|
63997
|
+
|
|
63998
|
+
this.ClassName='ChartDrawPictureGannFanV2';
|
|
63999
|
+
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
64000
|
+
this.LineDash=[4,8];
|
|
64001
|
+
this.EnableArea=false;
|
|
64002
|
+
|
|
64003
|
+
this.Super_CalculateLines=this.CalculateLines;
|
|
64004
|
+
|
|
64005
|
+
this.CalculateLines=function(ptStart,ptEnd,quadrant)
|
|
64006
|
+
{
|
|
64007
|
+
if (!this.Super_CalculateLines(ptStart,ptEnd,quadrant)) return false;
|
|
64008
|
+
|
|
64009
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
64010
|
+
if (quadrant==1)
|
|
64011
|
+
{
|
|
64012
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64013
|
+
this.LinePoint.push(line);
|
|
64014
|
+
|
|
64015
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64016
|
+
this.LinePoint.push(line);
|
|
64017
|
+
}
|
|
64018
|
+
else if (quadrant==2)
|
|
64019
|
+
{
|
|
64020
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.TopEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64021
|
+
this.LinePoint.push(line);
|
|
64022
|
+
|
|
64023
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64024
|
+
this.LinePoint.push(line);
|
|
64025
|
+
}
|
|
64026
|
+
else if (quadrant==3)
|
|
64027
|
+
{
|
|
64028
|
+
var line={ Start:ptStart, End:{ X:border.Left, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64029
|
+
this.LinePoint.push(line);
|
|
64030
|
+
|
|
64031
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64032
|
+
this.LinePoint.push(line);
|
|
64033
|
+
}
|
|
64034
|
+
else if (quadrant==4)
|
|
64035
|
+
{
|
|
64036
|
+
var line={ Start:ptStart, End:{ X:ptStart.X, Y:border.BottomEx }, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64037
|
+
this.LinePoint.push(line);
|
|
64038
|
+
|
|
64039
|
+
var line={ Start:ptStart, End:{ X:border.Right, Y:ptStart.Y}, IsDottedLine:false, PtEnd:null, Text:null };
|
|
64040
|
+
this.LinePoint.push(line);
|
|
64041
|
+
}
|
|
64042
|
+
}
|
|
64043
|
+
}
|
|
64044
|
+
|
|
63985
64045
|
//阻速线 (高 3等份)
|
|
63986
64046
|
function ChartDrawPictureResistanceLine()
|
|
63987
64047
|
{
|
|
63988
64048
|
this.newMethod=ChartDrawPictureGannFan; //派生
|
|
63989
64049
|
this.newMethod();
|
|
63990
64050
|
delete this.newMethod;
|
|
63991
|
-
|
|
64051
|
+
|
|
63992
64052
|
this.ClassName='ChartDrawPictureResistanceLine';
|
|
63993
64053
|
|
|
63994
64054
|
//计算线段
|
|
@@ -64127,6 +64187,7 @@ function ChartDrawPictureResistanceLineV2()
|
|
|
64127
64187
|
this.EnableDottedLine=true; //辅助线是否使用虚线
|
|
64128
64188
|
this.LineDash=[4,8];
|
|
64129
64189
|
this.EnableArea=false;
|
|
64190
|
+
this.IsShowTitle=false;
|
|
64130
64191
|
}
|
|
64131
64192
|
|
|
64132
64193
|
|
|
@@ -138858,6 +138919,7 @@ function JSDialogDrawTool()
|
|
|
138858
138919
|
{ Title: '阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线" } },
|
|
138859
138920
|
{ Title: '通达信阻速线', ClassName: 'hqchart_drawtool icon-draw_resline', Type:0, Data:{ ID:"阻速线2" } },
|
|
138860
138921
|
{ Title: '江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线" } },
|
|
138922
|
+
{ Title: '通达信江恩角度线', ClassName: 'hqchart_drawtool icon-jiangenjiaoduxian', Type:0, Data:{ ID:"江恩角度线2" } },
|
|
138861
138923
|
]
|
|
138862
138924
|
},
|
|
138863
138925
|
{
|
|
@@ -139940,7 +140002,7 @@ function HQChartScriptWorker()
|
|
|
139940
140002
|
|
|
139941
140003
|
|
|
139942
140004
|
|
|
139943
|
-
var HQCHART_VERSION="1.1.
|
|
140005
|
+
var HQCHART_VERSION="1.1.13572";
|
|
139944
140006
|
|
|
139945
140007
|
function PrintHQChartVersion()
|
|
139946
140008
|
{
|