hqchart 1.1.14165 → 1.1.14179

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.
@@ -928,6 +928,7 @@ function JSTReportChartContainer(uielement)
928
928
 
929
929
  if (item[32]) stock.CloseLine=item[32]; //32=收盘价线
930
930
  if (item[33]) stock.KLine=item[33]; //33=K线
931
+ if (item[34]) stock.ExePrice=item[34]; //34=行权价设置 { BGColor:背景色, Text:, TextColor }
931
932
 
932
933
  //10个数值型 101-199
933
934
  if (IFrameSplitOperator.IsNumber(item[101])) stock.ReserveNumber1=item[101];
@@ -1752,6 +1753,8 @@ var TREPORT_COLUMN_ID=
1752
1753
  NAME_EX_ID:27, //扩展名字
1753
1754
  CLOSE_LINE_ID:28, //收盘价线
1754
1755
  KLINE_ID:29, //K线
1756
+
1757
+ EXE_PRICE_EX_ID:30, //行权价格 扩张设置
1755
1758
 
1756
1759
  //预留数值类型 10个 201-299
1757
1760
  RESERVE_NUMBER1_ID:201, //ReserveNumber1:
@@ -1798,6 +1801,7 @@ var MAP_TREPORT_COLUMN_FIELD=new Map(
1798
1801
  [TREPORT_COLUMN_ID.AVERAGE_PRICE_ID,"AvPrice"],
1799
1802
  [TREPORT_COLUMN_ID.POSITION_ID,"Position"],
1800
1803
  [TREPORT_COLUMN_ID.AMPLITUDE_ID,"Amplitude"],
1804
+ [TREPORT_COLUMN_ID.EXE_PRICE_EX_ID, "ExePrice"],
1801
1805
 
1802
1806
  [TREPORT_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
1803
1807
  [TREPORT_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
@@ -2480,6 +2484,55 @@ function ChartTReport()
2480
2484
  }
2481
2485
  }
2482
2486
 
2487
+ this.FormatCenterItem=function(data,drawInfo)
2488
+ {
2489
+ if (!data || !data.TData) return;
2490
+ var leftData=this.GetExePriceExtendData(data.TData.LeftData);
2491
+ var rightData=this.GetExePriceExtendData(data.TData.RightData);
2492
+
2493
+ if (leftData)
2494
+ {
2495
+ if (leftData.BGColor) drawInfo.BGColor=leftData.BGColor;
2496
+ if (leftData.TitleColor) drawInfo.TextColor=leftData.TitleColor;
2497
+ if (leftData.Text && leftData.TextColor)
2498
+ {
2499
+ drawInfo.Left={ Text:leftData.Text, TextColor:leftData.TextColor};
2500
+ }
2501
+ else if (leftData.IconFont && leftData.TextColor)
2502
+ {
2503
+ drawInfo.Left={ IconFont:leftData.IconFont, TextColor:leftData.TextColor};
2504
+ }
2505
+
2506
+ }
2507
+
2508
+ if (rightData)
2509
+ {
2510
+ if (rightData.BGColor) drawInfo.BGColor=rightData.BGColor;
2511
+ if (rightData.TitleColor) drawInfo.TextColor=rightData.TitleColor;
2512
+
2513
+ if (rightData.Text && rightData.TextColor)
2514
+ {
2515
+ drawInfo.Right={ Text:rightData.Text, TextColor:rightData.TextColor};
2516
+ }
2517
+ else if (rightData.IconFont && rightData.TextColor)
2518
+ {
2519
+ drawInfo.Right={ IconFont:rightData.IconFont, TextColor:rightData.TextColor};
2520
+ }
2521
+ }
2522
+ }
2523
+
2524
+ //行权价列扩展信息
2525
+ this.GetExePriceExtendData=function(data)
2526
+ {
2527
+ if (!data) return null;
2528
+
2529
+ var fieldName=MAP_TREPORT_COLUMN_FIELD.get(TREPORT_COLUMN_ID.EXE_PRICE_EX_ID);
2530
+ if (!fieldName) return null;
2531
+
2532
+ var value=data[fieldName];
2533
+ return value;
2534
+ }
2535
+
2483
2536
  this.DrawCenterItem=function(index, data, column, rtItem, cellType) //cellType 0=中间字段 1=左侧 2=右侧
2484
2537
  {
2485
2538
  //tooltip提示
@@ -2492,6 +2545,10 @@ function ChartTReport()
2492
2545
  var drawInfo={ Text:null, TextColor:this.CenterItemConfig.TextColor, BGColor:this.CenterItemConfig.BGColor, TextAlign:column.TextAlign, Rect:rtItem, RectText:rtText };
2493
2546
  drawInfo.Text=`${data.ExePrice.toFixed(data.Decimal)}`;
2494
2547
 
2548
+ this.FormatCenterItem(data,drawInfo);
2549
+
2550
+
2551
+
2495
2552
  this.DrawCell(drawInfo);
2496
2553
  }
2497
2554
 
@@ -2733,7 +2790,7 @@ function ChartTReport()
2733
2790
  {
2734
2791
  var rtText=drawInfo.RectText;
2735
2792
  var yCenter=rtText.Top+(rtText.Height/2);
2736
-
2793
+ var fontBackup=null; //字体备份
2737
2794
  if (drawInfo.BGColor) //背景
2738
2795
  {
2739
2796
  var rtItem=drawInfo.Rect;
@@ -2760,6 +2817,44 @@ function ChartTReport()
2760
2817
  if(drawInfo.TextColor) this.Canvas.fillStyle=drawInfo.TextColor;
2761
2818
  this.DrawText(drawInfo.Text, drawInfo.TextAlign, rtText.Left, yCenter, rtText.Width);
2762
2819
  }
2820
+
2821
+ if (drawInfo.Left)
2822
+ {
2823
+ var item=drawInfo.Left;
2824
+ this.Canvas.textAlign="left";
2825
+ this.Canvas.textBaseline="middle";
2826
+ this.Canvas.fillStyle=item.TextColor;
2827
+ if (item.IconFont)
2828
+ {
2829
+ if (!fontBackup) fontBackup=this.Canvas.font;
2830
+ this.Canvas.font=item.IconFont.Font;
2831
+ this.Canvas.fillText(item.IconFont.Symbol,rtText.Left,yCenter);
2832
+ }
2833
+ else if (item.Text)
2834
+ {
2835
+ this.Canvas.fillText(item.Text,rtText.Left,yCenter);
2836
+ }
2837
+ }
2838
+
2839
+ if (drawInfo.Right)
2840
+ {
2841
+ var item=drawInfo.Right;
2842
+ this.Canvas.textAlign="right";
2843
+ this.Canvas.textBaseline="middle";
2844
+ this.Canvas.fillStyle=item.TextColor;
2845
+ if (item.IconFont)
2846
+ {
2847
+ if (!fontBackup) fontBackup=this.Canvas.font;
2848
+ this.Canvas.font=item.IconFont.Font;
2849
+ this.Canvas.fillText(item.IconFont.Symbol,rtText.Right,yCenter);
2850
+ }
2851
+ else if (item.Text)
2852
+ {
2853
+ this.Canvas.fillText(item.Text,rtText.Right,yCenter);
2854
+ }
2855
+ }
2856
+
2857
+ if (fontBackup) this.Canvas.font=fontBackup;
2763
2858
  }
2764
2859
 
2765
2860
  this.GetTooltipData=function(x,y)