hqchart 1.1.15258 → 1.1.15292

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.
@@ -3349,6 +3349,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3349
3349
  this.IsPress=false; //是否长按
3350
3350
  this.IsPressKeyboard=false; //是否键盘按键
3351
3351
  this.PressKeyboardConfig={ PauseUpdate:false, }; //按键以后 是否涨停数据更新
3352
+ this.DrawStatusData={ LatestTime:{ Draw:null, DrawDynamicInfo:null } };
3352
3353
 
3353
3354
  this.NetworkFilter; //网络请求回调 function(data, callback);
3354
3355
  this.LastMouseStatus={ MouseOnToolbar:null }; // MouseOnToolbar={ Rect:{}, Title: }
@@ -3554,6 +3555,24 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3554
3555
  return unit;
3555
3556
  }
3556
3557
 
3558
+ this.ClearDrawStatusData=function()
3559
+ {
3560
+ this.DrawStatusData.LatestTime.Draw=null;
3561
+ this.DrawStatusData.LatestTime.DrawDynamicInfo=null;
3562
+ }
3563
+
3564
+ this.UpdateDrawStatusData=function(funName)
3565
+ {
3566
+ if (funName=="Draw")
3567
+ {
3568
+ this.DrawStatusData.LatestTime.Draw=new Date();
3569
+ }
3570
+ else if (funName=="DrawDynamicInfo")
3571
+ {
3572
+ this.DrawStatusData.LatestTime.DrawDynamicInfo=new Date();
3573
+ }
3574
+ }
3575
+
3557
3576
  this.ClearStockCache=function()
3558
3577
  {
3559
3578
  this.StockCache.Data=null;
@@ -6866,6 +6885,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6866
6885
  ++this.TouchDrawCount;
6867
6886
 
6868
6887
  this.UpdateCorssCursorStatus();
6888
+ this.UpdateDrawStatusData("Draw");
6869
6889
  }
6870
6890
 
6871
6891
  this.DrawExtendChartPaint=function(level, option)
@@ -7094,7 +7114,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7094
7114
  IsOnTouch:this.IsOnTouch,
7095
7115
  CorssCursorTouchEnd:this.CorssCursorTouchEnd,
7096
7116
  IsTitleShowLatestData:this.IsTitleShowLatestData,
7097
- IsMinuteChart:(this.ClassName=="MinuteChartContainer" || this.ClassName=="MinuteChartHScreenContainer") ? true:false
7117
+ IsMinuteChart:(this.ClassName=="MinuteChartContainer" || this.ClassName=="MinuteChartHScreenContainer") ? true:false,
7118
+ DrawStatusData:this.DrawStatusData,
7098
7119
  };
7099
7120
 
7100
7121
  status.FrameID=this.Frame.PtInFrame(this.LastPoint.X, this.LastPoint.Y);
@@ -7389,6 +7410,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7389
7410
  ++this.TouchDrawCount;
7390
7411
 
7391
7412
  this.UpdateCorssCursorStatus();
7413
+ this.UpdateDrawStatusData("DrawDynamicInfo");
7414
+
7392
7415
  }
7393
7416
 
7394
7417
  this.DrawAnimation=function() //绘制动画 如弹幕
@@ -39620,6 +39643,294 @@ function ChartSingleText()
39620
39643
  }
39621
39644
  }
39622
39645
 
39646
+ function ChartDrawText_Fix()
39647
+ {
39648
+ this.newMethod=IChartPainting; //派生
39649
+ this.newMethod();
39650
+ delete this.newMethod;
39651
+
39652
+ this.ClassName='ChartDrawText_Fix'; //类名
39653
+
39654
+ this.Color="rgb(255,193,37)"; //字颜色
39655
+ this.TextFont=g_JSChartResource.DRAWTEXT_FIX.Font;
39656
+ this.PtPercentage=null; //{ X:, Y: } 百分比坐标
39657
+ this.TextBaseline="top";
39658
+ this.TextAlign='center';
39659
+ this.ShowOffset={ X:0, Y:0 }; //显示偏移
39660
+ this.MapCache;
39661
+ this.HQChart;
39662
+ this.AryText;
39663
+
39664
+ this.BuildCacheData=function(kData, data)
39665
+ {
39666
+ var mapData=new Map();
39667
+ this.MapCache=mapData;
39668
+ if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return;
39669
+ if (!data || !IFrameSplitOperator.IsNonEmptyArray(data.Value) || !IFrameSplitOperator.IsNonEmptyArray(data.Text)) return;
39670
+
39671
+ for(var i=0;i<kData.Data.length;++i)
39672
+ {
39673
+ var value=data.Value[i];
39674
+ if (value!==1) continue;
39675
+
39676
+ var text=data.Text[i];
39677
+ if (!text) continue;
39678
+
39679
+ var kItem=kData.Data[i];
39680
+ var item={ Value:value, Text:text, Date:kItem.Date, Time:kItem.Time };
39681
+ var key=this.BuildKey(item);
39682
+
39683
+ /* //测试
39684
+ item.Text=
39685
+ [
39686
+ { Name:`日期`, Text:`${item.Date}`, Margin:{ Bottom:10 }},
39687
+ { Name:`日期2`, Text:`${item.Date}-2`},
39688
+ ]
39689
+ */
39690
+
39691
+ mapData.set(key,item);
39692
+ }
39693
+ }
39694
+
39695
+ this.ReloadResource=function(resource)
39696
+ {
39697
+ this.TextFont=g_JSChartResource.DRAWTEXT_FIX.Font;
39698
+ }
39699
+
39700
+ this.Draw=function()
39701
+ {
39702
+ this.AryText=null;
39703
+ if (!this.IsShow || this.ChartFrame.IsMinSize) return;
39704
+ if (this.IsShowIndexTitleOnly()) return;
39705
+ if (this.IsHideScriptIndex()) return;
39706
+ if (!this.MapCache || this.MapCache.size<=0) return;
39707
+ if (!this.PtPercentage || !IFrameSplitOperator.IsNumber(this.PtPercentage.X) || !IFrameSplitOperator.IsNumber(this.PtPercentage.Y)) return;
39708
+ if (!this.IsDrawText()) return;
39709
+
39710
+ var bHScreen=(this.ChartFrame.IsHScreen===true)
39711
+ this.Canvas.save();
39712
+ this.ClipClient(bHScreen);
39713
+
39714
+ this.DrawText();
39715
+
39716
+ this.Canvas.restore();
39717
+ this.AryText=null;
39718
+ }
39719
+
39720
+ //当前屏是否要绘制文字
39721
+ this.IsDrawText=function()
39722
+ {
39723
+ if (!this.HQChart) return false;
39724
+ var kData=this.HQChart.GetKData();
39725
+ if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false;
39726
+
39727
+ var bHScreen=(this.ChartFrame.IsHScreen===true)
39728
+ var dataWidth=this.ChartFrame.DataWidth;
39729
+ var distanceWidth=this.ChartFrame.DistanceWidth;
39730
+ var xPointCount=this.ChartFrame.XPointCount;
39731
+ var xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
39732
+ var chartright=this.ChartBorder.GetRight();
39733
+ var top=this.ChartBorder.GetTopEx();
39734
+ var bottom=this.ChartBorder.GetBottomEx();
39735
+
39736
+ if (bHScreen)
39737
+ {
39738
+ chartright=this.ChartBorder.GetBottom();
39739
+ top=this.ChartBorder.GetRightEx();
39740
+ bottom=this.ChartBorder.GetLeftEx();
39741
+ xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
39742
+ }
39743
+
39744
+ for(var i=kData.DataOffset,j=0;i<kData.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
39745
+ {
39746
+ var kItem=kData.Data[i];
39747
+ if (kItem==null) continue;
39748
+
39749
+ var key=this.BuildKey(kItem);
39750
+ if (!this.MapCache.has(key)) continue;
39751
+
39752
+ var item=this.MapCache.get(key);
39753
+ if (Array.isArray(item.Text)) this.AryText=item.Text;
39754
+ else this.AryText=[{ Name:item.Text }];
39755
+ return true;
39756
+ }
39757
+
39758
+ return false;
39759
+ }
39760
+
39761
+ this.DrawText=function()
39762
+ {
39763
+ var bHScreen=(this.ChartFrame.IsHScreen===true);
39764
+ if (bHScreen)
39765
+ {
39766
+ var x=this.ChartBorder.GetRightEx()-this.ChartBorder.GetWidthEx()*this.PtPercentage.Y;
39767
+ var y=this.ChartBorder.GetTop()+this.ChartBorder.GetHeight()*this.PtPercentage.X;
39768
+ }
39769
+ else
39770
+ {
39771
+ var x=this.ChartBorder.GetLeft()+this.ChartBorder.GetWidth()*this.PtPercentage.X;
39772
+ var y=this.ChartBorder.GetTopEx()+this.ChartBorder.GetHeightEx()*this.PtPercentage.Y;
39773
+ }
39774
+
39775
+ var drawInfo=this.CalculateComplexTextSize(this.AryText, { Font:this.TextFont, Color:this.Color });
39776
+ if (!drawInfo) return;
39777
+
39778
+ drawInfo.IsHScreen=bHScreen;
39779
+
39780
+ if (bHScreen)
39781
+ {
39782
+ if (this.TextBaseline=="middle") x=x-drawInfo.Height/2; //上下居中
39783
+ else if (this.TextBaseline=="bottom") x=x-drawInfo.Height; //底部
39784
+
39785
+ if (this.TextAlign=="center") y=y-drawInfo.Width/2; //左右居中
39786
+ else if (this.TextAlign=='right') y=y-drawInfo.Width; //右对齐
39787
+
39788
+ this.DrawComplexText(x,y, drawInfo);
39789
+ }
39790
+ else
39791
+ {
39792
+ if (this.TextBaseline=="middle") y=y-drawInfo.Height/2; //上下居中
39793
+ else if (this.TextBaseline=="bottom") y=y-drawInfo.Height; //底部
39794
+
39795
+ if (this.TextAlign=="center") x=x-drawInfo.Width/2; //左右居中
39796
+ else if (this.TextAlign=='right') x=x-drawInfo.Width; //右对齐
39797
+
39798
+ this.DrawComplexText(x,y, drawInfo);
39799
+ }
39800
+ }
39801
+
39802
+ this.DrawComplexText=function(x, y, drawInfo)
39803
+ {
39804
+ var left=x;
39805
+ var lineTop=y;
39806
+ if (drawInfo.IsHScreen)
39807
+ {
39808
+ left=0;
39809
+ lineTop=0;
39810
+ this.Canvas.save();
39811
+ this.Canvas.translate(x, y);
39812
+ this.Canvas.rotate(90 * Math.PI / 180);
39813
+ }
39814
+
39815
+ this.Canvas.textBaseline="bottom";
39816
+ this.Canvas.textAlign="left";
39817
+ for(var i=0;i<drawInfo.AryData.length;++i)
39818
+ {
39819
+ var item=drawInfo.AryData[i];
39820
+ var margin=item.Margin;
39821
+ var xText=left+margin.Left;
39822
+ var yText=lineTop+item.Height-margin.Bottom;
39823
+
39824
+ if (item.Name)
39825
+ {
39826
+ this.Canvas.font=item.Font;
39827
+ this.Canvas.fillStyle=item.NameColor;
39828
+ this.Canvas.fillText(item.Name,xText,yText);
39829
+ xText+=item.NameWidth+item.Space;
39830
+ }
39831
+
39832
+ if (item.Text)
39833
+ {
39834
+ this.Canvas.font=item.Font;
39835
+ this.Canvas.fillStyle=item.TextColor;
39836
+ this.Canvas.fillText(item.Text,xText,yText);
39837
+ xText+=item.TextWidth;
39838
+ }
39839
+
39840
+ lineTop+=item.Height;
39841
+ }
39842
+
39843
+ if (drawInfo.IsHScreen) this.Canvas.restore();
39844
+ }
39845
+
39846
+ //计算复杂文本长度高度 defaultOption:{ Font:, }
39847
+ this.CalculateComplexTextSize=function(aryText, defaultOption)
39848
+ {
39849
+ if (!defaultOption) return null;
39850
+ if (!aryText || !IFrameSplitOperator.IsNonEmptyArray(aryText)) return null;
39851
+
39852
+ this.Canvas.font=defaultOption.Font;
39853
+ var lineHeight=this.Canvas.measureText("擎").width;
39854
+ var maxNameWidth=0, maxTextWidth=0;
39855
+ var result={ AryData:[], Width:0, Height:0 }
39856
+ for(var i=0;i<aryText.length;++i)
39857
+ {
39858
+ var item=aryText[i];
39859
+ var newItem={ NameWidth:0, TextWidth:0, Margin:{ Left:0, Top:0, Right:0, Bottom:0 }, Font:defaultOption.Font, Space:0, YOffset:0, Width:0, Height:0 };
39860
+ if (item.Name)
39861
+ {
39862
+ newItem.NameWidth=this.Canvas.measureText(item.Name).width;
39863
+ newItem.Name=item.Name;
39864
+ if (maxNameWidth<item.NameWidth) maxNameWidth=newItem.NameWidth;
39865
+ if (IFrameSplitOperator.IsNumber(item.Space)) newItem.Space=item.Space;
39866
+ if (item.NameColor) newItem.NameColor=item.NameColor;
39867
+ else newItem.NameColor=defaultOption.Color;
39868
+ }
39869
+
39870
+ if (item.Text)
39871
+ {
39872
+ newItem.TextWidth=this.Canvas.measureText(item.Text).width;
39873
+ newItem.Text=item.Text;
39874
+ if (maxTextWidth<item.TextWidth) maxTextWidth=newItem.TextWidth;
39875
+ if (item.TextColor) newItem.TextColor=item.TextColor;
39876
+ else newItem.TextColor=defaultOption.Color;
39877
+ }
39878
+
39879
+
39880
+ CopyMarginConfig(newItem.Margin, item.Margin);
39881
+
39882
+ if (IFrameSplitOperator.IsNumber(item.YOffset)) newItem.YOffset=item.YOffset;
39883
+
39884
+ newItem.Width=newItem.NameWidth+newItem.TextWidth;
39885
+ newItem.Width+=newItem.Margin.Left+newItem.Margin.Right+newItem.Space;
39886
+ newItem.Height=(lineHeight+newItem.Margin.Top+newItem.Margin.Bottom);
39887
+
39888
+ result.AryData.push(newItem);
39889
+ result.Height+=newItem.Height;
39890
+ if (result.Width<newItem.Width) result.Width=newItem.Width;
39891
+ }
39892
+
39893
+ return result;
39894
+ }
39895
+
39896
+ }
39897
+
39898
+ function ChartDrawNumber_Fix()
39899
+ {
39900
+ this.newMethod=ChartDrawText_Fix; //派生
39901
+ this.newMethod();
39902
+ delete this.newMethod;
39903
+
39904
+ this.ClassName='ChartDrawNumber_Fix'; //类名
39905
+ this.TextFont=g_JSChartResource.DRAWNUMBER_FIX.Font;
39906
+
39907
+ this.BuildCacheData=function(kData, data)
39908
+ {
39909
+ var mapData=new Map();
39910
+ this.MapCache=mapData;
39911
+ if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return;
39912
+ if (!data || !IFrameSplitOperator.IsNonEmptyArray(data.Value) || !IFrameSplitOperator.IsNonEmptyArray(data.Text)) return;
39913
+
39914
+ for(var i=0;i<kData.Data.length;++i)
39915
+ {
39916
+ var value=data.Value[i];
39917
+ var text=data.Text[i];
39918
+ if (!text) continue;
39919
+
39920
+ var kItem=kData.Data[i];
39921
+ var item={ Value:value, Text:text, Date:kItem.Date, Time:kItem.Time };
39922
+ var key=this.BuildKey(item);
39923
+
39924
+ mapData.set(key,item);
39925
+ }
39926
+ }
39927
+
39928
+ this.ReloadResource=function(resource)
39929
+ {
39930
+ this.TextFont=g_JSChartResource.DRAWNUMBER_FIX.Font;
39931
+ }
39932
+ }
39933
+
39623
39934
 
39624
39935
  function ChartTradeIcon()
39625
39936
  {
@@ -39755,7 +40066,8 @@ function ChartDrawText()
39755
40066
 
39756
40067
  this.ClassName='ChartDrawText'; //类名
39757
40068
  this.Color="rgb(255,193,37)"; //线段颜色
39758
- this.TextFont="14px 微软雅黑"; //线段宽度
40069
+ this.Font; //固定字体
40070
+ this.TextFont="14px 微软雅黑"; //输出使用的字体
39759
40071
  this.TextBaseline="middle";
39760
40072
  this.TextAlign='left';
39761
40073
  this.Text
@@ -39786,6 +40098,12 @@ function ChartDrawText()
39786
40098
  }
39787
40099
  }
