hqchart 1.1.14135 → 1.1.14147

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.
@@ -73,6 +73,11 @@ function JSTReportChart(divElement)
73
73
 
74
74
  if (option.EnableResize==true) this.CreateResizeListener();
75
75
 
76
+ if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable)
77
+ {
78
+ chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
79
+ }
80
+
76
81
  if (option.Symbol)
77
82
  {
78
83
  chart.Draw();
@@ -324,12 +329,56 @@ function JSTReportChartContainer(uielement)
324
329
  this.DragXScroll=null; //{Start:{x,y}, End:{x, y}}
325
330
  this.EnablePageCycle=false; //是否循环翻页
326
331
 
332
+ this.TooltipMinuteChart; //分时图
333
+ this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
334
+
327
335
  this.IsDestroy=false; //是否已经销毁了
328
336
 
329
337
  this.ChartDestory=function() //销毁
330
338
  {
331
339
  this.IsDestroy=true;
332
340
  this.StopAutoUpdate();
341
+ this.DestroyMinuteChartTooltip();
342
+ }
343
+
344
+ this.InitalMinuteChartTooltip=function(option)
345
+ {
346
+ if (this.TooltipMinuteChart) return;
347
+
348
+ this.TooltipMinuteChart=new JSTooltipMinuteChart();
349
+ this.TooltipMinuteChart.Inital(this, option);
350
+ this.TooltipMinuteChart.Create();
351
+ }
352
+
353
+ this.DestroyMinuteChartTooltip=function()
354
+ {
355
+ if (!this.TooltipMinuteChart) return;
356
+
357
+ this.TooltipMinuteChart.Destroy();
358
+ this.TooltipMinuteChart=null;
359
+ }
360
+
361
+ //data={ Symbol }
362
+ this.ShowMinuteChartTooltip=function(x,y, data)
363
+ {
364
+ if (!this.TooltipMinuteChart) return;
365
+
366
+ var rtClient=this.UIElement.getBoundingClientRect();
367
+ var rtScroll=GetScrollPosition();
368
+
369
+ var offsetLeft=rtClient.left+rtScroll.Left;
370
+ var offsetTop=rtClient.top+rtScroll.Top;
371
+
372
+ data.Offset={ Left:offsetLeft, Top:offsetTop };
373
+
374
+ this.TooltipMinuteChart.Show(data, x,y);
375
+ }
376
+
377
+ this.HideMinuteChartTooltip=function()
378
+ {
379
+ if (!this.TooltipMinuteChart) return;
380
+
381
+ this.TooltipMinuteChart.Hide();
333
382
  }
334
383
 
335
384
  //清空固定行数据
@@ -420,11 +469,12 @@ function JSTReportChartContainer(uielement)
420
469
 
421
470
  this.UIElement.ondblclick=(e)=>{ this.UIOnDblClick(e); }
422
471
  this.UIElement.onmousedown=(e)=> { this.UIOnMouseDown(e); }
472
+ this.UIElement.onmousemove=(e)=>{ this.UIOnMouseMove(e);}
423
473
 
424
474
  /*
425
475
  this.UIElement.onmouseup=(e)=>{ this.UIOnMounseUp(e); }
426
476
  this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
427
- this.UIElement.onmousemove=(e)=>{ this.UIOnMouseMove(e);}
477
+
428
478
  this.UIElement.onmouseout=(e)=>{ this.UIOnMounseOut(e); }
429
479
  this.UIElement.onmouseleave=(e)=>{ this.UIOnMouseleave(e); }
430
480
 
@@ -443,6 +493,7 @@ function JSTReportChartContainer(uielement)
443
493
  this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
444
494
  var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
445
495
  this.Canvas.lineWidth=pixelTatio; //手机端需要根据分辨率比调整线段宽度
496
+ this.LastMouseStatus.MouseOnStatus=null;
446
497
 
447
498
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
448
499
  {
@@ -991,6 +1042,79 @@ function JSTReportChartContainer(uielement)
991
1042
  //document.onmouseup=(e)=> { this.DocOnMouseUp(e); }
992
1043
  }
993
1044
 
1045
+ this.GetReportChart=function()
1046
+ {
1047
+ var chart=this.ChartPaint[0];
1048
+ if (!chart) return;
1049
+
1050
+ return chart;
1051
+ }
1052
+
1053
+ this.UIOnMouseMove=function(e)
1054
+ {
1055
+ var pixelTatio = GetDevicePixelRatio();
1056
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
1057
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
1058
+
1059
+ var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
1060
+ this.LastMouseStatus.OnMouseMove=null;
1061
+
1062
+ var bDrawTooltip=false;
1063
+ if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
1064
+ this.LastMouseStatus.TooltipStatus=null;
1065
+
1066
+ var bShowChartTooltip=false;
1067
+ var chartTooltipData=null;
1068
+
1069
+ this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
1070
+ var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
1071
+ var report=this.GetReportChart();
1072
+ var bDraw=false;
1073
+
1074
+ if (report)
1075
+ {
1076
+ var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
1077
+ if (tooltipData)
1078
+ {
1079
+ if (tooltipData.Type==20)
1080
+ {
1081
+ if (tooltipData.Data && tooltipData.Data.Symbol)
1082
+ {
1083
+ bShowChartTooltip=true;
1084
+ chartTooltipData={ Symbol:tooltipData.Data.Symbol, Rect:tooltipData.Rect };
1085
+ }
1086
+ }
1087
+ else
1088
+ {
1089
+ this.LastMouseStatus.TooltipStatus={ X:x, Y:y, Data:tooltipData, ClientX:e.clientX, ClientY:e.clientY };
1090
+ bDrawTooltip=true;
1091
+ }
1092
+ }
1093
+
1094
+ }
1095
+
1096
+ /* 目前没有用到
1097
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);
1098
+ if (event)
1099
+ {
1100
+ var sendData={X:x, Y:y, Cell:cell };
1101
+ event.Callback(event,sendData,this);
1102
+ }
1103
+ */
1104
+
1105
+ if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
1106
+ //if (bDrawTooltip) this.DrawTooltip(this.LastMouseStatus.TooltipStatus);
1107
+
1108
+ if (bShowChartTooltip)
1109
+ {
1110
+ this.ShowMinuteChartTooltip(null, null, chartTooltipData);
1111
+ }
1112
+ else
1113
+ {
1114
+ this.HideMinuteChartTooltip();
1115
+ }
1116
+ }
1117
+
994
1118
  //点表头
