hqchart 1.1.12733 → 1.1.12741

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.
@@ -0,0 +1,137 @@
1
+ //账户信息
2
+
3
+ function ZUser(userid)
4
+ {
5
+ this.SelfStockApiUrl="https://opensource.zealink.com/API/SelfStock";
6
+ this.LogonApiUrl="https://opensource.zealink.com/API/Logon";
7
+
8
+ this.UserID=null;
9
+ this.NickName=null;
10
+ this.LogonCallback;
11
+
12
+ this.SelfStockData; //自选股信息
13
+ this.SelfStockCallback=null;
14
+
15
+ this.IsWechatApp=false; //是否是小程序模式
16
+
17
+ //微信登录
18
+ this.LogonWechat=function(wechartid,nickname,callback)
19
+ {
20
+ this.LogonCallback=callback;
21
+ this.ReqeustLogon(3,wechartid,nickname)
22
+ }
23
+
24
+ //是否登录了
25
+ this.IsLogon=function()
26
+ {
27
+ return this.UserID!=null;
28
+ }
29
+
30
+ this.ReqeustLogon=function(logonType,userid, password)
31
+ {
32
+ var self=this;
33
+
34
+ $.ajax({
35
+ url: this.LogonApiUrl,
36
+ data:
37
+ {
38
+ "logontype":logonType,
39
+ "user":userid,
40
+ "password":password,
41
+ "os":"appweb",
42
+ "identifiy":Guid(),
43
+ "ip":"0.0.0.0"
44
+ },
45
+ type:"post",
46
+ dataType: "json",
47
+ async:true,
48
+ success: function (data)
49
+ {
50
+ self.RecvLogonData(data,RECV_DATA_TYPE.LOGON_DATA);
51
+ },
52
+ error:function(request)
53
+ {
54
+ self.RecvError(request,RECV_DATA_TYPE.LOGON_DATA);
55
+ }
56
+ });
57
+ }
58
+
59
+ this.RecvLogonData=function(data,dataType)
60
+ {
61
+ if (data.code!=0)
62
+ {
63
+ if (typeof(this.LogonCallback)=="function") this.LogonCallback(this,data.message);
64
+ return;
65
+ }
66
+
67
+ this.UserID=data.userid;
68
+ this.NickName=data.nickname;
69
+
70
+ if (typeof(this.LogonCallback)=="function") this.LogonCallback(this);
71
+ }
72
+
73
+ //更新自选股
74
+ this.UpdateSelfStock=function()
75
+ {
76
+ this.ReqeustSelfStock();
77
+ }
78
+
79
+ this.SelfStock=function(callback)
80
+ {
81
+ this.SelfStockCallback=callback;
82
+ this.ReqeustSelfStock();
83
+ }
84
+
85
+ this.ReqeustSelfStock=function()
86
+ {
87
+ var self=this;
88
+
89
+ $.ajax({
90
+ url: this.SelfStockApiUrl,
91
+ data:
92
+ {
93
+ "userid":this.UserID,
94
+ },
95
+ type:"post",
96
+ dataType: "json",
97
+ async:true,
98
+ success: function (data)
99
+ {
100
+ self.RecvSelfStockData(data,RECV_DATA_TYPE.SELF_STOCK_DATA);
101
+ },
102
+ error:function(request)
103
+ {
104
+ self.RecvError(request,RECV_DATA_TYPE.SELF_STOCK_DATA);
105
+ }
106
+ });
107
+ }
108
+
109
+
110
+ this.RecvSelfStockData=function(data,dataType)
111
+ {
112
+ console.log(data);
113
+
114
+ this.SelfStockData=[];
115
+ for(var i in data.selfstock)
116
+ {
117
+ var item= data.selfstock[i];
118
+ var SelfStockItem={ Name:item.name, Data:new Array() };
119
+ for(var j in item.list)
120
+ {
121
+ var stock=item.list[j];
122
+
123
+ SelfStockItem.Data.push({Symbol:stock.symbol, Name:stock.name, date:stock.adddate});
124
+ }
125
+
126
+ this.SelfStockData.push(SelfStockItem);
127
+ }
128
+
129
+ if (typeof(this.SelfStockCallback)=="function") this.SelfStockCallback(this);
130
+ }
131
+
132
+ this.RecvError=function(request,dataType)
133
+ {
134
+
135
+ }
136
+ }
137
+
@@ -0,0 +1,30 @@
1
+ /********************************************************************************
2
+ * 版本信息输出
3
+ *
4
+ */
5
+
6
+
7
+
8
+ var HQCHART_VERSION="1.1.12740";
9
+
10
+ function PrintHQChartVersion()
11
+ {
12
+ var log=
13
+ `*************************************************************************************************************
14
+ *
15
+ * HQChart Ver: ${HQCHART_VERSION}
16
+ *
17
+ * License: Apache License 2.0
18
+ * Source: https://github.com/jones2000/HQChart
19
+ *
20
+ *************************************************************************************************************
21
+ `
22
+
23
+ console.log(log);
24
+ }
25
+
26
+
27
+ PrintHQChartVersion();
28
+
29
+
30
+
@@ -4483,6 +4483,11 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4483
4483
  {
4484
4484
  var item=option.GlobalOption;
4485
4485
  if (IFrameSplitOperator.IsBool(item.IsValueFullRange)) chart.GlobalOption.IsValueFullRange=item.IsValueFullRange;
4486
+ if (item.SelectedBorder)
4487
+ {
4488
+ var subItem=item.SelectedBorder;
4489
+ if (IFrameSplitOperator.IsNumber(subItem.Mode)) chart.GlobalOption.SelectedBorder.Mode=subItem.Mode;
4490
+ }
4486
4491
  }
