hqchart 1.1.14473 → 1.1.14482

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.
@@ -6664,6 +6664,11 @@ var JSCHART_EVENT_ID=
6664
6664
  SEARCH_DIALOG_ON_CLICK_INDEX:163, //切换指标-指标对话框
6665
6665
 
6666
6666
  ON_CALCULATE_CHIP_DATA:164, //计算筹码数据 (筹码图用)
6667
+
6668
+
6669
+ ON_CLICK_DEAL_ROW:165,
6670
+ ON_RCLICK_DEAL_ROW:166,
6671
+ ON_DBCLICK_DEAL_ROW:167,
6667
6672
  }
6668
6673
 
6669
6674
  var JSCHART_OPERATOR_ID=
@@ -10951,7 +10956,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10951
10956
  return this.Frame.ZoomIndexWindow(frameID, option);
10952
10957
  }
10953
10958
 
10954
- this.ShowIndexTitleOnly=function(frameID, option) //只显示指标的标题
10959
+ this.ShowIndexTitleOnly=function(frameID, option) //只显示指标的标题 option={ Enable:true/false }
10955
10960
  {
10956
10961
  if (frameID<0 || frameID>=this.Frame.SubFrame.length) return false;
10957
10962
  return this.Frame.ShowIndexTitleOnly(frameID, option);
@@ -29252,7 +29257,7 @@ function IChartPainting()
29252
29257
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
29253
29258
  {
29254
29259
  var data=this.Data.Data[i];
29255
- if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
29260
+ if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
29256
29261
 
29257
29262
  if (firstOverlayOpen==null) firstOverlayOpen=data.Open;
29258
29263
 
@@ -30182,7 +30187,7 @@ function ChartKLine()
30182
30187
  {
30183
30188
  var data=this.Data.Data[i];
30184
30189
  this.ShowRange.End=i;
30185
- if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
30190
+ if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
30186
30191
 
30187
30192
  var left=xOffset;
30188
30193
  var right=xOffset+dataWidth;
@@ -32550,6 +32555,7 @@ function ChartKLine()
32550
32555
  tooltip.Data=this.Data.Data[index];
32551
32556
  tooltip.ChartPaint=this;
32552
32557
  tooltip.Type=0; //K线信息
32558
+ tooltip.Symbol=this.Symbol;
32553
32559
  return true;
32554
32560
  }
32555
32561
  }
@@ -32584,7 +32590,7 @@ function ChartKLine()
32584
32590
  for(var i=start,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
32585
32591
  {
32586
32592
  var data=this.Data.Data[i];
32587
- if (!IFrameSplitOperator.IsNumber(data.Close)) continue;
32593
+ if (!data || !IFrameSplitOperator.IsNumber(data.Close)) continue;
32588
32594
 
32589
32595
  if (range.Max==null) range.Max=data.Close;
32590
32596
  if (range.Min==null) range.Min=data.Close;
@@ -32598,7 +32604,7 @@ function ChartKLine()
32598
32604
  for(var i=start,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
32599
32605
  {
32600
32606
  var data=this.Data.Data[i];
32601
- if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
32607
+ if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
32602
32608
 
32603
32609
  if (this.DrawType==5 && data.OrderFlow && IFrameSplitOperator.IsNumber(data.OrderFlow.PriceOffset))
32604
32610
  {
@@ -76415,7 +76421,12 @@ function JSChartResource()
76415
76421
 
76416
76422
  UpTextColor:"rgb(238,21,21)", //上涨文字颜色
76417
76423
  DownTextColor:"rgb(25,158,0)", //下跌文字颜色
76418
- UnchagneTextColor:"rgb(0,0,0)" //平盘文字颜色
76424
+ UnchagneTextColor:"rgb(0,0,0)", //平盘文字颜色
76425
+
76426
+ Selected:
76427
+ {
76428
+ BGColor:"rgb(180,240,240)",
76429
+ }
76419
76430
  },
76420
76431
 
76421
76432
  //报价列表
@@ -76435,7 +76446,7 @@ function JSChartResource()
76435
76446
  SortIcon:
76436
76447
  {
76437
76448
  Size:12, Family:"iconfont",
76438
- Arrow:["\ue704", "\ue81b", "\uf0c9"], //[0]=默认排序的图标背景色
76449
+ Arrow:["\ue704", "\uf0c9","\ue81b"], //[0]=默认排序的图标背景色
76439
76450
  Color:['rgb(169,169,169)', "rgb(51,51,51)", "rgb(51,51,51)"],
76440
76451
  Margin:{ Left:1*GetDevicePixelRatio(), Bottom:2, Right:0,}
76441
76452
  },
@@ -77468,6 +77479,12 @@ function JSChartResource()
77468
77479
  this.DealList.FieldColor.Bar[i]=filed.Bar[i];
77469
77480
  }
77470
77481
  }
77482
+
77483
+ if (item.Selected)
77484
+ {
77485
+ var subItem=item.Selected;
77486
+ if (subItem.BGColor) this.DealList.Selected.BGColor=subItem.BGColor;
77487
+ }
77471
77488
  }
77472
77489
 
77473
77490
  if (style.Report) this.SetReportStyle(style.Report);
@@ -122506,6 +122523,8 @@ var SCRIPT_CHART_NAME=
122506
122523
  SCATTER_PLOT:"SCATTER_PLOT", //散点图
122507
122524
 
122508
122525
  CLIP_COLOR_STICK:"CLIP_COLOR_STICK", //上下柱子 裁剪
122526
+
122527
+ DRAW_KLINE:"DRAWKLINE"
122509
122528
  }
122510
122529
 
122511
122530
 
@@ -123574,6 +123593,15 @@ function ScriptIndex(name,script,args,option)
123574
123593
  if (varItem.Color) //如果设置了颜色,使用外面设置的颜色
123575
123594
  chart.UnchagneColor=chart.DownColor=chart.UpColor=this.GetColor(varItem.Color);
123576
123595
 
123596
+ if (varItem.Draw.Config)
123597
+ {
123598
+ var config=varItem.Draw.Config;
123599
+ if (IFrameSplitOperator.IsBool(config.IsShowMaxMinPrice)) chart.IsShowMaxMinPrice=config.IsShowMaxMinPrice;
123600
+ if (IFrameSplitOperator.IsBool(config.IsShowKTooltip)) chart.IsShowKTooltip=config.IsShowKTooltip;
123601
+ if (config.Symbol) chart.Symbol=config.Symbol;
123602
+ if (config.Name) chart.Title=config.Name;
123603
+ }
123604
+
123577
123605
  this.SetChartIndexName(chart);
123578
123606
  hqChart.ChartPaint.push(chart);
123579
123607
  }
@@ -124262,12 +124290,10 @@ function ScriptIndex(name,script,args,option)
124262
124290
  this.SetChartIndexName(chart);
124263
124291
  hqChart.ChartPaint.push(chart);
124264
124292
 
124265
- var titleIndex=windowIndex+1;
124266
- if (varItem.IsShowTitle===false)
124267
- {
124268
-
124269
- }
124270
- else
124293
+ var titleIndex=windowIndex+1;
124294
+ var bShowTitle=true;
124295
+ if (varItem.IsShowTitle===false) bShowTitle=false;
124296
+ if (bShowTitle)
124271
124297
  {
124272
124298
  var titleData=new DynamicTitleData(chart.Data,chart.Name, null);
124273
124299
  titleData.DataType="ChartMultiLine";
@@ -124293,10 +124319,15 @@ function ScriptIndex(name,script,args,option)
124293
124319
  hqChart.ChartPaint.push(chart);
124294
124320
 
124295
124321
  var titleIndex=windowIndex+1;
124296
- var titleData=new DynamicTitleData(chart.Data,chart.Name, null);
124297
- titleData.DataType="ChartMultiPoint";
124298
- titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
124299
- hqChart.TitlePaint[titleIndex].Data[i]=titleData;
124322
+ var bShowTitle=true;
124323
+ if (varItem.IsShowTitle===false) bShowTitle=false;
124324
+ if (bShowTitle)
124325
+ {
124326
+ var titleData=new DynamicTitleData(chart.Data,chart.Name, null);
124327
+ titleData.DataType="ChartMultiPoint";
124328
+ titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
124329
+ hqChart.TitlePaint[titleIndex].Data[i]=titleData;
124330
+ }
124300
124331
  }
124301
124332
 
124302
124333
  this.CreateMultiBar=function(hqChart,windowIndex,varItem,id)
@@ -124315,10 +124346,17 @@ function ScriptIndex(name,script,args,option)
124315
124346
  hqChart.ChartPaint.push(chart);
124316
124347
 
124317
124348
  var titleIndex=windowIndex+1;
124318
- var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
124319
- titleData.DataType="ChartMultiBar";
124320
- titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
124321
- hqChart.TitlePaint[titleIndex].Data[id]=titleData;
124349
+
124350
+ var bShowTitle=true;
124351
+ if (varItem.IsShowTitle===false) bShowTitle=false;
124352
+ if (bShowTitle)
124353
+ {
124354
+ var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
124355
+ titleData.DataType="ChartMultiBar";
124356
+ titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
124357
+ hqChart.TitlePaint[titleIndex].Data[id]=titleData;
124358
+ }
124359
+
124322
124360
  }
124323
124361
 
124324
124362
  this.CreateMultiText=function(hqChart,windowIndex,varItem,i)
@@ -126032,11 +126070,16 @@ function OverlayScriptIndex(name,script,args,option)
126032
126070
  chart.BuildCacheData();
126033
126071
 
126034
126072
  var titleIndex=windowIndex+1;
126035
- var titlePaint=hqChart.TitlePaint[titleIndex];
126036
- var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
126037
- titleData.DataType="ChartMultiPoint";
126038
- titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
126039
- titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
126073
+ var bShowTitle=true;
126074
+ if (varItem.IsShowTitle===false) bShowTitle=false;
126075
+ if (bShowTitle)
126076
+ {
126077
+ var titlePaint=hqChart.TitlePaint[titleIndex];
126078
+ var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
126079
+ titleData.DataType="ChartMultiPoint";
126080
+ titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
126081
+ titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
126082
+ }
126040
126083
 
126041
126084
  this.SetChartIndexName(chart);
126042
126085
 
@@ -126082,12 +126125,16 @@ function OverlayScriptIndex(name,script,args,option)
126082
126125
  chart.BuildCacheData();
126083
126126
 
126084
126127
  var titleIndex=windowIndex+1;
126085
- var titlePaint=hqChart.TitlePaint[titleIndex];
126086
- var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
126087
- titleData.DataType="ChartMultiBar";
126088
- titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
126089
-
126090
- titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
126128
+ var bShowTitle=true;
126129
+ if (varItem.IsShowTitle===false) bShowTitle=false;
126130
+ if (bShowTitle)
126131
+ {
126132
+ var titlePaint=hqChart.TitlePaint[titleIndex];
126133
+ var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
126134
+ titleData.DataType="ChartMultiBar";
126135
+ titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
126136
+ titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
126137
+ }
126091
126138
 
126092
126139
  this.SetChartIndexName(chart);
126093
126140
  frame.ChartPaint.push(chart);
@@ -127514,6 +127561,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
127514
127561
  outVarItem.Draw=drawItem;
127515
127562
  result.push(outVarItem);
127516
127563
  }
127564
+ else if (draw.DrawType==SCRIPT_CHART_NAME.DRAW_KLINE)
127565
+ {
127566
+ drawItem.Name=draw.Name;
127567
+ drawItem.Type=draw.Type;
127568
+ drawItem.DrawType=draw.DrawType;
127569
+
127570
+ drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);
127571
+ drawItem.Config=draw.Config;
127572
+ outVarItem.Draw=drawItem;
127573
+ result.push(outVarItem);
127574
+ }
127517
127575
  else
127518
127576
  {
127519
127577
  var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
@@ -129241,7 +129299,12 @@ function GetBlackStyle()
129241
129299
 
129242
129300
  UpTextColor:"rgb(238,21,21)", //上涨文字颜色
129243
129301
  DownTextColor:"rgb(25,158,0)", //下跌文字颜色
129244
- UnchagneTextColor:"rgb(228,228,228)" //平盘文字颜色
129302
+ UnchagneTextColor:"rgb(228,228,228)", //平盘文字颜色
129303
+
129304
+ Selected:
129305
+ {
129306
+ BGColor:"rgb(49,48,56)",
129307
+ }
129245
129308
  },
129246
129309
 
129247
129310
  //报价列表
@@ -129600,6 +129663,17 @@ function JSDealChart(divElement)
129600
129663
 
129601
129664
  this.JSChartContainer=chart;
129602
129665
  this.DivElement.JSChart=this; //div中保存一份
129666
+
129667
+ //注册事件
129668
+ if (option.EventCallback)
129669
+ {
129670
+ for(var i=0;i<option.EventCallback.length;++i)
129671
+ {
129672
+ var item=option.EventCallback[i];
129673
+ chart.AddEventCallback(item);
129674
+ }
129675
+ }
129676
+
129603
129677
  if (!option.Symbol)
