hqchart 1.1.14542 → 1.1.14555
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 +44 -29
- package/package.json +1 -1
- package/src/jscommon/umychart.PopMinuteChart.js +260 -5
- package/src/jscommon/umychart.js +179 -135
- package/src/jscommon/umychart.style.js +5 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +185 -136
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +445 -141
|
@@ -7350,6 +7350,51 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7350
7350
|
this.DialogSearchIndex=null;
|
|
7351
7351
|
}
|
|
7352
7352
|
|
|
7353
|
+
this.DestroyDialogDrawTool=function()
|
|
7354
|
+
{
|
|
7355
|
+
if (!this.DialogDrawTool) return;
|
|
7356
|
+
|
|
7357
|
+
this.DialogDrawTool.Destroy();
|
|
7358
|
+
this.DialogDrawTool=null;
|
|
7359
|
+
}
|
|
7360
|
+
|
|
7361
|
+
this.DestroyDialogModifyIndexParam=function()
|
|
7362
|
+
{
|
|
7363
|
+
if (this.DialogModifyIndexParam) return;
|
|
7364
|
+
|
|
7365
|
+
this.DialogModifyIndexParam.Destroy();
|
|
7366
|
+
this.DialogModifyIndexParam=null;
|
|
7367
|
+
}
|
|
7368
|
+
|
|
7369
|
+
this.DestroyDialogSelectRect=function()
|
|
7370
|
+
{
|
|
7371
|
+
if (!this.DialogSelectRect) return;
|
|
7372
|
+
|
|
7373
|
+
this.DialogSelectRect.Destroy();
|
|
7374
|
+
this.DialogSelectRect=null;
|
|
7375
|
+
}
|
|
7376
|
+
|
|
7377
|
+
this.DestroyDialogModifyDraw=function()
|
|
7378
|
+
{
|
|
7379
|
+
if (!this.DialogModifyDraw) return;
|
|
7380
|
+
|
|
7381
|
+
this.DialogModifyDraw.Destroy();
|
|
7382
|
+
this.DialogModifyDraw=null;
|
|
7383
|
+
}
|
|
7384
|
+
|
|
7385
|
+
//隐藏内置的弹框div
|
|
7386
|
+
this.HideAllPopDiv=function()
|
|
7387
|
+
{
|
|
7388
|
+
this.HideFloatTooltip();
|
|
7389
|
+
this.CloseTooltipDialog();
|
|
7390
|
+
|
|
7391
|
+
if (this.DialogDrawTool) this.DialogDrawTool.Close();
|
|
7392
|
+
this.CloseModifyDrawDialog();
|
|
7393
|
+
|
|
7394
|
+
if (this.DialogSelectRect) this.DialogSelectRect.Close();
|
|
7395
|
+
if (this.DialogSearchIndex) this.DialogSearchIndex.Close();
|
|
7396
|
+
if (this.DialogModifyIndexParam) this.DialogModifyIndexParam.Close();
|
|
7397
|
+
}
|
|
7353
7398
|
|
|
7354
7399
|
|
|
7355
7400
|
//obj={ Element:, Canvas: }
|
|
@@ -7401,9 +7446,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7401
7446
|
{
|
|
7402
7447
|
this.IsDestroy=true;
|
|
7403
7448
|
this.StopAutoUpdate();
|
|
7449
|
+
|
|
7404
7450
|
this.DestroyTooltipDialog();
|
|
7405
7451
|
this.DestroyFloatTooltip();
|
|
7452
|
+
|
|
7406
7453
|
this.DestroySearchIndexDialog();
|
|
7454
|
+
this.DestroyDialogModifyIndexParam();
|
|
7455
|
+
|
|
7456
|
+
this.DestroyDialogDrawTool();
|
|
7457
|
+
this.DestroyDialogModifyDraw();
|
|
7458
|
+
|
|
7459
|
+
this.DestroyDialogSelectRect();
|
|
7407
7460
|
}
|
|
7408
7461
|
|
|
7409
7462
|
this.ChartDestory=this.ChartDestroy; //老版本写错了,需要兼容下
|
|
@@ -10858,16 +10911,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10858
10911
|
{
|
|
10859
10912
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
10860
10913
|
|
|
10914
|
+
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
10915
|
+
|
|
10861
10916
|
//回调事件
|
|
10862
10917
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN);
|
|
10863
10918
|
if (event && event.Callback)
|
|
10864
10919
|
{
|
|
10865
|
-
var sendData={ e:e, PreventDefault:false };
|
|
10920
|
+
var sendData={ e:e, KeyID:keyID, PreventDefault:false };
|
|
10866
10921
|
event.Callback(event, sendData, this);
|
|
10867
10922
|
if (sendData.PreventDefault) return;
|
|
10868
10923
|
}
|
|
10869
|
-
|
|
10870
|
-
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
10871
10924
|
|
|
10872
10925
|
var draw=false;
|
|
10873
10926
|
if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
@@ -39953,23 +40006,21 @@ function ChartStickLine()
|
|
|
39953
40006
|
delete this.newMethod;
|
|
39954
40007
|
|
|
39955
40008
|
this.ClassName='ChartStickLine'; //类名
|
|
39956
|
-
this.Color="rgb(255,193,37)";
|
|
39957
|
-
this.BarType=0;
|
|
39958
|
-
this.LineDotted=[3,3];
|
|
39959
|
-
this.Width=0;
|
|
40009
|
+
this.Color="rgb(255,193,37)"; //线段颜色
|
|
40010
|
+
this.BarType=0; //柱子类型 0=实心 1=空心 -1=画虚线空心柱
|
|
40011
|
+
this.LineDotted=[3,3]; //虚线设置
|
|
40012
|
+
this.Width=0; //柱子宽度 0=1 3,50=k线宽度 101=K线宽度+间距宽度
|
|
40013
|
+
this.IsHScreen=false;
|
|
40014
|
+
|
|
40015
|
+
this.BarCache={ Type:0 }; //Type:1=线段 2=柱子
|
|
39960
40016
|
|
|
39961
40017
|
this.SetEmptyBar=function() //设置空心柱子
|
|
39962
40018
|
{
|
|
39963
40019
|
if (this.BarType!=1 && this.BarType!=-1) return false;
|
|
39964
40020
|
|
|
39965
|
-
this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
39966
|
-
this.Canvas.strokeStyle=this.Color;
|
|
39967
40021
|
var emptyBGColor=g_JSChartResource.EmptyBarBGColor;
|
|
39968
|
-
if (emptyBGColor) this.
|
|
39969
|
-
if (this.BarType==-1)
|
|
39970
|
-
{
|
|
39971
|
-
this.Canvas.setLineDash(this.LineDotted); //虚线
|
|
39972
|
-
}
|
|
40022
|
+
if (emptyBGColor) this.BarCache.EmptyBGColor=emptyBGColor;
|
|
40023
|
+
if (this.BarType==-1) this.BarCache.LineDotted=this.LineDotted;
|
|
39973
40024
|
|
|
39974
40025
|
return true;
|
|
39975
40026
|
}
|
|
@@ -39979,13 +40030,6 @@ function ChartStickLine()
|
|
|
39979
40030
|
return (this.BarType==1 || this.BarType==-1);
|
|
39980
40031
|
}
|
|
39981
40032
|
|
|
39982
|
-
this.CalculateBarHeight=function(y,y2)
|
|
39983
|
-
{
|
|
39984
|
-
var barHeight=Math.abs(y-y2);
|
|
39985
|
-
if (barHeight<=0) barHeight=1;
|
|
39986
|
-
return barHeight;
|
|
39987
|
-
}
|
|
39988
|
-
|
|
39989
40033
|
this.Draw=function()
|
|
39990
40034
|
{
|
|
39991
40035
|
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
@@ -40000,81 +40044,93 @@ function ChartStickLine()
|
|
|
40000
40044
|
|
|
40001
40045
|
if (!this.Data || !this.Data.Data) return;
|
|
40002
40046
|
|
|
40003
|
-
var
|
|
40047
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
40048
|
+
this.BarCache={ Color:this.Color, EmptyBGColor:null, Width:1*pixelRatio, Type:0, LineDotted:null };
|
|
40049
|
+
|
|
40050
|
+
this.IsHScreen=(this.ChartFrame.IsHScreen===true);;
|
|
40004
40051
|
var dataWidth=this.ChartFrame.DataWidth;
|
|
40005
40052
|
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
40006
40053
|
var chartright=this.ChartBorder.GetRight();
|
|
40007
|
-
var zoomIndex=this.ChartFrame.ZoomIndex;
|
|
40008
|
-
if (isHScreen) chartright=this.ChartBorder.GetBottom();
|
|
40009
40054
|
var xPointCount=this.ChartFrame.XPointCount;
|
|
40010
40055
|
var xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
40011
|
-
if (
|
|
40056
|
+
if (this.IsHScreen)
|
|
40057
|
+
{
|
|
40058
|
+
chartright=this.ChartBorder.GetBottom();
|
|
40059
|
+
xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
40060
|
+
}
|
|
40012
40061
|
|
|
40013
40062
|
var isMinute=this.IsMinuteFrame();
|
|
40014
40063
|
|
|
40015
|
-
this.Canvas.save();
|
|
40016
|
-
var bFillBar=false;
|
|
40017
|
-
var bFillKLine=false;
|
|
40018
|
-
var emptyBGColor=g_JSChartResource.EmptyBarBGColor;
|
|
40019
|
-
|
|
40020
40064
|
if (isMinute)
|
|
40021
40065
|
{
|
|
40022
|
-
if (this.Width>1) this.
|
|
40023
|
-
|
|
40024
|
-
this.Canvas.strokeStyle=this.Color;
|
|
40066
|
+
if (this.Width>1) this.BarCache.Width=2*pixelRatio;
|
|
40067
|
+
this.BarCache.Type=1;
|
|
40025
40068
|
}
|
|
40026
|
-
else if(this.Width
|
|
40069
|
+
else if(this.Width<=0) //宽度时0,使用宽度1
|
|
40027
40070
|
{
|
|
40071
|
+
this.BarCache.Type=1;
|
|
40028
40072
|
this.SetEmptyBar();
|
|
40029
|
-
this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
40030
|
-
this.Canvas.strokeStyle=this.Color;
|
|
40031
40073
|
}
|
|
40032
40074
|
else if (this.Width==3 || this.Width==50) //3和50 K线宽度
|
|
40033
40075
|
{
|
|
40076
|
+
this.BarCache.Type=1;
|
|
40034
40077
|
if (dataWidth>=4)
|
|
40035
40078
|
{
|
|
40036
|
-
|
|
40079
|
+
this.BarCache.Type=2;
|
|
40080
|
+
this.BarCache.Width=dataWidth;
|
|
40037
40081
|
this.SetEmptyBar();
|
|
40038
|
-
if (!this.IsEmptyBar()) this.Canvas.fillStyle=this.Color;
|
|
40039
|
-
this.Canvas.strokeStyle=this.Color;
|
|
40040
40082
|
}
|
|
40041
|
-
else //太细了 画竖线
|
|
40042
|
-
{
|
|
40043
|
-
this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
40044
|
-
this.Canvas.strokeStyle=this.Color;
|
|
40045
|
-
}
|
|
40046
40083
|
}
|
|
40047
|
-
else if (this.Width==101)
|
|
40084
|
+
else if (this.Width==101) //柱子+间距
|
|
40048
40085
|
{
|
|
40049
|
-
|
|
40050
|
-
|
|
40051
|
-
|
|
40086
|
+
this.BarCache.Type=1;
|
|
40087
|
+
var lineWidth=dataWidth+distanceWidth+1*pixelRatio;
|
|
40088
|
+
if (lineWidth>=4)
|
|
40089
|
+
{
|
|
40090
|
+
this.BarCache.Type=2;
|
|
40091
|
+
this.BarCache.Width=lineWidth
|
|
40092
|
+
this.SetEmptyBar();
|
|
40093
|
+
}
|
|
40052
40094
|
}
|
|
40053
40095
|
else if (this.Width<=3)
|
|
40054
40096
|
{
|
|
40055
|
-
var minWidth=2*
|
|
40097
|
+
var minWidth=2*pixelRatio;
|
|
40056
40098
|
var barWidth=dataWidth*(this.Width/3);
|
|
40057
40099
|
if (barWidth<minWidth) barWidth=minWidth;
|
|
40058
|
-
this.
|
|
40059
|
-
if (
|
|
40060
|
-
|
|
40100
|
+
this.BarCache.Type=1;
|
|
40101
|
+
if (barWidth>=4)
|
|
40102
|
+
{
|
|
40103
|
+
this.BarCache.Type=2;
|
|
40104
|
+
this.BarCache.Width=barWidth;
|
|
40105
|
+
this.SetEmptyBar();
|
|
40106
|
+
}
|
|
40061
40107
|
}
|
|
40062
40108
|
else
|
|
40063
40109
|
{
|
|
40064
|
-
var barWidth=this.Width*
|
|
40110
|
+
var barWidth=this.Width*pixelRatio+dataWidth;
|
|
40111
|
+
this.BarCache.Type=2;
|
|
40112
|
+
this.BarCache.Width=barWidth;
|
|
40065
40113
|
this.SetEmptyBar();
|
|
40066
|
-
if (!this.IsEmptyBar()) this.Canvas.fillStyle=this.Color;
|
|
40067
|
-
bFillBar=true;
|
|
40068
40114
|
}
|
|
40069
40115
|
|
|
40116
|
+
this.Canvas.save();
|
|
40117
|
+
this.ClipClient(this.IsHScreen);
|
|
40118
|
+
|
|
40119
|
+
this.Canvas.strokeStyle=this.BarCache.Color;
|
|
40120
|
+
if (this.BarCache.EmptyBGColor) this.Canvas.fillStyle=this.BarCache.EmptyBGColor; //空心柱子
|
|
40121
|
+
else this.Canvas.fillStyle=this.BarCache.Color;
|
|
40122
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.BarCache.LineDotted)) this.Canvas.setLineDash(this.BarCache.LineDotted); //虚线
|
|
40123
|
+
if (this.BarCache.Type==1) this.Canvas.lineWidth=this.BarCache.Width;
|
|
40124
|
+
|
|
40070
40125
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
40071
40126
|
{
|
|
40072
40127
|
var value=this.Data.Data[i];
|
|
40073
|
-
if (value
|
|
40128
|
+
if (!value) continue;
|
|
40129
|
+
if (!IFrameSplitOperator.IsNumber(value.Value)) continue;
|
|
40074
40130
|
|
|
40075
40131
|
var price=value.Value;
|
|
40076
|
-
var price2=
|
|
40077
|
-
if (
|
|
40132
|
+
var price2=0;
|
|
40133
|
+
if (IFrameSplitOperator.IsNumber(value.Value2)) price2=value.Value2;
|
|
40078
40134
|
|
|
40079
40135
|
if (isMinute)
|
|
40080
40136
|
{
|
|
@@ -40087,103 +40143,79 @@ function ChartStickLine()
|
|
|
40087
40143
|
var x=left+(right-left)/2;
|
|
40088
40144
|
}
|
|
40089
40145
|
|
|
40090
|
-
var y=this.ChartFrame.GetYFromData(price);
|
|
40091
|
-
var y2=this.ChartFrame.GetYFromData(price2);
|
|
40146
|
+
var y=this.ChartFrame.GetYFromData(price,false);
|
|
40147
|
+
var y2=this.ChartFrame.GetYFromData(price2,false);
|
|
40092
40148
|
|
|
40093
40149
|
if (x>chartright) break;
|
|
40094
40150
|
|
|
40095
|
-
|
|
40096
|
-
|
|
40097
|
-
|
|
40098
|
-
{
|
|
40099
|
-
var left=x-barWidth/2;
|
|
40100
|
-
var width=barWidth;
|
|
40101
|
-
if (this.IsEmptyBar()) //空心
|
|
40102
|
-
{
|
|
40103
|
-
this.Canvas.beginPath();
|
|
40104
|
-
this.Canvas.rect(ToFixedPoint(Math.min(y,y2)),ToFixedPoint(left),ToFixedRect(Math.abs(y-y2)),ToFixedRect(width));
|
|
40105
|
-
this.Canvas.stroke();
|
|
40106
|
-
}
|
|
40107
|
-
else
|
|
40108
|
-
{
|
|
40109
|
-
this.Canvas.fillRect(ToFixedRect(Math.min(y,y2)),ToFixedRect(left),ToFixedRect(Math.abs(y-y2)),ToFixedRect(width));
|
|
40110
|
-
}
|
|
40111
|
-
}
|
|
40112
|
-
else
|
|
40113
|
-
{
|
|
40114
|
-
var left=x-barWidth/2;
|
|
40115
|
-
var width=barWidth;
|
|
40116
|
-
if (left+width>chartright) width=chartright-left; //不要超过右边框子
|
|
40117
|
-
if (this.IsEmptyBar()) //空心
|
|
40118
|
-
{
|
|
40119
|
-
if (emptyBGColor)
|
|
40120
|
-
this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(Math.min(y,y2)),ToFixedRect(width),ToFixedRect(Math.abs(y-y2)));
|
|
40151
|
+
var xCenter=x;
|
|
40152
|
+
var yTop=Math.min(y,y2);
|
|
40153
|
+
var barHeight=Math.abs(y-y2); //柱子高度
|
|
40121
40154
|
|
|
40122
|
-
|
|
40123
|
-
|
|
40124
|
-
|
|
40125
|
-
|
|
40126
|
-
|
|
40127
|
-
|
|
40128
|
-
|
|
40129
|
-
|
|
40130
|
-
|
|
40155
|
+
this.DrawBar(xCenter, yTop, barHeight);
|
|
40156
|
+
}
|
|
40157
|
+
|
|
40158
|
+
this.Canvas.restore();
|
|
40159
|
+
}
|
|
40160
|
+
|
|
40161
|
+
this.DrawBar=function(xCenter, ytop, barHeight)
|
|
40162
|
+
{
|
|
40163
|
+
if (barHeight<1) barHeight=1;
|
|
40164
|
+
|
|
40165
|
+
if (this.BarCache.Type==1) //线段
|
|
40166
|
+
{
|
|
40167
|
+
if (this.IsHScreen)
|
|
40168
|
+
{
|
|
40169
|
+
this.Canvas.beginPath();
|
|
40170
|
+
this.Canvas.moveTo(ytop,ToFixedPoint(xCenter));
|
|
40171
|
+
this.Canvas.lineTo(ytop+barHeight,ToFixedPoint(xCenter));
|
|
40172
|
+
this.Canvas.stroke();
|
|
40131
40173
|
}
|
|
40132
|
-
else
|
|
40174
|
+
else
|
|
40133
40175
|
{
|
|
40134
|
-
|
|
40176
|
+
this.Canvas.beginPath();
|
|
40177
|
+
this.Canvas.moveTo(ToFixedPoint(xCenter),ytop);
|
|
40178
|
+
this.Canvas.lineTo(ToFixedPoint(xCenter),ytop+barHeight);
|
|
40179
|
+
this.Canvas.stroke();
|
|
40180
|
+
}
|
|
40181
|
+
}
|
|
40182
|
+
else if (this.BarCache.Type==2) //柱子
|
|
40183
|
+
{
|
|
40184
|
+
if (this.IsHScreen)
|
|
40185
|
+
{
|
|
40186
|
+
var xLeft=xCenter-this.BarCache.Width/2;
|
|
40187
|
+
if (this.IsEmptyBar()) //空心
|
|
40135
40188
|
{
|
|
40136
|
-
if (
|
|
40137
|
-
|
|
40138
|
-
this.Canvas.beginPath();
|
|
40139
|
-
this.Canvas.rect(ToFixedPoint(Math.min(y,y2)),ToFixedPoint(xOffset),ToFixedRect(Math.abs(y-y2)),ToFixedRect(dataWidth));
|
|
40140
|
-
this.Canvas.stroke();
|
|
40141
|
-
}
|
|
40142
|
-
else
|
|
40143
|
-
{
|
|
40144
|
-
if (emptyBGColor)
|
|
40145
|
-
this.Canvas.fillRect(ToFixedRect(xOffset),ToFixedRect(Math.min(y,y2)),ToFixedRect(dataWidth),ToFixedRect(Math.abs(y-y2)));
|
|
40189
|
+
if (this.BarCache.EmptyBGColor) //背景色填充
|
|
40190
|
+
this.Canvas.fillRect(ToFixedRect(ytop),ToFixedRect(xLeft),ToFixedRect(barHeight),ToFixedRect(this.BarCache.Width));
|
|
40146
40191
|
|
|
40147
|
-
|
|
40148
|
-
|
|
40149
|
-
|
|
40150
|
-
}
|
|
40192
|
+
this.Canvas.beginPath();
|
|
40193
|
+
this.Canvas.rect(ToFixedPoint(ytop),ToFixedPoint(xLeft),ToFixedRect(barHeight),ToFixedRect(this.BarCache.Width));
|
|
40194
|
+
this.Canvas.stroke();
|
|
40151
40195
|
}
|
|
40152
40196
|
else
|
|
40153
40197
|
{
|
|
40154
|
-
|
|
40155
|
-
{
|
|
40156
|
-
this.Canvas.fillRect(ToFixedRect(Math.min(y,y2)),ToFixedRect(xOffset),ToFixedRect(Math.abs(y-y2)),ToFixedRect(dataWidth));
|
|
40157
|
-
}
|
|
40158
|
-
else
|
|
40159
|
-
{
|
|
40160
|
-
this.Canvas.fillRect(ToFixedRect(xOffset),ToFixedRect(Math.min(y,y2)),ToFixedRect(dataWidth),ToFixedRect(this.CalculateBarHeight(y,y2)));
|
|
40161
|
-
}
|
|
40162
|
-
|
|
40198
|
+
this.Canvas.fillRect(ToFixedRect(ytop),ToFixedRect(xLeft),ToFixedRect(barHeight),ToFixedRect(this.BarCache.Width));
|
|
40163
40199
|
}
|
|
40164
40200
|
}
|
|
40165
40201
|
else
|
|
40166
40202
|
{
|
|
40167
|
-
|
|
40203
|
+
var xLeft=xCenter-this.BarCache.Width/2;
|
|
40204
|
+
if (this.IsEmptyBar()) //空心
|
|
40168
40205
|
{
|
|
40206
|
+
if (this.BarCache.EmptyBGColor) //背景色填充
|
|
40207
|
+
this.Canvas.fillRect(ToFixedRect(xLeft),ToFixedRect(ytop),ToFixedRect(this.BarCache.Width),ToFixedRect(barHeight));
|
|
40208
|
+
|
|
40169
40209
|
this.Canvas.beginPath();
|
|
40170
|
-
this.Canvas.
|
|
40171
|
-
this.Canvas.lineTo(y2,ToFixedPoint(x));
|
|
40210
|
+
this.Canvas.rect(ToFixedPoint(xLeft),ToFixedPoint(ytop),ToFixedRect(this.BarCache.Width),ToFixedRect(barHeight));
|
|
40172
40211
|
this.Canvas.stroke();
|
|
40173
40212
|
}
|
|
40174
40213
|
else
|
|
40175
40214
|
{
|
|
40176
|
-
|
|
40177
|
-
this.Canvas.beginPath();
|
|
40178
|
-
this.Canvas.moveTo(xFix,y);
|
|
40179
|
-
if (Math.abs(y-y2)>0) this.Canvas.lineTo(xFix,y2);
|
|
40180
|
-
else this.Canvas.lineTo(xFix,y+1); //太窄了,就画一个像素的宽度
|
|
40181
|
-
this.Canvas.stroke();
|
|
40215
|
+
this.Canvas.fillRect(ToFixedRect(xLeft),ToFixedRect(ytop),ToFixedRect(this.BarCache.Width),ToFixedRect(barHeight));
|
|
40182
40216
|
}
|
|
40183
40217
|
}
|
|
40184
40218
|
}
|
|
40185
|
-
|
|
40186
|
-
this.Canvas.restore();
|
|
40187
40219
|
}
|
|
40188
40220
|
|
|
40189
40221
|
this.GetMaxMin=function()
|
|
@@ -75971,6 +76003,12 @@ function JSChartResource()
|
|
|
75971
76003
|
|
|
75972
76004
|
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
75973
76005
|
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
76006
|
+
|
|
76007
|
+
Mark:
|
|
76008
|
+
{
|
|
76009
|
+
LineColor:"rgba(255,165,0,0.6)",
|
|
76010
|
+
LineWidth:2,
|
|
76011
|
+
}
|
|
75974
76012
|
}
|
|
75975
76013
|
|
|
75976
76014
|
this.PopKLineChart=
|
|
@@ -77577,6 +77615,11 @@ function JSChartResource()
|
|
|
77577
77615
|
if (item.BorderColor) dest.BorderColor=item.BorderColor;
|
|
77578
77616
|
if (item.TitleColor) dest.TitleColor=item.TitleColor;
|
|
77579
77617
|
if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
|
|
77618
|
+
if (item.Mark)
|
|
77619
|
+
{
|
|
77620
|
+
if (item.Mark.LineColor) dest.Mark.LineColor=item.Mark.LineColor;
|
|
77621
|
+
if (IFrameSplitOperator.IsNumber(item.Mark.LineWidth)) dest.Mark.LineWidth=item.Mark.LineWidth;
|
|
77622
|
+
}
|
|
77580
77623
|
}
|
|
77581
77624
|
|
|
77582
77625
|
if (style.PopKLineChart)
|
|
@@ -81065,6 +81108,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81065
81108
|
this.ShowMinuteChartDialog=function(data, x,y)
|
|
81066
81109
|
{
|
|
81067
81110
|
if (!this.PopMinuteChart) return;
|
|
81111
|
+
if (!ChartData.IsDayPeriod(this.Period,true)) return; //只支持日K
|
|
81068
81112
|
if (!data.Tooltip || !data.Chart) return;
|
|
81069
81113
|
|
|
81070
81114
|
var pixelRatio=GetDevicePixelRatio();
|
|
@@ -81090,7 +81134,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81090
81134
|
|
|
81091
81135
|
if (!symbol) return;
|
|
81092
81136
|
|
|
81093
|
-
this.PopMinuteChart.Show({ Date:date, Symbol:symbol, Data:data.Tooltip.Data }, x/pixelRatio,y/pixelRatio);
|
|
81137
|
+
this.PopMinuteChart.Show({ Date:date, Symbol:symbol, Data:data.Tooltip.Data, Chart:data.Tooltip.ChartPaint }, x/pixelRatio,y/pixelRatio);
|
|
81094
81138
|
}
|
|
81095
81139
|
|
|
81096
81140
|
|
|
@@ -89916,17 +89960,17 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89916
89960
|
|
|
89917
89961
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
89918
89962
|
|
|
89963
|
+
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
89964
|
+
|
|
89919
89965
|
//回调事件
|
|
89920
89966
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN);
|
|
89921
89967
|
if (event && event.Callback)
|
|
89922
89968
|
{
|
|
89923
|
-
var sendData={ e:e, PreventDefault:false };
|
|
89969
|
+
var sendData={ e:e, KeyID:keyID, PreventDefault:false };
|
|
89924
89970
|
event.Callback(event, sendData, this);
|
|
89925
89971
|
if (sendData.PreventDefault) return;
|
|
89926
89972
|
}
|
|
89927
89973
|
|
|
89928
|
-
var keyID = e.keyCode ? e.keyCode :e.which;
|
|
89929
|
-
|
|
89930
89974
|
var draw=false;
|
|
89931
89975
|
if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
89932
89976
|
{
|
|
@@ -129559,6 +129603,11 @@ function GetBlackStyle()
|
|
|
129559
129603
|
{
|
|
129560
129604
|
BGColor:"rgba(0,0,0,0.85)",
|
|
129561
129605
|
BorderColor:"rgb(230,230,230)",
|
|
129606
|
+
|
|
129607
|
+
Mark:
|
|
129608
|
+
{
|
|
129609
|
+
LineColor:"rgba(255,215,0,0.6)",
|
|
129610
|
+
}
|
|
129562
129611
|
},
|
|
129563
129612
|
|
|
129564
129613
|
PopKLineChart:
|
|
@@ -144893,7 +144942,7 @@ function ScrollBarBGChart()
|
|
|
144893
144942
|
|
|
144894
144943
|
|
|
144895
144944
|
|
|
144896
|
-
var HQCHART_VERSION="1.1.
|
|
144945
|
+
var HQCHART_VERSION="1.1.14554";
|
|
144897
144946
|
|
|
144898
144947
|
function PrintHQChartVersion()
|
|
144899
144948
|
{
|