hqchart 1.1.13059 → 1.1.13065
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 +34 -13
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +37 -0
- package/src/jscommon/umychart.js +436 -4
- package/src/jscommon/umychart.style.js +6 -0
- package/src/jscommon/umychart.testdata.js +37 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +443 -5
- 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 +443 -5
|
@@ -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;
|
|
@@ -9196,7 +9212,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9196
9212
|
var item=this.ExtendChartPaint[i];
|
|
9197
9213
|
if (item.IsCallbackDraw)
|
|
9198
9214
|
{
|
|
9199
|
-
if (["KLineYAxisBGPaint","DepthMapPaint","BackgroundPaint","MinuteBackgroundPaint"].includes(item.ClassName))
|
|
9215
|
+
if (["KLineYAxisBGPaint","DepthMapPaint","BackgroundPaint","MinuteBackgroundPaint", "SessionBreaksPaint"].includes(item.ClassName))
|
|
9200
9216
|
{
|
|
9201
9217
|
if (item.FrameID==frame.Identify) item.Draw();
|
|
9202
9218
|
}
|
|
@@ -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;
|
|
@@ -42904,7 +42921,8 @@ function ExtendChartPaintFactory()
|
|
|
42904
42921
|
[
|
|
42905
42922
|
["FrameSplitPaint", { Create:function() { return new FrameSplitPaint(); } }],
|
|
42906
42923
|
["RectSelectPaint", { Create:function() { return new RectSelectPaint(); } }],
|
|
42907
|
-
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }]
|
|
42924
|
+
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
42925
|
+
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}]
|
|
42908
42926
|
]
|
|
42909
42927
|
);
|
|
42910
42928
|
|
|
@@ -47162,6 +47180,266 @@ function DragMovePaint()
|
|
|
47162
47180
|
}
|
|
47163
47181
|
|
|
47164
47182
|
|
|
47183
|
+
function SessionBreaksPaint()
|
|
47184
|
+
{
|
|
47185
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
47186
|
+
this.newMethod();
|
|
47187
|
+
delete this.newMethod;
|
|
47188
|
+
|
|
47189
|
+
this.ClassName='SessionBreaksPaint';
|
|
47190
|
+
this.IsDynamic=false;
|
|
47191
|
+
this.IsCallbackDraw=true; //在回调函数里绘制, 不在Draw()中绘制
|
|
47192
|
+
this.FrameID=0;
|
|
47193
|
+
this.KDataFeature; //数据特征 { Symbol, Period, DataCount }
|
|
47194
|
+
this.Data;
|
|
47195
|
+
this.ChartFrame;
|
|
47196
|
+
|
|
47197
|
+
this.BGColor=g_JSChartResource.SessionBreaksPaint.BGColor.slice();
|
|
47198
|
+
this.SplitLine=
|
|
47199
|
+
{
|
|
47200
|
+
Color:g_JSChartResource.SessionBreaksPaint.SplitLine.Color,
|
|
47201
|
+
Width:g_JSChartResource.SessionBreaksPaint.SplitLine.Width,
|
|
47202
|
+
Dash:g_JSChartResource.SessionBreaksPaint.SplitLine.Dash
|
|
47203
|
+
};
|
|
47204
|
+
|
|
47205
|
+
this.MapPeriod=new Map(
|
|
47206
|
+
[
|
|
47207
|
+
[0, { SplitType:1 }], //日
|
|
47208
|
+
[1, { SplitType:1 }], //周
|
|
47209
|
+
[2, { SplitType:2 }], //月
|
|
47210
|
+
[21, { SplitType:2 }], //双周
|
|
47211
|
+
|
|
47212
|
+
[4, { SplitType:3 }], //1分钟
|
|
47213
|
+
[5, { SplitType:3 }], //5分钟
|
|
47214
|
+
[6, { SplitType:3 }], //15分钟
|
|
47215
|
+
[7, { SplitType:3 }],
|
|
47216
|
+
[8, { SplitType:3 }],
|
|
47217
|
+
]); //周期和分割对应关系
|
|
47218
|
+
|
|
47219
|
+
this.SetOption=function(option) //设置
|
|
47220
|
+
{
|
|
47221
|
+
if (option.FrameID>0) this.FrameID=option.FrameID;
|
|
47222
|
+
}
|
|
47223
|
+
|
|
47224
|
+
this.Draw=function()
|
|
47225
|
+
{
|
|
47226
|
+
if (!this.HQChart) return;
|
|
47227
|
+
var hisData=this.HQChart.ChartOperator_Temp_GetHistroyData();;
|
|
47228
|
+
if (!hisData) return; //数据还没有到达
|
|
47229
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(hisData.Data)) return;
|
|
47230
|
+
|
|
47231
|
+
if (this.IsKDataChange(hisData))
|
|
47232
|
+
{
|
|
47233
|
+
this.BuildCacheData(hisData);
|
|
47234
|
+
}
|
|
47235
|
+
|
|
47236
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data)) return;
|
|
47237
|
+
|
|
47238
|
+
var mainFrame=this.HQChart.Frame.SubFrame[0].Frame;
|
|
47239
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
47240
|
+
var dataWidth=mainFrame.DataWidth;
|
|
47241
|
+
var distanceWidth=mainFrame.DistanceWidth;
|
|
47242
|
+
var xPointCount=mainFrame.XPointCount;
|
|
47243
|
+
|
|
47244
|
+
if (bHScreen)
|
|
47245
|
+
{
|
|
47246
|
+
var border=this.ChartBorder.GetHScreenBorder();
|
|
47247
|
+
var chartright=border.BottomEx;
|
|
47248
|
+
var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
47249
|
+
}
|
|
47250
|
+
else
|
|
47251
|
+
{
|
|
47252
|
+
var border=this.ChartBorder.GetBorder();
|
|
47253
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
47254
|
+
var chartright=border.RightEx;
|
|
47255
|
+
}
|
|
47256
|
+
|
|
47257
|
+
var preID=null;
|
|
47258
|
+
var aryBG=[];
|
|
47259
|
+
var bgItem=null;
|
|
47260
|
+
for(var i=hisData.DataOffset,j=0;i<hisData.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
47261
|
+
{
|
|
47262
|
+
var item=this.Data[i];
|
|
47263
|
+
if (!item) continue;
|
|
47264
|
+
|
|
47265
|
+
var left=xOffset;
|
|
47266
|
+
var right=xOffset+dataWidth;
|
|
47267
|
+
if (right>chartright) break;
|
|
47268
|
+
var x=left+(right-left)/2;
|
|
47269
|
+
|
|
47270
|
+
var xStart=left-distanceWidth/2;
|
|
47271
|
+
var xEnd=right+distanceWidth/2;
|
|
47272
|
+
|
|
47273
|
+
var id=item.ID;
|
|
47274
|
+
if (!IFrameSplitOperator.IsNumber(id)) continue;
|
|
47275
|
+
|
|
47276
|
+
if (preID==null)
|
|
47277
|
+
{
|
|
47278
|
+
bgItem={ Start:{ X:xStart }, End:{ X:xEnd }, ColorIndex:id, Count:1, IsStart:false, IsEnd:false };
|
|
47279
|
+
preID=id;
|
|
47280
|
+
if (i-1>=0)
|
|
47281
|
+
{
|
|
47282
|
+
var preItem=this.Data[i-1];
|
|
47283
|
+
if (preItem && preItem.ID!=id) bgItem.IsStart=true;
|
|
47284
|
+
}
|
|
47285
|
+
}
|
|
47286
|
+
else if (preID!=id)
|
|
47287
|
+
{
|
|
47288
|
+
bgItem.End.X=xStart;
|
|
47289
|
+
bgItem.IsEnd=true;
|
|
47290
|
+
aryBG.push(bgItem);
|
|
47291
|
+
|
|
47292
|
+
bgItem={ Start:{ X:xStart }, End:{ X:xEnd }, ColorIndex:id, Count:1, IsStart:true, IsEnd:false };
|
|
47293
|
+
preID=id;
|
|
47294
|
+
}
|
|
47295
|
+
else
|
|
47296
|
+
{
|
|
47297
|
+
bgItem.End.X=xEnd;
|
|
47298
|
+
++bgItem.Count;
|
|
47299
|
+
}
|
|
47300
|
+
}
|
|
47301
|
+
|
|
47302
|
+
if (bgItem && bgItem.Count>=2) aryBG.push(bgItem);
|
|
47303
|
+
|
|
47304
|
+
this.Canvas.save();
|
|
47305
|
+
this.DrawBG(aryBG);
|
|
47306
|
+
this.Canvas.restore();
|
|
47307
|
+
}
|
|
47308
|
+
|
|
47309
|
+
this.DrawBG=function(aryBG)
|
|
47310
|
+
{
|
|
47311
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryBG)) return;
|
|
47312
|
+
|
|
47313
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
47314
|
+
if (bHScreen)
|
|
47315
|
+
{
|
|
47316
|
+
var border=this.ChartBorder.GetHScreenBorder();
|
|
47317
|
+
var top=border.RightEx;
|
|
47318
|
+
var bottom=border.Left;
|
|
47319
|
+
var height=bottom-top;
|
|
47320
|
+
}
|
|
47321
|
+
else
|
|
47322
|
+
{
|
|
47323
|
+
var border=this.ChartBorder.GetBorder();
|
|
47324
|
+
var top=border.TopEx;
|
|
47325
|
+
var bottom=border.BottomEx;
|
|
47326
|
+
var height=bottom-top;
|
|
47327
|
+
}
|
|
47328
|
+
|
|
47329
|
+
|
|
47330
|
+
var bDrawSplitLine=false;
|
|
47331
|
+
if (this.SplitLine.Color) bDrawSplitLine=true;
|
|
47332
|
+
var lineCount=0;
|
|
47333
|
+
for(var i=0;i<aryBG.length;++i)
|
|
47334
|
+
{
|
|
47335
|
+
var item=aryBG[i];
|
|
47336
|
+
var xLeft=item.Start.X;
|
|
47337
|
+
var xRight=item.End.X;
|
|
47338
|
+
|
|
47339
|
+
var index=item.ColorIndex%this.BGColor.length;
|
|
47340
|
+
var bgColor=this.BGColor[index];
|
|
47341
|
+
if (bgColor)
|
|
47342
|
+
{
|
|
47343
|
+
this.Canvas.fillStyle=bgColor;
|
|
47344
|
+
if (bHScreen)
|
|
47345
|
+
this.Canvas.fillRect(ToFixedPoint(top),ToFixedPoint(xLeft),ToFixedRect(height),ToFixedRect(xRight-xLeft));
|
|
47346
|
+
else
|
|
47347
|
+
this.Canvas.fillRect(ToFixedPoint(xLeft),ToFixedPoint(top),ToFixedRect(xRight-xLeft),ToFixedRect(height));
|
|
47348
|
+
}
|
|
47349
|
+
|
|
47350
|
+
if (bDrawSplitLine && item.IsStart)
|
|
47351
|
+
{
|
|
47352
|
+
if (lineCount==0) this.Canvas.beginPath();
|
|
47353
|
+
if (bHScreen)
|
|
47354
|
+
{
|
|
47355
|
+
this.Canvas.moveTo(top, ToFixedPoint(xLeft));
|
|
47356
|
+
this.Canvas.lineTo(bottom, ToFixedPoint(xLeft));
|
|
47357
|
+
}
|
|
47358
|
+
else
|
|
47359
|
+
{
|
|
47360
|
+
this.Canvas.moveTo(ToFixedPoint(xLeft), top);
|
|
47361
|
+
this.Canvas.lineTo(ToFixedPoint(xLeft), bottom);
|
|
47362
|
+
}
|
|
47363
|
+
|
|
47364
|
+
++lineCount;
|
|
47365
|
+
}
|
|
47366
|
+
}
|
|
47367
|
+
|
|
47368
|
+
if (bDrawSplitLine && lineCount>=1)
|
|
47369
|
+
{
|
|
47370
|
+
if (this.SplitLine.Width>=1) this.Canvas.linewidth=this.SplitLine.Width;
|
|
47371
|
+
if (this.SplitLine.Dash) this.Canvas.setLineDash(this.SplitLine.Dash);
|
|
47372
|
+
if (this.SplitLine.Color) this.Canvas.strokeStyle=this.SplitLine.Color;
|
|
47373
|
+
|
|
47374
|
+
this.Canvas.stroke();
|
|
47375
|
+
}
|
|
47376
|
+
}
|
|
47377
|
+
|
|
47378
|
+
this.IsKDataChange=function(hisData)
|
|
47379
|
+
{
|
|
47380
|
+
if (!this.KDataFeature) return true;
|
|
47381
|
+
|
|
47382
|
+
if (this.KDataFeature.Symbol!=this.HQChart.Symbol) return true;
|
|
47383
|
+
if (this.KDataFeature.Period!=this.HQChart.Period) return true;
|
|
47384
|
+
if (this.KDataFeature.DataCount!=hisData.Data.length) return true;
|
|
47385
|
+
|
|
47386
|
+
return false;
|
|
47387
|
+
}
|
|
47388
|
+
|
|
47389
|
+
this.BuildCacheData=function(hisData)
|
|
47390
|
+
{
|
|
47391
|
+
var period=this.HQChart.Period;
|
|
47392
|
+
if (!this.MapPeriod.has(period))
|
|
47393
|
+
{
|
|
47394
|
+
this.Data=[];
|
|
47395
|
+
this.KDataFeature={ Symbol:this.HQChart.Symbol, Period:period, DataCount:hisData.Data.length };
|
|
47396
|
+
return;
|
|
47397
|
+
}
|
|
47398
|
+
|
|
47399
|
+
var splitType=this.MapPeriod.get(period).SplitType; //1=month 2=year 3=day 4=1hour
|
|
47400
|
+
|
|
47401
|
+
var startDate=0;
|
|
47402
|
+
var index=-1;
|
|
47403
|
+
this.Data=[];
|
|
47404
|
+
for(var i=0;i<hisData.Data.length;++i)
|
|
47405
|
+
{
|
|
47406
|
+
var item=hisData.Data[i];
|
|
47407
|
+
switch(splitType)
|
|
47408
|
+
{
|
|
47409
|
+
case 1: //月
|
|
47410
|
+
if (parseInt(item.Date/100)!=parseInt(startDate/100))
|
|
47411
|
+
{
|
|
47412
|
+
startDate=item.Date;
|
|
47413
|
+
++index;
|
|
47414
|
+
}
|
|
47415
|
+
this.Data.push({ ID:index, Date:item.Date });
|
|
47416
|
+
break;
|
|
47417
|
+
case 2: //年
|
|
47418
|
+
if (parseInt(item.Date/10000)!=parseInt(startDate/10000))
|
|
47419
|
+
{
|
|
47420
|
+
startDate=item.Date;
|
|
47421
|
+
++index;
|
|
47422
|
+
}
|
|
47423
|
+
this.Data.push({ ID:index, Date:item.Date });
|
|
47424
|
+
break;
|
|
47425
|
+
case 3: //日
|
|
47426
|
+
if (item.Date!=startDate)
|
|
47427
|
+
{
|
|
47428
|
+
startDate=item.Date;
|
|
47429
|
+
++index;
|
|
47430
|
+
}
|
|
47431
|
+
this.Data.push({ ID:index, Date:item.Date });
|
|
47432
|
+
break;
|
|
47433
|
+
}
|
|
47434
|
+
|
|
47435
|
+
}
|
|
47436
|
+
|
|
47437
|
+
|
|
47438
|
+
this.KDataFeature={ Symbol:this.HQChart.Symbol, Period:period, DataCount:hisData.Data.length };
|
|
47439
|
+
}
|
|
47440
|
+
}
|
|
47441
|
+
|
|
47442
|
+
|
|
47165
47443
|
|
|
47166
47444
|
//弹幕数据 { X:X偏移, Y:Y偏移, Text:内容, Color:颜色 }
|
|
47167
47445
|
function BarrageList()
|
|
@@ -67407,6 +67685,12 @@ function JSChartResource()
|
|
|
67407
67685
|
Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
67408
67686
|
}
|
|
67409
67687
|
|
|
67688
|
+
this.SessionBreaksPaint=
|
|
67689
|
+
{
|
|
67690
|
+
BGColor:[null, "rgb(245,246,246)"],
|
|
67691
|
+
SplitLine:{ Color:'rgb(73,133,231)', Width:1*GetDevicePixelRatio(), Dash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()] }
|
|
67692
|
+
}
|
|
67693
|
+
|
|
67410
67694
|
|
|
67411
67695
|
//成交明细
|
|
67412
67696
|
this.DealList=
|
|
@@ -68351,6 +68635,19 @@ function JSChartResource()
|
|
|
68351
68635
|
if (item.Font) this.DragMovePaint.Font=item.Font;
|
|
68352
68636
|
}
|
|
68353
68637
|
|
|
68638
|
+
if (style.SessionBreaksPaint)
|
|
68639
|
+
{
|
|
68640
|
+
var item=style.SessionBreaksPaint;
|
|
68641
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.BGColor)) this.SessionBreaksPaint.BGColor=item.BGColor.slice();
|
|
68642
|
+
if (item.SplitLine)
|
|
68643
|
+
{
|
|
68644
|
+
var subItem=item.SplitLine;
|
|
68645
|
+
if (subItem.Color) this.SessionBreaksPaint.SplitLine.Color=subItem.Color;
|
|
68646
|
+
if (IFrameSplitOperator.IsNumber(subItem.Width)) this.SessionBreaksPaint.SplitLine.Width=subItem.Width;
|
|
68647
|
+
this.SessionBreaksPaint.SplitLine.Dash=subItem.Dash;
|
|
68648
|
+
}
|
|
68649
|
+
}
|
|
68650
|
+
|
|
68354
68651
|
if (IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle)) this.ToolbarButtonStyle=style.ToolbarButtonStyle;
|
|
68355
68652
|
|
|
68356
68653
|
if (style.Buttons)
|
|
@@ -76483,7 +76780,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76483
76780
|
this.DataStatus={ MultiDay:false, LatestDay:false }; //MultiDay=多日 LatestDay:当天
|
|
76484
76781
|
|
|
76485
76782
|
this.ZoomStepPixel=50;
|
|
76486
|
-
|
|
76487
76783
|
|
|
76488
76784
|
//集合竞价设置 obj={ Left:true/false, Right:true/false, MultiDay:{Left:, Right:} }
|
|
76489
76785
|
this.SetCallCationDataBorder=function(obj)
|
|
@@ -81471,6 +81767,105 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81471
81767
|
|
|
81472
81768
|
return false;
|
|
81473
81769
|
}
|
|
81770
|
+
|
|
81771
|
+
this.ClearSelectedXBorder=function()
|
|
81772
|
+
{
|
|
81773
|
+
if (!this.GlobalOption || !this.GlobalOption.SelectedXBorder) return;
|
|
81774
|
+
var item=this.GlobalOption.SelectedXBorder;
|
|
81775
|
+
item.Date=null;
|
|
81776
|
+
}
|
|
81777
|
+
|
|
81778
|
+
this.DrawSelectedXBorder=function()
|
|
81779
|
+
{
|
|
81780
|
+
if (this.DayCount<=1) return null;
|
|
81781
|
+
if (this.Frame.IsHScreen===true) return null;
|
|
81782
|
+
|
|
81783
|
+
if (!this.GlobalOption || !this.GlobalOption.SelectedXBorder) return;
|
|
81784
|
+
var item=this.GlobalOption.SelectedXBorder;
|
|
81785
|
+
if (!IFrameSplitOperator.IsPlusNumber(item.Mode)) return;
|
|
81786
|
+
if (!IFrameSplitOperator.IsPlusNumber(item.Date)) return;
|
|
81787
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.DayData)) return;
|
|
81788
|
+
|
|
81789
|
+
var rtSelected=null;
|
|
81790
|
+
var dayIndex=item.DayIndex;
|
|
81791
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
81792
|
+
var rtClient={ Left:border.Left, Top:border.Top, Right:border.Right, Bottom: border.Bottom };
|
|
81793
|
+
rtClient.Width=rtClient.Right-rtClient.Left;
|
|
81794
|
+
var mainFrame=this.Frame.SubFrame[0].Frame; //主图框架
|
|
81795
|
+
var xPointCount=mainFrame.XPointCount;
|
|
81796
|
+
var minuteCount=mainFrame.MinuteCount;
|
|
81797
|
+
var lDayCount=xPointCount/minuteCount;
|
|
81798
|
+
var dayWidth=rtClient.Width/lDayCount;
|
|
81799
|
+
|
|
81800
|
+
if (border.DayBorder)
|
|
81801
|
+
{
|
|
81802
|
+
|
|
81803
|
+
}
|
|
81804
|
+
else
|
|
81805
|
+
{
|
|
81806
|
+
var dayIndex=-1;
|
|
81807
|
+
for(var i=0;i<this.DayData.length;++i)
|
|
81808
|
+
{
|
|
81809
|
+
var dayItem=this.DayData[i];
|
|
81810
|
+
if (dayItem.Date==item.Date)
|
|
81811
|
+
{
|
|
81812
|
+
dayIndex=this.DayData.length-1-i;
|
|
81813
|
+
break;
|
|
81814
|
+
}
|
|
81815
|
+
}
|
|
81816
|
+
|
|
81817
|
+
if (dayIndex<0) return;
|
|
81818
|
+
|
|
81819
|
+
rtSelected={ Left:border.Left+dayIndex*dayWidth, Width:dayWidth, Top:border.Bottom, Bottom:border.ChartHeight };
|
|
81820
|
+
rtSelected.Right=rtSelected.Left+rtSelected.Width;
|
|
81821
|
+
rtSelected.Height=rtSelected.Bottom-rtSelected.Top;
|
|
81822
|
+
}
|
|
81823
|
+
|
|
81824
|
+
|
|
81825
|
+
mainFrame.Canvas.strokeStyle=g_JSChartResource.SelFrameBorderColor;
|
|
81826
|
+
mainFrame.Canvas.strokeRect(ToFixedPoint(rtSelected.Left),ToFixedPoint(rtSelected.Top),ToFixedRect(rtSelected.Width),ToFixedRect(rtSelected.Height)-1);
|
|
81827
|
+
}
|
|
81828
|
+
|
|
81829
|
+
this.PtInMulitDayMinute=function(x,y)
|
|
81830
|
+
{
|
|
81831
|
+
if (this.DayCount<=1) return null;
|
|
81832
|
+
if (this.Frame.IsHScreen===true) return null;
|
|
81833
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.DayData)) return null;
|
|
81834
|
+
|
|
81835
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
81836
|
+
var rtClient={ Left:border.Left, Top:border.Top, Right:border.Right, Bottom: border.Bottom };
|
|
81837
|
+
rtClient.Width=rtClient.Right-rtClient.Left;
|
|
81838
|
+
if (!(x>rtClient.Left && x<rtClient.Right && y>rtClient.Top && y<rtClient.Bottom)) return null; //不在窗口里面
|
|
81839
|
+
|
|
81840
|
+
if (border.DayBorder)
|
|
81841
|
+
{
|
|
81842
|
+
|
|
81843
|
+
}
|
|
81844
|
+
else
|
|
81845
|
+
{
|
|
81846
|
+
var mainFrame=this.Frame.SubFrame[0].Frame; //主图框架
|
|
81847
|
+
var xPointCount=mainFrame.XPointCount;
|
|
81848
|
+
var minuteCount=mainFrame.MinuteCount;
|
|
81849
|
+
var lDayCount=xPointCount/minuteCount;
|
|
81850
|
+
var dayWidth=rtClient.Width/lDayCount;
|
|
81851
|
+
var rtDay={ Left:rtClient.Left, Right:dayWidth+rtClient.Left };
|
|
81852
|
+
for(var i=0;i<lDayCount;++i)
|
|
81853
|
+
{
|
|
81854
|
+
if (x>=rtDay.Left && x<=rtDay.Right)
|
|
81855
|
+
{
|
|
81856
|
+
var dayItem=this.DayData[this.DayData.length-1-i];
|
|
81857
|
+
if (!dayItem) return null;
|
|
81858
|
+
|
|
81859
|
+
return dayItem.Date;
|
|
81860
|
+
}
|
|
81861
|
+
|
|
81862
|
+
rtDay.Left+=dayWidth;
|
|
81863
|
+
rtDay.Right+=dayWidth;
|
|
81864
|
+
}
|
|
81865
|
+
}
|
|
81866
|
+
|
|
81867
|
+
return null;
|
|
81868
|
+
}
|
|
81474
81869
|
}
|
|
81475
81870
|
|
|
81476
81871
|
//盘前数据
|
|
@@ -88639,6 +89034,39 @@ function KLineRightMenu(divElement)
|
|
|
88639
89034
|
return data;
|
|
88640
89035
|
}
|
|
88641
89036
|
|
|
89037
|
+
this.GetBGSplit=function(chart)
|
|
89038
|
+
{
|
|
89039
|
+
var data=
|
|
89040
|
+
[
|
|
89041
|
+
{
|
|
89042
|
+
text: "启用",
|
|
89043
|
+
click: function ()
|
|
89044
|
+
{
|
|
89045
|
+
chart.CreateExtendChart("SessionBreaksPaint", { });
|
|
89046
|
+
chart.Draw();
|
|
89047
|
+
}
|
|
89048
|
+
},
|
|
89049
|
+
{
|
|
89050
|
+
text: "关闭",
|
|
89051
|
+
click: function ()
|
|
89052
|
+
{
|
|
89053
|
+
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
89054
|
+
if (finder)
|
|
89055
|
+
{
|
|
89056
|
+
chart.DeleteExtendChartByID(finder.Chart.ID);
|
|
89057
|
+
chart.Draw();
|
|
89058
|
+
}
|
|
89059
|
+
}
|
|
89060
|
+
},
|
|
89061
|
+
];
|
|
89062
|
+
|
|
89063
|
+
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
89064
|
+
if (finder) data[0].selected=true;
|
|
89065
|
+
else data[1].selected=true;
|
|
89066
|
+
|
|
89067
|
+
return data;
|
|
89068
|
+
}
|
|
89069
|
+
|
|
88642
89070
|
|
|
88643
89071
|
this.GetKLineInfo=function(chart)
|
|
88644
89072
|
{
|
|
@@ -88745,6 +89173,10 @@ function KLineRightMenu(divElement)
|
|
|
88745
89173
|
{
|
|
88746
89174
|
text:"工具",
|
|
88747
89175
|
children:this.GetTools(chart)
|
|
89176
|
+
},
|
|
89177
|
+
{
|
|
89178
|
+
text:"背景分割",
|
|
89179
|
+
children:this.GetBGSplit(chart)
|
|
88748
89180
|
}
|
|
88749
89181
|
];
|
|
88750
89182
|
|
|
@@ -119821,6 +120253,12 @@ function GetBlackStyle()
|
|
|
119821
120253
|
TextColor:"rgb(255,255,255)",
|
|
119822
120254
|
//Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
119823
120255
|
},
|
|
120256
|
+
|
|
120257
|
+
SessionBreaksPaint:
|
|
120258
|
+
{
|
|
120259
|
+
BGColor:[null, "rgb(42,46,57)"],
|
|
120260
|
+
SplitLine:{ Color:'rgb(73,133,231)', Width:1*GetDevicePixelRatio(), Dash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()] }
|
|
120261
|
+
},
|
|
119824
120262
|
|
|
119825
120263
|
//成交明细
|
|
119826
120264
|
DealList:
|
|
@@ -130393,7 +130831,7 @@ function HQChartScriptWorker()
|
|
|
130393
130831
|
|
|
130394
130832
|
|
|
130395
130833
|
|
|
130396
|
-
var HQCHART_VERSION="1.1.
|
|
130834
|
+
var HQCHART_VERSION="1.1.13064";
|
|
130397
130835
|
|
|
130398
130836
|
function PrintHQChartVersion()
|
|
130399
130837
|
{
|