39788
40100
 
40101
+ this.GetMaxMin=function()
40102
+ {
40103
+ var range={ Min:null, Max:null };
40104
+ return range;
40105
+ }
40106
+
39789
40107
  this.Draw=function()
39790
40108
  {
39791
40109
  if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
@@ -39824,8 +40142,9 @@ function ChartDrawText()
39824
40142
  var isArrayText=Array.isArray(this.Text);
39825
40143
  var drawTextInfo={ Text:{ Color:this.Color, Align:this.TextAlign, Baseline:this.TextBaseline }, Font:{ } };
39826
40144
 
39827
-
39828
- if (this.FixedFontSize>0) //固定字体大小模式
40145
+ if (this.Font)
40146
+ this.TextFont=this.Font;
40147
+ else if (this.FixedFontSize>0) //固定字体大小模式
39829
40148
  this.TextFont=`${this.FixedFontSize}px ${this.TextSize.FontName}`;
39830
40149
  else //动态字体大小
39831
40150
  this.TextFont=this.GetDynamicFont(dataWidth,distanceWidth,this.TextSize.Max,this.TextSize.Min,this.TextSize.Zoom,this.TextSize.FontName);
@@ -48675,6 +48994,7 @@ function KLineTooltipPaint()
48675
48994
  this.ExtendLineWidth=2;
48676
48995
 
48677
48996
  this.Font=[g_JSChartResource.TooltipPaint.TitleFont];
48997
+
48678
48998
 
48679
48999
  this.HQChart;
48680
49000
  this.KLineTitlePaint;
@@ -48794,6 +49114,8 @@ function KLineTooltipPaint()
48794
49114
  lineWidth+=textWidth;
48795
49115
  }
48796
49116
 
49117
+ if (IFrameSplitOperator.IsNumber(item.Space)) lineWidth+=item.Space;
49118
+
48797
49119
  if (maxLineWidth<lineWidth) maxLineWidth=lineWidth;
48798
49120
 
48799
49121
  height+=this.LineHeight;
@@ -48985,20 +49307,33 @@ function KLineTooltipPaint()
48985
49307
  {
48986
49308
  var item=titleData.AryText[i];
48987
49309
 
49310
+ var titleWidth=0;
48988
49311
  if (item.Title)
48989
49312
  {
48990
49313
  this.Canvas.textAlign="left";
48991
49314
  this.Canvas.fillStyle=item.TitleColor;
48992
49315
  this.Canvas.fillText(item.Title,left,top);
49316
+ var titleWidth=this.Canvas.measureText(item.Title).width+2;
48993
49317
  }
48994
49318
 
48995
49319
  if (item.Text)
48996
49320
  {
48997
- this.Canvas.textAlign="right";
48998
- this.Canvas.fillStyle=item.Color;
48999
- this.Canvas.fillText(item.Text,right,top);
49321
+ if (item.TextAlign==1) //1=左对齐 0=右对齐
49322
+ {
49323
+ var yText=left+titleWidth+2;
49324
+ if (IFrameSplitOperator.IsNumber(item.Space)) yText+=item.Space; //标题和数据内容间距
49325
+ this.Canvas.textAlign="left";
49326
+ this.Canvas.fillStyle=item.Color;
49327
+ this.Canvas.fillText(item.Text,yText,top);
49328
+ }
49329
+ else
49330
+ {
49331
+ this.Canvas.textAlign="right";
49332
+ this.Canvas.fillStyle=item.Color;
49333
+ this.Canvas.fillText(item.Text,right,top);
49334
+ }
49000
49335
  }
49001
-
49336
+
49002
49337
  top+=this.LineHeight+this.LineSpace;
49003
49338
  }
