hqchart 1.1.14523 → 1.1.14538

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.
@@ -8087,7 +8087,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8087
8087
 
8088
8088
  var yMove=e.clientY-drag.LastMove.Y;
8089
8089
 
8090
- this.OnMoveFromeBorder(this.BorderDrag.Index, yMove);
8090
+ if (!this.OnMoveFromeBorder(this.BorderDrag.Index, yMove)) return;
8091
8091
 
8092
8092
  drag.LastMove.X=e.clientX;
8093
8093
  drag.LastMove.Y=e.clientY;
@@ -10988,7 +10988,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10988
10988
  this.SelectChartDrawPicture=null;
10989
10989
  if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
10990
10990
  this.ClearChartDrawPicture(drawPicture); //删除选中的画图工具
10991
- this.CloseModifyDrawDialog();
10992
10991
  }
10993
10992
  else if (this.SelectedChart && this.SelectedChart.Selected.Identify)
10994
10993
  {
@@ -11212,14 +11211,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11212
11211
 
11213
11212
  this.OnMoveFromeBorder=function(index, yMove)
11214
11213
  {
11215
- if (!this.Frame) return;
11214
+ if (!this.Frame) return false;
11216
11215
 
11217
- if (!this.Frame.OnMoveFromeBorder(index,yMove)) return ;
11216
+ if (!this.Frame.OnMoveFromeBorder(index,yMove)) return false;
11218
11217
 
11219
11218
  //this.Frame.SetSizeChage(true);
11220
11219
  this.Frame.SetFrameBorderSizeChange();
11221
11220
  this.Frame.ReDrawToolbar();
11222
11221
  this.Draw();
11222
+
11223
+ return true;
11223
11224
  }
11224
11225
 
11225
11226
  this.OnZoomUpDownFrameY=function(obj, yMove)
@@ -12806,20 +12807,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12806
12807
 
12807
12808
  if (!this.DialogModifyDraw) return;
12808
12809
 
12809
- if (chart.ClassName=="ChartDrawPictureText" || chart.ClassName=='ChartDrawVolProfile')
12810
- {
12811
- this.CloseModifyDrawDialog();
12812
-
12813
- if (!this.ChartPictureMenu) this.ChartPictureMenu=g_DialogFactory.Create('ChartPictureSettingMenu', this.UIElement.parentNode);
12814
- if (!this.ChartPictureMenu) return;
12815
-
12816
- var event={ data: { ChartPicture:chart, HQChart:this}};
12817
- this.ChartPictureMenu.DoModal(event);
12818
- }
12819
- else
12820
- {
12821
- this.ShowModifyDrawDialog(chart);
12822
- }
12810
+ this.ShowModifyDrawDialog(chart);
12823
12811
  }
12824
12812
 
12825
12813
  this.FinishMoveChartDrawPicture=function()
@@ -12871,6 +12859,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12871
12859
 
12872
12860
  if (option && option.Draw==false) bDraw=false;
12873
12861
  if (bDraw) this.Draw();
12862
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(null);
12874
12863
  }
12875
12864
  else
12876
12865
  {
@@ -12890,6 +12879,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12890
12879
 
12891
12880
  if (option && option.Draw==false) bDraw=false;
12892
12881
  if (bDraw) this.Draw();
12882
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
12883
+ break;
12893
12884
  }
12894
12885
  }
12895
12886
  }
@@ -23830,11 +23821,37 @@ function HQTradeFrame()
23830
23821
  {
23831
23822
  if (this.SubFrame.length<=0) return false;
23832
23823
 
23833
- var topFrame=this.SubFrame[index];
23824
+ var topFrame=null;
23825
+ var aryTopTitleFrame=[];
23826
+ for(var i=index;i>=0;--i)
23827
+ {
23828
+ var item=this.SubFrame[i];
23829
+
23830
+ if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
23831
+ {
23832
+ aryTopTitleFrame.push(item);
23833
+ continue;
23834
+ }
23835
+
23836
+ if (item.Height>0)
23837
+ {
23838
+ topFrame=item;
23839
+ break;
23840
+ }
23841
+ }
23842
+
23834
23843
  var bottomFrame=null;
23844
+ var aryBottomTitleFrame=[];
23835
23845
  for(var i=index+1;i<this.SubFrame.length;++i)
23836
23846
  {
23837
23847
  var item=this.SubFrame[i];
23848
+
23849
+ if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
23850
+ {
23851
+ aryBottomTitleFrame.push(item);
23852
+ continue;
23853
+ }
23854
+
23838
23855
  if (item.Height>0)
23839
23856
  {
23840
23857
  bottomFrame=item;
@@ -23852,6 +23869,20 @@ function HQTradeFrame()
23852
23869
 
23853
23870
  var height=topFrame.Frame.ChartBorder.GetHeightEx();
23854
23871
  var height2=bottomFrame.Frame.ChartBorder.GetHeightEx();
23872
+
23873
+ for(var i=0;i<aryBottomTitleFrame.length;++i)
23874
+ {
23875
+ var item=aryBottomTitleFrame[i];
23876
+ item.Frame.ChartBorder.Bottom+=yMove;
23877
+ item.Frame.ChartBorder.Top+=yMove;
23878
+ }
23879
+
23880
+ for(var i=0;i<aryTopTitleFrame.length;++i)
23881
+ {
23882
+ var item=aryTopTitleFrame[i];
23883
+ item.Frame.ChartBorder.Bottom+=yMove;
23884
+ item.Frame.ChartBorder.Top+=yMove;
23885
+ }
23855
23886
 
23856
23887
  //缩小的时候 小于最小高度 不处理
23857
23888
  if ((height<this.MinSubFrameHeight && yMove<0) || (height2<this.MinSubFrameHeight && yMove>0))
@@ -24145,11 +24176,25 @@ function HQTradeFrame()
24145
24176
  this.SaveSubFrameHeightRate=function()
24146
24177
  {
24147
24178
  var height=this.ChartBorder.GetHeight();
24179
+ var totalTitleHeight=0;
24180
+ for(var i=0;i<this.SubFrame.length;++i)
24181
+ {
24182
+ var item=this.SubFrame[i];
24183
+ var frame=item.Frame;
24184
+ if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0)
24185
+ totalTitleHeight+=frame.ChartBorder.TitleHeight;
24186
+ }
24187
+ height-=totalTitleHeight;
24148
24188
 
24149
24189
  for(var i=0; i<this.SubFrame.length; ++i)
24150
24190
  {
24151
24191
  var item=this.SubFrame[i];
24192
+ var frame=item.Frame;
24193
+ if (item.Height<=0) continue;
24194
+ if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0) continue;
24195
+
24152
24196
  var subHeight=item.Frame.ChartBorder.GetHeight();
24197
+
24153
24198
  var rate=(subHeight/height)*100;
24154
24199
  item.Height=rate;
24155
24200
  }
@@ -25281,9 +25326,13 @@ function HQTradeFrame()
25281
25326
  var left=item.Frame.ChartBorder.GetLeft();
25282
25327
  var right=item.Frame.ChartBorder.GetRight();
25283
25328
 
25284
- item.Frame.Canvas.beginPath();
25285
- item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
25286
- if (item.Frame.Canvas.isPointInPath(x,y))
25329
+ var rtBorder={ Left:left, Right:right, Top:bottom-height/2, Height:height };
25330
+ rtBorder.Bottom=rtBorder.Top+rtBorder.Height;
25331
+ rtBorder.Width=rtBorder.Right-rtBorder.Left;
25332
+ if (x>=rtBorder.Left && x<=rtBorder.Right && y>=rtBorder.Top && y<rtBorder.Bottom)
25333
+ //item.Frame.Canvas.beginPath();
25334
+ //item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
25335
+ //if (item.Frame.Canvas.isPointInPath(x,y))
25287
25336
  {
25288
25337
  return { Index:i, Bottom:true };
25289
25338
  }
@@ -68721,15 +68770,13 @@ function ChartDrawPictureText()
68721
68770
  delete this.newMethod;
68722
68771
 
68723
68772
  this.ClassName='ChartDrawPictureText';
68724
- this.Text='文本';
68773
+ this.Text='输入文字';
68725
68774
  this.PointCount=1;
68726
68775
  this.FontOption={ Family:'微软雅黑', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
68727
68776
  //矢量图片
68728
68777
  //this.Text="\ue606";
68729
68778
  //this.FontOption={ Family:'iconfont', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
68730
68779
  this.TextRect=null; //文字区域
68731
- this.IsInitialized=false; //是否初始化了
68732
- this.SettingMenu;
68733
68780
  this.HQChart;
68734
68781
 
68735
68782
  this.SetOption=function(option)
@@ -68767,12 +68814,6 @@ function ChartDrawPictureText()
68767
68814
  this.TextRect.Height=textHeight
68768
68815
  //this.Canvas.strokeRect(this.TextRect.Left,this.TextRect.Top,this.TextRect.Width,this.TextRect.Height);
68769
68816
  this.Canvas.restore();
68770
-
68771
- if (this.IsInitialized===false)
68772
- {
68773
- this.SetTextOption();
68774
- this.IsInitialized=true;
68775
- }
68776
68817
  }
68777
68818
 
68778
68819
  //根据设置动态生成字体
@@ -68791,18 +68832,6 @@ function ChartDrawPictureText()
68791
68832
  return font;
68792
68833
  }
68793
68834
 
68794
- this.SetTextOption=function()
68795
- {
68796
- JSConsole.Chart.Log('[ChartDrawPictureText::SetTextOption]');
68797
- //创建div设置窗口
68798
- if (!this.SettingMenu) this.SettingMenu=new ChartPictureTextSettingMenu(this.Frame.ChartBorder.UIElement.parentNode);
68799
-
68800
- this.SettingMenu.ChartPicture=this;
68801
- this.SettingMenu.HQChart=this.HQChart;
68802
- this.SettingMenu.Position={Left:this.TextRect.Left+this.TextRect.Width,Top:this.TextRect.Top};
68803
- this.SettingMenu.DoModal();
68804
- }
68805
-
68806
68835
  this.IsPointIn=function(x,y)
68807
68836
  {
68808
68837
  if (!this.Frame || this.Status!=10) return -1;
@@ -73685,6 +73714,7 @@ function ChartDrawPriceNote()
73685
73714
 
73686
73715
  var price=this.Frame.GetYData(ptStart.Y, false);
73687
73716
  var text=price.toFixed(floatPrecision);
73717
+ this.Canvas.font=font;
73688
73718
  var textHeight=this.Canvas.measureText("擎").width;
73689
73719
  var textWidth=this.Canvas.measureText(text).width;
73690
73720
  var angle=this.CalculateAngle(ptStart.X, ptStart.Y, ptEnd.X, ptEnd.Y);
@@ -75770,6 +75800,15 @@ function JSChartResource()
75770
75800
  TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
75771
75801
  }
75772
75802
 
75803
+ this.PopKLineChart=
75804
+ {
75805
+ BGColor:"rgba(250,250,250,0.95)",
75806
+ BorderColor:"rgb(0,0,0)",
75807
+
75808
+ TitleColor:'rgb(250,250,250)', //标题颜色
75809
+ TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
75810
+ }
75811
+
75773
75812
  this.SelectRectBGColor="rgba(1,130,212,0.06)"; //背景色
75774
75813
  // this.SelectRectAlpha=0.06; //透明度
75775
75814
 
@@ -77342,10 +77381,21 @@ function JSChartResource()
77342
77381
  if (style.PopMinuteChart)
77343
77382
  {
77344
77383
  var item=style.PopMinuteChart;
77345
- if (item.BGColor) this.PopMinuteChart.BGColor=item.BGColor;
77346
- if (item.BorderColor) this.PopMinuteChart.BorderColor=item.BorderColor;
77347
- if (item.TitleColor) this.DialogSearchIndex.TitleColor=item.TitleColor;
77348
- if (item.TitleBGColor) this.DialogSearchIndex.TitleBGColor=item.TitleBGColor;
77384
+ var dest=this.PopMinuteChart;
77385
+ if (item.BGColor) dest.BGColor=item.BGColor;
77386
+ if (item.BorderColor) dest.BorderColor=item.BorderColor;
77387
+ if (item.TitleColor) dest.TitleColor=item.TitleColor;
77388
+ if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
77389
+ }
77390
+
77391
+ if (style.PopKLineChart)
77392
+ {
77393
+ var item=style.PopKLineChart;
77394
+ var dest=this.PopKLineChart;
77395
+ if (item.BGColor) dest.BGColor=item.BGColor;
77396
+ if (item.BorderColor) dest.BorderColor=item.BorderColor;
77397
+ if (item.TitleColor) dest.TitleColor=item.TitleColor;
77398
+ if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
77349
77399
  }
77350
77400
 
77351
77401
  if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
@@ -81789,7 +81839,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
81789
81839
  this.Symbol=data.symbol;
81790
81840
  this.Name=data.name;
81791
81841
 
81792
- this.BindMainData(bindData,this.PageSize);
81842
+ var chartOperator=null; //额外的图形控制
81843
+ if (data && data.ChartOperator)
81844
+ {
81845
+ var item=data.ChartOperator;
81846
+ chartOperator={ };
81847
+ if (item.IsShowAll===true) chartOperator.IsShowAll=true; //全部显示
81848
+ }
81849
+
81850
+ this.BindMainData(bindData,this.PageSize,chartOperator);
81793
81851
  if (this.AfterBindMainData) this.AfterBindMainData("RecvHistoryData");
81794
81852
  this.Frame.SetSizeChage(true);
81795
81853
 
@@ -84611,7 +84669,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
84611
84669
  bindData.Period=this.Period;
84612
84670
  bindData.Right=this.Right;
84613
84671
 
84614
- if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsSHSZStockA(item.Symbol)) //复权数据
84672
+ if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsEnableRight(item.Symbol)) //复权数据
84615
84673
  {
84616
84674
  var rightData=bindData.GetRightData(bindData.Right,{ AlgorithmType: this.RightFormula });
84617
84675
  bindData.Data=rightData;
@@ -85951,8 +86009,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
85951
86009
  var self=this;
85952
86010
  drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
85953
86011
 
85954
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
85955
-
85956
86012
  this.ChartDrawPicture.push(drawPicture);
85957
86013
  }
85958
86014
 
@@ -93269,7 +93325,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93269
93325
  if (item)
93270
93326
  {
93271
93327
  drawPicture=item.Create();
93272
- if (drawPicture.ClassName=='ChartDrawPictureText') drawPicture.HQChart=this;
93273
93328
  }
93274
93329
 
93275
93330
  if (!drawPicture) //iconfont图标
@@ -93332,7 +93387,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93332
93387
 
93333
93388
  drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
93334
93389
 
93335
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
93336
93390
  this.ChartDrawPicture.push(drawPicture);
93337
93391
 
93338
93392
  if (obj.Draw==true) this.DrawDynamicInfo();
@@ -93376,8 +93430,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93376
93430
  drawPicture.ValueToPoint();
93377
93431
  drawPicture.GetActiveDrawPicture=()=>{ return this.GetActiveDrawPicture(); }
93378
93432
 
93379
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
93380
-
93381
93433
  this.ChartDrawPicture.push(drawPicture);
93382
93434
  }
93383
93435
 
@@ -98255,7 +98307,6 @@ function DialogFactory()
98255
98307
  this.DataMap=new Map(
98256
98308
  [
98257
98309
  ["ChartPictureSettingMenu", { Create:function(divElement) { return new ChartPictureSettingMenu(divElement); } }],
98258
- ["ChartPictureTextSettingMenu", { Create:function(divElement) { return new ChartPictureTextSettingMenu(divElement); } }]
98259
98310
  ]);
98260
98311
 
98261
98312
  this.Create=function(name, option)
@@ -98481,239 +98532,6 @@ function ChartPictureSettingMenu(divElement)
98481
98532
  }
98482
98533
  }
98483
98534
 
98484
- //画图工具 文本设置窗口
98485
- function ChartPictureTextSettingMenu(divElement)
98486
- {
98487
- this.newMethod=IDivDialog; //派生
98488
- this.newMethod(divElement);
98489
- delete this.newMethod;
98490
-
98491
- this.ChartPicture;
98492
- this.SettingDiv;
98493
- this.Position;
98494
-
98495
- this.BackupData; //画图工具备份数据
98496
-
98497
- this.Close=function()
98498
- {
98499
- if (this.SettingDiv) this.DivElement.removeChild(this.SettingDiv); //直接删除
98500
- }
98501
-
98502
- this.DoModal=function()
98503
- {
98504
- var text=this.ChartPicture.Text; //显示的文本
98505
- var fontOption=this.ChartPicture.FontOption; //字体设置
98506
- var lineColor=this.ChartPicture.LineColor;
98507
- //数据备份, 点取消的时候把备份数据设置回去
98508
- this.BackupData=
98509
- {
98510
- Text:text,
98511
- LineColor:lineColor,
98512
- FontOption:{Family: fontOption.Family, Size: fontOption.Size, Weight: fontOption.Weight, Style: fontOption.Style }
98513
- };
98514
- JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] picture info',this.BackupData);
98515
-
98516
- var self=this;
98517
- var div=this.DivElement.getElementsByClassName('chartpicture-text-setting')[0];
98518
- if (!div)
98519
- {
98520
- div=document.createElement("div");
98521
- div.className='chartpicture-text-setting';
98522
- this.DivElement.appendChild(div);
98523
- this.SettingDiv=div;
98524
- }
98525
- else
98526
- {
98527
- this.SettingDiv=div;
98528
- }
98529
-
98530
- var titleContainerStr = '<div class="titleWrap">'+
98531
- '<span class="titleName">样式设置</span>'+
98532
- '<i class="closeBtn iconfont icon-close"></i>'+
98533
- '</div>';
98534
-
98535
- var fontSizeArray = [10,11,12,14,16,20,24,28,32,40];
98536
- var fontArray = ['微软雅黑','宋体','Arial','仿宋'];
98537
- var sizeListStr = "";
98538
- var fontListStr = "";
98539
- fontArray.forEach(function(item,index){
98540
- fontListStr += index !== 0 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
98541
- });
98542
- fontSizeArray.forEach(function(item,index){
98543
- sizeListStr += index !== 5 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
98544
- });
98545
- var contentContainerStr = '<div class="contentWrap">'+
98546
- '<div class="styleOptions">'+
98547
- '<span class="colorPicker"><input type="color" id="fontColor" value="#1e90ff"></span>'+
98548
- '<div class="likeSelect fontSelect"><span class="choicedText">微软雅黑</span><div class="selectList">'+fontListStr+'</div><i class="iconfont icon-xia"></i></div>'+
98549
- '<div class="likeSelect fontSizeSelect"><span class="choicedText">20</span><div class="selectList">'+sizeListStr+'</div><i class="iconfont icon-xia"></i></div>'+
98550
- '<span class="strongFont likeBtn"><i class="iconfont icon-jiacu"></i></span>'+
98551
- '<span class="italicsFont likeBtn"><i class="iconfont icon-qingxieL"></i></span>'+
98552
- '</div>'+
98553
- '<textarea class="tArea" id="tArea" placeholder="Text"></textarea>'+
98554
- '</div>';
98555
- var btnContainer = '<div class="btnsContainer">'+
98556
- '<span class="okBtn btn">确认</span>'+
98557
- '<span class="cancelBtn btn">取消</span>'+
98558
- '</div>';
98559
-
98560
- var pixelTatio = GetDevicePixelRatio();
98561
- var DoModalStr = titleContainerStr+contentContainerStr+btnContainer;
98562
- this.SettingDiv.style.left = this.Position.Left/pixelTatio + "px";
98563
- this.SettingDiv.style.top = this.Position.Top/pixelTatio + "px";
98564
- this.SettingDiv.innerHTML=DoModalStr;
98565
- this.SettingDiv.style.position = "absolute";
98566
- this.SettingDiv.style.display = "block";
98567
- $(".chartpicture-text-setting .colorPicker").css({ //初始设置
98568
- "borderColor":self.ChartPicture.LineColor,
98569
- "background-color":self.ChartPicture.LineColor
98570
- });
98571
-
98572
- var family = this.ChartPicture.FontOption.Family;
98573
- $('.chartpicture-text-setting .fontSelect .choicedText').html(family);
98574
- fontArray.forEach(function(item,index){
98575
- if(item == family){
98576
- $('.chartpicture-text-setting .fontSelect p').removeClass('active');
98577
- $('.chartpicture-text-setting .fontSelect p').eq(index).addClass('active');
98578
- }
98579
- });
98580
-
98581
- var size = this.ChartPicture.FontOption.Size;
98582
- $('.chartpicture-text-setting .fontSizeSelect .choicedText').html(size);
98583
- fontSizeArray.forEach(function(item,index){
98584
- if(item == size){
98585
- $('.chartpicture-text-setting .fontSizeSelect p').removeClass('active');
98586
- $('.chartpicture-text-setting .fontSizeSelect p').eq(index).addClass('active');
98587
- }
98588
- });
98589
-
98590
- var weight = this.ChartPicture.FontOption.Weight;
98591
- if( weight != null && weight == 'bold'){
98592
- $('.chartpicture-text-setting .strongFont').addClass('hot');
98593
- }
98594
-
98595
- var style = this.ChartPicture.FontOption.Style;
98596
- if( style != null && style == 'italic'){
98597
- $('.chartpicture-text-setting .italicsFont').addClass('hot');
98598
- }
98599
-
98600
- var text = this.ChartPicture.Text;
98601
- $('.chartpicture-text-setting .tArea').val(text); //结束初始设置
98602
-
98603
- var defaultTextOption = { Family:'微软雅黑', Size:20, Weight:null, Style:null };
98604
- $(".chartpicture-text-setting #fontColor").change(
98605
- {
98606
- Picture:this.ChartPicture
98607
- },
98608
- function(event)
98609
- { //颜色选择
98610
- var value = $(this).val();
98611
- $(this).parent().css({
98612
- "borderColor":value,
98613
- "background-color":value
98614
- });
98615
- var chart=event.data.Picture;
98616
- chart.LineColor = value;
98617
- if (chart.Update) chart.Update(); //更新界面
98618
- }
98619
- );
98620
- $(".chartpicture-text-setting .fontSelect,.chartpicture-text-setting .fontSizeSelect").click(function(){
98621
- $(this).find('.selectList').toggle();
98622
- $(this).toggleClass('hot');
98623
- });
98624
- $(".chartpicture-text-setting .fontSelect p").click(
98625
- {
98626
- Picture:this.ChartPicture
98627
- },
98628
- function(event){ //字体选择
98629
- var choicedText = $(this).closest(".fontSelect").find('.choicedText').html();
98630
- var currentSelect = event.currentTarget.innerHTML;
98631
- if(choicedText !== currentSelect){
98632
- $(this).closest(".fontSelect").find('.choicedText').html(currentSelect);
98633
- $(this).siblings().removeClass('active');
98634
- $(this).addClass('active');
98635
- var chart = event.data.Picture;
98636
- chart.FontOption.Family = currentSelect;
98637
- if (chart.Update) chart.Update(); //更新界面
98638
- }
98639
- });
98640
- $(".chartpicture-text-setting .fontSizeSelect p").click(
98641
- {
98642
- Picture:this.ChartPicture
98643
- },
98644
- function(event){ //字号选择
98645
- var choicedText = $(this).closest(".fontSizeSelect").find('.choicedText').html();
98646
- var currentSelect = event.currentTarget.innerHTML;
98647
- if(choicedText !== currentSelect){
98648
- $(this).closest(".fontSizeSelect").find('.choicedText').html(currentSelect);
98649
- $(this).siblings().removeClass('active');
98650
- $(this).addClass('active');
98651
- var chart = event.data.Picture;
98652
- chart.FontOption.Size = Number(currentSelect);
98653
- if (chart.Update) chart.Update(); //更新界面
98654
- }
98655
- });
98656
- $(".chartpicture-text-setting .strongFont").click(
98657
- {
98658
- Picture:this.ChartPicture
98659
- },
98660
- function(event){
98661
- $(this).toggleClass('hot');
98662
- var classnames = $(this).attr('class');
98663
- if(classnames.indexOf('hot') > 0){
98664
- var chart = event.data.Picture;
98665
- chart.FontOption.Weight = 'bold';
98666
- if (chart.Update) chart.Update(); //更新界面
98667
- }
98668
- });
98669
- $(".chartpicture-text-setting .italicsFont").click(
98670
- {
98671
- Picture:this.ChartPicture
98672
- },
98673
- function(event){
98674
- $(this).toggleClass('hot')
98675
- var classnames = $(this).attr('class');
98676
- if(classnames.indexOf('hot') > 0){
98677
- var chart = event.data.Picture;
98678
- chart.FontOption.Style = 'italic';
98679
- if (chart.Update) chart.Update(); //更新界面
98680
- }
98681
- });
98682
- $(".chartpicture-text-setting .titleWrap .closeBtn,.chartpicture-text-setting .btnsContainer .cancelBtn").click( //取消
98683
- {
98684
- Picture:this.ChartPicture
98685
- },
98686
- function(event){
98687
- var picture = event.data.Picture;
98688
- picture.Text = self.BackupData.Text;
98689
- picture.LineColor = self.BackupData.LineColor;
98690
- picture.FontOption = self.BackupData.FontOption;
98691
- if (picture.Update) picture.Update();
98692
- self.Close();
98693
- });
98694
- $(".chartpicture-text-setting .tArea").keyup( //文本内容
98695
- {
98696
- Picture:this.ChartPicture
98697
- },
98698
- function(event){
98699
- JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] $(".chartpicture-text-setting .tArea").keyup()');
98700
- var content = $(this).val();
98701
- var chart = event.data.Picture;
98702
- chart.Text = content;
98703
- if (chart.Update) chart.Update(); //更新界面
98704
- });
98705
-
98706
- //确定按钮
98707
- $(".chartpicture-text-setting .btnsContainer .okBtn").click(
98708
- function()
98709
- {
98710
- self.Close();
98711
- if (self.HQChart && self.HQChart.ChartDrawStorage) self.HQChart.ChartDrawStorage.SaveDrawData(self.ChartPicture); //保存下
98712
- }
98713
- );
98714
- }
98715
- }
98716
-
98717
98535
 
98718
98536
  function ChartPictureVolProfileSettingMenu(divElement)
98719
98537
  {
@@ -129386,7 +129204,12 @@ function GetBlackStyle()
129386
129204
  BGColor:"rgba(0,0,0,0.85)",
129387
129205
  BorderColor:"rgb(230,230,230)",
129388
129206
  },
129389
-
129207
+
129208
+ PopKLineChart:
129209
+ {
129210
+ BGColor:"rgba(0,0,0,0.85)",
129211
+ BorderColor:"rgb(230,230,230)",
129212
+ },
129390
129213
 
129391
129214
  DefaultTextColor: "rgb(101,104,112)",
129392
129215
  DefaultTextFont: 14*GetDevicePixelRatio() +'px 微软雅黑',
@@ -132020,6 +131843,7 @@ function JSReportChart(divElement)
132020
131843
  if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
132021
131844
  if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
132022
131845
  if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
131846
+ if (option.KLineChartTooltip && option.KLineChartTooltip.Enable) chart.InitalKLineChartTooltip(option.KLineChartTooltip);
132023
131847
 
132024
131848
  if (option.Symbol) chart.Symbol=option.Symbol;
132025
131849
  if (option.Name) chart.Name=option.Name;
@@ -132340,6 +132164,7 @@ function JSReportChartContainer(uielement)
132340
132164
 
