hqchart 1.1.14183 → 1.1.14193

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.
@@ -4556,9 +4556,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4556
4556
  if(option.KLineTitle.IsShow == false) chart.TitlePaint[0].IsShow = false;
4557
4557
  if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
4558
4558
 
4559
- if (item.ShowPostion) //显示位置高级配置
4559
+ if (item.ShowPosition || item.ShowPostion) //显示位置高级配置
4560
4560
  {
4561
4561
  var subItem=item.ShowPostion;
4562
+ if (item.ShowPosition) subItem=item.ShowPosition;
4562
4563
  if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
4563
4564
  if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
4564
4565
  if (subItem.Margin)
@@ -5069,9 +5070,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5069
5070
  if(IFrameSplitOperator.IsBool(item.IsAlwaysShowLastData)) chart.TitlePaint[0].IsAlwaysShowLastData=item.IsAlwaysShowLastData;
5070
5071
  if(IFrameSplitOperator.IsNumber(item.ShowLastDataFormat)) chart.TitlePaint[0].ShowLastDataFormat=item.ShowLastDataFormat;
5071
5072
  if (item.TimeFormat) chart.TitlePaint[0].TimeFormat=item.TimeFormat;
5072
- if (item.ShowPostion) //显示位置高级配置
5073
+ if (item.ShowPostion || item.ShowPosition) //显示位置高级配置
5073
5074
  {
5074
5075
  var subItem=item.ShowPostion;
5076
+ if (item.ShowPosition) subItem=item.ShowPosition;
5075
5077
  if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
5076
5078
  if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
5077
5079
  if (subItem.Margin)
@@ -6798,6 +6800,7 @@ var JSCHART_MENU_ID=
6798
6800
  CMD_ENABLE_POP_MINUTE_CHART_ID:40, //双击弹分时图
6799
6801
 
6800
6802
  CMD_CHANGE_INFO_POSITION_ID:41, //修改信息地雷位置
6803
+ CMD_CHIP_CHART_SETTING_ID:42, //筹码图设置
6801
6804
 
6802
6805
 
6803
6806
  CMD_REPORT_CHANGE_BLOCK_ID:60, //报价列表 切换板块ID
@@ -13899,6 +13902,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13899
13902
  case JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:
13900
13903
  if (this.DeleteStockChipChart) this.DeleteStockChipChart();
13901
13904
  break;
13905
+ case JSCHART_MENU_ID.CMD_CHIP_CHART_SETTING_ID:
13906
+ var stockChip=this.GetStockChipChart();
13907
+ if (!stockChip) return;
13908
+ if (param!=null)
13909
+ {
13910
+ stockChip.Chart.ShowType=param;
13911
+ this.SetSizeChange(true);
13912
+ this.Draw();
13913
+ }
13914
+ break;
13902
13915
  case JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID:
13903
13916
  if (IFrameSplitOperator.IsBool(srcParam))
13904
13917
  this.EnableSelectRect=srcParam;
@@ -47812,7 +47825,7 @@ function StockChip()
47812
47825
  this.ShowType=0; //0=所有筹码 1=周期前 2=周期内
47813
47826
  this.IsDynamic=true;
47814
47827
  this.ClientRect={};
47815
- this.Font=g_JSChartResource.TitleFont;
47828
+ this.Font=g_JSChartResource.StockChip.Font;
47816
47829
  this.InfoColor=g_JSChartResource.StockChip.InfoColor;
47817
47830
  this.DayInfoColor=g_JSChartResource.StockChip.DayInfoColor;
47818
47831
  this.LineHeight=16;
@@ -47851,7 +47864,7 @@ function StockChip()
47851
47864
  this.ReloadResource=function(resource)
47852
47865
  {
47853
47866
  this.PenBorder=g_JSChartResource.FrameBorderPen;
47854
- this.Font=g_JSChartResource.TitleFont;
47867
+ this.Font=g_JSChartResource.StockChip.Font;
47855
47868
  this.InfoColor=g_JSChartResource.StockChip.InfoColor;
47856
47869
  this.DayInfoColor=g_JSChartResource.StockChip.DayInfoColor;
47857
47870
 
@@ -58535,7 +58548,7 @@ function DynamicKLineTitlePainting()
58535
58548
  this.IsShowSettingInfo=true; //是否显示设置信息(周期 复权)
58536
58549
  this.IsShowDateTime=true; //是否显示日期
58537
58550
  this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
58538
- this.ShowPositionConfig={ Margin:{ Bottom:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
58551
+ this.ShowPositionConfig={ Margin:{ Bottom:2, Left:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
58539
58552
  this.OnDrawEvent;
58540
58553
  this.OnMouseMoveEvent;
58541
58554
  this.HQChart;
@@ -58783,7 +58796,7 @@ function DynamicKLineTitlePainting()
58783
58796
  }
58784
58797
  else
58785
58798
  {
58786
- var left=this.Frame.ChartBorder.GetLeft();
58799
+ var left=this.Frame.ChartBorder.Left;
58787
58800
  if (this.ShowPositionConfig)
58788
58801
  {
58789
58802
  var item=this.ShowPositionConfig;
@@ -59499,43 +59512,29 @@ function DynamicMinuteTitlePainting()
59499
59512
  var isHScreen=this.Frame.IsHScreen===true;
59500
59513
  var border=this.Frame.GetBorder();
59501
59514
  var pixelRatio=GetDevicePixelRatio();
59502
- var left=border.Left;
59503
- var bottom=border.Top-this.Frame.ChartBorder.Top/2;
59515
+ var left=this.GetLeft(isHScreen);
59516
+ var right=this.GetRight(isHScreen);
59517
+ var bottom=this.GetBottom(isHScreen);
59504
59518
  var bDraw=true;
59505
59519
  if (isHScreen)
59506
59520
  {
59507
59521
  if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
59508
- var left=2;
59509
- var bottom=this.Frame.ChartBorder.Right/2; //上下居中显示
59510
- var xText=border.ChartWidth;
59511
- var yText=border.Top;
59522
+ var xText=bottom;
59523
+ var yText=left;
59512
59524
  this.Canvas.translate(xText, yText);
59513
59525
  this.Canvas.rotate(90 * Math.PI / 180);
59526
+ left=bottom=0;
59514
59527
  }
59515
59528
  else
59516
59529
  {
59517
- if (this.Frame.ChartBorder.Top<5) bDraw=false;
59530
+ if (this.Frame.ChartBorder.Top<5*pixelRatio) bDraw=false;
59518
59531
  }
59519
59532
 
59520
59533
  this.Canvas.textAlign="left";
59534
+ this.Canvas.textBaseline="bottom";
59521
59535
  this.Canvas.font=this.Font;
59522
59536
 
59523
- if (this.TitleBaseLine==0) //上
59524
- {
59525
- this.Canvas.textBaseline="top";
59526
- bottom=2*pixelRatio;
59527
- }
59528
- else if (this.TitleBaseLine==2) //下
59529
- {
59530
- this.Canvas.textBaseline="bottom";
59531
- var bottom=border.Top
59532
- }
59533
- else //中
59534
- {
59535
- this.Canvas.textBaseline="middle";
59536
- }
59537
-
59538
- var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
59537
+ var position = { Left: left, Bottom: bottom, MaxRight:right, IsHScreen: isHScreen };
59539
59538
  var auctionData=this.GetCurrentAuctionData();
59540
59539
  var titleData=this.FormatCallAuctionTitle(auctionData);
59541
59540
 
@@ -59672,48 +59671,33 @@ function DynamicMinuteTitlePainting()
59672
59671
  if (!callAuctionItem) return;
59673
59672
 
59674
59673
  var item=callAuctionItem.Data;
59675
- var dataVersion=callAuctionItem.Ver;
59676
-
59677
59674
  var isHScreen=this.Frame.IsHScreen===true;
59675
+ var pixelRatio=GetDevicePixelRatio();
59678
59676
  var border=this.Frame.GetBorder();
59677
+ var left=this.GetLeft(isHScreen);
59678
+ var right=this.GetRight(isHScreen);
59679
+ var bottom =this.GetBottom(isHScreen);
59679
59680
 
59680
- var left=border.Left;
59681
- var bottom=border.Top-this.Frame.ChartBorder.Top/2;
59682
- //var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
59683
59681
  var bDraw=true;
59684
59682
  if (isHScreen)
59685
59683
  {
59686
- var left=2;
59687
- var bottom=this.Frame.ChartBorder.Right/2; //上下居中显示
59688
- var xText=border.ChartWidth;
59689
- var yText=border.Top;
59684
+ if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
59685
+ var xText=bottom;
59686
+ var yText=left;
59690
59687
  this.Canvas.translate(xText, yText);
59691
59688
  this.Canvas.rotate(90 * Math.PI / 180);
59689
+ left=bottom=0; //旋转以后 位置调整0
59692
59690
  }
59693
59691
  else
59694
59692
  {
59695
- if (this.Frame.ChartBorder.Top<5) bDraw=false;
59693
+ if (this.Frame.ChartBorder.Top<5*pixelRatio) bDraw=false;
59696
59694
  }
59697
59695
 
59698
59696
  this.Canvas.textAlign="left";
59697
+ this.Canvas.textBaseline="bottom";
59699
59698
  this.Canvas.font=this.Font;
59700
59699
 
59701
- if (this.TitleBaseLine==0) //上
59702
- {
59703
- this.Canvas.textBaseline="top";
59704
- bottom=2*GetDevicePixelRatio();
59705
- }
59706
- else if (this.TitleBaseLine==2) //下
59707
- {
59708
- this.Canvas.textBaseline="bottom";
59709
- var bottom=border.Top
59710
- }
59711
- else //中
59712
- {
59713
- this.Canvas.textBaseline="middle";
59714
- }
59715
-
59716
- var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
59700
+ var position = { Left: left, Bottom: bottom, MaxRight:right, IsHScreen: isHScreen };
59717
59701
  var titleData=this.FormatCallAuctionTitle(callAuctionItem);
59718
59702
 
59719
59703
  if (bDraw && titleData && IFrameSplitOperator.IsNonEmptyArray(titleData.AryText))
@@ -59724,91 +59708,6 @@ function DynamicMinuteTitlePainting()
59724
59708
  if (!this.DrawText(item.Text,item.Color,position)) break;
59725
59709
  }
59726
59710
  }
59727
-
59728
- /*
59729
- if(bDraw && this.IsShowName)
59730
- {
59731
- if (!this.DrawText(this.Name,this.NameColor,position)) return;
59732
- }
59733
-
59734
- var time=item.Time;
59735
- var strTime;
59736
- if (dataVersion==1.0) strTime=IFrameSplitOperator.FormatTimeString(time,"HH:MM");
59737
- else strTime=IFrameSplitOperator.FormatTimeString(time,"HH:MM:SS");
59738
- var strDate=IFrameSplitOperator.FormatDateString(item.Date);
59739
- strTime=`${strDate} ${strTime}`;
59740
-
59741
- if (bDraw && this.IsShowTime && strTime )
59742
- {
59743
- if (!this.DrawText(strTime,this.DateTimeColor,position)) return;
59744
- }
59745
-
59746
- //匹配价
59747
- if (bDraw && item && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Price"))
59748
- {
59749
- var color=this.GetColor(item.Price,this.YClose);
59750
- var filedName='MTitle-AC-Price';
59751
- if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Close";
59752
- var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+item.Price.toFixed(defaultfloatPrecision);
59753
- if (!this.DrawText(text,color,position)) return;
59754
- }
59755
-
59756
- //竞价涨幅
59757
- if (bDraw && item && IFrameSplitOperator.IsPlusNumber(this.YClose) && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Increase"))
59758
- {
59759
- var value=(item.Price-this.YClose)/this.YClose*100;
59760
- var color=this.GetColor(value,0);
59761
- var filedName='MTitle-AC-Increase';
59762
- if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Increase";
59763
- var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+value.toFixed(2)+"%";
59764
- if (!this.DrawText(text,color,position)) return;
59765
- }
59766
-
59767
- if (dataVersion==3.0)
59768
- {
59769
- if (bDraw && item && IFrameSplitOperator.IsNumber(item.AvPrice) && this.CallAuctionShowTitle.has("MTitle-AC-AvPrice"))
59770
- {
59771
- var color=this.GetColor(item.Price,this.YClose);
59772
- var text=g_JSChartLocalization.GetText('MTitle-AC-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
59773
- if (!this.DrawText(text,color,position)) return;
59774
- }
59775
- }
59776
-
59777
- //匹配量
59778
- if (bDraw && IFrameSplitOperator.IsNumber(item.Vol[0]) && this.CallAuctionShowTitle.has("MTitle-AC-Vol"))
59779
- {
59780
- var filedName='MTitle-AC-Vol';
59781
- if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Vol";
59782
- var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[0],2);
59783
- if (!this.DrawText(text,this.VolColor,position)) return;
59784
- }
59785
-
59786
- //未匹配量
59787
- if (bDraw && IFrameSplitOperator.IsNumber(item.Vol[1]) && this.CallAuctionShowTitle.has("MTitle-AC-NotMatchVol"))
59788
- {
59789
- var text=g_JSChartLocalization.GetText('MTitle-AC-NotMatchVol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[1],2);
59790
- if (!this.DrawText(text,this.VolColor,position)) return;
59791
- }
59792
-
59793
- if (bDraw)
59794
- {
59795
- if (item.ExtendData && IFrameSplitOperator.IsNonEmptyArray(item.ExtendData.Amount))
59796
- {
59797
- var aryAmount=item.ExtendData.Amount;
59798
- if (IFrameSplitOperator.IsNumber(aryAmount[0]) && this.CallAuctionShowTitle.has("MTitle-AC-Amount")) //匹配量金额
59799
- {
59800
- var text=g_JSChartLocalization.GetText('MTitle-AC-Amount',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(aryAmount[0],2);
59801
- if (!this.DrawText(text,this.AmountColor,position)) return;
59802
- }
59803
-
59804
- if (IFrameSplitOperator.IsNumber(aryAmount[1]) && this.CallAuctionShowTitle.has("MTitle-AC-NotMatchAmount")) //未匹配量金额
59805
- {
59806
- var text=g_JSChartLocalization.GetText('MTitle-AC-NotMatchAmount',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(aryAmount[1],2);
59807
- if (!this.DrawText(text,this.AmountColor,position)) return;
59808
- }
59809
- }
59810
- }
59811
- */
59812
59711
  }
59813
59712
 
59814
59713
  this.DrawLastDataItem=function()
@@ -74286,6 +74185,7 @@ function JSChartResource()
74286
74185
  {
74287
74186
  InfoColor:'rgb(0,0,0)', //文字颜色
74288
74187
  DayInfoColor:'rgb(255,255,255)', //周期颜色内文字颜色
74188
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
74289
74189
 
74290
74190
  DefaultButton:
74291
74191
  {
@@ -75232,6 +75132,7 @@ function JSChartResource()
75232
75132
  var item=style.StockChip;
75233
75133
  if (item.InfoColor) this.StockChip.InfoColor=item.InfoColor;
75234
75134
  if (item.DayInfoColor) this.StockChip.DayInfoColor=item.DayInfoColor;
75135
+ if (item.Font) this.StockChip.Font=item.Font;
75235
75136
 
75236
75137
  if (item.DefaultButton) T_SetButtonStyle(item.DefaultButton, this.StockChip.DefaultButton);
75237
75138
  if (item.LongButton) T_SetButtonStyle(item.LongButton, this.StockChip.LongButton);
@@ -84742,6 +84643,8 @@ KLineChartContainer.JsonDataToRealtimeData=function(data, symbol)
84742
84643
  if (IFrameSplitOperator.IsBool(stock.isvirtual)) item.IsVirtual=stock.isvirtual; //虚拟数据
84743
84644
  if (IFrameSplitOperator.IsBool(stock.isnontrade)) item.IsNonTrade=stock.isnontrade; //虚拟数据
84744
84645
 
84646
+ if (IFrameSplitOperator.IsNumber(stock.flowCapital)) item.FlowCapital=stock.flowCapital; //流通股本
84647
+
84745
84648
  return item;
84746
84649
  }
84747
84650
 
@@ -132458,9 +132361,10 @@ function ChartReport()
132458
132361
  if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
132459
132362
  if (IFrameSplitOperator.IsBool(item.EnableDragWidth)) colItem.EnableDragWidth=item.EnableDragWidth;
132460
132363
  if (IFrameSplitOperator.IsBool(item.IsDrawCallback)) colItem.IsDrawCallback=item.IsDrawCallback;
132364
+ else colItem.IsDrawCallback=false;
132365
+
132461
132366
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
132462
132367
  if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
132463
- else colItem.IsDrawCallback=false;
132464
132368
  if (item.Icon) colItem.Icon=item.Icon;
132465
132369
  if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
132466
132370
 
@@ -149732,7 +149636,7 @@ function HQChartScriptWorker()
149732
149636
 
149733
149637
 
149734
149638
 
149735
- var HQCHART_VERSION="1.1.14182";
149639
+ var HQCHART_VERSION="1.1.14192";
149736
149640
 
149737
149641
  function PrintHQChartVersion()
149738
149642
  {