hqchart 1.1.14746 → 1.1.14752

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.
@@ -133808,6 +133808,8 @@ function JSDealChart(divElement)
133808
133808
  }
133809
133809
  }
133810
133810
 
133811
+ if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
133812
+
133811
133813
  if (!option.Symbol)
133812
133814
  {
133813
133815
  chart.Draw();
@@ -133948,10 +133950,15 @@ function JSDealChartContainer(uielement)
133948
133950
  this.AutoUpdateFrequency=15000; //更新频率
133949
133951
 
133950
133952
  this.LoadDataSplashTitle="数据加载中"; //下载数据提示信息
133953
+
133954
+ this.TooltipMinuteChart; //分时图
133951
133955
 
133952
133956
  this.UIElement=uielement;
133953
133957
  this.LastPoint=new Point(); //鼠标位置
133954
133958
 
133959
+ //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
133960
+ this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
133961
+
133955
133962
  this.IsDestroy=false; //是否已经销毁了
133956
133963
 
133957
133964
  this.ChartDestroy=function() //销毁
@@ -133962,6 +133969,51 @@ function JSDealChartContainer(uielement)
133962
133969
 
133963
133970
  this.EnableFilterData=false; //是否启动筛选
133964
133971
 
133972
+ this.InitalMinuteChartTooltip=function(option)
133973
+ {
133974
+ if (this.TooltipMinuteChart) return;
133975
+
133976
+ this.TooltipMinuteChart=new JSTooltipMinuteChart();
133977
+ this.TooltipMinuteChart.Inital(this, option);
133978
+ this.TooltipMinuteChart.Create();
133979
+ }
133980
+
133981
+ this.DestroyMinuteChartTooltip=function()
133982
+ {
133983
+ if (!this.TooltipMinuteChart) return;
133984
+
133985
+ this.TooltipMinuteChart.Destroy();
133986
+ this.TooltipMinuteChart=null;
133987
+ }
133988
+
133989
+ //data={ Symbol }
133990
+ this.ShowMinuteChartTooltip=function(x,y, data)
133991
+ {
133992
+ if (!this.TooltipMinuteChart) return;
133993
+
133994
+ var rtClient=this.UIElement.getBoundingClientRect();
133995
+ var rtScroll=GetScrollPosition();
133996
+
133997
+ var offsetLeft=rtClient.left+rtScroll.Left;
133998
+ var offsetTop=rtClient.top+rtScroll.Top;
133999
+
134000
+ data.Offset={ Left:offsetLeft, Top:offsetTop };
134001
+
134002
+ this.TooltipMinuteChart.Show(data, x,y);
134003
+ }
134004
+
134005
+ this.HideMinuteChartTooltip=function()
134006
+ {
134007
+ if (!this.TooltipMinuteChart) return;
134008
+
134009
+ this.TooltipMinuteChart.Hide();
134010
+ }
134011
+
134012
+ this.HideAllTooltip=function()
134013
+ {
134014
+ this.HideMinuteChartTooltip();
134015
+ }
134016
+
133965
134017
  //筛选数据
133966
134018
  this.FilterData=function(aryDeal)
133967
134019
  {
@@ -134070,6 +134122,7 @@ function JSDealChartContainer(uielement)
134070
134122
  this.UIElement.onmousedown=(e)=> { this.UIOnMouseDown(e); }
134071
134123
  this.UIElement.ondblclick=(e)=>{ this.UIOnDblClick(e); }
134072
134124
  this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
134125
+ this.UIElement.onmousemove=(e)=>{ this.UIOnMouseMove(e);}
134073
134126
  }
134074
134127
 
134075
134128
  this.Draw=function()
@@ -134412,10 +134465,12 @@ function JSDealChartContainer(uielement)
134412
134465
 
134413
134466
  if (wheelValue<0) //下一页
134414
134467
  {
134468
+ this.HideAllTooltip();
134415
134469
  if (this.GotoNextPage()) this.Draw();
134416
134470
  }
134417
134471
  else if (wheelValue>0) //上一页
134418
134472
  {
134473
+ this.HideAllTooltip();
134419
134474
  if (this.GotoPreviousPage()) this.Draw();
134420
134475
  }
134421
134476
 
@@ -134431,9 +134486,11 @@ function JSDealChartContainer(uielement)
134431
134486
  switch(keyID)
134432
134487
  {
134433
134488
  case 38: //up
134489
+ this.HideAllTooltip();
134434
134490
  if (this.GotoPreviousPage()) this.Draw();
134435
134491
  break;
134436
134492
  case 40: //down
134493
+ this.HideAllTooltip();
134437
134494
  if (this.GotoNextPage()) this.Draw();
134438
134495
  break;
134439
134496
  }
@@ -134443,6 +134500,12 @@ function JSDealChartContainer(uielement)
134443
134500
  else e.returnValue = false;
134444
134501
  }