49004
49339
 
@@ -53166,6 +53501,8 @@ function LatestPointFlashPaint()
53166
53501
  this.ClassName='LatestPointFlashPaint';
53167
53502
  this.HQChart;
53168
53503
 
53504
+ this.FlashType=0; //0=数据更新了闪烁, 1=一直显示
53505
+ //闪烁
53169
53506
  this.Status=0;
53170
53507
  this.UpdateTime=new Date();
53171
53508
  this.FlashCount=0; //闪烁次数
@@ -53190,6 +53527,7 @@ function LatestPointFlashPaint()
53190
53527
  if (option)
53191
53528
  {
53192
53529
  if (IFrameSplitOperator.IsNumber(option.Frequency)) this.Frequency=option.Frequency;
53530
+ if (IFrameSplitOperator.IsNumber(option.FlashType)) this.FlashType=option.FlashType;
53193
53531
  }
53194
53532
  }
53195
53533
 
@@ -53224,18 +53562,32 @@ function LatestPointFlashPaint()
53224
53562
  if (!this.HQChart) return;
53225
53563
  this.HQChart.ClearCanvas(this.FlashCanvas);
53226
53564
 
53227
- if (this.FlashCount<=0) return;
53228
- if (this.IsStatusChange())
53565
+ if (this.FlashType===1)
53229
53566
  {
53230
- this.Status=(this.Status+1)%2;
53231
- --this.FlashCount;
53567
+
53568
+ }
53569
+ else
53570
+ {
53571
+ if (this.FlashCount<=0) return;
53572
+ if (this.IsStatusChange())
53573
+ {
53574
+ this.Status=(this.Status+1)%2;
53575
+ --this.FlashCount;
53576
+ }
53577
+ if (this.Status==0) return;
53232
53578
  }