4487
4492
 
4488
4493
  if (option.EnableYDrag)
@@ -7031,7 +7036,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7031
7036
  this.IndexChartDrag; //拖拽指标图形
7032
7037
  this.EnableIndexChartDrag=false;
7033
7038
 
7034
- this.GlobalOption={ IsValueFullRange:false , IsDisplayLatest:false }; //XDateFormat (多日分时图x轴底部日期格式)
7039
+ this.GlobalOption=
7040
+ {
7041
+ IsValueFullRange:false ,
7042
+ IsDisplayLatest:false,
7043
+ SelectedBorder:{ Mode:0, SelFrame:0 } //边框选中模式 Mode:0=禁用 1=右侧标记选中 2=指标窗口标记选中
7044
+ //XDateFormat (多日分时图x轴底部日期格式)
7045
+ };
7035
7046
 
7036
7047
  this.VerticalDrag; //通过X轴左右拖动数据(手势才有)
7037
7048
  this.EnableVerticalDrag=false;
@@ -7459,6 +7470,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7459
7470
  return;
7460
7471
  }
7461
7472
 
7473
+ var bDrawDynamicInfo=false;
7474
+ if (this.GlobalOption.SelectedBorder && this.GlobalOption.SelectedBorder.Mode>=1)
7475
+ {
7476
+ var item=this.GlobalOption.SelectedBorder;
7477
+ var frameId=this.Frame.PtInFrame(x,y);
7478
+ if (frameId>=0 && frameId!=item.SelFrame)
7479
+ {
7480
+ item.SelFrame=frameId;
7481
+ bDrawDynamicInfo=true;
7482
+ }
7483
+ }
7484
+
7462
7485
  if (this.TryClickCrossCursor(x,y, e))
7463
7486
  {
7464
7487
  return;
@@ -7728,12 +7751,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7728
7751
  else
7729
7752
  this.DrawDynamicInfo();
7730
7753
  }
7754
+ else if (bDrawDynamicInfo)
7755
+ {
7756
+ this.DrawDynamicInfo();
7757
+ }
7731
7758
 
7732
7759
  }
7733
7760
  }
7734
7761
 
7735
7762
  document.onmousemove=(e)=>{ this.DocOnMouseMove(e); }
7736
7763
  document.onmouseup=(e)=> { this.DocOnMouseUp(e); }
7764
+
7765
+
7737
7766
  }
7738
7767
 
7739
7768
  this.DocOnMouseMove=function(e)
@@ -9250,6 +9279,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9250
9279
  if (this.Frame.DrawToolbar) this.Frame.DrawToolbar(this.LastMouseStatus);