134445
134502
 
134503
+ this.GetReportChart=function()
134504
+ {
134505
+ var chart=this.ChartPaint[0];
134506
+ return chart;
134507
+ }
134508
+
134446
134509
  this.UIOnMouseDown=function(e)
134447
134510
  {
134448
134511
  var pixelTatio = GetDevicePixelRatio();
@@ -134462,6 +134525,67 @@ function JSDealChartContainer(uielement)
134462
134525
  }
134463
134526
  }
134464
134527
 
134528
+ this.UIOnMouseMove=function(e)
134529
+ {
134530
+ var pixelTatio = GetDevicePixelRatio();
134531
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
134532
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
134533
+
134534
+ var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
134535
+ this.LastMouseStatus.OnMouseMove=null;
134536
+
134537
+ var bDrawTooltip=false;
134538
+ if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
134539
+ this.LastMouseStatus.TooltipStatus=null;
134540
+
134541
+ var bShowMinuteTooltip=false;
134542
+ var chartTooltipData=null;
134543
+
134544
+ this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
134545
+ var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
134546
+ var report=this.GetReportChart();
134547
+ var bDraw=false;
134548
+
134549
+ if (report)
134550
+ {
134551
+ var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
134552
+ if (tooltipData)
134553
+ {
134554
+ if (tooltipData.Type==20)
134555
+ {
134556
+ if (tooltipData.Data && tooltipData.Data.Symbol)
134557
+ {
134558
+ bShowMinuteTooltip=true;
134559
+ chartTooltipData={ Symbol:tooltipData.Data.Symbol, Rect:tooltipData.Rect };
134560
+ }
134561
+ }
134562
+ /*
134563
+ else if (tooltipData.Type==21)
134564
+ {
134565
+ if (tooltipData.Stock && tooltipData.Stock.Symbol)
134566
+ {
134567
+ bShowKLineTooltip=true;
134568
+ chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
134569
+ }
134570
+ }
134571
+ else
134572
+ {
134573
+ this.LastMouseStatus.TooltipStatus={ X:x, Y:y, Data:tooltipData, ClientX:e.clientX, ClientY:e.clientY };
134574
+ bDrawTooltip=true;
134575
+ }
134576
+ */
134577
+
134578
+ }
134579
+ }
134580
+
134581
+ if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
134582
+
134583
+ if (bDraw) this.Draw();
134584
+
134585
+ if (!bShowMinuteTooltip) this.HideMinuteChartTooltip();
134586
+ if (bShowMinuteTooltip) this.ShowMinuteChartTooltip(null, null, chartTooltipData);
134587
+ }
134588
+
134465
134589
  this.UIOnDblClick=function(e)
134466
134590
  {
134467
134591
  var pixelTatio = GetDevicePixelRatio();
@@ -134576,6 +134700,33 @@ JSDealChartContainer.JsonDataToDealData=function(data)
134576
134700
  if (item[5]) dealItem.StrTime=item[5];
134577
134701
  if (item[6]) dealItem.ID=item[6];
134578
134702
 
134703
+ if (item[11]) dealItem.Symbol=item[11]; //股票代码
134704
+ if (item[12]) dealItem.Name=item[12]; //股票名称
134705
+
134706
+ //10个数值型 101-199
134707
+ if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
134708
+ if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
134709
+ if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
134710
+ if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
134711
+ if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
134712
+ if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
134713
+ if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
134714
+ if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
134715
+ if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
134716
+ if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
134717
+
134718
+ //10个字符型 201-299
134719
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
134720
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) dealItem.ReserveString2=item[202];
134721
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) dealItem.ReserveString3=item[203];
134722
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) dealItem.ReserveString4=item[204];
134723
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) dealItem.ReserveString5=item[205];
134724
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) dealItem.ReserveString6=item[206];
134725
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) dealItem.ReserveString7=item[207];
134726
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) dealItem.ReserveString8=item[208];
134727
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) dealItem.ReserveString9=item[209];
134728
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) dealItem.ReserveString10=item[210];
134729
+
134579
134730
  result.push(dealItem);
