hqchart 1.1.13558 → 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.
- package/lib/umychart.vue.js +39 -45
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogDrawTool.js +1 -0
- package/src/jscommon/umychart.js +180 -40
- package/src/jscommon/umychart.report.js +88 -6
- package/src/jscommon/umychart.style.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +270 -48
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +271 -48
package/package.json
CHANGED
|
@@ -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
|
},
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -2600,6 +2600,7 @@ var JSCHART_EVENT_ID=
|
|
|
2600
2600
|
|
|
2601
2601
|
ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
|
|
2602
2602
|
ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
|
|
2603
|
+
ON_CLICK_REPORT_BUTTON:142, //报价列表按钮
|
|
2603
2604
|
|
|
2604
2605
|
|
|
2605
2606
|
ON_CHANGE_INDEX:150, //切换指标
|
|
@@ -2772,8 +2773,12 @@ var JSCHART_MENU_ID=
|
|
|
2772
2773
|
|
|
2773
2774
|
CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:38,
|
|
2774
2775
|
|
|
2776
|
+
CMD_SHOW_CORSS_LINE_ID:39, //显示十字光标线
|
|
2777
|
+
|
|
2775
2778
|
|
|
2776
2779
|
CMD_REPORT_CHANGE_BLOCK_ID:60, //报价列表 切换板块ID
|
|
2780
|
+
|
|
2781
|
+
|
|
2777
2782
|
}
|
|
2778
2783
|
|
|
2779
2784
|
|
|
@@ -9293,6 +9298,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9293
9298
|
//右键菜单
|
|
9294
9299
|
this.PopupMenuByRClick=function(menuData, x, y)
|
|
9295
9300
|
{
|
|
9301
|
+
if (!this.JSPopMenu) return;
|
|
9302
|
+
|
|
9296
9303
|
var rtClient=this.UIElement.getBoundingClientRect();
|
|
9297
9304
|
var rtScroll=GetScrollPosition();
|
|
9298
9305
|
|
|
@@ -9555,6 +9562,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9555
9562
|
if (this.ChartDragSelectRect) this.ChartDragSelectRect.ShowMode=param;
|
|
9556
9563
|
}
|
|
9557
9564
|
break;
|
|
9565
|
+
|
|
9566
|
+
case JSCHART_MENU_ID.CMD_SHOW_CORSS_LINE_ID:
|
|
9567
|
+
if (IFrameSplitOperator.IsBool(srcParam))
|
|
9568
|
+
{
|
|
9569
|
+
if (this.ChartCorssCursor) this.ChartCorssCursor.IsShowCorss=srcParam;
|
|
9570
|
+
}
|
|
9571
|
+
break;
|
|
9558
9572
|
}
|
|
9559
9573
|
}
|
|
9560
9574
|
|
|
@@ -56345,6 +56359,7 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
56345
56359
|
{ Name:"文本", ClassName:'ChartDrawPictureText', Create:function() { return new ChartDrawPictureText(); }},
|
|
56346
56360
|
{ Name:"江恩角度线", ClassName:'ChartDrawPictureGannFan', Create:function() { return new ChartDrawPictureGannFan(); }},
|
|
56347
56361
|
{ Name:"阻速线", ClassName:'ChartDrawPictureResistanceLine', Create:function() { return new ChartDrawPictureResistanceLine(); }},
|
|
56362
|
+
{ Name:"阻速线2", ClassName:'ChartDrawPictureResistanceLineV2', Create:function() { return new ChartDrawPictureResistanceLineV2(); }},
|
|
56348
56363
|
{ Name:"黄金分割", ClassName:'ChartDrawPictureGoldenSection', Create:function() { return new ChartDrawPictureGoldenSection(); }},
|
|
56349
56364
|
{ Name:"百分比线", ClassName:'ChartDrawPicturePercentage', Create:function() { return new ChartDrawPicturePercentage(); }},
|
|
56350
56365
|
{ Name:"波段线", ClassName:'ChartDrawPictureWaveBand', Create:function() { return new ChartDrawPictureWaveBand(); }},
|
|
@@ -59738,6 +59753,23 @@ function ChartDrawPictureGannFan()
|
|
|
59738
59753
|
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
59739
59754
|
this.LinePoint=[];
|
|
59740
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
|
+
}
|
|
59741
59773
|
|
|
59742
59774
|
|
|
59743
59775
|
this.Draw=function()
|
|
@@ -59755,10 +59787,10 @@ function ChartDrawPictureGannFan()
|
|
|
59755
59787
|
var quadrant=this.GetQuadrant(drawPoint[0],drawPoint[1]);
|
|
59756
59788
|
|
|
59757
59789
|
this.SetLineWidth();
|
|
59758
|
-
if (quadrant===1 || quadrant===4)
|
|
59790
|
+
if (quadrant===1 || quadrant===2 || quadrant===3 || quadrant===4)
|
|
59759
59791
|
{
|
|
59760
59792
|
this.CalculateLines(drawPoint[0],drawPoint[1],quadrant);
|
|
59761
|
-
this.DrawArea();
|
|
59793
|
+
if (this.EnableArea) this.DrawArea();
|
|
59762
59794
|
|
|
59763
59795
|
for(var i in this.LinePoint)
|
|
59764
59796
|
{
|
|
@@ -59786,7 +59818,7 @@ function ChartDrawPictureGannFan()
|
|
|
59786
59818
|
this.GetQuadrant=function(ptStart,ptEnd)
|
|
59787
59819
|
{
|
|
59788
59820
|
if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 1;
|
|
59789
|
-
else if (ptStart.X
|
|
59821
|
+
else if (ptStart.X>ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
|
|
59790
59822
|
else if (ptStart.X < ptEnd.X && ptStart.Y< ptEnd.Y) return 4;
|
|
59791
59823
|
else return 3;
|
|
59792
59824
|
}
|
|
@@ -59795,7 +59827,7 @@ function ChartDrawPictureGannFan()
|
|
|
59795
59827
|
//isDotline 是否是虚线
|
|
59796
59828
|
this.DrawLine=function(ptStart,ptEnd,isDottedline)
|
|
59797
59829
|
{
|
|
59798
|
-
if (isDottedline) this.Canvas.setLineDash(
|
|
59830
|
+
if (isDottedline) this.Canvas.setLineDash(this.LineDash);
|
|
59799
59831
|
|
|
59800
59832
|
this.Canvas.strokeStyle=this.LineColor;
|
|
59801
59833
|
this.Canvas.beginPath();
|
|
@@ -59857,27 +59889,15 @@ function ChartDrawPictureGannFan()
|
|
|
59857
59889
|
var lineHeight=Math.abs(ptStart.Y-ptEnd.Y);
|
|
59858
59890
|
if (quadrant===1)
|
|
59859
59891
|
{
|
|
59860
|
-
/*
|
|
59861
|
-
var line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
|
|
59862
|
-
line.End.X=ptStart.X;
|
|
59863
|
-
line.End.Y=top;
|
|
59864
|
-
this.LinePoint.push(line);
|
|
59865
|
-
|
|
59866
|
-
line={Start:ptLineStart, End:new Point(), IsDottedLine:false};
|
|
59867
|
-
line.End.X=right;
|
|
59868
|
-
line.End.Y=ptStart.Y;
|
|
59869
|
-
this.LinePoint.push(line);
|
|
59870
|
-
*/
|
|
59871
|
-
|
|
59872
59892
|
var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
|
|
59873
59893
|
var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
|
|
59874
59894
|
this.LinePoint.push(line);
|
|
59875
59895
|
|
|
59876
|
-
for(var i
|
|
59896
|
+
for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
|
|
59877
59897
|
{
|
|
59878
59898
|
if (lineWidth>5)
|
|
59879
59899
|
{
|
|
59880
|
-
line={Start:ptLineStart, End:null, IsDottedLine:
|
|
59900
|
+
line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
|
|
59881
59901
|
line.PtEnd.Y=ptEnd.Y;
|
|
59882
59902
|
line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
|
|
59883
59903
|
var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
|
|
@@ -59886,7 +59906,7 @@ function ChartDrawPictureGannFan()
|
|
|
59886
59906
|
}
|
|
59887
59907
|
if (lineHeight>5)
|
|
59888
59908
|
{
|
|
59889
|
-
line={Start:ptLineStart, End:null, IsDottedLine:
|
|
59909
|
+
line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
|
|
59890
59910
|
line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
|
|
59891
59911
|
line.PtEnd.X=ptEnd.X;
|
|
59892
59912
|
var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
|
|
@@ -59896,29 +59916,77 @@ function ChartDrawPictureGannFan()
|
|
|
59896
59916
|
}
|
|
59897
59917
|
|
|
59898
59918
|
}
|
|
59899
|
-
else if (quadrant==
|
|
59919
|
+
else if (quadrant==2)
|
|
59900
59920
|
{
|
|
59901
|
-
|
|
59902
|
-
var line={Start:ptLineStart, End:
|
|
59903
|
-
line.End.X=ptStart.X;
|
|
59904
|
-
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'};
|
|
59905
59923
|
this.LinePoint.push(line);
|
|
59906
59924
|
|
|
59907
|
-
|
|
59908
|
-
|
|
59909
|
-
|
|
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'};
|
|
59910
59955
|
this.LinePoint.push(line);
|
|
59911
|
-
*/
|
|
59912
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
|
+
{
|
|
59913
59981
|
var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);
|
|
59914
59982
|
var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
|
|
59915
59983
|
this.LinePoint.push(line);
|
|
59916
59984
|
|
|
59917
|
-
for(var i
|
|
59985
|
+
for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
|
|
59918
59986
|
{
|
|
59919
59987
|
if (lineWidth>5)
|
|
59920
59988
|
{
|
|
59921
|
-
line={Start:ptLineStart, End:null, IsDottedLine:
|
|
59989
|
+
line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(),Text:SPLIT_LINE_X_TITLE[i]};
|
|
59922
59990
|
line.PtEnd.Y=ptEnd.Y;
|
|
59923
59991
|
line.PtEnd.X=ptStart.X+lineWidth*SPLIT_LINE_VALUE[i];
|
|
59924
59992
|
var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
|
|
@@ -59927,7 +59995,7 @@ function ChartDrawPictureGannFan()
|
|
|
59927
59995
|
}
|
|
59928
59996
|
if (lineHeight>5)
|
|
59929
59997
|
{
|
|
59930
|
-
line={Start:ptLineStart, End:null, IsDottedLine:
|
|
59998
|
+
line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
|
|
59931
59999
|
line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
|
|
59932
60000
|
line.PtEnd.X=ptEnd.X;
|
|
59933
60001
|
var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
|
|
@@ -59936,7 +60004,10 @@ function ChartDrawPictureGannFan()
|
|
|
59936
60004
|
}
|
|
59937
60005
|
}
|
|
59938
60006
|
}
|
|
59939
|
-
else
|
|
60007
|
+
else
|
|
60008
|
+
{
|
|
60009
|
+
return false;
|
|
60010
|
+
}
|
|
59940
60011
|
|
|
59941
60012
|
return true;
|
|
59942
60013
|
}
|
|
@@ -59975,11 +60046,11 @@ function ChartDrawPictureResistanceLine()
|
|
|
59975
60046
|
var line={Start:ptLineStart, End:extendLine.Start, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
|
|
59976
60047
|
this.LinePoint.push(line);
|
|
59977
60048
|
|
|
59978
|
-
for(var i
|
|
60049
|
+
for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
|
|
59979
60050
|
{
|
|
59980
60051
|
if (lineHeight>5)
|
|
59981
60052
|
{
|
|
59982
|
-
line={Start:ptLineStart, End:null, IsDottedLine:
|
|
60053
|
+
line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
|
|
59983
60054
|
line.PtEnd.Y=ptStart.Y-lineHeight*SPLIT_LINE_VALUE[i];
|
|
59984
60055
|
line.PtEnd.X=ptEnd.X;
|
|
59985
60056
|
var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
|
|
@@ -59987,7 +60058,45 @@ function ChartDrawPictureResistanceLine()
|
|
|
59987
60058
|
this.LinePoint.push(line);
|
|
59988
60059
|
}
|
|
59989
60060
|
}
|
|
59990
|
-
|
|
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
|
+
}
|
|
59991
60100
|
}
|
|
59992
60101
|
else if (quadrant==4)
|
|
59993
60102
|
{
|
|
@@ -59995,11 +60104,11 @@ function ChartDrawPictureResistanceLine()
|
|
|
59995
60104
|
var line={Start:ptLineStart, End:extendLine.End, IsDottedLine:false,PtEnd:ptLineEnd, Text:'1:1'};
|
|
59996
60105
|
this.LinePoint.push(line);
|
|
59997
60106
|
|
|
59998
|
-
for(var i
|
|
60107
|
+
for(var i=0;i<SPLIT_LINE_VALUE.length; ++i)
|
|
59999
60108
|
{
|
|
60000
60109
|
if (lineHeight>5)
|
|
60001
60110
|
{
|
|
60002
|
-
line={Start:ptLineStart, End:null, IsDottedLine:
|
|
60111
|
+
line={Start:ptLineStart, End:null, IsDottedLine:this.EnableDottedLine,PtEnd:new Point(), Text:SPLIT_LINE_Y_TITLE[i]};
|
|
60003
60112
|
line.PtEnd.Y=ptStart.Y+lineHeight*SPLIT_LINE_VALUE[i];
|
|
60004
60113
|
line.PtEnd.X=ptEnd.X;
|
|
60005
60114
|
var extendLine=this.CalculateExtendLinePoint(line.Start,line.PtEnd);
|
|
@@ -60008,7 +60117,10 @@ function ChartDrawPictureResistanceLine()
|
|
|
60008
60117
|
}
|
|
60009
60118
|
}
|
|
60010
60119
|
}
|
|
60011
|
-
else
|
|
60120
|
+
else
|
|
60121
|
+
{
|
|
60122
|
+
return false;
|
|
60123
|
+
}
|
|
60012
60124
|
|
|
60013
60125
|
return true;
|
|
60014
60126
|
}
|
|
@@ -60035,6 +60147,22 @@ function ChartDrawPictureResistanceLine()
|
|
|
60035
60147
|
}
|
|
60036
60148
|
}
|
|
60037
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
|
+
|
|
60038
60166
|
//黄金分割线
|
|
60039
60167
|
function ChartDrawPictureGoldenSection()
|
|
60040
60168
|
{
|
|
@@ -67147,7 +67275,7 @@ function JSChartResource()
|
|
|
67147
67275
|
|
|
67148
67276
|
Item:
|
|
67149
67277
|
{
|
|
67150
|
-
Mergin:{ Top:2, Bottom:
|
|
67278
|
+
Mergin:{ Top:2, Bottom:4,Left:5, Right:5 }, //单元格四周间距
|
|
67151
67279
|
Font:{ Size:15, Name:"微软雅黑"},
|
|
67152
67280
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 },//单元格字体
|
|
67153
67281
|
NameFont:{ Size:14, Name:"微软雅黑" },
|
|
@@ -74918,6 +75046,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
74918
75046
|
if (this.GetExtendChartByClassName("SessionBreaksPaint")) bBGSpit=true;
|
|
74919
75047
|
if (this.GetExtendChartByClassName('StockChip')) bShowStockChip=true; //筹码
|
|
74920
75048
|
|
|
75049
|
+
var bShowCorss=false; //十字光标十字线
|
|
75050
|
+
if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
|
|
75051
|
+
|
|
74921
75052
|
var aryMenu=
|
|
74922
75053
|
[
|
|
74923
75054
|
{
|
|
@@ -75076,6 +75207,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75076
75207
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog() },
|
|
75077
75208
|
|
|
75078
75209
|
{ Name:"移动筹码图", Data:{ ID:bShowStockChip?JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID, Args:[]}, Checked:bShowStockChip},
|
|
75210
|
+
|
|
75211
|
+
{ Name:"十字光标线", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_CORSS_LINE_ID, Args:[!bShowCorss]}, Checked:bShowCorss },
|
|
75212
|
+
|
|
75079
75213
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
75080
75214
|
{
|
|
75081
75215
|
Name:"鼠标形状",
|
|
@@ -78580,6 +78714,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78580
78714
|
if (item && item.Symbol) aryOverlaySymbol.push(item.Symbol)
|
|
78581
78715
|
}
|
|
78582
78716
|
|
|
78717
|
+
var bShowCorss=false; //十字光标十字线
|
|
78718
|
+
if (this.ChartCorssCursor) bShowCorss=this.ChartCorssCursor.IsShowCorss;
|
|
78719
|
+
|
|
78583
78720
|
var aryMenu=
|
|
78584
78721
|
[
|
|
78585
78722
|
{
|
|
@@ -78648,6 +78785,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78648
78785
|
SubMenu:
|
|
78649
78786
|
[
|
|
78650
78787
|
{ Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
|
|
78788
|
+
{ Name:"十字光标线", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_CORSS_LINE_ID, Args:[!bShowCorss]}, Checked:bShowCorss },
|
|
78651
78789
|
|
|
78652
78790
|
{
|
|
78653
78791
|
Name:"区间选择样式",
|
|
@@ -78657,7 +78795,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78657
78795
|
{ Name:"样式2", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[1]}, Checked:1==this.ChartDragSelectRect.ShowMode },
|
|
78658
78796
|
{ Name:"样式3", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID, Args:[2]}, Checked:2==this.ChartDragSelectRect.ShowMode },
|
|
78659
78797
|
]
|
|
78660
|
-
}
|
|
78798
|
+
},
|
|
78799
|
+
|
|
78800
|
+
|
|
78661
78801
|
]
|
|
78662
78802
|
}
|
|
78663
78803
|
|
|
@@ -3680,6 +3680,7 @@ var REPORT_COLUMN_ID=
|
|
|
3680
3680
|
CUSTOM_DATETIME_TEXT_ID:102, //自定义日期类型
|
|
3681
3681
|
CUSTOM_ICON_ID:103, //自定义图标
|
|
3682
3682
|
CUSTOM_CHECKBOX_ID:104, //自定义checkbox
|
|
3683
|
+
CUSTOM_BUTTON_ID:105, //自定义按钮
|
|
3683
3684
|
}
|
|
3684
3685
|
|
|
3685
3686
|
var MAP_COLUMN_FIELD=new Map([
|
|
@@ -4056,6 +4057,13 @@ function ChartReport()
|
|
|
4056
4057
|
if (item.CheckBox) colItem.CheckBox=CloneData(item.CheckBox);
|
|
4057
4058
|
else colItem.CheckBox=CloneData(g_JSChartResource.Report.CheckBox);
|
|
4058
4059
|
}
|
|
4060
|
+
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
4061
|
+
{
|
|
4062
|
+
if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) continue;
|
|
4063
|
+
if (IFrameSplitOperator.IsNumber(item.DataIndex)) colItem.DataIndex=item.DataIndex; //数据在扩展数据索引列
|
|
4064
|
+
if (IFrameSplitOperator.IsNumber(item.BlockIndex)) colItem.BlockIndex=item.BlockIndex;
|
|
4065
|
+
if (item.Button) colItem.Button=CloneData(item.Button);
|
|
4066
|
+
}
|
|
4059
4067
|
else if (item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID)
|
|
4060
4068
|
{
|
|
4061
4069
|
|
|
@@ -4173,7 +4181,7 @@ function ChartReport()
|
|
|
4173
4181
|
|
|
4174
4182
|
{ Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID, Title:"", TextAlign:"center", FixedWidth:20*GetDevicePixelRatio() },
|
|
4175
4183
|
|
|
4176
|
-
|
|
4184
|
+
{ Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID, Title:"", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() }
|
|
4177
4185
|
];
|
|
4178
4186
|
|
|
4179
4187
|
for(var i=0;i<DEFAULT_COLUMN.length;++i)
|
|
@@ -5137,6 +5145,15 @@ function ChartReport()
|
|
|
5137
5145
|
|
|
5138
5146
|
this.GetCustomCheckBoxDrawInfo(data, column, drawInfo);
|
|
5139
5147
|
}
|
|
5148
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
5149
|
+
{
|
|
5150
|
+
rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
5151
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
5152
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
5153
|
+
drawInfo.Rect=rtItem;
|
|
5154
|
+
|
|
5155
|
+
this.GetCustomButtonDrawInfo(data, column, drawInfo);
|
|
5156
|
+
}
|
|
5140
5157
|
|
|
5141
5158
|
|
|
5142
5159
|
//拖拽行颜色
|
|
@@ -5155,6 +5172,10 @@ function ChartReport()
|
|
|
5155
5172
|
{
|
|
5156
5173
|
this.DrawCheckbox(drawInfo, left, top, itemWidth);
|
|
5157
5174
|
}
|
|
5175
|
+
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID)
|
|
5176
|
+
{
|
|
5177
|
+
this.DrawButton(drawInfo, left, top, itemWidth);
|
|
5178
|
+
}
|
|
5158
5179
|
else
|
|
5159
5180
|
{
|
|
5160
5181
|
if (data.FlashBG && data.FlashBG.Data && column.ID!=undefined)
|
|
@@ -5248,9 +5269,9 @@ function ChartReport()
|
|
|
5248
5269
|
}
|
|
5249
5270
|
}
|
|
5250
5271
|
|
|
5251
|
-
this.Canvas.textBaseline="
|
|
5272
|
+
this.Canvas.textBaseline="bottom";
|
|
5252
5273
|
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
5253
|
-
this.Canvas.fillText(text,x,top+this.ItemMergin.
|
|
5274
|
+
this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);
|
|
5254
5275
|
|
|
5255
5276
|
if (bClip) this.Canvas.restore();
|
|
5256
5277
|
}
|
|
@@ -5457,6 +5478,19 @@ function ChartReport()
|
|
|
5457
5478
|
drawInfo.CheckBox=column.CheckBox;
|
|
5458
5479
|
}
|
|
5459
5480
|
|
|
5481
|
+
this.GetCustomButtonDrawInfo=function(data, column, drawInfo)
|
|
5482
|
+
{
|
|
5483
|
+
var buttonData=this.GetExtendData(data, column);
|
|
5484
|
+
if (!buttonData) return;
|
|
5485
|
+
|
|
5486
|
+
drawInfo.Text=buttonData.Title;
|
|
5487
|
+
drawInfo.Button=column.Button;
|
|
5488
|
+
drawInfo.Font=column.Button.Font;
|
|
5489
|
+
drawInfo.Enable=true;
|
|
5490
|
+
drawInfo.Data=buttonData;
|
|
5491
|
+
if (IFrameSplitOperator.IsBool(buttonData.Enable)) drawInfo.Enable=buttonData.Enable;
|
|
5492
|
+
}
|
|
5493
|
+
|
|
5460
5494
|
this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
|
|
5461
5495
|
{
|
|
5462
5496
|
if (!IFrameSplitOperator.IsNumber(stock.Time)) return;
|
|
@@ -5617,9 +5651,9 @@ function ChartReport()
|
|
|
5617
5651
|
}
|
|
5618
5652
|
}
|
|
5619
5653
|
|
|
5620
|
-
this.Canvas.textBaseline="
|
|
5654
|
+
this.Canvas.textBaseline="bottom";
|
|
5621
5655
|
this.Canvas.fillStyle=textColor;
|
|
5622
|
-
this.Canvas.fillText(text,x,top+this.ItemMergin.
|
|
5656
|
+
this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);
|
|
5623
5657
|
|
|
5624
5658
|
if (bClip) this.Canvas.restore();
|
|
5625
5659
|
}
|
|
@@ -5759,6 +5793,46 @@ function ChartReport()
|
|
|
5759
5793
|
}
|
|
5760
5794
|
}
|
|
5761
5795
|
|
|
5796
|
+
this.DrawButton=function(drawInfo, left, top, width)
|
|
5797
|
+
{
|
|
5798
|
+
if (!drawInfo.Button) return;
|
|
5799
|
+
|
|
5800
|
+
var rtBG=
|
|
5801
|
+
{
|
|
5802
|
+
Left:left+drawInfo.Button.Margin.Left, Top:top+drawInfo.Button.Margin.Top,
|
|
5803
|
+
Height:this.RowHeight-drawInfo.Button.Margin.Top-drawInfo.Button.Margin.Bottom,
|
|
5804
|
+
Width:width-drawInfo.Button.Margin.Left-drawInfo.Button.Margin.Right
|
|
5805
|
+
}
|
|
5806
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
5807
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
5808
|
+
|
|
5809
|
+
var bgColor=drawInfo.Button.BGColor, textColor=drawInfo.Button.TextColor;
|
|
5810
|
+
if (drawInfo.Enable===false)
|
|
5811
|
+
{
|
|
5812
|
+
bgColor=drawInfo.Button.Disable.BGColor;
|
|
5813
|
+
textColor=drawInfo.Button.Disable.TextColor;
|
|
5814
|
+
}
|
|
5815
|
+
|
|
5816
|
+
this.Canvas.fillStyle=bgColor;
|
|
5817
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top,rtBG.Width,rtBG.Height);
|
|
5818
|
+
|
|
5819
|
+
this.Canvas.font=drawInfo.Font;
|
|
5820
|
+
this.Canvas.textBaseline="bottom";
|
|
5821
|
+
this.Canvas.textAlign="left";
|
|
5822
|
+
this.Canvas.fillStyle=textColor;
|
|
5823
|
+
var textWidth=this.Canvas.measureText(drawInfo.Text).width;
|
|
5824
|
+
|
|
5825
|
+
var x=rtBG.Left;
|
|
5826
|
+
if (textWidth<rtBG.Width) x+=(rtBG.Width-textWidth)/2;
|
|
5827
|
+
var y=rtBG.Bottom-drawInfo.Button.TextMargin.Bottom;
|
|
5828
|
+
this.Canvas.fillText(drawInfo.Text,x,y);
|
|
5829
|
+
|
|
5830
|
+
if (drawInfo.Enable)
|
|
5831
|
+
{
|
|
5832
|
+
drawInfo.Botton={ Rect:rtBG, Type:1 };
|
|
5833
|
+
}
|
|
5834
|
+
}
|
|
5835
|
+
|
|
5762
5836
|
//字体由外面设置
|
|
5763
5837
|
this.TextEllipsis=function(text, maxWidth, maxText)
|
|
5764
5838
|
{
|
|
@@ -6447,7 +6521,7 @@ function ChartReport()
|
|
|
6447
6521
|
var buttonData=this.GetButtonData(x,y);
|
|
6448
6522
|
if (!buttonData) return true;
|
|
6449
6523
|
|
|
6450
|
-
if (buttonData.Type===0)
|
|
6524
|
+
if (buttonData.Type===0) //checkbox
|
|
6451
6525
|
{
|
|
6452
6526
|
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data, PreventDefault: false };
|
|
6453
6527
|
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_CHECKBOX, sendData)
|
|
@@ -6463,6 +6537,14 @@ function ChartReport()
|
|
|
6463
6537
|
status.Redraw=true;
|
|
6464
6538
|
return true;
|
|
6465
6539
|
}
|
|
6540
|
+
else if (buttonData.Type===1) //button
|
|
6541
|
+
{
|
|
6542
|
+
var sendData={ Column:buttonData.Column, Index:buttonData.Index, Stock:buttonData.Stock, Data:buttonData.Data };
|
|
6543
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_BUTTON, sendData)
|
|
6544
|
+
|
|
6545
|
+
status.Redraw=true;
|
|
6546
|
+
return true;
|
|
6547
|
+
}
|
|
6466
6548
|
|
|
6467
6549
|
return false;
|
|
6468
6550
|
}
|
|
@@ -532,7 +532,7 @@ function GetBlackStyle()
|
|
|
532
532
|
|
|
533
533
|
Item:
|
|
534
534
|
{
|
|
535
|
-
Mergin:{ Top:2, Bottom:
|
|
535
|
+
Mergin:{ Top:2, Bottom:4,Left:5, Right:5 },
|
|
536
536
|
Font:{ Size:15, Name:"微软雅黑"},
|
|
537
537
|
BarMergin:{ Top:2, Left:3, Right:3, Bottom:2 },
|
|
538
538
|
NameFont:{ Size:14, Name:"微软雅黑" },
|