9251
9280
  this.DrawSelectedStatus();
9252
9281
 
9282
+ this.DrawSelectedBorder();
9283
+
9253
9284
  var moveonPoint=null;
9254
9285
  if (this.LastMouseStatus && this.LastMouseStatus.MoveOnPoint) moveonPoint=this.LastMouseStatus.MoveOnPoint;
9255
9286
  for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
@@ -9465,6 +9496,19 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9465
9496
  }
9466
9497
  }
9467
9498
 
9499
+ this.DrawSelectedBorder=function()
9500
+ {
9501
+ if (!this.GlobalOption.SelectedBorder) return;
9502
+ var item=this.GlobalOption.SelectedBorder;
9503
+ if (!IFrameSplitOperator.IsPlusNumber(item.Mode)) return;
9504
+ if (!IFrameSplitOperator.IsNumber(item.SelFrame) && item.SelFrame<0) return;
9505
+
9506
+ var subFrame=this.Frame.SubFrame[item.SelFrame];
9507
+ if (!subFrame) return;
9508
+
9509
+ if (subFrame.Frame.DrawSelectedBorder) subFrame.Frame.DrawSelectedBorder(item);
9510
+ }
9511
+
9468
9512
  //当前屏K线涨幅Y轴刻度
9469
9513
  this.KLineIncreaseCustomHorizontal=function()