134580
134731
  }
134581
134732
 
@@ -134675,9 +134826,66 @@ var DEAL_COLUMN_ID=
134675
134826
  INDEX_ID:7, //序号 从1开始
134676
134827
  MULTI_BAR_ID:8, //多颜色柱子
134677
134828
  CENTER_BAR_ID:9, //中心柱子
134678
- CUSTOM_TEXT_ID:10 //自定义文本
134829
+ CUSTOM_TEXT_ID:10, //自定义文本
134830
+
134831
+ SYMBOL_ID:11, //股票代码
134832
+ NAME_ID:12, //股票名称
134833
+
134834
+
134835
+ //预留数值类型 10个
134836
+ RESERVE_NUMBER1_ID:201, //ReserveNumber1:
134837
+ RESERVE_NUMBER2_ID:202,
134838
+ RESERVE_NUMBER3_ID:203,
134839
+ RESERVE_NUMBER4_ID:204,
134840
+ RESERVE_NUMBER5_ID:205,
134841
+ RESERVE_NUMBER6_ID:206,
134842
+ RESERVE_NUMBER7_ID:207,
134843
+ RESERVE_NUMBER8_ID:208,
134844
+ RESERVE_NUMBER9_ID:209,
134845
+ RESERVE_NUMBER10_ID:210,
134846
+
134847
+ //预留字符串类型 10个 301-399
134848
+ RESERVE_STRING1_ID:301, //ReserveString1:
134849
+ RESERVE_STRING2_ID:302,
134850
+ RESERVE_STRING3_ID:303,
134851
+ RESERVE_STRING4_ID:304,
134852
+ RESERVE_STRING5_ID:305,
134853
+ RESERVE_STRING6_ID:306,
134854
+ RESERVE_STRING7_ID:307,
134855
+ RESERVE_STRING8_ID:308,
134856
+ RESERVE_STRING9_ID:309,
134857
+ RESERVE_STRING10_ID:310,
134679
134858
  }
134680
134859
 
