hqchart 1.1.14843 → 1.1.14848

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.
@@ -45600,6 +45600,7 @@ function ChartBaseLineBar()
45600
45600
  this.LineWidth=1;
45601
45601
  this.IsDrawFirst=true;
45602
45602
  this.AryData=[]; //{ Date, Time, Up, Down }
45603
+ this.DefaultMax; //默认最大值
45603
45604
 
45604
45605
  this.MaxValue;
45605
45606
  this.YBaseLine;
@@ -45663,13 +45664,18 @@ function ChartBaseLineBar()
45663
45664
 
45664
45665
  if (IFrameSplitOperator.IsNumber(item.Up))
45665
45666
  {
45666
- var y=yCenter-(item.Up*this.BarMaxHeight/this.MaxValue);
45667
+ var value=Math.abs(item.Up)*this.BarMaxHeight/this.MaxValue;
45668
+ if (value<2) value=2; //太短了 就直接画2个像素高度
45669
+ var y=yCenter-value;
45670
+
45667
45671
  aryUpBar.push({ X:x, Y:y});
45668
45672
  }
45669
45673
 
45670
45674
  if (IFrameSplitOperator.IsNumber(item.Down))
45671
45675
  {
45672
- var y=yCenter+(Math.abs(item.Down)*this.BarMaxHeight/this.MaxValue);
45676
+ var value=Math.abs(item.Down)*this.BarMaxHeight/this.MaxValue;
45677
+ if (value<2) value=2;
45678
+ var y=yCenter+value;
45673
45679
  aryDownBar.push({X:x, Y:y});
45674
45680
  }
45675
45681
  }
@@ -45717,7 +45723,7 @@ function ChartBaseLineBar()
45717
45723
  for (var i=0;i<aryBar.length;++i)