995
1119
  this.OnClickHeader=function(clickData, e)
996
1120
  {
@@ -1812,7 +1936,8 @@ function ChartTReport()
1812
1936
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
1813
1937
  if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
1814
1938
  if (item.DefaultText) colItem.DefaultText=item.DefaultText;
1815
-
1939
+ if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
1940
+
1816
1941
  if (item.Sort==1) //1本地排序 2=远程排序
1817
1942
  {
1818
1943
  colItem.SortType=[1,2]; //默认 降序 ,升序
@@ -2333,7 +2458,7 @@ function ChartTReport()
2333
2458
  this.DrawCenterItem=function(index, data, column, rtItem, cellType) //cellType 0=中间字段 1=左侧 2=右侧
2334
2459
  {
2335
2460
  //tooltip提示
2336
- if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem, data:data, Index:index, Column:column, CellType:cellType });
2461
+ if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem, Data:data, Index:index, Column:column, CellType:cellType, Type:1 });
2337
2462
 
2338
2463
  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 };
2339
2464
  rtText.Width=rtText.Right-rtText.Left;
@@ -2347,7 +2472,7 @@ function ChartTReport()
2347
2472
 
2348
2473
  this.DrawItem=function(index, exePriceData, data, column, rtItem, cellType)
2349
2474
  {
2350
- if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem, data:data, Index:index, Column:column, CellType:cellType });
2475
+ if (column.EnableTooltip===true) this.TooltipRect.push({ Rect:rtItem, Data:data, Index:index, Column:column, CellType:cellType, Type:1 });
2351
2476
 
2352
2477
  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 };
2353
2478
  rtText.Width=rtText.Right-rtText.Left;
@@ -2434,6 +2559,12 @@ function ChartTReport()
2434
2559
  }
2435
2560
 
2436
2561
  this.DrawCell(drawInfo, exePriceData, column.Type, cellType);
2562
+
2563
+ if (column.EnableChartTooltip)
2564
+ {
2565
+ var tooltipData={ Rect:rtItem, Data:data, Index:index, Column:column, CellType:cellType, Type:20 };
2566
+ this.TooltipRect.push(tooltipData);
2567
+ }
2437
2568
  }
2438
2569
 
2439
2570
  this.FormatReserveNumber=function(column, data, drawInfo)
@@ -2606,6 +2737,25 @@ function ChartTReport()
2606
2737
  }
2607
2738
  }
2608
2739
 
2740
+ this.GetTooltipData=function(x,y)
2741
+ {
2742
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect)) return null;
2743
+
2744
+ for(var i=0;i<this.TooltipRect.length;++i)
2745
+ {
2746
+ var item=this.TooltipRect[i];
2747
+ var rt=item.Rect;
2748
+ if (!rt) continue;
2749
+
2750
+ if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
2751
+ {
2752
+ return { Rect:item.Rect, Data:item.Data, Column:item.Column, Index:item.Index, Type:item.Type, CellType:item.CellType };
2753
+ }
2754
+ }
2755
+
2756
+ return null;
2757
+ }
2758
+
2609
2759
  this.OnMouseDown=function(x,y,e) //Type: 2=行 3=表头
2610
2760
  {
2611
2761
  if (!this.Data) return null;
@@ -581,10 +581,24 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
581
581
  if(option.KLineTitle)
582
582
  {
583
583
  var item=option.KLineTitle;
584
+ var chartTitle=chart.TitlePaint[0];
584
585
  if(option.KLineTitle.IsShowName==false) chart.TitlePaint[0].IsShowName=false;
585
586
  if(option.KLineTitle.IsShowSettingInfo==false) chart.TitlePaint[0].IsShowSettingInfo=false;
586
587
  if(option.KLineTitle.IsShow == false) chart.TitlePaint[0].IsShow = false;
587
588
  if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
589
+
590
+ if (item.ShowPostion) //显示位置高级配置
591
+ {
592
+ var subItem=item.ShowPostion;
593
+ if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
594
+ if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
595
+ if (subItem.Margin)
596
+ {
597
+ if (IFrameSplitOperator.IsNumber(subItem.Margin.Left)) chartTitle.ShowPositionConfig.Margin.Left=subItem.Margin.Left;
598
+ if (IFrameSplitOperator.IsNumber(subItem.Margin.Right)) chartTitle.ShowPositionConfig.Margin.Right=subItem.Margin.Right;
599
+ if (IFrameSplitOperator.IsNumber(subItem.Margin.Bottom)) chartTitle.ShowPositionConfig.Margin.Bottom=subItem.Margin.Bottom;
600
+ }
601
+ }
588
602
  }
589
603
 
590
604
  //叠加股票
@@ -1078,14 +1092,26 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1078
1092
  if(option.MinuteTitle)
1079
1093
  {
1080
1094
  var item=option.MinuteTitle;
1095
+ var chartTitle=chart.TitlePaint[0];
1081
1096
  if(IFrameSplitOperator.IsBool(item.IsShowName)) chart.TitlePaint[0].IsShowName=item.IsShowName;
1082
1097
  if(IFrameSplitOperator.IsBool(item.IsShowDate)) chart.TitlePaint[0].IsShowDate=item.IsShowDate;
1083
1098
  if(IFrameSplitOperator.IsBool(item.IsShowTime)) chart.TitlePaint[0].IsShowTime=item.IsShowTime;
1084
1099
  if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
1085
1100
  if(IFrameSplitOperator.IsBool(item.IsAlwaysShowLastData)) chart.TitlePaint[0].IsAlwaysShowLastData=item.IsAlwaysShowLastData;
1086
1101
  if(IFrameSplitOperator.IsNumber(item.ShowLastDataFormat)) chart.TitlePaint[0].ShowLastDataFormat=item.ShowLastDataFormat;
1087
- if (IFrameSplitOperator.IsNumber(item.TitleBaseLine)) chart.TitlePaint[0].TitleBaseLine=item.TitleBaseLine;
1088
1102
  if (item.TimeFormat) chart.TitlePaint[0].TimeFormat=item.TimeFormat;
1103
+ if (item.ShowPostion) //显示位置高级配置
1104
+ {
1105
+ var subItem=item.ShowPostion;
1106
+ if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
1107
+ if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
1108
+ if (subItem.Margin)
1109
+ {
1110
+ if (IFrameSplitOperator.IsNumber(subItem.Margin.Left)) chartTitle.ShowPositionConfig.Margin.Left=subItem.Margin.Left;
1111
+ if (IFrameSplitOperator.IsNumber(subItem.Margin.Right)) chartTitle.ShowPositionConfig.Margin.Right=subItem.Margin.Right;
1112
+ if (IFrameSplitOperator.IsNumber(subItem.Margin.Bottom)) chartTitle.ShowPositionConfig.Margin.Bottom=subItem.Margin.Bottom;
1113
+ }
1114
+ }
1089
1115
  }
1090
1116
 
1091
1117
  if (IFrameSplitOperator.IsBool(option.CorssCursorTouchEnd)) chart.CorssCursorTouchEnd = option.CorssCursorTouchEnd;
@@ -35458,8 +35484,6 @@ function ChartDrawLastBarText()
35458
35484
  YOffset:g_JSChartResource.DRAWICON.Icon.YOffset //Direction==2的向下偏移
35459
35485
  };
