hqchart 1.1.15480 → 1.1.15494

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.
@@ -1711,6 +1711,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1711
1711
  {
1712
1712
  var item=option.Frame[i];
1713
1713
  if (!chart.Frame.SubFrame[i]) continue;
1714
+ chart.SetSubFrameAttribute(chart.Frame.SubFrame[i], null, item);
1715
+ /*
1714
1716
  if (item.SplitCount) chart.Frame.SubFrame[i].Frame.YSplitOperator.SplitCount=item.SplitCount;
1715
1717
  if (item.StringFormat) chart.Frame.SubFrame[i].Frame.YSplitOperator.StringFormat=item.StringFormat;
1716
1718
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) chart.Frame.SubFrame[i].Frame.YSplitOperator.FloatPrecision=item.FloatPrecision;
@@ -1720,6 +1722,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1720
1722
 
1721
1723
  if (item.IsShowLeftText==false) chart.Frame.SubFrame[i].Frame.YSplitOperator.IsShowLeftText=item.IsShowLeftText; //显示左边刻度
1722
1724
  if (item.IsShowRightText==false) chart.Frame.SubFrame[i].Frame.YSplitOperator.IsShowRightText=item.IsShowRightText; //显示右边刻度
1725
+ */
1723
1726
  }
1724
1727
  }
1725
1728
 
@@ -1734,9 +1737,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1734
1737
 
1735
1738
  if(option.KLineTitle) //股票名称 日期 周期
1736
1739
  {
1737
- if(option.KLineTitle.IsShowName==false) chart.TitlePaint[0].IsShowName=false;
1738
- if(option.KLineTitle.IsShowSettingInfo==false) chart.TitlePaint[0].IsShowSettingInfo=false;
1739
- if(option.KLineTitle.IsShow == false) chart.TitlePaint[0].IsShow = false;
1740
+ var item=option.KLineTitle;
1741
+ var chartTitle=chart.TitlePaint[0];
1742
+ if (IFrameSplitOperator.IsBool(item.IsShowName)) chartTitle.IsShowName=item.IsShowName;
1743
+ if (IFrameSplitOperator.IsBool(item.IsShowSettingInfo)) chartTitle.IsShowSettingInfo=item.IsShowSettingInfo;
1744
+ if (IFrameSplitOperator.IsBool(item.IsShow)) chartTitle.IsShow=item.IsShow;
1745
+ if (IFrameSplitOperator.IsBool(item.IsShowDateTime)) chartTitle.IsShowDateTime=item.IsShowDateTime;
1746
+ if (IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
1740
1747
  }
1741
1748
 
1742
1749
  if (IFrameSplitOperator.IsNonEmptyArray(option.Overlay)) //叠加股票
@@ -39482,6 +39489,125 @@ function ChartText()
39482
39489
  }
39483
39490
  }
39484
39491
 
39492
+ function ChartDrawIconV2()
39493
+ {
39494
+ this.newMethod=IChartPainting; //派生
39495
+ this.newMethod();
39496
+ delete this.newMethod;
39497
+
39498
+ this.ClassName="ChartDrawIconV2";
39499
+ this.bHScreen=false; //是否横屏
39500
+ this.Icon=null;
39501
+ this.TextAlign='left';
39502
+ this.Direction=0; //0=middle 1=bottom 2=top
39503
+ this.ShowOffset={ X:0, Y:0 }; //显示偏移
39504
+ this.Size=null;
39505
+
39506
+ this.Draw=function()
39507
+ {
39508
+ if (!this.IsShow || this.ChartFrame.IsMinSize) return;
39509
+ if (this.IsShowIndexTitleOnly()) return;
39510
+ if (this.IsHideScriptIndex()) return;
39511
+
39512
+ if (!this.Data || !this.Data.Data) return;
39513
+ if (!this.Icon) return;
39514
+
39515
+ this.bHScreen=(this.ChartFrame.IsHScreen===true);
39516
+ var xPointCount=this.ChartFrame.XPointCount;
39517
+ var bMinute=this.IsMinuteFrame();
39518
+ var dataWidth=this.ChartFrame.DataWidth;
39519
+ var distanceWidth=this.ChartFrame.DistanceWidth;
39520
+ var xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
39521
+ var chartright=this.ChartBorder.GetRight();
39522
+ var top=this.ChartBorder.GetTopEx();
39523
+ var bottom=this.ChartBorder.GetBottomEx();
39524
+
39525
+ if (this.bHScreen)
39526
+ {
39527
+ chartright=this.ChartBorder.GetBottom();
39528
+ top=this.ChartBorder.GetRightEx();
39529
+ bottom=this.ChartBorder.GetLeftEx();
39530
+ xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
39531
+ }
39532
+
39533
+ var pixelTatio = GetDevicePixelRatio();
39534
+ var iconWidth=this.Icon.Width*pixelTatio;
39535
+ var iconHeight=this.Icon.Height*pixelTatio;
39536
+ if (IFrameSplitOperator.IsNumber(this.Size)) iconWidth=iconHeight=this.Size*pixelTatio;
39537
+
39538
+
39539
+
39540
+ this.Canvas.save();
39541
+ this.ClipClient(this.ChartFrame.IsHScreen);
39542
+
39543
+ for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
39544
+ {
39545
+ var value=this.Data.Data[i];
39546
+ if (value==null) continue;
39547
+
39548
+ if (bMinute)
39549
+ {
39550
+ var x=this.ChartFrame.GetXFromIndex(j);
39551
+ }
39552
+ else
39553
+ {
39554
+ var left=xOffset;
39555
+ var right=xOffset+dataWidth;
39556
+ if (right>chartright) break;
39557
+ var x=left+(right-left)/2;
39558
+ }
39559
+
39560
+ var y=this.ChartFrame.GetYFromData(value,false);
39561
+
39562
+ if (x>chartright) break;
39563
+
39564
+ if (this.TextAlign=="right") x-=iconWidth;
39565
+ else if (this.TextAlign=="center") x-=iconWidth/2;
39566
+
39567
+ if (this.Direction===0) y-=iconHeight/2;
39568
+ else if (this.Direction===1) y-=iconHeight;
39569
+
39570
+
39571
+ y+=this.ShowOffset.Y;
39572
+ x+=this.ShowOffset.X;
39573
+
39574
+ var drawInfo={ X:x, Y:y, Image:this.Icon.Image, Width:iconWidth, Height:iconHeight };
39575
+
39576
+ this.DrawIcon(drawInfo);
39577
+ }
39578
+
39579
+
39580
+
39581
+ this.Canvas.restore();
39582
+
39583
+ }
39584
+
39585
+ this.DrawIcon=function(drawInfo)
39586
+ {
39587
+ if (!drawInfo || !drawInfo.Image) return;
39588
+
39589
+ if (this.bHScreen)
39590
+ {
39591
+ /*
39592
+ var xCenter=drawInfo.X+drawInfo.Width/2;
39593
+ var yCenter=drawInfo.Y+drawInfo.Height/2;
39594
+ this.Canvas.save();
39595
+ this.Canvas.translate(yCenter,xCenter);
39596
+ this.Canvas.rotate(90 * Math.PI / 180);
39597
+ this.Canvas.drawImage(drawInfo.Image, 0, 0, drawInfo.Width, drawInfo.Height);
39598
+ this.Canvas.restore();
39599
+ */
39600
+
39601
+ this.Canvas.drawImage(drawInfo.Image, drawInfo.Y, drawInfo.X, drawInfo.Width, drawInfo.Height);
39602
+ }
39603
+ else
39604
+ {
39605
+ this.Canvas.drawImage(drawInfo.Image, drawInfo.X, drawInfo.Y, drawInfo.Width, drawInfo.Height);
39606
+ }
39607
+ }
39608
+ }
39609
+
39610
+
39485
39611
  /*
39486
39612
  文字输出 支持横屏
39487
39613
  数组(Data)不为null的数据中输出 this.Text文本
@@ -103006,6 +103132,26 @@ var MARKET_SUFFIX_NAME=
103006
103132
  return false;
103007
103133
  },
103008
103134
 
103135
+ IsCFFEXOption:function(upperSymbol) //中金所股票期权
103136
+ {
103137
+ if (!upperSymbol) return false;
103138
+ if (!this.IsCFFEX(upperSymbol)) return false;
103139
+ var shortSymbol=JSChart.GetShortSymbol(upperSymbol);
103140
+ //MO2602-C-6300.cffex
103141
+ var aryValue=shortSymbol.split("-");
103142
+ if (!aryValue || aryValue.length!=3) return false;
103143
+
103144
+ var strValue=aryValue[0];
103145
+ const regex = /([a-zA-Z]+)(\d+)/;
103146
+ const match = strValue.match(regex);
103147
+ if (!match || !match[1] || !match[2]) return false;
103148
+
103149
+ var prefix=match[1];
103150
+ if (["IM","IO","MO","HO"].includes(prefix)) return true;
103151
+
103152
+ return true;
103153
+ },
103154
+
103009
103155
  IsDCE: function (upperSymbol)
103010
103156
  {
103011
103157
  if (!upperSymbol) return false;
@@ -103612,6 +103758,23 @@ var MARKET_SUFFIX_NAME=
103612
103758
  if (pos<=0) return symbol;
103613
103759
 
103614
103760
  return symbol.slice(0,pos);
103761
+ },
103762
+
103763
+ SplitSymbol:function(symbol, format) //分析代码 返回对象
103764
+ {
103765
+ if (!format || !symbol) return null;
103766
+ var shortSymbol=this.GetShortSymbol(symbol);
103767
+ if (format=="A+D+")
103768
+ {
103769
+ var regex=/([a-zA-Z]+)(\d+)/;
103770
+ var match=shortSymbol.match(regex);
103771
+ if (!match || !match[1] || !match[2]) return null;
103772
+
103773
+ return { AryString:[match[1], match[2]], ShortSymbol:shortSymbol, Symbol:symbol, Market:symbol.slice(shortSymbol.length) };
103774
+ }
103775
+
103776
+
103777
+ return null;
103615
103778
  }
103616
103779
 
103617
103780
  }
@@ -5807,6 +5807,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5807
5807
  {
5808
5808
  var item=option.Frame[i];
5809
5809
  if (!chart.Frame.SubFrame[i]) continue;
5810
+ chart.SetSubFrameAttribute(chart.Frame.SubFrame[i], null, item);
5811
+ /*
5810
5812
  if (item.SplitCount) chart.Frame.SubFrame[i].Frame.YSplitOperator.SplitCount=item.SplitCount;
5811
5813
  if (item.StringFormat) chart.Frame.SubFrame[i].Frame.YSplitOperator.StringFormat=item.StringFormat;
5812
5814
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) chart.Frame.SubFrame[i].Frame.YSplitOperator.FloatPrecision=item.FloatPrecision;
@@ -5816,6 +5818,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5816
5818
 
5817
5819
  if (item.IsShowLeftText==false) chart.Frame.SubFrame[i].Frame.YSplitOperator.IsShowLeftText=item.IsShowLeftText; //显示左边刻度
5818
5820
  if (item.IsShowRightText==false) chart.Frame.SubFrame[i].Frame.YSplitOperator.IsShowRightText=item.IsShowRightText; //显示右边刻度
5821
+ */
5819
5822
  }
5820
5823
  }
5821
5824
 
@@ -5830,9 +5833,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5830
5833
 
5831
5834
  if(option.KLineTitle) //股票名称 日期 周期
5832
5835
  {
5833
- if(option.KLineTitle.IsShowName==false) chart.TitlePaint[0].IsShowName=false;
5834
- if(option.KLineTitle.IsShowSettingInfo==false) chart.TitlePaint[0].IsShowSettingInfo=false;
5835
- if(option.KLineTitle.IsShow == false) chart.TitlePaint[0].IsShow = false;
5836
+ var item=option.KLineTitle;
5837
+ var chartTitle=chart.TitlePaint[0];
5838
+ if (IFrameSplitOperator.IsBool(item.IsShowName)) chartTitle.IsShowName=item.IsShowName;
5839
+ if (IFrameSplitOperator.IsBool(item.IsShowSettingInfo)) chartTitle.IsShowSettingInfo=item.IsShowSettingInfo;
5840
+ if (IFrameSplitOperator.IsBool(item.IsShow)) chartTitle.IsShow=item.IsShow;
5841
+ if (IFrameSplitOperator.IsBool(item.IsShowDateTime)) chartTitle.IsShowDateTime=item.IsShowDateTime;
5842
+ if (IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
5836
5843
  }
5837
5844
 
5838
5845
  if (IFrameSplitOperator.IsNonEmptyArray(option.Overlay)) //叠加股票
@@ -43578,6 +43585,125 @@ function ChartText()
43578
43585
  }