45718
45724
  {
45719
45725
  var item=aryBar[i];
45720
- var x=ToFixedPoint(item.X)
45726
+ var x=ToFixedPoint(item.X);
45721
45727
  if (bHScreen)
45722
45728
  {
45723
45729
  this.Canvas.moveTo(yCenter,x);
@@ -45771,6 +45777,7 @@ function ChartBaseLineBar()
45771
45777
  if (max && min)
45772
45778
  {
45773
45779
  this.MaxValue=Math.max(Math.abs(max.Value),Math.abs(min.Value));
45780
+ if (IFrameSplitOperator.IsNumber(this.DefaultMax)) this.MaxValue=Math.max(this.DefaultMax,this.MaxValue);
45774
45781
  }
45775
45782
  }
45776
45783
 
@@ -82476,6 +82483,7 @@ function JSChartLocalization()
82476
82483
  ['DialogTooltip-AC-AvPrice', {CN:'匹配均价', EN:'AVPrice', TC:'匹配均價'}],
82477
82484
  ['DialogTooltip-AC-Increase', {CN:'竞价涨幅', EN:'Increase', TC:'競價漲幅'}],
82478
82485
  ['DialogTooltip-AC-Vol', {CN:'匹配量', EN:'Vol', TC:'匹配量'}],
82486
+ ['DialogTooltip-AC-NotMatchVol', {CN:'未匹配量:', EN:'NV:', TC:'未匹配量'}],
82479
82487
  ['DialogTooltip-Value', {CN:'数值', EN:'Value', TC:'数值'}],
82480
82488
 
82481
82489
  ['FloatTooltip-Date', {CN:'日期', EN:'Date', TC:'日期'}],
@@ -129257,6 +129265,7 @@ function ScriptIndex(name,script,args,option)
129257
129265
  {
129258
129266
  if (config.UpColor) chart.UpColor=config.UpColor;
129259
129267
  if (config.DownColor) chart.DownColor=config.DownColor;
129268
+ if (IFrameSplitOperator.IsNumber(config.DefaultMax)) chart.DefaultMax=config.DefaultMax;
129260
129269
  }
129261
129270
 
129262
129271
  chart.BuildCacheData();
@@ -130827,6 +130836,7 @@ function OverlayScriptIndex(name,script,args,option)
130827
130836
  {
130828
130837
  if (config.UpColor) chart.UpColor=config.UpColor;
130829
130838
  if (config.DownColor) chart.DownColor=config.DownColor;
130839
+ if (IFrameSplitOperator.IsNumber(config.DefaultMax)) chart.DefaultMax=config.DefaultMax;
130830
130840
  }
130831
130841
 
130832
130842
  chart.BuildCacheData();
@@ -157267,17 +157277,31 @@ function JSDialogTooltip()
157267
157277
  {
157268
157278
  var item=data.Data.Data;
157269
157279
  if (!item) item={ Vol:[] };
157270
-
157271
- var timeForamt="HH:MM:SS";
157272
- if (item.Ver===1) timeForamt="HH:MM"
157273
- aryText=
157274
- [
157275
- this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
157276
- this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
157277
- this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
157278
- this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
157279
- this.FormatVol(item.Vol[0]/unit,'DialogTooltip-AC-Vol' ),
157280
- ];
157280
+ if (data.Data.Ver===1)
157281
+ {
157282
+ var timeForamt="HH:MM"
157283
+ aryText=
157284
+ [
157285
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
157286
+ this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
157287
+ this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
157288
+ this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
157289
+ this.FormatVol(item.Vol[0]/unit,'DialogTooltip-AC-Vol'),
157290
+ ];
157291
+ }
157292
+ else
157293
+ {
157294
+ var timeForamt="HH:MM:SS";
157295
+ aryText=
157296
+ [
157297
+ this.ForamtDate(item.Date,this.Style==1?"MM/DD/W":"YYYY/MM/DD/W",'DialogTooltip-Date' ),
157298
+ this.FormatTime(item.Time, null, timeForamt, 'DialogTooltip-Time'),
157299
+ this.ForamtPrice(item.Price,item.YClose, defaultfloatPrecision,'DialogTooltip-AC-Price',1),
157300
+ this.FormatIncrease(item.Price,item.YClose,defaultfloatPrecision,'DialogTooltip-AC-Increase',1),
157301
+ this.FormatVol(item.Vol[0]/unit,'DialogTooltip-AC-Vol', 2),
157302
+ this.FormatVol(item.Vol[1]/unit,'DialogTooltip-AC-NotMatchVol', 2),
157303
+ ];
157304
+ }
157281
157305
  }
157282
157306
  else
157283
157307
  {
@@ -157398,7 +157422,7 @@ function JSDialogTooltip()
157398
157422
  return item;
157399
157423
  }
157400
157424
 
157401
- this.FormatVol=function(vol, TitleID)
157425
+ this.FormatVol=function(vol, TitleID, floatPrecision)
157402
157426
  {
157403
157427
  var item=
157404
157428
  {
@@ -157409,7 +157433,10 @@ function JSDialogTooltip()
157409
157433
 
157410
157434
  if (!IFrameSplitOperator.IsNumber(vol)) return item;
157411
157435
 
157412
- item.Text=IFrameSplitOperator.FormatValueStringV2(vol,0,2,this.LanguageID);
157436
+ var decimal=0; //小数位数
157437
+ if (IFrameSplitOperator.IsNumber(floatPrecision)) decimal=floatPrecision;
157438
+
157439
+ item.Text=IFrameSplitOperator.FormatValueStringV2(vol,decimal,2,this.LanguageID);
157413
157440
 
157414
157441
  return item;
157415
157442
  }
@@ -161087,7 +161114,7 @@ function HQChartScriptWorker()
161087
161114
 
161088
161115
 
161089
161116
 
161090
- var HQCHART_VERSION="1.1.14842";
161117
+ var HQCHART_VERSION="1.1.14847";
161091
161118
 
161092
161119
  function PrintHQChartVersion()
161093
161120
  {