hqchart 1.1.12780 → 1.1.12784

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.12780",
3
+ "version": "1.1.12784",
4
4
  "description": "stock chart",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -36692,24 +36692,36 @@ function ChartDrawSVG()
36692
36692
  if (item.Line)
36693
36693
  {
36694
36694
  var lineItem=item.Line;
36695
- var price;
36695
+ var price=null, yPrice=null;
36696
36696
  var kItem=this.Data.Data[item.Index];
36697
- switch(lineItem.Value)
36697
+ if (lineItem.Value=="Bottom")
36698
36698
  {
36699
- case "C":
36700
- price=kItem.Close;
36701
- break;
36702
- case "H":
36703
- price=kItem.High;
36704
- break;
36705
- case "L":
36706
- price=kItem.Low;
36707
- break;
36699
+ yPrice=bottom;
36700
+ }
36701
+ else if (lineItem.Value=="Top")
36702
+ {
36703
+ yPrice=top;
36704
+ }
36705
+ else
36706
+ {
36707
+ switch(lineItem.Value)
36708
+ {
36709
+ case "C":
36710
+ price=kItem.Close;
36711
+ break;
36712
+ case "H":
36713
+ price=kItem.High;
36714
+ break;
36715
+ case "L":
36716
+ price=kItem.Low;
36717
+ break;
36718
+ }
36719
+
36720
+ if (!IFrameSplitOperator.IsNumber(price)) continue;
36721
+
36722
+ yPrice=this.ChartFrame.GetYFromData(price);
36708
36723
  }
36709
-
36710
- if (!IFrameSplitOperator.IsNumber(price)) continue;
36711
36724
 
36712
- var yPrice=this.ChartFrame.GetYFromData(price);
36713
36725
  if (yPrice>=rtSVG.Top && yPrice<=rtSVG.Bottom) continue;
36714
36726
 
36715
36727
  var yText;
@@ -76279,6 +76291,49 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
76279
76291
  JSConsole.Chart.Log(`[MinuteChartContainer::CaclutateLimitPrice] ${this.Symbol} tofixed(2) max:${this.LimitPrice.Max} min:${this.LimitPrice.Min}`);
76280
76292
  }
76281
76293
 
76294
+ this.RequestSingleOverlayMinuteData=function(symbol, date, item)
76295
+ {
76296
+ item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
76297
+
76298
+ if (this.NetworkFilter)
76299
+ {
76300
+ var obj=
76301
+ {
76302
+ Name:'MinuteChartContainer::RequestOverlayMinuteData', //类名::函数名
76303
+ Explain:'叠加股票最新分时数据',
76304
+ Request:{ Url:this.HistoryMinuteApiUrl, Data:{days:[date], symbol:symbol}, Type:'POST' },
76305
+ Self:this,
76306
+ PreventDefault:false
76307
+ };
76308
+ this.NetworkFilter(obj, function(data)
76309
+ {
76310
+ item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
76311
+ this.RecvOverlayMinuteData(data,item);
76312
+ });
76313
+
76314
+ if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
76315
+ }
76316
+
76317
+ //请求数据
76318
+ JSNetwork.HttpRequest({
76319
+ url: this.HistoryMinuteApiUrl,
76320
+ data:
76321
+ {
76322
+ "symbol":symbol,
76323
+ "days": [date],
76324
+ },
76325
+ type:"post",
76326
+ dataType: "json",
76327
+ async:true,
76328
+ success: function (data)
76329
+ {
76330
+ item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
76331
+ //self.RecvMultiOverlayMinuteData([data]);
76332
+ this.RecvOverlayMinuteData(data,item);
76333
+ }
76334
+ });
76335
+ }
76336
+
76282
76337
  //请求叠加数据 (主数据下载完再下载))
76283
76338
  this.RequestOverlayMinuteData=function()
76284
76339
  {
@@ -76293,6 +76348,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
76293
76348
  var symbol=item.Symbol;
76294
76349
  if (!symbol) continue;
76295
76350
 
76351
+ this.RequestSingleOverlayMinuteData(symbol, date, item);
76352
+
76353
+ /*
76296
76354
  item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
76297
76355
 
76298
76356
  if (this.NetworkFilter)
@@ -76332,6 +76390,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
76332
76390
  self.RecvOverlayMinuteData(data,item);
76333
76391
  }
76334
76392
  });
76393
+ */
76335
76394
  }
76336
76395
  }
76337
76396
 
@@ -40836,24 +40836,36 @@ function ChartDrawSVG()
40836
40836
  if (item.Line)
40837
40837
  {
40838
40838
  var lineItem=item.Line;
40839
- var price;
40839
+ var price=null, yPrice=null;
40840
40840
  var kItem=this.Data.Data[item.Index];
40841
- switch(lineItem.Value)
40841
+ if (lineItem.Value=="Bottom")
40842
40842
  {
40843
- case "C":
40844
- price=kItem.Close;
40845
- break;
40846
- case "H":
40847
- price=kItem.High;
40848
- break;
40849
- case "L":
40850
- price=kItem.Low;
40851
- break;
40843
+ yPrice=bottom;
40844
+ }
40845
+ else if (lineItem.Value=="Top")
40846
+ {
40847
+ yPrice=top;
40848
+ }
40849
+ else
40850
+ {
40851
+ switch(lineItem.Value)
40852
+ {
40853
+ case "C":
40854
+ price=kItem.Close;
40855
+ break;
40856
+ case "H":
40857
+ price=kItem.High;
40858
+ break;
40859
+ case "L":
40860
+ price=kItem.Low;
40861
+ break;
40862
+ }
40863
+
40864
+ if (!IFrameSplitOperator.IsNumber(price)) continue;
40865
+
40866
+ yPrice=this.ChartFrame.GetYFromData(price);
40852
40867
  }
40853
-
40854
- if (!IFrameSplitOperator.IsNumber(price)) continue;
40855
40868
 
40856
- var yPrice=this.ChartFrame.GetYFromData(price);
40857
40869
  if (yPrice>=rtSVG.Top && yPrice<=rtSVG.Bottom) continue;
40858
40870
 
40859
40871
  var yText;
@@ -80423,6 +80435,49 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
80423
80435
  JSConsole.Chart.Log(`[MinuteChartContainer::CaclutateLimitPrice] ${this.Symbol} tofixed(2) max:${this.LimitPrice.Max} min:${this.LimitPrice.Min}`);
80424
80436
  }
80425
80437
 
80438
+ this.RequestSingleOverlayMinuteData=function(symbol, date, item)
80439
+ {
80440
+ item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
80441
+
80442
+ if (this.NetworkFilter)
80443
+ {
80444
+ var obj=
80445
+ {
80446
+ Name:'MinuteChartContainer::RequestOverlayMinuteData', //类名::函数名
80447
+ Explain:'叠加股票最新分时数据',
80448
+ Request:{ Url:this.HistoryMinuteApiUrl, Data:{days:[date], symbol:symbol}, Type:'POST' },
80449
+ Self:this,
80450
+ PreventDefault:false
80451
+ };
80452
+ this.NetworkFilter(obj, function(data)
80453
+ {
80454
+ item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
80455
+ this.RecvOverlayMinuteData(data,item);
80456
+ });
80457
+
80458
+ if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
80459
+ }
80460
+
80461
+ //请求数据
80462
+ JSNetwork.HttpRequest({
80463
+ url: this.HistoryMinuteApiUrl,
80464
+ data:
80465
+ {
80466
+ "symbol":symbol,
80467
+ "days": [date],
80468
+ },
80469
+ type:"post",
80470
+ dataType: "json",
80471
+ async:true,
80472
+ success: function (data)
80473
+ {
80474
+ item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
80475
+ //self.RecvMultiOverlayMinuteData([data]);
80476
+ this.RecvOverlayMinuteData(data,item);
80477
+ }
80478
+ });
80479
+ }
80480
+
80426
80481
  //请求叠加数据 (主数据下载完再下载))
80427
80482
  this.RequestOverlayMinuteData=function()
80428
80483
  {
@@ -80437,6 +80492,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
80437
80492
  var symbol=item.Symbol;
80438
80493
  if (!symbol) continue;
80439
80494
 
80495
+ this.RequestSingleOverlayMinuteData(symbol, date, item);
80496
+
80497
+ /*
80440
80498
  item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
80441
80499
 
80442
80500
  if (this.NetworkFilter)
@@ -80476,6 +80534,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
80476
80534
  self.RecvOverlayMinuteData(data,item);
80477
80535
  }
80478
80536
  });
80537
+ */
80479
80538
  }
80480
80539
  }
80481
80540
 
@@ -131387,7 +131446,7 @@ function ScrollBarBGChart()
131387
131446
 
131388
131447
 
131389
131448
 
131390
- var HQCHART_VERSION="1.1.12779";
131449
+ var HQCHART_VERSION="1.1.12783";
131391
131450
 
131392
131451
  function PrintHQChartVersion()
131393
131452
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12779";
8
+ var HQCHART_VERSION="1.1.12783";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -40880,24 +40880,36 @@ function ChartDrawSVG()
40880
40880
  if (item.Line)