43579
43586
  }
43580
43587
 
43588
+ function ChartDrawIconV2()
43589
+ {
43590
+ this.newMethod=IChartPainting; //派生
43591
+ this.newMethod();
43592
+ delete this.newMethod;
43593
+
43594
+ this.ClassName="ChartDrawIconV2";
43595
+ this.bHScreen=false; //是否横屏
43596
+ this.Icon=null;
43597
+ this.TextAlign='left';
43598
+ this.Direction=0; //0=middle 1=bottom 2=top
43599
+ this.ShowOffset={ X:0, Y:0 }; //显示偏移
43600
+ this.Size=null;
43601
+
43602
+ this.Draw=function()
43603
+ {
43604
+ if (!this.IsShow || this.ChartFrame.IsMinSize) return;
43605
+ if (this.IsShowIndexTitleOnly()) return;
43606
+ if (this.IsHideScriptIndex()) return;
43607
+
43608
+ if (!this.Data || !this.Data.Data) return;
43609
+ if (!this.Icon) return;
43610
+
43611
+ this.bHScreen=(this.ChartFrame.IsHScreen===true);
43612
+ var xPointCount=this.ChartFrame.XPointCount;
43613
+ var bMinute=this.IsMinuteFrame();
43614
+ var dataWidth=this.ChartFrame.DataWidth;
43615
+ var distanceWidth=this.ChartFrame.DistanceWidth;
43616
+ var xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
43617
+ var chartright=this.ChartBorder.GetRight();
43618
+ var top=this.ChartBorder.GetTopEx();
43619
+ var bottom=this.ChartBorder.GetBottomEx();
43620
+
43621
+ if (this.bHScreen)
43622
+ {
43623
+ chartright=this.ChartBorder.GetBottom();
43624
+ top=this.ChartBorder.GetRightEx();
43625
+ bottom=this.ChartBorder.GetLeftEx();
43626
+ xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
43627
+ }
43628
+
43629
+ var pixelTatio = GetDevicePixelRatio();
43630
+ var iconWidth=this.Icon.Width*pixelTatio;
43631
+ var iconHeight=this.Icon.Height*pixelTatio;
43632
+ if (IFrameSplitOperator.IsNumber(this.Size)) iconWidth=iconHeight=this.Size*pixelTatio;
43633
+
43634
+
43635
+
43636
+ this.Canvas.save();
43637
+ this.ClipClient(this.ChartFrame.IsHScreen);
43638
+
43639
+ for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
43640
+ {
43641
+ var value=this.Data.Data[i];
43642
+ if (value==null) continue;
43643
+
43644
+ if (bMinute)
43645
+ {
43646
+ var x=this.ChartFrame.GetXFromIndex(j);
43647
+ }
43648
+ else
43649
+ {
43650
+ var left=xOffset;
43651
+ var right=xOffset+dataWidth;
43652
+ if (right>chartright) break;
43653
+ var x=left+(right-left)/2;
43654
+ }
43655
+
43656
+ var y=this.ChartFrame.GetYFromData(value,false);
43657
+
43658
+ if (x>chartright) break;
43659
+
43660
+ if (this.TextAlign=="right") x-=iconWidth;
43661
+ else if (this.TextAlign=="center") x-=iconWidth/2;
43662
+
43663
+ if (this.Direction===0) y-=iconHeight/2;
43664
+ else if (this.Direction===1) y-=iconHeight;
43665
+
43666
+
43667
+ y+=this.ShowOffset.Y;
43668
+ x+=this.ShowOffset.X;
43669
+
43670
+ var drawInfo={ X:x, Y:y, Image:this.Icon.Image, Width:iconWidth, Height:iconHeight };
43671
+
43672
+ this.DrawIcon(drawInfo);
43673
+ }
43674
+
43675
+
43676
+
43677
+ this.Canvas.restore();
43678
+
43679
+ }
43680
+
43681
+ this.DrawIcon=function(drawInfo)
43682
+ {
43683
+ if (!drawInfo || !drawInfo.Image) return;
43684
+
43685
+ if (this.bHScreen)
43686
+ {
43687
+ /*
43688
+ var xCenter=drawInfo.X+drawInfo.Width/2;
43689
+ var yCenter=drawInfo.Y+drawInfo.Height/2;
43690
+ this.Canvas.save();
43691
+ this.Canvas.translate(yCenter,xCenter);
43692
+ this.Canvas.rotate(90 * Math.PI / 180);
43693
+ this.Canvas.drawImage(drawInfo.Image, 0, 0, drawInfo.Width, drawInfo.Height);
43694
+ this.Canvas.restore();
43695
+ */
43696
+
43697
+ this.Canvas.drawImage(drawInfo.Image, drawInfo.Y, drawInfo.X, drawInfo.Width, drawInfo.Height);
43698
+ }
43699
+ else
43700
+ {
43701
+ this.Canvas.drawImage(drawInfo.Image, drawInfo.X, drawInfo.Y, drawInfo.Width, drawInfo.Height);
43702
+ }
43703
+ }
43704
+ }
43705
+
43706
+
43581
43707
  /*
43582
43708
  文字输出 支持横屏
43583
43709
  数组(Data)不为null的数据中输出 this.Text文本
@@ -107102,6 +107228,26 @@ var MARKET_SUFFIX_NAME=
107102
107228
  return false;
107103
107229
  },
107104
107230
 
107231
+ IsCFFEXOption:function(upperSymbol) //中金所股票期权
107232
+ {
107233
+ if (!upperSymbol) return false;
107234
+ if (!this.IsCFFEX(upperSymbol)) return false;
107235
+ var shortSymbol=JSChart.GetShortSymbol(upperSymbol);
107236
+ //MO2602-C-6300.cffex
107237
+ var aryValue=shortSymbol.split("-");
107238
+ if (!aryValue || aryValue.length!=3) return false;
107239
+
107240
+ var strValue=aryValue[0];
107241
+ const regex = /([a-zA-Z]+)(\d+)/;
107242
+ const match = strValue.match(regex);
107243
+ if (!match || !match[1] || !match[2]) return false;
107244
+
107245
+ var prefix=match[1];
107246
+ if (["IM","IO","MO","HO"].includes(prefix)) return true;
107247
+
107248
+ return true;
107249
+ },
107250
+
107105
107251
  IsDCE: function (upperSymbol)
107106
107252
  {
107107
107253
  if (!upperSymbol) return false;
@@ -107708,6 +107854,23 @@ var MARKET_SUFFIX_NAME=
107708
107854
  if (pos<=0) return symbol;
107709
107855
 
107710
107856
  return symbol.slice(0,pos);
107857
+ },
107858
+
107859
+ SplitSymbol:function(symbol, format) //分析代码 返回对象
107860
+ {
107861
+ if (!format || !symbol) return null;
107862
+ var shortSymbol=this.GetShortSymbol(symbol);
107863
+ if (format=="A+D+")
107864
+ {
107865
+ var regex=/([a-zA-Z]+)(\d+)/;
107866
+ var match=shortSymbol.match(regex);
107867
+ if (!match || !match[1] || !match[2]) return null;
107868
+
107869
+ return { AryString:[match[1], match[2]], ShortSymbol:shortSymbol, Symbol:symbol, Market:symbol.slice(shortSymbol.length) };
107870
+ }
107871
+
107872
+
107873
+ return null;
107711
107874
  }
107712
107875
 
107713
107876
  }
@@ -111608,6 +111771,7 @@ var g_JSComplierResource=
111608
111771
  Data:new Map() //自定义图标 key=id
111609
111772
  //value={ID:, Text:, Color, Family: } //svg
111610
111773
  //value={ ID:1, Symbol:'↑', Color:'rgb(238,44,44)' } //文字
111774
+ //value={ ID:, Image:, Width, Height }
111611
111775
  },
111612
111776
 
111613
111777
  CustomFunction: //定制函数
@@ -111655,20 +111819,24 @@ var g_JSComplierResource=
111655
111819
  GetDrawIcon:function(id)
111656
111820
  {
111657
111821
  var icon;
111658
- if (g_JSComplierResource.CustomDrawIcon.Data.has(id))
111822
+ if (this.CustomDrawIcon.Data.has(id))
111659
111823
  {
111660
111824
  const iconfont=g_JSComplierResource.CustomDrawIcon.Data.get(id);
111661
- if (iconfont.Symbol) //文字
111825
+
111826
+ if (iconfont.Image) //图片
111827
+ icon={ ID:id, Image:iconfont.Image, Width:iconfont.Width, Height:iconfont.Height };
111828
+ else if (iconfont.Symbol) //文字
111662
111829
  icon={ Symbol:iconfont.Symbol, Color:iconfont.Color, IconFont:false, ID:id };
111663
111830
  else //SVG图标
111664
111831
  icon={ Symbol:iconfont.Text, Color:iconfont.Color, Family:iconfont.Family, IconFont:true, ID:id };
111832
+
111665
111833
  return icon;
111666
111834
  }
111667
111835
 
111668
- if (g_JSComplierResource.DrawIcon.Data.has(id))
111836
+ if (this.DrawIcon.Data.has(id))
111669
111837
  {
111670
- const iconfont=g_JSComplierResource.DrawIcon.Data.get(id);
111671
- icon={ Symbol:iconfont.Text, Color:iconfont.Color, Family:g_JSComplierResource.DrawIcon.Family, IconFont:true, ID:id };
111838
+ const iconfont=this.DrawIcon.Data.get(id);
111839
+ icon={ Symbol:iconfont.Text, Color:iconfont.Color, Family:this.DrawIcon.Family, IconFont:true, ID:id };
111672
111840
  return icon;
111673
111841
  }
111674
111842
 
@@ -111710,6 +111878,11 @@ var g_JSComplierResource=
111710
111878
  {
111711
111879
  if (g_JSComplierResource.CustomDataFunction.Data.has(name)) return true;
111712
111880
  return false;
111881
+ },
111882
+
111883
+ AddDrawIcon:function(id, icon)
111884
+ {
111885
+ this.CustomDrawIcon.Data.set(id, icon);
111713
111886
  }
111714
111887
  }
111715
111888
 
@@ -132169,14 +132342,16 @@ JSComplier.SetDomain = function (domain, cacheDomain) //修改API地址
132169
132342
 
132170
132343
  JSComplier.AddIcon=function(obj) //添加一个obj={ID:, Text:, Color, Family: }
132171
132344
  {
132172
- g_JSComplierResource.CustomDrawIcon.Data.set(obj.ID, obj);
132345
+
132346
+ if (!obj || !obj.ID) return;
132347
+
132348
+ g_JSComplierResource.AddDrawIcon(obj.ID, obj);
132173
132349
  }
132174
132350
 
132175
132351
  JSComplier.AddFunction=function(obj) //添加函数 { Name:函数名, Description:描述信息, IsDownload:是否需要下载数据, Invoke:函数执行(可选) }
132176
132352
  {
132177
132353
  if (!obj || !obj.Name) return;
132178
132354
 
132179
- var ID=obj.Name.toUpperCase();
132180
132355
  g_JSComplierResource.CustomFunction.Data.set(ID, obj);
132181
132356
  }
132182
132357
 
@@ -133960,7 +134135,21 @@ function ScriptIndex(name,script,args,option)
133960
134135
  //创建图标
133961
134136
  this.CreateIcon=function(hqChart,windowIndex,varItem,id)
133962
134137
  {
133963
- let chartText=new ChartSingleText();
134138
+ var chartText=null;
134139
+
134140
+ if (varItem.Draw && varItem.Draw.Icon && varItem.Draw.Icon.Image)
134141
+ {
134142
+ chartText=new ChartDrawIconV2();
134143
+ chartText.Icon=varItem.Draw.Icon;
134144
+ if (varItem.DrawFontSize>0) chartText.Size=varItem.DrawFontSize;
134145
+ }
134146
+ else
134147
+ {
134148
+ chartText=new ChartSingleText();
134149
+ if (varItem.DrawFontSize>0) chartText.FixedFontSize=varItem.DrawFontSize;
134150
+ }
134151
+
134152
+
133964
134153
  chartText.Canvas=hqChart.Canvas;
133965
134154
  chartText.TextAlign='center';
133966
134155
 
@@ -133991,6 +134180,10 @@ function ScriptIndex(name,script,args,option)
133991
134180
  {
133992
134181
  chartText.IconFont={ Family:icon.Family, Text:icon.Symbol, Color:icon.Color };
133993
134182
  if (varItem.Color) chartText.IconFont.Color=this.GetColor(varItem.Color);
134183
+ }
134184
+ else if (icon.Image)
134185
+ {
134186
+
133994
134187
  }
133995
134188
  else
133996
134189
  {
@@ -134000,7 +134193,7 @@ function ScriptIndex(name,script,args,option)
134000
134193
  else chartText.Color='rgb(0,0,0)';
134001
134194
  }
134002
134195
 
134003
- if (varItem.DrawFontSize>0) chartText.FixedFontSize=varItem.DrawFontSize;
134196
+
134004
134197
  if (IFrameSplitOperator.IsNumber(varItem.XOffset)) chartText.ShowOffset.X=varItem.XOffset;
134005
134198
  if (IFrameSplitOperator.IsNumber(varItem.YOffset)) chartText.ShowOffset.Y=varItem.YOffset;
134006
134199
 
@@ -136058,7 +136251,19 @@ function OverlayScriptIndex(name,script,args,option)
136058
136251
  {
136059
136252
  var overlayIndex=this.OverlayIndex;
136060
136253
  var frame=overlayIndex.Frame;
136061
- let chart=new ChartSingleText();
136254
+ var chart=null;
136255
+
136256
+ if (varItem.Draw && varItem.Draw.Icon && varItem.Draw.Icon.Image)
136257
+ {
136258
+ chart=new ChartDrawIconV2();
136259
+ chart.Icon=varItem.Draw.Icon;
136260
+ if (varItem.DrawFontSize>0) chart.Size=varItem.DrawFontSize;
136261
+ }
136262
+ else
136263
+ {
136264
+ chart=new ChartSingleText();
136265
+ }
136266
+
136062
136267
  chart.Canvas=hqChart.Canvas;
136063
136268
  chart.TextAlign='center';
136064
136269
 
@@ -136089,6 +136294,10 @@ function OverlayScriptIndex(name,script,args,option)
136089
136294
  if (icon.IconFont==true)
136090
136295
  {
136091
136296
  chart.IconFont={ Family:icon.Family, Text:icon.Symbol, Color:icon.Color };
136297
+ }
136298
+ else if (icon.Image)
136299
+ {
136300
+
136092
136301
  }
136093
136302
  else
136094
136303
  {
@@ -156556,7 +156765,7 @@ function ScrollBarBGChart()
156556
156765
 
156557
156766
 
156558
156767
 
156559
- var HQCHART_VERSION="1.1.15479";
156768
+ var HQCHART_VERSION="1.1.15493";
156560
156769
 
156561
156770
  function PrintHQChartVersion()
156562
156771
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.15479";
8
+ var HQCHART_VERSION="1.1.15493";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {