hqchart 1.1.14516 → 1.1.14533

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.
@@ -6676,6 +6676,8 @@ var JSCHART_EVENT_ID=
6676
6676
  ON_CLICK_DEAL_ROW:165,
6677
6677
  ON_RCLICK_DEAL_ROW:166,
6678
6678
  ON_DBCLICK_DEAL_ROW:167,
6679
+
6680
+ ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168, //格式化叠指标标题
6679
6681
  }
6680
6682
 
6681
6683
  var JSCHART_OPERATOR_ID=
@@ -6865,6 +6867,7 @@ var JSCHART_MENU_ID=
6865
6867
 
6866
6868
  CMD_RBUTTON_SELECT_RECT_ID:53, //右键区间选择
6867
6869
  CMD_LBUTTON_SELECT_RECT_ID:54, //左键区间选择
6870
+ CMD_ENABLE_XDRAG_BOTTOM_ID:55, //X轴拖动缩放
6868
6871
 
6869
6872
 
6870
6873
 
@@ -8128,7 +8131,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8128
8131
 
8129
8132
  var yMove=e.clientY-drag.LastMove.Y;
8130
8133
 
8131
- this.OnMoveFromeBorder(this.BorderDrag.Index, yMove);
8134
+ if (!this.OnMoveFromeBorder(this.BorderDrag.Index, yMove)) return;
8132
8135
 
8133
8136
  drag.LastMove.X=e.clientX;
8134
8137
  drag.LastMove.Y=e.clientY;
@@ -11029,7 +11032,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11029
11032
  this.SelectChartDrawPicture=null;
11030
11033
  if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
11031
11034
  this.ClearChartDrawPicture(drawPicture); //删除选中的画图工具
11032
- this.CloseModifyDrawDialog();
11033
11035
  }
11034
11036
  else if (this.SelectedChart && this.SelectedChart.Selected.Identify)
11035
11037
  {
@@ -11253,14 +11255,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11253
11255
 
11254
11256
  this.OnMoveFromeBorder=function(index, yMove)
11255
11257
  {
11256
- if (!this.Frame) return;
11258
+ if (!this.Frame) return false;
11257
11259
 
11258
- if (!this.Frame.OnMoveFromeBorder(index,yMove)) return ;
11260
+ if (!this.Frame.OnMoveFromeBorder(index,yMove)) return false;
11259
11261
 
11260
11262
  //this.Frame.SetSizeChage(true);
11261
11263
  this.Frame.SetFrameBorderSizeChange();
11262
11264
  this.Frame.ReDrawToolbar();
11263
11265
  this.Draw();
11266
+
11267
+ return true;
11264
11268
  }
11265
11269
 
11266
11270
  this.OnZoomUpDownFrameY=function(obj, yMove)
@@ -12847,20 +12851,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12847
12851
 
12848
12852
  if (!this.DialogModifyDraw) return;
12849
12853
 
12850
- if (chart.ClassName=="ChartDrawPictureText" || chart.ClassName=='ChartDrawVolProfile')
12851
- {
12852
- this.CloseModifyDrawDialog();
12853
-
12854
- if (!this.ChartPictureMenu) this.ChartPictureMenu=g_DialogFactory.Create('ChartPictureSettingMenu', this.UIElement.parentNode);
12855
- if (!this.ChartPictureMenu) return;
12856
-
12857
- var event={ data: { ChartPicture:chart, HQChart:this}};
12858
- this.ChartPictureMenu.DoModal(event);
12859
- }
12860
- else
12861
- {
12862
- this.ShowModifyDrawDialog(chart);
12863
- }
12854
+ this.ShowModifyDrawDialog(chart);
12864
12855
  }
12865
12856
 
12866
12857
  this.FinishMoveChartDrawPicture=function()
@@ -12912,6 +12903,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12912
12903
 
12913
12904
  if (option && option.Draw==false) bDraw=false;
12914
12905
  if (bDraw) this.Draw();
12906
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(null);
12915
12907
  }
12916
12908
  else
12917
12909
  {
@@ -12931,6 +12923,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12931
12923
 
12932
12924
  if (option && option.Draw==false) bDraw=false;
12933
12925
  if (bDraw) this.Draw();
12926
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
12927
+ break;
12934
12928
  }
12935
12929
  }
12936
12930
  }
@@ -13059,6 +13053,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13059
13053
  else this.Draw();
13060
13054
  }
13061
13055
 
13056
+ this.SetSplashScreen=function(option)
13057
+ {
13058
+ if (!option) return;
13059
+
13060
+ if (IFrameSplitOperator.IsBool(option.Enable)) this.ChartSplashPaint.EnableSplash(option.Enable);
13061
+ if (option.Title) this.ChartSplashPaint.SetTitle(option.Title);
13062
+
13063
+ if (option.Draw) this.Draw();
13064
+ }
13065
+
13066
+ this.IsEnableSplashScreen=function()
13067
+ {
13068
+ if (!this.ChartSplashPaint) return false;
13069
+
13070
+ return this.ChartSplashPaint.IsEnableSplash;
13071
+ }
13072
+
13062
13073
  //设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
13063
13074
  this.SetSubFrameAttribute=function(subFrame, windowItem, frameItem)
13064
13075
  {
@@ -14383,6 +14394,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14383
14394
  case JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID:
14384
14395
  if (IFrameSplitOperator.IsBool(srcParam) && this.ChartDragSelectRect) this.ChartDragSelectRect.EnableLButton=srcParam;
14385
14396
  break;
14397
+ case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
14398
+ if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
14399
+ break;
14386
14400
  }
14387
14401
  }
14388
14402
 