134860
+ var MAP_DEAL_COLUMN_FIELD=new Map(
134861
+ [
134862
+ [DEAL_COLUMN_ID.SYMBOL_ID, "Symbol"],
134863
+ [DEAL_COLUMN_ID.NAME_ID, "Name"],
134864
+ [DEAL_COLUMN_ID.PRICE_ID, "Price"],
134865
+
134866
+ [DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
134867
+ [DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
134868
+ [DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
134869
+ [DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,"ReserveNumber4"],
134870
+ [DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,"ReserveNumber5"],
134871
+ [DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,"ReserveNumber6"],
134872
+ [DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,"ReserveNumber7"],
134873
+ [DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,"ReserveNumber8"],
134874
+ [DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,"ReserveNumber9"],
134875
+ [DEAL_COLUMN_ID.RESERVE_NUMBER10_ID,"ReserveNumber10"],
134876
+
134877
+ [DEAL_COLUMN_ID.RESERVE_STRING1_ID,"ReserveString1"],
134878
+ [DEAL_COLUMN_ID.RESERVE_STRING2_ID,"ReserveString2"],
134879
+ [DEAL_COLUMN_ID.RESERVE_STRING3_ID,"ReserveString3"],
134880
+ [DEAL_COLUMN_ID.RESERVE_STRING4_ID,"ReserveString4"],
134881
+ [DEAL_COLUMN_ID.RESERVE_STRING5_ID,"ReserveString5"],
134882
+ [DEAL_COLUMN_ID.RESERVE_STRING6_ID,"ReserveString6"],
134883
+ [DEAL_COLUMN_ID.RESERVE_STRING7_ID,"ReserveString7"],
134884
+ [DEAL_COLUMN_ID.RESERVE_STRING8_ID,"ReserveString8"],
134885
+ [DEAL_COLUMN_ID.RESERVE_STRING9_ID,"ReserveString9"],
134886
+ [DEAL_COLUMN_ID.RESERVE_STRING10_ID,"ReserveString10"],
134887
+ ]);
134888
+
134681
134889
  function ChartDealList()
134682
134890
  {
134683
134891
  this.Canvas; //画布
@@ -134703,7 +134911,7 @@ function ChartDealList()
134703
134911
  //涨跌颜色
134704
134912
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
134705
134913
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
134706
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
134914
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
134707
134915
 
134708
134916
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
134709
134917
 
@@ -134750,11 +134958,15 @@ function ChartDealList()
134750
134958
  this.RectClient={};
134751
134959
  this.AryCellRect=[]; //{ Rect:, Type: 1=单行 }
134752
134960
 
134961
+ //Type:20=分时图
134962
+ //{ Rect, Data, Index, Column, Type }}
134963
+ this.TooltipRect=[];
134964
+
134753
134965
  this.ReloadResource=function(resource)
134754
134966
  {
134755
134967
  this.UpColor=g_JSChartResource.DealList.UpTextColor;
134756
134968
  this.DownColor=g_JSChartResource.DealList.DownTextColor;
134757
- this.UnchagneColor=g_JSChartResource.DealList.UnchagneTextColor;
134969
+ this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
134758
134970
 
134759
134971
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
134760
134972
 
@@ -134804,6 +135016,8 @@ function ChartDealList()
134804
135016
  if (item.TextColor) colItem.TextColor=item.TextColor;
134805
135017
  if (item.MaxText) colItem.MaxText=item.MaxText;
134806
135018
 
135019
+ if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type }; //图形提示信息
135020
+
134807
135021
  if (item.Type==DEAL_COLUMN_ID.MULTI_BAR_ID || item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID)
134808
135022
  {
134809
135023
  if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
@@ -134813,6 +135027,11 @@ function ChartDealList()
134813
135027
  {
134814
135028
  if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
134815
135029
  }
135030
+ else if (this.IsReserveNumber(item.Type))
135031
+ {
135032
+ if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
135033
+ if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
135034
+ }
134816
135035
 
134817
135036
  this.Column.push(colItem);
134818
135037
  }
@@ -134834,6 +135053,31 @@ function ChartDealList()
134834
135053
  { Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
134835
135054
  { Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
134836
135055
  { Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
135056
+
135057
+ { Type:DEAL_COLUMN_ID.NAME_ID, Title:"股票名称", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎*" },
135058
+
135059
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135060
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135061
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135062
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER4_ID, Title:"数值4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135063
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER5_ID, Title:"数值5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135064
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER6_ID, Title:"数值6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135065
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER7_ID, Title:"数值7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135066
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER8_ID, Title:"数值8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135067
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER9_ID, Title:"数值9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135068
+ { Type:DEAL_COLUMN_ID.RESERVE_NUMBER10_ID, Title:"数值10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
135069
+
135070
+
135071
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING1_ID, Title:"文字1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135072
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING2_ID, Title:"文字2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135073
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING3_ID, Title:"文字3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135074
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING4_ID, Title:"文字4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135075
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING5_ID, Title:"文字5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135076
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING6_ID, Title:"文字6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135077
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING7_ID, Title:"文字7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135078
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135079
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
135080
+ { Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
134837
135081
 
134838
135082
  ];
134839
135083
 
@@ -134850,6 +135094,7 @@ function ChartDealList()
134850
135094
  this.Draw=function()
134851
135095
  {
134852
135096
  this.AryCellRect=[];
135097
+ this.TooltipRect=[];
134853
135098
  if (this.SizeChange) this.CalculateSize();
134854
135099
  else this.UpdateCacheData();
134855
135100
 
@@ -135055,6 +135300,19 @@ function ChartDealList()
135055
135300
 
135056
135301
  if (i==this.Column.length-1) itemWidth=this.TableWidth-(left-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;
135057
135302
 
135303
+ var drawInfo=
135304
+ {
135305
+ Text:null, TextColor:item.TextColor , TextAlign:item.TextAlign, Tooltip:null,
135306
+ Index:dataIndex, ColumnIndex:i
135307
+ };
135308
+
135309
+ var rtItem={ Left:left, Top:top, Width:itemWidth, Height:this.RowHeight };
135310
+ rtItem.Right=rtItem.Left+rtItem.Width;
135311
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
135312
+ drawInfo.Rect=rtItem;
135313
+
135314
+ var bDrawV2=false;
135315
+
135058
135316
  if (item.Type==DEAL_COLUMN_ID.TIME_ID)
135059
135317
  {
135060
135318
  text=IFrameSplitOperator.FormatTimeString(data.Time,item.Foramt);
@@ -135067,7 +135325,7 @@ function ChartDealList()
135067
135325
  {
135068
135326
  if (data.Price>this.YClose) textColor=this.UpColor;
135069
135327
  else if (data.Price<this.YClose) textColor=this.DownColor;
135070
- else textColor=this.UnchagneColor;
135328
+ else textColor=this.UnchangeColor;
135071
135329
 
135072
135330
  text=data.Price.toFixed(this.Decimal);
135073
135331
  }
@@ -135102,7 +135360,7 @@ function ChartDealList()
135102
135360
 
135103
135361
  if (value>0) textColor=this.UpColor;
135104
135362
  else if (value<0) textColor=this.DownColor;
135105
- else textColor=this.UnchagneColor;
135363
+ else textColor=this.UnchangeColor;
135106
135364
  }
135107
135365
  }
135108
135366
  else if (item.Type==DEAL_COLUMN_ID.INDEX_ID)
@@ -135130,13 +135388,115 @@ function ChartDealList()
135130
135388
  if (out.TextAlign) textAlign=out.TextAlign;
135131
135389
  }
135132
135390
  }
135133
-
135134
- this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
135391
+ else if (this.IsReserveString(item.Type))
135392
+ {
135393
+ this.FormatReserveString(item, data, drawInfo);
135394
+ bDrawV2=true;
135395
+ }
135396
+ else if (this.IsReserveNumber(item.Type))
135397
+ {
135398
+ this.FormatReserveNumber(item, data, drawInfo);
135399
+ bDrawV2=true;
135400
+ }
135401
+
135402
+
135403
+ if (bDrawV2)
135404
+ {
135405
+ this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
135406
+ }
135407
+ else
135408
+ {
135409
+ this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
135410
+ }
135411
+
135412
+ if (item.ChartTooltip && item.ChartTooltip.Enable && IFrameSplitOperator.IsNumber(item.ChartTooltip.Type)) //Type 20分时图 21K线图
135413
+ {
135414
+ var tooltipData={ Rect:rtItem, Data:data, Index:dataIndex, Column:item, Type:item.ChartTooltip.Type };
135415
+ this.TooltipRect.push(tooltipData);
135416
+ }
135135
135417
 
135136
135418
  left+=item.Width;
135137
135419
  }
135138
135420
  }
135139
135421
 
135422
+ this.FormatReserveNumber=function(column, data, drawInfo)
135423
+ {
135424
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
135425
+
135426
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
135427
+ if (!data || !fieldName) return;
135428
+
135429
+ var value=data[fieldName];
135430
+ if (!IFrameSplitOperator.IsNumber(value)) return;
135431
+
135432
+ if (IFrameSplitOperator.IsNumber(column.ColorType))
135433
+ {
135434
+ if (column.ColorType==1)
135435
+ {
135436
+ drawInfo.TextColor=this.GetUpDownColor(value,0);
135437
+ }
135438
+ else if (column.ColorType==2)
135439
+ {
135440
+ drawInfo.TextColor=this.GetUpDownColorV2(value,0);
135441
+ }
135442
+ }
135443
+
135444
+ var text=value.toFixed(column.FloatPrecision);
135445
+ if (column.Format && IFrameSplitOperator.IsNumber(column.Format.Type))
135446
+ {
135447
+ var format=column.Format;
135448
+ switch(format.Type)
135449
+ {
135450
+ case 1: //原始数据
135451
+ text=value.toFixed(column.FloatPrecision);
135452
+ break;
135453
+ case 2: //千分位分割
135454
+ text=IFrameSplitOperator.FormatValueThousandsString(value, column.FloatPrecision);
135455
+ break;
135456
+ case 3:
135457
+ var exfloatPrecision=1;
135458
+ if (IFrameSplitOperator.IsNumber(format.ExFloatPrecision)) exfloatPrecision=format.ExFloatPrecision;
135459
+ text=IFrameSplitOperator.FormatValueStringV2(value, column.FloatPrecision,exfloatPrecision);
135460
+ break;
135461
+ }
135462
+ }
135463
+
135464
+ drawInfo.Text=text;
135465
+ }
135466
+
135467
+ this.FormatReserveString=function(column, data, drawInfo)
135468
+ {
135469
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
135470
+
135471
+ var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
135472
+ if (!data || !fieldName) return;
135473
+
135474
+ var item=data[fieldName];
135475
+ if (IFrameSplitOperator.IsObject(item))
135476
+ {
135477
+ if (item.Text) drawInfo.Text=item.Text;
135478
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
135479
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
135480
+ }
135481
+ else if (IFrameSplitOperator.IsString(item))
135482
+ {
135483
+ drawInfo.Text=item;
135484
+ }
135485
+ }
135486
+
135487
+ this.GetUpDownColor=function(price, price2)
135488
+ {
135489
+ if (price>price2) return this.UpColor;
135490
+ else if (price<price2) return this.DownColor;
135491
+ else return this.UnchangeColor;
135492
+ }
135493
+
135494
+ this.GetUpDownColorV2=function(price, price2)
135495
+ {
135496
+ if (price>=price2) return this.UpColor;
135497
+ else return this.DownColor;
135498
+ }
135499
+
135140
135500
  this.DrawSelectedRow=function(data, index, rtRow)
135141
135501
  {
135142
135502
  if (!this.SelectedData) return;
@@ -135348,6 +135708,49 @@ function ChartDealList()
135348
135708
  event.Callback(event,data,this);
135349
135709
  }
135350
135710
  }
135711
+
135712
+ this.IsReserveString=function(value)
135713
+ {
135714
+ var ARARY_TYPE=
135715
+ [
135716
+ DEAL_COLUMN_ID.RESERVE_STRING1_ID,DEAL_COLUMN_ID.RESERVE_STRING2_ID,DEAL_COLUMN_ID.RESERVE_STRING3_ID,DEAL_COLUMN_ID.RESERVE_STRING4_ID,
135717
+ DEAL_COLUMN_ID.RESERVE_STRING5_ID,DEAL_COLUMN_ID.RESERVE_STRING6_ID,DEAL_COLUMN_ID.RESERVE_STRING7_ID,DEAL_COLUMN_ID.RESERVE_STRING8_ID,
135718
+ DEAL_COLUMN_ID.RESERVE_STRING9_ID,DEAL_COLUMN_ID.RESERVE_STRING10_ID
135719
+ ];
135720
+
135721
+ return ARARY_TYPE.includes(value);
135722
+ }
135723
+
135724
+ this.IsReserveNumber=function(value)
135725
+ {
135726
+ var ARARY_TYPE=
135727
+ [
135728
+ DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,
135729
+ DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,
135730
+ DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,DEAL_COLUMN_ID.RESERVE_NUMBER10_ID
135731
+ ];
135732
+
135733
+ return ARARY_TYPE.includes(value);
135734
+ }
135735
+
135736
+ this.GetTooltipData=function(x,y)
135737
+ {
135738
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect)) return null;
135739
+
135740
+ for(var i=0;i<this.TooltipRect.length;++i)
135741
+ {
135742
+ var item=this.TooltipRect[i];
135743
+ var rt=item.Rect;
135744
+ if (!rt) continue;
135745
+
135746
+ if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
135747
+ {
135748
+ return { Rect:item.Rect, Data:item.Data, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
135749
+ }
135750
+ }
135751
+
135752
+ return null;
135753
+ }
135351
135754
  }
135352
135755
  /*
135353
135756
  Copyright (c) 2018 jones
@@ -148399,7 +148802,7 @@ function ScrollBarBGChart()
148399
148802
 
148400
148803
 
148401
148804
 
148402
- var HQCHART_VERSION="1.1.14745";
148805
+ var HQCHART_VERSION="1.1.14751";
148403
148806
 
148404
148807
  function PrintHQChartVersion()
148405
148808
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14745";
8
+ var HQCHART_VERSION="1.1.14751";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {