hqchart 1.1.15917 → 1.1.15921

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.
@@ -45,12 +45,23 @@ function JSDialogSelectRect()
45
45
 
46
46
  this.RestoreFocusDelay=800;
47
47
 
48
+ //计算公式配置
49
+ // Increase=涨幅 0=(收-昨收)/昨收 1=(收-今开)/今开 2=(区间末尾收盘价 − 区间起始收盘价) ÷ 区间起始收盘价
50
+ // Amplitude=振幅 0= (当日最高价 − 当日最低价) ÷ 昨日收盘价 1=(当日最高价 − 当日最低价) ÷ 今开价 2=(区间内最高价 − 区间内最低价) ÷ 区间起始 K 收盘价
51
+ this.FormualConfig={ Increase:0, Amplitude:0 };
52
+
53
+
48
54
  this.Inital=function(hqchart, option)
49
55
  {
50
56
  this.HQChart=hqchart;
51
57
  if (option)
52
58
  {
53
-
59
+ if (option.Formual)
60
+ {
61
+ var item=option.Formual;
62
+ if (IFrameSplitOperator.IsNumber(item.Increase)) this.FormualConfig.Increase=item.Increase;
63
+ if (IFrameSplitOperator.IsNumber(item.Amplitude)) this.FormualConfig.Amplitude=item.Amplitude;
64
+ }
54
65
  }
55
66
  }
56
67
 
@@ -536,7 +547,9 @@ function JSDialogSelectRect()
536
547
  {
537
548
  var showData=
538
549
  {
539
- Open:null,Close:null,High:null,Low:null, YClose:null,
550
+ Open:null, Close:null, High:null, Low:null,
551
+ YClose:null, //起始K昨价
552
+ StartClose:null, //起始K收盘价
540
553
  Vol:0, Amount:0,
541
554
  Date:
542
555
  {
@@ -605,11 +618,55 @@ function JSDialogSelectRect()
605
618
  showData.Date.End.Time=item.Time;
606
619
  if (!IFrameSplitOperator.IsNumber(showData.Date.Start.Time)) showData.Date.Start.Time=item.Time;
607
620
  }
621
+
622
+ if (i==start)
623
+ {
624
+ if (IFrameSplitOperator.IsNumber(item.YClose)) showData.YClose=item.YClose;
625
+ if (IFrameSplitOperator.IsNumber(item.Close)) showData.StartClose=item.Close;
626
+ }
608
627
  }
609
628
 
610
629
  return showData;
611
630
  }
612
631
 
632
+ this.FormatKLineIncrease=function(showData)
633
+ {
634
+ var value=null;
635
+ switch(this.FormualConfig.Increase)
636
+ {
637
+ case 1:
638
+ value=showData.Open;
639
+ break;
640
+ case 2:
641
+ value=showData.StartClose;
642
+ break;
643
+ default:
644
+ value=showData.YClose;
645
+ break;
646
+ }
647
+
648
+ return this.FormatIncrease(showData.Close, value, 'DialogSelectRect-Increase')
649
+ }
650
+
651
+ this.FormatKLineAmplitude=function(showData)
652
+ {
653
+ var value=null;
654
+ switch(this.FormualConfig.Increase)
655
+ {
656
+ case 1:
657
+ value=showData.Open;
658
+ break;
659
+ case 2:
660
+ value=showData.StartClose;
661
+ break;
662
+ default:
663
+ value=showData.YClose;
664
+ break;
665
+ }
666
+
667
+ return this.FormatAmplitude(showData.High, showData.Low, value, 'DialogSelectRect-Amplitude')
668
+ }
669
+
613
670
  //格式化K线数据
614
671
  this.FormatKLineText=function(showData)
