hqchart 1.1.13492 → 1.1.13502
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.NetworkFilterTest.vue.js +52 -3
- package/lib/umychart.vue.js +117 -69
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +297 -0
- package/src/jscommon/umychart.js +196 -78
- package/src/jscommon/umychart.report.js +141 -17
- package/src/jscommon/umychart.testdata/shsz_stock_data.js +45482 -0
- package/src/jscommon/umychart.testdata.js +297 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +338 -96
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +297 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +338 -96
|
@@ -6722,6 +6722,9 @@ var JSCHART_MENU_ID=
|
|
|
6722
6722
|
CMD_CHANGE_LANGUAGE_ID:37, //语言切换
|
|
6723
6723
|
|
|
6724
6724
|
CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:38,
|
|
6725
|
+
|
|
6726
|
+
|
|
6727
|
+
CMD_REPORT_CHANGE_BLOCK_ID:60, //报价列表 切换板块ID
|
|
6725
6728
|
}
|
|
6726
6729
|
|
|
6727
6730
|
|
|
@@ -13831,7 +13834,7 @@ function IsRecvOverlap(rect1, rect2)
|
|
|
13831
13834
|
return Math.max(rect1.Left,rect2.Left) < Math.min(rect1.Right,rect2.Right) && Math.max(rect1.Top,rect2.Top) < Math.min(rect1.Bottom,rect2.Bottom);
|
|
13832
13835
|
}
|
|
13833
13836
|
|
|
13834
|
-
function
|
|
13837
|
+
function CopyMarginConfig(dest,src)
|
|
13835
13838
|
{
|
|
13836
13839
|
if (!src || !dest) return;
|
|
13837
13840
|
|
|
@@ -13841,6 +13844,9 @@ function CopyMerginConfig(dest,src)
|
|
|
13841
13844
|
if (IFrameSplitOperator.IsNumber(src.Bottom)) dest.Bottom=src.Bottom;
|
|
13842
13845
|
}
|
|
13843
13846
|
|
|
13847
|
+
//兼容老版本
|
|
13848
|
+
function CopyMerginConfig(dest,src) { CopyMarginConfig(dest,src); }
|
|
13849
|
+
|
|
13844
13850
|
|
|
13845
13851
|
function Point()
|
|
13846
13852
|
{
|
|
@@ -53078,6 +53084,9 @@ function ChartCorssCursor()
|
|
|
53078
53084
|
Icon:g_JSChartResource.CorssCursor.RightButton.Icon
|
|
53079
53085
|
};
|
|
53080
53086
|
|
|
53087
|
+
this.RightMargin={ Left:2, Right:2, Top:4, Bottom:3 };
|
|
53088
|
+
CopyMarginConfig(this.RightMargin, g_JSChartResource.CorssCursor.RightMargin);
|
|
53089
|
+
|
|
53081
53090
|
//内部使用
|
|
53082
53091
|
this.Close=null; //收盘价格
|
|
53083
53092
|
this.Status=0; //当前状态 0=隐藏 1=显示
|
|
@@ -53445,6 +53454,7 @@ function ChartCorssCursor()
|
|
|
53445
53454
|
var text=this.StringFormatY.Text;
|
|
53446
53455
|
this.Canvas.font=this.Font;
|
|
53447
53456
|
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
|
|
53457
|
+
var textSize={ Width:textWidth, Height:this.TextHeight, Text:[] };
|
|
53448
53458
|
var buttonData={Y:y, YValue:yValue, FrameID:yValueExtend.FrameID };
|
|
53449
53459
|
if (this.Frame.ChartBorder.Left>=30 && this.ShowTextMode.Left==1)
|
|
53450
53460
|
{
|
|
@@ -53474,38 +53484,37 @@ function ChartCorssCursor()
|
|
|
53474
53484
|
this.Canvas.fillText(text,left+2,y,textWidth);
|
|
53475
53485
|
}
|
|
53476
53486
|
|
|
53487
|
+
var complexText=
|
|
53488
|
+
{
|
|
53489
|
+
ShowType:0, //0=单行(默认) 1=多行
|
|
53490
|
+
Font:this.Font, Color:this.TextColor,
|
|
53491
|
+
Text:[ { Text:text, Margin:this.RightMargin } ],
|
|
53492
|
+
};
|
|
53493
|
+
|
|
53494
|
+
var yTop=y-this.TextHeight/2;
|
|
53495
|
+
|
|
53477
53496
|
if (this.StringFormatY.PercentageText)
|
|
53478
53497
|
{
|
|
53479
53498
|
if (this.TextFormat.Right==0)
|
|
53480
53499
|
{
|
|
53481
53500
|
text=this.StringFormatY.PercentageText+'%';
|
|
53482
|
-
|
|
53501
|
+
complexText.Text[0].Text=text;
|
|
53483
53502
|
}
|
|
53484
53503
|
}
|
|
53485
53504
|
|
|
53486
53505
|
if (this.StringFormatY.RText)
|
|
53487
53506
|
{
|
|
53488
53507
|
text=this.StringFormatY.RText;
|
|
53489
|
-
|
|
53508
|
+
complexText.Text[0].Text=text;
|
|
53490
53509
|
}
|
|
53491
53510
|
|
|
53492
|
-
var complexText=null;
|
|
53493
53511
|
if (this.StringFormatY.RComplexText && IFrameSplitOperator.IsNonEmptyArray(this.StringFormatY.RComplexText.Text))
|
|
53494
53512
|
{
|
|
53495
|
-
var textWidth=0;
|
|
53496
53513
|
complexText=this.StringFormatY.RComplexText;
|
|
53497
|
-
for(var i=0; i<complexText.Text.length; ++i)
|
|
53498
|
-
{
|
|
53499
|
-
var item=complexText.Text[i];
|
|
53500
|
-
var itemWidth=this.Canvas.measureText(item.Text).width+4; //前后各空2个像素
|
|
53501
|
-
|
|
53502
|
-
if (i>0 && IFrameSplitOperator.IsNumber(complexText.Space))
|
|
53503
|
-
textWidth+=complexText.Space;
|
|
53504
|
-
|
|
53505
|
-
textWidth+=itemWidth;
|
|
53506
|
-
}
|
|
53507
53514
|
}
|
|
53508
53515
|
|
|
53516
|
+
this.CalculateComplexTextSize(complexText, textSize);
|
|
53517
|
+
|
|
53509
53518
|
if (this.Frame.ChartBorder.Right>=30 && this.ShowTextMode.Right==1)
|
|
53510
53519
|
{
|
|
53511
53520
|
var isOverlayIndex=false; //是否有叠加子坐标
|
|
@@ -53514,66 +53523,52 @@ function ChartCorssCursor()
|
|
|
53514
53523
|
{
|
|
53515
53524
|
var frame=this.Frame.SubFrame[yValueExtend.FrameID];
|
|
53516
53525
|
isOverlayIndex=frame.OverlayIndex.length>0;
|
|
53517
|
-
overlayIndexInterval=
|
|
53526
|
+
overlayIndexInterval=null
|
|
53527
|
+
if (isOverlayIndex)
|
|
53528
|
+
{
|
|
53529
|
+
for(var i=0;i<=frame.OverlayIndex.length;++i)
|
|
53530
|
+
{
|
|
53531
|
+
var item=frame.OverlayIndex[i];
|
|
53532
|
+
if (item.Frame.IsShow===false) continue;
|
|
53533
|
+
if (!item.Frame.GetXHorizontal) continue;
|
|
53534
|
+
|
|
53535
|
+
var overlayLeft=item.Frame.GetXHorizontal();
|
|
53536
|
+
overlayIndexInterval=overlayLeft-right;
|
|
53537
|
+
break;
|
|
53538
|
+
}
|
|
53539
|
+
}
|
|
53518
53540
|
}
|
|
53519
53541
|
|
|
53520
|
-
|
|
53542
|
+
//叠加坐标
|
|
53543
|
+
if (isOverlayIndex && textSize.Width>overlayIndexInterval && overlayIndexInterval>0) //大于子坐标宽度
|
|
53521
53544
|
{
|
|
53522
53545
|
var drawRight=right+overlayIndexInterval;
|
|
53523
53546
|
if (drawRight>chartRight) drawRight=chartRight;
|
|
53524
53547
|
|
|
53525
|
-
var itemLeft=drawRight-2-
|
|
53526
|
-
this.DrawTextBGRect(itemLeft,
|
|
53527
|
-
|
|
53528
|
-
|
|
53529
|
-
|
|
53530
|
-
}
|
|
53531
|
-
else
|
|
53532
|
-
{
|
|
53533
|
-
this.Canvas.textAlign="right";
|
|
53534
|
-
this.Canvas.textBaseline="middle";
|
|
53535
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
53536
|
-
this.Canvas.fillText(text,drawRight-4,y,textWidth);
|
|
53537
|
-
}
|
|
53548
|
+
var itemLeft=drawRight-2-textSize.Width;
|
|
53549
|
+
this.DrawTextBGRect(itemLeft,yTop,textSize.Width,textSize.Height);
|
|
53550
|
+
this.DrawComplexTextV2(itemLeft, yTop, complexText, textSize);
|
|
53551
|
+
|
|
53552
|
+
if (this.RightButton.Enable) this.DrawRightButton(yTop, itemLeft,this.TextHeight,this.TextHeight,buttonData);
|
|
53538
53553
|
}
|
|
53539
|
-
else if (rightWidth<
|
|
53554
|
+
else if (rightWidth<textSize.Width) //右边空白显示不下,
|
|
53540
53555
|
{
|
|
53541
|
-
var itemLeft=chartRight-2-
|
|
53542
|
-
this.DrawTextBGRect(itemLeft,
|
|
53543
|
-
|
|
53544
|
-
|
|
53545
|
-
|
|
53546
|
-
}
|
|
53547
|
-
else
|
|
53548
|
-
{
|
|
53549
|
-
this.Canvas.textAlign="right";
|
|
53550
|
-
this.Canvas.textBaseline="middle";
|
|
53551
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
53552
|
-
this.Canvas.fillText(text,chartRight-4,y,textWidth);
|
|
53553
|
-
}
|
|
53554
|
-
|
|
53555
|
-
if (this.RightButton.Enable) this.DrawRightButton(y-this.TextHeight/2, chartRight-2-textWidth,this.TextHeight,this.TextHeight,buttonData);
|
|
53556
|
+
var itemLeft=chartRight-2-textSize.Width;
|
|
53557
|
+
this.DrawTextBGRect(itemLeft,yTop,textSize.Width,textSize.Height);
|
|
53558
|
+
this.DrawComplexTextV2(itemLeft, yTop ,complexText, textSize);
|
|
53559
|
+
|
|
53560
|
+
if (this.RightButton.Enable) this.DrawRightButton(yTop, chartRight-2-textSize.Width,this.TextHeight,this.TextHeight,buttonData);
|
|
53556
53561
|
}
|
|
53557
53562
|
else
|
|
53558
53563
|
{
|
|
53559
53564
|
var itemLeft=right+2;
|
|
53560
|
-
this.DrawTextBGRect(itemLeft,
|
|
53561
|
-
|
|
53562
|
-
if (complexText)
|
|
53563
|
-
{
|
|
53564
|
-
this.DrawComplexText(itemLeft,y,complexText);
|
|
53565
|
-
}
|
|
53566
|
-
else
|
|
53567
|
-
{
|
|
53568
|
-
this.Canvas.textAlign="left";
|
|
53569
|
-
this.Canvas.textBaseline="middle";
|
|
53570
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
53571
|
-
this.Canvas.fillText(text,right+4,y,textWidth);
|
|
53572
|
-
}
|
|
53565
|
+
this.DrawTextBGRect(itemLeft,yTop,textSize.Width,textSize.Height);
|
|
53566
|
+
this.DrawComplexTextV2(itemLeft,yTop,complexText,textSize);
|
|
53573
53567
|
|
|
53574
|
-
if (this.RightButton.Enable) this.DrawRightButton(
|
|
53568
|
+
if (this.RightButton.Enable) this.DrawRightButton(yTop, right+2,this.TextHeight,this.TextHeight,buttonData);
|
|
53575
53569
|
}
|
|
53576
53570
|
|
|
53571
|
+
/*
|
|
53577
53572
|
if (this.StringFormatY.RExtendText && this.StringFormatY.RExtendText.length>0)
|
|
53578
53573
|
{
|
|
53579
53574
|
var yOffset=0;
|
|
@@ -53605,26 +53600,16 @@ function ChartCorssCursor()
|
|
|
53605
53600
|
yOffset+=this.TextHeight;
|
|
53606
53601
|
}
|
|
53607
53602
|
}
|
|
53603
|
+
*/
|
|
53608
53604
|
}
|
|
53609
53605
|
else if (this.ShowTextMode.Right==2)
|
|
53610
53606
|
{
|
|
53611
53607
|
this.Canvas.fillStyle=this.TextBGColor;
|
|
53612
|
-
var showLeft=right-
|
|
53613
|
-
this.DrawTextBGRect(showLeft,
|
|
53614
|
-
|
|
53615
|
-
if (complexText)
|
|
53616
|
-
{
|
|
53617
|
-
this.DrawComplexText(showLeft,y,complexText);
|
|
53618
|
-
}
|
|
53619
|
-
else
|
|
53620
|
-
{
|
|
53621
|
-
this.Canvas.textAlign="left";
|
|
53622
|
-
this.Canvas.textBaseline="middle";
|
|
53623
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
53624
|
-
this.Canvas.fillText(text,showLeft+2,y,textWidth);
|
|
53625
|
-
}
|
|
53608
|
+
var showLeft=right-textSize.Width;
|
|
53609
|
+
this.DrawTextBGRect(showLeft,yTop,textSize.Width,textSize.Height);
|
|
53610
|
+
this.DrawComplexTextV2(showLeft,yTop,complexText,textSize);
|
|
53626
53611
|
|
|
53627
|
-
if (this.RightButton.Enable) this.DrawRightButton(
|
|
53612
|
+
if (this.RightButton.Enable) this.DrawRightButton(yTop, showLeft,this.TextHeight,this.TextHeight,buttonData);
|
|
53628
53613
|
}
|
|
53629
53614
|
}
|
|
53630
53615
|
|
|
@@ -53744,6 +53729,137 @@ function ChartCorssCursor()
|
|
|
53744
53729
|
}
|
|
53745
53730
|
}
|
|
53746
53731
|
|
|
53732
|
+
this.DrawComplexTextV2=function(left, yTop, complexText, size)
|
|
53733
|
+
{
|
|
53734
|
+
this.Canvas.textAlign="left";
|
|
53735
|
+
this.Canvas.textBaseline="bottom";
|
|
53736
|
+
var showType=0;
|
|
53737
|
+
if (complexText.ShowType==1) showType=complexText.ShowType;
|
|
53738
|
+
if (showType==1) //多行
|
|
53739
|
+
{
|
|
53740
|
+
var xLeft=left;
|
|
53741
|
+
var yText=yTop; //顶
|
|
53742
|
+
for(var i=0; i<complexText.Text.length; ++i)
|
|
53743
|
+
{
|
|
53744
|
+
var item=complexText.Text[i];
|
|
53745
|
+
var itemSize=size.Text[i];
|
|
53746
|
+
|
|
53747
|
+
if (item.Font) this.Canvas.font=item.Font;
|
|
53748
|
+
else this.Canvas.font=complexText.Font;
|
|
53749
|
+
|
|
53750
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
53751
|
+
else this.Canvas.fillStyle=complexText.Color;
|
|
53752
|
+
|
|
53753
|
+
var y=yText+itemSize.Height;
|
|
53754
|
+
var x=xLeft;
|
|
53755
|
+
if (item.Margin)
|
|
53756
|
+
{
|
|
53757
|
+
var margin=item.Margin;
|
|
53758
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) y-=margin.Bottom;
|
|
53759
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) x+=margin.Left;
|
|
53760
|
+
}
|
|
53761
|
+
|
|
53762
|
+
this.Canvas.fillText(item.Text,x,y,itemSize.Width);
|
|
53763
|
+
|
|
53764
|
+
yText+=itemSize.Height;
|
|
53765
|
+
}
|
|
53766
|
+
}
|
|
53767
|
+
else //水平 单行
|
|
53768
|
+
{
|
|
53769
|
+
var xText=left;
|
|
53770
|
+
var yBottom=yTop+size.Height;
|
|
53771
|
+
for(var i=0; i<complexText.Text.length; ++i)
|
|
53772
|
+
{
|
|
53773
|
+
var item=complexText.Text[i];
|
|
53774
|
+
var itemSize=size.Text[i];
|
|
53775
|
+
|
|
53776
|
+
if (item.Font) this.Canvas.font=item.Font;
|
|
53777
|
+
else this.Canvas.font=complexText.Font;
|
|
53778
|
+
|
|
53779
|
+
if (item.Color) this.Canvas.fillStyle=item.Color;
|
|
53780
|
+
else this.Canvas.fillStyle=complexText.Color;
|
|
53781
|
+
|
|
53782
|
+
var y=yBottom;
|
|
53783
|
+
var x=xText;
|
|
53784
|
+
if (item.Margin)
|
|
53785
|
+
{
|
|
53786
|
+
var margin=item.Margin;
|
|
53787
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) y-=margin.Bottom;
|
|
53788
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) x+=margin.Left;
|
|
53789
|
+
}
|
|
53790
|
+
|
|
53791
|
+
this.Canvas.fillText(item.Text,x,y,itemSize.Width);
|
|
53792
|
+
|
|
53793
|
+
xText+=itemSize.Width;
|
|
53794
|
+
}
|
|
53795
|
+
}
|
|
53796
|
+
}
|
|
53797
|
+
|
|
53798
|
+
this.CalculateComplexTextSize=function(complexText, size)
|
|
53799
|
+
{
|
|
53800
|
+
if (!complexText || !IFrameSplitOperator.IsNonEmptyArray(complexText.Text)) return;
|
|
53801
|
+
|
|
53802
|
+
var showType=0;
|
|
53803
|
+
if (complexText.ShowType==1) showType=complexText.ShowType;
|
|
53804
|
+
if (showType==1) //多行
|
|
53805
|
+
{
|
|
53806
|
+
var textWidth=0, textHeight=0;
|
|
53807
|
+
for(var i=0; i<complexText.Text.length; ++i)
|
|
53808
|
+
{
|
|
53809
|
+
var item=complexText.Text[i];
|
|
53810
|
+
if (item.Font) this.Canvas.font=item.Font;
|
|
53811
|
+
else this.Canvas.font=complexText.Font;
|
|
53812
|
+
var itemWidth=this.Canvas.measureText(item.Text).width; //前后各空2个像素
|
|
53813
|
+
var itemHeight=this.Canvas.measureText("擎").width;
|
|
53814
|
+
if (item.Margin)
|
|
53815
|
+
{
|
|
53816
|
+
var margin=item.Margin;
|
|
53817
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) itemWidth+=margin.Left;
|
|
53818
|
+
if (IFrameSplitOperator.IsNumber(margin.Right)) itemWidth+=margin.Right;
|
|
53819
|
+
if (IFrameSplitOperator.IsNumber(margin.Top)) itemHeight+=margin.Top;
|
|
53820
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) itemHeight+=margin.Bottom;
|
|
53821
|
+
}
|
|
53822
|
+
|
|
53823
|
+
size.Text[i]={ Width:itemWidth, Height:itemHeight }; //保存所有文字的大小信息
|
|
53824
|
+
|
|
53825
|
+
if (textWidth<itemWidth) textWidth=itemWidth;
|
|
53826
|
+
textHeight+=itemHeight;
|
|
53827
|
+
}
|
|
53828
|
+
|
|
53829
|
+
size.Width=textWidth;
|
|
53830
|
+
size.Height=textHeight;
|
|
53831
|
+
}
|
|
53832
|
+
else //水平 单行
|
|
53833
|
+
{
|
|
53834
|
+
var textWidth=0, textHeight=0;
|
|
53835
|
+
for(var i=0; i<complexText.Text.length; ++i)
|
|
53836
|
+
{
|
|
53837
|
+
var item=complexText.Text[i];
|
|
53838
|
+
if (item.Font) this.Canvas.font=item.Font;
|
|
53839
|
+
else this.Canvas.font=complexText.Font;
|
|
53840
|
+
|
|
53841
|
+
var itemWidth=this.Canvas.measureText(item.Text).width; //前后各空2个像素
|
|
53842
|
+
var itemHeight=this.Canvas.measureText("擎").width;
|
|
53843
|
+
if (item.Margin)
|
|
53844
|
+
{
|
|
53845
|
+
var margin=item.Margin;
|
|
53846
|
+
if (IFrameSplitOperator.IsNumber(margin.Left)) itemWidth+=margin.Left;
|
|
53847
|
+
if (IFrameSplitOperator.IsNumber(margin.Right)) itemWidth+=margin.Right;
|
|
53848
|
+
if (IFrameSplitOperator.IsNumber(margin.Top)) itemHeight+=margin.Top;
|
|
53849
|
+
if (IFrameSplitOperator.IsNumber(margin.Bottom)) itemHeight+=margin.Bottom;
|
|
53850
|
+
}
|
|
53851
|
+
|
|
53852
|
+
size.Text[i]={ Width:itemWidth, Height:itemHeight }; //保存所有文字的大小信息
|
|
53853
|
+
|
|
53854
|
+
textWidth+=itemWidth;
|
|
53855
|
+
if (textHeight<itemHeight) textHeight=itemHeight;
|
|
53856
|
+
}
|
|
53857
|
+
|
|
53858
|
+
size.Width=textWidth;
|
|
53859
|
+
size.Height=textHeight;
|
|
53860
|
+
}
|
|
53861
|
+
}
|
|
53862
|
+
|
|
53747
53863
|
this.DrawRightButton=function(drawTop, drawRight, drawWidth, drawHeight, data)
|
|
53748
53864
|
{
|
|
53749
53865
|
this.Canvas.fillStyle=this.RightButton.BGColor;
|
|
@@ -65547,7 +65663,7 @@ function ChartDrawMonitorLine()
|
|
|
65547
65663
|
if (item.LineDash) dest.LineDash=item.LineDash;
|
|
65548
65664
|
if (IFrameSplitOperator.IsNumber(item.LineSpace)) dest.LineSpace=item.LineSpace;
|
|
65549
65665
|
if (IFrameSplitOperator.IsNumber(item.TextAlign)) dest.TextAlign=item.TextAlign;
|
|
65550
|
-
if (item.Mergin)
|
|
65666
|
+
if (item.Mergin) CopyMarginConfig(dest.Mergin, item.Mergin);
|
|
65551
65667
|
}
|
|
65552
65668
|
|
|
65553
65669
|
if (option.FormatLabelTextCallback) this.FormatLabelTextCallback=option.FormatLabelTextCallback;
|
|
@@ -69548,7 +69664,7 @@ function ChartInfoLine()
|
|
|
69548
69664
|
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
69549
69665
|
if (IFrameSplitOperator.IsNumber(item.LineSpace)) dest.LineSpace=item.LineSpace;
|
|
69550
69666
|
if (IFrameSplitOperator.IsNumber(item.TextAlign)) dest.TextAlign=item.TextAlign;
|
|
69551
|
-
if (item.Mergin)
|
|
69667
|
+
if (item.Mergin) CopyMarginConfig(dest.Mergin, item.Mergin);
|
|
69552
69668
|
}
|
|
69553
69669
|
|
|
69554
69670
|
if (option.FormatLabelTextCallback) this.FormatLabelTextCallback=option.FormatLabelTextCallback;
|
|
@@ -70208,7 +70324,9 @@ function JSChartResource()
|
|
|
70208
70324
|
BGColor:'rgb(43,54,69)',
|
|
70209
70325
|
PenColor:'rgb(255,255,255)',
|
|
70210
70326
|
Icon: { Text:'\ue6a3', Color:'rgb(255,255,255)', Family:"iconfont", Size:18 }
|
|
70211
|
-
}
|
|
70327
|
+
},
|
|
70328
|
+
|
|
70329
|
+
RightMargin: { Left:2, Right:2, Top:5, Bottom:3 }
|
|
70212
70330
|
};
|
|
70213
70331
|
|
|
70214
70332
|
this.LockBGColor = "rgb(220, 220, 220)"; //指标锁区域颜色
|
|
@@ -125132,6 +125250,8 @@ function JSReportChart(divElement)
|
|
|
125132
125250
|
this.JSChartContainer=chart;
|
|
125133
125251
|
this.DivElement.JSChart=this; //div中保存一份
|
|
125134
125252
|
|
|
125253
|
+
if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
|
|
125254
|
+
|
|
125135
125255
|
if (option.Symbol) chart.Symbol=option.Symbol;
|
|
125136
125256
|
if (option.Name) chart.Name=option.Name;
|
|
125137
125257
|
|
|
@@ -125414,6 +125534,9 @@ function JSReportChartContainer(uielement)
|
|
|
125414
125534
|
|
|
125415
125535
|
this.IsDestroy=false; //是否已经销毁了
|
|
125416
125536
|
|
|
125537
|
+
this.JSPopMenu; //内置菜单
|
|
125538
|
+
this.IsShowRightMenu=true;
|
|
125539
|
+
|
|
125417
125540
|
this.ChartDestory=function() //销毁
|
|
125418
125541
|
{
|
|
125419
125542
|
this.IsDestroy=true;
|
|
@@ -125431,6 +125554,14 @@ function JSReportChartContainer(uielement)
|
|
|
125431
125554
|
}
|
|
125432
125555
|
}
|
|
125433
125556
|
|
|
125557
|
+
this.InitalPopMenu=function() //初始化弹出窗口
|
|
125558
|
+
{
|
|
125559
|
+
if (this.JSPopMenu) return;
|
|
125560
|
+
|
|
125561
|
+
this.JSPopMenu=new JSPopMenu(); //内置菜单
|
|
125562
|
+
this.JSPopMenu.Inital();
|
|
125563
|
+
}
|
|
125564
|
+
|
|
125434
125565
|
this.AutoScrollPage=function(step)
|
|
125435
125566
|
{
|
|
125436
125567
|
this.AutoDragScrollTimer=setTimeout(() =>
|
|
@@ -126628,6 +126759,18 @@ function JSReportChartContainer(uielement)
|
|
|
126628
126759
|
|
|
126629
126760
|
//去掉右键菜单
|
|
126630
126761
|
this.UIOnContextMenu=function(e)
|
|
126762
|
+
{
|
|
126763
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
126764
|
+
|
|
126765
|
+
if (!this.IsShowRightMenu) return;
|
|
126766
|
+
|
|
126767
|
+
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
126768
|
+
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
126769
|
+
|
|
126770
|
+
if(typeof(this.OnRightMenu)=='function') this.OnRightMenu(x,y,e); //右键菜单事件
|
|
126771
|
+
}
|
|
126772
|
+
|
|
126773
|
+
this.OnRightMenu=function(x,y,e)
|
|
126631
126774
|
{
|
|
126632
126775
|
e.preventDefault();
|
|
126633
126776
|
}
|
|
@@ -127753,6 +127896,52 @@ function JSReportChartContainer(uielement)
|
|
|
127753
127896
|
}
|
|
127754
127897
|
}
|
|
127755
127898
|
|
|
127899
|
+
this.GetTabPopMenu=function(tabItem)
|
|
127900
|
+
{
|
|
127901
|
+
var aryMenu=[ ];
|
|
127902
|
+
|
|
127903
|
+
if (IFrameSplitOperator.IsNonEmptyArray(tabItem.ArySubMenu))
|
|
127904
|
+
{
|
|
127905
|
+
for(var i=0;i<tabItem.ArySubMenu.length;++i)
|
|
127906
|
+
{
|
|
127907
|
+
var item=tabItem.ArySubMenu[i];
|
|
127908
|
+
var menuItem={ Name:item.Title, Data:{ ID:item.CommandID, Args:[item.ID]} };
|
|
127909
|
+
|
|
127910
|
+
aryMenu.push(menuItem);
|
|
127911
|
+
}
|
|
127912
|
+
}
|
|
127913
|
+
|
|
127914
|
+
|
|
127915
|
+
return aryMenu;
|
|
127916
|
+
}
|
|
127917
|
+
|
|
127918
|
+
this.PopupTabMenu=function(menuData, tab, e)
|
|
127919
|
+
{
|
|
127920
|
+
if (!this.JSPopMenu) return;
|
|
127921
|
+
|
|
127922
|
+
var rtTab=tab.Rect;
|
|
127923
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
127924
|
+
var rtCell={ Left:rtTab.Left/pixelRatio, Right:rtTab.Right/pixelRatio, Bottom:rtTab.Bottom/pixelRatio, Top:rtTab.Top/pixelRatio };
|
|
127925
|
+
rtCell.Width=rtCell.Right-rtCell.Left;
|
|
127926
|
+
rtCell.Height=rtCell.Bottom-rtCell.Top;
|
|
127927
|
+
|
|
127928
|
+
var rtClient=this.UIElement.getBoundingClientRect();
|
|
127929
|
+
var rtScroll=GetScrollPosition();
|
|
127930
|
+
|
|
127931
|
+
var offsetLeft=rtClient.left+rtScroll.Left;
|
|
127932
|
+
var offsetTop=rtClient.top+rtScroll.Top;
|
|
127933
|
+
rtCell.Left+=offsetLeft;
|
|
127934
|
+
rtCell.Right+=offsetLeft;
|
|
127935
|
+
rtCell.Top+=offsetTop;
|
|
127936
|
+
rtCell.Bottom+=offsetTop;
|
|
127937
|
+
|
|
127938
|
+
this.JSPopMenu.CreatePopMenu(menuData);
|
|
127939
|
+
this.JSPopMenu.PopupMenuByTab(rtCell);
|
|
127940
|
+
|
|
127941
|
+
if(e.preventDefault) e.preventDefault();
|
|
127942
|
+
if(e.stopPropagation) e.stopPropagation();
|
|
127943
|
+
}
|
|
127944
|
+
|
|
127756
127945
|
//点击标签
|
|
127757
127946
|
this.OnClickTab=function(tabData, e)
|
|
127758
127947
|
{
|
|
@@ -127766,36 +127955,80 @@ function JSReportChartContainer(uielement)
|
|
|
127766
127955
|
|
|
127767
127956
|
if (tabData.Tab.IsMenu)
|
|
127768
127957
|
{
|
|
127958
|
+
var menuData={ Menu:this.GetTabPopMenu(tabData.Tab), Position:JSPopMenu.POSITION_ID.TAB_MENU_ID };
|
|
127959
|
+
menuData.ClickCallback=(data)=>{ this.OnClickTabPopMenu(tabData, data); }
|
|
127960
|
+
|
|
127769
127961
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_REPORT_TABMENU);
|
|
127770
127962
|
if (event && event.Callback)
|
|
127771
127963
|
{
|
|
127772
|
-
|
|
127773
|
-
var rtItem=tabData.Rect;
|
|
127774
|
-
var rtDOM={ Left: rtItem.Left/pixelTatio, Right:rtItem.Right/pixelTatio, Top:rtItem.Top/pixelTatio, Bottom:rtItem.Bottom/pixelTatio };
|
|
127775
|
-
|
|
127776
|
-
var sendData={ Data:tabData, IsSide:{X:x, Y:x}, UIElement:uiElement, Rect:rtDOM, e:e , Redraw:redraw };
|
|
127964
|
+
var sendData={ MenuData:menuData, Tab:tabData, PreventDefault:false, e:e };
|
|
127777
127965
|
event.Callback(event, sendData, this);
|
|
127778
|
-
if (
|
|
127966
|
+
if (sendData.PreventDefault==true) return;
|
|
127779
127967
|
}
|
|
127780
127968
|
|
|
127781
|
-
this.
|
|
127969
|
+
this.PopupTabMenu(menuData, tabData.Tab, e);
|
|
127782
127970
|
}
|
|
127783
127971
|
else
|
|
127784
127972
|
{
|
|
127785
127973
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_REPORT_TAB);
|
|
127786
127974
|
if (event && event.Callback)
|
|
127787
127975
|
{
|
|
127788
|
-
var sendData={ Data:tabData, IsSide:{X:x, Y:x}, UIElement:uiElement, e:e , Redraw:redraw };
|
|
127976
|
+
var sendData={ Data:tabData, IsSide:{X:x, Y:x}, UIElement:uiElement, e:e , Redraw:redraw, PreventDefault:false };
|
|
127789
127977
|
event.Callback(event, sendData, this);
|
|
127790
127978
|
if (IFrameSplitOperator.IsBool(sendData.Redraw)) redraw=sendData.Redraw;
|
|
127979
|
+
if (sendData.PreventDefault==true) return;
|
|
127791
127980
|
}
|
|
127792
127981
|
|
|
127793
|
-
|
|
127982
|
+
if (tabData.Tab.CommandID==JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID)
|
|
127983
|
+
{
|
|
127984
|
+
this.ExecuteMenuCommand(tabData.Tab.CommandID, [tabData.Tab.ID]);
|
|
127985
|
+
this.SetSelectedTab(tabData.Index);
|
|
127986
|
+
}
|
|
127794
127987
|
}
|
|
127795
127988
|
|
|
127796
127989
|
if (redraw) this.Draw();
|
|
127797
127990
|
}
|
|
127798
127991
|
|
|
127992
|
+
this.OnClickTabPopMenu=function(tabData, data)
|
|
127993
|
+
{
|
|
127994
|
+
JSConsole.Chart.Log('[JSReportChartContainer::OnClickTabPopMenu] ',tabData, data);
|
|
127995
|
+
|
|
127996
|
+
var cmdID=data.Data.ID; //命令ID
|
|
127997
|
+
var aryArgs=data.Data.Args; //参数
|
|
127998
|
+
|
|
127999
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MENU_COMMAND); //回调通知外部
|
|
128000
|
+
if (event && event.Callback)
|
|
128001
|
+
{
|
|
128002
|
+
var data={ PreventDefault:false, CommandID:cmdID, Args:aryArgs, SrcData:data, TabData:tabData };
|
|
128003
|
+
event.Callback(event,data,this);
|
|
128004
|
+
if (data.PreventDefault) return;
|
|
128005
|
+
}
|
|
128006
|
+
|
|
128007
|
+
this.ExecuteMenuCommand(cmdID,aryArgs);
|
|
128008
|
+
|
|
128009
|
+
this.SetSelectedTab(tabData.Index);
|
|
128010
|
+
this.Draw();
|
|
128011
|
+
}
|
|
128012
|
+
|
|
128013
|
+
this.ExecuteMenuCommand=function(cmdID, aryArgs)
|
|
128014
|
+
{
|
|
128015
|
+
JSConsole.Chart.Log('[JSReportChartContainer::ExecuteMenuCommand] cmdID=, aryArgs=', cmdID,aryArgs);
|
|
128016
|
+
|
|
128017
|
+
var param=null, srcParam=null; //原始值
|
|
128018
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs))
|
|
128019
|
+
{
|
|
128020
|
+
srcParam=aryArgs[0];
|
|
128021
|
+
if (IFrameSplitOperator.IsNumber(aryArgs[0])) param=aryArgs[0];
|
|
128022
|
+
}
|
|
128023
|
+
|
|
128024
|
+
switch(cmdID)
|
|
128025
|
+
{
|
|
128026
|
+
case JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID:
|
|
128027
|
+
if (srcParam) this.ChangeSymbol(param);
|
|
128028
|
+
break;
|
|
128029
|
+
}
|
|
128030
|
+
}
|
|
128031
|
+
|
|
127799
128032
|
this.SwapColumn=function(leftIndex, rightIndex, option)
|
|
127800
128033
|
{
|
|
127801
128034
|
var reportChart=this.GetReportChart();
|
|
@@ -128711,6 +128944,14 @@ function ChartReport()
|
|
|
128711
128944
|
return null;
|
|
128712
128945
|
}
|
|
128713
128946
|
|
|
128947
|
+
this.ClipClient=function()
|
|
128948
|
+
{
|
|
128949
|
+
this.Canvas.save();
|
|
128950
|
+
this.Canvas.beginPath();
|
|
128951
|
+
this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,(this.RectClient.Right-this.RectClient.Left),(this.RectClient.Bottom-this.RectClient.Top));
|
|
128952
|
+
//this.Canvas.stroke(); //调试用
|
|
128953
|
+
this.Canvas.clip();
|
|
128954
|
+
}
|
|
128714
128955
|
|
|
128715
128956
|
this.Draw=function()
|
|
128716
128957
|
{
|
|
@@ -128722,12 +128963,7 @@ function ChartReport()
|
|
|
128722
128963
|
if (this.SizeChange) this.CalculateSize();
|
|
128723
128964
|
else this.UpdateCacheData();
|
|
128724
128965
|
|
|
128725
|
-
this.
|
|
128726
|
-
|
|
128727
|
-
this.Canvas.beginPath();
|
|
128728
|
-
this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,(this.RectClient.Right-this.RectClient.Left),(this.RectClient.Bottom-this.RectClient.Top));
|
|
128729
|
-
//this.Canvas.stroke(); //调试用
|
|
128730
|
-
this.Canvas.clip();
|
|
128966
|
+
this.ClipClient();
|
|
128731
128967
|
|
|
128732
128968
|
this.DrawHeader();
|
|
128733
128969
|
this.DrawBody();
|
|
@@ -128740,7 +128976,9 @@ function ChartReport()
|
|
|
128740
128976
|
this.Tab.DrawScrollbar(this.RectClient.Left,bottom-this.BottomToolbarHeight, this.RectClient.Right, bottom);
|
|
128741
128977
|
}
|
|
128742
128978
|
|
|
128979
|
+
this.ClipClient();
|
|
128743
128980
|
this.DrawBorder();
|
|
128981
|
+
this.Canvas.restore();
|
|
128744
128982
|
|
|
128745
128983
|
this.DrawDragRow();
|
|
128746
128984
|
|
|
@@ -130871,7 +131109,7 @@ function ChartReportTab()
|
|
|
130871
131109
|
this.IsShow=true; //是否显示
|
|
130872
131110
|
|
|
130873
131111
|
//Tab
|
|
130874
|
-
this.TabList=[]; //{ Title:标题, ID:, IsMenu:
|
|
131112
|
+
this.TabList=[]; //{ Title:标题, ID:, IsMenu: 是否菜单, ArySubMenu:[ { Title:, ID: }] }
|
|
130875
131113
|
this.SelectedTabIndex=-1;
|
|
130876
131114
|
this.MoveOnTabIndex=-1;
|
|
130877
131115
|
|
|
@@ -130940,7 +131178,7 @@ function ChartReportTab()
|
|
|
130940
131178
|
|
|
130941
131179
|
var tabItem={ Title:item.Title, IsMenu:false, FixedSymbol:[], FixedRowCount:0 };
|
|
130942
131180
|
if (item.ID) tabItem.ID=item.ID;
|
|
130943
|
-
if (item.
|
|
131181
|
+
if (item.CommandID) tabItem.CommandID=item.CommandID;
|
|
130944
131182
|
if (IFrameSplitOperator.IsBool(item.IsMenu)) tabItem.IsMenu=item.IsMenu;
|
|
130945
131183
|
if (IFrameSplitOperator.IsNonEmptyArray(item.FixedSymbol))
|
|
130946
131184
|
{
|
|
@@ -130952,6 +131190,10 @@ function ChartReportTab()
|
|
|
130952
131190
|
++tabItem.FixedRowCount;
|
|
130953
131191
|
}
|
|
130954
131192
|
}
|
|
131193
|
+
|
|
131194
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.ArySubMenu))
|
|
131195
|
+
tabItem.ArySubMenu=item.ArySubMenu.slice();
|
|
131196
|
+
|
|
130955
131197
|
this.TabList.push(tabItem);
|
|
130956
131198
|
}
|
|
130957
131199
|
}
|
|
@@ -138358,7 +138600,7 @@ function HQChartScriptWorker()
|
|
|
138358
138600
|
|
|
138359
138601
|
|
|
138360
138602
|
|
|
138361
|
-
var HQCHART_VERSION="1.1.
|
|
138603
|
+
var HQCHART_VERSION="1.1.13501";
|
|
138362
138604
|
|
|
138363
138605
|
function PrintHQChartVersion()
|
|
138364
138606
|
{
|