9470
9514
  {
@@ -9619,6 +9663,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9619
9663
  if (this.Frame.DrawToolbar) this.Frame.DrawToolbar(this.LastMouseStatus);
9620
9664
 
9621
9665
  this.DrawSelectedStatus();
9666
+ this.DrawSelectedBorder();
9622
9667
 
9623
9668
  var moveonPoint=null;
9624
9669
  if (this.LastMouseStatus && this.LastMouseStatus.MoveOnPoint) moveonPoint=this.LastMouseStatus.MoveOnPoint;
@@ -12581,14 +12626,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12581
12626
 
12582
12627
  overlayFrame.Frame=frame;
12583
12628
 
12584
- var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
12585
- if (event && event.Callback)
12586
- {
12587
- var sendData={ OverlayFrame:overlayFrame, WindowIndex:dest.WindowIndex, SubFrame:subFrame };
12588
- event.Callback(event, sendData, this);
12589
- }
12590
-
12591
-
12592
12629
  var scriptIndex;
12593
12630
  if (findItem)
12594
12631
  {
@@ -12602,6 +12639,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12602
12639
  }
12603
12640
 
12604
12641
  overlayFrame.Script=scriptIndex;
12642
+
12643
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
12644
+ if (event && event.Callback)
12645
+ {
12646
+ var sendData={ OverlayFrame:overlayFrame, WindowIndex:dest.WindowIndex, SubFrame:subFrame };
12647
+ event.Callback(event, sendData, this);
12648
+ }
12649
+
12605
12650
  subFrame.OverlayIndex.push(overlayFrame);
12606
12651
 
12607
12652
  var updateWindowIndex=dest.WindowIndex;
@@ -13880,7 +13925,11 @@ function AverageWidthFrame()
13880
13925
  //Y轴刻度长线
13881
13926
  this.YLineExtend; //[0]=左 [1]=右 { Width:5, Color:颜色, }
13882
13927
  this.YTextExtend; //[0]=左 [1]=右 { Align:0=默认 1=左对齐 2=右对齐 }
13883
- this.YRightTextInfo;
13928
+ this.YRightTextInfo;
13929
+
13930
+ //X轴延长线
13931
+ this.XTextExtend; //[0]=底部 { Align:0=默认(居中), 1=左对齐 }
13932
+ this.XLineExtend; //[0]=底部 { Mode:1, Color: } Mode=1 分割线 Mode=2短线
13884
13933
 
13885
13934
  //画图工具刻度
13886
13935
 
@@ -14698,6 +14747,18 @@ function AverageWidthFrame()
14698
14747
  //JSConsole.Chart.Log('[AverageWidthFrame.DrawVertical] bottom',bottom);
14699
14748
  if (this.ChartBorder.Bottom<=5*GetDevicePixelRatio()) return; //高度不够 不显示
14700
14749
 
14750
+ var bottomTextExtend=null;
14751
+ if (this.XTextExtend)
14752
+ {
14753
+ bottomTextExtend=this.XTextExtend[0];
14754
+ }
14755
+
14756
+ var bottomLineExtend=null;
14757
+ if (this.XLineExtend)
14758
+ {
14759
+ bottomLineExtend=this.XLineExtend[0];
14760
+ }
14761
+
14701
14762
  var xPrev=null; //上一个坐标x的值
14702
14763
  var textRightPrev=null; //上一次刻度输出右边x坐标
14703
14764
  for(var i=0; i<this.VerticalInfo.length; ++i)
@@ -14741,7 +14802,7 @@ function AverageWidthFrame()
14741
14802
  {
14742
14803
  this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;
14743
14804
  this.Canvas.beginPath();
14744
- this.Canvas.moveTo(xFixed,top);
14805
+ this.Canvas.moveTo(xFiixed,top);
14745
14806
  this.Canvas.lineTo(xFixed,bottom);
14746
14807
  this.Canvas.stroke();
14747
14808
  }
@@ -14762,31 +14823,39 @@ function AverageWidthFrame()
14762
14823
 
14763
14824
  if (this.VerticalInfo[i].Message[0]!=null)
14764
14825
  {
14765
- if (this.VerticalInfo[i].Font!=null)
14766
- this.Canvas.font=this.VerticalInfo[i].Font;
14767
-
14826
+ if (this.VerticalInfo[i].Font) this.Canvas.font=this.VerticalInfo[i].Font;
14827
+
14768
14828
  var textLeft=0;
14769
14829
 
14770
14830
  this.Canvas.strokeStyle=item.TextColor;
14771
14831
  var testWidth=this.Canvas.measureText(this.VerticalInfo[i].Message[0]).width;
14772
14832
  var textHeight=this.Canvas.measureText("擎").width;
14773
- if (x<testWidth/2)
14833
+ if (bottomTextExtend && bottomTextExtend.Align==1)
14774
14834
  {
14775
14835
  this.Canvas.textAlign="left";
14776
14836
  this.Canvas.textBaseline="top";
14777
14837
  textLeft=x;
14778
14838
  }
14779
- else if ((x + testWidth / 2) >= this.ChartBorder.GetChartWidth())
14780
- {
14781
- this.Canvas.textAlign = "right";
14782
- this.Canvas.textBaseline="top";
14783
- textLeft=x-testWidth;
14784
- }
14785
14839
  else
14786
14840
  {
14787
- this.Canvas.textAlign="center";
14788
- this.Canvas.textBaseline="top";
14789
- textLeft=x-(testWidth/2);
14841
+ if (x<testWidth/2)
14842
+ {
14843
+ this.Canvas.textAlign="left";
14844
+ this.Canvas.textBaseline="top";
14845
+ textLeft=x;
14846
+ }
14847
+ else if ((x + testWidth / 2) >= this.ChartBorder.GetChartWidth())
14848
+ {
14849
+ this.Canvas.textAlign = "right";
14850
+ this.Canvas.textBaseline="top";
14851
+ textLeft=x-testWidth;
14852
+ }
14853
+ else
14854
+ {
14855
+ this.Canvas.textAlign="center";
14856
+ this.Canvas.textBaseline="top";
14857
+ textLeft=x-(testWidth/2);
14858
+ }
14790
14859
  }
14791
14860
 
14792
14861
  if (textRightPrev==null || textLeft>textRightPrev)
@@ -14803,6 +14872,36 @@ function AverageWidthFrame()
14803
14872
  yText+=lineLength+2*pixelRatio;
14804
14873
  }
14805
14874
 
14875
+ if (bottomLineExtend)
14876
+ {
14877
+ if (bottomLineExtend.Mode===1)
14878
+ {
14879
+ if (item.Value>1)
14880
+ {
14881
+ if (bottomLineExtend.Color) this.Canvas.strokeStyle=bottomLineExtend.Color;
14882
+ this.Canvas.beginPath();
14883
+ this.Canvas.moveTo(xFixed,bottom);
14884
+ this.Canvas.lineTo(xFixed,border.ChartHeight);
14885
+ this.Canvas.stroke();
14886
+ x+=1;
14887
+ }
14888
+ }
14889
+ else if (bottomLineExtend.Mode===2)
14890
+ {
14891
+ if (bottomLineExtend.Width>=1)
14892
+ {
14893
+ var lineLength=bottomLineExtend.Width;
14894
+ if (bottomLineExtend.Color) this.Canvas.strokeStyle=bottomLineExtend.Color;
14895
+ this.Canvas.beginPath();
14896
+ this.Canvas.moveTo(xFixed,yText);
14897
+ this.Canvas.lineTo(xFixed,yText+lineLength);
14898
+ this.Canvas.stroke();
14899
+
14900
+ yText+=lineLength+2;
14901
+ }
14902
+ }
14903
+ }
14904
+
14806
14905
  //item.TextBGColor="rgb(0,255,0)";
14807
14906
  if (item.TextBGColor) //文字背景色
14808
14907
  {
@@ -17792,6 +17891,8 @@ function KLineFrame()
17792
17891
  this.TitleWindow=g_JSChartResource.KLineToolbar.TitleWindow;
17793
17892
  this.ExportData=g_JSChartResource.KLineToolbar.ExportData; //是否显示'导出数据'菜单
17794
17893
 
17894
+ this.SelBorderColor=g_JSChartResource.SelFrameBorderColor;
17895
+
17795
17896
  this.ModifyIndexEvent; //改参数 点击事件
17796
17897
  this.ChangeIndexEvent; //换指标 点击事件
17797
17898
  this.ToolbarRect=null; //保存工具条的位置
@@ -18971,6 +19072,31 @@ function KLineFrame()
18971
19072
  }
18972
19073
  }