35460
35486
 
35461
- this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
35462
-
35463
35487
  this.ReloadResource=function(resource)
35464
35488
  {
35465
35489
  this.TextSize=
@@ -35474,8 +35498,7 @@ function ChartDrawLastBarText()
35474
35498
  Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize, //图标的最大最小值
35475
35499
  Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value }, //放大倍数
35476
35500
  };
35477
-
35478
- this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
35501
+
35479
35502
  }
35480
35503
 
35481
35504
  this.Draw=function()
@@ -35526,15 +35549,28 @@ function ChartDrawLastBarText()
35526
35549
  this.Canvas.textBaseline=textBaseline;
35527
35550
  this.Canvas.textAlign=textAlign;
35528
35551
  this.Canvas.fillStyle = item.Color;
35529
- this.Canvas.fillText(item.Text, x, y);
35552
+
35553
+ if (this.IsHScreen)
35554
+ {
35555
+ this.Canvas.save();
35556
+ this.Canvas.translate(y, x);
35557
+ this.Canvas.rotate(90 * Math.PI / 180);
35558
+ this.Canvas.fillText(item.Text,0,0);
35559
+ this.Canvas.restore();
35560
+ }
35561
+ else
35562
+ {
35563
+ this.Canvas.fillText(item.Text, x, y);
35564
+ }
35530
35565
  }
35531
35566
 
35532
35567
  this.DrawLastIcon=function(item,x,y)
35533
35568
  {
35569
+ var icon=item.Icon;
35534
35570
  var dataWidth=this.ChartFrame.DataWidth;
35535
35571
  var distanceWidth=this.ChartFrame.DistanceWidth;
35536
35572
  var iconSize=this.GetDynamicIconSize(dataWidth,distanceWidth,this.IconSize.Max,this.IconSize.Min,this.IconSize.Zoom);
35537
- var font=`${iconSize}px ${this.IconFamily}`;
35573
+ var font=`${iconSize}px ${icon.Family}`;
35538
35574
 
35539
35575
  var textBaseline='bottom';
35540
35576
  if (item.TextBaseline) textBaseline=item.TextBaseline;
@@ -35545,7 +35581,20 @@ function ChartDrawLastBarText()
35545
35581
  this.Canvas.textBaseline=textBaseline;
35546
35582
  this.Canvas.textAlign=textAlign;
35547
35583
  this.Canvas.fillStyle = item.Color;
35548
- this.Canvas.fillText(item.Icon.Symbol, x, y);
35584
+
35585
+ if (this.IsHScreen)
35586
+ {
35587
+ this.Canvas.save();
35588
+ this.Canvas.translate(y, x);
35589
+ this.Canvas.rotate(90 * Math.PI / 180);
35590
+ this.Canvas.fillText(icon.Symbol,0,0);
35591
+ this.Canvas.restore();
35592
+ }
35593
+ else
35594
+ {
35595
+ this.Canvas.fillText(icon.Symbol, x, y);
35596
+ }
35597
+
35549
35598
  }
35550
35599
 
35551
35600
  this.GetMaxMin=function()
@@ -54014,6 +54063,7 @@ function DynamicKLineTitlePainting()
54014
54063
  this.IsShowSettingInfo=true; //是否显示设置信息(周期 复权)
54015
54064
  this.IsShowDateTime=true; //是否显示日期
54016
54065
  this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
