hqchart 1.1.12542 → 1.1.12549
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 +32 -19
- package/package.json +1 -1
- package/src/jscommon/umychart.js +306 -6
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +306 -6
- package/src/jscommon/umychart.vue/umychart.vue.js +306 -6
- package/src/jscommon/umychart.wechat/umychart.index.data.wechat.js +1 -1
- package/src/jscommon/umychart.wechat/umychart.version.wechat.js +1 -1
- package/src/jscommon/umychart.wechat/umychart.wechat.3.0.js +13 -1
|
@@ -5055,6 +5055,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5055
5055
|
|
|
5056
5056
|
if (item.TopSpace>=0) chart.Frame.SubFrame[i].Frame.ChartBorder.TopSpace=item.TopSpace;
|
|
5057
5057
|
if (item.BottomSpace>=0) chart.Frame.SubFrame[i].Frame.ChartBorder.BottomSpace=item.BottomSpace;
|
|
5058
|
+
|
|
5059
|
+
//是否显示关闭集合竞价按钮
|
|
5060
|
+
if (IFrameSplitOperator.IsNumber(item.CloseBeforeButton)) chart.Frame.SubFrame[i].Frame.IsShowCloseButton=item.CloseBeforeButton;
|
|
5058
5061
|
}
|
|
5059
5062
|
|
|
5060
5063
|
chart.UpdateXShowText();
|
|
@@ -24631,6 +24634,14 @@ ChartData.IsSecondPeriod=function(period)
|
|
|
24631
24634
|
return false;
|
|
24632
24635
|
}
|
|
24633
24636
|
|
|
24637
|
+
var CUSTOM_MILLISECOND_PERIOD_START=40000, CUSTOM_MILLISECOND_PERIOD_END=60000;
|
|
24638
|
+
ChartData.IsMilliSecondPeriod=function(period)
|
|
24639
|
+
{
|
|
24640
|
+
if (period>CUSTOM_MILLISECOND_PERIOD_START && period<=CUSTOM_MILLISECOND_PERIOD_END) return true;
|
|
24641
|
+
return false;
|
|
24642
|
+
}
|
|
24643
|
+
|
|
24644
|
+
|
|
24634
24645
|
|
|
24635
24646
|
//是否是分笔图 10=分笔
|
|
24636
24647
|
ChartData.IsTickPeriod=function(period)
|
|
@@ -51071,6 +51082,11 @@ function HQDateStringFormat()
|
|
|
51071
51082
|
var time = IFrameSplitOperator.FormatTimeString(currentData.Time,'HH:MM:SS');
|
|
51072
51083
|
this.Text = this.Text + " " + time;
|
|
51073
51084
|
}
|
|
51085
|
+
else if (ChartData.IsMilliSecondPeriod(this.Data.Period))
|
|
51086
|
+
{
|
|
51087
|
+
var time = IFrameSplitOperator.FormatTimeString(currentData.Time,'HH:MM:SS.fff');
|
|
51088
|
+
this.Text = this.Text + " " + time;
|
|
51089
|
+
}
|
|
51074
51090
|
else if (ChartData.IsTickPeriod(this.Data.Period)) //分笔
|
|
51075
51091
|
{
|
|
51076
51092
|
var time = IFrameSplitOperator.FormatTimeString(currentData.Time);
|
|
@@ -52173,6 +52189,11 @@ function DynamicKLineTitlePainting()
|
|
|
52173
52189
|
var text=IFrameSplitOperator.FormatTimeString(item.Time, "HH:MM:SS");
|
|
52174
52190
|
aryText.push({ Text:text, Color:this.DateTimeColor });
|
|
52175
52191
|
}
|
|
52192
|
+
else if (ChartData.IsMilliSecondPeriod(self.Period) && IFrameSplitOperator.IsNumber(item.Time))
|
|
52193
|
+
{
|
|
52194
|
+
var text=IFrameSplitOperator.FormatTimeString(item.Time, "HH:MM:SS.fff");
|
|
52195
|
+
aryText.push({ Text:text, Color:this.DateTimeColor });
|
|
52196
|
+
}
|
|
52176
52197
|
else if (isTickPeriod)
|
|
52177
52198
|
{
|
|
52178
52199
|
var text=IFrameSplitOperator.FormatTimeString(item.Time, "HH:MM:SS");
|
|
@@ -55448,6 +55469,32 @@ function IChartDrawPicture()
|
|
|
55448
55469
|
this.Canvas.restore();
|
|
55449
55470
|
}
|
|
55450
55471
|
|
|
55472
|
+
this.DrawArrow=function(ptStart,ptEnd)
|
|
55473
|
+
{
|
|
55474
|
+
//计算箭头
|
|
55475
|
+
var theta=35; //三角斜边一直线夹角
|
|
55476
|
+
var headlen=10; //三角斜边长度
|
|
55477
|
+
var angle = Math.atan2(ptStart.Y - ptEnd.Y, ptStart.X - ptEnd.X) * 180 / Math.PI,
|
|
55478
|
+
angle1 = (angle + theta) * Math.PI / 180,
|
|
55479
|
+
angle2 = (angle - theta) * Math.PI / 180,
|
|
55480
|
+
topX = headlen * Math.cos(angle1),
|
|
55481
|
+
topY = headlen * Math.sin(angle1),
|
|
55482
|
+
botX = headlen * Math.cos(angle2),
|
|
55483
|
+
botY = headlen * Math.sin(angle2);
|
|
55484
|
+
|
|
55485
|
+
this.Canvas.beginPath();
|
|
55486
|
+
var arrowX = ptEnd.X + topX;
|
|
55487
|
+
var arrowY = ptEnd.Y + topY;
|
|
55488
|
+
this.Canvas.moveTo(arrowX,arrowY);
|
|
55489
|
+
|
|
55490
|
+
this.Canvas.lineTo(ptEnd.X, ptEnd.Y);
|
|
55491
|
+
|
|
55492
|
+
arrowX = ptEnd.X + botX;
|
|
55493
|
+
arrowY = ptEnd.Y + botY;
|
|
55494
|
+
this.Canvas.lineTo(arrowX,arrowY);
|
|
55495
|
+
this.Canvas.stroke();
|
|
55496
|
+
}
|
|
55497
|
+
|
|
55451
55498
|
//计算2个点线的,左右的延长线的点
|
|
55452
55499
|
this.CalculateExtendLinePoint=function(ptStart,ptEnd)
|
|
55453
55500
|
{
|
|
@@ -56162,7 +56209,9 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
56162
56209
|
{ Name:"PriceNote", ClassName:"ChartDrawPriceNote", Create:function() { return new ChartDrawPriceNote();} },
|
|
56163
56210
|
{ Name:"FibWedge", ClassName:"ChartDrawFibWedge", Create:function(){ return new ChartDrawFibWedge(); }},
|
|
56164
56211
|
{ Name:"FibRetracement", ClassName:"ChartFibRetracement", Create:function() { return new ChartFibRetracement(); }}, //斐波那契回测
|
|
56165
|
-
{ Name:"FibSpeedResistanceFan", ClassName:"ChartFibSpeedResistanceFan", Create:function() { return new ChartFibSpeedResistanceFan(); }} //斐波那契扇形
|
|
56212
|
+
{ Name:"FibSpeedResistanceFan", ClassName:"ChartFibSpeedResistanceFan", Create:function() { return new ChartFibSpeedResistanceFan(); }}, //斐波那契扇形
|
|
56213
|
+
{ Name:"PriceRange", ClassName:"ChartPriceRange", Create:function() { return new ChartPriceRange(); }},
|
|
56214
|
+
{ Name:"DateRange", ClassName:"ChartDateRange", Create:function() { return new ChartDateRange(); }}
|
|
56166
56215
|
];
|
|
56167
56216
|
|
|
56168
56217
|
IChartDrawPicture.MapIonFont=new Map(
|
|
@@ -64171,6 +64220,239 @@ function ChartFibSpeedResistanceFan()
|
|
|
64171
64220
|
|
|
64172
64221
|
}
|
|
64173
64222
|
|
|
64223
|
+
|
|
64224
|
+
function ChartPriceRange()
|
|
64225
|
+
{
|
|
64226
|
+
this.newMethod=IChartDrawPicture; //派生
|
|
64227
|
+
this.newMethod();
|
|
64228
|
+
delete this.newMethod;
|
|
64229
|
+
|
|
64230
|
+
this.ClassName='ChartPriceRange';
|
|
64231
|
+
this.PointCount=2;
|
|
64232
|
+
this.Font=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
64233
|
+
this.TextColor=this.LineColor;
|
|
64234
|
+
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
64235
|
+
this.GetXYCoordinate=this.GetXYCoordinate_default;
|
|
64236
|
+
this.PointToValue_Default=this.PointToValue;
|
|
64237
|
+
this.OnlyMoveXIndex=true;
|
|
64238
|
+
this.IsSupportMagnet=true;
|
|
64239
|
+
this.LineWidth=1;
|
|
64240
|
+
this.EnableBGColor=true;
|
|
64241
|
+
this.BGColor=IChartDrawPicture.ColorToRGBA(this.LineColor,0.15);
|
|
64242
|
+
this.ExtendLine={ Left:false, Right: false }; //延长线
|
|
64243
|
+
|
|
64244
|
+
this.Label={ TextColor:"rgb(0,0,0)", BGColor:"rgb(211,211,211)", EnableBGColor:true, LeftMargin:5, RightMargin:5 };
|
|
64245
|
+
|
|
64246
|
+
this.Draw=function()
|
|
64247
|
+
{
|
|
64248
|
+
this.LinePoint=[];
|
|
64249
|
+
if (this.IsFrameMinSize()) return;
|
|
64250
|
+
var bCheckXY=true;
|
|
64251
|
+
if (this.ExtendLine.Left || this.ExtendLine.Right) bCheckXY=false;
|
|
64252
|
+
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
64253
|
+
if (!drawPoint) return;
|
|
64254
|
+
if (drawPoint.length!=2) return;
|
|
64255
|
+
|
|
64256
|
+
this.ClipFrame();
|
|
64257
|
+
|
|
64258
|
+
var ptStart=drawPoint[0];
|
|
64259
|
+
var ptEnd=drawPoint[1];
|
|
64260
|
+
|
|
64261
|
+
this.SetLineWidth();
|
|
64262
|
+
this.DrawRange(ptStart,ptEnd);
|
|
64263
|
+
this.RestoreLineWidth();
|
|
64264
|
+
|
|
64265
|
+
this.DrawPoint(drawPoint); //画点
|
|
64266
|
+
this.Canvas.restore();
|
|
64267
|
+
}
|
|
64268
|
+
|
|
64269
|
+
this.DrawRange=function(ptStart, ptEnd)
|
|
64270
|
+
{
|
|
64271
|
+
var yTop=Math.min(ptStart.Y, ptEnd.Y);
|
|
64272
|
+
var yBottom=Math.max(ptStart.Y, ptEnd.Y);
|
|
64273
|
+
var xLeft=Math.min(ptStart.X, ptEnd.X);
|
|
64274
|
+
var xRight=Math.max(ptStart.X, ptEnd.X);
|
|
64275
|
+
var height=yBottom-yTop;
|
|
64276
|
+
var xCenter=ptStart.X+(ptEnd.X-ptStart.X)/2;
|
|
64277
|
+
|
|
64278
|
+
if (this.ExtendLine.Right) xRight=this.Frame.ChartBorder.GetRight();
|
|
64279
|
+
if (this.ExtendLine.Left) xLeft=this.Frame.ChartBorder.GetLeft();
|
|
64280
|
+
|
|
64281
|
+
if (this.EnableBGColor)
|
|
64282
|
+
{
|
|
64283
|
+
var rtBG={ Left:xLeft, Top:yTop, Right:xRight, Bottom:yBottom };
|
|
64284
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
64285
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
64286
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
64287
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
64288
|
+
}
|
|
64289
|
+
|
|
64290
|
+
|
|
64291
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
64292
|
+
this.Canvas.beginPath();
|
|
64293
|
+
this.Canvas.moveTo(xLeft,ToFixedPoint(yTop));
|
|
64294
|
+
this.Canvas.lineTo(xRight,ToFixedPoint(yTop));
|
|
64295
|
+
|
|
64296
|
+
this.Canvas.moveTo(xLeft,ToFixedPoint(yBottom));
|
|
64297
|
+
this.Canvas.lineTo(xRight,ToFixedPoint(yBottom));
|
|
64298
|
+
|
|
64299
|
+
this.Canvas.moveTo(ToFixedPoint(xCenter),ToFixedPoint(yTop));
|
|
64300
|
+
this.Canvas.lineTo(ToFixedPoint(xCenter),ToFixedPoint(yBottom));
|
|
64301
|
+
this.Canvas.stroke();
|
|
64302
|
+
|
|
64303
|
+
this.LinePoint.push({ Start:{X:xLeft, Y:yTop}, End:{X:xRight, Y:yTop} });
|
|
64304
|
+
this.LinePoint.push({ Start:{X:xLeft, Y:yBottom}, End:{X:xRight, Y:yBottom} });
|
|
64305
|
+
this.LinePoint.push({ Start:{X:xCenter, Y:yTop}, End:{X:xCenter, Y:yBottom} });
|
|
64306
|
+
|
|
64307
|
+
this.DrawArrow({X:ToFixedPoint(xCenter), Y:ptStart.Y}, {X:ToFixedPoint(xCenter), Y:ptEnd.Y});
|
|
64308
|
+
|
|
64309
|
+
//文字输出
|
|
64310
|
+
var startValue=this.Frame.GetYData(ptStart.Y,false);
|
|
64311
|
+
var endValue=this.Frame.GetYData(ptEnd.Y,false);
|
|
64312
|
+
var diffValue=endValue-startValue;
|
|
64313
|
+
var rate=(diffValue/startValue)*100;
|
|
64314
|
+
var text=`${diffValue.toFixed(2)} (${rate.toFixed(2)}%)`;
|
|
64315
|
+
|
|
64316
|
+
this.Canvas.font=this.Font;
|
|
64317
|
+
var textHeight=this.GetFontHeight();
|
|
64318
|
+
var textWidth=this.Canvas.measureText(text).width+4+(this.Label.LeftMargin+this.Label.RightMargin);
|
|
64319
|
+
var rtTextBG={ Left:xCenter-textWidth/2, Width:textWidth, Height:textHeight+2 };
|
|
64320
|
+
if (diffValue>0) rtTextBG.Top=ptEnd.Y-rtTextBG.Height-4;
|
|
64321
|
+
else rtTextBG.Top=ptEnd.Y+4;
|
|
64322
|
+
rtTextBG.Bottom=rtTextBG.Top+rtTextBG.Height;
|
|
64323
|
+
|
|
64324
|
+
if (this.Label.EnableBGColor)
|
|
64325
|
+
{
|
|
64326
|
+
var path=new Path2D();
|
|
64327
|
+
path.roundRect(ToFixedPoint(rtTextBG.Left), ToFixedPoint(rtTextBG.Top), ToFixedRect(rtTextBG.Width), ToFixedRect(rtTextBG.Height), [3]);
|
|
64328
|
+
this.Canvas.fillStyle=this.Label.BGColor;
|
|
64329
|
+
this.Canvas.fill(path);
|
|
64330
|
+
}
|
|
64331
|
+
|
|
64332
|
+
this.Canvas.fillStyle=this.Label.TextColor;
|
|
64333
|
+
this.Canvas.textAlign="left";
|
|
64334
|
+
this.Canvas.textBaseline="bottom";
|
|
64335
|
+
this.Canvas.fillText(text,rtTextBG.Left+2+this.Label.LeftMargin,rtTextBG.Bottom-2);
|
|
64336
|
+
}
|
|
64337
|
+
|
|
64338
|
+
}
|
|
64339
|
+
|
|
64340
|
+
|
|
64341
|
+
function ChartDateRange()
|
|
64342
|
+
{
|
|
64343
|
+
this.newMethod=IChartDrawPicture; //派生
|
|
64344
|
+
this.newMethod();
|
|
64345
|
+
delete this.newMethod;
|
|
64346
|
+
|
|
64347
|
+
this.ClassName='ChartDateRange';
|
|
64348
|
+
this.PointCount=2;
|
|
64349
|
+
this.Font=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
64350
|
+
this.TextColor=this.LineColor;
|
|
64351
|
+
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
64352
|
+
this.GetXYCoordinate=this.GetXYCoordinate_default;
|
|
64353
|
+
this.PointToValue_Default=this.PointToValue;
|
|
64354
|
+
this.OnlyMoveXIndex=true;
|
|
64355
|
+
this.IsSupportMagnet=true;
|
|
64356
|
+
this.LineWidth=1;
|
|
64357
|
+
this.EnableBGColor=true;
|
|
64358
|
+
this.BGColor=IChartDrawPicture.ColorToRGBA(this.LineColor,0.15);
|
|
64359
|
+
this.ExtendLine={ Top:false, Bottom: false }; //延长线
|
|
64360
|
+
|
|
64361
|
+
this.Label={ TextColor:"rgb(0,0,0)", BGColor:"rgb(211,211,211)", EnableBGColor:true, LeftMargin:5, RightMargin:5 };
|
|
64362
|
+
|
|
64363
|
+
this.Draw=function()
|
|
64364
|
+
{
|
|
64365
|
+
this.LinePoint=[];
|
|
64366
|
+
if (this.IsFrameMinSize()) return;
|
|
64367
|
+
var bCheckXY=true;
|
|
64368
|
+
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
64369
|
+
if (!drawPoint) return;
|
|
64370
|
+
if (drawPoint.length!=2) return;
|
|
64371
|
+
|
|
64372
|
+
this.ClipFrame();
|
|
64373
|
+
|
|
64374
|
+
var ptStart=drawPoint[0];
|
|
64375
|
+
var ptEnd=drawPoint[1];
|
|
64376
|
+
|
|
64377
|
+
this.SetLineWidth();
|
|
64378
|
+
this.DrawRange(ptStart,ptEnd);
|
|
64379
|
+
this.RestoreLineWidth();
|
|
64380
|
+
|
|
64381
|
+
this.DrawPoint(drawPoint); //画点
|
|
64382
|
+
this.Canvas.restore();
|
|
64383
|
+
}
|
|
64384
|
+
|
|
64385
|
+
this.DrawRange=function(ptStart, ptEnd)
|
|
64386
|
+
{
|
|
64387
|
+
var yTop=Math.min(ptStart.Y, ptEnd.Y);
|
|
64388
|
+
var yBottom=Math.max(ptStart.Y, ptEnd.Y);
|
|
64389
|
+
var xLeft=Math.min(ptStart.X, ptEnd.X);
|
|
64390
|
+
var xRight=Math.max(ptStart.X, ptEnd.X);
|
|
64391
|
+
var height=yBottom-yTop;
|
|
64392
|
+
var width=xRight-xLeft;
|
|
64393
|
+
var yCenter=ptStart.Y+(ptEnd.Y-ptStart.Y)/2;
|
|
64394
|
+
var xCenter=ptStart.X+(ptEnd.X-ptStart.X)/2;
|
|
64395
|
+
|
|
64396
|
+
if (this.ExtendLine.Top) yTop=this.Frame.ChartBorder.GetTopEx();
|
|
64397
|
+
if (this.ExtendLine.Bottom) yBottom=this.Frame.ChartBorder.GetBottomEx();
|
|
64398
|
+
|
|
64399
|
+
if (this.EnableBGColor)
|
|
64400
|
+
{
|
|
64401
|
+
var rtBG={ Left:xLeft, Top:yTop, Right:xRight, Bottom:yBottom };
|
|
64402
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
64403
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
64404
|
+
this.Canvas.fillStyle=this.BGColor;
|
|
64405
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
64406
|
+
}
|
|
64407
|
+
|
|
64408
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
64409
|
+
this.Canvas.beginPath();
|
|
64410
|
+
this.Canvas.moveTo(ToFixedPoint(xLeft),yTop);
|
|
64411
|
+
this.Canvas.lineTo(ToFixedPoint(xLeft),yBottom);
|
|
64412
|
+
|
|
64413
|
+
this.Canvas.moveTo(ToFixedPoint(xRight),yTop);
|
|
64414
|
+
this.Canvas.lineTo(ToFixedPoint(xRight),yBottom);
|
|
64415
|
+
|
|
64416
|
+
this.Canvas.moveTo(ToFixedPoint(xLeft),ToFixedPoint(yCenter));
|
|
64417
|
+
this.Canvas.lineTo(ToFixedPoint(xRight),ToFixedPoint(yCenter));
|
|
64418
|
+
this.Canvas.stroke();
|
|
64419
|
+
|
|
64420
|
+
this.LinePoint.push({ Start:{X:xLeft, Y:yTop}, End:{X:xLeft, Y:yBottom} });
|
|
64421
|
+
this.LinePoint.push({ Start:{X:xRight, Y:yTop}, End:{X:xRight, Y:yBottom} });
|
|
64422
|
+
this.LinePoint.push({ Start:{X:xLeft, Y:yCenter}, End:{X:xRight, Y:yCenter} });
|
|
64423
|
+
|
|
64424
|
+
this.DrawArrow({X:ptStart.X, Y:ToFixedPoint(yCenter)}, {X:ptEnd.X, Y:ToFixedPoint(yCenter)});
|
|
64425
|
+
|
|
64426
|
+
|
|
64427
|
+
//文字输出
|
|
64428
|
+
var startIndex=this.Frame.GetXData(ptStart.X,false);
|
|
64429
|
+
var endIndex=this.Frame.GetXData(ptEnd.X,false);
|
|
64430
|
+
var barCount=endIndex-startIndex+1;
|
|
64431
|
+
var text=`${barCount} bars`;
|
|
64432
|
+
|
|
64433
|
+
this.Canvas.font=this.Font;
|
|
64434
|
+
var textHeight=this.GetFontHeight();
|
|
64435
|
+
var textWidth=this.Canvas.measureText(text).width+4+(this.Label.LeftMargin+this.Label.RightMargin);
|
|
64436
|
+
var rtTextBG={ Left:xCenter-textWidth/2, Top:ptEnd.Y+4, Width:textWidth, Height:textHeight+2 };
|
|
64437
|
+
rtTextBG.Bottom=rtTextBG.Top+rtTextBG.Height;
|
|
64438
|
+
|
|
64439
|
+
if (this.Label.EnableBGColor)
|
|
64440
|
+
{
|
|
64441
|
+
var path=new Path2D();
|
|
64442
|
+
path.roundRect(ToFixedPoint(rtTextBG.Left), ToFixedPoint(rtTextBG.Top), ToFixedRect(rtTextBG.Width), ToFixedRect(rtTextBG.Height), [3]);
|
|
64443
|
+
this.Canvas.fillStyle=this.Label.BGColor;
|
|
64444
|
+
this.Canvas.fill(path);
|
|
64445
|
+
}
|
|
64446
|
+
|
|
64447
|
+
this.Canvas.fillStyle=this.Label.TextColor;
|
|
64448
|
+
this.Canvas.textAlign="left";
|
|
64449
|
+
this.Canvas.textBaseline="bottom";
|
|
64450
|
+
this.Canvas.fillText(text,rtTextBG.Left+2+this.Label.LeftMargin,rtTextBG.Bottom-2);
|
|
64451
|
+
|
|
64452
|
+
}
|
|
64453
|
+
}
|
|
64454
|
+
|
|
64455
|
+
|
|
64174
64456
|
function ChartDrawStorage()
|
|
64175
64457
|
{
|
|
64176
64458
|
this.DrawData=new Map(); //画图工具数据 key=symbol-Period, value=Map() Key:Guid, Value:{Guid, Symbol, Period, ClassName, Value}
|
|
@@ -69586,6 +69868,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
69586
69868
|
if (ChartData.IsDayPeriod(self.Period,true)) self.RecvRealtimeData(data);
|
|
69587
69869
|
else if (ChartData.IsMinutePeriod(self.Period,true)) self.RecvMinuteRealtimeData(data);
|
|
69588
69870
|
else if (ChartData.IsSecondPeriod(self.Period)) self.RecvMinuteRealtimeData(data);
|
|
69871
|
+
else if (ChartData.IsMilliSecondPeriod(self.Period)) self.RecvMinuteRealtimeData(data);
|
|
69589
69872
|
}
|
|
69590
69873
|
}
|
|
69591
69874
|
event.Callback(event,data,this);
|
|
@@ -71090,10 +71373,12 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71090
71373
|
if (this.SourceData.DataType!=0) isDataTypeChange=true;
|
|
71091
71374
|
}
|
|
71092
71375
|
else if ((period>CUSTOM_MINUTE_PERIOD_START && period<=CUSTOM_MINUTE_PERIOD_END) ||
|
|
71093
|
-
(period>CUSTOM_SECOND_PERIOD_START && period<=CUSTOM_SECOND_PERIOD_END)
|
|
71376
|
+
(period>CUSTOM_SECOND_PERIOD_START && period<=CUSTOM_SECOND_PERIOD_END) ||
|
|
71377
|
+
(period>CUSTOM_MILLISECOND_PERIOD_START && period<=CUSTOM_MILLISECOND_PERIOD_END) )
|
|
71094
71378
|
{
|
|
71095
71379
|
if (this.SourceData.DataType!=1) isDataTypeChange=true;
|
|
71096
71380
|
else if (ChartData.IsSecondPeriod(period)) isDataTypeChange=true;
|
|
71381
|
+
else if (ChartData.IsMilliSecondPeriod(period)) isDataTypeChange=true;
|
|
71097
71382
|
}
|
|
71098
71383
|
else
|
|
71099
71384
|
{
|
|
@@ -71170,7 +71455,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71170
71455
|
this.RequestHistoryData(); //请求日线数据
|
|
71171
71456
|
//this.ReqeustKLineInfoData();
|
|
71172
71457
|
}
|
|
71173
|
-
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period))
|
|
71458
|
+
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period) || ChartData.IsMilliSecondPeriod(this.Period))
|
|
71174
71459
|
{
|
|
71175
71460
|
this.CancelAutoUpdate(); //先停止定时器
|
|
71176
71461
|
this.AutoUpdateEvent(false,'KLineChartContainer::ChangePeriod'); //切换周期先停止更新
|
|
@@ -71219,7 +71504,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71219
71504
|
this.ResetScrollBar();
|
|
71220
71505
|
this.RequestHistoryData(); //请求日线数据
|
|
71221
71506
|
}
|
|
71222
|
-
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period))
|
|
71507
|
+
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period) || ChartData.IsMilliSecondPeriod(this.Period))
|
|
71223
71508
|
{
|
|
71224
71509
|
this.CancelAutoUpdate(); //先停止定时器
|
|
71225
71510
|
this.AutoUpdateEvent(false,'KLineChartContainer::ChangeRight'); //切换复权先停止更新
|
|
@@ -71705,7 +71990,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71705
71990
|
this.ResetOverlaySymbolStatus();
|
|
71706
71991
|
this.RequestHistoryData(); //请求日线数据
|
|
71707
71992
|
}
|
|
71708
|
-
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period))
|
|
71993
|
+
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period) || ChartData.IsMilliSecondPeriod(this.Period))
|
|
71709
71994
|
{
|
|
71710
71995
|
this.ResetOverlaySymbolStatus();
|
|
71711
71996
|
this.ReqeustHistoryMinuteData(); //请求分钟数据
|
|
@@ -72552,7 +72837,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72552
72837
|
this.RequestHistoryData(); //请求日线数据
|
|
72553
72838
|
//this.ReqeustKLineInfoData();
|
|
72554
72839
|
}
|
|
72555
|
-
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period))
|
|
72840
|
+
else if (ChartData.IsMinutePeriod(this.Period,true) || ChartData.IsSecondPeriod(this.Period) || ChartData.IsMilliSecondPeriod(this.Period))
|
|
72556
72841
|
{
|
|
72557
72842
|
this.ReqeustHistoryMinuteData(); //请求分钟数据
|
|
72558
72843
|
}
|
|
@@ -75209,6 +75494,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
75209
75494
|
|
|
75210
75495
|
this.DayOffset={ Offset:0, ShowDayCount:-1, DataOffset:0, DayCount:1, }; //Offset 日期偏移 , DataOffset数据偏移
|
|
75211
75496
|
this.PageInfo={ Enable:false, Offset:-8888, ShowDayCount:4 }; //分页配置
|
|
75497
|
+
this.DataStatus={ MultiDay:false, LatestDay:false }; //MultiDay=多日 LatestDay:当天
|
|
75212
75498
|
|
|
75213
75499
|
this.ZoomStepPixel=50;
|
|
75214
75500
|
|
|
@@ -77576,6 +77862,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
77576
77862
|
this.DayOffset.PageInfo=null;
|
|
77577
77863
|
}
|
|
77578
77864
|
|
|
77865
|
+
this.ResetDataStatus=function()
|
|
77866
|
+
{
|
|
77867
|
+
this.DataStatus.MultiDay=false;
|
|
77868
|
+
this.DataStatus.LatestDay=false;
|
|
77869
|
+
}
|
|
77870
|
+
|
|
77579
77871
|
//切换股票代码
|
|
77580
77872
|
this.ChangeSymbol=function(symbol,option)
|
|
77581
77873
|
{
|
|
@@ -77584,6 +77876,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
77584
77876
|
this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeSymbol");
|
|
77585
77877
|
this.Symbol=symbol;
|
|
77586
77878
|
this.ResetDayOffset();
|
|
77879
|
+
this.ResetDataStatus();
|
|
77587
77880
|
this.ClearIndexPaint(); //清空指标
|
|
77588
77881
|
this.ResetOverlaySymbolStatus();
|
|
77589
77882
|
this.ReloadChartDrawPicture();
|
|
@@ -77685,6 +77978,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
77685
77978
|
{
|
|
77686
77979
|
this.ReloadChartDrawPicture();
|
|
77687
77980
|
}
|
|
77981
|
+
|
|
77982
|
+
this.ResetDataStatus();
|
|
77688
77983
|
this.ClearIndexPaint(); //清空指标
|
|
77689
77984
|
this.ResetOverlaySymbolStatus();
|
|
77690
77985
|
this.RequestData();
|
|
@@ -77965,6 +78260,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
77965
78260
|
this.MultiDayBeforeOpenData=MinuteChartContainer.JosnDataToBeforeOpenDataArray(data);
|
|
77966
78261
|
this.MultiDayAfterCloseData=MinuteChartContainer.JosnDataToAfterCloseDataArray(data);
|
|
77967
78262
|
var updateTime=MinuteChartContainer.JsonDataToHistoryMinuteLastUpdateTime(data);
|
|
78263
|
+
|
|
78264
|
+
this.DataStatus.MultiDay=true;
|
|
78265
|
+
|
|
77968
78266
|
this.CaclutateCallCationYRange();
|
|
77969
78267
|
this.Symbol=data.symbol;
|
|
77970
78268
|
this.Name=data.name;
|
|
@@ -78542,6 +78840,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
78542
78840
|
|
|
78543
78841
|
if (this.IsBeforeData) this.BeforeOpenData=beforeOpenData;
|
|
78544
78842
|
if (this.IsAfterData) this.AfterCloseData=afterCloseData;
|
|
78843
|
+
|
|
78844
|
+
this.DataStatus.LatestDay=true;
|
|
78545
78845
|
|
|
78546
78846
|
if (this.DayCount>1) //多日走势图
|
|
78547
78847
|
{
|
|
@@ -3178,7 +3178,7 @@ JSIndexScript.prototype.TEST = function ()
|
|
|
3178
3178
|
"DRAWBAND(OPEN,RGB(0,224,224),CLOSE,RGB(255,96,96));"
|
|
3179
3179
|
//"T2:IF(KDJ.J>-10,KDJ.J#WEEK,0);"
|
|
3180
3180
|
*/
|
|
3181
|
-
Script:"
|
|
3181
|
+
Script:"DRAWICON(C>=H,H, 1, 'draw_1');"
|
|
3182
3182
|
|
|
3183
3183
|
//"DRAWGBK_DIV(C>O,RGB(221 ,160 ,221),RGB(100 ,250, 250),1,1);"
|
|
3184
3184
|
/*
|
|
@@ -8109,6 +8109,8 @@ function MinuteChartContainer(uielement)
|
|
|
8109
8109
|
this.MinuteApiUrl = g_JSChartResource.Domain + "/API/Stock";
|
|
8110
8110
|
this.HistoryMinuteApiUrl = g_JSChartResource.Domain + "/API/StockMinuteData"; //历史分钟数据
|
|
8111
8111
|
|
|
8112
|
+
this.DataStatus={ MultiDay:false, LatestDay:false }; //MultiDay=多日 LatestDay:当天
|
|
8113
|
+
|
|
8112
8114
|
//手机拖拽
|
|
8113
8115
|
this.ontouchstart = function (e)
|
|
8114
8116
|
{
|
|
@@ -8840,6 +8842,12 @@ function MinuteChartContainer(uielement)
|
|
|
8840
8842
|
}
|
|
8841
8843
|
}
|
|
8842
8844
|
|
|
8845
|
+
this.ResetDataStatus=function()
|
|
8846
|
+
{
|
|
8847
|
+
this.DataStatus.MultiDay=false;
|
|
8848
|
+
this.DataStatus.LatestDay=false;
|
|
8849
|
+
}
|
|
8850
|
+
|
|
8843
8851
|
//切换股票代码
|
|
8844
8852
|
this.ChangeSymbol = function (symbol)
|
|
8845
8853
|
{
|
|
@@ -8847,6 +8855,7 @@ function MinuteChartContainer(uielement)
|
|
|
8847
8855
|
this.CancelAutoUpdate(); //先停止定时器
|
|
8848
8856
|
this.ChartSplashPaint.SetTitle(this.LoadDataSplashTitle);
|
|
8849
8857
|
this.ChartSplashPaint.EnableSplash(true);
|
|
8858
|
+
this.ResetDataStatus();
|
|
8850
8859
|
this.ClearIndexPaint();
|
|
8851
8860
|
this.RequestData();
|
|
8852
8861
|
}
|
|
@@ -8856,6 +8865,7 @@ function MinuteChartContainer(uielement)
|
|
|
8856
8865
|
if (count < 0 || count > 10) return;
|
|
8857
8866
|
this.DayCount = count;
|
|
8858
8867
|
this.CancelAutoUpdate(); //先停止定时器
|
|
8868
|
+
this.ResetDataStatus();
|
|
8859
8869
|
this.ClearIndexPaint();
|
|
8860
8870
|
this.RequestData();
|
|
8861
8871
|
}
|
|
@@ -8962,6 +8972,7 @@ function MinuteChartContainer(uielement)
|
|
|
8962
8972
|
this.DayData = MinuteChartContainer.JsonDataToMinuteDataArray(data);;
|
|
8963
8973
|
this.Symbol = data.symbol;
|
|
8964
8974
|
this.Name = data.name;
|
|
8975
|
+
this.DataStatus.MultiDay=true;
|
|
8965
8976
|
|
|
8966
8977
|
if (IFrameSplitOperator.IsNonEmptyArray(this.DayData))
|
|
8967
8978
|
{
|
|
@@ -9141,7 +9152,8 @@ function MinuteChartContainer(uielement)
|
|
|
9141
9152
|
}
|
|
9142
9153
|
|
|
9143
9154
|
var aryMinuteData = MinuteChartContainer.JsonDataToMinuteData(data.data);
|
|
9144
|
-
|
|
9155
|
+
this.DataStatus.LatestDay=true;
|
|
9156
|
+
|
|
9145
9157
|
if (this.DayCount > 1) //多日走势图
|
|
9146
9158
|
{
|
|
9147
9159
|
this.UpdateLatestMinuteData(aryMinuteData, data.data.stock[0].date);
|