129604
129678
  {
129605
129679
  chart.Draw();
@@ -129824,6 +129898,7 @@ function JSDealChartContainer(uielement)
129824
129898
  chart.Frame=this.Frame;
129825
129899
  chart.ChartBorder=this.Frame.ChartBorder;
129826
129900
  chart.Canvas=this.Canvas;
129901
+ chart.UIElement=this.UIElement;
129827
129902
  chart.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
129828
129903
  this.ChartPaint[0]=chart;
129829
129904
 
@@ -129851,10 +129926,16 @@ function JSDealChartContainer(uielement)
129851
129926
  bRegisterWheel=false;
129852
129927
  JSConsole.Chart.Log('[JSDealChartContainer::Create] not register wheel event.');
129853
129928
  }
129929
+
129930
+ if (IFrameSplitOperator.IsBool(option.EnableSelected)) chart.SelectedData.Enable=option.EnableSelected;
129854
129931
  }
129855
129932
 
129856
129933
  if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
129857
129934
  if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
129935
+
129936
+ this.UIElement.onmousedown=(e)=> { this.UIOnMouseDown(e); }
129937
+ this.UIElement.ondblclick=(e)=>{ this.UIOnDblClick(e); }
129938
+ this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
129858
129939
  }
129859
129940
 
129860
129941
  this.Draw=function()
@@ -130228,6 +130309,40 @@ function JSDealChartContainer(uielement)
130228
130309
  else e.returnValue = false;
130229
130310
  }
130230
130311
 
130312
+ this.UIOnMouseDown=function(e)
130313
+ {
130314
+ var pixelTatio = GetDevicePixelRatio();
130315
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
130316
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
130317
+
130318
+
130319
+ var chart=this.ChartPaint[0];
130320
+ if (!chart) return;
130321
+
130322
+ var clickData=chart.OnMouseDown(x,y,e);
130323
+ if (!clickData) return;
130324
+
130325
+ if ((clickData.Type==1) && (e.button==0 || e.button==2)) //点击行
130326
+ {
130327
+ if (clickData.Redraw==true) this.Draw();
130328
+ }
130329
+ }
130330
+
130331
+ this.UIOnDblClick=function(e)
130332
+ {
130333
+ var pixelTatio = GetDevicePixelRatio();
130334
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
130335
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
130336
+
130337
+ var chart=this.ChartPaint[0];
130338
+ if (chart) chart.OnDblClick(x,y,e);
130339
+ }
130340
+
130341
+ this.UIOnContextMenu=function(e)
130342
+ {
130343
+ e.preventDefault();
130344
+ }
130345
+
130231
130346
  this.GotoNextPage=function()
130232
130347
  {
130233
130348
  if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return false;
@@ -130321,7 +130436,7 @@ JSDealChartContainer.JsonDataToDealData=function(data)
130321
130436
  {
130322
130437
  var item=data.detail[i];
130323
130438
 
130324
- var dealItem={ Time:item[0], Price:item[1], Vol:item[2], BS:item[4], Amount:item[3] };
130439
+ var dealItem={ Time:item[0], Price:item[1], Vol:item[2], BS:item[4], Amount:item[3], Guid:Guid() };
130325
130440
  dealItem.Source=item;
130326
130441
 
130327
130442
  if (item[5]) dealItem.StrTime=item[5];
@@ -130447,6 +130562,7 @@ function ChartDealList()
130447
130562
  this.IsSingleTable=false; //单表模式
130448
130563
  this.IsShowHeader=true; //是否显示表头
130449
130564
  this.ShowOrder=1; //0=顺序 1=倒序
130565
+ this.SelectedData={ Index:null, Guid:null, Enable:false }; //{ Index:序号, Guid, Enable:是否启动 }
130450
130566
 
130451
130567
  this.SizeChange=true;
130452
130568
 
@@ -130457,6 +130573,8 @@ function ChartDealList()
130457
130573
 
130458
130574
  this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
130459
130575
 
130576
+ this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor };
130577
+
130460
130578
  //表头配置
130461
130579
  this.HeaderFontConfig={ Size:g_JSChartResource.DealList.Header.Font.Size, Name:g_JSChartResource.DealList.Header.Font.Name };
130462
130580
  this.HeaderColor=g_JSChartResource.DealList.Header.Color;
@@ -130496,6 +130614,7 @@ function ChartDealList()
130496
130614
  ];
130497
130615
 
