hqchart 1.1.13057 → 1.1.13062
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 +2 -2
- package/lib/umychart.vue.js +29 -13
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +37 -0
- package/src/jscommon/umychart.js +213 -14
- package/src/jscommon/umychart.style.js +10 -0
- package/src/jscommon/umychart.testdata.js +37 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +224 -15
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +37 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +224 -15
|
@@ -6735,7 +6735,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6735
6735
|
{
|
|
6736
6736
|
IsValueFullRange:false ,
|
|
6737
6737
|
IsDisplayLatest:false,
|
|
6738
|
-
SelectedBorder:{ Mode:0, SelFrame:0 }
|
|
6738
|
+
SelectedBorder:{ Mode:0, SelFrame:0 }, //边框选中模式 Mode:0=禁用 1=右侧标记选中 2=指标窗口标记选中
|
|
6739
|
+
SelectedXBorder: { Mode:0, Date:null } //X边框选中模式 Mode:0=禁用 分时图图有效
|
|
6739
6740
|
//XDateFormat (多日分时图x轴底部日期格式)
|
|
6740
6741
|
};
|
|
6741
6742
|
|
|
@@ -7188,6 +7189,20 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7188
7189
|
}
|
|
7189
7190
|
}
|
|
7190
7191
|
|
|
7192
|
+
if (this.GlobalOption.SelectedXBorder && this.GlobalOption.SelectedXBorder.Mode>=1)
|
|
7193
|
+
{
|
|
7194
|
+
if (this.PtInMulitDayMinute)
|
|
7195
|
+
{
|
|
7196
|
+
var item=this.GlobalOption.SelectedXBorder;
|
|
7197
|
+
var selectedDate=this.PtInMulitDayMinute(x,y);
|
|
7198
|
+
if (item.Date!=selectedDate)
|
|
7199
|
+
{
|
|
7200
|
+
item.Date=selectedDate
|
|
7201
|
+
bDrawDynamicInfo=true;
|
|
7202
|
+
}
|
|
7203
|
+
}
|
|
7204
|
+
}
|
|
7205
|
+
|
|
7191
7206
|
if (this.TryClickCrossCursor(x,y, e))
|
|
7192
7207
|
{
|
|
7193
7208
|
return;
|
|
@@ -8992,6 +9007,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8992
9007
|
this.DrawSelectedStatus();
|
|
8993
9008
|
|
|
8994
9009
|
this.DrawSelectedBorder();
|
|
9010
|
+
if (this.DrawSelectedXBorder) this.DrawSelectedXBorder();
|
|
8995
9011
|
|
|
8996
9012
|
var moveonPoint=null;
|
|
8997
9013
|
if (this.LastMouseStatus && this.LastMouseStatus.MoveOnPoint) moveonPoint=this.LastMouseStatus.MoveOnPoint;
|
|
@@ -9418,6 +9434,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9418
9434
|
|
|
9419
9435
|
this.DrawSelectedStatus();
|
|
9420
9436
|
this.DrawSelectedBorder();
|
|
9437
|
+
if (this.DrawSelectedXBorder) this.DrawSelectedXBorder();
|
|
9421
9438
|
|
|
9422
9439
|
var moveonPoint=null;
|
|
9423
9440
|
if (this.LastMouseStatus && this.LastMouseStatus.MoveOnPoint) moveonPoint=this.LastMouseStatus.MoveOnPoint;
|
|
@@ -54924,6 +54941,13 @@ function DynamicChartTitlePainting()
|
|
|
54924
54941
|
this.MerginLeft=g_JSChartResource.IndexTitleMerginLeft; //标题输出左边间距
|
|
54925
54942
|
|
|
54926
54943
|
this.Buttons=[]; //按钮
|
|
54944
|
+
|
|
54945
|
+
this.UpDownArrowConfig=
|
|
54946
|
+
{
|
|
54947
|
+
UpColor:g_JSChartResource.IndexTitle.UpDownArrow.UpColor,
|
|
54948
|
+
DownColor:g_JSChartResource.IndexTitle.UpDownArrow.DownColor,
|
|
54949
|
+
UnchangeColor:g_JSChartResource.IndexTitle.UpDownArrow.UnchangeColor
|
|
54950
|
+
};
|
|
54927
54951
|
|
|
54928
54952
|
|
|
54929
54953
|
//动态标题
|
|
@@ -55464,27 +55488,68 @@ function DynamicChartTitlePainting()
|
|
|
55464
55488
|
else text=titleItem.Text;
|
|
55465
55489
|
|
|
55466
55490
|
var space=this.ParamSpace*GetDevicePixelRatio();
|
|
55467
|
-
var
|
|
55468
|
-
|
|
55491
|
+
var indexTextWidth=this.Canvas.measureText(text).width; //标题+数值长度
|
|
55492
|
+
var textWidth=indexTextWidth;
|
|
55493
|
+
|
|
55494
|
+
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
55495
|
+
{
|
|
55496
|
+
var xLeft=left;
|
|
55497
|
+
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
55498
|
+
{
|
|
55499
|
+
var outItem=titleItem.TextEx[n];
|
|
55500
|
+
var outTextWidth=this.Canvas.measureText(outItem.Text).width+2;
|
|
55501
|
+
outItem.Width=outTextWidth;
|
|
55502
|
+
outItem.Left=xLeft;
|
|
55503
|
+
|
|
55504
|
+
textWidth+=outTextWidth;
|
|
55505
|
+
xLeft+=outTextWidth;
|
|
55506
|
+
}
|
|
55507
|
+
}
|
|
55508
|
+
|
|
55509
|
+
if ((left+textWidth+space)>right) break;
|
|
55469
55510
|
|
|
55470
55511
|
if (titleItem.BG) //背景
|
|
55471
55512
|
{
|
|
55472
55513
|
var textHeight=this.Canvas.measureText("擎").width+2;
|
|
55473
|
-
var textWidth=this.Canvas.measureText(text).width+2;
|
|
55474
55514
|
var rtBG={ Left:left, Top:bottom-textHeight/2, Width:textWidth, Height:textHeight };
|
|
55475
55515
|
this.Canvas.fillStyle=titleItem.BG;
|
|
55476
55516
|
this.Canvas.fillRect(rtBG.Left,rtBG.Top-1, rtBG.Width, rtBG.Height);
|
|
55477
55517
|
|
|
55478
55518
|
this.Canvas.fillStyle=titleItem.Color;
|
|
55479
|
-
this.Canvas.fillText(text,rtBG.Left+1,bottom,
|
|
55519
|
+
this.Canvas.fillText(text,rtBG.Left+1,bottom,indexTextWidth);
|
|
55520
|
+
left+=indexTextWidth;
|
|
55480
55521
|
|
|
55481
|
-
|
|
55522
|
+
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
55523
|
+
{
|
|
55524
|
+
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
55525
|
+
{
|
|
55526
|
+
var outItem=titleItem.TextEx[n];
|
|
55527
|
+
this.Canvas.fillStyle=outItem.TextColor;
|
|
55528
|
+
this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
|
|
55529
|
+
left+=outItem.Width;
|
|
55530
|
+
}
|
|
55531
|
+
}
|
|
55532
|
+
|
|
55533
|
+
left+=space;
|
|
55482
55534
|
}
|
|
55483
55535
|
else
|
|
55484
55536
|
{
|
|
55485
55537
|
this.Canvas.fillStyle=titleItem.Color;
|
|
55486
|
-
this.Canvas.fillText(text,left,bottom,
|
|
55487
|
-
left+=
|
|
55538
|
+
this.Canvas.fillText(text,left,bottom,indexTextWidth);
|
|
55539
|
+
left+=indexTextWidth;
|
|
55540
|
+
|
|
55541
|
+
if (IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx))
|
|
55542
|
+
{
|
|
55543
|
+
for(var n=0; n<titleItem.TextEx.length; ++n)
|
|
55544
|
+
{
|
|
55545
|
+
var outItem=titleItem.TextEx[n];
|
|
55546
|
+
this.Canvas.fillStyle=outItem.TextColor;
|
|
55547
|
+
this.Canvas.fillText(outItem.Text,left,bottom,outItem.Width);
|
|
55548
|
+
left+=outItem.Width;
|
|
55549
|
+
}
|
|
55550
|
+
}
|
|
55551
|
+
|
|
55552
|
+
left+=space;
|
|
55488
55553
|
}
|
|
55489
55554
|
}
|
|
55490
55555
|
}
|
|
@@ -55667,7 +55732,7 @@ function DynamicChartTitlePainting()
|
|
|
55667
55732
|
}
|
|
55668
55733
|
}
|
|
55669
55734
|
|
|
55670
|
-
var
|
|
55735
|
+
var arrowSuper=null; //独立颜色
|
|
55671
55736
|
|
|
55672
55737
|
if (this.IsShowUpDownArrow)
|
|
55673
55738
|
{
|
|
@@ -55675,9 +55740,9 @@ function DynamicChartTitlePainting()
|
|
|
55675
55740
|
if (dataIndex-1>=0) preValue=item.Data.Data[dataIndex-1];
|
|
55676
55741
|
if (IFrameSplitOperator.IsNumber(preValue))
|
|
55677
55742
|
{
|
|
55678
|
-
if (preValue>value)
|
|
55679
|
-
else if (preValue<value)
|
|
55680
|
-
else
|
|
55743
|
+
if (preValue>value) arrowSuper={ Text:'↓', TextColor:this.UpDownArrowConfig.DownColor };
|
|
55744
|
+
else if (preValue<value) arrowSuper={ Text:'↑', TextColor:this.UpDownArrowConfig.UpColor};
|
|
55745
|
+
else arrowSuper={ Text:'→', TextColor:this.UpDownArrowConfig.UnchangeColor };
|
|
55681
55746
|
}
|
|
55682
55747
|
}
|
|
55683
55748
|
|
|
@@ -55688,7 +55753,21 @@ function DynamicChartTitlePainting()
|
|
|
55688
55753
|
if (dyValue) valueText=dyValue;
|
|
55689
55754
|
}
|
|
55690
55755
|
|
|
55691
|
-
if (
|
|
55756
|
+
if (arrowSuper)
|
|
55757
|
+
{
|
|
55758
|
+
var outItem={ Name:null, Text:valueText, Color:item.Color, TextEx:[arrowSuper] };
|
|
55759
|
+
if (item.Name)
|
|
55760
|
+
{
|
|
55761
|
+
var text=item.Name;
|
|
55762
|
+
var dyTitle=this.GetDynamicOutName(item.Name); //动态标题
|
|
55763
|
+
if (dyTitle) text=dyTitle;
|
|
55764
|
+
outItem.Name=text;
|
|
55765
|
+
}
|
|
55766
|
+
//outItem.BG='rgb(100,100,100)';
|
|
55767
|
+
|
|
55768
|
+
aryText=[outItem];
|
|
55769
|
+
valueText=null;
|
|
55770
|
+
}
|
|
55692
55771
|
}
|
|
55693
55772
|
}
|
|
55694
55773
|
|
|
@@ -66527,6 +66606,16 @@ function JSChartResource()
|
|
|
66527
66606
|
this.OverlayIndexTitleBGColor='rgba(255,255,255,0.7)';
|
|
66528
66607
|
this.IndexTitleMerginLeft=1; //指标输出左边间距
|
|
66529
66608
|
|
|
66609
|
+
this.IndexTitle=
|
|
66610
|
+
{
|
|
66611
|
+
UpDownArrow: //数值涨跌箭头
|
|
66612
|
+
{
|
|
66613
|
+
UpColor:"rgb(238,21,21)", //上涨
|
|
66614
|
+
DownColor:"rgb(25,158,0)", //下跌
|
|
66615
|
+
UnchangeColor:"rgb(0,0,0)" //不变
|
|
66616
|
+
}
|
|
66617
|
+
}
|
|
66618
|
+
|
|
66530
66619
|
this.Title={
|
|
66531
66620
|
TradeIndexColor:'rgb(105,105,105)', //交易指标颜色
|
|
66532
66621
|
ColorIndexColor:'rgb(112,128,144)', //五彩K线颜色
|
|
@@ -67635,6 +67724,18 @@ function JSChartResource()
|
|
|
67635
67724
|
if (style.SelFrameBorderColor) this.SelFrameBorderColor=style.SelFrameBorderColor;
|
|
67636
67725
|
if (IFrameSplitOperator.IsNumber(style.IndexTitleMerginLeft)) this.IndexTitleMerginLeft = style.IndexTitleMerginLeft;
|
|
67637
67726
|
|
|
67727
|
+
if (style.IndexTitle)
|
|
67728
|
+
{
|
|
67729
|
+
var item=style.IndexTitle;
|
|
67730
|
+
if (item.UpDownArrow)
|
|
67731
|
+
{
|
|
67732
|
+
var subItem=item.UpDownArrow;
|
|
67733
|
+
if (subItem.UpColor) this.IndexTitle.UpDownArrow.UpColor = subItem.UpColor;
|
|
67734
|
+
if (subItem.DownColor) this.IndexTitle.UpDownArrow.DownColor = subItem.DownColor;
|
|
67735
|
+
if (subItem.UnchangeColor) this.IndexTitle.UpDownArrow.UnchangeColor = subItem.UnchangeColor;
|
|
67736
|
+
}
|
|
67737
|
+
}
|
|
67738
|
+
|
|
67638
67739
|
if (style.Frame)
|
|
67639
67740
|
{
|
|
67640
67741
|
if (style.Frame.XBottomOffset) this.Frame.XBottomOffset=style.Frame.XBottomOffset;
|
|
@@ -76399,7 +76500,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76399
76500
|
this.DataStatus={ MultiDay:false, LatestDay:false }; //MultiDay=多日 LatestDay:当天
|
|
76400
76501
|
|
|
76401
76502
|
this.ZoomStepPixel=50;
|
|
76402
|
-
|
|
76403
76503
|
|
|
76404
76504
|
//集合竞价设置 obj={ Left:true/false, Right:true/false, MultiDay:{Left:, Right:} }
|
|
76405
76505
|
this.SetCallCationDataBorder=function(obj)
|
|
@@ -81387,6 +81487,105 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81387
81487
|
|
|
81388
81488
|
return false;
|
|
81389
81489
|
}
|
|
81490
|
+
|
|
81491
|
+
this.ClearSelectedXBorder=function()
|
|
81492
|
+
{
|
|
81493
|
+
if (!this.GlobalOption || !this.GlobalOption.SelectedXBorder) return;
|
|
81494
|
+
var item=this.GlobalOption.SelectedXBorder;
|
|
81495
|
+
item.Date=null;
|
|
81496
|
+
}
|
|
81497
|
+
|
|
81498
|
+
this.DrawSelectedXBorder=function()
|
|
81499
|
+
{
|
|
81500
|
+
if (this.DayCount<=1) return null;
|
|
81501
|
+
if (this.Frame.IsHScreen===true) return null;
|
|
81502
|
+
|
|
81503
|
+
if (!this.GlobalOption || !this.GlobalOption.SelectedXBorder) return;
|
|
81504
|
+
var item=this.GlobalOption.SelectedXBorder;
|
|
81505
|
+
if (!IFrameSplitOperator.IsPlusNumber(item.Mode)) return;
|
|
81506
|
+
if (!IFrameSplitOperator.IsPlusNumber(item.Date)) return;
|
|
81507
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.DayData)) return;
|
|
81508
|
+
|
|
81509
|
+
var rtSelected=null;
|
|
81510
|
+
var dayIndex=item.DayIndex;
|
|
81511
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
81512
|
+
var rtClient={ Left:border.Left, Top:border.Top, Right:border.Right, Bottom: border.Bottom };
|
|
81513
|
+
rtClient.Width=rtClient.Right-rtClient.Left;
|
|
81514
|
+
var mainFrame=this.Frame.SubFrame[0].Frame; //主图框架
|
|
81515
|
+
var xPointCount=mainFrame.XPointCount;
|
|
81516
|
+
var minuteCount=mainFrame.MinuteCount;
|
|
81517
|
+
var lDayCount=xPointCount/minuteCount;
|
|
81518
|
+
var dayWidth=rtClient.Width/lDayCount;
|
|
81519
|
+
|
|
81520
|
+
if (border.DayBorder)
|
|
81521
|
+
{
|
|
81522
|
+
|
|
81523
|
+
}
|
|
81524
|
+
else
|
|
81525
|
+
{
|
|
81526
|
+
var dayIndex=-1;
|
|
81527
|
+
for(var i=0;i<this.DayData.length;++i)
|
|
81528
|
+
{
|
|
81529
|
+
var dayItem=this.DayData[i];
|
|
81530
|
+
if (dayItem.Date==item.Date)
|
|
81531
|
+
{
|
|
81532
|
+
dayIndex=this.DayData.length-1-i;
|
|
81533
|
+
break;
|
|
81534
|
+
}
|
|
81535
|
+
}
|
|
81536
|
+
|
|
81537
|
+
if (dayIndex<0) return;
|
|
81538
|
+
|
|
81539
|
+
rtSelected={ Left:border.Left+dayIndex*dayWidth, Width:dayWidth, Top:border.Bottom, Bottom:border.ChartHeight };
|
|
81540
|
+
rtSelected.Right=rtSelected.Left+rtSelected.Width;
|
|
81541
|
+
rtSelected.Height=rtSelected.Bottom-rtSelected.Top;
|
|
81542
|
+
}
|
|
81543
|
+
|
|
81544
|
+
|
|
81545
|
+
mainFrame.Canvas.strokeStyle=g_JSChartResource.SelFrameBorderColor;
|
|
81546
|
+
mainFrame.Canvas.strokeRect(ToFixedPoint(rtSelected.Left),ToFixedPoint(rtSelected.Top),ToFixedRect(rtSelected.Width),ToFixedRect(rtSelected.Height)-1);
|
|
81547
|
+
}
|
|
81548
|
+
|
|
81549
|
+
this.PtInMulitDayMinute=function(x,y)
|
|
81550
|
+
{
|
|
81551
|
+
if (this.DayCount<=1) return null;
|
|
81552
|
+
if (this.Frame.IsHScreen===true) return null;
|
|
81553
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.DayData)) return null;
|
|
81554
|
+
|
|
81555
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
81556
|
+
var rtClient={ Left:border.Left, Top:border.Top, Right:border.Right, Bottom: border.Bottom };
|
|
81557
|
+
rtClient.Width=rtClient.Right-rtClient.Left;
|
|
81558
|
+
if (!(x>rtClient.Left && x<rtClient.Right && y>rtClient.Top && y<rtClient.Bottom)) return null; //不在窗口里面
|
|
81559
|
+
|
|
81560
|
+
if (border.DayBorder)
|
|
81561
|
+
{
|
|
81562
|
+
|
|
81563
|
+
}
|
|
81564
|
+
else
|
|
81565
|
+
{
|
|
81566
|
+
var mainFrame=this.Frame.SubFrame[0].Frame; //主图框架
|
|
81567
|
+
var xPointCount=mainFrame.XPointCount;
|
|
81568
|
+
var minuteCount=mainFrame.MinuteCount;
|
|
81569
|
+
var lDayCount=xPointCount/minuteCount;
|
|
81570
|
+
var dayWidth=rtClient.Width/lDayCount;
|
|
81571
|
+
var rtDay={ Left:rtClient.Left, Right:dayWidth+rtClient.Left };
|
|
81572
|
+
for(var i=0;i<lDayCount;++i)
|
|
81573
|
+
{
|
|
81574
|
+
if (x>=rtDay.Left && x<=rtDay.Right)
|
|
81575
|
+
{
|
|
81576
|
+
var dayItem=this.DayData[this.DayData.length-1-i];
|
|
81577
|
+
if (!dayItem) return null;
|
|
81578
|
+
|
|
81579
|
+
return dayItem.Date;
|
|
81580
|
+
}
|
|
81581
|
+
|
|
81582
|
+
rtDay.Left+=dayWidth;
|
|
81583
|
+
rtDay.Right+=dayWidth;
|
|
81584
|
+
}
|
|
81585
|
+
}
|
|
81586
|
+
|
|
81587
|
+
return null;
|
|
81588
|
+
}
|
|
81390
81589
|
}
|
|
81391
81590
|
|
|
81392
81591
|
//盘前数据
|
|
@@ -119374,6 +119573,16 @@ function GetBlackStyle()
|
|
|
119374
119573
|
DownTextColor: "rgb(25,158,0)",
|
|
119375
119574
|
UnchagneTextColor: "rgb(190, 190 ,190)",
|
|
119376
119575
|
CloseLineColor: 'rgb(250,250,250)',
|
|
119576
|
+
|
|
119577
|
+
IndexTitle:
|
|
119578
|
+
{
|
|
119579
|
+
UpDownArrow: //数值涨跌箭头
|
|
119580
|
+
{
|
|
119581
|
+
UpColor:"rgb(238,21,21)", //上涨
|
|
119582
|
+
DownColor:"rgb(25,158,0)", //下跌
|
|
119583
|
+
UnchangeColor:"rgb(190, 190 ,190)" //不变
|
|
119584
|
+
}
|
|
119585
|
+
},
|
|
119377
119586
|
|
|
119378
119587
|
Title:
|
|
119379
119588
|
{
|
|
@@ -130299,7 +130508,7 @@ function HQChartScriptWorker()
|
|
|
130299
130508
|
|
|
130300
130509
|
|
|
130301
130510
|
|
|
130302
|
-
var HQCHART_VERSION="1.1.
|
|
130511
|
+
var HQCHART_VERSION="1.1.13061";
|
|
130303
130512
|
|
|
130304
130513
|
function PrintHQChartVersion()
|
|
130305
130514
|
{
|