hqchart 1.1.13911 → 1.1.13915
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 +1 -1
- package/lib/umychart.vue.js +49 -30
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +240 -91
- package/src/jscommon/umychart.NetworkFilterTest.js +1 -1
- package/src/jscommon/umychart.complier.js +19 -3
- package/src/jscommon/umychart.js +100 -12
- package/src/jscommon/umychart.resource/css/tools.css +2 -2
- package/src/jscommon/umychart.testdata.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +120 -16
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +360 -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
|
|
|
@@ -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,17 @@ 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:'價格'}],
|
|
70955
70972
|
['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'價格'}],
|
|
70973
|
+
['DialogTooltip-AC-Price', {CN:'匹配价', EN:'Price', TC:'匹配價'}],
|
|
70974
|
+
['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
|
|
70975
|
+
['DialogTooltip-AC-Increase', {CN:'竞价涨幅', EN:'Increase', TC:'競價漲幅'}],
|
|
70976
|
+
['DialogTooltip-AC-Vol', {CN:'匹配量', EN:'Vol', TC:'匹配量'}],
|
|
70956
70977
|
|
|
70957
70978
|
//走势图PC tooltip
|
|
70958
70979
|
['PCTooltip-Date', {CN:'日期', EN:'Date', TC:"日期"}],
|
|
@@ -80956,6 +80977,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80956
80977
|
|
|
80957
80978
|
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
80958
80979
|
|
|
80980
|
+
var draw=false;
|
|
80981
|
+
if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
80982
|
+
{
|
|
80983
|
+
var sendData={ e:e, KeyID:keyID, Draw:false, PreventDefault:false };
|
|
80984
|
+
this.ChartCorssCursor.OnKeyDown(sendData);
|
|
80985
|
+
draw=sendData.Draw;
|
|
80986
|
+
}
|
|
80987
|
+
|
|
80959
80988
|
switch(keyID)
|
|
80960
80989
|
{
|
|
80961
80990
|
case 37: //left
|
|
@@ -81061,10 +81090,20 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81061
81090
|
this.ChartOperator(option);
|
|
81062
81091
|
}
|
|
81063
81092
|
break;
|
|
81093
|
+
case 27:
|
|
81094
|
+
if (this.CurrentChartDrawPicture)
|
|
81095
|
+
{
|
|
81096
|
+
var drawPicture=this.CurrentChartDrawPicture;
|
|
81097
|
+
if (drawPicture.Status!=20) //画布移动的时候不能取消
|
|
81098
|
+
this.CurrentChartDrawPicture=null;
|
|
81099
|
+
}
|
|
81100
|
+
break;
|
|
81064
81101
|
default:
|
|
81065
81102
|
return;
|
|
81066
81103
|
}
|
|
81067
81104
|
|
|
81105
|
+
if (draw) this.DrawDynamicInfo();
|
|
81106
|
+
|
|
81068
81107
|
//不让滚动条滚动
|
|
81069
81108
|
if(e.preventDefault) e.preventDefault();
|
|
81070
81109
|
else e.returnValue = false;
|
|
@@ -85011,6 +85050,55 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85011
85050
|
|
|
85012
85051
|
return null;
|
|
85013
85052
|
}
|
|
85053
|
+
|
|
85054
|
+
this.DrawTooltipDialog=function()
|
|
85055
|
+
{
|
|
85056
|
+
if (!this.DialogTooltip) return;
|
|
85057
|
+
|
|
85058
|
+
this.UpdateTooltipDialog();
|
|
85059
|
+
}
|
|
85060
|
+
|
|
85061
|
+
this.UpdateTooltipDialog=function()
|
|
85062
|
+
{
|
|
85063
|
+
if (!this.DialogTooltip) return false;
|
|
85064
|
+
if (!this.ChartCorssCursor) return false;
|
|
85065
|
+
|
|
85066
|
+
var minuteItem=null; //{ Type:0=连续交易 1=集合竞价, Data:数据 }
|
|
85067
|
+
if (this.ChartCorssCursor.ClientPos>=0)
|
|
85068
|
+
{
|
|
85069
|
+
var titlePaint=this.TitlePaint[0];
|
|
85070
|
+
if (titlePaint && titlePaint.PointInfo)
|
|
85071
|
+
{
|
|
85072
|
+
var pointInfo=titlePaint.PointInfo;
|
|
85073
|
+
if ((pointInfo.ClientPos==2 || pointInfo.ClientPos==3 || (pointInfo.ClientPos>=200&& pointInfo.ClientPos<=299) || (pointInfo.ClientPos>=300&& pointInfo.ClientPos<=399)))
|
|
85074
|
+
{
|
|
85075
|
+
var auctionData=titlePaint.GetCurrentAuctionData();
|
|
85076
|
+
if (!auctionData) return;
|
|
85077
|
+
minuteItem={ Type:1, Data:auctionData };
|
|
85078
|
+
}
|
|
85079
|
+
else
|
|
85080
|
+
{
|
|
85081
|
+
var minuteData=titlePaint.GetCurrentKLineData();
|
|
85082
|
+
if (!minuteData) return;
|
|
85083
|
+
minuteItem={ Type:0, Data:minuteData };
|
|
85084
|
+
}
|
|
85085
|
+
}
|
|
85086
|
+
|
|
85087
|
+
}
|
|
85088
|
+
|
|
85089
|
+
var sendData=
|
|
85090
|
+
{
|
|
85091
|
+
ClientPos:this.ChartCorssCursor.ClientPos, //位置
|
|
85092
|
+
IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
|
|
85093
|
+
MinItem:minuteItem,
|
|
85094
|
+
Symbol:this.Symbol, Name:this.Name,
|
|
85095
|
+
};
|
|
85096
|
+
|
|
85097
|
+
|
|
85098
|
+
this.DialogTooltip.Update(sendData);
|
|
85099
|
+
|
|
85100
|
+
return true;
|
|
85101
|
+
}
|
|
85014
85102
|
}
|
|
85015
85103
|
|
|
85016
85104
|
//盘前数据
|
|
@@ -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
|
|
@@ -468,7 +468,7 @@ HQData.RequestMinuteRealtimeData=function(data,callback)
|
|
|
468
468
|
|
|
469
469
|
//生成随机测试数据
|
|
470
470
|
var price=kItem[5];
|
|
471
|
-
var value=Math.ceil(Math.random()*10)/
|
|
471
|
+
var value=Math.ceil(Math.random()*10)/5000*price;
|
|
472
472
|
var bUp=Math.ceil(Math.random()*10)>=5;
|
|
473
473
|
|
|
474
474
|
if (bUp) price+=value;
|
|
@@ -4898,6 +4898,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4898
4898
|
|
|
4899
4899
|
if (IFrameSplitOperator.IsNumber(item.HPenType)) chart.ChartCorssCursor.HPenType=item.HPenType;
|
|
4900
4900
|
if (IFrameSplitOperator.IsNumber(item.VPenType)) chart.ChartCorssCursor.VPenType=item.VPenType;
|
|
4901
|
+
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
4901
4902
|
}
|
|
4902
4903
|
|
|
4903
4904
|
if (option.MinuteInfo) chart.CreateMinuteInfo(option.MinuteInfo);
|
|
@@ -9380,6 +9381,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9380
9381
|
|
|
9381
9382
|
this.DrawDrawPictureXYCoordinate(); //绘制画图工具 X,Y轴刻度信息
|
|
9382
9383
|
|
|
9384
|
+
var bDrawDialogTooltip=false;
|
|
9383
9385
|
var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
|
|
9384
9386
|
if (this.LastPoint.X!=null || this.LastPoint.Y!=null)
|
|
9385
9387
|
{
|
|
@@ -9424,7 +9426,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9424
9426
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
9425
9427
|
}
|
|
9426
9428
|
|
|
9427
|
-
|
|
9429
|
+
bDrawDialogTooltip=true;
|
|
9428
9430
|
}
|
|
9429
9431
|
|
|
9430
9432
|
ptPosition=this.Frame.PtInFrame(this.LastPoint.X, this.LastPoint.Y);
|
|
@@ -9505,6 +9507,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9505
9507
|
var frame=this.LastMouseStatus.MouseOnToolbar.Frame;
|
|
9506
9508
|
if (frame && frame.DrawToolbarTooltip) frame.DrawToolbarTooltip(this.LastMouseStatus.MouseOnToolbar);
|
|
9507
9509
|
}
|
|
9510
|
+
|
|
9511
|
+
|
|
9512
|
+
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
9508
9513
|
|
|
9509
9514
|
//发送图形状态给外部
|
|
9510
9515
|
if (this.mapEvent.has(JSCHART_EVENT_ID.CHART_STATUS))
|
|
@@ -9830,7 +9835,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9830
9835
|
}
|
|
9831
9836
|
|
|
9832
9837
|
this.DrawDrawPictureXYCoordinate();
|
|
9833
|
-
|
|
9838
|
+
var bDrawDialogTooltip=false;
|
|
9834
9839
|
if (this.ChartCorssCursor)
|
|
9835
9840
|
{
|
|
9836
9841
|
this.ChartCorssCursor.LastPoint=this.LastPoint;
|
|
@@ -9875,7 +9880,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9875
9880
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
9876
9881
|
}
|
|
9877
9882
|
|
|
9878
|
-
|
|
9883
|
+
bDrawDialogTooltip=true;
|
|
9879
9884
|
}
|
|
9880
9885
|
|
|
9881
9886
|
var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
|
|
@@ -9970,6 +9975,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9970
9975
|
|
|
9971
9976
|
this.OffscreenToShowCanvas();
|
|
9972
9977
|
|
|
9978
|
+
if (bDrawDialogTooltip) this.DrawTooltipDialog();
|
|
9979
|
+
|
|
9973
9980
|
++this.TouchDrawCount;
|
|
9974
9981
|
}
|
|
9975
9982
|
|
|
@@ -36956,7 +36963,8 @@ function ChartVolStick()
|
|
|
36956
36963
|
this.ClassName='ChartVolStick';
|
|
36957
36964
|
|
|
36958
36965
|
this.BarWidth; //固定宽度 目前只支持宽度为1
|
|
36959
|
-
this.BarType; //柱子状态 1=实心 0=空心 2=涨实跌空 如果设置了这个属性, 属性KLineDrawType无效
|
|
36966
|
+
this.BarType; //柱子状态 1=实心 0=空心 2=涨实跌空 如果设置了这个属性, 属性KLineDrawType无效
|
|
36967
|
+
this.BarColorType=0; //0=柱子颜色跟K线走 1=正upcolor 负downcolor
|
|
36960
36968
|
this.PtInChart=this.PtInBar;
|
|
36961
36969
|
this.DrawSelectedStatus=this.DrawLinePoint;
|
|
36962
36970
|
|
|
@@ -37003,7 +37011,7 @@ function ChartVolStick()
|
|
|
37003
37011
|
if (right>chartright) break;
|
|
37004
37012
|
|
|
37005
37013
|
var y=this.ChartFrame.GetYFromData(value);
|
|
37006
|
-
var barColor=this.GetBarColor(kItem);
|
|
37014
|
+
var barColor=this.GetBarColor(kItem,value);
|
|
37007
37015
|
var bUp=barColor.IsUp;
|
|
37008
37016
|
|
|
37009
37017
|
|
|
@@ -37051,7 +37059,7 @@ function ChartVolStick()
|
|
|
37051
37059
|
if (x>chartright) break;
|
|
37052
37060
|
|
|
37053
37061
|
if (isMinute) barColor=this.GetMinuteBarColor(kItem,preKItem); //分时图颜色单独计算
|
|
37054
|
-
else barColor=this.GetBarColor(kItem);
|
|
37062
|
+
else barColor=this.GetBarColor(kItem, value);
|
|
37055
37063
|
|
|
37056
37064
|
this.Canvas.strokeStyle=barColor.Color;
|
|
37057
37065
|
|
|
@@ -37096,7 +37104,7 @@ function ChartVolStick()
|
|
|
37096
37104
|
if (right>chartBottom) break;
|
|
37097
37105
|
|
|
37098
37106
|
var y=this.ChartFrame.GetYFromData(value);
|
|
37099
|
-
var barColor=this.GetBarColor(kItem);
|
|
37107
|
+
var barColor=this.GetBarColor(kItem, value);
|
|
37100
37108
|
var bUp=barColor.IsUp;
|
|
37101
37109
|
|
|
37102
37110
|
var height=ToFixedRect(y-yBottom); //高度调整为整数
|
|
@@ -37142,7 +37150,7 @@ function ChartVolStick()
|
|
|
37142
37150
|
if (x>chartBottom) break;
|
|
37143
37151
|
|
|
37144
37152
|
if (isMinute) barColor=this.GetMinuteBarColor(kItem,preKItem); //分时图颜色单独计算
|
|
37145
|
-
else barColor=this.GetBarColor(kItem);
|
|
37153
|
+
else barColor=this.GetBarColor(kItem,value);
|
|
37146
37154
|
|
|
37147
37155
|
var bUp=barColor.IsUp;
|
|
37148
37156
|
this.Canvas.strokeStyle=barColor.Color;
|
|
@@ -37182,8 +37190,14 @@ function ChartVolStick()
|
|
|
37182
37190
|
return range;
|
|
37183
37191
|
}
|
|
37184
37192
|
|
|
37185
|
-
this.GetBarColor=function(kItem)
|
|
37193
|
+
this.GetBarColor=function(kItem, value)
|
|
37186
37194
|
{
|
|
37195
|
+
if (this.BarColorType===1) //更具正负决定柱子颜色
|
|
37196
|
+
{
|
|
37197
|
+
if (value>=0) return { Color:this.UpColor, IsUp:true }; //颜色, 是否是上涨
|
|
37198
|
+
else return { Color:this.DownColor, IsUp:false };
|
|
37199
|
+
}
|
|
37200
|
+
|
|
37187
37201
|
if (kItem.Close>=kItem.Open) return { Color:this.UpColor, IsUp:true }; //颜色, 是否是上涨
|
|
37188
37202
|
else return { Color:this.DownColor, IsUp:false };
|
|
37189
37203
|
}
|
|
@@ -46177,7 +46191,7 @@ function KLineTooltipPaint()
|
|
|
46177
46191
|
}
|
|
46178
46192
|
|
|
46179
46193
|
if (this.HQChart.CurrentChartDrawPicture) return false; //画图工具操作的时候 不显示
|
|
46180
|
-
|
|
46194
|
+
|
|
46181
46195
|
return true;
|
|
46182
46196
|
}
|
|
46183
46197
|
|
|
@@ -47009,6 +47023,8 @@ function MinuteLeftTooltipPaint()
|
|
|
47009
47023
|
var pt=this.HQChart.LastPoint;
|
|
47010
47024
|
if (!pt) return false;
|
|
47011
47025
|
|
|
47026
|
+
if (this.HQChart.ChartCorssCursor && !this.HQChart.ChartCorssCursor.IsShowCorss) return false;
|
|
47027
|
+
|
|
47012
47028
|
return this.HQChart.IsMouseOnClient(pt.X, pt.Y);
|
|
47013
47029
|
}
|
|
47014
47030
|
|
|
@@ -74863,7 +74879,7 @@ function JSChartLocalization()
|
|
|
74863
74879
|
['DivTooltip-Amount', {CN:'金额:', EN:'Amount:', TC:'金額'}],
|
|
74864
74880
|
['DivTooltip-Exchange', {CN:'换手:', EN:'Exchange:', TC:'換手'}],
|
|
74865
74881
|
['DivTooltip-Position', {CN:'持仓:', EN:'Position:', TC:'持倉'}],
|
|
74866
|
-
['DivTooltip-Price', {CN:'价格:', EN:'
|
|
74882
|
+
['DivTooltip-Price', {CN:'价格:', EN:'Price:', TC:'價格'}],
|
|
74867
74883
|
|
|
74868
74884
|
['DialogTooltip-Date', {CN:'日期', EN:'Date', TC:'日期'}],
|
|
74869
74885
|
['DialogTooltip-Time', {CN:'时间', EN:'Time', TC:'時間'}],
|
|
@@ -74872,12 +74888,17 @@ function JSChartLocalization()
|
|
|
74872
74888
|
['DialogTooltip-Low', {CN:'最低价', EN:'Low', TC:'最低價'}],
|
|
74873
74889
|
['DialogTooltip-Close', {CN:'收盘价', EN:'Close', TC:'收盤價'}],
|
|
74874
74890
|
['DialogTooltip-Increase', {CN:'涨幅', EN:'Increase', TC:'漲幅'}],
|
|
74891
|
+
['DialogTooltip-Risefall', {CN:'涨跌', EN:'Risefall', TC:'漲跌'}],
|
|
74875
74892
|
['DialogTooltip-Vol', {CN:'成交量', EN:'Volume', TC:'數量'}],
|
|
74876
74893
|
['DialogTooltip-Amount', {CN:'成交额', EN:'Amount', TC:'金額'}],
|
|
74877
74894
|
['DialogTooltip-Exchange', {CN:'换手率', EN:'Exchange', TC:'換手'}],
|
|
74878
74895
|
['DialogTooltip-Position', {CN:'持仓量', EN:'Position', TC:'持倉'}],
|
|
74879
|
-
['DialogTooltip-Price', {CN:'价格', EN:'
|
|
74896
|
+
['DialogTooltip-Price', {CN:'价格', EN:'Price', TC:'價格'}],
|
|
74880
74897
|
['DialogTooltip-Amplitude', {CN:'振幅', EN:'amplitude', TC:'價格'}],
|
|
74898
|
+
['DialogTooltip-AC-Price', {CN:'匹配价', EN:'Price', TC:'匹配價'}],
|
|
74899
|
+
['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
|
|
74900
|
+
['DialogTooltip-AC-Increase', {CN:'竞价涨幅', EN:'Increase', TC:'競價漲幅'}],
|
|
74901
|
+
['DialogTooltip-AC-Vol', {CN:'匹配量', EN:'Vol', TC:'匹配量'}],
|
|
74881
74902
|
|
|
74882
74903
|
//走势图PC tooltip
|
|
74883
74904
|
['PCTooltip-Date', {CN:'日期', EN:'Date', TC:"日期"}],
|
|
@@ -84881,6 +84902,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84881
84902
|
|
|
84882
84903
|
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
84883
84904
|
|
|
84905
|
+
var draw=false;
|
|
84906
|
+
if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
84907
|
+
{
|
|
84908
|
+
var sendData={ e:e, KeyID:keyID, Draw:false, PreventDefault:false };
|
|
84909
|
+
this.ChartCorssCursor.OnKeyDown(sendData);
|
|
84910
|
+
draw=sendData.Draw;
|
|
84911
|
+
}
|
|
84912
|
+
|
|
84884
84913
|
switch(keyID)
|
|
84885
84914
|
{
|
|
84886
84915
|
case 37: //left
|
|
@@ -84986,10 +85015,20 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84986
85015
|
this.ChartOperator(option);
|
|
84987
85016
|
}
|
|
84988
85017
|
break;
|
|
85018
|
+
case 27:
|
|
85019
|
+
if (this.CurrentChartDrawPicture)
|
|
85020
|
+
{
|
|
85021
|
+
var drawPicture=this.CurrentChartDrawPicture;
|
|
85022
|
+
if (drawPicture.Status!=20) //画布移动的时候不能取消
|
|
85023
|
+
this.CurrentChartDrawPicture=null;
|
|
85024
|
+
}
|
|
85025
|
+
break;
|
|
84989
85026
|
default:
|
|
84990
85027
|
return;
|
|
84991
85028
|
}
|
|
84992
85029
|
|
|
85030
|
+
if (draw) this.DrawDynamicInfo();
|
|
85031
|
+
|
|
84993
85032
|
//不让滚动条滚动
|
|
84994
85033
|
if(e.preventDefault) e.preventDefault();
|
|
84995
85034
|
else e.returnValue = false;
|
|
@@ -88936,6 +88975,55 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
88936
88975
|
|
|
88937
88976
|
return null;
|
|
88938
88977
|
}
|
|
88978
|
+
|
|
88979
|
+
this.DrawTooltipDialog=function()
|
|
88980
|
+
{
|
|
88981
|
+
if (!this.DialogTooltip) return;
|
|
88982
|
+
|
|
88983
|
+
this.UpdateTooltipDialog();
|
|
88984
|
+
}
|
|
88985
|
+
|
|
88986
|
+
this.UpdateTooltipDialog=function()
|
|
88987
|
+
{
|
|
88988
|
+
if (!this.DialogTooltip) return false;
|
|
88989
|
+
if (!this.ChartCorssCursor) return false;
|
|
88990
|
+
|
|
88991
|
+
var minuteItem=null; //{ Type:0=连续交易 1=集合竞价, Data:数据 }
|
|
88992
|
+
if (this.ChartCorssCursor.ClientPos>=0)
|
|
88993
|
+
{
|
|
88994
|
+
var titlePaint=this.TitlePaint[0];
|
|
88995
|
+
if (titlePaint && titlePaint.PointInfo)
|
|
88996
|
+
{
|
|
88997
|
+
var pointInfo=titlePaint.PointInfo;
|
|
88998
|
+
if ((pointInfo.ClientPos==2 || pointInfo.ClientPos==3 || (pointInfo.ClientPos>=200&& pointInfo.ClientPos<=299) || (pointInfo.ClientPos>=300&& pointInfo.ClientPos<=399)))
|
|
88999
|
+
{
|
|
89000
|
+
var auctionData=titlePaint.GetCurrentAuctionData();
|
|
89001
|
+
if (!auctionData) return;
|
|
89002
|
+
minuteItem={ Type:1, Data:auctionData };
|
|
89003
|
+
}
|
|
89004
|
+
else
|
|
89005
|
+
{
|
|
89006
|
+
var minuteData=titlePaint.GetCurrentKLineData();
|
|
89007
|
+
if (!minuteData) return;
|
|
89008
|
+
minuteItem={ Type:0, Data:minuteData };
|
|
89009
|
+
}
|
|
89010
|
+
}
|
|
89011
|
+
|
|
89012
|
+
}
|
|
89013
|
+
|
|
89014
|
+
var sendData=
|
|
89015
|
+
{
|
|
89016
|
+
ClientPos:this.ChartCorssCursor.ClientPos, //位置
|
|
89017
|
+
IsShowCorss:this.ChartCorssCursor.IsShowCorss, //是否显示十字线
|
|
89018
|
+
MinItem:minuteItem,
|
|
89019
|
+
Symbol:this.Symbol, Name:this.Name,
|
|
89020
|
+
};
|
|
89021
|
+
|
|
89022
|
+
|
|
89023
|
+
this.DialogTooltip.Update(sendData);
|
|
89024
|
+
|
|
89025
|
+
return true;
|
|
89026
|
+
}
|
|
88939
89027
|
}
|
|
88940
89028
|
|
|
88941
89029
|
//盘前数据
|
|
@@ -120116,6 +120204,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
120116
120204
|
if (varItem.UpColor) chart.UpColor=varItem.UpColor;
|
|
120117
120205
|
if (varItem.DownColor) chart.DownColor=varItem.DownColor;
|
|
120118
120206
|
if (IFrameSplitOperator.IsNumber(varItem.StickType)) chart.BarType=varItem.StickType;
|
|
120207
|
+
if (IFrameSplitOperator.IsNumber(varItem.BarColorType)) chart.BarColorType=varItem.BarColorType;
|
|
120119
120208
|
if (varItem.LineWidth)
|
|
120120
120209
|
{
|
|
120121
120210
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
@@ -120127,9 +120216,21 @@ function ScriptIndex(name,script,args,option)
|
|
|
120127
120216
|
chart.HistoryData=hisData;
|
|
120128
120217
|
this.ReloadChartResource(hqChart,windowIndex,chart);
|
|
120129
120218
|
|
|
120130
|
-
|
|
120131
|
-
|
|
120132
|
-
|
|
120219
|
+
if (varItem.IsShowTitle===false) //NOTEXT 不绘制标题
|
|
120220
|
+
{
|
|
120221
|
+
|
|
120222
|
+
}
|
|
120223
|
+
else if (IFrameSplitOperator.IsString(varItem.Name) && varItem.Name.indexOf("NOTEXT")==0) //标题中包含NOTEXT不绘制标题
|
|
120224
|
+
{
|
|
120225
|
+
|
|
120226
|
+
}
|
|
120227
|
+
else
|
|
120228
|
+
{
|
|
120229
|
+
var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
120230
|
+
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
120231
|
+
this.SetTitleData(titleData,chart);
|
|
120232
|
+
}
|
|
120233
|
+
|
|
120133
120234
|
this.SetChartIndexName(chart);
|
|
120134
120235
|
hqChart.ChartPaint.push(chart);
|
|
120135
120236
|
}
|
|
@@ -122075,6 +122176,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
122075
122176
|
if (varItem.UpColor) chart.UpColor=varItem.UpColor;
|
|
122076
122177
|
if (varItem.DownColor) chart.DownColor=varItem.DownColor;
|
|
122077
122178
|
if (IFrameSplitOperator.IsNumber(varItem.StickType)) chart.BarType=varItem.StickType;
|
|
122179
|
+
if (IFrameSplitOperator.IsNumber(varItem.BarColorType)) chart.BarColorType=varItem.BarColorType;
|
|
122078
122180
|
if (varItem.LineWidth)
|
|
122079
122181
|
{
|
|
122080
122182
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
@@ -123503,6 +123605,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
123503
123605
|
if (IFrameSplitOperator.IsBool(item.isDotLine)) outVarItem.IsDotLine = item.isDotLine;
|
|
123504
123606
|
if (IFrameSplitOperator.IsNonEmptyArray(item.lineDash)) outVarItem.LineDash=item.lineDash;
|
|
123505
123607
|
if (IFrameSplitOperator.IsBool(item.isSingleLine)) outVarItem.IsSingleLine=item.isSingleLine;
|
|
123608
|
+
if (IFrameSplitOperator.IsNumber(item.StickType)) outVarItem.StickType=item.StickType;
|
|
123609
|
+
if (IFrameSplitOperator.IsNumber(item.BarColorType)) outVarItem.BarColorType=item.BarColorType;
|
|
123506
123610
|
|
|
123507
123611
|
result.push(outVarItem);
|
|
123508
123612
|
}
|
|
@@ -138689,7 +138793,7 @@ function ScrollBarBGChart()
|
|
|
138689
138793
|
|
|
138690
138794
|
|
|
138691
138795
|
|
|
138692
|
-
var HQCHART_VERSION="1.1.
|
|
138796
|
+
var HQCHART_VERSION="1.1.13914";
|
|
138693
138797
|
|
|
138694
138798
|
function PrintHQChartVersion()
|
|
138695
138799
|
{
|
|
@@ -56000,7 +56000,7 @@ HQData.RequestMinuteRealtimeData=function(data,callback)
|
|
|
56000
56000
|
|
|
56001
56001
|
//生成随机测试数据
|
|
56002
56002
|
var price=kItem[5];
|
|
56003
|
-
var value=Math.ceil(Math.random()*10)/
|
|
56003
|
+
var value=Math.ceil(Math.random()*10)/5000*price;
|
|
56004
56004
|
var bUp=Math.ceil(Math.random()*10)>=5;
|
|
56005
56005
|
|
|
56006
56006
|
if (bUp) price+=value;
|