615
672
  {
@@ -635,11 +692,11 @@ function JSDialogSelectRect()
635
692
 
636
693
  showData.AryText.push(this.ForamtPrice(showData.Open, showData.Open,defaultfloatPrecision, 'DialogSelectRect-StartPrice'));
637
694
  showData.AryText.push(this.ForamtPrice(showData.Close, showData.Open,defaultfloatPrecision, 'DialogSelectRect-EndPrice'));
638
- showData.AryText.push(this.FormatIncrease(showData.Close, showData.Open, 'DialogSelectRect-Increase'));
695
+ showData.AryText.push(this.FormatKLineIncrease(showData));
639
696
 
640
697
  showData.AryText.push(this.ForamtPrice(showData.High, showData.Open,defaultfloatPrecision, 'DialogSelectRect-High'));
641
698
  showData.AryText.push(this.ForamtPrice(showData.Low, showData.Open,defaultfloatPrecision, 'DialogSelectRect-Low'));
642
- showData.AryText.push(this.FormatAmplitude(showData.High, showData.Low, showData.Open, 'DialogSelectRect-Amplitude'));
699
+ showData.AryText.push(this.FormatKLineAmplitude(showData));
643
700
 
644
701
  showData.AryText.push(this.FormatVol(showData.Vol, 'DialogSelectRect-Vol'));
645
702
  showData.AryText.push(this.FormatAmount(showData.Amount, 'DialogSelectRect-Amount'));
@@ -2172,7 +2172,7 @@ function JSFloatTooltip()
2172
2172
  //大宗交易
2173
2173
  this.FormatBlockTradingText=function(data, floatPrecision, aryOut)
2174
2174
  {
2175
- var item={ Title:"", Text:"大宗交易", Color:this.TextColor, ClassName:this.ValueAlign.Left };
2175
+ var item={ Title:"大宗交易", TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
2176
2176
  aryOut.push(item);
2177
2177
 
2178
2178
  var item={ Title:"日期",Text:IFrameSplitOperator.FormatDateString(data.Date,"YYYY-MM-DD"), Color:this.ValueColor };
@@ -2212,7 +2212,7 @@ function JSFloatTooltip()
2212
2212
  //龙虎榜
2213
2213
  this.FormatDragonTigerText=function(data, floatPrecision, aryOut)
2214
2214
  {
2215
- var item={ Title:"", Text:"龙虎榜", Color:this.TextColor, ClassName:this.ValueAlign.Left };
2215
+ var item={ Title:"龙虎榜", TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
2216
2216
  aryOut.push(item);
2217
2217
 
2218
2218
  var item={ Title:"日期",Text:IFrameSplitOperator.FormatDateString(data.Date,"YYYY-MM-DD"), Color:this.ValueColor};
@@ -2256,7 +2256,7 @@ function JSFloatTooltip()
2256
2256
  }
2257
2257
  else if (item.Type==2) //单行
2258
2258
  {
2259
- var outItem={ Title:"", Text:item.Name, Color:this.TextColor, ClassName:this.ValueAlign.Left };
2259
+ var outItem={ Title:item.Name, TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
2260
2260
  }
2261
2261
  else
2262
2262
  {
@@ -2270,7 +2270,7 @@ function JSFloatTooltip()
2270
2270
  //调研
2271
2271
  this.FormatResearchText=function(data,aryOut)
2272
2272
  {
2273
- var item={ Title:"", Text:"机构调研", Color:this.TextColor, ClassName:this.ValueAlign.Left };
2273
+ var item={ Title:"机构调研", TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
2274
2274
  aryOut.push(item);
2275
2275
 
2276
2276
  var item={ Title:"公告日期",Text:IFrameSplitOperator.FormatDateString(data.Date,"YYYY-MM-DD"), Color:this.ValueColor };
@@ -161927,7 +161927,7 @@ function ScrollBarBGChart()
161927
161927
 
161928
161928
 
161929
161929
 
161930
- var HQCHART_VERSION="1.1.15916";
161930
+ var HQCHART_VERSION="1.1.15920";
161931
161931
 
161932
161932
  function PrintHQChartVersion()
161933
161933
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.15916";
8
+ var HQCHART_VERSION="1.1.15920";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -171059,7 +171059,7 @@ function JSFloatTooltip()
171059
171059
  //大宗交易
171060
171060
  this.FormatBlockTradingText=function(data, floatPrecision, aryOut)
171061
171061
  {
171062
- var item={ Title:"", Text:"大宗交易", Color:this.TextColor, ClassName:this.ValueAlign.Left };
171062
+ var item={ Title:"大宗交易", TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
171063
171063
  aryOut.push(item);
171064
171064
 
171065
171065
  var item={ Title:"日期",Text:IFrameSplitOperator.FormatDateString(data.Date,"YYYY-MM-DD"), Color:this.ValueColor };
@@ -171099,7 +171099,7 @@ function JSFloatTooltip()
171099
171099
  //龙虎榜
171100
171100
  this.FormatDragonTigerText=function(data, floatPrecision, aryOut)
171101
171101
  {
171102
- var item={ Title:"", Text:"龙虎榜", Color:this.TextColor, ClassName:this.ValueAlign.Left };
171102
+ var item={ Title:"龙虎榜", TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
171103
171103
  aryOut.push(item);
171104
171104
 
171105
171105
  var item={ Title:"日期",Text:IFrameSplitOperator.FormatDateString(data.Date,"YYYY-MM-DD"), Color:this.ValueColor};
@@ -171143,7 +171143,7 @@ function JSFloatTooltip()
171143
171143
  }
171144
171144
  else if (item.Type==2) //单行
171145
171145
  {
171146
- var outItem={ Title:"", Text:item.Name, Color:this.TextColor, ClassName:this.ValueAlign.Left };
171146
+ var outItem={ Title:item.Name, TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
171147
171147
  }
171148
171148
  else
171149
171149
  {
@@ -171157,7 +171157,7 @@ function JSFloatTooltip()
171157
171157
  //调研
171158
171158
  this.FormatResearchText=function(data,aryOut)
171159
171159
  {
171160
- var item={ Title:"", Text:"机构调研", Color:this.TextColor, ClassName:this.ValueAlign.Left };
171160
+ var item={ Title:"机构调研", TitleColor:this.TextColor, IsMergeCell:true, TitleClassName:this.TitleAlign.Center };
171161
171161
  aryOut.push(item);
171162
171162
 
171163
171163
  var item={ Title:"公告日期",Text:IFrameSplitOperator.FormatDateString(data.Date,"YYYY-MM-DD"), Color:this.ValueColor };
@@ -171964,12 +171964,23 @@ function JSDialogSelectRect()
171964
171964
 
171965
171965
  this.RestoreFocusDelay=800;
171966
171966
 
171967
+ //计算公式配置
171968
+ // Increase=涨幅 0=(收-昨收)/昨收 1=(收-今开)/今开 2=(区间末尾收盘价 − 区间起始收盘价) ÷ 区间起始收盘价
171969
+ // Amplitude=振幅 0= (当日最高价 − 当日最低价) ÷ 昨日收盘价 1=(当日最高价 − 当日最低价) ÷ 今开价 2=(区间内最高价 − 区间内最低价) ÷ 区间起始 K 收盘价
171970
+ this.FormualConfig={ Increase:0, Amplitude:0 };
171971
+
171972
+
171967
171973
  this.Inital=function(hqchart, option)
171968
171974
  {
171969
171975
  this.HQChart=hqchart;
171970
171976
  if (option)
171971
171977
  {
171972
-
171978
+ if (option.Formual)
171979
+ {
171980
+ var item=option.Formual;
171981
+ if (IFrameSplitOperator.IsNumber(item.Increase)) this.FormualConfig.Increase=item.Increase;
171982
+ if (IFrameSplitOperator.IsNumber(item.Amplitude)) this.FormualConfig.Amplitude=item.Amplitude;
171983
+ }
171973
171984
  }
171974
171985
  }
171975
171986
 
@@ -172455,7 +172466,9 @@ function JSDialogSelectRect()
172455
172466
  {
172456
172467
  var showData=
172457
172468
  {
172458
- Open:null,Close:null,High:null,Low:null, YClose:null,
172469
+ Open:null, Close:null, High:null, Low:null,
172470
+ YClose:null, //起始K昨价
172471
+ StartClose:null, //起始K收盘价
172459
172472
  Vol:0, Amount:0,
172460
172473
  Date:
172461
172474
  {
@@ -172524,11 +172537,55 @@ function JSDialogSelectRect()
172524
172537
  showData.Date.End.Time=item.Time;
172525
172538
  if (!IFrameSplitOperator.IsNumber(showData.Date.Start.Time)) showData.Date.Start.Time=item.Time;
172526
172539
  }
172540
+
172541
+ if (i==start)
172542
+ {
172543
+ if (IFrameSplitOperator.IsNumber(item.YClose)) showData.YClose=item.YClose;
172544
+ if (IFrameSplitOperator.IsNumber(item.Close)) showData.StartClose=item.Close;
172545
+ }
172527
172546
  }
172528
172547
 
172529
172548
  return showData;
172530
172549
  }
172531
172550
 
172551
+ this.FormatKLineIncrease=function(showData)
172552
+ {
172553
+ var value=null;
172554
+ switch(this.FormualConfig.Increase)
172555
+ {
172556
+ case 1:
172557
+ value=showData.Open;
172558
+ break;
172559
+ case 2:
172560
+ value=showData.StartClose;
172561
+ break;
172562
+ default:
172563
+ value=showData.YClose;
172564
+ break;
172565
+ }
172566
+
172567
+ return this.FormatIncrease(showData.Close, value, 'DialogSelectRect-Increase')
172568
+ }
172569
+
172570
+ this.FormatKLineAmplitude=function(showData)
172571
+ {
172572
+ var value=null;
172573
+ switch(this.FormualConfig.Increase)
172574
+ {
172575
+ case 1:
172576
+ value=showData.Open;
172577
+ break;
172578
+ case 2:
172579
+ value=showData.StartClose;
172580
+ break;
172581
+ default:
172582
+ value=showData.YClose;
172583
+ break;
172584
+ }
172585
+
172586
+ return this.FormatAmplitude(showData.High, showData.Low, value, 'DialogSelectRect-Amplitude')
172587
+ }
172588
+
172532
172589
  //格式化K线数据
172533
172590
  this.FormatKLineText=function(showData)
172534
172591
  {
@@ -172554,11 +172611,11 @@ function JSDialogSelectRect()
172554
172611
 
172555
172612
  showData.AryText.push(this.ForamtPrice(showData.Open, showData.Open,defaultfloatPrecision, 'DialogSelectRect-StartPrice'));
172556
172613
  showData.AryText.push(this.ForamtPrice(showData.Close, showData.Open,defaultfloatPrecision, 'DialogSelectRect-EndPrice'));
172557
- showData.AryText.push(this.FormatIncrease(showData.Close, showData.Open, 'DialogSelectRect-Increase'));
172614
+ showData.AryText.push(this.FormatKLineIncrease(showData));
172558
172615
 
172559
172616
  showData.AryText.push(this.ForamtPrice(showData.High, showData.Open,defaultfloatPrecision, 'DialogSelectRect-High'));
172560
172617
  showData.AryText.push(this.ForamtPrice(showData.Low, showData.Open,defaultfloatPrecision, 'DialogSelectRect-Low'));
172561
- showData.AryText.push(this.FormatAmplitude(showData.High, showData.Low, showData.Open, 'DialogSelectRect-Amplitude'));
172618
+ showData.AryText.push(this.FormatKLineAmplitude(showData));
172562
172619
 
172563
172620
  showData.AryText.push(this.FormatVol(showData.Vol, 'DialogSelectRect-Vol'));
172564
172621
  showData.AryText.push(this.FormatAmount(showData.Amount, 'DialogSelectRect-Amount'));
@@ -183093,7 +183150,7 @@ class ChartCalendar
183093
183150
 
183094
183151
 
183095
183152
 
183096
- var HQCHART_VERSION="1.1.15916";
183153
+ var HQCHART_VERSION="1.1.15920";
183097
183154
 
183098
183155
  function PrintHQChartVersion()
183099
183156
  {