hqchart 1.1.14133 → 1.1.14143
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 +47 -39
- package/package.json +1 -1
- package/src/jscommon/umychart.PopMinuteChart.js +2 -0
- package/src/jscommon/umychart.TReport.js +154 -4
- package/src/jscommon/umychart.js +187 -56
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +188 -57
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +344 -61
|
@@ -4550,10 +4550,24 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4550
4550
|
if(option.KLineTitle)
|
|
4551
4551
|
{
|
|
4552
4552
|
var item=option.KLineTitle;
|
|
4553
|
+
var chartTitle=chart.TitlePaint[0];
|
|
4553
4554
|
if(option.KLineTitle.IsShowName==false) chart.TitlePaint[0].IsShowName=false;
|
|
4554
4555
|
if(option.KLineTitle.IsShowSettingInfo==false) chart.TitlePaint[0].IsShowSettingInfo=false;
|
|
4555
4556
|
if(option.KLineTitle.IsShow == false) chart.TitlePaint[0].IsShow = false;
|
|
4556
4557
|
if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
|
|
4558
|
+
|
|
4559
|
+
if (item.ShowPostion) //显示位置高级配置
|
|
4560
|
+
{
|
|
4561
|
+
var subItem=item.ShowPostion;
|
|
4562
|
+
if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
|
|
4563
|
+
if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
|
|
4564
|
+
if (subItem.Margin)
|
|
4565
|
+
{
|
|
4566
|
+
if (IFrameSplitOperator.IsNumber(subItem.Margin.Left)) chartTitle.ShowPositionConfig.Margin.Left=subItem.Margin.Left;
|
|
4567
|
+
if (IFrameSplitOperator.IsNumber(subItem.Margin.Right)) chartTitle.ShowPositionConfig.Margin.Right=subItem.Margin.Right;
|
|
4568
|
+
if (IFrameSplitOperator.IsNumber(subItem.Margin.Bottom)) chartTitle.ShowPositionConfig.Margin.Bottom=subItem.Margin.Bottom;
|
|
4569
|
+
}
|
|
4570
|
+
}
|
|
4557
4571
|
}
|
|
4558
4572
|
|
|
4559
4573
|
//叠加股票
|
|
@@ -5047,14 +5061,26 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5047
5061
|
if(option.MinuteTitle)
|
|
5048
5062
|
{
|
|
5049
5063
|
var item=option.MinuteTitle;
|
|
5064
|
+
var chartTitle=chart.TitlePaint[0];
|
|
5050
5065
|
if(IFrameSplitOperator.IsBool(item.IsShowName)) chart.TitlePaint[0].IsShowName=item.IsShowName;
|
|
5051
5066
|
if(IFrameSplitOperator.IsBool(item.IsShowDate)) chart.TitlePaint[0].IsShowDate=item.IsShowDate;
|
|
5052
5067
|
if(IFrameSplitOperator.IsBool(item.IsShowTime)) chart.TitlePaint[0].IsShowTime=item.IsShowTime;
|
|
5053
5068
|
if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
|
|
5054
5069
|
if(IFrameSplitOperator.IsBool(item.IsAlwaysShowLastData)) chart.TitlePaint[0].IsAlwaysShowLastData=item.IsAlwaysShowLastData;
|
|
5055
5070
|
if(IFrameSplitOperator.IsNumber(item.ShowLastDataFormat)) chart.TitlePaint[0].ShowLastDataFormat=item.ShowLastDataFormat;
|
|
5056
|
-
if (IFrameSplitOperator.IsNumber(item.TitleBaseLine)) chart.TitlePaint[0].TitleBaseLine=item.TitleBaseLine;
|
|
5057
5071
|
if (item.TimeFormat) chart.TitlePaint[0].TimeFormat=item.TimeFormat;
|
|
5072
|
+
if (item.ShowPostion) //显示位置高级配置
|
|
5073
|
+
{
|
|
5074
|
+
var subItem=item.ShowPostion;
|
|
5075
|
+
if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
|
|
5076
|
+
if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
|
|
5077
|
+
if (subItem.Margin)
|
|
5078
|
+
{
|
|
5079
|
+
if (IFrameSplitOperator.IsNumber(subItem.Margin.Left)) chartTitle.ShowPositionConfig.Margin.Left=subItem.Margin.Left;
|
|
5080
|
+
if (IFrameSplitOperator.IsNumber(subItem.Margin.Right)) chartTitle.ShowPositionConfig.Margin.Right=subItem.Margin.Right;
|
|
5081
|
+
if (IFrameSplitOperator.IsNumber(subItem.Margin.Bottom)) chartTitle.ShowPositionConfig.Margin.Bottom=subItem.Margin.Bottom;
|
|
5082
|
+
}
|
|
5083
|
+
}
|
|
5058
5084
|
}
|
|
5059
5085
|
|
|
5060
5086
|
if (IFrameSplitOperator.IsBool(option.CorssCursorTouchEnd)) chart.CorssCursorTouchEnd = option.CorssCursorTouchEnd;
|
|
@@ -39427,8 +39453,6 @@ function ChartDrawLastBarText()
|
|
|
39427
39453
|
YOffset:g_JSChartResource.DRAWICON.Icon.YOffset //Direction==2的向下偏移
|
|
39428
39454
|
};
|
|
39429
39455
|
|
|
39430
|
-
this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
|
|
39431
|
-
|
|
39432
39456
|
this.ReloadResource=function(resource)
|
|
39433
39457
|
{
|
|
39434
39458
|
this.TextSize=
|
|
@@ -39443,8 +39467,7 @@ function ChartDrawLastBarText()
|
|
|
39443
39467
|
Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize, //图标的最大最小值
|
|
39444
39468
|
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value }, //放大倍数
|
|
39445
39469
|
};
|
|
39446
|
-
|
|
39447
|
-
this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
|
|
39470
|
+
|
|
39448
39471
|
}
|
|
39449
39472
|
|
|
39450
39473
|
this.Draw=function()
|
|
@@ -39495,15 +39518,28 @@ function ChartDrawLastBarText()
|
|
|
39495
39518
|
this.Canvas.textBaseline=textBaseline;
|
|
39496
39519
|
this.Canvas.textAlign=textAlign;
|
|
39497
39520
|
this.Canvas.fillStyle = item.Color;
|
|
39498
|
-
|
|
39521
|
+
|
|
39522
|
+
if (this.IsHScreen)
|
|
39523
|
+
{
|
|
39524
|
+
this.Canvas.save();
|
|
39525
|
+
this.Canvas.translate(y, x);
|
|
39526
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
39527
|
+
this.Canvas.fillText(item.Text,0,0);
|
|
39528
|
+
this.Canvas.restore();
|
|
39529
|
+
}
|
|
39530
|
+
else
|
|
39531
|
+
{
|
|
39532
|
+
this.Canvas.fillText(item.Text, x, y);
|
|
39533
|
+
}
|
|
39499
39534
|
}
|
|
39500
39535
|
|
|
39501
39536
|
this.DrawLastIcon=function(item,x,y)
|
|
39502
39537
|
{
|
|
39538
|
+
var icon=item.Icon;
|
|
39503
39539
|
var dataWidth=this.ChartFrame.DataWidth;
|
|
39504
39540
|
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
39505
39541
|
var iconSize=this.GetDynamicIconSize(dataWidth,distanceWidth,this.IconSize.Max,this.IconSize.Min,this.IconSize.Zoom);
|
|
39506
|
-
var font=`${iconSize}px ${
|
|
39542
|
+
var font=`${iconSize}px ${icon.Family}`;
|
|
39507
39543
|
|
|
39508
39544
|
var textBaseline='bottom';
|
|
39509
39545
|
if (item.TextBaseline) textBaseline=item.TextBaseline;
|
|
@@ -39514,7 +39550,20 @@ function ChartDrawLastBarText()
|
|
|
39514
39550
|
this.Canvas.textBaseline=textBaseline;
|
|
39515
39551
|
this.Canvas.textAlign=textAlign;
|
|
39516
39552
|
this.Canvas.fillStyle = item.Color;
|
|
39517
|
-
|
|
39553
|
+
|
|
39554
|
+
if (this.IsHScreen)
|
|
39555
|
+
{
|
|
39556
|
+
this.Canvas.save();
|
|
39557
|
+
this.Canvas.translate(y, x);
|
|
39558
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
39559
|
+
this.Canvas.fillText(icon.Symbol,0,0);
|
|
39560
|
+
this.Canvas.restore();
|
|
39561
|
+
}
|
|
39562
|
+
else
|
|
39563
|
+
{
|
|
39564
|
+
this.Canvas.fillText(icon.Symbol, x, y);
|
|
39565
|
+
}
|
|
39566
|
+
|
|
39518
39567
|
}
|
|
39519
39568
|
|
|
39520
39569
|
this.GetMaxMin=function()
|
|
@@ -57983,6 +58032,7 @@ function DynamicKLineTitlePainting()
|
|
|
57983
58032
|
this.IsShowSettingInfo=true; //是否显示设置信息(周期 复权)
|
|
57984
58033
|
this.IsShowDateTime=true; //是否显示日期
|
|
57985
58034
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
58035
|
+
this.ShowPositionConfig={ Margin:{ Bottom:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
|
|
57986
58036
|
this.OnDrawEvent;
|
|
57987
58037
|
this.OnMouseMoveEvent;
|
|
57988
58038
|
this.HQChart;
|
|
@@ -58215,25 +58265,104 @@ function DynamicKLineTitlePainting()
|
|
|
58215
58265
|
return result;
|
|
58216
58266
|
}
|
|
58217
58267
|
|
|
58268
|
+
this.GetLeft=function(isHScreen)
|
|
58269
|
+
{
|
|
58270
|
+
if (isHScreen)
|
|
58271
|
+
{
|
|
58272
|
+
var left=this.Frame.ChartBorder.GetTop();
|
|
58273
|
+
if (this.ShowPositionConfig)
|
|
58274
|
+
{
|
|
58275
|
+
var item=this.ShowPositionConfig;
|
|
58276
|
+
if (item.Type===1) left=0;
|
|
58277
|
+
if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Left)) left+=item.Margin.Left;
|
|
58278
|
+
}
|
|
58279
|
+
return left;
|
|
58280
|
+
}
|
|
58281
|
+
else
|
|
58282
|
+
{
|
|
58283
|
+
var left=this.Frame.ChartBorder.GetLeft();
|
|
58284
|
+
if (this.ShowPositionConfig)
|
|
58285
|
+
{
|
|
58286
|
+
var item=this.ShowPositionConfig;
|
|
58287
|
+
if (item.Type===1) left=0;
|
|
58288
|
+
if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Left)) left+=item.Margin.Left;
|
|
58289
|
+
}
|
|
58290
|
+
return left;
|
|
58291
|
+
}
|
|
58292
|
+
}
|
|
58293
|
+
|
|
58294
|
+
this.GetRight=function(isHScreen)
|
|
58295
|
+
{
|
|
58296
|
+
if (isHScreen)
|
|
58297
|
+
{
|
|
58298
|
+
var right = this.Frame.ChartBorder.GetHeight();
|
|
58299
|
+
if (this.ShowPositionConfig)
|
|
58300
|
+
{
|
|
58301
|
+
var item=this.ShowPositionConfig;
|
|
58302
|
+
if (item.Type===1) right=this.Frame.ChartBorder.GetChartHeight();
|
|
58303
|
+
if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Right)) right-=item.Margin.Right;
|
|
58304
|
+
}
|
|
58305
|
+
|
|
58306
|
+
return right;
|
|
58307
|
+
}
|
|
58308
|
+
else
|
|
58309
|
+
{
|
|
58310
|
+
var right = this.Frame.ChartBorder.GetRight();
|
|
58311
|
+
if (this.ShowPositionConfig)
|
|
58312
|
+
{
|
|
58313
|
+
var item=this.ShowPositionConfig;
|
|
58314
|
+
if (item.Type===1) right=this.Frame.ChartBorder.GetChartWidth();
|
|
58315
|
+
if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Right)) right-=item.Margin.Right;
|
|
58316
|
+
}
|
|
58317
|
+
|
|
58318
|
+
return right;
|
|
58319
|
+
}
|
|
58320
|
+
|
|
58321
|
+
}
|
|
58322
|
+
|
|
58323
|
+
this.GetBottom=function(isHScreen)
|
|
58324
|
+
{
|
|
58325
|
+
if (isHScreen)
|
|
58326
|
+
{
|
|
58327
|
+
var bottom=this.Frame.ChartBorder.GetRight();
|
|
58328
|
+
if (this.ShowPositionConfig)
|
|
58329
|
+
{
|
|
58330
|
+
var item=this.ShowPositionConfig;
|
|
58331
|
+
if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Bottom)) bottom+=item.Margin.Bottom;
|
|
58332
|
+
}
|
|
58333
|
+
|
|
58334
|
+
return bottom;
|
|
58335
|
+
}
|
|
58336
|
+
else
|
|
58337
|
+
{
|
|
58338
|
+
var bottom = this.Frame.ChartBorder.GetTop();
|
|
58339
|
+
if (this.ShowPositionConfig)
|
|
58340
|
+
{
|
|
58341
|
+
var item=this.ShowPositionConfig;
|
|
58342
|
+
if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Bottom)) bottom-=item.Margin.Bottom;
|
|
58343
|
+
}
|
|
58344
|
+
|
|
58345
|
+
return bottom;
|
|
58346
|
+
}
|
|
58347
|
+
|
|
58348
|
+
}
|
|
58349
|
+
|
|
58218
58350
|
this.DrawItem=function(item)
|
|
58219
58351
|
{
|
|
58220
58352
|
var isHScreen=this.Frame.IsHScreen===true;
|
|
58221
|
-
var left=this.
|
|
58222
|
-
var
|
|
58223
|
-
|
|
58224
|
-
|
|
58225
|
-
//var upperSymbol=this.Symbol.toUpperCase();
|
|
58353
|
+
var left=this.GetLeft(isHScreen);
|
|
58354
|
+
var right=this.GetRight(isHScreen);
|
|
58355
|
+
|
|
58356
|
+
var bottom=this.GetBottom(isHScreen);
|
|
58226
58357
|
var pixelRatio=GetDevicePixelRatio();
|
|
58227
58358
|
if (isHScreen)
|
|
58228
58359
|
{
|
|
58229
58360
|
if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
|
|
58230
|
-
var
|
|
58231
|
-
var
|
|
58232
|
-
var right=this.Frame.ChartBorder.GetHeight();
|
|
58233
|
-
var xText=this.Frame.ChartBorder.GetChartWidth();
|
|
58234
|
-
var yText=this.Frame.ChartBorder.GetTop();
|
|
58361
|
+
var xText=bottom;
|
|
58362
|
+
var yText=left;
|
|
58235
58363
|
this.Canvas.translate(xText, yText);
|
|
58236
58364
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
58365
|
+
left=bottom=0;
|
|
58237
58366
|
}
|
|
58238
58367
|
else
|
|
58239
58368
|
{
|
|
@@ -58241,9 +58370,9 @@ function DynamicKLineTitlePainting()
|
|
|
58241
58370
|
}
|
|
58242
58371
|
|
|
58243
58372
|
this.Canvas.textAlign="left";
|
|
58244
|
-
this.Canvas.textBaseline="
|
|
58373
|
+
this.Canvas.textBaseline="bottom";
|
|
58245
58374
|
this.Canvas.font=this.Font;
|
|
58246
|
-
var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
|
|
58375
|
+
var position = { Left: left, MaxRight:right, Bottom: bottom, IsHScreen: isHScreen };
|
|
58247
58376
|
var titleData=this.GetFormatTitle({ Data:item });
|
|
58248
58377
|
|
|
58249
58378
|
if (titleData && IFrameSplitOperator.IsNonEmptyArray(titleData.AryText))
|
|
@@ -58347,14 +58476,17 @@ function DynamicKLineTitlePainting()
|
|
|
58347
58476
|
return false;
|
|
58348
58477
|
}
|
|
58349
58478
|
|
|
58350
|
-
this.DrawText=function(title,color,position)
|
|
58479
|
+
this.DrawText=function(title,color,position )
|
|
58351
58480
|
{
|
|
58352
58481
|
if (!title) return true;
|
|
58353
58482
|
|
|
58354
58483
|
var isHScreen=this.Frame.IsHScreen===true;
|
|
58484
|
+
|
|
58355
58485
|
var right = this.Frame.ChartBorder.GetRight();
|
|
58356
58486
|
if (isHScreen) right=this.Frame.ChartBorder.GetHeight();
|
|
58357
58487
|
|
|
58488
|
+
if (IFrameSplitOperator.IsNumber(position.MaxRight)) right=position.MaxRight;
|
|
58489
|
+
|
|
58358
58490
|
this.Canvas.fillStyle = color;
|
|
58359
58491
|
var textWidth = this.Canvas.measureText(title).width;
|
|
58360
58492
|
if (position.Left + textWidth > right) return false;
|
|
@@ -58416,7 +58548,6 @@ function DynamicMinuteTitlePainting()
|
|
|
58416
58548
|
|
|
58417
58549
|
this.MultiDayBeforeOpenData; //多日分时图 盘前数据
|
|
58418
58550
|
this.MultiDayAfterCloseData; //多日分时图 收盘数据
|
|
58419
|
-
this.TitleBaseLine=1; //0=top 1=middle 2=bottom
|
|
58420
58551
|
|
|
58421
58552
|
this.TimeFormat; //显示时间格式 "HH:MM:SS", "hh:MM", "HH:MM:SS.fff"
|
|
58422
58553
|
|
|
@@ -58733,43 +58864,30 @@ function DynamicMinuteTitlePainting()
|
|
|
58733
58864
|
var pixelRatio=GetDevicePixelRatio();
|
|
58734
58865
|
var isHScreen=this.Frame.IsHScreen===true;
|
|
58735
58866
|
var border=this.Frame.GetBorder();
|
|
58736
|
-
var left=
|
|
58737
|
-
var
|
|
58738
|
-
var
|
|
58739
|
-
|
|
58740
|
-
|
|
58867
|
+
var left=this.GetLeft(isHScreen);
|
|
58868
|
+
var right=this.GetRight(isHScreen);
|
|
58869
|
+
var bottom =this.GetBottom(isHScreen);
|
|
58870
|
+
|
|
58741
58871
|
if (isHScreen)
|
|
58742
58872
|
{
|
|
58743
58873
|
if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
|
|
58744
|
-
var
|
|
58745
|
-
var
|
|
58746
|
-
var xText=border.ChartWidth;
|
|
58747
|
-
var yText=border.Top;
|
|
58874
|
+
var xText=bottom;
|
|
58875
|
+
var yText=left;
|
|
58748
58876
|
this.Canvas.translate(xText, yText);
|
|
58749
58877
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
58878
|
+
left=bottom=0; //旋转以后 位置调整0
|
|
58750
58879
|
}
|
|
58751
58880
|
else
|
|
58752
58881
|
{
|
|
58753
58882
|
if (this.Frame.ChartBorder.Top<5*pixelRatio) return;
|
|
58754
58883
|
}
|
|
58755
58884
|
|
|
58756
|
-
this.Canvas.textAlign="left";
|
|
58757
|
-
if (this.TitleBaseLine==0) //上
|
|
58758
|
-
{
|
|
58759
|
-
this.Canvas.textBaseline="top";
|
|
58760
|
-
bottom=2*pixelRatio;
|
|
58761
|
-
}
|
|
58762
|
-
else if (this.TitleBaseLine==2) //下
|
|
58763
|
-
{
|
|
58764
|
-
this.Canvas.textBaseline="bottom";
|
|
58765
|
-
var bottom=border.Top
|
|
58766
|
-
}
|
|
58767
|
-
else //中
|
|
58768
|
-
{
|
|
58769
|
-
this.Canvas.textBaseline="middle";
|
|
58770
|
-
}
|
|
58771
58885
|
|
|
58772
|
-
|
|
58886
|
+
this.Canvas.font=this.Font;
|
|
58887
|
+
this.Canvas.textAlign="left";
|
|
58888
|
+
this.Canvas.textBaseline="bottom";
|
|
58889
|
+
|
|
58890
|
+
var position = { Left: left, MaxRight:right, Bottom: bottom, IsHScreen: isHScreen };
|
|
58773
58891
|
var titleData=this.GetFormatTitle({ Data:item, IsLastOne:isLastOne });
|
|
58774
58892
|
|
|
58775
58893
|
if (titleData && IFrameSplitOperator.IsNonEmptyArray(titleData.AryText))
|
|
@@ -73639,11 +73757,6 @@ function JSChartResource()
|
|
|
73639
73757
|
Color:"rgb(255,165,0)"
|
|
73640
73758
|
}
|
|
73641
73759
|
|
|
73642
|
-
this.DRAWLASTICON=
|
|
73643
|
-
{
|
|
73644
|
-
Family:'iconfont',
|
|
73645
|
-
}
|
|
73646
|
-
|
|
73647
73760
|
this.POINTDOT=
|
|
73648
73761
|
{
|
|
73649
73762
|
Radius:2*GetDevicePixelRatio()
|
|
@@ -77246,7 +77359,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77246
77359
|
isInClient=this.Canvas.isPointInPath(x,y);
|
|
77247
77360
|
|
|
77248
77361
|
//PC触摸板双指缩放时deltaY数值在[-20,20]之间
|
|
77249
|
-
if (IFrameSplitOperator.IsNumber(e.deltaY)
|
|
77362
|
+
if (IFrameSplitOperator.IsNumber(e.deltaY))
|
|
77363
|
+
{
|
|
77364
|
+
var value=e.deltaY*pixelTatio;
|
|
77365
|
+
if (Math.abs(value)<90) return;
|
|
77366
|
+
}
|
|
77250
77367
|
|
|
77251
77368
|
var wheelValue=e.wheelDelta;
|
|
77252
77369
|
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
@@ -84357,6 +84474,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84357
84474
|
this.ClassName='MinuteChartContainer';
|
|
84358
84475
|
this.WindowIndex=new Array();
|
|
84359
84476
|
this.Symbol;
|
|
84477
|
+
this.AryDate; //日期列表[]
|
|
84360
84478
|
this.Name;
|
|
84361
84479
|
this.SourceData; //原始的历史数据
|
|
84362
84480
|
this.IndexBindData; //计算指标需要绑定的分钟数据
|
|
@@ -87124,6 +87242,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87124
87242
|
this.OverlayChartPaint.push(paint);
|
|
87125
87243
|
}
|
|
87126
87244
|
}
|
|
87245
|
+
|
|
87246
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.AryDate))
|
|
87247
|
+
{
|
|
87248
|
+
this.AryDate=option.AryDate.slice();
|
|
87249
|
+
}
|
|
87127
87250
|
}
|
|
87128
87251
|
|
|
87129
87252
|
if (!symbol || this.DayCount<=0)
|
|
@@ -87173,6 +87296,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87173
87296
|
this.SetPageInfo(option.PageInfo);
|
|
87174
87297
|
this.ResetDayOffset();
|
|
87175
87298
|
}
|
|
87299
|
+
|
|
87300
|
+
if (option)
|
|
87301
|
+
{
|
|
87302
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.AryDate))
|
|
87303
|
+
{
|
|
87304
|
+
this.AryDate=option.AryDate.slice();
|
|
87305
|
+
}
|
|
87306
|
+
}
|
|
87176
87307
|
|
|
87177
87308
|
this.ReloadChartDrawPicture();
|
|
87178
87309
|
this.ResetDataStatus();
|
|
@@ -87505,7 +87636,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87505
87636
|
{
|
|
87506
87637
|
Name:'MinuteChartContainer::RequestHistoryMinuteData', //类名::函数
|
|
87507
87638
|
Explain:'多日分时数据',
|
|
87508
|
-
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation }, Type:'POST' },
|
|
87639
|
+
Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
87509
87640
|
Self:this,
|
|
87510
87641
|
PreventDefault:false
|
|
87511
87642
|
};
|
|
@@ -87895,7 +88026,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87895
88026
|
{
|
|
87896
88027
|
Name:'MinuteChartContainer::RequestMinuteData', //类名::函数名
|
|
87897
88028
|
Explain:'最新分时数据',
|
|
87898
|
-
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation }, Type:'POST' },
|
|
88029
|
+
Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
|
|
87899
88030
|
Self:this,
|
|
87900
88031
|
PreventDefault:false
|
|
87901
88032
|
};
|
|
@@ -89982,7 +90113,7 @@ MinuteChartContainer.JsonDataToAfterCloseData=function(data)
|
|
|
89982
90113
|
var date=stockData.date; //日期
|
|
89983
90114
|
if (!stockData.afterinfo) return null;
|
|
89984
90115
|
var symbol=data.stock[0].symbol;
|
|
89985
|
-
var upperSymbol=symbol.
|
|
90116
|
+
var upperSymbol=symbol.toUpperCase();
|
|
89986
90117
|
var afterCloseData={ Data:[], TotalCount:3*60, Ver:2.0, Date:date };
|
|
89987
90118
|
var item=stockData.afterinfo;
|
|
89988
90119
|
if (IFrameSplitOperator.IsNumber(item.totalcount)) afterCloseData.TotalCount=item.totalcount;
|
|
@@ -136170,6 +136301,11 @@ function JSTReportChart(divElement)
|
|
|
136170
136301
|
|
|
136171
136302
|
if (option.EnableResize==true) this.CreateResizeListener();
|
|
136172
136303
|
|
|
136304
|
+
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable)
|
|
136305
|
+
{
|
|
136306
|
+
chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
136307
|
+
}
|
|
136308
|
+
|
|
136173
136309
|
if (option.Symbol)
|
|
136174
136310
|
{
|
|
136175
136311
|
chart.Draw();
|
|
@@ -136421,12 +136557,56 @@ function JSTReportChartContainer(uielement)
|
|
|
136421
136557
|
this.DragXScroll=null; //{Start:{x,y}, End:{x, y}}
|
|
136422
136558
|
this.EnablePageCycle=false; //是否循环翻页
|
|
136423
136559
|
|
|
136560
|
+
this.TooltipMinuteChart; //分时图
|
|
136561
|
+
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
136562
|
+
|
|
136424
136563
|
this.IsDestroy=false; //是否已经销毁了
|
|
136425
136564
|
|
|
136426
136565
|
this.ChartDestory=function() //销毁
|
|
136427
136566
|
{
|
|
136428
136567
|
this.IsDestroy=true;
|
|
136429
136568
|
this.StopAutoUpdate();
|
|
136569
|
+
this.DestroyMinuteChartTooltip();
|
|
136570
|
+
}
|
|
136571
|
+
|
|
136572
|
+
this.InitalMinuteChartTooltip=function(option)
|
|
136573
|
+
{
|
|
136574
|
+
if (this.TooltipMinuteChart) return;
|
|
136575
|
+
|
|
136576
|
+
this.TooltipMinuteChart=new JSTooltipMinuteChart();
|
|
136577
|
+
this.TooltipMinuteChart.Inital(this, option);
|
|
136578
|
+
this.TooltipMinuteChart.Create();
|
|
136579
|
+
}
|
|
136580
|
+
|
|
136581
|
+
this.DestroyMinuteChartTooltip=function()
|
|
136582
|
+
{
|
|
136583
|
+
if (!this.TooltipMinuteChart) return;
|
|
136584
|
+
|
|
136585
|
+
this.TooltipMinuteChart.Destroy();
|
|
136586
|
+
this.TooltipMinuteChart=null;
|
|
136587
|
+
}
|
|
136588
|
+
|
|
136589
|
+
//data={ Symbol }
|
|
136590
|
+
this.ShowMinuteChartTooltip=function(x,y, data)
|
|
136591
|
+
{
|
|
136592
|
+
if (!this.TooltipMinuteChart) return;
|
|
136593
|
+
|
|
136594
|
+
var rtClient=this.UIElement.getBoundingClientRect();
|
|
136595
|
+
var rtScroll=GetScrollPosition();
|
|
136596
|
+
|
|
136597
|
+
var offsetLeft=rtClient.left+rtScroll.Left;
|
|
136598
|
+
var offsetTop=rtClient.top+rtScroll.Top;
|
|
136599
|
+
|
|
136600
|
+
data.Offset={ Left:offsetLeft, Top:offsetTop };
|
|
136601
|
+
|
|
136602
|
+
this.TooltipMinuteChart.Show(data, x,y);
|
|
136603
|
+
}
|
|
136604
|
+
|
|
136605
|
+
this.HideMinuteChartTooltip=function()
|
|
136606
|
+
{
|
|
136607
|
+
if (!this.TooltipMinuteChart) return;
|
|
136608
|
+
|
|
136609
|
+
this.TooltipMinuteChart.Hide();
|
|
136430
136610
|
}
|
|
136431
136611
|
|
|
136432
136612
|
//清空固定行数据
|
|
@@ -136517,11 +136697,12 @@ function JSTReportChartContainer(uielement)
|
|
|
136517
136697
|
|
|
136518
136698
|
this.UIElement.ondblclick=(e)=>{ this.UIOnDblClick(e); }
|
|
136519
136699
|
this.UIElement.onmousedown=(e)=> { this.UIOnMouseDown(e); }
|
|
136700
|
+
this.UIElement.onmousemove=(e)=>{ this.UIOnMouseMove(e);}
|
|
136520
136701
|
|
|
136521
136702
|
/*
|
|
136522
136703
|
this.UIElement.onmouseup=(e)=>{ this.UIOnMounseUp(e); }
|
|
136523
136704
|
this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
|
|
136524
|
-
|
|
136705
|
+
|
|
136525
136706
|
this.UIElement.onmouseout=(e)=>{ this.UIOnMounseOut(e); }
|
|
136526
136707
|
this.UIElement.onmouseleave=(e)=>{ this.UIOnMouseleave(e); }
|
|
136527
136708
|
|
|
@@ -136540,6 +136721,7 @@ function JSTReportChartContainer(uielement)
|
|
|
136540
136721
|
this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
|
|
136541
136722
|
var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
|
|
136542
136723
|
this.Canvas.lineWidth=pixelTatio; //手机端需要根据分辨率比调整线段宽度
|
|
136724
|
+
this.LastMouseStatus.MouseOnStatus=null;
|
|
136543
136725
|
|
|
136544
136726
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
136545
136727
|
{
|
|
@@ -137088,6 +137270,79 @@ function JSTReportChartContainer(uielement)
|
|
|
137088
137270
|
//document.onmouseup=(e)=> { this.DocOnMouseUp(e); }
|
|
137089
137271
|
}
|
|
137090
137272
|
|
|
137273
|
+
this.GetReportChart=function()
|
|
137274
|
+
{
|
|
137275
|
+
var chart=this.ChartPaint[0];
|
|
137276
|
+
if (!chart) return;
|
|
137277
|
+
|
|
137278
|
+
return chart;
|
|
137279
|
+
}
|
|
137280
|
+
|
|
137281
|
+
this.UIOnMouseMove=function(e)
|
|
137282
|
+
{
|
|
137283
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
137284
|
+
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
137285
|
+
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
137286
|
+
|
|
137287
|
+
var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
|
|
137288
|
+
this.LastMouseStatus.OnMouseMove=null;
|
|
137289
|
+
|
|
137290
|
+
var bDrawTooltip=false;
|
|
137291
|
+
if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
|
|
137292
|
+
this.LastMouseStatus.TooltipStatus=null;
|
|
137293
|
+
|
|
137294
|
+
var bShowChartTooltip=false;
|
|
137295
|
+
var chartTooltipData=null;
|
|
137296
|
+
|
|
137297
|
+
this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
|
|
137298
|
+
var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
|
|
137299
|
+
var report=this.GetReportChart();
|
|
137300
|
+
var bDraw=false;
|
|
137301
|
+
|
|
137302
|
+
if (report)
|
|
137303
|
+
{
|
|
137304
|
+
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
137305
|
+
if (tooltipData)
|
|
137306
|
+
{
|
|
137307
|
+
if (tooltipData.Type==20)
|
|
137308
|
+
{
|
|
137309
|
+
if (tooltipData.Data && tooltipData.Data.Symbol)
|
|
137310
|
+
{
|
|
137311
|
+
bShowChartTooltip=true;
|
|
137312
|
+
chartTooltipData={ Symbol:tooltipData.Data.Symbol, Rect:tooltipData.Rect };
|
|
137313
|
+
}
|
|
137314
|
+
}
|
|
137315
|
+
else
|
|
137316
|
+
{
|
|
137317
|
+
this.LastMouseStatus.TooltipStatus={ X:x, Y:y, Data:tooltipData, ClientX:e.clientX, ClientY:e.clientY };
|
|
137318
|
+
bDrawTooltip=true;
|
|
137319
|
+
}
|
|
137320
|
+
}
|
|
137321
|
+
|
|
137322
|
+
}
|
|
137323
|
+
|
|
137324
|
+
/* 目前没有用到
|
|
137325
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);
|
|
137326
|
+
if (event)
|
|
137327
|
+
{
|
|
137328
|
+
var sendData={X:x, Y:y, Cell:cell };
|
|
137329
|
+
event.Callback(event,sendData,this);
|
|
137330
|
+
}
|
|
137331
|
+
*/
|
|
137332
|
+
|
|
137333
|
+
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
137334
|
+
//if (bDrawTooltip) this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
|
|
137335
|
+
|
|
137336
|
+
if (bShowChartTooltip)
|
|
137337
|
+
{
|
|
137338
|
+
this.ShowMinuteChartTooltip(null, null, chartTooltipData);
|
|
137339
|
+
}
|
|
137340
|
+
else
|
|
137341
|
+
{
|
|
137342
|
+
this.HideMinuteChartTooltip();
|
|
137343
|
+
}
|
|
137344
|
+
}
|
|
137345
|
+
|
|
137091
137346
|
//点表头
|
|
137092
137347
|
this.OnClickHeader=function(clickData, e)
|
|
137093
137348
|
{
|
|
@@ -137909,7 +138164,8 @@ function ChartTReport()
|
|
|
137909
138164
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
|
|
137910
138165
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
137911
138166
|
if (item.DefaultText) colItem.DefaultText=item.DefaultText;
|
|
137912
|
-
|
|
138167
|
+
if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
|
|
138168
|
+
|
|
137913
138169
|
if (item.Sort==1) //1本地排序 2=远程排序
|
|
137914
138170
|
{
|
|
137915
138171
|
colItem.SortType=[1,2]; //默认 降序 ,升序
|
|
@@ -138430,7 +138686,7 @@ function ChartTReport()
|
|
|
138430
138686
|
this.DrawCenterItem=function(index, data, column, rtItem, cellType) //cellType 0=中间字段 1=左侧 2=右侧
|
|
138431
138687
|
{
|
|
138432
138688
|
//tooltip提示
|
|
138433
|
-
if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem,
|
|
138689
|
+
if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem, Data:data, Index:index, Column:column, CellType:cellType, Type:1 });
|
|
138434
138690
|
|
|
138435
138691
|
var rtText={ Left:rtItem.Left+this.ItemMergin.Left, Right:rtItem.Right-this.ItemMergin.Right, Top:rtItem.Top+this.ItemMergin.Top, Bottom:rtItem.Bottom-this.ItemMergin.Bottom };
|
|
138436
138692
|
rtText.Width=rtText.Right-rtText.Left;
|
|
@@ -138444,7 +138700,7 @@ function ChartTReport()
|
|
|
138444
138700
|
|
|
138445
138701
|
this.DrawItem=function(index, exePriceData, data, column, rtItem, cellType)
|
|
138446
138702
|
{
|
|
138447
|
-
if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem,
|
|
138703
|
+
if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem, Data:data, Index:index, Column:column, CellType:cellType, Type:1 });
|
|
138448
138704
|
|
|
138449
138705
|
var rtText={ Left:rtItem.Left+this.ItemMergin.Left, Right:rtItem.Right-this.ItemMergin.Right, Top:rtItem.Top+this.ItemMergin.Top, Bottom:rtItem.Bottom-this.ItemMergin.Bottom };
|
|
138450
138706
|
rtText.Width=rtText.Right-rtText.Left;
|
|
@@ -138531,6 +138787,12 @@ function ChartTReport()
|
|
|
138531
138787
|
}
|
|
138532
138788
|
|
|
138533
138789
|
this.DrawCell(drawInfo, exePriceData, column.Type, cellType);
|
|
138790
|
+
|
|
138791
|
+
if (column.EnableChartTooltip)
|
|
138792
|
+
{
|
|
138793
|
+
var tooltipData={ Rect:rtItem, Data:data, Index:index, Column:column, CellType:cellType, Type:20 };
|
|
138794
|
+
this.TooltipRect.push(tooltipData);
|
|
138795
|
+
}
|
|
138534
138796
|
}
|
|
138535
138797
|
|
|
138536
138798
|
this.FormatReserveNumber=function(column, data, drawInfo)
|
|
@@ -138703,6 +138965,25 @@ function ChartTReport()
|
|
|
138703
138965
|
}
|
|
138704
138966
|
}
|
|
138705
138967
|
|
|
138968
|
+
this.GetTooltipData=function(x,y)
|
|
138969
|
+
{
|
|
138970
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect)) return null;
|
|
138971
|
+
|
|
138972
|
+
for(var i=0;i<this.TooltipRect.length;++i)
|
|
138973
|
+
{
|
|
138974
|
+
var item=this.TooltipRect[i];
|
|
138975
|
+
var rt=item.Rect;
|
|
138976
|
+
if (!rt) continue;
|
|
138977
|
+
|
|
138978
|
+
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
138979
|
+
{
|
|
138980
|
+
return { Rect:item.Rect, Data:item.Data, Column:item.Column, Index:item.Index, Type:item.Type, CellType:item.CellType };
|
|
138981
|
+
}
|
|
138982
|
+
}
|
|
138983
|
+
|
|
138984
|
+
return null;
|
|
138985
|
+
}
|
|
138986
|
+
|
|
138706
138987
|
this.OnMouseDown=function(x,y,e) //Type: 2=行 3=表头
|
|
138707
138988
|
{
|
|
138708
138989
|
if (!this.Data) return null;
|
|
@@ -144181,6 +144462,8 @@ JSTooltipMinuteChart.GetMinuteOption=function()
|
|
|
144181
144462
|
IsShowVolTitle:true,
|
|
144182
144463
|
//IsAlwaysShowLastData:true,
|
|
144183
144464
|
IsTitleShowLatestData:true,
|
|
144465
|
+
|
|
144466
|
+
ShowPostion:{ Type:1 , Margin:{ Left:5*GetDevicePixelRatio(), Right:5*GetDevicePixelRatio() } }
|
|
144184
144467
|
},
|
|
144185
144468
|
|
|
144186
144469
|
MinuteVol:
|
|
@@ -148665,7 +148948,7 @@ function HQChartScriptWorker()
|
|
|
148665
148948
|
|
|
148666
148949
|
|
|
148667
148950
|
|
|
148668
|
-
var HQCHART_VERSION="1.1.
|
|
148951
|
+
var HQCHART_VERSION="1.1.14142";
|
|
148669
148952
|
|
|
148670
148953
|
function PrintHQChartVersion()
|
|
148671
148954
|
{
|