54066
+ this.ShowPositionConfig={ Margin:{ Bottom:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
54017
54067
  this.OnDrawEvent;
54018
54068
  this.OnMouseMoveEvent;
54019
54069
  this.HQChart;
@@ -54246,25 +54296,104 @@ function DynamicKLineTitlePainting()
54246
54296
  return result;
54247
54297
  }
54248
54298
 
54299
+ this.GetLeft=function(isHScreen)
54300
+ {
54301
+ if (isHScreen)
54302
+ {
54303
+ var left=this.Frame.ChartBorder.GetTop();
54304
+ if (this.ShowPositionConfig)
54305
+ {
54306
+ var item=this.ShowPositionConfig;
54307
+ if (item.Type===1) left=0;
54308
+ if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Left)) left+=item.Margin.Left;
54309
+ }
54310
+ return left;
54311
+ }
54312
+ else
54313
+ {
54314
+ var left=this.Frame.ChartBorder.GetLeft();
54315
+ if (this.ShowPositionConfig)
54316
+ {
54317
+ var item=this.ShowPositionConfig;
54318
+ if (item.Type===1) left=0;
54319
+ if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Left)) left+=item.Margin.Left;
54320
+ }
54321
+ return left;
54322
+ }
54323
+ }
54324
+
54325
+ this.GetRight=function(isHScreen)
54326
+ {
54327
+ if (isHScreen)
54328
+ {
54329
+ var right = this.Frame.ChartBorder.GetHeight();
54330
+ if (this.ShowPositionConfig)
54331
+ {
54332
+ var item=this.ShowPositionConfig;
54333
+ if (item.Type===1) right=this.Frame.ChartBorder.GetChartHeight();
54334
+ if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Right)) right-=item.Margin.Right;
54335
+ }
54336
+
54337
+ return right;
54338
+ }
54339
+ else
54340
+ {
54341
+ var right = this.Frame.ChartBorder.GetRight();
54342
+ if (this.ShowPositionConfig)
54343
+ {
54344
+ var item=this.ShowPositionConfig;
54345
+ if (item.Type===1) right=this.Frame.ChartBorder.GetChartWidth();
54346
+ if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Right)) right-=item.Margin.Right;
54347
+ }
54348
+
54349
+ return right;
54350
+ }
54351
+
54352
+ }
54353
+
54354
+ this.GetBottom=function(isHScreen)
54355
+ {
54356
+ if (isHScreen)
54357
+ {
54358
+ var bottom=this.Frame.ChartBorder.GetRight();
54359
+ if (this.ShowPositionConfig)
54360
+ {
54361
+ var item=this.ShowPositionConfig;
54362
+ if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Bottom)) bottom+=item.Margin.Bottom;
54363
+ }
54364
+
54365
+ return bottom;
54366
+ }
54367
+ else
54368
+ {
54369
+ var bottom = this.Frame.ChartBorder.GetTop();
54370
+ if (this.ShowPositionConfig)
54371
+ {
54372
+ var item=this.ShowPositionConfig;
54373
+ if (item.Margin && IFrameSplitOperator.IsNumber(item.Margin.Bottom)) bottom-=item.Margin.Bottom;
54374
+ }
54375
+
54376
+ return bottom;
54377
+ }
54378
+
54379
+ }
54380
+
54249
54381
  this.DrawItem=function(item)
54250
54382
  {
54251
54383
  var isHScreen=this.Frame.IsHScreen===true;
54252
- var left=this.Frame.ChartBorder.GetLeft();
54253
- var bottom=this.Frame.ChartBorder.GetTop()-this.Frame.ChartBorder.Top/2;
54254
- var right=this.Frame.ChartBorder.GetRight();
54255
- //var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
54256
- //var upperSymbol=this.Symbol.toUpperCase();
54384
+ var left=this.GetLeft(isHScreen);
54385
+ var right=this.GetRight(isHScreen);
54386
+
54387
+ var bottom=this.GetBottom(isHScreen);
54257
54388
  var pixelRatio=GetDevicePixelRatio();
54258
54389
  if (isHScreen)
54259
54390
  {
54260
54391
  if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
54261
- var left=2;
54262
- var bottom=this.Frame.ChartBorder.Right/2; //上下居中显示
54263
- var right=this.Frame.ChartBorder.GetHeight();
54264
- var xText=this.Frame.ChartBorder.GetChartWidth();
54265
- var yText=this.Frame.ChartBorder.GetTop();
54392
+ var xText=bottom;
54393
+ var yText=left;
54266
54394
  this.Canvas.translate(xText, yText);
54267
54395
  this.Canvas.rotate(90 * Math.PI / 180);
54396
+ left=bottom=0;
54268
54397
  }
54269
54398
  else
54270
54399
  {
@@ -54272,9 +54401,9 @@ function DynamicKLineTitlePainting()
54272
54401
  }
54273
54402
 
54274
54403
  this.Canvas.textAlign="left";
54275
- this.Canvas.textBaseline="middle";
54404
+ this.Canvas.textBaseline="bottom";
54276
54405
  this.Canvas.font=this.Font;
54277
- var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
54406
+ var position = { Left: left, MaxRight:right, Bottom: bottom, IsHScreen: isHScreen };
54278
54407
  var titleData=this.GetFormatTitle({ Data:item });
54279
54408
 
54280
54409
  if (titleData && IFrameSplitOperator.IsNonEmptyArray(titleData.AryText))
@@ -54378,14 +54507,17 @@ function DynamicKLineTitlePainting()
54378
54507
  return false;
54379
54508
  }
