hqchart 1.1.12499 → 1.1.12505

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hqchart",
3
3
  "description": "stock chart",
4
4
  "author": "jones2000",
5
- "version": "1.1.12499",
5
+ "version": "1.1.12505",
6
6
  "main": "lib/main.js",
7
7
  "private": false,
8
8
  "license": "Apache License 2.0",
@@ -9626,7 +9626,7 @@ function JSDraw(errorHandler,symbolData)
9626
9626
  {
9627
9627
  let drawData=[];
9628
9628
  let result={DrawData:drawData, DrawType:'POLYLINE'};
9629
- let isNumber=typeof(data)=='number';
9629
+ let isNumber=IFrameSplitOperator.IsNumber(data);
9630
9630
 
9631
9631
  let bFirstPoint=false;
9632
9632
  let bSecondPont=false;
@@ -9643,10 +9643,10 @@ function JSDraw(errorHandler,symbolData)
9643
9643
  }
9644
9644
  }
9645
9645
  }
9646
- else
9646
+ else if (Array.isArray(condition))
9647
9647
  {
9648
9648
  var bFind=false;
9649
- for(var i in condition)
9649
+ for(var i=0; i<condition.length; ++i)
9650
9650
  {
9651
9651
  drawData[i]=null;
9652
9652
  if (bFind)
@@ -9665,39 +9665,77 @@ function JSDraw(errorHandler,symbolData)
9665
9665
  }
9666
9666
  else
9667
9667
  {
9668
- let lineCache={Start:{ },End:{ }, List:new Array()};
9669
- for(let i in condition)
9668
+ if (IFrameSplitOperator.IsNumber(condition))
9670
9669
  {
9671
- drawData[i]=null;
9672
- if (bFirstPoint==false && bSecondPont==false)
9670
+ if (!condition) return result;
9671
+ let lineCache={Start:{ },End:{ }, List:[]};
9672
+ for(var i=0;i<data.length;++i)
9673
9673
  {
9674
- if (condition[i]==null || !condition[i]) continue;
9675
- if (i>=data.length || !this.IsNumber(data[i])) continue;
9674
+ drawData[i]=null;
9675
+ if (bFirstPoint==false && bSecondPont==false)
9676
+ {
9677
+ if (!this.IsNumber(data[i])) continue;
9676
9678
 
9677
- bFirstPoint=true;
9678
- lineCache.Start={ID:parseInt(i), Value:data[i]}; //第1个点
9679
- }
9680
- else if (bFirstPoint==true && bSecondPont==false)
9681
- {
9682
- if (condition[i]==null || !condition[i]) continue;
9683
- if (i>=data.length || !this.IsNumber(data[i])) continue;
9679
+ bFirstPoint=true;
9680
+ lineCache.Start={ID:parseInt(i), Value:data[i]}; //第1个点
9681
+ }
9682
+ else if (bFirstPoint==true && bSecondPont==false)
9683
+ {
9684
+ if (!this.IsNumber(data[i])) continue;
9685
+
9686
+ lineCache.End={ID:parseInt(i), Value:data[i]}; //第2个点
9687
+ //根据起始点和结束点 计算中间各个点的数据
9688
+ let lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
9689
+
9690
+ for(let j in lineData)
9691
+ {
9692
+ let item=lineData[j];
9693
+ drawData[item.ID]=item.Value;
9694
+ }
9684
9695
 
9685
- lineCache.End={ID:parseInt(i), Value:data[i]}; //第2个点
9686
- //根据起始点和结束点 计算中间各个点的数据
9687
- let lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
9696
+ let start={ ID:lineCache.End.ID,Value:lineCache.End.Value };
9697
+ lineCache={Start:start,End:{ } };
9698
+ }
9699
+ }
9688
9700
 
9689
- for(let j in lineData)
9701
+ this.CalculateDrawDataExtendLine(drawData);
9702
+ }
9703
+ else
9704
+ {
9705
+ let lineCache={Start:{ },End:{ }, List:[]};
9706
+ for(let i in condition)
9707
+ {
9708
+ drawData[i]=null;
9709
+ if (bFirstPoint==false && bSecondPont==false)
9690
9710
  {
9691
- let item=lineData[j];
9692
- drawData[item.ID]=item.Value;
9711
+ if (condition[i]==null || !condition[i]) continue;
9712
+ if (i>=data.length || !this.IsNumber(data[i])) continue;
9713
+
9714
+ bFirstPoint=true;
9715
+ lineCache.Start={ID:parseInt(i), Value:data[i]}; //第1个点
9693
9716
  }
9717
+ else if (bFirstPoint==true && bSecondPont==false)
9718
+ {
9719
+ if (condition[i]==null || !condition[i]) continue;
9720
+ if (i>=data.length || !this.IsNumber(data[i])) continue;
9694
9721
 
9695
- let start={ ID:lineCache.End.ID,Value:lineCache.End.Value };
9696
- lineCache={Start:start,End:{ } };
9722
+ lineCache.End={ID:parseInt(i), Value:data[i]}; //第2个点
9723
+ //根据起始点和结束点 计算中间各个点的数据
9724
+ let lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
9725
+
9726
+ for(let j in lineData)
9727
+ {
9728
+ let item=lineData[j];
9729
+ drawData[item.ID]=item.Value;
9730
+ }
9731
+
9732
+ let start={ ID:lineCache.End.ID,Value:lineCache.End.Value };
9733
+ lineCache={Start:start,End:{ } };
9734
+ }
9697
9735
  }
9698
- }
9699
9736
 
9700
- this.CalculateDrawDataExtendLine(drawData);
9737
+ this.CalculateDrawDataExtendLine(drawData);
9738
+ }
9701
9739
  }