132341
132165
  //
132342
132166
  this.TooltipMinuteChart; //分时图
132167
+ this.TooltipKLineChart; //分时图
132343
132168
 
132344
132169
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
132345
132170
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
@@ -132350,6 +132175,7 @@ function JSReportChartContainer(uielement)
132350
132175
  this.StopAutoUpdate();
132351
132176
 
132352
132177
  this.DestroyMinuteChartTooltip();
132178
+ this.DestroyKLineChartTooltip();
132353
132179
  this.DestroyFloatTooltip();
132354
132180
  }
132355
132181
 
@@ -132389,6 +132215,24 @@ function JSReportChartContainer(uielement)
132389
132215
  this.TooltipMinuteChart=null;
132390
132216
  }
132391
132217
 
132218
+ this.InitalKLineChartTooltip=function(option)
132219
+ {
132220
+ if (this.TooltipKLineChart) return;
132221
+
132222
+ this.TooltipKLineChart=new JSTooltipKLineChart();
132223
+ this.TooltipKLineChart.Inital(this, option);
132224
+ this.TooltipKLineChart.Create();
132225
+ }
132226
+
132227
+ this.DestroyKLineChartTooltip=function()
132228
+ {
132229
+ if (!this.TooltipKLineChart) return;
132230
+
132231
+ this.TooltipKLineChart.Destroy();
132232
+ this.TooltipKLineChart=null;
132233
+ }
132234
+
132235
+
132392
132236
  this.InitalFloatTooltip=function(option)
132393
132237
  {
132394
132238
  if (this.FloatTooltip) return;
@@ -132458,6 +132302,35 @@ function JSReportChartContainer(uielement)
132458
132302
  }
132459
132303
 
132460
132304
 
132305
+ this.ShowKLineChartTooltip=function(x,y, data)
132306
+ {
132307
+ if (!this.TooltipKLineChart) return;
132308
+
132309
+ var rtClient=this.UIElement.getBoundingClientRect();
132310
+ var rtScroll=GetScrollPosition();
132311
+
132312
+ var offsetLeft=rtClient.left+rtScroll.Left;
132313
+ var offsetTop=rtClient.top+rtScroll.Top;
132314
+
132315
+ data.Offset={ Left:offsetLeft, Top:offsetTop };
132316
+
132317
+ this.TooltipKLineChart.Show(data, x,y);
132318
+ }
132319
+
132320
+ this.HideKLineChartTooltip=function()
132321
+ {
132322
+ if (!this.TooltipKLineChart) return;
132323
+
132324
+ this.TooltipKLineChart.Hide();
132325
+ }
132326
+
132327
+ this.HideAllTooltip=function()
132328
+ {
132329
+ this.HideKLineChartTooltip();
132330
+ this.HideMinuteChartTooltip();
132331
+ this.HideFloatTooltip();
132332
+ }
132333
+
132461
132334
 
132462
132335
  this.AutoScrollPage=function(step)
132463
132336
  {
@@ -133627,8 +133500,7 @@ function JSReportChartContainer(uielement)
133627
133500
  if (wheelValue<0) //下
133628
133501
  {
133629
133502
  this.LastMouseStatus.TooltipStatus=null;
133630
- this.HideMinuteChartTooltip();
133631
- this.HideFloatTooltip();
133503
+ this.HideAllTooltip();
133632
133504
  if (this.GotoNextItem(1))
133633
133505
  {
133634
133506
  this.Draw();
@@ -133638,8 +133510,7 @@ function JSReportChartContainer(uielement)
133638
133510
  else if (wheelValue>0) //上
133639
133511
  {
133640
133512
  this.LastMouseStatus.TooltipStatus=null;
133641
- this.HideMinuteChartTooltip();
133642
- this.HideFloatTooltip();
133513
+ this.HideAllTooltip();
133643
133514
  if (this.GotoNextItem(-1))
133644
133515
  {
133645
133516
  this.Draw();
@@ -133652,8 +133523,7 @@ function JSReportChartContainer(uielement)
133652
133523
  if (wheelValue<0) //下一页
133653
133524
  {
133654
133525
  this.LastMouseStatus.TooltipStatus=null;
133655
- this.HideMinuteChartTooltip();
133656
- this.HideFloatTooltip();
133526
+ this.HideAllTooltip();
133657
133527
  if (this.GotoNextPage(this.PageUpDownCycle))
133658
133528
  {
133659
133529
  this.Draw();
@@ -133663,8 +133533,7 @@ function JSReportChartContainer(uielement)
133663
133533
  else if (wheelValue>0) //上一页
133664
133534
  {
133665
133535
  this.LastMouseStatus.TooltipStatus=null;
133666
- this.HideMinuteChartTooltip();
133667
- this.HideFloatTooltip();
133536
+ this.HideAllTooltip();
133668
133537
  if (this.GotoPreviousPage(this.PageUpDownCycle))
133669
133538
  {
133670
133539
  this.Draw();
@@ -133686,8 +133555,7 @@ function JSReportChartContainer(uielement)
133686
133555
  var keyID = e.keyCode ? e.keyCode :e.which;
133687
133556
  if (keyID==116) return; //F15刷新不处理
133688
133557
 
133689
- this.HideMinuteChartTooltip();
133690
- this.HideFloatTooltip();
133558
+ this.HideAllTooltip();
133691
133559
  switch(keyID)
133692
133560
  {
133693
133561
  case 33: //page up
@@ -133976,7 +133844,8 @@ function JSReportChartContainer(uielement)
133976
133844
  if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
133977
133845
  this.LastMouseStatus.TooltipStatus=null;
133978
133846
 
133979
- var bShowChartTooltip=false;
133847
+ var bShowKLineTooltip=false;
133848
+ var bShowMinuteTooltip=false;
133980
133849
  var chartTooltipData=null;
133981
133850
 
133982
133851
  if (this.DragRow) return;
@@ -134052,7 +133921,15 @@ function JSReportChartContainer(uielement)
134052
133921
  {
134053
133922
  if (tooltipData.Stock && tooltipData.Stock.Symbol)
134054
133923
  {
134055
- bShowChartTooltip=true;
133924
+ bShowMinuteTooltip=true;
133925
+ chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
133926
+ }
133927
+ }
133928
+ else if (tooltipData.Type==21)
133929
+ {
133930
+ if (tooltipData.Stock && tooltipData.Stock.Symbol)
133931
+ {
133932
+ bShowKLineTooltip=true;
134056
133933
  chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
134057
133934
  }
134058
133935
  }
@@ -134102,20 +133979,17 @@ function JSReportChartContainer(uielement)
134102
133979
  this.HideFloatTooltip();
134103
133980
  }
134104
133981
 
134105
- if (bShowChartTooltip)
134106
- {
134107
- this.ShowMinuteChartTooltip(null, null, chartTooltipData);
134108
- }
134109
- else
134110
- {
134111
- this.HideMinuteChartTooltip();
134112
- }
133982
+ if (!bShowKLineTooltip) this.HideKLineChartTooltip();
133983
+ if (!bShowMinuteTooltip) this.HideMinuteChartTooltip();
133984
+
133985
+ if (bShowMinuteTooltip) this.ShowMinuteChartTooltip(null, null, chartTooltipData);
133986
+ if (bShowKLineTooltip) this.ShowKLineChartTooltip(null, null, chartTooltipData);
133987
+
134113
133988
  }
134114
133989
 
134115
133990
  this.UIOnMounseOut=function(e)
134116
133991
  {
134117
- this.HideMinuteChartTooltip();
134118
- this.HideFloatTooltip();
133992
+ this.HideAllTooltip();
134119
133993
 
134120
133994
  var bDraw=false;
134121
133995
  var tabChart=this.GetTabChart();
@@ -134141,8 +134015,7 @@ function JSReportChartContainer(uielement)
134141
134015
 
134142
134016
  this.UIOnMouseleave=function(e)
134143
134017
  {
134144
- this.HideMinuteChartTooltip();
134145
- this.HideFloatTooltip();
134018
+ this.HideAllTooltip();
134146
134019
 
134147
134020
  var tabChart=this.GetTabChart();
134148
134021
  if (tabChart && tabChart.MoveOnTabIndex>=0)
@@ -134368,7 +134241,7 @@ function JSReportChartContainer(uielement)
134368
134241
  document.onmouseup=null;
134369
134242
 
134370
134243
  this.StopAutoDragScrollTimer();
134371
- this.HideTooltip();
134244
+ this.HideAllTooltip();
134372
134245
  var reportChart=this.GetReportChart();
134373
134246
 
134374
134247
  var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
@@ -136760,7 +136633,8 @@ function ChartReport()
136760
136633
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
136761
136634
  if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
136762
136635
  if (item.Icon) colItem.Icon=item.Icon;
136763
- if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
136636
+ if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.ChartTooltip={ Enable:item.EnableChartTooltip, Type:20 };
136637
+ if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type };
136764
136638
 
136765
136639
  //点击表头弹出菜单
136766
136640
  if (IFrameSplitOperator.IsBool(item.EnablePopupHeaderMenu)) colItem.EnablePopupHeaderMenu=item.EnablePopupHeaderMenu;
@@ -138329,9 +138203,9 @@ function ChartReport()
138329
138203
  var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
138330
138204
  this.TooltipRect.push(tooltipData);
138331
138205
  }
138332
- else if (column.EnableChartTooltip)
138206
+ else if (column.ChartTooltip && column.ChartTooltip.Enable && IFrameSplitOperator.IsNumber(column.ChartTooltip.Type)) //Type 20分时图 21K线图
138333
138207
  {
138334
- var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:20 };
138208
+ var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:column.ChartTooltip.Type };
138335
138209
  this.TooltipRect.push(tooltipData);
138336
138210
  }
138337
138211
 
@@ -144646,7 +144520,7 @@ function ScrollBarBGChart()
144646
144520
 
144647
144521
 
144648
144522
 
144649
- var HQCHART_VERSION="1.1.14522";
144523
+ var HQCHART_VERSION="1.1.14536";
144650
144524
 
144651
144525
  function PrintHQChartVersion()
144652
144526
  {