54380
54509
 
54381
- this.DrawText=function(title,color,position)
54510
+ this.DrawText=function(title,color,position )
54382
54511
  {
54383
54512
  if (!title) return true;
54384
54513
 
54385
54514
  var isHScreen=this.Frame.IsHScreen===true;
54515
+
54386
54516
  var right = this.Frame.ChartBorder.GetRight();
54387
54517
  if (isHScreen) right=this.Frame.ChartBorder.GetHeight();
54388
54518
 
54519
+ if (IFrameSplitOperator.IsNumber(position.MaxRight)) right=position.MaxRight;
54520
+
54389
54521
  this.Canvas.fillStyle = color;
54390
54522
  var textWidth = this.Canvas.measureText(title).width;
54391
54523
  if (position.Left + textWidth > right) return false;
@@ -54447,7 +54579,6 @@ function DynamicMinuteTitlePainting()
54447
54579
 
54448
54580
  this.MultiDayBeforeOpenData; //多日分时图 盘前数据
54449
54581
  this.MultiDayAfterCloseData; //多日分时图 收盘数据
54450
- this.TitleBaseLine=1; //0=top 1=middle 2=bottom
54451
54582
 
54452
54583
  this.TimeFormat; //显示时间格式 "HH:MM:SS", "hh:MM", "HH:MM:SS.fff"
54453
54584
 
@@ -54764,43 +54895,30 @@ function DynamicMinuteTitlePainting()
54764
54895
  var pixelRatio=GetDevicePixelRatio();
54765
54896
  var isHScreen=this.Frame.IsHScreen===true;
54766
54897
  var border=this.Frame.GetBorder();
54767
- var left=border.Left;
54768
- var bottom=border.Top-this.Frame.ChartBorder.Top/2;
54769
- var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
54770
- this.Canvas.font=this.Font;
54771
-
54898
+ var left=this.GetLeft(isHScreen);
54899
+ var right=this.GetRight(isHScreen);
54900
+ var bottom =this.GetBottom(isHScreen);
54901
+
54772
54902
  if (isHScreen)
54773
54903
  {
54774
54904
  if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
54775
- var left=2;
54776
- var bottom=this.Frame.ChartBorder.Right/2; //上下居中显示
54777
- var xText=border.ChartWidth;
54778
- var yText=border.Top;
54905
+ var xText=bottom;
54906
+ var yText=left;
54779
54907
  this.Canvas.translate(xText, yText);
54780
54908
  this.Canvas.rotate(90 * Math.PI / 180);
54909
+ left=bottom=0; //旋转以后 位置调整0
54781
54910
  }
54782
54911
  else
54783
54912
  {
54784
54913
  if (this.Frame.ChartBorder.Top<5*pixelRatio) return;
54785
54914
  }
54786
54915
 
54787
- this.Canvas.textAlign="left";
54788
- if (this.TitleBaseLine==0) //上
54789
- {
54790
- this.Canvas.textBaseline="top";
54791
- bottom=2*pixelRatio;
54792
- }
54793
- else if (this.TitleBaseLine==2) //下
54794
- {
54795
- this.Canvas.textBaseline="bottom";
54796
- var bottom=border.Top
54797
- }
54798
- else //中
54799
- {
54800
- this.Canvas.textBaseline="middle";
54801
- }
54802
54916
 
54803
- var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
54917
+ this.Canvas.font=this.Font;
54918
+ this.Canvas.textAlign="left";
54919
+ this.Canvas.textBaseline="bottom";
54920
+
54921
+ var position = { Left: left, MaxRight:right, Bottom: bottom, IsHScreen: isHScreen };
54804
54922
  var titleData=this.GetFormatTitle({ Data:item, IsLastOne:isLastOne });
54805
54923
 
54806
54924
  if (titleData && IFrameSplitOperator.IsNonEmptyArray(titleData.AryText))
@@ -69670,11 +69788,6 @@ function JSChartResource()
69670
69788
  Color:"rgb(255,165,0)"
69671
69789
  }
