hqchart 1.1.13911 → 1.1.13921
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 +3 -3
- package/lib/umychart.vue.js +61 -34
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +309 -90
- package/src/jscommon/umychart.NetworkFilterTest.js +13 -1
- package/src/jscommon/umychart.complier.js +19 -3
- package/src/jscommon/umychart.js +102 -13
- package/src/jscommon/umychart.resource/css/tools.css +2 -2
- package/src/jscommon/umychart.style.js +1 -1
- package/src/jscommon/umychart.testdata/DayKLine/ICL8.cfe.day.kline.js +7 -0
- package/src/jscommon/umychart.testdata/DayKLine/ICL8.cfe.day.kline.json +1 -0
- package/src/jscommon/umychart.testdata.js +13 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +123 -18
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +13 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +431 -107
package/src/jscommon/umychart.js
CHANGED
|
@@ -973,6 +973,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
973
973
|
|
|
974
974
|
if (IFrameSplitOperator.IsNumber(item.HPenType)) chart.ChartCorssCursor.HPenType=item.HPenType;
|
|
975
975
|
if (IFrameSplitOperator.IsNumber(item.VPenType)) chart.ChartCorssCursor.VPenType=item.VPenType;
|
|
976
|
+
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
976
977
|
}
|
|
977
978
|
|
|
978
979
|
if (option.MinuteInfo) chart.CreateMinuteInfo(option.MinuteInfo);
|
|
@@ -5455,6 +5456,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5455
5456
|
|
|
5456
5457
|
this.DrawDrawPictureXYCoordinate(); //绘制画图工具 X,Y轴刻度信息
|
|
5457
5458
|
|
|
5459
|
+
var bDrawDialogTooltip=false;
|
|
5458
5460
|
var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
|
|
5459
5461
|
if (this.LastPoint.X!=null || this.LastPoint.Y!=null)
|
|
5460
5462
|
{
|
|
@@ -5499,7 +5501,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5499
5501
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
5500
5502
|
}
|
|
5501
5503
|
|
|
5502
|
-
|
|
5504
|
+
bDrawDialogTooltip=true;
|
|
5503
5505
|
}
|
|
5504
5506
|
|
|
5505
5507
|
ptPosition=this.Frame.PtInFrame(this.LastPoint.X, this.LastPoint.Y);
|
|
@@ -5580,6 +5582,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5580
5582
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
5581
5583
|
if (frame && frame.DrawToolbarTooltip) frame.DrawToolbarTooltip(this.LastMouseStatus.MouseOnToolbar);
|
|
5582
5584
|
}
|
|
5585
|
+
|
|
5586
|
+
|
|
5587
|
+
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
5583
5588
|
|
|
5584
5589
|
//发送图形状态给外部
|
|
5585
5590
|
if (this.mapEvent.has(JSCHART_EVENT_ID.CHART_STATUS))
|
|
@@ -5905,7 +5910,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5905
5910
|
}
|
|
5906
5911
|
|
|
5907
5912
|
this.DrawDrawPictureXYCoordinate();
|
|
5908
|
-
|
|
5913
|
+
var bDrawDialogTooltip=false;
|
|
5909
5914
|
if (this.ChartCorssCursor)
|
|
5910
5915
|
{
|
|
5911
5916
|
this.ChartCorssCursor.LastPoint=this.LastPoint;
|
|
@@ -5950,7 +5955,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5950
5955
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
5951
5956
|
}
|
|
5952
5957
|
|
|
5953
|
-
|
|
5958
|
+
bDrawDialogTooltip=true;
|
|
5954
5959
|
}
|
|
5955
5960
|
|
|
5956
5961
|
var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
|
|
@@ -6045,6 +6050,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6045
6050
|
|
|
6046
6051
|
this.OffscreenToShowCanvas();
|
|
6047
6052
|
|
|
6053
|
+
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
6054
|
+
|
|
6048
6055
|
++this.TouchDrawCount;
|
|
6049
6056
|
}
|
|
6050
6057
|
|
|
@@ -33031,7 +33038,8 @@ function ChartVolStick()
|
|
|
33031
33038
|
this.ClassName='ChartVolStick';
|
|
33032
33039
|
|
|
33033
33040
|
this.BarWidth; //固定宽度 目前只支持宽度为1
|
|
33034
|
-
this.BarType; //柱子状态 1=实心 0=空心 2=涨实跌空 如果设置了这个属性, 属性KLineDrawType无效
|
|
33041
|
+
this.BarType; //柱子状态 1=实心 0=空心 2=涨实跌空 如果设置了这个属性, 属性KLineDrawType无效
|
|
33042
|
+
this.BarColorType=0; //0=柱子颜色跟K线走 1=正upcolor 负downcolor
|
|
33035
33043
|
this.PtInChart=this.PtInBar;
|
|
33036
33044
|
this.DrawSelectedStatus=this.DrawLinePoint;
|
|
33037
33045
|
|
|
@@ -33078,7 +33086,7 @@ function ChartVolStick()
|
|
|
33078
33086
|
if (right>chartright) break;
|
|
33079
33087
|
|
|
33080
33088
|
var y=this.ChartFrame.GetYFromData(value);
|
|
33081
|
-
var barColor=this.GetBarColor(kItem);
|
|
33089
|
+
var barColor=this.GetBarColor(kItem,value);
|
|
33082
33090
|
var bUp=barColor.IsUp;
|
|
33083
33091
|
|
|
33084
33092
|
|
|
@@ -33126,7 +33134,7 @@ function ChartVolStick()
|
|
|
33126
33134
|
if (x>chartright) break;
|
|
33127
33135
|
|
|
33128
33136
|
if (isMinute) barColor=this.GetMinuteBarColor(kItem,preKItem); //分时图颜色单独计算
|
|
33129
|
-
else barColor=this.GetBarColor(kItem);
|
|
33137
|
+
else barColor=this.GetBarColor(kItem, value);
|
|
33130
33138
|
|
|
33131
33139
|
this.Canvas.strokeStyle=barColor.Color;
|
|
33132
33140
|
|
|
@@ -33171,7 +33179,7 @@ function ChartVolStick()
|
|
|
33171
33179
|
if (right>chartBottom) break;
|
|
33172
33180
|
|
|
33173
33181
|
var y=this.ChartFrame.GetYFromData(value);
|
|
33174
|
-
var barColor=this.GetBarColor(kItem);
|
|
33182
|
+
var barColor=this.GetBarColor(kItem, value);
|
|
33175
33183
|
var bUp=barColor.IsUp;
|
|
33176
33184
|
|
|
33177
33185
|
var height=ToFixedRect(y-yBottom); //高度调整为整数
|
|
@@ -33217,7 +33225,7 @@ function ChartVolStick()
|
|
|
33217
33225
|
if (x>chartBottom) break;
|
|
33218
33226
|
|
|
33219
33227
|
if (isMinute) barColor=this.GetMinuteBarColor(kItem,preKItem); //分时图颜色单独计算
|
|
33220
|
-
else barColor=this.GetBarColor(kItem);
|
|
33228
|
+
else barColor=this.GetBarColor(kItem,value);
|
|
33221
33229
|
|
|
33222
33230
|
var bUp=barColor.IsUp;
|
|
33223
33231
|
this.Canvas.strokeStyle=barColor.Color;
|
|
@@ -33257,8 +33265,14 @@ function ChartVolStick()
|
|
|
33257
33265
|
return range;
|
|
33258
33266
|
}
|
|
33259
33267
|
|
|
33260
|
-
this.GetBarColor=function(kItem)
|
|
33268
|
+
this.GetBarColor=function(kItem, value)
|
|
33261
33269
|
{
|
|
33270
|
+
if (this.BarColorType===1) //更具正负决定柱子颜色
|
|
33271
|
+
{
|
|
33272
|
+
if (value>=0) return { Color:this.UpColor, IsUp:true }; //颜色, 是否是上涨
|
|
33273
|
+
else return { Color:this.DownColor, IsUp:false };
|
|
33274
|
+
}
|
|
33275
|
+
|
|
33262
33276
|
if (kItem.Close>=kItem.Open) return { Color:this.UpColor, IsUp:true }; //颜色, 是否是上涨
|
|
33263
33277
|
else return { Color:this.DownColor, IsUp:false };
|
|
33264
33278
|
}
|
|
@@ -42252,7 +42266,7 @@ function KLineTooltipPaint()
|
|
|
42252
42266
|
}
|
|
42253
42267
|
|
|
42254
42268
|
if (this.HQChart.CurrentChartDrawPicture) return false; //画图工具操作的时候 不显示
|
|
42255
|
-
|
|
42269
|
+
|
|
42256
42270
|
return true;
|
|
42257
42271
|
}
|
|
42258
42272
|
|
|
@@ -43084,6 +43098,8 @@ function MinuteLeftTooltipPaint()
|
|
|
43084
43098
|
var pt=this.HQChart.LastPoint;
|
|
43085
43099
|
if (!pt) return false;
|
|
43086
43100
|
|
|
43101
|
+
if (this.HQChart.ChartCorssCursor && !this.HQChart.ChartCorssCursor.IsShowCorss) return false;
|
|
43102
|
+
|
|
43087
43103
|
return this.HQChart.IsMouseOnClient(pt.X, pt.Y);
|
|
43088
43104
|
}
|
|
43089
43105
|
|
|
@@ -68997,7 +69013,7 @@ function JSChartResource()
|
|
|
68997
69013
|
AmountColor:"rgb(79, 79, 79)", //成交金额
|
|
68998
69014
|
DateTimeColor:'rgb(60,60,60)',
|
|
68999
69015
|
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
69000
|
-
PositionColor:"rgb(
|
|
69016
|
+
PositionColor:"rgb(255,0,255)" //持仓
|
|
69001
69017
|
}
|
|
69002
69018
|
|
|
69003
69019
|
//弹幕
|
|
@@ -70938,7 +70954,7 @@ function JSChartLocalization()
|
|
|
70938
70954
|
['DivTooltip-Amount', {CN:'金额:', EN:'Amount:', TC:'金額'}],
|
|
70939
70955
|
['DivTooltip-Exchange', {CN:'换手:', EN:'Exchange:', TC:'換手'}],
|
|
70940
70956
|
['DivTooltip-Position', {CN:'持仓:', EN:'Position:', TC:'持倉'}],
|
|
70941
|
-
['DivTooltip-Price', {CN:'价格:', EN:'
|
|
70957
|
+
['DivTooltip-Price', {CN:'价格:', EN:'Price:', TC:'價格'}],
|
|
70942
70958
|
|
|
70943
70959
|
['DialogTooltip-Date', {CN:'日期', EN:'Date', TC:'日期'}],
|
|
70944
70960
|
['DialogTooltip-Time', {CN:'时间', EN:'Time', TC:'時間'}],
|
|
@@ -70947,12 +70963,18 @@ function JSChartLocalization()
|
|
|
70947
70963
|
['DialogTooltip-Low', {CN:'最低价', EN:'Low', TC:'最低價'}],
|
|
70948
70964
|
['DialogTooltip-Close', {CN:'收盘价', EN:'Close', TC:'收盤價'}],
|
|
70949
70965
|
['DialogTooltip-Increase', {CN:'涨幅', EN:'Increase', TC:'漲幅'}],
|
|
70966
|
+
['DialogTooltip-Risefall', {CN:'涨跌', EN:'Risefall', TC:'漲跌'}],
|
|
70950
70967
|
['DialogTooltip-Vol', {CN:'成交量', EN:'Volume', TC:'數量'}],
|
|
70951
70968
|
['DialogTooltip-Amount', {CN:'成交额', EN:'Amount', TC:'金額'}],
|
|
70952
70969
|
['DialogTooltip-Exchange', {CN:'换手率', EN:'Exchange', TC:'換手'}],
|
|
70953
70970
|
['DialogTooltip-Position', {CN:'持仓量', EN:'Position', TC:'持倉'}],
|
|
70954
|
-
['DialogTooltip-Price', {CN:'价格', EN:'
|
|
70971
|
+
['DialogTooltip-Price', {CN:'价格', EN:'Price', TC:'價格'}],
|
|
70972
|
+
['DialogTooltip-YClose', {CN:"结算价", EN:'Settlement', TC:'結算價'}],
|
|
70955
70973
|
['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'價格'}],
|
|
70974
|
+
['DialogTooltip-AC-Price', {CN:'匹配价', EN:'Price', TC:'匹配價'}],
|
|
70975
|
+
['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
|
|
70976
|
+
['DialogTooltip-AC-Increase', {CN:'竞价涨幅', EN:'Increase', TC:'競價漲幅'}],
|
|
70977
|
+
['DialogTooltip-AC-Vol', {CN:'匹配量', EN:'Vol', TC:'匹配量'}],
|
|
70956
70978
|
|
|
70957
70979
|
//走势图PC tooltip
|
|
70958
70980
|
['PCTooltip-Date', {CN:'日期', EN:'Date', TC:"日期"}],
|
|
@@ -80956,6 +80978,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80956
80978
|
|
|
80957
80979
|
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
80958
80980
|
|
|
80981
|
+
var draw=false;
|
|
80982
|
+
if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
80983
|
+
{
|
|
80984
|
+
var sendData={ e:e, KeyID:keyID, Draw:false, PreventDefault:false };
|
|
80985
|
+
this.ChartCorssCursor.OnKeyDown(sendData);
|
|
80986
|
+
draw=sendData.Draw;
|
|
80987
|
+
}
|
|
80988
|
+
|
|
80959
80989
|
switch(keyID)
|
|
80960
80990
|
{
|
|
80961
80991
|
case 37: //left
|
|
@@ -81061,10 +81091,20 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81061
81091
|
this.ChartOperator(option);
|
|
81062
81092
|
}
|
|
81063
81093
|
break;
|
|
81094
|
+
case 27:
|
|
81095
|
+
if (this.CurrentChartDrawPicture)
|
|
81096
|
+
{
|
|
81097
|
+
var drawPicture=this.CurrentChartDrawPicture;
|
|
81098
|
+
if (drawPicture.Status!=20) //画布移动的时候不能取消
|
|
81099
|
+
this.CurrentChartDrawPicture=null;
|
|
81100
|
+
}
|
|
81101
|
+
break;
|
|
81064
81102
|
default:
|
|
81065
81103
|
return;
|
|
81066
81104
|
}
|
|
81067
81105
|
|
|
81106
|
+
if (draw) this.DrawDynamicInfo();
|
|
81107
|
+
|
|
81068
81108
|
//不让滚动条滚动
|
|
81069
81109
|
if(e.preventDefault) e.preventDefault();
|
|
81070
81110
|
else e.returnValue = false;
|
|
@@ -85011,6 +85051,55 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85011
85051
|
|
|
85012
85052
|
return null;
|
|
85013
85053
|
}
|
|
85054
|
+
|
|
85055
|
+
this.DrawTooltipDialog=function()
|
|
85056
|
+
{
|
|
85057
|
+
if (!this.DialogTooltip) return;
|
|
85058
|
+
|
|
85059
|
+
this.UpdateTooltipDialog();
|
|
85060
|
+
}
|
|
85061
|
+
|
|
85062
|
+
this.UpdateTooltipDialog=function()
|
|
85063
|
+
{
|
|
85064
|
+
if (!this.DialogTooltip) return false;
|
|
85065
|
+
if (!this.ChartCorssCursor) return false;
|
|
85066
|
+
|
|
85067
|
+
var minuteItem=null; //{ Type:0=连续交易 1=集合竞价, Data:数据 }
|
|
85068
|
+
if (this.ChartCorssCursor.ClientPos>=0)
|
|
85069
|
+
{
|
|
85070
|
+
var titlePaint=this.TitlePaint[0];
|
|
85071
|
+
if (titlePaint && titlePaint.PointInfo)
|
|
85072
|
+
{
|
|
85073
|
+
var pointInfo=titlePaint.PointInfo;
|
|
85074
|
+
if ((pointInfo.ClientPos==2 || pointInfo.ClientPos==3 || (pointInfo.ClientPos>=200&& pointInfo.ClientPos<=299) || (pointInfo.ClientPos>=300&& pointInfo.ClientPos<=399)))
|
|
85075
|
+
{
|
|
85076
|
+
var auctionData=titlePaint.GetCurrentAuctionData();
|
|
85077
|
+
if (!auctionData) return;
|
|
85078
|
+
minuteItem={ Type:1, Data:auctionData };
|
|
85079
|
+
}
|
|
85080
|
+
else
|
|
85081
|
+
{
|
|
85082
|
+
var minuteData=titlePaint.GetCurrentKLineData();
|
|
85083
|
+
if (!minuteData) return;
|
|
85084
|
+
minuteItem={ Type:0, Data:minuteData };
|
|
85085
|
+
}
|
|
85086
|
+
}
|
|
85087
|
+
|
|
85088
|
+
}
|
|
85089
|
+
|
|
85090
|
+
var sendData=
|
|
85091
|
+
{
|
|
85092
|
+
ClientPos:this.ChartCorssCursor.ClientPos, //位置
|
|
85093
|
+
IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
|
|
85094
|
+
MinItem:minuteItem,
|
|
85095
|
+
Symbol:this.Symbol, Name:this.Name,
|
|
85096
|
+
};
|
|
85097
|
+
|
|
85098
|
+
|
|
85099
|
+
this.DialogTooltip.Update(sendData);
|
|
85100
|
+
|
|
85101
|
+
return true;
|
|
85102
|
+
}
|
|
85014
85103
|
}
|
|
85015
85104
|
|
|
85016
85105
|
//盘前数据
|
|
@@ -1672,12 +1672,12 @@ input[type="color"] {
|
|
|
1672
1672
|
|
|
1673
1673
|
.UMyChart_Tooltip_Title_Td
|
|
1674
1674
|
{
|
|
1675
|
-
width: 40px;
|
|
1675
|
+
min-width: 40px;
|
|
1676
1676
|
}
|
|
1677
1677
|
|
|
1678
1678
|
.UMyChart_Tooltip_Text_Td
|
|
1679
1679
|
{
|
|
1680
|
-
width:100px;
|
|
1680
|
+
min-width:100px;
|
|
1681
1681
|
}
|
|
1682
1682
|
|
|
1683
1683
|
.UMyChart_Tooltip_Title_Span
|
|
@@ -402,7 +402,7 @@ function GetBlackStyle()
|
|
|
402
402
|
AmountColor:"rgb(210,210,210)", //成交金额
|
|
403
403
|
DateTimeColor:'rgb(210,210,210)',
|
|
404
404
|
TurnoverRateColor:'rgb(43,54,69)', //换手率
|
|
405
|
-
PositionColor:"rgb(
|
|
405
|
+
PositionColor:"rgb(255,0,255)" //持仓
|
|
406
406
|
},
|
|
407
407
|
|
|
408
408
|
//走势图 信息地雷
|