@@ -23851,11 +23865,37 @@ function HQTradeFrame()
23851
23865
  {
23852
23866
  if (this.SubFrame.length<=0) return false;
23853
23867
 
23854
- var topFrame=this.SubFrame[index];
23868
+ var topFrame=null;
23869
+ var aryTopTitleFrame=[];
23870
+ for(var i=index;i>=0;--i)
23871
+ {
23872
+ var item=this.SubFrame[i];
23873
+
23874
+ if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
23875
+ {
23876
+ aryTopTitleFrame.push(item);
23877
+ continue;
23878
+ }
23879
+
23880
+ if (item.Height>0)
23881
+ {
23882
+ topFrame=item;
23883
+ break;
23884
+ }
23885
+ }
23886
+
23855
23887
  var bottomFrame=null;
23888
+ var aryBottomTitleFrame=[];
23856
23889
  for(var i=index+1;i<this.SubFrame.length;++i)
23857
23890
  {
23858
23891
  var item=this.SubFrame[i];
23892
+
23893
+ if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
23894
+ {
23895
+ aryBottomTitleFrame.push(item);
23896
+ continue;
23897
+ }
23898
+
23859
23899
  if (item.Height>0)
23860
23900
  {
23861
23901
  bottomFrame=item;
@@ -23873,6 +23913,20 @@ function HQTradeFrame()
23873
23913
 
23874
23914
  var height=topFrame.Frame.ChartBorder.GetHeightEx();
23875
23915
  var height2=bottomFrame.Frame.ChartBorder.GetHeightEx();
23916
+
23917
+ for(var i=0;i<aryBottomTitleFrame.length;++i)
23918
+ {
23919
+ var item=aryBottomTitleFrame[i];
23920
+ item.Frame.ChartBorder.Bottom+=yMove;
23921
+ item.Frame.ChartBorder.Top+=yMove;
23922
+ }
23923
+
23924
+ for(var i=0;i<aryTopTitleFrame.length;++i)
23925
+ {
23926
+ var item=aryTopTitleFrame[i];
23927
+ item.Frame.ChartBorder.Bottom+=yMove;
23928
+ item.Frame.ChartBorder.Top+=yMove;
23929
+ }
23876
23930
 
23877
23931
  //缩小的时候 小于最小高度 不处理
23878
23932
  if ((height<this.MinSubFrameHeight && yMove<0) || (height2<this.MinSubFrameHeight && yMove>0))
@@ -24166,11 +24220,25 @@ function HQTradeFrame()
24166
24220
  this.SaveSubFrameHeightRate=function()
24167
24221
  {
24168
24222
  var height=this.ChartBorder.GetHeight();
24223
+ var totalTitleHeight=0;
24224
+ for(var i=0;i<this.SubFrame.length;++i)
24225
+ {
24226
+ var item=this.SubFrame[i];
24227
+ var frame=item.Frame;
24228
+ if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0)
24229
+ totalTitleHeight+=frame.ChartBorder.TitleHeight;
24230
+ }
24231
+ height-=totalTitleHeight;
24169
24232
 
24170
24233
  for(var i=0; i<this.SubFrame.length; ++i)
24171
24234
  {
24172
24235
  var item=this.SubFrame[i];
24236
+ var frame=item.Frame;
24237
+ if (item.Height<=0) continue;
24238
+ if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0) continue;
24239
+
24173
24240
  var subHeight=item.Frame.ChartBorder.GetHeight();
24241
+
24174
24242
  var rate=(subHeight/height)*100;
24175
24243
  item.Height=rate;
24176
24244
  }
@@ -25302,9 +25370,13 @@ function HQTradeFrame()
25302
25370
  var left=item.Frame.ChartBorder.GetLeft();
25303
25371
  var right=item.Frame.ChartBorder.GetRight();
25304
25372
 
25305
- item.Frame.Canvas.beginPath();
25306
- item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
25307
- if (item.Frame.Canvas.isPointInPath(x,y))
25373
+ var rtBorder={ Left:left, Right:right, Top:bottom-height/2, Height:height };
25374
+ rtBorder.Bottom=rtBorder.Top+rtBorder.Height;
25375
+ rtBorder.Width=rtBorder.Right-rtBorder.Left;
25376
+ if (x>=rtBorder.Left && x<=rtBorder.Right && y>=rtBorder.Top && y<rtBorder.Bottom)
25377
+ //item.Frame.Canvas.beginPath();
25378
+ //item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
25379
+ //if (item.Frame.Canvas.isPointInPath(x,y))
25308
25380
  {
25309
25381
  return { Index:i, Bottom:true };
25310
25382
  }
@@ -63212,6 +63284,101 @@ function DynamicChartTitlePainting()
63212
63284
  this.Canvas.restore();
63213
63285
  }
63214
63286
 
63287
+ this.FormatOverlayTitle=function(item, overlayItem, titleIndex)
63288
+ {
63289
+ if (!item || !item.Data || !item.Data.Data || !item.Name) return null;
63290
+ if (item.IsVisible===false) return null;
63291
+ if (item.Data.Data.length<=0) return null;
63292
+
63293
+ var value=null;
63294
+ var valueText=null;
63295
+ var aryText=null;
63296
+ if (item.DataType=="StraightLine") //直线只有1个数据
63297
+ {
63298
+ value=item.Data.Data[0];
63299
+ valueText=this.FormatValue(value,item);
63300
+ }
63301
+ else
63302
+ {
63303
+ var index=Math.abs(this.CursorIndex-0.5);
63304
+ index=parseInt(index.toFixed(0));
63305
+ if (this.IsKLineFrame) index=this.CursorIndex;
63306
+ var dataIndex=item.Data.DataOffset+index;
63307
+ if (dataIndex>=item.Data.Data.length) dataIndex=item.Data.Data.length-1;
63308
+ if (dataIndex<0) return null;
63309
+
63310
+ value=item.Data.Data[dataIndex];
63311
+ if (value==null) return null;
63312
+
63313
+ if (this.GetEventCallback) //外部处理
63314
+ {
63315
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_OVERLAY_INDEX_OUT_TEXT);
63316
+ if (event)
63317
+ {
63318
+ var sendData=
63319
+ {
63320
+ Item:item, Index:titleIndex, Data:overlayItem, FrameID:this.Frame.Identify,
63321
+ DataIndex:dataIndex, Value:value, PreventDefault:false, Out:null
63322
+ };
63323
+ event.Callback(event,sendData,this);
63324
+ if (sendData.Out) return sendData.Out;
63325
+ if (sendData.PreventDefault) return sendData.Out;
63326
+ }
63327
+ }
63328
+
63329
+ if (item.DataType=="MultiReport")
63330
+ {
63331
+ valueText=this.FormatMultiReport(value,item);
63332
+ if (!valueText) return null;
63333
+ }
63334
+ else if (item.DataType=="ChartStackedBar")
63335
+ {
63336
+ aryText=this.FormatStackedBarTitle(value, item);
63337
+ if (!aryText) return null;
63338
+ }
63339
+ else if (item.DataType=="ChartMultiLine") //多线段数据
63340
+ {
63341
+ aryText=this.ForamtMultiLineTitle(dataIndex, item);
63342
+ if (!aryText) return null;
63343
+ }
63344
+ else if (item.DataType=="ChartMultiPoint")
63345
+ {
63346
+ aryText=this.ForamtMultiPointTitle(dataIndex, item);
63347
+ if (!aryText) return null;
63348
+ }
63349
+ else if (item.DataType=="ChartMultiBar")
63350
+ {
63351
+ aryText=this.ForamtMultiBarTitle(dataIndex, item);
63352
+ if (!aryText) return null;
63353
+ }
63354
+ else if (item.DataType=="DRAWKLINE")
63355
+ {
63356
+ aryText=this.FormatKLineTitle(value, item);
63357
+ if (!aryText) return null;
63358
+ }
63359
+ else if (item.DataType=="ChartIndexTitle")
63360
+ {
63361
+ var outTitle=this.FormatIndexTitle(value, item);
63362
+ if (!outTitle) return null;
63363
+
63364
+ valueText=outTitle.Text;
63365
+ aryText=outTitle.ArrayText;
63366
+ }
63367
+ else if (item.DataType=="MULTI_POINT_LINE")
63368
+ {
63369
+ valueText=this.FormatMultiDataLine(value, item);
63370
+ if (!valueText) return null;
63371
+ }
63372
+ else
63373
+ {
63374
+ valueText=this.FormatValue(value,item);
63375
+ }
63376
+ }
63377
+
63378
+
63379
+ return { Text:valueText, ArrayText:aryText };
63380
+ }
63381
+
63215
63382
  this.DrawOverlayIndexSingleLine=function(moveonPoint, mouseStatus) //叠加指标1个指标一行
63216
63383
  {
63217
63384
  var pixelRatio=GetDevicePixelRatio();
@@ -63274,68 +63441,11 @@ function DynamicChartTitlePainting()
63274
63441
  for(var i=0; i<overlayItem.Data.length; ++i)
63275
63442
  {
63276
63443
  var item=overlayItem.Data[i];
63277
- if (!item || !item.Data || !item.Data.Data || !item.Name) continue;
63278
- if (item.IsVisible===false) continue;
63279
- if (item.Data.Data.length<=0) continue;
63280
-
63281
- var value=null;
63282
- var valueText=null;
63283
- var aryText=null;
63284
- if (item.DataType=="StraightLine") //直线只有1个数据
63285
- {
63286
- value=item.Data.Data[0];
63287
- valueText=this.FormatValue(value,item);
63288
- }
63289
- else
63290
- {
63291
- var index=Math.abs(this.CursorIndex-0.5);
63292
- index=parseInt(index.toFixed(0));
63293
- if (this.IsKLineFrame) index=this.CursorIndex;
63294
- var dataIndex=item.Data.DataOffset+index;
63295
- if (dataIndex>=item.Data.Data.length) dataIndex=item.Data.Data.length-1;
63296
- if (dataIndex<0) continue;
63444
+ var outText=this.FormatOverlayTitle(item,overlayItem,i);
63445
+ if (!outText) continue;
63297
63446
 
63298
- value=item.Data.Data[dataIndex];
63299
- if (value==null) continue;
63300
-
63301
- if (item.DataType=="MultiReport")
63302
- {
63303
- valueText=this.FormatMultiReport(value,item);
63304
- if (!valueText) continue;
63305
- }
63306
- else if (item.DataType=="ChartStackedBar")
63307
- {
63308
- aryText=this.FormatStackedBarTitle(value, item);
63309
- if (!aryText) continue;
63310
- }
63311
- else if (item.DataType=="ChartMultiPoint")
63312
- {
63313
- aryText=this.ForamtMultiPointTitle(dataIndex, item);
63314
- if (!aryText) continue;
63315
- }
63316
- else if (item.DataType=="ChartMultiBar")
63317
- {
63318
- aryText=this.ForamtMultiBarTitle(dataIndex, item);
63319
- if (!aryText) continue;
63320
- }
63321
- else if (item.DataType=="DRAWKLINE")
63322
- {
63323
- aryText=this.FormatKLineTitle(value, item);
63324
- if (!aryText) continue;
63325
- }
63326
- else if (item.DataType=="ChartIndexTitle")
63327
- {
63328
- var outTitle=this.FormatIndexTitle(value, item);
63329
- if (!outTitle) continue;
63330
-
63331
- valueText=outTitle.Text;
63332
- aryText=outTitle.ArrayText;
63333
- }
63334
- else
63335
- {
63336
- valueText=this.FormatValue(value,item);
63337
- }
63338
- }
63447
+ var valueText=outText.Text;
63448
+ var aryText=outText.ArrayText;
63339
63449
 
63340
63450
  if (aryText)
63341
63451
  {
@@ -68704,15 +68814,13 @@ function ChartDrawPictureText()
68704
68814
  delete this.newMethod;
68705
68815
 
68706
68816
  this.ClassName='ChartDrawPictureText';
68707
- this.Text='文本';
68817
+ this.Text='输入文字';
68708
68818
  this.PointCount=1;
68709
68819
  this.FontOption={ Family:'微软雅黑', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
68710
68820
  //矢量图片
68711
68821
  //this.Text="\ue606";
68712
68822
  //this.FontOption={ Family:'iconfont', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
68713
68823
  this.TextRect=null; //文字区域
68714
- this.IsInitialized=false; //是否初始化了
68715
- this.SettingMenu;
68716
68824
  this.HQChart;
68717
68825
 
68718
68826
  this.SetOption=function(option)
@@ -68750,12 +68858,6 @@ function ChartDrawPictureText()
68750
68858
  this.TextRect.Height=textHeight
68751
68859
  //this.Canvas.strokeRect(this.TextRect.Left,this.TextRect.Top,this.TextRect.Width,this.TextRect.Height);
68752
68860
  this.Canvas.restore();
68753
-
68754
- if (this.IsInitialized===false)
68755
- {
68756
- this.SetTextOption();
68757
- this.IsInitialized=true;
68758
- }
68759
68861
  }
68760
68862
 
68761
68863
  //根据设置动态生成字体
@@ -68774,18 +68876,6 @@ function ChartDrawPictureText()
68774
68876
  return font;
68775
68877
  }
68776
68878
 
68777
- this.SetTextOption=function()
68778
- {
68779
- JSConsole.Chart.Log('[ChartDrawPictureText::SetTextOption]');
68780
- //创建div设置窗口
68781
- if (!this.SettingMenu) this.SettingMenu=new ChartPictureTextSettingMenu(this.Frame.ChartBorder.UIElement.parentNode);
68782
-
68783
- this.SettingMenu.ChartPicture=this;
68784
- this.SettingMenu.HQChart=this.HQChart;
68785
- this.SettingMenu.Position={Left:this.TextRect.Left+this.TextRect.Width,Top:this.TextRect.Top};
68786
- this.SettingMenu.DoModal();
68787
- }
68788
-
68789
68879
  this.IsPointIn=function(x,y)
68790
68880
  {
68791
68881
  if (!this.Frame || this.Status!=10) return -1;
@@ -73668,6 +73758,7 @@ function ChartDrawPriceNote()
73668
73758
 
73669
73759
  var price=this.Frame.GetYData(ptStart.Y, false);
73670
73760
  var text=price.toFixed(floatPrecision);
73761
+ this.Canvas.font=font;
73671
73762
  var textHeight=this.Canvas.measureText("擎").width;
73672
73763
  var textWidth=this.Canvas.measureText(text).width;
73673
73764
  var angle=this.CalculateAngle(ptStart.X, ptStart.Y, ptEnd.X, ptEnd.Y);
@@ -75753,6 +75844,15 @@ function JSChartResource()
75753
75844
  TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
75754
75845
  }
75755
75846
 
75847
+ this.PopKLineChart=
75848
+ {
75849
+ BGColor:"rgba(250,250,250,0.95)",
75850
+ BorderColor:"rgb(0,0,0)",
75851
+
75852
+ TitleColor:'rgb(250,250,250)', //标题颜色
75853
+ TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
75854
+ }
75855
+
75756
75856
  this.SelectRectBGColor="rgba(1,130,212,0.06)"; //背景色
75757
75857
  // this.SelectRectAlpha=0.06; //透明度
75758
75858
 
@@ -77325,10 +77425,21 @@ function JSChartResource()
77325
77425
  if (style.PopMinuteChart)
77326
77426
  {
77327
77427
  var item=style.PopMinuteChart;
77328
- if (item.BGColor) this.PopMinuteChart.BGColor=item.BGColor;
77329
- if (item.BorderColor) this.PopMinuteChart.BorderColor=item.BorderColor;
77330
- if (item.TitleColor) this.DialogSearchIndex.TitleColor=item.TitleColor;
77331
- if (item.TitleBGColor) this.DialogSearchIndex.TitleBGColor=item.TitleBGColor;
77428
+ var dest=this.PopMinuteChart;
77429
+ if (item.BGColor) dest.BGColor=item.BGColor;
77430
+ if (item.BorderColor) dest.BorderColor=item.BorderColor;
77431
+ if (item.TitleColor) dest.TitleColor=item.TitleColor;
77432
+ if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
77433
+ }
77434
+
77435
+ if (style.PopKLineChart)
77436
+ {
77437
+ var item=style.PopKLineChart;
77438
+ var dest=this.PopKLineChart;
77439
+ if (item.BGColor) dest.BGColor=item.BGColor;
77440
+ if (item.BorderColor) dest.BorderColor=item.BorderColor;
77441
+ if (item.TitleColor) dest.TitleColor=item.TitleColor;
77442
+ if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
77332
77443
  }
77333
77444
 
77334
77445
  if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
@@ -83108,8 +83219,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
83108
83219
  {
83109
83220
  if (option.KLine)
83110
83221
  {
83111
- if (IFrameSplitOperator.IsNumber(option.KLine.DrawType)) isChangeKLineDrawType=true;
83112
- if (IFrameSplitOperator.IsNumber(option.KLine.Right)) right=option.KLine.Right;
83222
+ var item=option.KLine;
83223
+ if (IFrameSplitOperator.IsNumber(item.DrawType)) isChangeKLineDrawType=true;
83224
+ if (IFrameSplitOperator.IsNumber(item.Right)) right=item.Right;
83225
+ if (IFrameSplitOperator.IsNumber(item.DataWidth)) this.KLineSize={ DataWidth:item.DataWidth };
83113
83226
  }
83114
83227
 
83115
83228
  if (option.Reload==true) isReload=true;
@@ -84592,7 +84705,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
84592
84705
  bindData.Period=this.Period;
84593
84706
  bindData.Right=this.Right;
84594
84707
 
84595
- if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsSHSZStockA(item.Symbol)) //复权数据
84708
+ if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsEnableRight(item.Symbol)) //复权数据
84596
84709
  {
84597
84710
  var rightData=bindData.GetRightData(bindData.Right,{ AlgorithmType: this.RightFormula });
84598
84711
  bindData.Data=rightData;
@@ -84665,6 +84778,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
84665
84778
  var item=option.KLine;
84666
84779
  if (IFrameSplitOperator.IsNumber(item.Right)) this.Right=item.Right;
84667
84780
  if (IFrameSplitOperator.IsNumber(item.Period)) this.Period=item.Period;
84781
+ if (IFrameSplitOperator.IsNumber(item.DataWidth)) this.KLineSize={ DataWidth:item.DataWidth };
84668
84782
  }
84669
84783
  }
84670
84784
 
@@ -85732,6 +85846,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
85732
85846
 
85733
85847
  { Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
85734
85848
  { Name:"启动拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1]}, Checked:1==this.DragMode },
85849
+ { Name:"X轴拖动缩放", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
85735
85850
  { Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
85736
85851
  { Name:"右键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
85737
85852
  { Name:JSPopMenu.SEPARATOR_LINE_NAME },
@@ -85742,7 +85857,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
85742
85857
 
85743
85858
  { Name:"移动筹码图", Data:{ ID:bShowStockChip?JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID, Args:[stockChipConfig.Name, stockChipConfig]}, Checked:bShowStockChip},
85744
85859
 
85745
-
85746
85860
 
85747
85861
  { Name:"双击弹分时图", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_POP_MINUTE_CHART_ID, Args:[!bPopMinuteChart]}, Checked:bPopMinuteChart},
85748
85862
 
@@ -85931,8 +86045,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
85931
86045
  var self=this;
85932
86046
  drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
85933
86047
 
85934
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
85935
-
85936
86048
  this.ChartDrawPicture.push(drawPicture);
85937
86049
  }
85938
86050
 
@@ -93249,7 +93361,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93249
93361
  if (item)
93250
93362
  {
93251
93363
  drawPicture=item.Create();
93252
- if (drawPicture.ClassName=='ChartDrawPictureText') drawPicture.HQChart=this;
93253
93364
  }
93254
93365
 
93255
93366
  if (!drawPicture) //iconfont图标
@@ -93312,7 +93423,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93312
93423
 
93313
93424
  drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
93314
93425
 
93315
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
93316
93426
  this.ChartDrawPicture.push(drawPicture);
93317
93427
 
93318
93428
  if (obj.Draw==true) this.DrawDynamicInfo();
@@ -93356,8 +93466,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93356
93466
  drawPicture.ValueToPoint();
93357
93467
  drawPicture.GetActiveDrawPicture=()=>{ return this.GetActiveDrawPicture(); }
93358
93468
 
93359
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
93360
-
93361
93469
  this.ChartDrawPicture.push(drawPicture);
93362
93470
  }
93363
93471
 
@@ -98235,7 +98343,6 @@ function DialogFactory()
98235
98343
  this.DataMap=new Map(
98236
98344
  [
98237
98345
  ["ChartPictureSettingMenu", { Create:function(divElement) { return new ChartPictureSettingMenu(divElement); } }],
98238
- ["ChartPictureTextSettingMenu", { Create:function(divElement) { return new ChartPictureTextSettingMenu(divElement); } }]
98239
98346
  ]);
98240
98347
 
98241
98348
  this.Create=function(name, option)
@@ -98461,239 +98568,6 @@ function ChartPictureSettingMenu(divElement)
98461
98568
  }
98462
98569
  }
98463
98570
 
98464
- //画图工具 文本设置窗口
98465
- function ChartPictureTextSettingMenu(divElement)
98466
- {
98467
- this.newMethod=IDivDialog; //派生
98468
- this.newMethod(divElement);
98469
- delete this.newMethod;
98470
-
98471
- this.ChartPicture;
98472
- this.SettingDiv;
98473
- this.Position;
98474
-
98475
- this.BackupData; //画图工具备份数据
98476
-
98477
- this.Close=function()
98478
- {
98479
- if (this.SettingDiv) this.DivElement.removeChild(this.SettingDiv); //直接删除
98480
- }
98481
-
98482
- this.DoModal=function()
98483
- {
98484
- var text=this.ChartPicture.Text; //显示的文本
98485
- var fontOption=this.ChartPicture.FontOption; //字体设置
98486
- var lineColor=this.ChartPicture.LineColor;
98487
- //数据备份, 点取消的时候把备份数据设置回去
98488
- this.BackupData=
98489
- {
98490
- Text:text,
98491
- LineColor:lineColor,
98492
- FontOption:{Family: fontOption.Family, Size: fontOption.Size, Weight: fontOption.Weight, Style: fontOption.Style }
98493
- };
98494
- JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] picture info',this.BackupData);
98495
-
98496
- var self=this;
98497
- var div=this.DivElement.getElementsByClassName('chartpicture-text-setting')[0];
98498
- if (!div)
98499
- {
98500
- div=document.createElement("div");
98501
- div.className='chartpicture-text-setting';
98502
- this.DivElement.appendChild(div);
98503
- this.SettingDiv=div;
98504
- }
98505
- else
98506
- {
98507
- this.SettingDiv=div;
98508
- }
98509
-
98510
- var titleContainerStr = '<div class="titleWrap">'+
98511
- '<span class="titleName">样式设置</span>'+
98512
- '<i class="closeBtn iconfont icon-close"></i>'+
98513
- '</div>';
98514
-
98515
- var fontSizeArray = [10,11,12,14,16,20,24,28,32,40];
98516
- var fontArray = ['微软雅黑','宋体','Arial','仿宋'];
98517
- var sizeListStr = "";
98518
- var fontListStr = "";
98519
- fontArray.forEach(function(item,index){
98520
- fontListStr += index !== 0 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
98521
- });
98522
- fontSizeArray.forEach(function(item,index){
98523
- sizeListStr += index !== 5 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
98524
- });
98525
- var contentContainerStr = '<div class="contentWrap">'+
98526
- '<div class="styleOptions">'+
98527
- '<span class="colorPicker"><input type="color" id="fontColor" value="#1e90ff"></span>'+
98528
- '<div class="likeSelect fontSelect"><span class="choicedText">微软雅黑</span><div class="selectList">'+fontListStr+'</div><i class="iconfont icon-xia"></i></div>'+
98529
- '<div class="likeSelect fontSizeSelect"><span class="choicedText">20</span><div class="selectList">'+sizeListStr+'</div><i class="iconfont icon-xia"></i></div>'+
98530
- '<span class="strongFont likeBtn"><i class="iconfont icon-jiacu"></i></span>'+
98531
- '<span class="italicsFont likeBtn"><i class="iconfont icon-qingxieL"></i></span>'+
98532
- '</div>'+
98533
- '<textarea class="tArea" id="tArea" placeholder="Text"></textarea>'+
98534
- '</div>';
98535
- var btnContainer = '<div class="btnsContainer">'+
98536
- '<span class="okBtn btn">确认</span>'+
98537
- '<span class="cancelBtn btn">取消</span>'+
98538
- '</div>';
98539
-
98540
- var pixelTatio = GetDevicePixelRatio();
98541
- var DoModalStr = titleContainerStr+contentContainerStr+btnContainer;
98542
- this.SettingDiv.style.left = this.Position.Left/pixelTatio + "px";
98543
- this.SettingDiv.style.top = this.Position.Top/pixelTatio + "px";
98544
- this.SettingDiv.innerHTML=DoModalStr;
98545
- this.SettingDiv.style.position = "absolute";
98546
- this.SettingDiv.style.display = "block";
98547
- $(".chartpicture-text-setting .colorPicker").css({ //初始设置
98548
- "borderColor":self.ChartPicture.LineColor,
98549
- "background-color":self.ChartPicture.LineColor
98550
- });
98551
-
98552
- var family = this.ChartPicture.FontOption.Family;
98553
- $('.chartpicture-text-setting .fontSelect .choicedText').html(family);
98554
- fontArray.forEach(function(item,index){
98555
- if(item == family){
98556
- $('.chartpicture-text-setting .fontSelect p').removeClass('active');
98557
- $('.chartpicture-text-setting .fontSelect p').eq(index).addClass('active');
98558
- }
98559
- });
98560
-
98561
- var size = this.ChartPicture.FontOption.Size;
98562
- $('.chartpicture-text-setting .fontSizeSelect .choicedText').html(size);
98563
- fontSizeArray.forEach(function(item,index){
98564
- if(item == size){
98565
- $('.chartpicture-text-setting .fontSizeSelect p').removeClass('active');
98566
- $('.chartpicture-text-setting .fontSizeSelect p').eq(index).addClass('active');
98567
- }
98568
- });
98569
-
98570
- var weight = this.ChartPicture.FontOption.Weight;
98571
- if( weight != null && weight == 'bold'){
98572
- $('.chartpicture-text-setting .strongFont').addClass('hot');
98573
- }
98574
-
98575
- var style = this.ChartPicture.FontOption.Style;
98576
- if( style != null && style == 'italic'){
98577
- $('.chartpicture-text-setting .italicsFont').addClass('hot');
98578
- }
98579
-
98580
- var text = this.ChartPicture.Text;
98581
- $('.chartpicture-text-setting .tArea').val(text); //结束初始设置
98582
-
98583
- var defaultTextOption = { Family:'微软雅黑', Size:20, Weight:null, Style:null };
98584
- $(".chartpicture-text-setting #fontColor").change(
98585
- {
98586
- Picture:this.ChartPicture
98587
- },
98588
- function(event)
98589
- { //颜色选择
98590
- var value = $(this).val();
98591
- $(this).parent().css({
98592
- "borderColor":value,
98593
- "background-color":value
98594
- });
98595
- var chart=event.data.Picture;
98596
- chart.LineColor = value;
98597
- if (chart.Update) chart.Update(); //更新界面
98598
- }
98599
- );
98600
- $(".chartpicture-text-setting .fontSelect,.chartpicture-text-setting .fontSizeSelect").click(function(){
98601
- $(this).find('.selectList').toggle();
98602
- $(this).toggleClass('hot');
98603
- });
98604
- $(".chartpicture-text-setting .fontSelect p").click(
98605
- {
98606
- Picture:this.ChartPicture
98607
- },
98608
- function(event){ //字体选择
98609
- var choicedText = $(this).closest(".fontSelect").find('.choicedText').html();
98610
- var currentSelect = event.currentTarget.innerHTML;
98611
- if(choicedText !== currentSelect){
98612
- $(this).closest(".fontSelect").find('.choicedText').html(currentSelect);
98613
- $(this).siblings().removeClass('active');
98614
- $(this).addClass('active');
98615
- var chart = event.data.Picture;
98616
- chart.FontOption.Family = currentSelect;
98617
- if (chart.Update) chart.Update(); //更新界面
98618
- }
98619
- });
98620
- $(".chartpicture-text-setting .fontSizeSelect p").click(
98621
- {
98622
- Picture:this.ChartPicture
98623
- },
98624
- function(event){ //字号选择
98625
- var choicedText = $(this).closest(".fontSizeSelect").find('.choicedText').html();
98626
- var currentSelect = event.currentTarget.innerHTML;
98627
- if(choicedText !== currentSelect){
98628
- $(this).closest(".fontSizeSelect").find('.choicedText').html(currentSelect);
98629
- $(this).siblings().removeClass('active');
98630
- $(this).addClass('active');
98631
- var chart = event.data.Picture;
98632
- chart.FontOption.Size = Number(currentSelect);
98633
- if (chart.Update) chart.Update(); //更新界面
98634
- }
98635
- });
98636
- $(".chartpicture-text-setting .strongFont").click(
98637
- {
98638
- Picture:this.ChartPicture
98639
- },
98640
- function(event){
98641
- $(this).toggleClass('hot');
98642
- var classnames = $(this).attr('class');
98643
- if(classnames.indexOf('hot') > 0){
98644
- var chart = event.data.Picture;
98645
- chart.FontOption.Weight = 'bold';
98646
- if (chart.Update) chart.Update(); //更新界面
98647
- }
98648
- });
98649
- $(".chartpicture-text-setting .italicsFont").click(
98650
- {
98651
- Picture:this.ChartPicture
98652
- },
98653
- function(event){
98654
- $(this).toggleClass('hot')
98655
- var classnames = $(this).attr('class');
98656
- if(classnames.indexOf('hot') > 0){
98657
- var chart = event.data.Picture;
98658
- chart.FontOption.Style = 'italic';
98659
- if (chart.Update) chart.Update(); //更新界面
98660
- }
98661
- });
98662
- $(".chartpicture-text-setting .titleWrap .closeBtn,.chartpicture-text-setting .btnsContainer .cancelBtn").click( //取消
98663
- {
98664
- Picture:this.ChartPicture
98665
- },
98666
- function(event){
98667
- var picture = event.data.Picture;
98668
- picture.Text = self.BackupData.Text;
98669
- picture.LineColor = self.BackupData.LineColor;
98670
- picture.FontOption = self.BackupData.FontOption;
98671
- if (picture.Update) picture.Update();
98672
- self.Close();
98673
- });
98674
- $(".chartpicture-text-setting .tArea").keyup( //文本内容
98675
- {
98676
- Picture:this.ChartPicture
98677
- },
98678
- function(event){
98679
- JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] $(".chartpicture-text-setting .tArea").keyup()');
98680
- var content = $(this).val();
98681
- var chart = event.data.Picture;
98682
- chart.Text = content;
98683
- if (chart.Update) chart.Update(); //更新界面
98684
- });
98685
-
98686
- //确定按钮
98687
- $(".chartpicture-text-setting .btnsContainer .okBtn").click(
98688
- function()
98689
- {
98690
- self.Close();
98691
- if (self.HQChart && self.HQChart.ChartDrawStorage) self.HQChart.ChartDrawStorage.SaveDrawData(self.ChartPicture); //保存下
98692
- }
98693
- );
98694
- }
98695
- }
98696
-
98697
98571
 
98698
98572
  function ChartPictureVolProfileSettingMenu(divElement)
98699
98573
  {
@@ -129366,7 +129240,12 @@ function GetBlackStyle()
129366
129240
  BGColor:"rgba(0,0,0,0.85)",
129367
129241
  BorderColor:"rgb(230,230,230)",
129368
129242
  },
129369
-
129243
+
129244
+ PopKLineChart:
129245
+ {
129246
+ BGColor:"rgba(0,0,0,0.85)",
129247
+ BorderColor:"rgb(230,230,230)",
129248
+ },
129370
129249
 
129371
129250
  DefaultTextColor: "rgb(101,104,112)",
129372
129251
  DefaultTextFont: 14*GetDevicePixelRatio() +'px 微软雅黑',
@@ -132000,6 +131879,7 @@ function JSReportChart(divElement)
132000
131879
  if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
132001
131880
  if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
132002
131881
  if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
131882
+ if (option.KLineChartTooltip && option.KLineChartTooltip.Enable) chart.InitalKLineChartTooltip(option.KLineChartTooltip);
132003
131883
 
132004
131884
  if (option.Symbol) chart.Symbol=option.Symbol;
132005
131885
  if (option.Name) chart.Name=option.Name;
@@ -132320,6 +132200,7 @@ function JSReportChartContainer(uielement)
132320
132200
 
132321
132201
  //
132322
132202
  this.TooltipMinuteChart; //分时图
132203
+ this.TooltipKLineChart; //分时图
132323
132204
 
132324
132205
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
132325
132206
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
@@ -132330,6 +132211,7 @@ function JSReportChartContainer(uielement)
132330
132211
  this.StopAutoUpdate();
132331
132212
 
132332
132213
  this.DestroyMinuteChartTooltip();
132214
+ this.DestroyKLineChartTooltip();
132333
132215
  this.DestroyFloatTooltip();
132334
132216
  }
132335
132217
 
@@ -132369,6 +132251,24 @@ function JSReportChartContainer(uielement)
132369
132251
  this.TooltipMinuteChart=null;
132370
132252
  }
132371
132253
 
132254
+ this.InitalKLineChartTooltip=function(option)
132255
+ {
132256
+ if (this.TooltipKLineChart) return;
132257
+
132258
+ this.TooltipKLineChart=new JSTooltipKLineChart();
132259
+ this.TooltipKLineChart.Inital(this, option);
132260
+ this.TooltipKLineChart.Create();
132261
+ }
132262
+
132263
+ this.DestroyKLineChartTooltip=function()
132264
+ {
132265
+ if (!this.TooltipKLineChart) return;
132266
+
132267
+ this.TooltipKLineChart.Destroy();
132268
+ this.TooltipKLineChart=null;
132269
+ }
132270
+
132271
+
132372
132272
  this.InitalFloatTooltip=function(option)
132373
132273
  {
132374
132274
  if (this.FloatTooltip) return;
@@ -132438,6 +132338,35 @@ function JSReportChartContainer(uielement)
132438
132338
  }
132439
132339
 
132440
132340
 
132341
+ this.ShowKLineChartTooltip=function(x,y, data)
132342
+ {
132343
+ if (!this.TooltipKLineChart) return;
132344
+
132345
+ var rtClient=this.UIElement.getBoundingClientRect();
132346
+ var rtScroll=GetScrollPosition();
132347
+
132348
+ var offsetLeft=rtClient.left+rtScroll.Left;
132349
+ var offsetTop=rtClient.top+rtScroll.Top;
132350
+
132351
+ data.Offset={ Left:offsetLeft, Top:offsetTop };
132352
+
132353
+ this.TooltipKLineChart.Show(data, x,y);
132354
+ }
132355
+
132356
+ this.HideKLineChartTooltip=function()
132357
+ {
132358
+ if (!this.TooltipKLineChart) return;
132359
+
132360
+ this.TooltipKLineChart.Hide();
132361
+ }
132362
+
132363
+ this.HideAllTooltip=function()
132364
+ {
132365
+ this.HideKLineChartTooltip();
132366
+ this.HideMinuteChartTooltip();
132367
+ this.HideFloatTooltip();
132368
+ }
132369
+
132441
132370
 
132442
132371
  this.AutoScrollPage=function(step)
132443
132372
  {
@@ -132803,7 +132732,7 @@ function JSReportChartContainer(uielement)
132803
132732
  if (IFrameSplitOperator.IsNumber(item.Sort)) this.SortInfo.Sort=item.Sort;
132804
132733
  }
132805
132734
 
132806
- if (IFrameSplitOperator.IsBool(option.IsReloadStockList))
132735
+ if (IFrameSplitOperator.IsBool(option.IsReloadStockList) && option.IsReloadStockList)
132807
132736
  {
132808
132737
  var requestOption={ Callback:null };
132809
132738
  if (this.Symbol) requestOption.Callback=()=>{ this.RequestMemberListData(); };
@@ -133607,8 +133536,7 @@ function JSReportChartContainer(uielement)
133607
133536
  if (wheelValue<0) //下
133608
133537
  {
133609
133538
  this.LastMouseStatus.TooltipStatus=null;
133610
- this.HideMinuteChartTooltip();
133611
- this.HideFloatTooltip();
133539
+ this.HideAllTooltip();
133612
133540
  if (this.GotoNextItem(1))
133613
133541
  {
133614
133542
  this.Draw();
@@ -133618,8 +133546,7 @@ function JSReportChartContainer(uielement)
133618
133546
  else if (wheelValue>0) //上
133619
133547
  {
133620
133548
  this.LastMouseStatus.TooltipStatus=null;
133621
- this.HideMinuteChartTooltip();
133622
- this.HideFloatTooltip();
133549
+ this.HideAllTooltip();
133623
133550
  if (this.GotoNextItem(-1))
133624
133551
  {
133625
133552
  this.Draw();
@@ -133632,8 +133559,7 @@ function JSReportChartContainer(uielement)
133632
133559
  if (wheelValue<0) //下一页
133633
133560
  {
133634
133561
  this.LastMouseStatus.TooltipStatus=null;
133635
- this.HideMinuteChartTooltip();
133636
- this.HideFloatTooltip();
133562
+ this.HideAllTooltip();
133637
133563
  if (this.GotoNextPage(this.PageUpDownCycle))
133638
133564
  {
133639
133565
  this.Draw();
@@ -133643,8 +133569,7 @@ function JSReportChartContainer(uielement)
133643
133569
  else if (wheelValue>0) //上一页
133644
133570
  {
133645
133571
  this.LastMouseStatus.TooltipStatus=null;
133646
- this.HideMinuteChartTooltip();
133647
- this.HideFloatTooltip();
133572
+ this.HideAllTooltip();
133648
133573
  if (this.GotoPreviousPage(this.PageUpDownCycle))
133649
133574
  {
133650
133575
  this.Draw();
@@ -133666,8 +133591,7 @@ function JSReportChartContainer(uielement)
133666
133591
  var keyID = e.keyCode ? e.keyCode :e.which;
133667
133592
  if (keyID==116) return; //F15刷新不处理
133668
133593
 
133669
- this.HideMinuteChartTooltip();
133670
- this.HideFloatTooltip();
133594
+ this.HideAllTooltip();
133671
133595
  switch(keyID)
133672
133596
  {
133673
133597
  case 33: //page up
@@ -133956,7 +133880,8 @@ function JSReportChartContainer(uielement)
133956
133880
  if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
133957
133881
  this.LastMouseStatus.TooltipStatus=null;
133958
133882
 
133959
- var bShowChartTooltip=false;
133883
+ var bShowKLineTooltip=false;
133884
+ var bShowMinuteTooltip=false;
133960
133885
  var chartTooltipData=null;
133961
133886
 
133962
133887
  if (this.DragRow) return;
@@ -134032,7 +133957,15 @@ function JSReportChartContainer(uielement)
134032
133957
  {
134033
133958
  if (tooltipData.Stock && tooltipData.Stock.Symbol)
134034
133959
  {
134035
- bShowChartTooltip=true;
133960
+ bShowMinuteTooltip=true;
133961
+ chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
133962
+ }
133963
+ }
133964
+ else if (tooltipData.Type==21)
133965
+ {
133966
+ if (tooltipData.Stock && tooltipData.Stock.Symbol)
133967
+ {
133968
+ bShowKLineTooltip=true;
134036
133969
  chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
134037
133970
  }
134038
133971
  }
@@ -134082,20 +134015,17 @@ function JSReportChartContainer(uielement)
134082
134015
  this.HideFloatTooltip();
134083
134016
  }
134084
134017
 
134085
- if (bShowChartTooltip)
134086
- {
134087
- this.ShowMinuteChartTooltip(null, null, chartTooltipData);
134088
- }
134089
- else
134090
- {
134091
- this.HideMinuteChartTooltip();
134092
- }
134018
+ if (!bShowKLineTooltip) this.HideKLineChartTooltip();
134019
+ if (!bShowMinuteTooltip) this.HideMinuteChartTooltip();
134020
+
134021
+ if (bShowMinuteTooltip) this.ShowMinuteChartTooltip(null, null, chartTooltipData);
134022
+ if (bShowKLineTooltip) this.ShowKLineChartTooltip(null, null, chartTooltipData);
134023
+
134093
134024
  }
134094
134025
 
134095
134026
  this.UIOnMounseOut=function(e)
134096
134027
  {
134097
- this.HideMinuteChartTooltip();
134098
- this.HideFloatTooltip();
134028
+ this.HideAllTooltip();
134099
134029
 
134100
134030
  var bDraw=false;
134101
134031
  var tabChart=this.GetTabChart();
@@ -134121,8 +134051,7 @@ function JSReportChartContainer(uielement)
134121
134051
 
134122
134052
  this.UIOnMouseleave=function(e)
134123
134053
  {
134124
- this.HideMinuteChartTooltip();
134125
- this.HideFloatTooltip();
134054
+ this.HideAllTooltip();
134126
134055
 
134127
134056
  var tabChart=this.GetTabChart();
134128
134057
  if (tabChart && tabChart.MoveOnTabIndex>=0)
@@ -134348,7 +134277,7 @@ function JSReportChartContainer(uielement)
134348
134277
  document.onmouseup=null;
134349
134278
 
134350
134279
  this.StopAutoDragScrollTimer();
134351
- this.HideTooltip();
134280
+ this.HideAllTooltip();
134352
134281
  var reportChart=this.GetReportChart();
134353
134282
 
134354
134283
  var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
@@ -136740,7 +136669,8 @@ function ChartReport()
136740
136669
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
136741
136670
  if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
136742
136671
  if (item.Icon) colItem.Icon=item.Icon;
136743
- if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
136672
+ if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.ChartTooltip={ Enable:item.EnableChartTooltip, Type:20 };
136673
+ if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type };
136744
136674
 
136745
136675
  //点击表头弹出菜单
136746
136676
  if (IFrameSplitOperator.IsBool(item.EnablePopupHeaderMenu)) colItem.EnablePopupHeaderMenu=item.EnablePopupHeaderMenu;
@@ -138309,9 +138239,9 @@ function ChartReport()
138309
138239
  var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
138310
138240
  this.TooltipRect.push(tooltipData);
138311
138241
  }
138312
- else if (column.EnableChartTooltip)
138242
+ else if (column.ChartTooltip && column.ChartTooltip.Enable && IFrameSplitOperator.IsNumber(column.ChartTooltip.Type)) //Type 20分时图 21K线图
138313
138243
  {
138314
- var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:20 };
138244
+ var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:column.ChartTooltip.Type };
138315
138245
  this.TooltipRect.push(tooltipData);
138316
138246
  }
138317
138247
 
@@ -148200,6 +148130,11 @@ var JS_DRAWTOOL_MENU_ID=
148200
148130
  CMD_CHANGE_BORDER_COLOR_ID:9, //边框颜色
148201
148131
 
148202
148132
  CMD_LOCK_DRAW_CHART_ID:10, //上锁
148133
+
148134
+ CMD_ZOOM_FONT_ID:11, //字体放大
148135
+ CMD_ZOOM_OUT_FONT_ID:12, //字体缩小
148136
+ CMD_MODIFY_TEXT_ID:13, //随机生成文字内容
148137
+ CMD_ADVANCED_SETTING_ID:14, //高级设置
148203
148138
  };
148204
148139
 
148205
148140
  function JSDialogDrawTool()
@@ -148292,6 +148227,7 @@ function JSDialogDrawTool()
148292
148227
  { Title: '时间范围', ClassName: 'hqchart_drawtool icon-jiagefanwei', Type:0, Data:{ ID:"DateRange" } },
148293
148228
  { Title: "价格和时间范围", ClassName:"hqchart_drawtool icon-jiagefanwei", Type:0, Data:{ ID:"DatePriceRange" } },
148294
148229
  { Title: "监测线", ClassName:"hqchart_drawtool icon-jiance", Type:0, Data:{ ID:"MonitorLine"} },
148230
+ { Title: "固定范围成交量分布图", ClassName:"hqchart_drawtool icon-tubiao_gudingfanweichengjiaoliangfenbutu", Type:0, Data:{ ID:"固定范围成交量分布图"}}
148295
148231
  ]
148296
148232
  },
148297
148233
  {
@@ -148801,6 +148737,10 @@ function JSDialogModifyDraw()
148801
148737
  this.FontColorButton=null;
148802
148738
  this.BorderColorButton=null;
148803
148739
  this.LockButton=null;
148740
+ this.FontZoomButton=null;
148741
+ this.FontZoomOutButton=null;
148742
+ this.ModifyTextButton=null;
148743
+ this.AdvancedButton=null;
148804
148744
 
148805
148745
  this.RandomLineColor=["rgb(255,69,0)", "rgb(173,255,47)", "rgb(238,154,73)", "rgb(255,105,180)"]; //线段颜色
148806
148746
  this.RandomBGColor=["rgba(210,251,209,0.8)", "rgb(217,217,253)", "rgb(255,208,204)", "rgb(252,249,206)"]; //背景颜色
@@ -148813,9 +148753,13 @@ function JSDialogModifyDraw()
148813
148753
  { Title:"修改字体颜色", ClassName: 'hqchart_drawtool icon-zitiyanse', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_FONT_COLOR_ID }},
148814
148754
  { Title:"修改背景颜色", ClassName: 'hqchart_drawtool icon-zitibeijingse', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BG_COLOR_ID }},
148815
148755
  { Title:"修改边框颜色", ClassName: 'hqchart_drawtool icon-biankuang', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_CHANGE_BORDER_COLOR_ID }},
148756
+ { Title:"字体放大", ClassName: 'hqchart_drawtool icon-zoomin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID }},
148757
+ { Title:"字体缩小", ClassName: 'hqchart_drawtool icon-zoomout', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID }},
148758
+ { Title:"随机生成文字内容", ClassName: 'hqchart_drawtool icon-bianji', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID }},
148759
+ { Title:"高级设置", ClassName: 'hqchart_drawtool icon-setting', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID }},
148760
+
148816
148761
  { Title:"上锁", ClassName: 'hqchart_drawtool icon-lock', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID }},
148817
148762
  { Title:"删除图形", ClassName: 'hqchart_drawtool icon-recycle_bin', Type:2, Data:{ ID:JS_DRAWTOOL_MENU_ID.CMD_DELETE_DRAW_CHART_ID }},
148818
-
148819
148763
  ];
148820
148764
 
148821
148765
  this.RestoreFocusDelay=800;
@@ -148905,7 +148849,22 @@ function JSDialogModifyDraw()
148905
148849
  this.LockButton=data;
148906
148850
  this.LockButton.Span.style['color']="rgb(220,220,220)";
148907
148851
  break;
148908
-
148852
+ case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID:
148853
+ this.FontZoomButton=data;
148854
+ divItem.style.display="none";
148855
+ break;
148856
+ case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID:
148857
+ this.FontZoomOutButton=data;
148858
+ divItem.style.display="none";
148859
+ break;
148860
+ case JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID:
148861
+ this.ModifyTextButton=data;
148862
+ divItem.style.display="none";
148863
+ break;
148864
+ case JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID:
148865
+ this.AdvancedButton=data;
148866
+ divItem.style.display="none";
148867
+ break;
148909
148868
  }
148910
148869
 
148911
148870
  parentDivDom.appendChild(divItem);
@@ -148937,6 +148896,18 @@ function JSDialogModifyDraw()
148937
148896
  case JS_DRAWTOOL_MENU_ID.CMD_LOCK_DRAW_CHART_ID:
148938
148897
  this.ModifyLockChart();
148939
148898
  break;
148899
+ case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_FONT_ID:
148900
+ this.ModifyFontZoom(1);
148901
+ break;
148902
+ case JS_DRAWTOOL_MENU_ID.CMD_ZOOM_OUT_FONT_ID:
148903
+ this.ModifyFontZoom(-1);
148904
+ break;
148905
+ case JS_DRAWTOOL_MENU_ID.CMD_MODIFY_TEXT_ID:
148906
+ this.ModifyText();
148907
+ break;
148908
+ case JS_DRAWTOOL_MENU_ID.CMD_ADVANCED_SETTING_ID:
148909
+ this.AdvancedSetting();
148910
+ break;
148940
148911
  }
148941
148912
  }
148942
148913
 
@@ -148978,6 +148949,19 @@ function JSDialogModifyDraw()
148978
148949
  this.Close();
148979
148950
  }
148980
148951
 
148952
+ this.OnClearChartDrawPicture=function(drawPicture)
148953
+ {
148954
+ if (!this.IsShow()) return;
148955
+
148956
+ if (!drawPicture)
148957
+ {
148958
+ this.Close();
148959
+ return;
148960
+ }
148961
+
148962
+ if (this.ChartPicture && drawPicture.Guid==this.ChartPicture.Guid) this.Close();
148963
+ }
148964
+
148981
148965
  this.ShowButton=function(dom, diaplay)
148982
148966
  {
148983
148967
  if (dom.style.display==diaplay) return;
@@ -149093,6 +149077,65 @@ function JSDialogModifyDraw()
149093
149077
  this.HQChart.Draw();
149094
149078
  }
149095
149079
 
149080
+ this.ModifyFontZoom=function(step)
149081
+ {
149082
+ if (!this.ChartPicture || !this.HQChart) return;
149083
+ if (this.ChartPicture.FontOption.Size+step<=2) return;
149084
+
149085
+ var chart=this.ChartPicture;
149086
+ chart.FontOption.Size+=step;
149087
+
149088
+ if (chart.ClassName=="ChartDrawNote") chart.NoteFontOption.Size+=step;
149089
+
149090
+ this.HQChart.Draw();
149091
+ }
149092
+
149093
+ this.ModifyText=function()
149094
+ {
149095
+ if (!this.ChartPicture || !this.HQChart) return;
149096
+
149097
+ var chart=this.ChartPicture;
149098
+ switch(chart.ClassName)
149099
+ {
149100
+ case "ChartDrawPictureText":
149101
+ chart.Text=this.GetRandomText(chart.Text);
149102
+ break;
149103
+ case "ChartDrawAnchoredText":
149104
+ var text=null;
149105
+ if (IFrameSplitOperator.IsNonEmptyArray(chart.AryText)) text=chart.AryText[0].Text;
149106
+ chart.AryText=[ {Text:this.GetRandomText(text)}, {Text:this.GetRandomText(null)}];
149107
+ break;
149108
+ case "ChartDrawNote":
149109
+ var text=null;
149110
+ if (IFrameSplitOperator.IsNonEmptyArray(chart.AryNoteText)) text=chart.AryNoteText[0].Text;
149111
+ chart.AryNoteText=[ {Text:this.GetRandomText(text)}, {Text:this.GetRandomText(null)}];
149112
+ break;
149113
+ default:
149114
+ return;
149115
+ }
149116
+
149117
+ this.HQChart.Draw();
149118
+ }
149119
+
149120
+ this.GetRandomText=function(text)
149121
+ {
149122
+ var ARY_TEXT=["下跌形态","反转十字星","低位档五阳线","倒V型反转","双顶","持续整理形态"];
149123
+
149124
+ var index=this.GetRandomTestData(0, ARY_TEXT.length-1);
149125
+ for(var i=index;i<10;++i)
149126
+ {
149127
+ var value=ARY_TEXT[i%ARY_TEXT.length];
149128
+ if (value!=text) return value;
149129
+ }
149130
+ }
149131
+
149132
+ this.GetRandomTestData=function(min, max) //测试数据
149133
+ {
149134
+ min = Math.ceil(min);
149135
+ max = Math.floor(max);
149136
+ return Math.floor(Math.random() * (max - min + 1)) + min; //含最大值,含最小值
149137
+ }
149138
+
149096
149139
  this.Show=function(x, y)
149097
149140
  {
149098
149141
  if (!this.DivDialog) this.Create();
@@ -149106,27 +149149,42 @@ function JSDialogModifyDraw()
149106
149149
  {
149107
149150
  this.ChartPicture=chart;
149108
149151
 
149109
- var bShowLineColor=true, bShowBGColor=false, bShowFontColor=false, bShowBorderColor=false;
149152
+ var bShowLineColor=true, bShowBGColor=false, bShowFontColor=false, bShowBorderColor=false, bShowFontZoom=false, bModifyText=false, bAdvanced=false;;
149110
149153
  var bgColor=null, fontColor=null,borderColor=null;
149111
- var ARRAY_TEXT_CHART=['ChartDrawPriceLabel', "ChartDrawAnchoredText","ChartDrawPriceNote"];
149154
+ var ARRAY_TEXT_CHART=['ChartDrawPriceLabel', "ChartDrawAnchoredText","ChartDrawPriceNote", ];
149112
149155
  if (ARRAY_TEXT_CHART.includes(chart.ClassName))
149113
149156
  {
149114
149157
  bShowBGColor=true;
149115
149158
  bShowFontColor=true;
149116
149159
  bShowBorderColor=true;
149160
+ bShowFontZoom=true;
149161
+ if (chart.ClassName=="ChartDrawAnchoredText") bModifyText=true;
149117
149162
  bgColor=chart.BGColor;
149118
149163
  fontColor=chart.TextColor;
149119
149164
  borderColor=chart.BorderColor;
149120
149165
  }
149166
+ else if (chart.ClassName=="ChartDrawPictureText")
149167
+ {
149168
+ bModifyText=true;
149169
+ bShowFontZoom=true;
149170
+ bShowLineColor=true;
149171
+ }
149121
149172
  else if (chart.ClassName=="ChartDrawNote")
149122
149173
  {
149123
149174
  bShowBGColor=true;
149124
149175
  bShowFontColor=true;
149125
149176
  bShowBorderColor=true;
149177
+ bModifyText=true;
149178
+ bShowFontZoom=true;
149126
149179
  bgColor=chart.NoteBGColor;
149127
149180
  fontColor=chart.NoteTextColor;
149128
149181
  borderColor=chart.NoteBorderColor;
149129
149182
  }
149183
+ else if (chart.ClassName=="ChartDrawVolProfile")
149184
+ {
149185
+ bShowLineColor=false;
149186
+ bAdvanced=true;
149187
+ }
149130
149188
 
149131
149189
  if (this.ColorButton)
149132
149190
  {
@@ -149173,6 +149231,30 @@ function JSDialogModifyDraw()
149173
149231
  var item=this.LockButton;
149174
149232
  item.Span.style['color']=this.ChartPicture.EnableMove?"rgb(220,220,220)":"rgb(0,0,0)";
149175
149233
  }
149234
+
149235
+ if (this.FontZoomButton)
149236
+ {
149237
+ var item=this.FontZoomButton;
149238
+ this.ShowButton(item.Div, bShowFontZoom?"inline":"none");
149239
+ }
149240
+
149241
+ if (this.FontZoomOutButton)
149242
+ {
149243
+ var item=this.FontZoomOutButton;
149244
+ this.ShowButton(item.Div, bShowFontZoom?"inline":"none");
149245
+ }
149246
+
149247
+ if (this.ModifyTextButton)
149248
+ {
149249
+ var item=this.ModifyTextButton;
149250
+ this.ShowButton(item.Div, bModifyText?"inline":"none");
149251
+ }
149252
+
149253
+ if (this.AdvancedButton)
149254
+ {
149255
+ var item=this.AdvancedButton;
149256
+ this.ShowButton(item.Div, bAdvanced?"inline":"none");
149257
+ }
149176
149258
  }
149177
149259
 
149178
149260
  this.OnMouseDownTitle=function(e)
@@ -149793,6 +149875,278 @@ JSTooltipMinuteChart.GetMinuteOption=function()
149793
149875
 
149794
149876
 
149795
149877
 
149878
+
149879
+
149880
+ /*
149881
+ Copyright (c) 2018 jones
149882
+
149883
+ http://www.apache.org/licenses/LICENSE-2.0
149884
+
149885
+ 开源项目 https://github.com/jones2000/HQChart
149886
+
149887
+ jones_2000@163.com
149888
+ */
149889
+
149890
+
149891
+ ///////////////////////////////////////////////////////
149892
+ // K线图提示信息
149893
+ //
149894
+ //////////////////////////////////////////////////////
149895
+
149896
+ function JSTooltipKLineChart()
149897
+ {
149898
+ this.DivDialog=null;
149899
+ this.HQChart=null;
149900
+ this.ID=Guid();
149901
+
149902
+ this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
149903
+ this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
149904
+ this.OnCreateCallback;
149905
+
149906
+ this.KLine=
149907
+ {
149908
+ Option:JSTooltipKLineChart.GetKLineOption(),
149909
+ JSChart:null,
149910
+ Symbol:null,
149911
+ }
149912
+
149913
+ this.Inital=function(hqchart, option)
149914
+ {
149915
+ this.HQChart=hqchart;
149916
+
149917
+ if (option)
149918
+ {
149919
+ if (IFrameSplitOperator.IsObject(option.Option))
149920
+ {
149921
+ var item=CloneData(option.Option); //复制一份出来
149922
+ this.KLine.Option=Object.assign(this.KLine.Option,item);
149923
+ }
149924
+ if (option.OnCreateCallback) this.OnCreateCallback=option.OnCreateCallback;
149925
+ }
149926
+ }
149927
+
149928
+ this.Create=function()
149929
+ {
149930
+ var divDom=document.createElement('div');
149931
+ divDom.className='UMyChart_Tooltip_KLine_Div';
149932
+ divDom.id=this.ID;
149933
+
149934
+ var divChart=document.createElement('div');
149935
+ divChart.className='UMyChart_Tooltip_KLine_Chart_Div';
149936
+ divDom.appendChild(divChart);
149937
+
149938
+ this.DivDialog=divDom;
149939
+
149940
+ var chart=JSChart.Init(divChart);
149941
+ this.KLine.JSChart=chart;
149942
+
149943
+ //语言跟主图保持一致
149944
+ if (this.HQChart) this.KLine.Option.Language=g_JSChartLocalization.GetLanguageName(this.HQChart.LanguageID);
149945
+ this.KLine.Option.OnCreatedCallback=(chart)=>{ this.OnCreateHQChart(chart); }
149946
+ this.KLine.Option.NetworkFilter=(data, callback)=>{ this.NetworkFilter(data, callback); }
149947
+ chart.SetOption(this.KLine.Option); //设置K线配置
149948
+
149949
+ document.body.appendChild(divDom);
149950
+
149951
+ this.UpdateStyle();
149952
+ }
149953
+
149954
+ this.UpdateStyle=function()
149955
+ {
149956
+ if (!this.DivDialog) return;
149957
+
149958
+ if (this.BGColor) this.DivDialog.style['background-color']=this.BGColor;
149959
+ if (this.BorderColor) this.DivDialog.style['border-color']=this.BorderColor;
149960
+ }
149961
+
149962
+ this.NetworkFilter=function(data, callback)
149963
+ {
149964
+ if (!this.HQChart || !this.HQChart.NetworkFilter) return;
149965
+
149966
+ this.HQChart.NetworkFilter(data, callback);
149967
+ }
149968
+
149969
+ this.OnCreateHQChart=function(chart)
149970
+ {
149971
+ if (this.OnCreateCallback) this.OnCreateCallback(chart);
149972
+ }
149973
+
149974
+ this.Destroy=function()
149975
+ {
149976
+ if (this.DivDialog) document.body.removeChild(this.DivDialog);
149977
+ this.DivDialog=null;
149978
+ this.TitleBox=null;
149979
+ if (!this.KLine.JSChart) this.KLine.JSChart.ChartDestory();
149980
+ this.KLine.JSChart=null;
149981
+ }
149982
+
149983
+ this.IsShow=function()
149984
+ {
149985
+ if (!this.DivDialog) return false;
149986
+
149987
+ return this.DivDialog.style.visibility==='visible';
149988
+ }
149989
+
149990
+ this.Show=function(data, x, y)
149991
+ {
149992
+ if (!this.DivDialog) this.Create();
149993
+ if (!data || !data.Symbol) return;
149994
+
149995
+ var symbol=data.Symbol;
149996
+ if (this.KLine.JSChart)
149997
+ {
149998
+ if (this.KLine.Symbol!=symbol)
149999
+ {
150000
+ this.KLine.Symbol=symbol;
150001
+ this.KLine.JSChart.ChangeSymbol(symbol);
150002
+ }
150003
+ }
150004
+
150005
+ if (!this.KLine.Option.EnableResize)
150006
+ {
150007
+ if (this.KLine.JSChart) this.KLine.JSChart.OnSize({ Type:1 });
150008
+ }
150009
+
150010
+ if (IFrameSplitOperator.IsNumberV2(x,y))
150011
+ {
150012
+
150013
+ }
150014
+ else if (data.Rect)
150015
+ {
150016
+ var rtCell=data.Rect;
150017
+ var pixelRatio=GetDevicePixelRatio();
150018
+ var rtItem={ Left:rtCell.Left/pixelRatio, Right:rtCell.Right/pixelRatio, Bottom:rtCell.Bottom/pixelRatio, Top:rtCell.Top/pixelRatio };
150019
+ rtItem.Width=rtItem.Right-rtItem.Left;
150020
+ rtItem.Height=rtItem.Bottom-rtItem.Top;
150021
+
150022
+ //超出窗口调整位置
150023
+ var height=this.DivDialog.offsetHeight;
150024
+ var width=this.DivDialog.offsetWidth;
150025
+ var x=rtItem.Right+data.Offset.Left;
150026
+ var y=rtItem.Bottom+data.Offset.Top;
150027
+
150028
+ var xRight=window.innerWidth-5;
150029
+ var ybottom=window.innerHeight-5;
150030
+ if (x+width>xRight) x=(rtItem.Left+data.Offset.Left)-width;
150031
+ if (y+height>ybottom) y=(rtItem.Top+data.Offset.Top)-height;
150032
+
150033
+ this.DivDialog.style.visibility='visible';
150034
+ this.DivDialog.style.top = y + "px";
150035
+ this.DivDialog.style.left = x + "px";
150036
+ }
150037
+ }
150038
+
150039
+ this.Hide=function()
150040
+ {
150041
+ if (!this.DivDialog) return;
150042
+ if (this.DivDialog.style.visibility!='hidden')
150043
+ this.DivDialog.style.visibility='hidden';
150044
+ }
150045
+
150046
+
150047
+ this.ReloadResource=function(option)
150048
+ {
150049
+ this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
150050
+ this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
150051
+
150052
+ if (!this.DivDialog) return;
150053
+
150054
+ this.UpdateStyle();
150055
+
150056
+ if (this.KLine.JSChart) this.KLine.JSChart.ReloadResource(option);
150057
+ }
150058
+
150059
+ }
150060
+
150061
+ JSTooltipKLineChart.GetKLineOption=function()
150062
+ {
150063
+ var option=
150064
+ {
150065
+ Type:'历史K线图', //创建图形类型
150066
+ Windows: //窗口指标
150067
+ [
150068
+ { Index:"MA",Change:false, Modify:false },
150069
+ { Index:"MACD", Close:false, Change:false, Modify:false,MaxMin:false,TitleWindow:false },
150070
+ ],
150071
+
150072
+ //Language:'EN',
150073
+
150074
+ Symbol:null,
150075
+ IsAutoUpdate:false, //是自动更新数据
150076
+ AutoUpdateFrequency:3000, //数据更新频率
150077
+
150078
+
150079
+ SplashTitle:'加载数据中......',
150080
+ IsShowRightMenu:false, //右键菜单
150081
+ CtrlMoveStep:10,
150082
+
150083
+ KLine: //K线设置
150084
+ {
150085
+ DragMode:1, //拖拽模式 0=禁止拖拽 1=数据拖拽 2=区间选择
150086
+ Right:1, //复权 0 不复权 1 前复权 2 后复权
150087
+ Period:0, //周期 0 日线 1 周线 2 月线 3 年线
150088
+ MaxRequestDataCount:3000, //数据个数
150089
+ MaxRequestMinuteDayCount:5, //分钟数据获取几天数据 默认取5天数据
150090
+ IsShowTooltip:false, //是否显示K线提示信息
150091
+ DrawType:0, //K线类型 0=实心K线柱子 1=收盘价线 2=美国线 3=空心K线柱子 4=收盘价面积图
150092
+ KLineDoubleClick:false, //禁止双击弹框
150093
+ RightSpaceCount:0,
150094
+ ZoomType:0,
150095
+ DataWidth:2,
150096
+ },
150097
+
150098
+ StepPixel:0,
150099
+
150100
+ Listener:
150101
+ {
150102
+ KeyDown:false,
150103
+ Wheel:false
150104
+ },
150105
+
150106
+
150107
+
150108
+ KLineTitle: //标题设置
150109
+ {
150110
+ IsShowName:true, //不显示股票名称
150111
+ IsShowSettingInfo:true, //不显示周期/复权
150112
+ //IsTitleShowLatestData:true,
150113
+ },
150114
+
150115
+ Border: //边框
150116
+ {
150117
+
150118
+ Left:1, //左边间距
150119
+ Right:20, //右边间距
150120
+ Bottom:25, //底部间距
150121
+ Top:25, //顶部间距
150122
+
150123
+ AutoLeft:{ Blank:10, MinWidth:30 },
150124
+ AutoRight:{ Blank:5, MinWidth:30 },
150125
+ },
150126
+
150127
+ Frame: //子框架设置
150128
+ [
150129
+ {
150130
+ SplitCount:4,
150131
+ IsShowLeftText:false,
150132
+ },
150133
+
150134
+ { SplitCount:3,IsShowLeftText:false, },
150135
+ { SplitCount:3, IsShowLeftText:false,}
150136
+ ],
150137
+ }
150138
+ return option;
150139
+ }
150140
+
150141
+
150142
+
150143
+
150144
+
150145
+
150146
+
150147
+
150148
+
150149
+
149796
150150
  /*
149797
150151
  Copyright (c) 2018 jones
149798
150152
 
@@ -154282,8 +154636,16 @@ function JSDialogModifyIndexParam()
154282
154636
 
154283
154637
  item.Value=value;
154284
154638
 
154285
- if (this.IndexData.Type==1) this.HQChart.UpdateWindowIndex(this.IndexData.WindowIndex);
154286
- else if (this.IndexData.Type==2) this.HQChart.UpdateOverlayIndex(this.IndexData.Identify);
154639
+
154640
+
154641
+ if (this.IndexData.Type==1)
154642
+ {
154643
+ this.HQChart.UpdateWindowIndex(this.IndexData.WindowIndex);
154644
+ }
154645
+ else if (this.IndexData.Type==2)
154646
+ {
154647
+ this.HQChart.UpdateOverlayIndex(this.IndexData.Identify);
154648
+ }
154287
154649
  }
154288
154650
  }
154289
154651
 
@@ -154411,7 +154773,7 @@ function HQChartScriptWorker()
154411
154773
 
154412
154774
 
154413
154775
 
154414
- var HQCHART_VERSION="1.1.14515";
154776
+ var HQCHART_VERSION="1.1.14532";
154415
154777
 
154416
154778
  function PrintHQChartVersion()
154417
154779
  {