18973
19074
 
19075
+ this.DrawSelectedBorder=function(option)
19076
+ {
19077
+ if (this.Identify===0) return;
19078
+
19079
+ var border=this.IsHScreen==true?this.ChartBorder.GetHScreenBorder():this.ChartBorder.GetBorder();
19080
+
19081
+ var left=ToFixedPoint(border.Left);
19082
+ var top=ToFixedPoint(border.Top);
19083
+ var right=ToFixedPoint(border.Right);
19084
+ var bottom=ToFixedPoint(border.Bottom);
19085
+ var height=bottom-top;
19086
+
19087
+ this.Canvas.strokeStyle=this.SelBorderColor;
19088
+
19089
+ if (option.Mode==1)
19090
+ {
19091
+ var xRight=ToFixedPoint(border.ChartWidth);
19092
+ this.Canvas.strokeRect(right,top,xRight-right-1,height); //少一个像素让边框显示出来
19093
+ }
19094
+ else
19095
+ {
19096
+ this.Canvas.strokeRect(left,top,right-left-1,height); //少一个像素让边框显示出来
19097
+ }
19098
+ }
19099
+
18974
19100
  //是否在X轴坐标上
18975
19101
  //this.PtInVertical=function(x,y) { return false; }
18976
19102
  }
@@ -19005,6 +19131,7 @@ function OverlayKLineFrame()
19005
19131
 
19006
19132
  this.CloseButton=CloneData(g_JSChartResource.Buttons.CloseOverlayIndex);
19007
19133
  this.ModifyIndexParamButton=CloneData(g_JSChartResource.Buttons.ModifyIndexParam);
19134
+ this.DrawSelectedBorder=null;
19008
19135
 
19009
19136
  this.KLineFrame_ReloadResource=this.ReloadResource;
19010
19137
  this.ReloadResource=function(resource)
@@ -19733,6 +19860,8 @@ function KLineHScreenFrame()
19733
19860
  this.ClassName='KLineHScreenFrame';
19734
19861
  this.IsHScreen=true; //是否是横屏
19735
19862
 
19863
+ this.DrawSelectedBorder=null;
19864
+
19736
19865
  //画标题背景色
19737
19866
  this.DrawTitleBG=function()
19738
19867
  {
@@ -40580,7 +40709,7 @@ function ChartDrawSVG()
40580
40709
  x=this.ChartFrame.GetXFromIndex(index);
40581
40710
  if (item.Value=="Top") y=top;
40582
40711
  else if (item.Value=="Bottom") y=bottom;
40583
- else y=this.ChartFrame.GetYFromData(item.Value);
40712
+ else y=this.ChartFrame.GetYFromData(item.Value, false);
40584
40713
  if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset; //Y轴偏移
40585
40714
 
40586
40715
  var svgItem=item.SVG;
@@ -65987,8 +66116,9 @@ function JSChartResource()
65987
66116
  this.FrameSplitTextColor="rgb(117,125,129)"; //刻度文字颜色
65988
66117
  this.FrameSplitTextFont=14*GetDevicePixelRatio() +"px 微软雅黑"; //坐标刻度文字字体
65989
66118
  this.FrameTitleBGColor="rgb(246,251,253)"; //标题栏背景色
66119
+ this.SelFrameBorderColor='rgb(130, 130, 130)';
65990
66120
  this.Frame={
65991
- XBottomOffset:1*GetDevicePixelRatio(), //X轴文字向下偏移
66121
+ XBottomOffset:2*GetDevicePixelRatio(), //X轴文字向下偏移
65992
66122
  YTopOffset:2*GetDevicePixelRatio(), //Y轴顶部文字向下偏移
65993
66123
  YTextPadding:[2,2]
65994
66124
  };
@@ -67044,6 +67174,7 @@ function JSChartResource()
67044
67174
  if (style.FrameSplitTextColor) this.FrameSplitTextColor = style.FrameSplitTextColor;
67045
67175
  if (style.FrameSplitTextFont) this.FrameSplitTextFont = style.FrameSplitTextFont;
67046
67176
  if (style.FrameTitleBGColor) this.FrameTitleBGColor = style.FrameTitleBGColor;
67177
+ if (style.SelFrameBorderColor) this.SelFrameBorderColor=style.SelFrameBorderColor;
67047
67178
  if (IFrameSplitOperator.IsNumber(style.IndexTitleMerginLeft)) this.IndexTitleMerginLeft = style.IndexTitleMerginLeft;
67048
67179
 
67049
67180
  if (style.Frame)
@@ -73017,13 +73148,6 @@ function KLineChartContainer(uielement,OffscreenElement)
73017
73148
 
73018
73149
  overlayFrame.Frame=frame;
73019
73150
 
73020
- var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
73021
- if (event && event.Callback)
73022
- {
73023
- var sendData={ OverlayFrame:overlayFrame, WindowIndex:windowIndex, SubFrame:subFrame };
73024
- event.Callback(event, sendData, this);
73025
- }
73026
-
73027
73151
  if (apiItem)
73028
73152
  {
73029
73153
  var apiIndex=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,obj, true);
@@ -73058,6 +73182,13 @@ function KLineChartContainer(uielement,OffscreenElement)
73058
73182
  overlayFrame.Script=scriptIndex;
73059
73183
  }
73060
73184
 
73185
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
73186
+ if (event && event.Callback)
73187
+ {
73188
+ var sendData={ OverlayFrame:overlayFrame, WindowIndex:windowIndex, SubFrame:subFrame };
73189
+ event.Callback(event, sendData, this);
73190
+ }
73191
+
73061
73192
  subFrame.OverlayIndex.push(overlayFrame);
73062
73193
  return overlayFrame;
73063
73194
  }
@@ -116462,6 +116593,9 @@ function OverlayScriptIndex(name,script,args,option)
116462
116593
  case 'DRAWICON':
116463
116594
  this.CreateIcon(hqChart,windowIndex,item,i);
116464
116595
  break;
116596
+ case "TIPICON":
116597
+ this.CreateTipIcon(hqChart,windowIndex,item,i);
116598
+ break;
116465
116599
  case 'DRAWCHANNEL':
116466
116600
  this.CreateChannel(hqChart,windowIndex,item,i);
116467
116601
  break;
@@ -117174,6 +117308,74 @@ function OverlayScriptIndex(name,script,args,option)
117174
117308
  frame.ChartPaint.push(chart);
117175
117309
  }
117176
117310
 
117311
+ this.CreateTipIcon=function(hqChart,windowIndex,varItem,id)
117312
+ {
117313
+ var overlayIndex=this.OverlayIndex;
117314
+ var frame=overlayIndex.Frame;
117315
+ var chart=new ChartDrawSVG();
117316
+ chart.Canvas=hqChart.Canvas;
117317
+
117318
+ chart.Name=varItem.Name;
117319
+ chart.ChartBorder=frame.Frame.ChartBorder;
117320
+ chart.ChartFrame=frame.Frame;
117321
+ chart.Identify=overlayIndex.Identify;
117322
+
117323
+ if (hqChart.ChartPaint[0].IsMinuteFrame())
117324
+ chart.Data=hqChart.SourceData;
117325
+ else
117326
+ chart.Data=hqChart.ChartPaint[0].Data; //绑定K线
117327
+
117328
+ chart.Family=varItem.Draw.Icon.Family;
117329
+ chart.TextFont=g_JSChartResource.TIPICON.TextFont;
117330
+
117331
+ var svgSize=g_JSChartResource.TIPICON.Size;
117332
+ var svgColor=g_JSChartResource.TIPICON.Color;
117333
+ var svgYOffset=0;
117334
+ var svgVAlign=2; //上下对齐方式
117335
+ if (IFrameSplitOperator.IsNumber(varItem.YOffset)) svgYOffset=varItem.YOffset;
117336
+ if (varItem.Color) svgColor=this.GetColor(varItem.Color);
117337
+ if (varItem.DrawFontSize>0) svgSize=varItem.DrawFontSize;
117338
+ if (varItem.DrawVAlign>=0) svgVAlign=varItem.DrawVAlign;
117339
+
117340
+ if (varItem.Draw && IFrameSplitOperator.IsNonEmptyArray(varItem.Draw.DrawData) && varItem.Draw.Icon)
117341
+ {
117342
+ var drawData=varItem.Draw.DrawData;
117343
+ var aryData=[];
117344
+ var isArrayTip=Array.isArray(varItem.Draw.Text);
117345
+ var singleTip=null;
117346
+ if (!isArrayTip && varItem.Draw.Text) singleTip={ Text:varItem.Draw.Text };
117347
+
117348
+ for(var j=0;j<drawData.length;++j)
117349
+ {
117350
+ var item=drawData[j];
117351
+ if (!IFrameSplitOperator.IsNumber(item)) continue;
117352
+
117353
+ var svgItem=
117354
+ {
117355
+ Index:j, Value:item,
117356
+ SVG:{ Symbol:varItem.Draw.Icon.Symbol, Size:svgSize, Color:svgColor, YOffset:svgYOffset, VAlign:svgVAlign }
117357
+ };
117358
+
117359
+ if (isArrayTip)
117360
+ {
117361
+ var text=varItem.Draw.Text[j];
117362
+ if (text) svgItem.Tooltip={ Text:text };
117363
+ }
117364
+ else
117365
+ {
117366
+ svgItem.Tooltip=singleTip;
117367
+ }
117368
+
117369
+ aryData.push(svgItem);
117370
+ }
117371
+
117372
+ chart.Texts= aryData;
117373
+ }
117374
+
117375
+ frame.ChartPaint.push(chart);
117376
+ }
117377
+
117378
+
117177
117379
  //创建通道
117178
117380
  this.CreateChannel=function(hqChart,windowIndex,varItem,id)
117179
117381
  {
@@ -120305,7 +120507,7 @@ function GetBlackStyle()
120305
120507
 
120306
120508
  Frame:
120307
120509
  {
120308
- XBottomOffset:1*GetDevicePixelRatio(), //X轴文字向下偏移
120510
+ XBottomOffset:2*GetDevicePixelRatio(), //X轴文字向下偏移
120309
120511
 
120310
120512
  PercentageText: //百分比坐标文字颜色
120311
120513
  {
@@ -131192,7 +131394,7 @@ function HQChartScriptWorker()
131192
131394
 
131193
131395
 
131194
131396
 
131195
- var HQCHART_VERSION="1.1.12732";
131397
+ var HQCHART_VERSION="1.1.12740";
131196
131398
 
131197
131399
  function PrintHQChartVersion()
131198
131400
  {