hqchart 1.1.12687 → 1.1.12693
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 +94 -50
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +3 -1
- package/src/jscommon/umychart.js +394 -109
- package/src/jscommon/umychart.style.js +11 -4
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +409 -115
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +409 -115
- package/src/jscommon/umychart.wechat/umychart.chartframe.wechat.js +12 -1
- package/src/jscommon/umychart.wechat/umychart.wechat.3.0.js +4 -0
|
@@ -4821,7 +4821,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4821
4821
|
}
|
|
4822
4822
|
|
|
4823
4823
|
//叠加指标宽度
|
|
4824
|
-
if (option.OverlayIndexFrameWidth>40) chart.
|
|
4824
|
+
if (option.OverlayIndexFrameWidth>40) chart.Frame.FixedRightWidth.Overlay=option.OverlayIndexFrameWidth;
|
|
4825
4825
|
|
|
4826
4826
|
//叠加指标
|
|
4827
4827
|
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
@@ -6705,7 +6705,9 @@ var JSCHART_EVENT_ID=
|
|
|
6705
6705
|
ON_CUSTOM_DRAG_DOC_MOUSE_UP:115,
|
|
6706
6706
|
ON_CUSTOM_DRAG_MOUSE_MOVE:116,
|
|
6707
6707
|
|
|
6708
|
-
ON_KEYDOWN:117
|
|
6708
|
+
ON_KEYDOWN:117,
|
|
6709
|
+
|
|
6710
|
+
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
6709
6711
|
}
|
|
6710
6712
|
|
|
6711
6713
|
var JSCHART_OPERATOR_ID=
|
|
@@ -12546,7 +12548,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12546
12548
|
else
|
|
12547
12549
|
{
|
|
12548
12550
|
var subFrame=this.Frame.SubFrame[dest.WindowIndex];
|
|
12549
|
-
subFrame.Interval=this.OverlayIndexFrameWidth;
|
|
12550
12551
|
var overlayFrame=new OverlayIndexItem();
|
|
12551
12552
|
var frame=this.CreateOverlayFrame();
|
|
12552
12553
|
frame.Canvas=this.Canvas;
|
|
@@ -12563,6 +12564,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12563
12564
|
frame.YSplitOperator.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
|
|
12564
12565
|
|
|
12565
12566
|
overlayFrame.Frame=frame;
|
|
12567
|
+
|
|
12568
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
|
|
12569
|
+
if (event && event.Callback)
|
|
12570
|
+
{
|
|
12571
|
+
var sendData={ OverlayFrame:overlayFrame, WindowIndex:dest.WindowIndex, SubFrame:subFrame };
|
|
12572
|
+
event.Callback(event, sendData, this);
|
|
12573
|
+
}
|
|
12574
|
+
|
|
12575
|
+
|
|
12566
12576
|
var scriptIndex;
|
|
12567
12577
|
if (findItem)
|
|
12568
12578
|
{
|
|
@@ -13053,7 +13063,7 @@ function CoordinateInfo()
|
|
|
13053
13063
|
this.Font=g_JSChartResource.FrameSplitTextFont; //字体
|
|
13054
13064
|
this.LineColor=g_JSChartResource.FrameSplitPen; //线段颜色
|
|
13055
13065
|
this.LineDash=null; //当线段类型==2时 可以设置虚线样式
|
|
13056
|
-
this.LineType=1; //线段类型 -1
|
|
13066
|
+
this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
|
|
13057
13067
|
this.LineWidth; //线段宽度
|
|
13058
13068
|
this.ExtendData; //扩展属性
|
|
13059
13069
|
//百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
|
|
@@ -13413,6 +13423,9 @@ function IChartFramePainting()
|
|
|
13413
13423
|
this.LogoBGColor=g_JSChartResource.FrameLogo.BGColor;
|
|
13414
13424
|
this.GlobalOption;
|
|
13415
13425
|
|
|
13426
|
+
//this.IsDrawLeftBorder;
|
|
13427
|
+
this.IsDrawRightBorder=false; //是否绘制右侧刻度空白的边框
|
|
13428
|
+
|
|
13416
13429
|
this.PtInButtons=function(x,y) //坐标是否在按钮上
|
|
13417
13430
|
{
|
|
13418
13431
|
for(var i=0;i<this.Buttons.length;++i)
|
|
@@ -13492,8 +13505,22 @@ function IChartFramePainting()
|
|
|
13492
13505
|
//JSConsole.Chart.Log(`[IChartFramePainting.DrawBorder] left=${left} `);
|
|
13493
13506
|
if (this.BorderLine==null)
|
|
13494
13507
|
{
|
|
13495
|
-
this.
|
|
13496
|
-
|
|
13508
|
+
if (this.IsDrawRightBorder)
|
|
13509
|
+
{
|
|
13510
|
+
var xRight=ToFixedPoint(border.ChartWidth);
|
|
13511
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
13512
|
+
this.Canvas.strokeRect(left,top,xRight-left,height);
|
|
13513
|
+
|
|
13514
|
+
this.Canvas.beginPath();
|
|
13515
|
+
this.Canvas.moveTo(right,top);
|
|
13516
|
+
this.Canvas.lineTo(right,bottom);
|
|
13517
|
+
this.Canvas.stroke();
|
|
13518
|
+
}
|
|
13519
|
+
else
|
|
13520
|
+
{
|
|
13521
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
13522
|
+
this.Canvas.strokeRect(left,top,width,height);
|
|
13523
|
+
}
|
|
13497
13524
|
}
|
|
13498
13525
|
else if (IFrameSplitOperator.IsPlusNumber(this.BorderLine)) //单独绘制每个边框
|
|
13499
13526
|
{
|
|
@@ -13527,7 +13554,20 @@ function IChartFramePainting()
|
|
|
13527
13554
|
this.Canvas.stroke();
|
|
13528
13555
|
}
|
|
13529
13556
|
|
|
13530
|
-
|
|
13557
|
+
/*
|
|
13558
|
+
if (this.IsDrawRightBorder)
|
|
13559
|
+
{
|
|
13560
|
+
var xRight=ToFixedPoint(border.ChartWidth);
|
|
13561
|
+
var xLeft=right;
|
|
13562
|
+
this.Canvas.beginPath();
|
|
13563
|
+
this.Canvas.moveTo(xLeft,top);
|
|
13564
|
+
this.Canvas.lineTo(xRight,top);
|
|
13565
|
+
this.Canvas.lineTo(xRight,bottom);
|
|
13566
|
+
this.Canvas.lineTo(xLeft,bottom);
|
|
13567
|
+
|
|
13568
|
+
this.Canvas.stroke();
|
|
13569
|
+
}
|
|
13570
|
+
*/
|
|
13531
13571
|
}
|
|
13532
13572
|
|
|
13533
13573
|
//画标题背景色
|
|
@@ -13772,6 +13812,11 @@ function AverageWidthFrame()
|
|
|
13772
13812
|
|
|
13773
13813
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
13774
13814
|
|
|
13815
|
+
//Y轴刻度长线
|
|
13816
|
+
this.YLineExtend; //[0]=左 [1]=右 { Width:5, Color:颜色, }
|
|
13817
|
+
this.YTextExtend; //[0]=左 [1]=右 { Align:0=默认 1=左对齐 2=右对齐 }
|
|
13818
|
+
this.YRightTextInfo;
|
|
13819
|
+
|
|
13775
13820
|
//画图工具刻度
|
|
13776
13821
|
|
|
13777
13822
|
this.DrawPicture={
|
|
@@ -14010,6 +14055,18 @@ function AverageWidthFrame()
|
|
|
14010
14055
|
var isDrawLeft=borderLeft>10 && this.IsShowYText[0]===true && this.YTextPosition[0]!=2;
|
|
14011
14056
|
var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
14012
14057
|
|
|
14058
|
+
var rightExtendLine=null; //右侧延长线
|
|
14059
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
14060
|
+
{
|
|
14061
|
+
rightExtendLine=this.YLineExtend[1];
|
|
14062
|
+
}
|
|
14063
|
+
|
|
14064
|
+
var rightExtendText=null; //右侧文字设置
|
|
14065
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YTextExtend))
|
|
14066
|
+
{
|
|
14067
|
+
rightExtendText=this.YTextExtend[1];
|
|
14068
|
+
}
|
|
14069
|
+
|
|
14013
14070
|
var yPrev=null; //上一个坐标y的值
|
|
14014
14071
|
var pixelRatio=GetDevicePixelRatio();
|
|
14015
14072
|
var itemHeight=(border.BottomEx-border.TopEx)/this.HorizontalInfo.length;
|
|
@@ -14023,6 +14080,7 @@ function AverageWidthFrame()
|
|
|
14023
14080
|
if (y!=null && yPrev!=null && Math.abs(y-yPrev)<this.MinYDistance) continue; //两个坐标在近了 就不画了
|
|
14024
14081
|
|
|
14025
14082
|
var yFixed=ToFixedPoint(y);
|
|
14083
|
+
//绘制刻度线
|
|
14026
14084
|
if (y!=bottom && this.IsShowYLine)
|
|
14027
14085
|
{
|
|
14028
14086
|
var bChangeLineWidth=false;
|
|
@@ -14099,7 +14157,7 @@ function AverageWidthFrame()
|
|
|
14099
14157
|
textBaseline=1;
|
|
14100
14158
|
}
|
|
14101
14159
|
|
|
14102
|
-
|
|
14160
|
+
//左边 坐标信息 间距小于10 不画坐标
|
|
14103
14161
|
this.Canvas.strokeStyle=item.TextColor;
|
|
14104
14162
|
this.Canvas.fillStyle=item.TextColor;
|
|
14105
14163
|
|
|
@@ -14116,7 +14174,7 @@ function AverageWidthFrame()
|
|
|
14116
14174
|
}
|
|
14117
14175
|
}
|
|
14118
14176
|
|
|
14119
|
-
|
|
14177
|
+
//右边 坐标信息 间距小于10 不画坐标
|
|
14120
14178
|
if (item.Message[1]!=null && isDrawRight)
|
|
14121
14179
|
{
|
|
14122
14180
|
if (item.Font!=null) this.Canvas.font=item.Font;
|
|
@@ -14133,6 +14191,21 @@ function AverageWidthFrame()
|
|
|
14133
14191
|
xText+=lineLength;
|
|
14134
14192
|
}
|
|
14135
14193
|
|
|
14194
|
+
//右侧延长线
|
|
14195
|
+
if (rightExtendLine && rightExtendLine.Width>1)
|
|
14196
|
+
{
|
|
14197
|
+
var lineLength=rightExtendLine.Width;
|
|
14198
|
+
if (rightExtendLine.Color) this.Canvas.strokeStyle=rightExtendLine.Color;
|
|
14199
|
+
else this.Canvas.strokeStyle=item.LineColor;
|
|
14200
|
+
this.Canvas.beginPath();
|
|
14201
|
+
this.Canvas.moveTo(xText,yFixed);
|
|
14202
|
+
this.Canvas.lineTo(xText+lineLength,yFixed);
|
|
14203
|
+
this.Canvas.stroke();
|
|
14204
|
+
|
|
14205
|
+
xText+=lineLength+2;
|
|
14206
|
+
}
|
|
14207
|
+
|
|
14208
|
+
|
|
14136
14209
|
this.Canvas.textAlign="left";
|
|
14137
14210
|
if (Array.isArray(item.Message[1]))
|
|
14138
14211
|
{
|
|
@@ -14175,7 +14248,17 @@ function AverageWidthFrame()
|
|
|
14175
14248
|
if (!rtPreRight || (rtRight && !this.IsTextTopBottomOverlap(rtRight,rtPreRight)))
|
|
14176
14249
|
{
|
|
14177
14250
|
if (item.TextColor2) this.Canvas.fillStyle=item.TextColor2;
|
|
14178
|
-
|
|
14251
|
+
if (rightExtendText && rightExtendText.Align && this.YRightTextInfo)
|
|
14252
|
+
{
|
|
14253
|
+
this.Canvas.textAlign="right";
|
|
14254
|
+
var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];
|
|
14255
|
+
this.Canvas.fillText(item.Message[1],xRight,yText);
|
|
14256
|
+
}
|
|
14257
|
+
else
|
|
14258
|
+
{
|
|
14259
|
+
this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText);
|
|
14260
|
+
}
|
|
14261
|
+
|
|
14179
14262
|
rtPreRight=rtRight;
|
|
14180
14263
|
}
|
|
14181
14264
|
}
|
|
@@ -14184,7 +14267,33 @@ function AverageWidthFrame()
|
|
|
14184
14267
|
yPrev=y;
|
|
14185
14268
|
}
|
|
14186
14269
|
|
|
14187
|
-
if (IFrameSplitOperator.IsNonEmptyArray(aryMultiText) && this.MultiTextFormat==1) this.DrawHorizontalMuText(aryMultiText)
|
|
14270
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryMultiText) && this.MultiTextFormat==1) this.DrawHorizontalMuText(aryMultiText);
|
|
14271
|
+
|
|
14272
|
+
if (isDrawRight && this.IsDrawRightBorder && this.YRightTextInfo)
|
|
14273
|
+
{
|
|
14274
|
+
var xRight=this.YRightTextInfo.MainTextWidth+right;
|
|
14275
|
+
xLine=ToFixedPoint(xRight);
|
|
14276
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
14277
|
+
this.Canvas.beginPath();
|
|
14278
|
+
this.Canvas.moveTo(xLine,top);
|
|
14279
|
+
this.Canvas.lineTo(xLine,bottom);
|
|
14280
|
+
this.Canvas.stroke();
|
|
14281
|
+
|
|
14282
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YRightTextInfo.AryOverlayWidth))
|
|
14283
|
+
{
|
|
14284
|
+
this.Canvas.beginPath();
|
|
14285
|
+
for(var i=0;i<this.YRightTextInfo.AryOverlayWidth.length;++i)
|
|
14286
|
+
{
|
|
14287
|
+
var width=this.YRightTextInfo.AryOverlayWidth[i];
|
|
14288
|
+
xRight+=width;
|
|
14289
|
+
xLine=ToFixedPoint(xRight);
|
|
14290
|
+
this.Canvas.moveTo(xLine,top);
|
|
14291
|
+
this.Canvas.lineTo(xLine,bottom);
|
|
14292
|
+
}
|
|
14293
|
+
this.Canvas.stroke();
|
|
14294
|
+
|
|
14295
|
+
}
|
|
14296
|
+
}
|
|
14188
14297
|
}
|
|
14189
14298
|
|
|
14190
14299
|
//上下区域是否重叠
|
|
@@ -14848,7 +14957,9 @@ function AverageWidthFrame()
|
|
|
14848
14957
|
{
|
|
14849
14958
|
var value=this.Canvas.measureText(text[i].Text).width;
|
|
14850
14959
|
if (value>width) width=value;
|
|
14851
|
-
|
|
14960
|
+
var outItem={ Text:text[i].Text, Width:value+2*pixelTatio };
|
|
14961
|
+
if (item.TextColor) outItem.TextColor=item.TextColor;
|
|
14962
|
+
aryText.push(outItem);
|
|
14852
14963
|
}
|
|
14853
14964
|
}
|
|
14854
14965
|
|
|
@@ -15073,7 +15184,8 @@ function AverageWidthFrame()
|
|
|
15073
15184
|
var textLeft=right-itemText.Width;
|
|
15074
15185
|
this.Canvas.fillStyle=bgColor;
|
|
15075
15186
|
this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight); //文本背景区域
|
|
15076
|
-
this.Canvas.fillStyle
|
|
15187
|
+
if (itemText.TextColor) this.Canvas.fillStyle=itemText.TextColor;
|
|
15188
|
+
else this.Canvas.fillStyle = item.TextColor;
|
|
15077
15189
|
this.Canvas.fillText(itemText.Text, textLeft + 1*pixelTatio, yText);
|
|
15078
15190
|
if (i==0) this.DrawLine(left,textLeft,yText,item.LineColor,item.LineType,item);
|
|
15079
15191
|
yText+=textHeight+1*pixelTatio;
|
|
@@ -15185,7 +15297,8 @@ function AverageWidthFrame()
|
|
|
15185
15297
|
{
|
|
15186
15298
|
this.Canvas.fillStyle=item.LineColor;
|
|
15187
15299
|
this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
|
|
15188
|
-
this.Canvas.fillStyle
|
|
15300
|
+
if (itemText.TextColor) this.Canvas.fillStyle=itemText.TextColor;
|
|
15301
|
+
else this.Canvas.fillStyle = item.TextColor;
|
|
15189
15302
|
this.Canvas.fillText(itemText.Text, textLeft + 1*pixelTatio, yText);
|
|
15190
15303
|
}
|
|
15191
15304
|
|
|
@@ -18779,8 +18892,13 @@ function OverlayKLineFrame()
|
|
|
18779
18892
|
this.Title=null;
|
|
18780
18893
|
this.TitleColor=g_JSChartResource.OverlayFrame.TitleColor;
|
|
18781
18894
|
this.TitleFont=g_JSChartResource.OverlayFrame.TitleFont;
|
|
18895
|
+
this.IsShowTitle=true;
|
|
18782
18896
|
|
|
18783
18897
|
this.IsYDrawMainFrame=false; //Y轴自定刻度绘制在主图框架上
|
|
18898
|
+
this.BlankWidth=0;
|
|
18899
|
+
this.Style=0; //0=Y轴在BlankWidth 1=Y轴在左边
|
|
18900
|
+
|
|
18901
|
+
this.YLineExtend=[ { Width:2 }, null]; //[0]=左 [1]=右 { Width:5, Color:颜色, }
|
|
18784
18902
|
|
|
18785
18903
|
this.Buttons=[];
|
|
18786
18904
|
|
|
@@ -18820,21 +18938,69 @@ function OverlayKLineFrame()
|
|
|
18820
18938
|
this.XSplit=false;
|
|
18821
18939
|
}
|
|
18822
18940
|
|
|
18941
|
+
|
|
18942
|
+
//Y轴刻度线 x坐标
|
|
18943
|
+
this.GetXHorizontal=function()
|
|
18944
|
+
{
|
|
18945
|
+
var border=this.ChartBorder.GetBorder();
|
|
18946
|
+
var x=border.Right;
|
|
18947
|
+
x+=this.RightOffset;
|
|
18948
|
+
|
|
18949
|
+
if (this.Style==1)
|
|
18950
|
+
{
|
|
18951
|
+
|
|
18952
|
+
}
|
|
18953
|
+
else
|
|
18954
|
+
{
|
|
18955
|
+
x+=this.BlankWidth;
|
|
18956
|
+
}
|
|
18957
|
+
|
|
18958
|
+
return x;
|
|
18959
|
+
}
|
|
18960
|
+
|
|
18961
|
+
this.GetHorizontalWidth=function()
|
|
18962
|
+
{
|
|
18963
|
+
var width=null;
|
|
18964
|
+
if (this.YRightTextInfo && IFrameSplitOperator.IsNumber(this.TextWidthIndex))
|
|
18965
|
+
width=this.YRightTextInfo.AryOverlayWidth[this.TextWidthIndex];
|
|
18966
|
+
|
|
18967
|
+
return width;
|
|
18968
|
+
}
|
|
18969
|
+
|
|
18823
18970
|
this.DrawTitle=function() //画标题
|
|
18824
18971
|
{
|
|
18972
|
+
if (!this.IsShowTitle) return;
|
|
18825
18973
|
if (!this.Title) return;
|
|
18826
18974
|
var border=this.ChartBorder.GetBorder();
|
|
18827
18975
|
var top = this.ChartBorder.GetTopTitle();
|
|
18828
18976
|
var bottom = border.Bottom;
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
18977
|
+
|
|
18978
|
+
var xText=this.GetXHorizontal();
|
|
18979
|
+
var leftLine=null, rightLine=null;
|
|
18980
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
18981
|
+
{
|
|
18982
|
+
rightLine=this.YLineExtend[1];
|
|
18983
|
+
leftLine=this.YLineExtend[0];
|
|
18984
|
+
}
|
|
18985
|
+
|
|
18986
|
+
if (this.Style==1)
|
|
18987
|
+
{
|
|
18988
|
+
this.Canvas.textBaseline="bottom";
|
|
18989
|
+
if (rightLine && rightLine.Width>0) xText+=rightLine.Width+1;
|
|
18990
|
+
else xText+=1;
|
|
18991
|
+
}
|
|
18992
|
+
else
|
|
18993
|
+
{
|
|
18994
|
+
this.Canvas.textBaseline="top";
|
|
18995
|
+
if (leftLine && leftLine.Width>0) xText-=leftLine.Width;
|
|
18996
|
+
else xText-=2;
|
|
18997
|
+
}
|
|
18998
|
+
|
|
18999
|
+
var yText=top+(bottom-top)/2;
|
|
18832
19000
|
this.Canvas.fillStyle=this.TitleColor;
|
|
18833
19001
|
this.Canvas.font=this.TitleFont;
|
|
18834
19002
|
this.Canvas.textAlign="center";
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
var xText=right-2,yText=top+(bottom-top)/2;
|
|
19003
|
+
|
|
18838
19004
|
this.Canvas.save();
|
|
18839
19005
|
this.Canvas.translate(xText, yText);
|
|
18840
19006
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
@@ -18873,10 +19039,18 @@ function OverlayKLineFrame()
|
|
|
18873
19039
|
if (item.Font!=null) this.Canvas.font=item.Font;
|
|
18874
19040
|
|
|
18875
19041
|
textWidth=this.Canvas.measureText(item.Message[1]).width;
|
|
19042
|
+
if (this.YTextPadding && IFrameSplitOperator.IsNumber(this.YTextPadding[1]))
|
|
19043
|
+
textWidth+=this.YTextPadding[1];
|
|
18876
19044
|
if (width.Right<textWidth) width.Right=textWidth;
|
|
18877
19045
|
}
|
|
18878
19046
|
}
|
|
18879
19047
|
|
|
19048
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
19049
|
+
{
|
|
19050
|
+
var line=this.YLineExtend[1];
|
|
19051
|
+
if (line && line.Width>0) width.Right+=line.Width;
|
|
19052
|
+
}
|
|
19053
|
+
|
|
18880
19054
|
return { TextWidth:width };
|
|
18881
19055
|
}
|
|
18882
19056
|
|
|
@@ -18916,7 +19090,23 @@ function OverlayKLineFrame()
|
|
|
18916
19090
|
var top = this.ChartBorder.GetTopTitle();
|
|
18917
19091
|
var borderRight=this.ChartBorder.Right;
|
|
18918
19092
|
right+=this.RightOffset;
|
|
19093
|
+
var xLine=this.GetXHorizontal();
|
|
19094
|
+
if (IFrameSplitOperator.IsNumber(this.BlankWidth)) right+=this.BlankWidth;
|
|
18919
19095
|
|
|
19096
|
+
var rightExtendText=null; //右侧文字设置
|
|
19097
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YTextExtend))
|
|
19098
|
+
{
|
|
19099
|
+
rightExtendText=this.YTextExtend[1];
|
|
19100
|
+
}
|
|
19101
|
+
|
|
19102
|
+
var leftLine=null, rightLine=null;
|
|
19103
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
19104
|
+
{
|
|
19105
|
+
rightLine=this.YLineExtend[1];
|
|
19106
|
+
leftLine=this.YLineExtend[0];
|
|
19107
|
+
}
|
|
19108
|
+
|
|
19109
|
+
var rightWidth=this.GetHorizontalWidth(); //右侧宽度
|
|
18920
19110
|
var yPrev=null; //上一个坐标y的值
|
|
18921
19111
|
for(var i=this.HorizontalInfo.length-1; i>=0; --i) //从上往下画分割线
|
|
18922
19112
|
{
|
|
@@ -18928,11 +19118,24 @@ function OverlayKLineFrame()
|
|
|
18928
19118
|
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
|
|
18929
19119
|
else this.Canvas.textBaseline = "middle";
|
|
18930
19120
|
|
|
18931
|
-
|
|
18932
|
-
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
19121
|
+
|
|
19122
|
+
if (leftLine && leftLine.Width>0) //左边
|
|
19123
|
+
{
|
|
19124
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
19125
|
+
this.Canvas.beginPath();
|
|
19126
|
+
this.Canvas.moveTo(xLine-leftLine.Width,ToFixedPoint(y));
|
|
19127
|
+
this.Canvas.lineTo(xLine,ToFixedPoint(y));
|
|
19128
|
+
this.Canvas.stroke();
|
|
19129
|
+
}
|
|
19130
|
+
|
|
19131
|
+
if (rightLine && rightLine.Width>0)
|
|
19132
|
+
{
|
|
19133
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
19134
|
+
this.Canvas.beginPath();
|
|
19135
|
+
this.Canvas.moveTo(xLine+rightLine.Width,ToFixedPoint(y));
|
|
19136
|
+
this.Canvas.lineTo(xLine,ToFixedPoint(y));
|
|
19137
|
+
this.Canvas.stroke();
|
|
19138
|
+
}
|
|
18936
19139
|
|
|
18937
19140
|
//坐标信息 右边 间距小于10 不画坐标
|
|
18938
19141
|
if (item.Message[1]!=null && borderRight>10)
|
|
@@ -18941,10 +19144,22 @@ function OverlayKLineFrame()
|
|
|
18941
19144
|
|
|
18942
19145
|
var text=item.Message[1];
|
|
18943
19146
|
if (Array.isArray(item.Message[1])) text=item.Message[1][0];
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
|
|
18947
|
-
|
|
19147
|
+
|
|
19148
|
+
if (rightExtendText && rightExtendText.Align)
|
|
19149
|
+
{
|
|
19150
|
+
var textWidth=rightWidth;
|
|
19151
|
+
this.Canvas.textAlign="right";
|
|
19152
|
+
var xRight=border.Right+this.RightOffset+textWidth-this.YTextPadding[1];
|
|
19153
|
+
this.Canvas.fillText(text,xRight,y);
|
|
19154
|
+
}
|
|
19155
|
+
else
|
|
19156
|
+
{
|
|
19157
|
+
var xText=right+2;
|
|
19158
|
+
if (rightLine && rightLine.Width>0) xText+=rightLine.Width;
|
|
19159
|
+
this.Canvas.fillStyle=item.TextColor;
|
|
19160
|
+
this.Canvas.textAlign="left";
|
|
19161
|
+
this.Canvas.fillText(text,xText,y);
|
|
19162
|
+
}
|
|
18948
19163
|
}
|
|
18949
19164
|
|
|
18950
19165
|
yPrev=y;
|
|
@@ -18956,10 +19171,8 @@ function OverlayKLineFrame()
|
|
|
18956
19171
|
{
|
|
18957
19172
|
var border=this.ChartBorder.GetBorder();
|
|
18958
19173
|
var top=border.TopEx;
|
|
18959
|
-
//var left=this.ChartBorder.GetLeft();
|
|
18960
|
-
var right=border.Right;
|
|
18961
19174
|
var bottom=border.BottomEx;
|
|
18962
|
-
right
|
|
19175
|
+
var right=this.GetXHorizontal();
|
|
18963
19176
|
|
|
18964
19177
|
this.Canvas.strokeStyle=this.PenBorder;
|
|
18965
19178
|
this.Canvas.beginPath();
|
|
@@ -19005,14 +19218,15 @@ function OverlayKLineFrame()
|
|
|
19005
19218
|
|
|
19006
19219
|
var border=this.ChartBorder.GetBorder();
|
|
19007
19220
|
var yButton=border.Top+this.ChartBorder.TitleHeight/2;
|
|
19008
|
-
var
|
|
19221
|
+
var rightWidth=this.GetHorizontalWidth();
|
|
19222
|
+
var xBotton=border.Right+this.RightOffset+rightWidth-this.CloseButton.MerginLeft;
|
|
19009
19223
|
|
|
19010
|
-
for(var i=
|
|
19224
|
+
for(var i=aryButton.length-1;i>=0;--i)
|
|
19011
19225
|
{
|
|
19012
19226
|
var item=aryButton[i];
|
|
19013
19227
|
var size=item.Style.Size;
|
|
19014
19228
|
var font=`${size}px ${item.Style.Family}`;
|
|
19015
|
-
var rtButton={ Left:xBotton, Top:yButton-size/2, Right:xBotton
|
|
19229
|
+
var rtButton={ Left:xBotton-size-item.Style.MerginLeft, Top:yButton-size/2, Right:xBotton, Bottom:yButton+size/2, Width:size+item.Style.MerginLeft, Height:size };
|
|
19016
19230
|
var color=this.CloseButton.Color;
|
|
19017
19231
|
if (moveonPoint && (moveonPoint.X>=rtButton.Left && moveonPoint.X<rtButton.Right && moveonPoint.Y>=rtButton.Top && moveonPoint.Y<=rtButton.Bottom))
|
|
19018
19232
|
{
|
|
@@ -19023,13 +19237,13 @@ function OverlayKLineFrame()
|
|
|
19023
19237
|
|
|
19024
19238
|
this.Canvas.fillStyle=color;
|
|
19025
19239
|
this.Canvas.font=font;
|
|
19026
|
-
this.Canvas.textAlign="
|
|
19240
|
+
this.Canvas.textAlign="right";
|
|
19027
19241
|
this.Canvas.textBaseline="middle";
|
|
19028
19242
|
this.Canvas.fillText(item.Style.Text, xBotton, yButton);
|
|
19029
19243
|
|
|
19030
19244
|
this.Buttons.push({ ID:item.ID, Rect:rtButton });
|
|
19031
19245
|
|
|
19032
|
-
xBotton=rtButton.
|
|
19246
|
+
xBotton=rtButton.Left;
|
|
19033
19247
|
}
|
|
19034
19248
|
}
|
|
19035
19249
|
|
|
@@ -20106,7 +20320,7 @@ function SubFrameItem()
|
|
|
20106
20320
|
this.Frame;
|
|
20107
20321
|
this.Height;
|
|
20108
20322
|
this.OverlayIndex=[]; //叠加指标
|
|
20109
|
-
this.Interval=60; //子坐标间间距
|
|
20323
|
+
//this.Interval=60; //子坐标间间距
|
|
20110
20324
|
}
|
|
20111
20325
|
|
|
20112
20326
|
function OverlayIndexItem()
|
|
@@ -20174,8 +20388,11 @@ function HQTradeFrame()
|
|
|
20174
20388
|
|
|
20175
20389
|
this.AutoLeftBorder=null; //{ Blank:10 留白宽度, MinWidth:最小宽度 }
|
|
20176
20390
|
this.AutoRightBorder=null; //{ Blank:10 留白宽度, MinWidth:最小宽度 }
|
|
20177
|
-
this.OverlayBlankWidth=
|
|
20178
|
-
this.AuotRightWidth; //右边主坐标刻度宽度
|
|
20391
|
+
this.OverlayBlankWidth=30;
|
|
20392
|
+
this.AuotRightWidth; //右边主坐标刻度宽度 (自动模式)
|
|
20393
|
+
|
|
20394
|
+
//固定模式右侧宽度
|
|
20395
|
+
this.FixedRightWidth={ Main:60, Overlay:80 };
|
|
20179
20396
|
|
|
20180
20397
|
this.ZoomWindowsInfo=null; //附图指标缩放,备份信息
|
|
20181
20398
|
this.ZoomStartWindowIndex=1; //允许缩放窗口起始位置
|
|
@@ -20684,7 +20901,7 @@ function HQTradeFrame()
|
|
|
20684
20901
|
|
|
20685
20902
|
overlayItem.Frame.YSplitOperator.Operator();
|
|
20686
20903
|
var value=overlayItem.Frame.GetScaleTextWidth();
|
|
20687
|
-
|
|
20904
|
+
|
|
20688
20905
|
overlayItem.Frame.HorizontalMax=maxValue;
|
|
20689
20906
|
overlayItem.Frame.HorizontalMin=minValue;
|
|
20690
20907
|
|
|
@@ -20741,6 +20958,8 @@ function HQTradeFrame()
|
|
|
20741
20958
|
width.OverlayRight+=value;
|
|
20742
20959
|
}
|
|
20743
20960
|
|
|
20961
|
+
width.AryOverlayWidth=overlayWidth;
|
|
20962
|
+
|
|
20744
20963
|
return width;
|
|
20745
20964
|
}
|
|
20746
20965
|
|
|
@@ -20795,59 +21014,104 @@ function HQTradeFrame()
|
|
|
20795
21014
|
}
|
|
20796
21015
|
}
|
|
20797
21016
|
|
|
20798
|
-
if (IFrameSplitOperator.IsNumber(textWidth.Right)
|
|
21017
|
+
if (IFrameSplitOperator.IsNumber(textWidth.Right))
|
|
20799
21018
|
{
|
|
20800
|
-
|
|
20801
|
-
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.Blank)) blank=this.AutoRightBorder.Blank;
|
|
20802
|
-
var value=textWidth.Right+blank;
|
|
20803
|
-
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.MinWidth))
|
|
21019
|
+
if (this.AutoRightBorder) //自动调整右侧间距
|
|
20804
21020
|
{
|
|
20805
|
-
|
|
20806
|
-
|
|
21021
|
+
var rightTextInfo={ };
|
|
21022
|
+
var blank=0;
|
|
21023
|
+
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.Blank)) blank=this.AutoRightBorder.Blank;
|
|
21024
|
+
var value=textWidth.Right+blank;
|
|
21025
|
+
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.MinWidth))
|
|
21026
|
+
{
|
|
21027
|
+
if (this.AutoRightBorder.MinWidth>value) value=this.AutoRightBorder.MinWidth;
|
|
21028
|
+
}
|
|
20807
21029
|
|
|
20808
|
-
this.AuotRightWidth=value;
|
|
20809
|
-
if (IFrameSplitOperator.IsPlusNumber(textWidth.OverlayRight))
|
|
20810
|
-
{
|
|
20811
|
-
value+=this.OverlayBlankWidth;
|
|
20812
21030
|
this.AuotRightWidth=value;
|
|
20813
|
-
value
|
|
20814
|
-
|
|
21031
|
+
rightTextInfo.MainTextWidth=value; //主图坐标宽度
|
|
21032
|
+
if (IFrameSplitOperator.IsNonEmptyArray(textWidth.AryOverlayWidth)) rightTextInfo.AryOverlayWidth=textWidth.AryOverlayWidth;
|
|
20815
21033
|
|
|
20816
|
-
|
|
20817
|
-
|
|
20818
|
-
|
|
21034
|
+
if (IFrameSplitOperator.IsPlusNumber(textWidth.OverlayRight))
|
|
21035
|
+
{
|
|
21036
|
+
this.AuotRightWidth=value;
|
|
21037
|
+
value+=textWidth.OverlayRight;
|
|
21038
|
+
}
|
|
20819
21039
|
|
|
20820
|
-
if (this.
|
|
21040
|
+
if (this.GetExtendChartRightWidth)
|
|
20821
21041
|
{
|
|
20822
|
-
var
|
|
20823
|
-
|
|
21042
|
+
var extendWidth=this.GetExtendChartRightWidth();
|
|
21043
|
+
|
|
21044
|
+
if (this.GetExtendChartByClassName)
|
|
20824
21045
|
{
|
|
20825
|
-
finder.
|
|
21046
|
+
var finder=this.GetExtendChartByClassName("StockChip");
|
|
21047
|
+
if (finder && finder.Chart)
|
|
21048
|
+
{
|
|
21049
|
+
finder.Chart.Left=value;
|
|
21050
|
+
}
|
|
20826
21051
|
}
|
|
21052
|
+
|
|
21053
|
+
value+=extendWidth;
|
|
20827
21054
|
}
|
|
20828
21055
|
|
|
20829
|
-
|
|
20830
|
-
|
|
21056
|
+
if (this.IsHScreen)
|
|
21057
|
+
{
|
|
21058
|
+
if (this.ChartBorder.Bottom!=value) bSizeChange=true;
|
|
21059
|
+
this.ChartBorder.Bottom=value;
|
|
21060
|
+
}
|
|
21061
|
+
else
|
|
21062
|
+
{
|
|
21063
|
+
if (this.ChartBorder.Right!=value) bSizeChange=true;
|
|
21064
|
+
this.ChartBorder.Right=value;
|
|
21065
|
+
}
|
|
20831
21066
|
|
|
20832
|
-
|
|
20833
|
-
|
|
20834
|
-
|
|
20835
|
-
|
|
21067
|
+
for(var i=0; i<this.SubFrame.length; ++i)
|
|
21068
|
+
{
|
|
21069
|
+
var item=this.SubFrame[i];
|
|
21070
|
+
if (this.IsHScreen) item.Frame.ChartBorder.Bottom=value;
|
|
21071
|
+
else item.Frame.ChartBorder.Right=value;
|
|
21072
|
+
|
|
21073
|
+
item.Frame.ReDrawToolbar=true;
|
|
21074
|
+
item.Frame.YRightTextInfo=rightTextInfo;
|
|
21075
|
+
|
|
21076
|
+
for(var j=0;j<item.OverlayIndex.length;++j)
|
|
21077
|
+
{
|
|
21078
|
+
var overlayItem=item.OverlayIndex[j];
|
|
21079
|
+
overlayItem.Frame.YRightTextInfo=rightTextInfo;
|
|
21080
|
+
}
|
|
21081
|
+
}
|
|
20836
21082
|
}
|
|
20837
|
-
else
|
|
21083
|
+
else
|
|
20838
21084
|
{
|
|
20839
|
-
|
|
20840
|
-
this.
|
|
20841
|
-
|
|
21085
|
+
var rightTextInfo={ };
|
|
21086
|
+
rightTextInfo.MainTextWidth=this.FixedRightWidth.Main;
|
|
21087
|
+
if (textWidth.OverlayRight==0) //无叠加直接最右边
|
|
21088
|
+
{
|
|
21089
|
+
if (this.IsHScreen)
|
|
21090
|
+
rightTextInfo.MainTextWidth=this.ChartBorder.Bottom;
|
|
21091
|
+
else
|
|
21092
|
+
rightTextInfo.MainTextWidth=this.ChartBorder.Right;
|
|
21093
|
+
}
|
|
21094
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(textWidth.AryOverlayWidth))
|
|
21095
|
+
{
|
|
21096
|
+
for(var i=0;i<textWidth.AryOverlayWidth.length;++i)
|
|
21097
|
+
textWidth.AryOverlayWidth[i]=this.FixedRightWidth.Overlay;
|
|
20842
21098
|
|
|
20843
|
-
|
|
20844
|
-
|
|
20845
|
-
var item=this.SubFrame[i];
|
|
20846
|
-
if (this.IsHScreen) item.Frame.ChartBorder.Bottom=value;
|
|
20847
|
-
else item.Frame.ChartBorder.Right=value;
|
|
21099
|
+
rightTextInfo.AryOverlayWidth=textWidth.AryOverlayWidth;
|
|
21100
|
+
}
|
|
20848
21101
|
|
|
20849
|
-
|
|
20850
|
-
|
|
21102
|
+
for(var i=0; i<this.SubFrame.length; ++i)
|
|
21103
|
+
{
|
|
21104
|
+
var item=this.SubFrame[i];
|
|
21105
|
+
|
|
21106
|
+
item.Frame.ReDrawToolbar=true;
|
|
21107
|
+
item.Frame.YRightTextInfo=rightTextInfo;
|
|
21108
|
+
|
|
21109
|
+
for(var j=0;j<item.OverlayIndex.length;++j)
|
|
21110
|
+
{
|
|
21111
|
+
var overlayItem=item.OverlayIndex[j];
|
|
21112
|
+
overlayItem.Frame.YRightTextInfo=rightTextInfo;
|
|
21113
|
+
}
|
|
21114
|
+
}
|
|
20851
21115
|
}
|
|
20852
21116
|
}
|
|
20853
21117
|
|
|
@@ -20865,39 +21129,47 @@ function HQTradeFrame()
|
|
|
20865
21129
|
{
|
|
20866
21130
|
var rightOffset=this.AuotRightWidth;
|
|
20867
21131
|
|
|
20868
|
-
for(var j=0; j<item.OverlayIndex.length; ++j)
|
|
21132
|
+
for(var j=0, index=0; j<item.OverlayIndex.length; ++j)
|
|
20869
21133
|
{
|
|
20870
21134
|
var overlayItem=item.OverlayIndex[j];
|
|
20871
21135
|
//把主坐标部分设置给子坐标下来
|
|
20872
21136
|
overlayItem.Frame.DataWidth=item.Frame.DataWidth;
|
|
20873
21137
|
overlayItem.Frame.DistanceWidth=item.Frame.DistanceWidth;
|
|
20874
21138
|
overlayItem.Frame.XPointCount=item.Frame.XPointCount;
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
20880
|
-
|
|
21139
|
+
overlayItem.Frame.RightOffset=rightOffset;
|
|
21140
|
+
overlayItem.Frame.BlankWidth=0;
|
|
21141
|
+
overlayItem.Frame.TextWidthIndex=index;
|
|
21142
|
+
if (IFrameSplitOperator.IsNumber(this.OverlayBlankWidth)) overlayItem.Frame.BlankWidth=this.OverlayBlankWidth;
|
|
21143
|
+
|
|
21144
|
+
overlayItem.Frame.Draw();
|
|
21145
|
+
rightOffset+=overlayItem.RightWidth.Width;
|
|
21146
|
+
if (overlayItem.Frame.IsShow) ++index;
|
|
20881
21147
|
}
|
|
20882
|
-
|
|
20883
21148
|
}
|
|
20884
21149
|
else
|
|
20885
21150
|
{
|
|
20886
|
-
var rightOffset=
|
|
21151
|
+
var rightOffset=this.FixedRightWidth.Main;
|
|
20887
21152
|
if (item.Frame.RightTextMaxWidth>rightOffset) rightOffset=item.Frame.RightTextMaxWidth;
|
|
20888
|
-
|
|
21153
|
+
|
|
21154
|
+
for(var j =0, index=0; j<item.OverlayIndex.length;++j)
|
|
20889
21155
|
{
|
|
20890
21156
|
var overlayItem=item.OverlayIndex[j];
|
|
20891
21157
|
//把主坐标部分设置给子坐标下来
|
|
20892
21158
|
overlayItem.Frame.DataWidth=item.Frame.DataWidth;
|
|
20893
21159
|
overlayItem.Frame.DistanceWidth=item.Frame.DistanceWidth;
|
|
20894
21160
|
overlayItem.Frame.XPointCount=item.Frame.XPointCount;
|
|
20895
|
-
|
|
21161
|
+
overlayItem.Frame.RightOffset=rightOffset;
|
|
21162
|
+
overlayItem.Frame.BlankWidth=0;
|
|
21163
|
+
overlayItem.Frame.TextWidthIndex=index;
|
|
21164
|
+
if (IFrameSplitOperator.IsNumber(this.OverlayBlankWidth)) overlayItem.Frame.BlankWidth=this.OverlayBlankWidth;
|
|
21165
|
+
|
|
21166
|
+
overlayItem.Frame.Draw();
|
|
21167
|
+
if (overlayItem.Frame.IsShow)
|
|
20896
21168
|
{
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
if (overlayItem.Frame.IsShow) rightOffset+=item.Interval;
|
|
21169
|
+
rightOffset+=this.FixedRightWidth.Overlay;
|
|
21170
|
+
++index;
|
|
20900
21171
|
}
|
|
21172
|
+
|
|
20901
21173
|
}
|
|
20902
21174
|
}
|
|
20903
21175
|
}
|
|
@@ -21104,6 +21376,7 @@ function HQTradeFrame()
|
|
|
21104
21376
|
{
|
|
21105
21377
|
var overlayItem=item.OverlayIndex[j];
|
|
21106
21378
|
var overlayFrame=overlayItem.Frame;
|
|
21379
|
+
if (!overlayFrame.IsShow) continue;
|
|
21107
21380
|
if (overlayFrame.DrawToolbar) overlayFrame.DrawToolbar(moveonPoint, frame.IsMinSize, mouseStatus);
|
|
21108
21381
|
}
|
|
21109
21382
|
}
|
|
@@ -50589,36 +50862,35 @@ function ChartCorssCursor()
|
|
|
50589
50862
|
if (yValueExtend.FrameID>=0)
|
|
50590
50863
|
{
|
|
50591
50864
|
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
|
|
50592
|
-
var isAutoRightBorder=false;
|
|
50593
|
-
if (this.Frame.AutoRightBorder) isAutoRightBorder=true;
|
|
50594
50865
|
var overlayLeft=right;
|
|
50595
|
-
if (isAutoRightBorder) overlayLeft=right+this.Frame.AuotRightWidth;
|
|
50596
50866
|
this.Canvas.font=this.Font;
|
|
50597
|
-
for(var i
|
|
50867
|
+
for(var i=0; i<frame.OverlayIndex.length; ++i)
|
|
50598
50868
|
{
|
|
50599
50869
|
var item=frame.OverlayIndex[i];
|
|
50600
50870
|
if (item.Frame.IsShow===false) continue;
|
|
50601
50871
|
|
|
50602
|
-
|
|
50872
|
+
overlayLeft=item.Frame.GetXHorizontal();
|
|
50603
50873
|
|
|
50604
|
-
if (overlayLeft+30>chartRight) break;
|
|
50874
|
+
//if (overlayLeft+30>chartRight) break;
|
|
50605
50875
|
var yValue=item.Frame.GetYData(y);
|
|
50606
|
-
|
|
50607
|
-
|
|
50876
|
+
var text=IFrameSplitOperator.FormatValueString(yValue,2);
|
|
50877
|
+
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
|
|
50878
|
+
|
|
50879
|
+
/*
|
|
50880
|
+
for(var j=2;j>=0;--j)
|
|
50608
50881
|
{
|
|
50609
|
-
var text=IFrameSplitOperator.FormatValueString(yValue,
|
|
50882
|
+
var text=IFrameSplitOperator.FormatValueString(yValue,j);
|
|
50610
50883
|
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
|
|
50611
50884
|
if (textWidth<frame.Interval) break;
|
|
50612
50885
|
}
|
|
50886
|
+
*/
|
|
50613
50887
|
|
|
50614
50888
|
this.Canvas.fillStyle=this.TextBGColor;
|
|
50615
|
-
this.Canvas.fillRect(overlayLeft+
|
|
50889
|
+
this.Canvas.fillRect(overlayLeft+1,y-this.TextHeight/2,textWidth,this.TextHeight);
|
|
50616
50890
|
this.Canvas.textAlign="left";
|
|
50617
50891
|
this.Canvas.textBaseline="middle";
|
|
50618
50892
|
this.Canvas.fillStyle=this.TextColor;
|
|
50619
50893
|
this.Canvas.fillText(text,overlayLeft+4,y,textWidth);
|
|
50620
|
-
|
|
50621
|
-
if (isAutoRightBorder) overlayLeft+=item.RightWidth.Width;
|
|
50622
50894
|
}
|
|
50623
50895
|
}
|
|
50624
50896
|
|
|
@@ -66675,6 +66947,14 @@ function JSChartResource()
|
|
|
66675
66947
|
if (item.EmptyBGColor) this.FrameLatestPrice.EmptyBGColor = item.EmptyBGColor;
|
|
66676
66948
|
}
|
|
66677
66949
|
|
|
66950
|
+
if (style.OverlayFrame)
|
|
66951
|
+
{
|
|
66952
|
+
var item=style.OverlayFrame;
|
|
66953
|
+
if (style.OverlayFrame.BolderPen) this.OverlayFrame.BolderPen = style.OverlayFrame.BolderPen;
|
|
66954
|
+
if (style.OverlayFrame.TitleColor) this.OverlayFrame.TitleColor = style.OverlayFrame.TitleColor;
|
|
66955
|
+
if (style.OverlayFrame.TitleFont) this.OverlayFrame.TitleFont = style.OverlayFrame.TitleFont;
|
|
66956
|
+
}
|
|
66957
|
+
|
|
66678
66958
|
if (style.CorssCursorBGColor) this.CorssCursorBGColor = style.CorssCursorBGColor;
|
|
66679
66959
|
if (style.CorssCursorTextColor) this.CorssCursorTextColor = style.CorssCursorTextColor;
|
|
66680
66960
|
if (style.CorssCursorTextFont) this.CorssCursorTextFont = style.CorssCursorTextFont;
|
|
@@ -68962,7 +69242,6 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68962
69242
|
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
68963
69243
|
|
|
68964
69244
|
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期 PageSize:}
|
|
68965
|
-
this.OverlayIndexFrameWidth=60; //叠加指标框架宽度
|
|
68966
69245
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
68967
69246
|
this.IsZoomLockRight=false;
|
|
68968
69247
|
this.KLineSize=null; //{ DataWidth:, }
|
|
@@ -72573,10 +72852,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72573
72852
|
}
|
|
72574
72853
|
|
|
72575
72854
|
var subFrame=this.Frame.SubFrame[windowIndex];
|
|
72576
|
-
subFrame.Interval=this.OverlayIndexFrameWidth;
|
|
72577
72855
|
var overlayFrame=new OverlayIndexItem();
|
|
72578
72856
|
if (obj.Identify) overlayFrame.Identify=obj.Identify; //由外部指定id
|
|
72579
|
-
var frame= this.ClassName==='KLineChartHScreenContainer' ? new OverlayKLineHScreenFrame() : new OverlayKLineFrame();
|
|
72857
|
+
//var frame= this.ClassName==='KLineChartHScreenContainer' ? new OverlayKLineHScreenFrame() : new OverlayKLineFrame();
|
|
72858
|
+
var frame=this.CreateOverlayFrame();
|
|
72580
72859
|
frame.Canvas=this.Canvas;
|
|
72581
72860
|
frame.MainFrame=subFrame.Frame;
|
|
72582
72861
|
frame.ChartBorder=subFrame.Frame.ChartBorder;
|
|
@@ -72605,11 +72884,18 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72605
72884
|
var item=obj.Frame;
|
|
72606
72885
|
if (item.Custom) frame.YSplitOperator.Custom=item.Custom;
|
|
72607
72886
|
if (IFrameSplitOperator.IsBool(item.IsYDrawMainFrame)) frame.IsYDrawMainFrame=item.IsYDrawMainFrame; //自定义刻度绘制在主图上
|
|
72608
|
-
if (IFrameSplitOperator.IsBool(item.IsShowToolbar)) frame.IsShowToolbar=item.IsShowToolbar;
|
|
72887
|
+
if (IFrameSplitOperator.IsBool(item.IsShowToolbar)) frame.IsShowToolbar=item.IsShowToolbar; //是否显示工具栏
|
|
72609
72888
|
}
|
|
72610
72889
|
|
|
72611
72890
|
overlayFrame.Frame=frame;
|
|
72612
72891
|
|
|
72892
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
|
|
72893
|
+
if (event && event.Callback)
|
|
72894
|
+
{
|
|
72895
|
+
var sendData={ OverlayFrame:overlayFrame, WindowIndex:windowIndex, SubFrame:subFrame };
|
|
72896
|
+
event.Callback(event, sendData, this);
|
|
72897
|
+
}
|
|
72898
|
+
|
|
72613
72899
|
if (apiItem)
|
|
72614
72900
|
{
|
|
72615
72901
|
var apiIndex=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,obj, true);
|
|
@@ -80416,7 +80702,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80416
80702
|
}
|
|
80417
80703
|
|
|
80418
80704
|
var subFrame=this.Frame.SubFrame[windowIndex];
|
|
80419
|
-
subFrame.Interval=this.OverlayIndexFrameWidth;
|
|
80420
80705
|
var overlayFrame=new OverlayIndexItem();
|
|
80421
80706
|
if (obj.Identify) overlayFrame.Identify=obj.Identify; //由外部指定id
|
|
80422
80707
|
var frame=null;
|
|
@@ -115966,12 +116251,14 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
115966
116251
|
var titleIndex=windowIndex+1;
|
|
115967
116252
|
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
115968
116253
|
titlePaint.OverlayIndex.set(this.OverlayIndex.Identify,titleInfo);
|
|
115969
|
-
|
|
116254
|
+
|
|
115970
116255
|
if (this.OutName && this.OutName.length>0 && this.Arguments && this.Arguments.length>0)
|
|
115971
116256
|
{
|
|
115972
116257
|
titlePaint.SetDynamicTitle(this.OutName,this.Arguments, this.OverlayIndex.Identify);
|
|
115973
116258
|
}
|
|
115974
116259
|
|
|
116260
|
+
this.OverlayIndex.Frame.Frame.Title=this.Name; //给子框架设置标题
|
|
116261
|
+
|
|
115975
116262
|
for(var i=0; i<this.OutVar.length; ++i)
|
|
115976
116263
|
{
|
|
115977
116264
|
let item=this.OutVar[i];
|
|
@@ -119842,10 +120129,10 @@ function GetBlackStyle()
|
|
|
119842
120129
|
PositionColor:"rgb(101,104,112)" //持仓
|
|
119843
120130
|
},
|
|
119844
120131
|
|
|
119845
|
-
FrameBorderPen: "
|
|
120132
|
+
FrameBorderPen: "rgb(47,51,62)", //边框
|
|
119846
120133
|
MultiDayBorderPen:"rgba(236,236,236,0.5)",
|
|
119847
120134
|
FrameSplitPen: "rgba(236,236,236,0.13)", //分割线
|
|
119848
|
-
FrameSplitTextColor: "rgb(
|
|
120135
|
+
FrameSplitTextColor: "rgb(220,220,220)", //刻度文字颜色
|
|
119849
120136
|
FrameSplitTextFont: 12*GetDevicePixelRatio() +"px 微软雅黑", //坐标刻度文字字体
|
|
119850
120137
|
FrameTitleBGColor: "rgb(0,0,0)", //标题栏背景色
|
|
119851
120138
|
OverlayIndexTitleBGColor:'rgba(0,0,0,0.7)', //叠加指标背景色
|
|
@@ -119861,8 +120148,15 @@ function GetBlackStyle()
|
|
|
119861
120148
|
SplitColor:"rgb(101,104,112)",
|
|
119862
120149
|
Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
119863
120150
|
}
|
|
119864
|
-
},
|
|
119865
|
-
|
|
120151
|
+
},
|
|
120152
|
+
|
|
120153
|
+
//叠加指标框架
|
|
120154
|
+
OverlayFrame:
|
|
120155
|
+
{
|
|
120156
|
+
BolderPen:'rgb(130,130,130)', //指标边框线
|
|
120157
|
+
TitleColor:'rgb(181,181,181)', //指标名字颜色
|
|
120158
|
+
TitleFont:11*GetDevicePixelRatio() +'px arial', //指标名字字体
|
|
120159
|
+
},
|
|
119866
120160
|
|
|
119867
120161
|
FrameLatestPrice : {
|
|
119868
120162
|
TextColor:'rgb(255,255,255)', //最新价格文字颜色
|
|
@@ -130732,7 +131026,7 @@ function HQChartScriptWorker()
|
|
|
130732
131026
|
|
|
130733
131027
|
|
|
130734
131028
|
|
|
130735
|
-
var HQCHART_VERSION="1.1.
|
|
131029
|
+
var HQCHART_VERSION="1.1.12692";
|
|
130736
131030
|
|
|
130737
131031
|
function PrintHQChartVersion()
|
|
130738
131032
|
{
|