40881
40881
  {
40882
40882
  var lineItem=item.Line;
40883
- var price;
40883
+ var price=null, yPrice=null;
40884
40884
  var kItem=this.Data.Data[item.Index];
40885
- switch(lineItem.Value)
40885
+ if (lineItem.Value=="Bottom")
40886
40886
  {
40887
- case "C":
40888
- price=kItem.Close;
40889
- break;
40890
- case "H":
40891
- price=kItem.High;
40892
- break;
40893
- case "L":
40894
- price=kItem.Low;
40895
- break;
40887
+ yPrice=bottom;
40888
+ }
40889
+ else if (lineItem.Value=="Top")
40890
+ {
40891
+ yPrice=top;
40892
+ }
40893
+ else
40894
+ {
40895
+ switch(lineItem.Value)
40896
+ {
40897
+ case "C":
40898
+ price=kItem.Close;
40899
+ break;
40900
+ case "H":
40901
+ price=kItem.High;
40902
+ break;
40903
+ case "L":
40904
+ price=kItem.Low;
40905
+ break;
40906
+ }
40907
+
40908
+ if (!IFrameSplitOperator.IsNumber(price)) continue;
40909
+
40910
+ yPrice=this.ChartFrame.GetYFromData(price);
40896
40911
  }
40897
-
40898
- if (!IFrameSplitOperator.IsNumber(price)) continue;
40899
40912
 
40900
- var yPrice=this.ChartFrame.GetYFromData(price);
40901
40913
  if (yPrice>=rtSVG.Top && yPrice<=rtSVG.Bottom) continue;
40902
40914
 
40903
40915
  var yText;
@@ -80467,6 +80479,49 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
80467
80479
  JSConsole.Chart.Log(`[MinuteChartContainer::CaclutateLimitPrice] ${this.Symbol} tofixed(2) max:${this.LimitPrice.Max} min:${this.LimitPrice.Min}`);
80468
80480
  }
80469
80481
 
80482
+ this.RequestSingleOverlayMinuteData=function(symbol, date, item)
80483
+ {
80484
+ item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
80485
+
80486
+ if (this.NetworkFilter)
80487
+ {
80488
+ var obj=
80489
+ {
80490
+ Name:'MinuteChartContainer::RequestOverlayMinuteData', //类名::函数名
80491
+ Explain:'叠加股票最新分时数据',
80492
+ Request:{ Url:this.HistoryMinuteApiUrl, Data:{days:[date], symbol:symbol}, Type:'POST' },
80493
+ Self:this,
80494
+ PreventDefault:false
80495
+ };
80496
+ this.NetworkFilter(obj, function(data)
80497
+ {
80498
+ item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
80499
+ this.RecvOverlayMinuteData(data,item);
80500
+ });
80501
+
80502
+ if (obj.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
80503
+ }
80504
+
80505
+ //请求数据
80506
+ JSNetwork.HttpRequest({
80507
+ url: this.HistoryMinuteApiUrl,
80508
+ data:
80509
+ {
80510
+ "symbol":symbol,
80511
+ "days": [date],
80512
+ },
80513
+ type:"post",
80514
+ dataType: "json",
80515
+ async:true,
80516
+ success: function (data)
80517
+ {
80518
+ item.Status=OVERLAY_STATUS_ID.STATUS_RECVDATA_ID;
80519
+ //self.RecvMultiOverlayMinuteData([data]);
80520
+ this.RecvOverlayMinuteData(data,item);
80521
+ }
80522
+ });
80523
+ }
80524
+
80470
80525
  //请求叠加数据 (主数据下载完再下载))
80471
80526
  this.RequestOverlayMinuteData=function()
80472
80527
  {
@@ -80481,6 +80536,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
80481
80536
  var symbol=item.Symbol;
80482
80537
  if (!symbol) continue;
80483
80538
 
80539
+ this.RequestSingleOverlayMinuteData(symbol, date, item);
80540
+
80541
+ /*
80484
80542
  item.Status=OVERLAY_STATUS_ID.STATUS_REQUESTDATA_ID;
80485
80543
 
80486
80544
  if (this.NetworkFilter)
@@ -80520,6 +80578,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
80520
80578
  self.RecvOverlayMinuteData(data,item);
80521
80579
  }
80522
80580
  });
80581
+ */
80523
80582
  }
80524
80583
  }
80525
80584
 
@@ -131545,7 +131604,7 @@ function HQChartScriptWorker()
131545
131604
 
131546
131605
 
131547
131606
 
131548
- var HQCHART_VERSION="1.1.12779";
131607
+ var HQCHART_VERSION="1.1.12783";
131549
131608
 
131550
131609
  function PrintHQChartVersion()
131551
131610
  {