9702
9740
 
9703
9741
  return result
@@ -47135,7 +47135,16 @@ function HistoryDataStringFormat()
47135
47135
 
47136
47136
  this.Width=157;
47137
47137
  if (this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID) this.Width=180;
47138
+ var titleData=this.GetFormatTitle(data);
47139
+ if (!titleData) return false;
47140
+ var outData=this.GenerateTitleHtml(titleData);
47141
+ if (!outData) return false;
47138
47142
 
47143
+ this.Text=outData.Html;
47144
+ this.Height=outData.LineCount*this.LineHeight;
47145
+ return true;
47146
+
47147
+ /*
47139
47148
  var date=new Date(parseInt(data.Date/10000),(data.Date/100%100-1),data.Date%100);
47140
47149
  var strDate=IFrameSplitOperator.FormatDateString(data.Date);
47141
47150
  var title2=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],this.LanguageID);
@@ -47225,6 +47234,178 @@ function HistoryDataStringFormat()
47225
47234
 
47226
47235
  this.Height=this.LineCount*this.LineHeight;
47227
47236
  return true;
47237
+ */
47238
+ }
47239
+
47240
+ this.GenerateTitleHtml=function(data)
47241
+ {
47242
+ var lineCount=0;
47243
+ var strHtml="", text;
47244
+ if (data.Name)
47245
+ {
47246
+ text=`<span style='color:rgb(0,0,0);font:微软雅黑;font-size:12px;text-align:center;display: block;'>${data.Name}</span>`;
47247
+ strHtml+=text;
47248
+ ++lineCount;
47249
+ }
47250
+
47251
+ if (data.Title)
47252
+ {
47253
+ text=`<span class='tooltip-title'>${data.Title}</span>`;
47254
+ strHtml+=text;
47255
+ ++lineCount;
47256
+ }
47257
+
47258
+ if (IFrameSplitOperator.IsNonEmptyArray(data.AryText))
47259
+ {
47260
+ for(var i=0;i<data.AryText.length;++i)
47261
+ {
47262
+ var item=data.AryText[i];
47263
+ if (i>0) strHtml+='<br/>';
47264
+ var text=`<span class='tooltip-con'>${item.Title}</span><span class='tooltip-num' style='color:${item.Color};'>${item.Text}</span>`;
47265
+ strHtml+=text;
47266
+ ++lineCount;
47267
+ }
47268
+ }
47269
+
47270
+ return { Html:strHtml, LineCount:lineCount };
47271
+ }
47272
+
47273
+ this.GetFormatTitle=function(data)
47274
+ {
47275
+ if (!data) return null;
47276
+
47277
+ var upperSymbol=this.Symbol.toUpperCase();
47278
+ var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
47279
+ var date=new Date(parseInt(data.Date/10000),(data.Date/100%100-1),data.Date%100);
47280
+ var strDate=IFrameSplitOperator.FormatDateString(data.Date);
47281
+
47282
+ var title2=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],this.LanguageID);
47283
+ var isTickPeriod=ChartData.IsTickPeriod(this.Value.ChartPaint.Data.Period);
47284
+ if (ChartData.IsMinutePeriod(this.Value.ChartPaint.Data.Period,true)) // 分钟周期
47285
+ {
47286
+ title2=IFrameSplitOperator.FormatTimeString(data.Time);
47287
+ }
47288
+ else if (ChartData.IsSecondPeriod(this.Value.ChartPaint.Data.Period) || isTickPeriod)
47289
+ {
47290
+ title2=IFrameSplitOperator.FormatTimeString(data.Time,'HH:MM:SS');
47291
+ }
47292
+
47293
+ var result={ AryText:null, Title:`${strDate}&nbsp&nbsp${title2}`, Name:null };
47294
+ if (isTickPeriod)
47295
+ {
47296
+ var aryText=
47297
+ [
47298
+ {
47299
+ Title:g_JSChartLocalization.GetText('DivTooltip-Price',this.LanguageID),
47300
+ Text:IFrameSplitOperator.IsNumber(data.Open)? data.Open.toFixed(defaultfloatPrecision):'--',
47301
+ Color:this.GetColor(data.Open,data.YClose)
47302
+ },
47303
+ ];
47304
+
47305
+ if (IFrameSplitOperator.IsNumber(data.YClose))
47306
+ {
47307
+ var increase=(data.Close-data.YClose)/data.YClose*100;
47308
+ var item=
47309
+ {
47310
+ Title:g_JSChartLocalization.GetText('DivTooltip-Increase',this.LanguageID),
47311
+ Text:`${increase.toFixed(2)}%`,
47312
+ Color:this.GetColor(increase,0)
47313
+ }
47314
+ aryText.push(item);
47315
+ }
47316
+
47317
+ result.AryText=aryText;
47318
+ }
47319
+ else if (data.IsNonTrade)
47320
+ {
47321
+
47322
+ }
47323
+ else
47324
+ {
47325
+ var vol=data.Vol;
47326
+ if (upperSymbol && MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol)) vol/=100; //A股统一转成手
47327
+ var eventUnchangeKLine=null; //定制平盘K线颜色事件
47328
+ if (this.GetEventCallback) eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_TITLE_COLOR);
47329
+
47330
+ var aryText=
47331
+ [
47332
+ {
47333
+ Title:g_JSChartLocalization.GetText('DivTooltip-Open',this.LanguageID),
47334
+ Text:IFrameSplitOperator.IsNumber(data.Open)? data.Open.toFixed(defaultfloatPrecision):'--',
47335
+ Color:this.GetPriceColor("DivTooltip-Open",data.Open,data.YClose,data,eventUnchangeKLine),
47336
+ },
47337
+ {
47338
+ Title:g_JSChartLocalization.GetText('DivTooltip-High',this.LanguageID),
47339
+ Text:IFrameSplitOperator.IsNumber(data.High)? data.High.toFixed(defaultfloatPrecision):'--',
47340
+ Color:this.GetPriceColor("DivTooltip-High",data.High,data.YClose,data,eventUnchangeKLine)
47341
+ },
47342
+ {
47343
+ Title:g_JSChartLocalization.GetText('DivTooltip-Low',this.LanguageID),
47344
+ Text:IFrameSplitOperator.IsNumber(data.Low)? data.Low.toFixed(defaultfloatPrecision):'--',
47345
+ Color:this.GetPriceColor('DivTooltip-Low',data.Low,data.YClose,data,eventUnchangeKLine)
47346
+ },
47347
+ {
47348
+ Title:g_JSChartLocalization.GetText('DivTooltip-Close',this.LanguageID),
47349
+ Text:IFrameSplitOperator.IsNumber(data.Close)? data.Close.toFixed(defaultfloatPrecision):'--',
47350
+ Color:this.GetPriceColor('DivTooltip-Close',data.Close,data.YClose,data,eventUnchangeKLine)
47351
+ },
47352
+ {
47353
+ Title:g_JSChartLocalization.GetText('DivTooltip-Vol',this.LanguageID),
47354
+ Text:IFrameSplitOperator.IsNumber(vol)? IFrameSplitOperator.FormatValueString(vol,2,this.LanguageID):'--',
47355
+ Color:this.VolColor
47356
+ },
47357
+ {
47358
+ Title:g_JSChartLocalization.GetText('DivTooltip-Amount',this.LanguageID),
47359
+ Text:IFrameSplitOperator.IsNumber(data.Amount)? IFrameSplitOperator.FormatValueString(data.Amount,2,this.LanguageID):'--',
47360
+ Color:this.AmountColor
47361
+ }
47362
+ ];
47363
+
47364
+ if (IFrameSplitOperator.IsNumber(data.YClose))
47365
+ {
47366
+ var increase=(data.Close-data.YClose)/data.YClose*100;
47367
+ var item=
47368
+ {
47369
+ Title:g_JSChartLocalization.GetText('DivTooltip-Increase',this.LanguageID),
47370
+ Text:`${increase.toFixed(2)}%`,
47371
+ Color:this.GetColor(increase,0)
47372
+ }
47373
+ aryText.push(item);
47374
+ }
47375
+
47376
+ if(MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol) && data.FlowCapital>0) //换手率
47377
+ {
47378
+ var value=data.Vol/data.FlowCapital*100;
47379
+ var item=
47380
+ {
47381
+ Title:g_JSChartLocalization.GetText('DivTooltip-Exchange',this.LanguageID),
47382
+ Text:`${value.toFixed(2)}%`,
47383
+ Color:this.TurnoverRateColor
47384
+ }
47385
+ aryText.push(item);
47386
+ }
47387
+
47388
+ if (MARKET_SUFFIX_NAME.IsFutures(upperSymbol) && IFrameSplitOperator.IsNumber(data.Position))
47389
+ {
47390
+ var item=
47391
+ {
47392
+ Title:g_JSChartLocalization.GetText('DivTooltip-Position',this.LanguageID),
47393
+ Text:`${data.Position}`,
47394
+ Color:this.PositionColor
47395
+ }
47396
+ }
47397
+
47398
+ //叠加股票
47399
+ if (this.Value.ChartPaint.Name=="Overlay-KLine")
47400
+ {
47401
+ result.Name=this.Value.ChartPaint.Title;
47402
+ }
47403
+
47404
+ result.AryText=aryText;
47405
+ }
47406
+
47407
+
47408
+ return result;
47228
47409
  }
47229
47410
 
47230
47411
  this.GetColor=function(price,yclse)
@@ -51215,7 +51215,16 @@ function HistoryDataStringFormat()
51215
51215
 
51216
51216
  this.Width=157;
51217
51217
  if (this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID) this.Width=180;
51218
+ var titleData=this.GetFormatTitle(data);
51219
+ if (!titleData) return false;
51220
+ var outData=this.GenerateTitleHtml(titleData);
51221
+ if (!outData) return false;
51218
51222
 
51223
+ this.Text=outData.Html;
51224
+ this.Height=outData.LineCount*this.LineHeight;
51225
+ return true;
51226
+
51227
+ /*
51219
51228
  var date=new Date(parseInt(data.Date/10000),(data.Date/100%100-1),data.Date%100);
51220
51229
  var strDate=IFrameSplitOperator.FormatDateString(data.Date);
51221
51230
  var title2=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],this.LanguageID);
@@ -51305,6 +51314,178 @@ function HistoryDataStringFormat()
51305
51314
 
51306
51315
  this.Height=this.LineCount*this.LineHeight;
51307
51316
  return true;
51317
+ */
51318
+ }
51319
+
51320
+ this.GenerateTitleHtml=function(data)
51321
+ {
51322
+ var lineCount=0;
51323
+ var strHtml="", text;
51324
+ if (data.Name)
51325
+ {
51326
+ text=`<span style='color:rgb(0,0,0);font:微软雅黑;font-size:12px;text-align:center;display: block;'>${data.Name}</span>`;
51327
+ strHtml+=text;
51328
+ ++lineCount;
51329
+ }
51330
+
51331
+ if (data.Title)
51332
+ {
51333
+ text=`<span class='tooltip-title'>${data.Title}</span>`;
51334
+ strHtml+=text;
51335
+ ++lineCount;
51336
+ }
51337
+
51338
+ if (IFrameSplitOperator.IsNonEmptyArray(data.AryText))
51339
+ {
51340
+ for(var i=0;i<data.AryText.length;++i)
51341
+ {
51342
+ var item=data.AryText[i];
51343
+ if (i>0) strHtml+='<br/>';
51344
+ var text=`<span class='tooltip-con'>${item.Title}</span><span class='tooltip-num' style='color:${item.Color};'>${item.Text}</span>`;
51345
+ strHtml+=text;
51346
+ ++lineCount;
51347
+ }
51348
+ }
51349
+
51350
+ return { Html:strHtml, LineCount:lineCount };
51351
+ }
51352
+
51353
+ this.GetFormatTitle=function(data)
51354
+ {
51355
+ if (!data) return null;
51356
+
51357
+ var upperSymbol=this.Symbol.toUpperCase();
51358
+ var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
51359
+ var date=new Date(parseInt(data.Date/10000),(data.Date/100%100-1),data.Date%100);
51360
+ var strDate=IFrameSplitOperator.FormatDateString(data.Date);
51361
+
51362
+ var title2=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],this.LanguageID);
51363
+ var isTickPeriod=ChartData.IsTickPeriod(this.Value.ChartPaint.Data.Period);
51364
+ if (ChartData.IsMinutePeriod(this.Value.ChartPaint.Data.Period,true)) // 分钟周期
51365
+ {
51366
+ title2=IFrameSplitOperator.FormatTimeString(data.Time);
51367
+ }
51368
+ else if (ChartData.IsSecondPeriod(this.Value.ChartPaint.Data.Period) || isTickPeriod)
51369
+ {
51370
+ title2=IFrameSplitOperator.FormatTimeString(data.Time,'HH:MM:SS');
51371
+ }
51372
+
51373
+ var result={ AryText:null, Title:`${strDate}&nbsp&nbsp${title2}`, Name:null };
51374
+ if (isTickPeriod)
51375
+ {
51376
+ var aryText=
51377
+ [
51378
+ {
51379
+ Title:g_JSChartLocalization.GetText('DivTooltip-Price',this.LanguageID),
51380
+ Text:IFrameSplitOperator.IsNumber(data.Open)? data.Open.toFixed(defaultfloatPrecision):'--',
51381
+ Color:this.GetColor(data.Open,data.YClose)
51382
+ },
51383
+ ];
51384
+
51385
+ if (IFrameSplitOperator.IsNumber(data.YClose))
51386
+ {
51387
+ var increase=(data.Close-data.YClose)/data.YClose*100;
51388
+ var item=
51389
+ {
51390
+ Title:g_JSChartLocalization.GetText('DivTooltip-Increase',this.LanguageID),
51391
+ Text:`${increase.toFixed(2)}%`,
51392
+ Color:this.GetColor(increase,0)
51393
+ }
51394
+ aryText.push(item);
51395
+ }
51396
+
51397
+ result.AryText=aryText;
51398
+ }
51399
+ else if (data.IsNonTrade)
51400
+ {
51401
+
51402
+ }
51403
+ else
51404
+ {
51405
+ var vol=data.Vol;
51406
+ if (upperSymbol && MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol)) vol/=100; //A股统一转成手
51407
+ var eventUnchangeKLine=null; //定制平盘K线颜色事件
51408
+ if (this.GetEventCallback) eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_TITLE_COLOR);
51409
+
51410
+ var aryText=
51411
+ [
51412
+ {
51413
+ Title:g_JSChartLocalization.GetText('DivTooltip-Open',this.LanguageID),
51414
+ Text:IFrameSplitOperator.IsNumber(data.Open)? data.Open.toFixed(defaultfloatPrecision):'--',
51415
+ Color:this.GetPriceColor("DivTooltip-Open",data.Open,data.YClose,data,eventUnchangeKLine),
51416
+ },
51417
+ {
51418
+ Title:g_JSChartLocalization.GetText('DivTooltip-High',this.LanguageID),
51419
+ Text:IFrameSplitOperator.IsNumber(data.High)? data.High.toFixed(defaultfloatPrecision):'--',
51420
+ Color:this.GetPriceColor("DivTooltip-High",data.High,data.YClose,data,eventUnchangeKLine)
51421
+ },
51422
+ {
51423
+ Title:g_JSChartLocalization.GetText('DivTooltip-Low',this.LanguageID),
51424
+ Text:IFrameSplitOperator.IsNumber(data.Low)? data.Low.toFixed(defaultfloatPrecision):'--',
51425
+ Color:this.GetPriceColor('DivTooltip-Low',data.Low,data.YClose,data,eventUnchangeKLine)
51426
+ },
51427
+ {
51428
+ Title:g_JSChartLocalization.GetText('DivTooltip-Close',this.LanguageID),
51429
+ Text:IFrameSplitOperator.IsNumber(data.Close)? data.Close.toFixed(defaultfloatPrecision):'--',
51430
+ Color:this.GetPriceColor('DivTooltip-Close',data.Close,data.YClose,data,eventUnchangeKLine)
51431
+ },
51432
+ {
51433
+ Title:g_JSChartLocalization.GetText('DivTooltip-Vol',this.LanguageID),
51434
+ Text:IFrameSplitOperator.IsNumber(vol)? IFrameSplitOperator.FormatValueString(vol,2,this.LanguageID):'--',
51435
+ Color:this.VolColor
51436
+ },
51437
+ {
51438
+ Title:g_JSChartLocalization.GetText('DivTooltip-Amount',this.LanguageID),
51439
+ Text:IFrameSplitOperator.IsNumber(data.Amount)? IFrameSplitOperator.FormatValueString(data.Amount,2,this.LanguageID):'--',
51440
+ Color:this.AmountColor
51441
+ }
51442
+ ];
51443
+
51444
+ if (IFrameSplitOperator.IsNumber(data.YClose))
51445
+ {
51446
+ var increase=(data.Close-data.YClose)/data.YClose*100;
51447
+ var item=
51448
+ {
51449
+ Title:g_JSChartLocalization.GetText('DivTooltip-Increase',this.LanguageID),
51450
+ Text:`${increase.toFixed(2)}%`,
51451
+ Color:this.GetColor(increase,0)
51452
+ }
51453
+ aryText.push(item);
51454
+ }
51455
+
51456
+ if(MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol) && data.FlowCapital>0) //换手率
51457
+ {
51458
+ var value=data.Vol/data.FlowCapital*100;
51459
+ var item=
51460
+ {
51461
+ Title:g_JSChartLocalization.GetText('DivTooltip-Exchange',this.LanguageID),
51462
+ Text:`${value.toFixed(2)}%`,
51463
+ Color:this.TurnoverRateColor
51464
+ }
51465
+ aryText.push(item);
51466
+ }
51467
+
51468
+ if (MARKET_SUFFIX_NAME.IsFutures(upperSymbol) && IFrameSplitOperator.IsNumber(data.Position))
51469
+ {
51470
+ var item=
51471
+ {
51472
+ Title:g_JSChartLocalization.GetText('DivTooltip-Position',this.LanguageID),
51473
+ Text:`${data.Position}`,
51474
+ Color:this.PositionColor
51475
+ }
51476
+ }
51477
+
51478
+ //叠加股票
51479
+ if (this.Value.ChartPaint.Name=="Overlay-KLine")
51480
+ {
51481
+ result.Name=this.Value.ChartPaint.Title;
51482
+ }
51483
+
51484
+ result.AryText=aryText;
51485
+ }
51486
+
51487
+
51488
+ return result;
51308
51489
  }
51309
51490
 
51310
51491
  this.GetColor=function(price,yclse)
@@ -102078,7 +102259,7 @@ function JSDraw(errorHandler,symbolData)
102078
102259
  {
102079
102260
  let drawData=[];
102080
102261
  let result={DrawData:drawData, DrawType:'POLYLINE'};
102081
- let isNumber=typeof(data)=='number';
102262
+ let isNumber=IFrameSplitOperator.IsNumber(data);
102082
102263
 
102083
102264
  let bFirstPoint=false;
102084
102265
  let bSecondPont=false;
@@ -102095,10 +102276,10 @@ function JSDraw(errorHandler,symbolData)
102095
102276
  }
102096
102277
  }
102097
102278
  }
102098
- else
102279
+ else if (Array.isArray(condition))
102099
102280
  {
102100
102281
  var bFind=false;
102101
- for(var i in condition)
102282
+ for(var i=0; i<condition.length; ++i)
102102
102283
  {
102103
102284
  drawData[i]=null;
102104
102285
  if (bFind)
@@ -102117,39 +102298,77 @@ function JSDraw(errorHandler,symbolData)
102117
102298
  }
102118
102299
  else
102119
102300
  {
102120
- let lineCache={Start:{ },End:{ }, List:new Array()};
102121
- for(let i in condition)
102301
+ if (IFrameSplitOperator.IsNumber(condition))
102122
102302
  {
102123
- drawData[i]=null;
102124
- if (bFirstPoint==false && bSecondPont==false)
102303
+ if (!condition) return result;
102304
+ let lineCache={Start:{ },End:{ }, List:[]};
102305
+ for(var i=0;i<data.length;++i)
102125
102306
  {
102126
- if (condition[i]==null || !condition[i]) continue;
102127
- if (i>=data.length || !this.IsNumber(data[i])) continue;
102307
+ drawData[i]=null;
102308
+ if (bFirstPoint==false && bSecondPont==false)
102309
+ {
102310
+ if (!this.IsNumber(data[i])) continue;
102128
102311
 
102129
- bFirstPoint=true;
102130
- lineCache.Start={ID:parseInt(i), Value:data[i]}; //第1个点
102131
- }
102132
- else if (bFirstPoint==true && bSecondPont==false)
102133
- {
102134
- if (condition[i]==null || !condition[i]) continue;
102135
- if (i>=data.length || !this.IsNumber(data[i])) continue;
102312
+ bFirstPoint=true;
102313
+ lineCache.Start={ID:parseInt(i), Value:data[i]}; //第1个点
102314
+ }
102315
+ else if (bFirstPoint==true && bSecondPont==false)
102316
+ {
102317
+ if (!this.IsNumber(data[i])) continue;
102136
102318
 
102137
- lineCache.End={ID:parseInt(i), Value:data[i]}; //第2个点
102138
- //根据起始点和结束点 计算中间各个点的数据
102139
- let lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
102319
+ lineCache.End={ID:parseInt(i), Value:data[i]}; //第2个点
102320
+ //根据起始点和结束点 计算中间各个点的数据
102321
+ let lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
102322
+
102323
+ for(let j in lineData)
102324
+ {
102325
+ let item=lineData[j];
102326
+ drawData[item.ID]=item.Value;
102327
+ }
102328
+
102329
+ let start={ ID:lineCache.End.ID,Value:lineCache.End.Value };
102330
+ lineCache={Start:start,End:{ } };
102331
+ }
102332
+ }
102140
102333
 
102141
- for(let j in lineData)
102334
+ this.CalculateDrawDataExtendLine(drawData);
102335
+ }
102336
+ else
102337
+ {
102338
+ let lineCache={Start:{ },End:{ }, List:[]};
102339
+ for(let i in condition)
102340
+ {
102341
+ drawData[i]=null;
102342
+ if (bFirstPoint==false && bSecondPont==false)
102142
102343
  {
102143
- let item=lineData[j];
102144
- drawData[item.ID]=item.Value;
102344
+ if (condition[i]==null || !condition[i]) continue;
102345
+ if (i>=data.length || !this.IsNumber(data[i])) continue;
102346
+
102347
+ bFirstPoint=true;
102348
+ lineCache.Start={ID:parseInt(i), Value:data[i]}; //第1个点
102145
102349
  }
102350
+ else if (bFirstPoint==true && bSecondPont==false)
102351
+ {
102352
+ if (condition[i]==null || !condition[i]) continue;
102353
+ if (i>=data.length || !this.IsNumber(data[i])) continue;
102354
+
102355
+ lineCache.End={ID:parseInt(i), Value:data[i]}; //第2个点
102356
+ //根据起始点和结束点 计算中间各个点的数据
102357
+ let lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
102146
102358
 
102147
- let start={ ID:lineCache.End.ID,Value:lineCache.End.Value };
102148
- lineCache={Start:start,End:{ } };
102359
+ for(let j in lineData)
102360
+ {
102361
+ let item=lineData[j];
102362
+ drawData[item.ID]=item.Value;
102363
+ }
102364
+
102365
+ let start={ ID:lineCache.End.ID,Value:lineCache.End.Value };
102366
+ lineCache={Start:start,End:{ } };
102367
+ }
102149
102368
  }
102150
- }
102151
102369
 
102152
- this.CalculateDrawDataExtendLine(drawData);
102370
+ this.CalculateDrawDataExtendLine(drawData);
102371
+ }
102153
102372
  }
102154
102373
 
102155
102374
  return result
@@ -128103,7 +128322,7 @@ function ScrollBarBGChart()
128103
128322
 
128104
128323
 
128105
128324
 
128106
- var HQCHART_VERSION="1.1.12498";
128325
+ var HQCHART_VERSION="1.1.12504";
128107
128326
 
128108
128327
  function PrintHQChartVersion()
128109
128328
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12498";
8
+ var HQCHART_VERSION="1.1.12504";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {