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
package/src/jscommon/umychart.js
CHANGED
|
@@ -633,7 +633,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
//叠加指标宽度
|
|
636
|
-
if (option.OverlayIndexFrameWidth>40) chart.
|
|
636
|
+
if (option.OverlayIndexFrameWidth>40) chart.Frame.FixedRightWidth.Overlay=option.OverlayIndexFrameWidth;
|
|
637
637
|
|
|
638
638
|
//叠加指标
|
|
639
639
|
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
@@ -2517,7 +2517,9 @@ var JSCHART_EVENT_ID=
|
|
|
2517
2517
|
ON_CUSTOM_DRAG_DOC_MOUSE_UP:115,
|
|
2518
2518
|
ON_CUSTOM_DRAG_MOUSE_MOVE:116,
|
|
2519
2519
|
|
|
2520
|
-
ON_KEYDOWN:117
|
|
2520
|
+
ON_KEYDOWN:117,
|
|
2521
|
+
|
|
2522
|
+
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
2521
2523
|
}
|
|
2522
2524
|
|
|
2523
2525
|
var JSCHART_OPERATOR_ID=
|
|
@@ -8358,7 +8360,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8358
8360
|
else
|
|
8359
8361
|
{
|
|
8360
8362
|
var subFrame=this.Frame.SubFrame[dest.WindowIndex];
|
|
8361
|
-
subFrame.Interval=this.OverlayIndexFrameWidth;
|
|
8362
8363
|
var overlayFrame=new OverlayIndexItem();
|
|
8363
8364
|
var frame=this.CreateOverlayFrame();
|
|
8364
8365
|
frame.Canvas=this.Canvas;
|
|
@@ -8375,6 +8376,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8375
8376
|
frame.YSplitOperator.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
|
|
8376
8377
|
|
|
8377
8378
|
overlayFrame.Frame=frame;
|
|
8379
|
+
|
|
8380
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
|
|
8381
|
+
if (event && event.Callback)
|
|
8382
|
+
{
|
|
8383
|
+
var sendData={ OverlayFrame:overlayFrame, WindowIndex:dest.WindowIndex, SubFrame:subFrame };
|
|
8384
|
+
event.Callback(event, sendData, this);
|
|
8385
|
+
}
|
|
8386
|
+
|
|
8387
|
+
|
|
8378
8388
|
var scriptIndex;
|
|
8379
8389
|
if (findItem)
|
|
8380
8390
|
{
|
|
@@ -8865,7 +8875,7 @@ function CoordinateInfo()
|
|
|
8865
8875
|
this.Font=g_JSChartResource.FrameSplitTextFont; //字体
|
|
8866
8876
|
this.LineColor=g_JSChartResource.FrameSplitPen; //线段颜色
|
|
8867
8877
|
this.LineDash=null; //当线段类型==2时 可以设置虚线样式
|
|
8868
|
-
this.LineType=1; //线段类型 -1
|
|
8878
|
+
this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
|
|
8869
8879
|
this.LineWidth; //线段宽度
|
|
8870
8880
|
this.ExtendData; //扩展属性
|
|
8871
8881
|
//百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
|
|
@@ -9225,6 +9235,9 @@ function IChartFramePainting()
|
|
|
9225
9235
|
this.LogoBGColor=g_JSChartResource.FrameLogo.BGColor;
|
|
9226
9236
|
this.GlobalOption;
|
|
9227
9237
|
|
|
9238
|
+
//this.IsDrawLeftBorder;
|
|
9239
|
+
this.IsDrawRightBorder=false; //是否绘制右侧刻度空白的边框
|
|
9240
|
+
|
|
9228
9241
|
this.PtInButtons=function(x,y) //坐标是否在按钮上
|
|
9229
9242
|
{
|
|
9230
9243
|
for(var i=0;i<this.Buttons.length;++i)
|
|
@@ -9304,8 +9317,22 @@ function IChartFramePainting()
|
|
|
9304
9317
|
//JSConsole.Chart.Log(`[IChartFramePainting.DrawBorder] left=${left} `);
|
|
9305
9318
|
if (this.BorderLine==null)
|
|
9306
9319
|
{
|
|
9307
|
-
this.
|
|
9308
|
-
|
|
9320
|
+
if (this.IsDrawRightBorder)
|
|
9321
|
+
{
|
|
9322
|
+
var xRight=ToFixedPoint(border.ChartWidth);
|
|
9323
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
9324
|
+
this.Canvas.strokeRect(left,top,xRight-left,height);
|
|
9325
|
+
|
|
9326
|
+
this.Canvas.beginPath();
|
|
9327
|
+
this.Canvas.moveTo(right,top);
|
|
9328
|
+
this.Canvas.lineTo(right,bottom);
|
|
9329
|
+
this.Canvas.stroke();
|
|
9330
|
+
}
|
|
9331
|
+
else
|
|
9332
|
+
{
|
|
9333
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
9334
|
+
this.Canvas.strokeRect(left,top,width,height);
|
|
9335
|
+
}
|
|
9309
9336
|
}
|
|
9310
9337
|
else if (IFrameSplitOperator.IsPlusNumber(this.BorderLine)) //单独绘制每个边框
|
|
9311
9338
|
{
|
|
@@ -9339,7 +9366,20 @@ function IChartFramePainting()
|
|
|
9339
9366
|
this.Canvas.stroke();
|
|
9340
9367
|
}
|
|
9341
9368
|
|
|
9342
|
-
|
|
9369
|
+
/*
|
|
9370
|
+
if (this.IsDrawRightBorder)
|
|
9371
|
+
{
|
|
9372
|
+
var xRight=ToFixedPoint(border.ChartWidth);
|
|
9373
|
+
var xLeft=right;
|
|
9374
|
+
this.Canvas.beginPath();
|
|
9375
|
+
this.Canvas.moveTo(xLeft,top);
|
|
9376
|
+
this.Canvas.lineTo(xRight,top);
|
|
9377
|
+
this.Canvas.lineTo(xRight,bottom);
|
|
9378
|
+
this.Canvas.lineTo(xLeft,bottom);
|
|
9379
|
+
|
|
9380
|
+
this.Canvas.stroke();
|
|
9381
|
+
}
|
|
9382
|
+
*/
|
|
9343
9383
|
}
|
|
9344
9384
|
|
|
9345
9385
|
//画标题背景色
|
|
@@ -9584,6 +9624,11 @@ function AverageWidthFrame()
|
|
|
9584
9624
|
|
|
9585
9625
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
9586
9626
|
|
|
9627
|
+
//Y轴刻度长线
|
|
9628
|
+
this.YLineExtend; //[0]=左 [1]=右 { Width:5, Color:颜色, }
|
|
9629
|
+
this.YTextExtend; //[0]=左 [1]=右 { Align:0=默认 1=左对齐 2=右对齐 }
|
|
9630
|
+
this.YRightTextInfo;
|
|
9631
|
+
|
|
9587
9632
|
//画图工具刻度
|
|
9588
9633
|
|
|
9589
9634
|
this.DrawPicture={
|
|
@@ -9822,6 +9867,18 @@ function AverageWidthFrame()
|
|
|
9822
9867
|
var isDrawLeft=borderLeft>10 && this.IsShowYText[0]===true && this.YTextPosition[0]!=2;
|
|
9823
9868
|
var isDrawRight=borderRight>10 && this.IsShowYText[1]===true && this.YTextPosition[1]!=2;
|
|
9824
9869
|
|
|
9870
|
+
var rightExtendLine=null; //右侧延长线
|
|
9871
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
9872
|
+
{
|
|
9873
|
+
rightExtendLine=this.YLineExtend[1];
|
|
9874
|
+
}
|
|
9875
|
+
|
|
9876
|
+
var rightExtendText=null; //右侧文字设置
|
|
9877
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YTextExtend))
|
|
9878
|
+
{
|
|
9879
|
+
rightExtendText=this.YTextExtend[1];
|
|
9880
|
+
}
|
|
9881
|
+
|
|
9825
9882
|
var yPrev=null; //上一个坐标y的值
|
|
9826
9883
|
var pixelRatio=GetDevicePixelRatio();
|
|
9827
9884
|
var itemHeight=(border.BottomEx-border.TopEx)/this.HorizontalInfo.length;
|
|
@@ -9835,6 +9892,7 @@ function AverageWidthFrame()
|
|
|
9835
9892
|
if (y!=null && yPrev!=null && Math.abs(y-yPrev)<this.MinYDistance) continue; //两个坐标在近了 就不画了
|
|
9836
9893
|
|
|
9837
9894
|
var yFixed=ToFixedPoint(y);
|
|
9895
|
+
//绘制刻度线
|
|
9838
9896
|
if (y!=bottom && this.IsShowYLine)
|
|
9839
9897
|
{
|
|
9840
9898
|
var bChangeLineWidth=false;
|
|
@@ -9911,7 +9969,7 @@ function AverageWidthFrame()
|
|
|
9911
9969
|
textBaseline=1;
|
|
9912
9970
|
}
|
|
9913
9971
|
|
|
9914
|
-
|
|
9972
|
+
//左边 坐标信息 间距小于10 不画坐标
|
|
9915
9973
|
this.Canvas.strokeStyle=item.TextColor;
|
|
9916
9974
|
this.Canvas.fillStyle=item.TextColor;
|
|
9917
9975
|
|
|
@@ -9928,7 +9986,7 @@ function AverageWidthFrame()
|
|
|
9928
9986
|
}
|
|
9929
9987
|
}
|
|
9930
9988
|
|
|
9931
|
-
|
|
9989
|
+
//右边 坐标信息 间距小于10 不画坐标
|
|
9932
9990
|
if (item.Message[1]!=null && isDrawRight)
|
|
9933
9991
|
{
|
|
9934
9992
|
if (item.Font!=null) this.Canvas.font=item.Font;
|
|
@@ -9945,6 +10003,21 @@ function AverageWidthFrame()
|
|
|
9945
10003
|
xText+=lineLength;
|
|
9946
10004
|
}
|
|
9947
10005
|
|
|
10006
|
+
//右侧延长线
|
|
10007
|
+
if (rightExtendLine && rightExtendLine.Width>1)
|
|
10008
|
+
{
|
|
10009
|
+
var lineLength=rightExtendLine.Width;
|
|
10010
|
+
if (rightExtendLine.Color) this.Canvas.strokeStyle=rightExtendLine.Color;
|
|
10011
|
+
else this.Canvas.strokeStyle=item.LineColor;
|
|
10012
|
+
this.Canvas.beginPath();
|
|
10013
|
+
this.Canvas.moveTo(xText,yFixed);
|
|
10014
|
+
this.Canvas.lineTo(xText+lineLength,yFixed);
|
|
10015
|
+
this.Canvas.stroke();
|
|
10016
|
+
|
|
10017
|
+
xText+=lineLength+2;
|
|
10018
|
+
}
|
|
10019
|
+
|
|
10020
|
+
|
|
9948
10021
|
this.Canvas.textAlign="left";
|
|
9949
10022
|
if (Array.isArray(item.Message[1]))
|
|
9950
10023
|
{
|
|
@@ -9987,7 +10060,17 @@ function AverageWidthFrame()
|
|
|
9987
10060
|
if (!rtPreRight || (rtRight && !this.IsTextTopBottomOverlap(rtRight,rtPreRight)))
|
|
9988
10061
|
{
|
|
9989
10062
|
if (item.TextColor2) this.Canvas.fillStyle=item.TextColor2;
|
|
9990
|
-
|
|
10063
|
+
if (rightExtendText && rightExtendText.Align && this.YRightTextInfo)
|
|
10064
|
+
{
|
|
10065
|
+
this.Canvas.textAlign="right";
|
|
10066
|
+
var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];
|
|
10067
|
+
this.Canvas.fillText(item.Message[1],xRight,yText);
|
|
10068
|
+
}
|
|
10069
|
+
else
|
|
10070
|
+
{
|
|
10071
|
+
this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText);
|
|
10072
|
+
}
|
|
10073
|
+
|
|
9991
10074
|
rtPreRight=rtRight;
|
|
9992
10075
|
}
|
|
9993
10076
|
}
|
|
@@ -9996,7 +10079,33 @@ function AverageWidthFrame()
|
|
|
9996
10079
|
yPrev=y;
|
|
9997
10080
|
}
|
|
9998
10081
|
|
|
9999
|
-
if (IFrameSplitOperator.IsNonEmptyArray(aryMultiText) && this.MultiTextFormat==1) this.DrawHorizontalMuText(aryMultiText)
|
|
10082
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryMultiText) && this.MultiTextFormat==1) this.DrawHorizontalMuText(aryMultiText);
|
|
10083
|
+
|
|
10084
|
+
if (isDrawRight && this.IsDrawRightBorder && this.YRightTextInfo)
|
|
10085
|
+
{
|
|
10086
|
+
var xRight=this.YRightTextInfo.MainTextWidth+right;
|
|
10087
|
+
xLine=ToFixedPoint(xRight);
|
|
10088
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
10089
|
+
this.Canvas.beginPath();
|
|
10090
|
+
this.Canvas.moveTo(xLine,top);
|
|
10091
|
+
this.Canvas.lineTo(xLine,bottom);
|
|
10092
|
+
this.Canvas.stroke();
|
|
10093
|
+
|
|
10094
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YRightTextInfo.AryOverlayWidth))
|
|
10095
|
+
{
|
|
10096
|
+
this.Canvas.beginPath();
|
|
10097
|
+
for(var i=0;i<this.YRightTextInfo.AryOverlayWidth.length;++i)
|
|
10098
|
+
{
|
|
10099
|
+
var width=this.YRightTextInfo.AryOverlayWidth[i];
|
|
10100
|
+
xRight+=width;
|
|
10101
|
+
xLine=ToFixedPoint(xRight);
|
|
10102
|
+
this.Canvas.moveTo(xLine,top);
|
|
10103
|
+
this.Canvas.lineTo(xLine,bottom);
|
|
10104
|
+
}
|
|
10105
|
+
this.Canvas.stroke();
|
|
10106
|
+
|
|
10107
|
+
}
|
|
10108
|
+
}
|
|
10000
10109
|
}
|
|
10001
10110
|
|
|
10002
10111
|
//上下区域是否重叠
|
|
@@ -10660,7 +10769,9 @@ function AverageWidthFrame()
|
|
|
10660
10769
|
{
|
|
10661
10770
|
var value=this.Canvas.measureText(text[i].Text).width;
|
|
10662
10771
|
if (value>width) width=value;
|
|
10663
|
-
|
|
10772
|
+
var outItem={ Text:text[i].Text, Width:value+2*pixelTatio };
|
|
10773
|
+
if (item.TextColor) outItem.TextColor=item.TextColor;
|
|
10774
|
+
aryText.push(outItem);
|
|
10664
10775
|
}
|
|
10665
10776
|
}
|
|
10666
10777
|
|
|
@@ -10885,7 +10996,8 @@ function AverageWidthFrame()
|
|
|
10885
10996
|
var textLeft=right-itemText.Width;
|
|
10886
10997
|
this.Canvas.fillStyle=bgColor;
|
|
10887
10998
|
this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight); //文本背景区域
|
|
10888
|
-
this.Canvas.fillStyle
|
|
10999
|
+
if (itemText.TextColor) this.Canvas.fillStyle=itemText.TextColor;
|
|
11000
|
+
else this.Canvas.fillStyle = item.TextColor;
|
|
10889
11001
|
this.Canvas.fillText(itemText.Text, textLeft + 1*pixelTatio, yText);
|
|
10890
11002
|
if (i==0) this.DrawLine(left,textLeft,yText,item.LineColor,item.LineType,item);
|
|
10891
11003
|
yText+=textHeight+1*pixelTatio;
|
|
@@ -10997,7 +11109,8 @@ function AverageWidthFrame()
|
|
|
10997
11109
|
{
|
|
10998
11110
|
this.Canvas.fillStyle=item.LineColor;
|
|
10999
11111
|
this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
|
|
11000
|
-
this.Canvas.fillStyle
|
|
11112
|
+
if (itemText.TextColor) this.Canvas.fillStyle=itemText.TextColor;
|
|
11113
|
+
else this.Canvas.fillStyle = item.TextColor;
|
|
11001
11114
|
this.Canvas.fillText(itemText.Text, textLeft + 1*pixelTatio, yText);
|
|
11002
11115
|
}
|
|
11003
11116
|
|
|
@@ -14591,8 +14704,13 @@ function OverlayKLineFrame()
|
|
|
14591
14704
|
this.Title=null;
|
|
14592
14705
|
this.TitleColor=g_JSChartResource.OverlayFrame.TitleColor;
|
|
14593
14706
|
this.TitleFont=g_JSChartResource.OverlayFrame.TitleFont;
|
|
14707
|
+
this.IsShowTitle=true;
|
|
14594
14708
|
|
|
14595
14709
|
this.IsYDrawMainFrame=false; //Y轴自定刻度绘制在主图框架上
|
|
14710
|
+
this.BlankWidth=0;
|
|
14711
|
+
this.Style=0; //0=Y轴在BlankWidth 1=Y轴在左边
|
|
14712
|
+
|
|
14713
|
+
this.YLineExtend=[ { Width:2 }, null]; //[0]=左 [1]=右 { Width:5, Color:颜色, }
|
|
14596
14714
|
|
|
14597
14715
|
this.Buttons=[];
|
|
14598
14716
|
|
|
@@ -14632,21 +14750,69 @@ function OverlayKLineFrame()
|
|
|
14632
14750
|
this.XSplit=false;
|
|
14633
14751
|
}
|
|
14634
14752
|
|
|
14753
|
+
|
|
14754
|
+
//Y轴刻度线 x坐标
|
|
14755
|
+
this.GetXHorizontal=function()
|
|
14756
|
+
{
|
|
14757
|
+
var border=this.ChartBorder.GetBorder();
|
|
14758
|
+
var x=border.Right;
|
|
14759
|
+
x+=this.RightOffset;
|
|
14760
|
+
|
|
14761
|
+
if (this.Style==1)
|
|
14762
|
+
{
|
|
14763
|
+
|
|
14764
|
+
}
|
|
14765
|
+
else
|
|
14766
|
+
{
|
|
14767
|
+
x+=this.BlankWidth;
|
|
14768
|
+
}
|
|
14769
|
+
|
|
14770
|
+
return x;
|
|
14771
|
+
}
|
|
14772
|
+
|
|
14773
|
+
this.GetHorizontalWidth=function()
|
|
14774
|
+
{
|
|
14775
|
+
var width=null;
|
|
14776
|
+
if (this.YRightTextInfo && IFrameSplitOperator.IsNumber(this.TextWidthIndex))
|
|
14777
|
+
width=this.YRightTextInfo.AryOverlayWidth[this.TextWidthIndex];
|
|
14778
|
+
|
|
14779
|
+
return width;
|
|
14780
|
+
}
|
|
14781
|
+
|
|
14635
14782
|
this.DrawTitle=function() //画标题
|
|
14636
14783
|
{
|
|
14784
|
+
if (!this.IsShowTitle) return;
|
|
14637
14785
|
if (!this.Title) return;
|
|
14638
14786
|
var border=this.ChartBorder.GetBorder();
|
|
14639
14787
|
var top = this.ChartBorder.GetTopTitle();
|
|
14640
14788
|
var bottom = border.Bottom;
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14789
|
+
|
|
14790
|
+
var xText=this.GetXHorizontal();
|
|
14791
|
+
var leftLine=null, rightLine=null;
|
|
14792
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
14793
|
+
{
|
|
14794
|
+
rightLine=this.YLineExtend[1];
|
|
14795
|
+
leftLine=this.YLineExtend[0];
|
|
14796
|
+
}
|
|
14797
|
+
|
|
14798
|
+
if (this.Style==1)
|
|
14799
|
+
{
|
|
14800
|
+
this.Canvas.textBaseline="bottom";
|
|
14801
|
+
if (rightLine && rightLine.Width>0) xText+=rightLine.Width+1;
|
|
14802
|
+
else xText+=1;
|
|
14803
|
+
}
|
|
14804
|
+
else
|
|
14805
|
+
{
|
|
14806
|
+
this.Canvas.textBaseline="top";
|
|
14807
|
+
if (leftLine && leftLine.Width>0) xText-=leftLine.Width;
|
|
14808
|
+
else xText-=2;
|
|
14809
|
+
}
|
|
14810
|
+
|
|
14811
|
+
var yText=top+(bottom-top)/2;
|
|
14644
14812
|
this.Canvas.fillStyle=this.TitleColor;
|
|
14645
14813
|
this.Canvas.font=this.TitleFont;
|
|
14646
14814
|
this.Canvas.textAlign="center";
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
var xText=right-2,yText=top+(bottom-top)/2;
|
|
14815
|
+
|
|
14650
14816
|
this.Canvas.save();
|
|
14651
14817
|
this.Canvas.translate(xText, yText);
|
|
14652
14818
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
@@ -14685,10 +14851,18 @@ function OverlayKLineFrame()
|
|
|
14685
14851
|
if (item.Font!=null) this.Canvas.font=item.Font;
|
|
14686
14852
|
|
|
14687
14853
|
textWidth=this.Canvas.measureText(item.Message[1]).width;
|
|
14854
|
+
if (this.YTextPadding && IFrameSplitOperator.IsNumber(this.YTextPadding[1]))
|
|
14855
|
+
textWidth+=this.YTextPadding[1];
|
|
14688
14856
|
if (width.Right<textWidth) width.Right=textWidth;
|
|
14689
14857
|
}
|
|
14690
14858
|
}
|
|
14691
14859
|
|
|
14860
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
14861
|
+
{
|
|
14862
|
+
var line=this.YLineExtend[1];
|
|
14863
|
+
if (line && line.Width>0) width.Right+=line.Width;
|
|
14864
|
+
}
|
|
14865
|
+
|
|
14692
14866
|
return { TextWidth:width };
|
|
14693
14867
|
}
|
|
14694
14868
|
|
|
@@ -14728,7 +14902,23 @@ function OverlayKLineFrame()
|
|
|
14728
14902
|
var top = this.ChartBorder.GetTopTitle();
|
|
14729
14903
|
var borderRight=this.ChartBorder.Right;
|
|
14730
14904
|
right+=this.RightOffset;
|
|
14905
|
+
var xLine=this.GetXHorizontal();
|
|
14906
|
+
if (IFrameSplitOperator.IsNumber(this.BlankWidth)) right+=this.BlankWidth;
|
|
14907
|
+
|
|
14908
|
+
var rightExtendText=null; //右侧文字设置
|
|
14909
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YTextExtend))
|
|
14910
|
+
{
|
|
14911
|
+
rightExtendText=this.YTextExtend[1];
|
|
14912
|
+
}
|
|
14731
14913
|
|
|
14914
|
+
var leftLine=null, rightLine=null;
|
|
14915
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.YLineExtend))
|
|
14916
|
+
{
|
|
14917
|
+
rightLine=this.YLineExtend[1];
|
|
14918
|
+
leftLine=this.YLineExtend[0];
|
|
14919
|
+
}
|
|
14920
|
+
|
|
14921
|
+
var rightWidth=this.GetHorizontalWidth(); //右侧宽度
|
|
14732
14922
|
var yPrev=null; //上一个坐标y的值
|
|
14733
14923
|
for(var i=this.HorizontalInfo.length-1; i>=0; --i) //从上往下画分割线
|
|
14734
14924
|
{
|
|
@@ -14740,11 +14930,24 @@ function OverlayKLineFrame()
|
|
|
14740
14930
|
else if (y <= top + 2) this.Canvas.textBaseline = 'top';
|
|
14741
14931
|
else this.Canvas.textBaseline = "middle";
|
|
14742
14932
|
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
|
|
14746
|
-
|
|
14747
|
-
|
|
14933
|
+
|
|
14934
|
+
if (leftLine && leftLine.Width>0) //左边
|
|
14935
|
+
{
|
|
14936
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
14937
|
+
this.Canvas.beginPath();
|
|
14938
|
+
this.Canvas.moveTo(xLine-leftLine.Width,ToFixedPoint(y));
|
|
14939
|
+
this.Canvas.lineTo(xLine,ToFixedPoint(y));
|
|
14940
|
+
this.Canvas.stroke();
|
|
14941
|
+
}
|
|
14942
|
+
|
|
14943
|
+
if (rightLine && rightLine.Width>0)
|
|
14944
|
+
{
|
|
14945
|
+
this.Canvas.strokeStyle=this.PenBorder;
|
|
14946
|
+
this.Canvas.beginPath();
|
|
14947
|
+
this.Canvas.moveTo(xLine+rightLine.Width,ToFixedPoint(y));
|
|
14948
|
+
this.Canvas.lineTo(xLine,ToFixedPoint(y));
|
|
14949
|
+
this.Canvas.stroke();
|
|
14950
|
+
}
|
|
14748
14951
|
|
|
14749
14952
|
//坐标信息 右边 间距小于10 不画坐标
|
|
14750
14953
|
if (item.Message[1]!=null && borderRight>10)
|
|
@@ -14753,10 +14956,22 @@ function OverlayKLineFrame()
|
|
|
14753
14956
|
|
|
14754
14957
|
var text=item.Message[1];
|
|
14755
14958
|
if (Array.isArray(item.Message[1])) text=item.Message[1][0];
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14959
|
+
|
|
14960
|
+
if (rightExtendText && rightExtendText.Align)
|
|
14961
|
+
{
|
|
14962
|
+
var textWidth=rightWidth;
|
|
14963
|
+
this.Canvas.textAlign="right";
|
|
14964
|
+
var xRight=border.Right+this.RightOffset+textWidth-this.YTextPadding[1];
|
|
14965
|
+
this.Canvas.fillText(text,xRight,y);
|
|
14966
|
+
}
|
|
14967
|
+
else
|
|
14968
|
+
{
|
|
14969
|
+
var xText=right+2;
|
|
14970
|
+
if (rightLine && rightLine.Width>0) xText+=rightLine.Width;
|
|
14971
|
+
this.Canvas.fillStyle=item.TextColor;
|
|
14972
|
+
this.Canvas.textAlign="left";
|
|
14973
|
+
this.Canvas.fillText(text,xText,y);
|
|
14974
|
+
}
|
|
14760
14975
|
}
|
|
14761
14976
|
|
|
14762
14977
|
yPrev=y;
|
|
@@ -14768,10 +14983,8 @@ function OverlayKLineFrame()
|
|
|
14768
14983
|
{
|
|
14769
14984
|
var border=this.ChartBorder.GetBorder();
|
|
14770
14985
|
var top=border.TopEx;
|
|
14771
|
-
//var left=this.ChartBorder.GetLeft();
|
|
14772
|
-
var right=border.Right;
|
|
14773
14986
|
var bottom=border.BottomEx;
|
|
14774
|
-
right
|
|
14987
|
+
var right=this.GetXHorizontal();
|
|
14775
14988
|
|
|
14776
14989
|
this.Canvas.strokeStyle=this.PenBorder;
|
|
14777
14990
|
this.Canvas.beginPath();
|
|
@@ -14817,14 +15030,15 @@ function OverlayKLineFrame()
|
|
|
14817
15030
|
|
|
14818
15031
|
var border=this.ChartBorder.GetBorder();
|
|
14819
15032
|
var yButton=border.Top+this.ChartBorder.TitleHeight/2;
|
|
14820
|
-
var
|
|
15033
|
+
var rightWidth=this.GetHorizontalWidth();
|
|
15034
|
+
var xBotton=border.Right+this.RightOffset+rightWidth-this.CloseButton.MerginLeft;
|
|
14821
15035
|
|
|
14822
|
-
for(var i=
|
|
15036
|
+
for(var i=aryButton.length-1;i>=0;--i)
|
|
14823
15037
|
{
|
|
14824
15038
|
var item=aryButton[i];
|
|
14825
15039
|
var size=item.Style.Size;
|
|
14826
15040
|
var font=`${size}px ${item.Style.Family}`;
|
|
14827
|
-
var rtButton={ Left:xBotton, Top:yButton-size/2, Right:xBotton
|
|
15041
|
+
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 };
|
|
14828
15042
|
var color=this.CloseButton.Color;
|
|
14829
15043
|
if (moveonPoint && (moveonPoint.X>=rtButton.Left && moveonPoint.X<rtButton.Right && moveonPoint.Y>=rtButton.Top && moveonPoint.Y<=rtButton.Bottom))
|
|
14830
15044
|
{
|
|
@@ -14835,13 +15049,13 @@ function OverlayKLineFrame()
|
|
|
14835
15049
|
|
|
14836
15050
|
this.Canvas.fillStyle=color;
|
|
14837
15051
|
this.Canvas.font=font;
|
|
14838
|
-
this.Canvas.textAlign="
|
|
15052
|
+
this.Canvas.textAlign="right";
|
|
14839
15053
|
this.Canvas.textBaseline="middle";
|
|
14840
15054
|
this.Canvas.fillText(item.Style.Text, xBotton, yButton);
|
|
14841
15055
|
|
|
14842
15056
|
this.Buttons.push({ ID:item.ID, Rect:rtButton });
|
|
14843
15057
|
|
|
14844
|
-
xBotton=rtButton.
|
|
15058
|
+
xBotton=rtButton.Left;
|
|
14845
15059
|
}
|
|
14846
15060
|
}
|
|
14847
15061
|
|
|
@@ -15918,7 +16132,7 @@ function SubFrameItem()
|
|
|
15918
16132
|
this.Frame;
|
|
15919
16133
|
this.Height;
|
|
15920
16134
|
this.OverlayIndex=[]; //叠加指标
|
|
15921
|
-
this.Interval=60; //子坐标间间距
|
|
16135
|
+
//this.Interval=60; //子坐标间间距
|
|
15922
16136
|
}
|
|
15923
16137
|
|
|
15924
16138
|
function OverlayIndexItem()
|
|
@@ -15986,8 +16200,11 @@ function HQTradeFrame()
|
|
|
15986
16200
|
|
|
15987
16201
|
this.AutoLeftBorder=null; //{ Blank:10 留白宽度, MinWidth:最小宽度 }
|
|
15988
16202
|
this.AutoRightBorder=null; //{ Blank:10 留白宽度, MinWidth:最小宽度 }
|
|
15989
|
-
this.OverlayBlankWidth=
|
|
15990
|
-
this.AuotRightWidth; //右边主坐标刻度宽度
|
|
16203
|
+
this.OverlayBlankWidth=30;
|
|
16204
|
+
this.AuotRightWidth; //右边主坐标刻度宽度 (自动模式)
|
|
16205
|
+
|
|
16206
|
+
//固定模式右侧宽度
|
|
16207
|
+
this.FixedRightWidth={ Main:60, Overlay:80 };
|
|
15991
16208
|
|
|
15992
16209
|
this.ZoomWindowsInfo=null; //附图指标缩放,备份信息
|
|
15993
16210
|
this.ZoomStartWindowIndex=1; //允许缩放窗口起始位置
|
|
@@ -16496,7 +16713,7 @@ function HQTradeFrame()
|
|
|
16496
16713
|
|
|
16497
16714
|
overlayItem.Frame.YSplitOperator.Operator();
|
|
16498
16715
|
var value=overlayItem.Frame.GetScaleTextWidth();
|
|
16499
|
-
|
|
16716
|
+
|
|
16500
16717
|
overlayItem.Frame.HorizontalMax=maxValue;
|
|
16501
16718
|
overlayItem.Frame.HorizontalMin=minValue;
|
|
16502
16719
|
|
|
@@ -16553,6 +16770,8 @@ function HQTradeFrame()
|
|
|
16553
16770
|
width.OverlayRight+=value;
|
|
16554
16771
|
}
|
|
16555
16772
|
|
|
16773
|
+
width.AryOverlayWidth=overlayWidth;
|
|
16774
|
+
|
|
16556
16775
|
return width;
|
|
16557
16776
|
}
|
|
16558
16777
|
|
|
@@ -16607,59 +16826,104 @@ function HQTradeFrame()
|
|
|
16607
16826
|
}
|
|
16608
16827
|
}
|
|
16609
16828
|
|
|
16610
|
-
if (IFrameSplitOperator.IsNumber(textWidth.Right)
|
|
16829
|
+
if (IFrameSplitOperator.IsNumber(textWidth.Right))
|
|
16611
16830
|
{
|
|
16612
|
-
|
|
16613
|
-
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.Blank)) blank=this.AutoRightBorder.Blank;
|
|
16614
|
-
var value=textWidth.Right+blank;
|
|
16615
|
-
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.MinWidth))
|
|
16831
|
+
if (this.AutoRightBorder) //自动调整右侧间距
|
|
16616
16832
|
{
|
|
16617
|
-
|
|
16618
|
-
|
|
16833
|
+
var rightTextInfo={ };
|
|
16834
|
+
var blank=0;
|
|
16835
|
+
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.Blank)) blank=this.AutoRightBorder.Blank;
|
|
16836
|
+
var value=textWidth.Right+blank;
|
|
16837
|
+
if (IFrameSplitOperator.IsNumber(this.AutoRightBorder.MinWidth))
|
|
16838
|
+
{
|
|
16839
|
+
if (this.AutoRightBorder.MinWidth>value) value=this.AutoRightBorder.MinWidth;
|
|
16840
|
+
}
|
|
16619
16841
|
|
|
16620
|
-
this.AuotRightWidth=value;
|
|
16621
|
-
if (IFrameSplitOperator.IsPlusNumber(textWidth.OverlayRight))
|
|
16622
|
-
{
|
|
16623
|
-
value+=this.OverlayBlankWidth;
|
|
16624
16842
|
this.AuotRightWidth=value;
|
|
16625
|
-
value
|
|
16626
|
-
|
|
16843
|
+
rightTextInfo.MainTextWidth=value; //主图坐标宽度
|
|
16844
|
+
if (IFrameSplitOperator.IsNonEmptyArray(textWidth.AryOverlayWidth)) rightTextInfo.AryOverlayWidth=textWidth.AryOverlayWidth;
|
|
16627
16845
|
|
|
16628
|
-
|
|
16629
|
-
|
|
16630
|
-
|
|
16846
|
+
if (IFrameSplitOperator.IsPlusNumber(textWidth.OverlayRight))
|
|
16847
|
+
{
|
|
16848
|
+
this.AuotRightWidth=value;
|
|
16849
|
+
value+=textWidth.OverlayRight;
|
|
16850
|
+
}
|
|
16631
16851
|
|
|
16632
|
-
if (this.
|
|
16852
|
+
if (this.GetExtendChartRightWidth)
|
|
16633
16853
|
{
|
|
16634
|
-
var
|
|
16635
|
-
|
|
16854
|
+
var extendWidth=this.GetExtendChartRightWidth();
|
|
16855
|
+
|
|
16856
|
+
if (this.GetExtendChartByClassName)
|
|
16636
16857
|
{
|
|
16637
|
-
finder.
|
|
16858
|
+
var finder=this.GetExtendChartByClassName("StockChip");
|
|
16859
|
+
if (finder && finder.Chart)
|
|
16860
|
+
{
|
|
16861
|
+
finder.Chart.Left=value;
|
|
16862
|
+
}
|
|
16638
16863
|
}
|
|
16864
|
+
|
|
16865
|
+
value+=extendWidth;
|
|
16639
16866
|
}
|
|
16640
16867
|
|
|
16641
|
-
|
|
16642
|
-
|
|
16868
|
+
if (this.IsHScreen)
|
|
16869
|
+
{
|
|
16870
|
+
if (this.ChartBorder.Bottom!=value) bSizeChange=true;
|
|
16871
|
+
this.ChartBorder.Bottom=value;
|
|
16872
|
+
}
|
|
16873
|
+
else
|
|
16874
|
+
{
|
|
16875
|
+
if (this.ChartBorder.Right!=value) bSizeChange=true;
|
|
16876
|
+
this.ChartBorder.Right=value;
|
|
16877
|
+
}
|
|
16643
16878
|
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16879
|
+
for(var i=0; i<this.SubFrame.length; ++i)
|
|
16880
|
+
{
|
|
16881
|
+
var item=this.SubFrame[i];
|
|
16882
|
+
if (this.IsHScreen) item.Frame.ChartBorder.Bottom=value;
|
|
16883
|
+
else item.Frame.ChartBorder.Right=value;
|
|
16884
|
+
|
|
16885
|
+
item.Frame.ReDrawToolbar=true;
|
|
16886
|
+
item.Frame.YRightTextInfo=rightTextInfo;
|
|
16887
|
+
|
|
16888
|
+
for(var j=0;j<item.OverlayIndex.length;++j)
|
|
16889
|
+
{
|
|
16890
|
+
var overlayItem=item.OverlayIndex[j];
|
|
16891
|
+
overlayItem.Frame.YRightTextInfo=rightTextInfo;
|
|
16892
|
+
}
|
|
16893
|
+
}
|
|
16648
16894
|
}
|
|
16649
|
-
else
|
|
16895
|
+
else
|
|
16650
16896
|
{
|
|
16651
|
-
|
|
16652
|
-
this.
|
|
16653
|
-
|
|
16897
|
+
var rightTextInfo={ };
|
|
16898
|
+
rightTextInfo.MainTextWidth=this.FixedRightWidth.Main;
|
|
16899
|
+
if (textWidth.OverlayRight==0) //无叠加直接最右边
|
|
16900
|
+
{
|
|
16901
|
+
if (this.IsHScreen)
|
|
16902
|
+
rightTextInfo.MainTextWidth=this.ChartBorder.Bottom;
|
|
16903
|
+
else
|
|
16904
|
+
rightTextInfo.MainTextWidth=this.ChartBorder.Right;
|
|
16905
|
+
}
|
|
16906
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(textWidth.AryOverlayWidth))
|
|
16907
|
+
{
|
|
16908
|
+
for(var i=0;i<textWidth.AryOverlayWidth.length;++i)
|
|
16909
|
+
textWidth.AryOverlayWidth[i]=this.FixedRightWidth.Overlay;
|
|
16654
16910
|
|
|
16655
|
-
|
|
16656
|
-
|
|
16657
|
-
var item=this.SubFrame[i];
|
|
16658
|
-
if (this.IsHScreen) item.Frame.ChartBorder.Bottom=value;
|
|
16659
|
-
else item.Frame.ChartBorder.Right=value;
|
|
16911
|
+
rightTextInfo.AryOverlayWidth=textWidth.AryOverlayWidth;
|
|
16912
|
+
}
|
|
16660
16913
|
|
|
16661
|
-
|
|
16662
|
-
|
|
16914
|
+
for(var i=0; i<this.SubFrame.length; ++i)
|
|
16915
|
+
{
|
|
16916
|
+
var item=this.SubFrame[i];
|
|
16917
|
+
|
|
16918
|
+
item.Frame.ReDrawToolbar=true;
|
|
16919
|
+
item.Frame.YRightTextInfo=rightTextInfo;
|
|
16920
|
+
|
|
16921
|
+
for(var j=0;j<item.OverlayIndex.length;++j)
|
|
16922
|
+
{
|
|
16923
|
+
var overlayItem=item.OverlayIndex[j];
|
|
16924
|
+
overlayItem.Frame.YRightTextInfo=rightTextInfo;
|
|
16925
|
+
}
|
|
16926
|
+
}
|
|
16663
16927
|
}
|
|
16664
16928
|
}
|
|
16665
16929
|
|
|
@@ -16677,39 +16941,47 @@ function HQTradeFrame()
|
|
|
16677
16941
|
{
|
|
16678
16942
|
var rightOffset=this.AuotRightWidth;
|
|
16679
16943
|
|
|
16680
|
-
for(var j=0; j<item.OverlayIndex.length; ++j)
|
|
16944
|
+
for(var j=0, index=0; j<item.OverlayIndex.length; ++j)
|
|
16681
16945
|
{
|
|
16682
16946
|
var overlayItem=item.OverlayIndex[j];
|
|
16683
16947
|
//把主坐标部分设置给子坐标下来
|
|
16684
16948
|
overlayItem.Frame.DataWidth=item.Frame.DataWidth;
|
|
16685
16949
|
overlayItem.Frame.DistanceWidth=item.Frame.DistanceWidth;
|
|
16686
16950
|
overlayItem.Frame.XPointCount=item.Frame.XPointCount;
|
|
16687
|
-
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
|
|
16692
|
-
|
|
16951
|
+
overlayItem.Frame.RightOffset=rightOffset;
|
|
16952
|
+
overlayItem.Frame.BlankWidth=0;
|
|
16953
|
+
overlayItem.Frame.TextWidthIndex=index;
|
|
16954
|
+
if (IFrameSplitOperator.IsNumber(this.OverlayBlankWidth)) overlayItem.Frame.BlankWidth=this.OverlayBlankWidth;
|
|
16955
|
+
|
|
16956
|
+
overlayItem.Frame.Draw();
|
|
16957
|
+
rightOffset+=overlayItem.RightWidth.Width;
|
|
16958
|
+
if (overlayItem.Frame.IsShow) ++index;
|
|
16693
16959
|
}
|
|
16694
|
-
|
|
16695
16960
|
}
|
|
16696
16961
|
else
|
|
16697
16962
|
{
|
|
16698
|
-
var rightOffset=
|
|
16963
|
+
var rightOffset=this.FixedRightWidth.Main;
|
|
16699
16964
|
if (item.Frame.RightTextMaxWidth>rightOffset) rightOffset=item.Frame.RightTextMaxWidth;
|
|
16700
|
-
|
|
16965
|
+
|
|
16966
|
+
for(var j =0, index=0; j<item.OverlayIndex.length;++j)
|
|
16701
16967
|
{
|
|
16702
16968
|
var overlayItem=item.OverlayIndex[j];
|
|
16703
16969
|
//把主坐标部分设置给子坐标下来
|
|
16704
16970
|
overlayItem.Frame.DataWidth=item.Frame.DataWidth;
|
|
16705
16971
|
overlayItem.Frame.DistanceWidth=item.Frame.DistanceWidth;
|
|
16706
16972
|
overlayItem.Frame.XPointCount=item.Frame.XPointCount;
|
|
16707
|
-
|
|
16973
|
+
overlayItem.Frame.RightOffset=rightOffset;
|
|
16974
|
+
overlayItem.Frame.BlankWidth=0;
|
|
16975
|
+
overlayItem.Frame.TextWidthIndex=index;
|
|
16976
|
+
if (IFrameSplitOperator.IsNumber(this.OverlayBlankWidth)) overlayItem.Frame.BlankWidth=this.OverlayBlankWidth;
|
|
16977
|
+
|
|
16978
|
+
overlayItem.Frame.Draw();
|
|
16979
|
+
if (overlayItem.Frame.IsShow)
|
|
16708
16980
|
{
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
if (overlayItem.Frame.IsShow) rightOffset+=item.Interval;
|
|
16981
|
+
rightOffset+=this.FixedRightWidth.Overlay;
|
|
16982
|
+
++index;
|
|
16712
16983
|
}
|
|
16984
|
+
|
|
16713
16985
|
}
|
|
16714
16986
|
}
|
|
16715
16987
|
}
|
|
@@ -16916,6 +17188,7 @@ function HQTradeFrame()
|
|
|
16916
17188
|
{
|
|
16917
17189
|
var overlayItem=item.OverlayIndex[j];
|
|
16918
17190
|
var overlayFrame=overlayItem.Frame;
|
|
17191
|
+
if (!overlayFrame.IsShow) continue;
|
|
16919
17192
|
if (overlayFrame.DrawToolbar) overlayFrame.DrawToolbar(moveonPoint, frame.IsMinSize, mouseStatus);
|
|
16920
17193
|
}
|
|
16921
17194
|
}
|
|
@@ -46401,36 +46674,35 @@ function ChartCorssCursor()
|
|
|
46401
46674
|
if (yValueExtend.FrameID>=0)
|
|
46402
46675
|
{
|
|
46403
46676
|
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
|
|
46404
|
-
var isAutoRightBorder=false;
|
|
46405
|
-
if (this.Frame.AutoRightBorder) isAutoRightBorder=true;
|
|
46406
46677
|
var overlayLeft=right;
|
|
46407
|
-
if (isAutoRightBorder) overlayLeft=right+this.Frame.AuotRightWidth;
|
|
46408
46678
|
this.Canvas.font=this.Font;
|
|
46409
|
-
for(var i
|
|
46679
|
+
for(var i=0; i<frame.OverlayIndex.length; ++i)
|
|
46410
46680
|
{
|
|
46411
46681
|
var item=frame.OverlayIndex[i];
|
|
46412
46682
|
if (item.Frame.IsShow===false) continue;
|
|
46413
46683
|
|
|
46414
|
-
|
|
46684
|
+
overlayLeft=item.Frame.GetXHorizontal();
|
|
46415
46685
|
|
|
46416
|
-
if (overlayLeft+30>chartRight) break;
|
|
46686
|
+
//if (overlayLeft+30>chartRight) break;
|
|
46417
46687
|
var yValue=item.Frame.GetYData(y);
|
|
46418
|
-
|
|
46419
|
-
|
|
46688
|
+
var text=IFrameSplitOperator.FormatValueString(yValue,2);
|
|
46689
|
+
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
|
|
46690
|
+
|
|
46691
|
+
/*
|
|
46692
|
+
for(var j=2;j>=0;--j)
|
|
46420
46693
|
{
|
|
46421
|
-
var text=IFrameSplitOperator.FormatValueString(yValue,
|
|
46694
|
+
var text=IFrameSplitOperator.FormatValueString(yValue,j);
|
|
46422
46695
|
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
|
|
46423
46696
|
if (textWidth<frame.Interval) break;
|
|
46424
46697
|
}
|
|
46698
|
+
*/
|
|
46425
46699
|
|
|
46426
46700
|
this.Canvas.fillStyle=this.TextBGColor;
|
|
46427
|
-
this.Canvas.fillRect(overlayLeft+
|
|
46701
|
+
this.Canvas.fillRect(overlayLeft+1,y-this.TextHeight/2,textWidth,this.TextHeight);
|
|
46428
46702
|
this.Canvas.textAlign="left";
|
|
46429
46703
|
this.Canvas.textBaseline="middle";
|
|
46430
46704
|
this.Canvas.fillStyle=this.TextColor;
|
|
46431
46705
|
this.Canvas.fillText(text,overlayLeft+4,y,textWidth);
|
|
46432
|
-
|
|
46433
|
-
if (isAutoRightBorder) overlayLeft+=item.RightWidth.Width;
|
|
46434
46706
|
}
|
|
46435
46707
|
}
|
|
46436
46708
|
|
|
@@ -62487,6 +62759,14 @@ function JSChartResource()
|
|
|
62487
62759
|
if (item.EmptyBGColor) this.FrameLatestPrice.EmptyBGColor = item.EmptyBGColor;
|
|
62488
62760
|
}
|
|
62489
62761
|
|
|
62762
|
+
if (style.OverlayFrame)
|
|
62763
|
+
{
|
|
62764
|
+
var item=style.OverlayFrame;
|
|
62765
|
+
if (style.OverlayFrame.BolderPen) this.OverlayFrame.BolderPen = style.OverlayFrame.BolderPen;
|
|
62766
|
+
if (style.OverlayFrame.TitleColor) this.OverlayFrame.TitleColor = style.OverlayFrame.TitleColor;
|
|
62767
|
+
if (style.OverlayFrame.TitleFont) this.OverlayFrame.TitleFont = style.OverlayFrame.TitleFont;
|
|
62768
|
+
}
|
|
62769
|
+
|
|
62490
62770
|
if (style.CorssCursorBGColor) this.CorssCursorBGColor = style.CorssCursorBGColor;
|
|
62491
62771
|
if (style.CorssCursorTextColor) this.CorssCursorTextColor = style.CorssCursorTextColor;
|
|
62492
62772
|
if (style.CorssCursorTextFont) this.CorssCursorTextFont = style.CorssCursorTextFont;
|
|
@@ -64774,7 +65054,6 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
64774
65054
|
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
64775
65055
|
|
|
64776
65056
|
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期 PageSize:}
|
|
64777
|
-
this.OverlayIndexFrameWidth=60; //叠加指标框架宽度
|
|
64778
65057
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
64779
65058
|
this.IsZoomLockRight=false;
|
|
64780
65059
|
this.KLineSize=null; //{ DataWidth:, }
|
|
@@ -68385,10 +68664,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68385
68664
|
}
|
|
68386
68665
|
|
|
68387
68666
|
var subFrame=this.Frame.SubFrame[windowIndex];
|
|
68388
|
-
subFrame.Interval=this.OverlayIndexFrameWidth;
|
|
68389
68667
|
var overlayFrame=new OverlayIndexItem();
|
|
68390
68668
|
if (obj.Identify) overlayFrame.Identify=obj.Identify; //由外部指定id
|
|
68391
|
-
var frame= this.ClassName==='KLineChartHScreenContainer' ? new OverlayKLineHScreenFrame() : new OverlayKLineFrame();
|
|
68669
|
+
//var frame= this.ClassName==='KLineChartHScreenContainer' ? new OverlayKLineHScreenFrame() : new OverlayKLineFrame();
|
|
68670
|
+
var frame=this.CreateOverlayFrame();
|
|
68392
68671
|
frame.Canvas=this.Canvas;
|
|
68393
68672
|
frame.MainFrame=subFrame.Frame;
|
|
68394
68673
|
frame.ChartBorder=subFrame.Frame.ChartBorder;
|
|
@@ -68417,11 +68696,18 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68417
68696
|
var item=obj.Frame;
|
|
68418
68697
|
if (item.Custom) frame.YSplitOperator.Custom=item.Custom;
|
|
68419
68698
|
if (IFrameSplitOperator.IsBool(item.IsYDrawMainFrame)) frame.IsYDrawMainFrame=item.IsYDrawMainFrame; //自定义刻度绘制在主图上
|
|
68420
|
-
if (IFrameSplitOperator.IsBool(item.IsShowToolbar)) frame.IsShowToolbar=item.IsShowToolbar;
|
|
68699
|
+
if (IFrameSplitOperator.IsBool(item.IsShowToolbar)) frame.IsShowToolbar=item.IsShowToolbar; //是否显示工具栏
|
|
68421
68700
|
}
|
|
68422
68701
|
|
|
68423
68702
|
overlayFrame.Frame=frame;
|
|
68424
68703
|
|
|
68704
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_OVERLAY_FRAME);
|
|
68705
|
+
if (event && event.Callback)
|
|
68706
|
+
{
|
|
68707
|
+
var sendData={ OverlayFrame:overlayFrame, WindowIndex:windowIndex, SubFrame:subFrame };
|
|
68708
|
+
event.Callback(event, sendData, this);
|
|
68709
|
+
}
|
|
68710
|
+
|
|
68425
68711
|
if (apiItem)
|
|
68426
68712
|
{
|
|
68427
68713
|
var apiIndex=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,obj, true);
|
|
@@ -76228,7 +76514,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76228
76514
|
}
|
|
76229
76515
|
|
|
76230
76516
|
var subFrame=this.Frame.SubFrame[windowIndex];
|
|
76231
|
-
subFrame.Interval=this.OverlayIndexFrameWidth;
|
|
76232
76517
|
var overlayFrame=new OverlayIndexItem();
|
|
76233
76518
|
if (obj.Identify) overlayFrame.Identify=obj.Identify; //由外部指定id
|
|
76234
76519
|
var frame=null;
|