130498
130616
  this.RectClient={};
130617
+ this.AryCellRect=[]; //{ Rect:, Type: 1=单行 }
130499
130618
 
130500
130619
  this.ReloadResource=function(resource)
130501
130620
  {
@@ -130596,6 +130715,7 @@ function ChartDealList()
130596
130715
 
130597
130716
  this.Draw=function()
130598
130717
  {
130718
+ this.AryCellRect=[];
130599
130719
  if (this.SizeChange) this.CalculateSize();
130600
130720
  else this.UpdateCacheData();
130601
130721
 
@@ -130751,6 +130871,7 @@ function ChartDealList()
130751
130871
  for(j=0;j<this.RowCount && index>=0;++j, --index)
130752
130872
  {
130753
130873
  var dataItem=this.Data.Data[index];
130874
+ this.DrawSelectedRow(dataItem, index, rtRow);
130754
130875
 
130755
130876
  this.DrawRow(dataItem, textLeft, textTop, index);
130756
130877
 
@@ -130768,8 +130889,15 @@ function ChartDealList()
130768
130889
  for(j=0;j<this.RowCount && index<dataCount;++j, ++index)
130769
130890
  {
130770
130891
  var dataItem=this.Data.Data[index];
130892
+ var rtRow={ Left:textLeft-this.HeaderMergin.Left, Top:textTop, Height:this.RowHeight, Width:this.TableWidth };
130893
+ rtRow.Right=rtRow.Left+rtRow.Width;
130894
+ rtRow.Bottom=rtRow.Top+rtRow.Height;
130895
+
130896
+ this.DrawSelectedRow(dataItem, index, rtRow);
130771
130897
 
130772
130898
  this.DrawRow(dataItem, textLeft, textTop, index);
130899
+
130900
+ this.AryCellRect.push({ Rect:rtRow, Type:1, DataIndex:index });
130773
130901
 
130774
130902
  textTop+=this.RowHeight;
130775
130903
  }
@@ -130875,6 +131003,16 @@ function ChartDealList()
130875
131003
  }
130876
131004
  }
130877
131005
 
131006
+ this.DrawSelectedRow=function(data, index, rtRow)
131007
+ {
131008
+ if (!this.SelectedData) return;
131009
+ if (!this.SelectedData.Enable) return;
131010
+ if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return;
131011
+
131012
+ this.Canvas.fillStyle=this.SelectedConfig.BGColor;
131013
+ this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
131014
+ }
131015
+
130878
131016
  this.DrawItemText=function(text, textColor, textAlign, left, top, width)
130879
131017
  {
130880
131018
  var x=left;
@@ -131001,6 +131139,81 @@ function ChartDealList()
131001
131139
  {
131002
131140
  return GetFontHeight(this.Canvas, font, word);
131003
131141
  }
131142
+
131143
+ this.OnMouseDown=function(x,y,e) //Type: 1=行
131144
+ {
131145
+ if (!this.Data) return null;
131146
+
131147
+ var pixelTatio = GetDevicePixelRatio();
131148
+ var insidePoint={X:x/pixelTatio, Y:y/pixelTatio};
131149
+ var uiElement;
131150
+ if (this.UIElement) uiElement={Left:this.UIElement.getBoundingClientRect().left, Top:this.UIElement.getBoundingClientRect().top};
131151
+ else uiElement={Left:null, Top:null};
131152
+
131153
+ var row=this.PtInBody(x,y);
131154
+ if (row)
131155
+ {
131156
+ var bRedraw=true;
131157
+ var index=row.DataIndex;
131158
+ var id=row.Item.Guid
131159
+ if (this.SelectedData.Index==index && this.SelectedData.Guid==id) bRedraw=false;
131160
+
131161
+ this.SelectedData.Index=index;
131162
+ this.SelectedData.Guid=id;
131163
+
131164
+ var eventID=JSCHART_EVENT_ID.ON_CLICK_DEAL_ROW;
131165
+ if (e.button==2) eventID=JSCHART_EVENT_ID.ON_RCLICK_DEAL_ROW;
131166
+
131167
+ this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
131168
+
131169
+ return { Type:row.Type, Redraw:bRedraw, Row:row };
131170
+ }
131171
+
131172
+ return null;
131173
+ }
131174
+
131175
+ this.OnDblClick=function(x,y,e)
131176
+ {
131177
+ if (!this.Data) return false;
131178
+
131179
+ var row=this.PtInBody(x,y);
131180
+ if (row)
131181
+ {
131182
+ this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_DEAL_ROW, { Data:row, X:x, Y:y });
131183
+ return true;
131184
+ }
131185
+
131186
+ return false;
131187
+ }
131188
+
131189
+ this.PtInBody=function(x,y)
131190
+ {
131191
+ if (!this.Data) return null;
131192
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return null;
131193
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.AryCellRect)) return null;
131194
+
131195
+ for(var i=0;i<this.AryCellRect.length;++i)
131196
+ {
131197
+ var item=this.AryCellRect[i];
131198
+ var rtRow=item.Rect;
131199
+ if (x>=rtRow.Left && x<=rtRow.Right && y>=rtRow.Top && y<=rtRow.Bottom)
131200
+ {
131201
+ var data={ Rect:rtRow, DataIndex:item.DataIndex, Item:this.Data.Data[item.DataIndex], Type:item.Type };
131202
+ return data;
131203
+ }
131204
+ }
131205
+
131206
+ return null;
131207
+ }
131208
+
131209
+ this.SendClickEvent=function(id, data)
131210
+ {
131211
+ var event=this.GetEventCallback(id);
131212
+ if (event && event.Callback)
131213
+ {
131214
+ event.Callback(event,data,this);
131215
+ }
131216
+ }
131004
131217
  }