53579
+
53580
+
53233
53581
 
53234
- if (this.Status==0) return;
53235
53582
  if (!this.HQChart.GlobalOption || !this.HQChart.GlobalOption.LatestPoint) return;
53236
53583
  var point=this.HQChart.GlobalOption.LatestPoint;
53237
53584
  if (!IFrameSplitOperator.IsNumber(point.X) || !IFrameSplitOperator.IsNumber(point.Y)) return;
53238
53585
 
53586
+ this.DrawPoint(point);
53587
+ }
53588
+
53589
+ this.DrawPoint=function(point)
53590
+ {
53239
53591
  if (this.Style==1) this.GetChartColor();
53240
53592
 
53241
53593
  this.FlashCanvas.fillStyle=this.BGColor;
@@ -78369,7 +78721,7 @@ function JSChartResource()
78369
78721
  //虚线配置
78370
78722
  this.DOTLINE=
78371
78723
  {
78372
- LineDash:[3,5] //虚线配置
78724
+ LineDash:[2*GetDevicePixelRatio(),2*GetDevicePixelRatio()] //虚线配置
78373
78725
  }
78374
78726
 
78375
78727
  this.DRAWSL=
@@ -85625,7 +85977,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
85625
85977
  this.ClearCustomKLine();
85626
85978
  this.ClearKLineCaluate();
85627
85979
  this.UnlockCorssCursor();
85628
-
85980
+ this.ClearDrawStatusData();
85629
85981
 
85630
85982
  var kLineDrawType=this.GetKLineDrawType();
85631
85983
  if (kLineDrawType==10 || kLineDrawType==11 || kLineDrawType==12 || kLineDrawType==16) isDataTypeChange=true;
@@ -87030,7 +87382,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
87030
87382
  this.UnlockCorssCursor();
87031
87383
  this.Frame.ClearYCoordinateMaxMin();
87032
87384
  this.ClosePopMinuteChart();
87033
-
87385
+ this.ClearDrawStatusData();
87034
87386
 
87035
87387
  this.Symbol=symbol;
87036
87388
  if (!symbol)
@@ -93644,6 +93996,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93644
93996
  this.ClearStockCache();
93645
93997
  this.UnlockCorssCursor();
93646
93998
  this.Frame.ClearYCoordinateMaxMin();
93999
+ this.ClearDrawStatusData();
93647
94000
 
93648
94001
 
93649
94002
  if (option)
@@ -93812,6 +94165,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
93812
94165
  this.ClearStockCache();
93813
94166
  this.UnlockCorssCursor();
93814
94167
  this.Frame.ClearYCoordinateMaxMin();
94168
+ this.ClearDrawStatusData();
93815
94169
 
93816
94170
  if (option && option.PageInfo)
93817
94171
  {
@@ -110,7 +110,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
110
110
  'DRAWTEXT':FUNCTION_NAME,'STICKLINE':FUNCTION_NAME,'DRAWBAND':FUNCTION_NAME,'DRAWKLINE':FUNCTION_NAME,
111
111
  'PLOYLINE':FUNCTION_NAME,'POLYLINE':FUNCTION_NAME,'DRAWNUMBER':FUNCTION_NAME,'DRAWICON':FUNCTION_NAME,'SUPERDRAWTEXT':FUNCTION_NAME,
112
112
  "DRAWTEXTREL":FUNCTION_NAME,"DRAWTEXTABS":FUNCTION_NAME,"DRAWGBK":FUNCTION_NAME,"FILLRGN":FUNCTION_NAME,"FLOATRGN":FUNCTION_NAME,
113
- "HORLINE":FUNCTION_NAME,
113
+ "HORLINE":FUNCTION_NAME,"DRAWNUMBER_FIX":FUNCTION_NAME,"DRAWTEXT_FIX":FUNCTION_NAME,
114
114
 
115
115
 
116
116
  //个股行情数据
@@ -122,6 +122,7 @@ HQData.NetworkFilter=function(data, callback)
122
122
  break;
123
123
 
124
124
  case "JSSymbolData::GetFinance": //财务数据
125
+ //HQChart使用教程30-K线图如何对接第3方数据23- FINANCE函数数据
125
126
  HQData.Finance_RequestData(data,callback);
126
127
  break;
127
128
 
@@ -145,6 +146,7 @@ HQData.NetworkFilter=function(data, callback)
145
146
  HQData.BKJYOne_RequestData(data,callback);
146
147
  break;
147
148
  case "JSSymbolData::GetFinValue":
149
+ //HQChart使用教程30-K线图如何对接第3方数据22- FINVALUE函数数据
148
150
  HQData.FinValue_RequestData(data,callback);
149
151
  break;
150
152
  case "JSSymbolData::GetFinOne":
@@ -152,9 +154,15 @@ HQData.NetworkFilter=function(data, callback)
152
154
  break;
153
155
 
154
156
  case "JSSymbolData::GetIndexData":
157
+ //HQChart使用教程30-K线图如何对接第3方数据28-大盘数据[INDEXA,INDEXC......]
155
158
  HQData.INDEX_RequestData(data,callback);
156
159
  break;
157
160
 
161
+ case 'JSSymbolData::GetSymbolData':
162
+ //HQChart使用教程30-K线图如何对接第3方数据38-通达信指标K线数据
163
+ HQData.RequestSymbolData(data,callback); //计算指标需要的K线数据
164
+ break;
165
+
158
166
  //////////////////////////////////////////////////////
159
167
  //报价列表数据
160
168
  case "JSReportChartContainer::RequestStockListData":
@@ -1802,6 +1810,20 @@ HQData.INDEX_RequestData=function(data,callback)
1802
1810
  callback(hqchartData);
1803
1811
  }
1804
1812
 
1813
+ HQData.RequestSymbolData=function(data,callback)
1814
+ {
1815
+ data.PreventDefault=true;
1816
+ var symbol=data.Request.Data.symbol;
1817
+ var period=data.Request.Data.period;
1818
+ //if (this.Chart.JSChartContainer.Symbol==symbol)
1819
+ {
1820
+ if (ChartData.IsDayPeriod(period, true))
1821
+ HQData.RequestHistoryData(data, callback);
1822
+ else if (ChartData.IsMinutePeriod(peirod, true))
1823
+ HQData.RequestHistoryMinuteData(data, callback);
1824
+ }
1825
+ }
1826
+
1805
1827
  //////////////////////////////////////////////////////////////////////////////////////
1806
1828
  // 报价列表
1807
1829
  //