69672
69790
 
69673
- this.DRAWLASTICON=
69674
- {
69675
- Family:'iconfont',
69676
- }
69677
-
69678
69791
  this.POINTDOT=
69679
69792
  {
69680
69793
  Radius:2*GetDevicePixelRatio()
@@ -73277,7 +73390,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73277
73390
  isInClient=this.Canvas.isPointInPath(x,y);
73278
73391
 
73279
73392
  //PC触摸板双指缩放时deltaY数值在[-20,20]之间
73280
- if (IFrameSplitOperator.IsNumber(e.deltaY) && Math.abs(e.deltaY)<90) return;
73393
+ if (IFrameSplitOperator.IsNumber(e.deltaY))
73394
+ {
73395
+ var value=e.deltaY*pixelTatio;
73396
+ if (Math.abs(value)<90) return;
73397
+ }
73281
73398
 
73282
73399
  var wheelValue=e.wheelDelta;
73283
73400
  if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
@@ -80388,6 +80505,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
80388
80505
  this.ClassName='MinuteChartContainer';
80389
80506
  this.WindowIndex=new Array();
80390
80507
  this.Symbol;
80508
+ this.AryDate; //日期列表[]
80391
80509
  this.Name;
80392
80510
  this.SourceData; //原始的历史数据
80393
80511
  this.IndexBindData; //计算指标需要绑定的分钟数据
@@ -83155,6 +83273,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83155
83273
  this.OverlayChartPaint.push(paint);
83156
83274
  }
83157
83275
  }
83276
+
83277
+ if (IFrameSplitOperator.IsNonEmptyArray(option.AryDate))
83278
+ {
83279
+ this.AryDate=option.AryDate.slice();
83280
+ }
83158
83281
  }
83159
83282
 
83160
83283
  if (!symbol || this.DayCount<=0)
@@ -83204,6 +83327,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83204
83327
  this.SetPageInfo(option.PageInfo);
83205
83328
  this.ResetDayOffset();
83206
83329
  }
83330
+
83331
+ if (option)
83332
+ {
83333
+ if (IFrameSplitOperator.IsNonEmptyArray(option.AryDate))
83334
+ {
83335
+ this.AryDate=option.AryDate.slice();
83336
+ }
83337
+ }
83207
83338
 
83208
83339
  this.ReloadChartDrawPicture();
83209
83340
  this.ResetDataStatus();
@@ -83536,7 +83667,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83536
83667
  {
83537
83668
  Name:'MinuteChartContainer::RequestHistoryMinuteData', //类名::函数
83538
83669
  Explain:'多日分时数据',
83539
- Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation }, Type:'POST' },
83670
+ Request:{ Url:self.HistoryMinuteApiUrl, Data:{daycount:self.DayCount, symbol:self.Symbol, callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
83540
83671
  Self:this,
83541
83672
  PreventDefault:false
83542
83673
  };
@@ -83926,7 +84057,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83926
84057
  {
83927
84058
  Name:'MinuteChartContainer::RequestMinuteData', //类名::函数名
83928
84059
  Explain:'最新分时数据',
83929
- Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation }, Type:'POST' },
84060
+ Request:{ Url:self.MinuteApiUrl, Data:{field:fields, symbol:[self.Symbol], callcation:callCation, AryDate:this.AryDate }, Type:'POST' },
83930
84061
  Self:this,
83931
84062
  PreventDefault:false
83932
84063
  };
@@ -1562,15 +1562,14 @@ input[type="color"] {
1562
1562
  visibility:hidden;
1563
1563
  background-color: rgba(255,255,255,0.95);
1564
1564
  border: solid 1px rgba(200, 210, 219, 0.92);
1565
- display: flex;
1566
- flex-flow: column;
1567
1565
  z-index: 99;
1568
1566
  pointer-events:none;
1569
1567
  }
1570
1568
 
1571
1569
  .UMyChart_Tooltip_Minute_Chart_Div
1572
1570
  {
1573
- flex: 1
1571
+ height: 100%;
1572
+ width: 100%;
1574
1573
  }
1575
1574
 
1576
1575