131005
131218
  /*
131006
131219
  Copyright (c) 2018 jones
@@ -139582,7 +139795,7 @@ function ChartReport()
139582
139795
  return null;
139583
139796
  }
139584
139797
 
139585
- //设置选中行 data={ Symbol:, AutoYScroll:true/false Y滚动条自定定位 }
139798
+ //设置选中行 option={ Symbol:, AutoYScroll:true/false Y滚动条自定定位 }
139586
139799
  this.SetSelectedRow=function(option)
139587
139800
  {
139588
139801
  if (!option) return false;
@@ -150571,14 +150784,21 @@ function JSFloatTooltip()
150571
150784
  var symbol=data.Symbol;
150572
150785
  var name=data.Name;
150573
150786
  var bOverlay=false; //是否是叠加指标
150787
+ var bIndexKLine=false;
150574
150788
  if (tooltipData.ChartPaint.Name=="Overlay-KLine")
150575
150789
  {
150576
150790
  symbol=tooltipData.ChartPaint.Symbol;
150577
150791
  name=tooltipData.ChartPaint.Title;
150578
150792
  bOverlay=true;
150579
150793
  }
150794
+ else if (tooltipData.ChartPaint.Name=="DRAWKLINE")
150795
+ {
150796
+ symbol=tooltipData.ChartPaint.Symbol;
150797
+ name=tooltipData.ChartPaint.Title;
150798
+ bIndexKLine=true;
150799
+ }
150580
150800
 
150581
- var kItem={ Symbol:symbol, Name:name, Item:CloneData(tooltipData.Data), IsOverlay:bOverlay };
150801
+ var kItem={ Symbol:symbol, Name:name, Item:CloneData(tooltipData.Data), IsOverlay:bOverlay, IsIndexKLine:bIndexKLine };
150582
150802
  var strKItem=JSON.stringify(kItem);
150583
150803
  var bUpdata=false;
150584
150804
  if (this.KItemCacheID!=strKItem) //数据变动的才更新
@@ -150879,10 +151099,11 @@ function JSFloatTooltip()
150879
151099
  if (IFrameSplitOperator.IsNumber(data.Time)) timeItem=this.FormatTime(data.Time, this.HQChart.Period, null, 'FloatTooltip-Time');
150880
151100
 
150881
151101
  var overlayItem=null;
150882
- if (kItem.IsOverlay)
151102
+ if (kItem.IsOverlay || (kItem.IsIndexKLine && kItem.Name))
150883
151103
  overlayItem={ Title:"", Text:kItem.Name, Color:this.TextColor, ClassName:this.ValueAlign.Left };
150884
151104
 
150885
151105
 
151106
+
150886
151107
  var yClose=data.YClose; //昨收价|昨结算价
150887
151108
  var aryText=
150888
151109
  [
@@ -153522,7 +153743,7 @@ function HQChartScriptWorker()
153522
153743
 
153523
153744
 
153524
153745
 
153525
- var HQCHART_VERSION="1.1.14472";
153746
+ var HQCHART_VERSION="1.1.14481";
153526
153747
 
153527
153748
  function PrintHQChartVersion()
153528
153749
  {