hqchart 1.1.13614 → 1.1.13636

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.
@@ -4785,6 +4785,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4785
4785
  if (IFrameSplitOperator.IsBool(option.EnableNewIndex)) chart.EnableNewIndex=option.EnableNewIndex;
4786
4786
  if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
4787
4787
  if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
4788
+ if (IFrameSplitOperator.IsBool(option.EnableNightDayBG)) chart.EnableNightDayBG=option.EnableNightDayBG;
4788
4789
 
4789
4790
  if (option.GlobalOption)
4790
4791
  {
@@ -6538,6 +6539,9 @@ var JSCHART_EVENT_ID=
6538
6539
  ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
6539
6540
 
6540
6541
  ON_FORMAT_KLINE_HIGH_LOW_TITLE:154, //K线最高最低价格式化内容
6542
+ ON_CUSTOM_CORSSCURSOR_POSITION:155, //自定义十字光标X轴的输出的位置
6543
+
6544
+ ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX:156, //日盘夜盘的分界线
6541
6545
  }
6542
6546
 
6543
6547
  var JSCHART_OPERATOR_ID=
@@ -12326,6 +12330,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12326
12330
  if (IFrameSplitOperator.IsBool(windowItem.IsShowIndexName)) frame.IsShowIndexName=windowItem.IsShowIndexName;
12327
12331
  if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
12328
12332
  if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
12333
+ if (!IFrameSplitOperator.IsUndefined(windowItem.HorizontalReserved)) frame.HorizontalReserved=windowItem.HorizontalReserved; //Y轴上下预留
12329
12334
  }
12330
12335
 
12331
12336
  if (frameItem)
@@ -14225,7 +14230,7 @@ function IChartFramePainting()
14225
14230
 
14226
14231
  this.YSpecificMaxMin=null; //指定Y轴最大最小值
14227
14232
  this.IsShowBorder = true; //是否显示边框
14228
- this.IsShowTitleArrow=true; //是否显示指标信息上涨下跌箭头
14233
+ this.IsShowTitleArrow=g_JSChartResource.IndexTitle.EnableIndexArrow; //是否显示指标信息上涨下跌箭头
14229
14234
  this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
14230
14235
  this.IsShowIndexName=true; //是否显示指标名字
14231
14236
  this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
@@ -16855,6 +16860,8 @@ function MinuteFrame()
16855
16860
  this.BeforeOpenVerticalInfo=[]; //盘前集合竞价X轴
16856
16861
  this.AfterCloseVerticalInfo=[]; //收盘集合竞价X轴
16857
16862
 
16863
+ this.NightDayConfig=CloneData(g_JSChartResource.Minute.NightDay);
16864
+
16858
16865
  this.DrawFrame=function()
16859
16866
  {
16860
16867
  if (!this.IsMinSize)
@@ -16866,6 +16873,8 @@ function MinuteFrame()
16866
16873
 
16867
16874
  if (this.BeforeDrawXYCallback) this.BeforeDrawXYCallback(this);
16868
16875
 
16876
+ this.DrawNightDayBG(); //绘制夜盘 日盘背景
16877
+
16869
16878
  this.DrawTitleBG();
16870
16879
  this.DrawHorizontal();
16871
16880
  this.DrawVertical();
@@ -17309,6 +17318,86 @@ function MinuteFrame()
17309
17318
  }
17310
17319
  }
17311
17320
 
17321
+ this.DrawNightDayBG=function()
17322
+ {
17323
+ if (this.DayCount!=1) return;
17324
+ if (!this.HQChart) return;
17325
+ if (!this.HQChart.EnableNightDayBG) return;
17326
+
17327
+ var symbol=this.HQChart.Symbol;
17328
+ if (!symbol) return;
17329
+
17330
+ var xIndex=-1;
17331
+ //获取夜盘和日期的分界线X索引位置
17332
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX)
17333
+ if (!event || !event.Callback) return;
17334
+
17335
+ var sendData={ Symbol:symbol, XIndex:xIndex, MinuteTimeStringData:g_MinuteTimeStringData };
17336
+ event.Callback(event,sendData,this);
17337
+ xIndex=sendData.XIndex;
17338
+ if (xIndex<0) return;
17339
+
17340
+ var border=this.ChartBorder.GetBorder();
17341
+ var x=this.GetXFromIndex(xIndex);
17342
+
17343
+ var rtNight={ Left: border.Left, Top:border.TopEx, Right:x, Bottom:border.Bottom };
17344
+ rtNight.Width=rtNight.Right-rtNight.Left;
17345
+ rtNight.Height=rtNight.Bottom-rtNight.Top;
17346
+
17347
+ this.Canvas.fillStyle = this.NightDayConfig.NightBGColor;
17348
+ this.Canvas.fillRect(rtNight.Left, rtNight.Top, rtNight.Width, rtNight.Height);
17349
+
17350
+ if (this.Identify!=0) return;
17351
+
17352
+ //显示 日盘夜盘文字
17353
+ this.Canvas.font=this.NightDayConfig.Font;
17354
+ this.Canvas.textBaseline = "bottom";
17355
+ this.Canvas.textAlign = 'left';
17356
+ var aryTitle=[{ Title:"夜盘", Position:1, Config:this.NightDayConfig.Night }, { Title:"日盘", Position:0,Config:this.NightDayConfig.Day }];
17357
+ var textHeight= this.Canvas.measureText("擎").width;
17358
+ for(var i=0;i<aryTitle.length;++i)
17359
+ {
17360
+ var item=aryTitle[i];
17361
+ var text=g_JSChartLocalization.GetText(item.Title,this.HQChart.LanguageID);
17362
+ var testWidth = this.Canvas.measureText(text).width;
17363
+ var rtItem=
17364
+ {
17365
+ Width:testWidth+item.Config.Margin.Left+item.Config.Margin.Right,
17366
+ Height:textHeight+item.Config.Margin.Top+item.Config.Margin.Bottom,
17367
+ Bottom:border.Bottom
17368
+ };
17369
+ rtItem.Top=rtItem.Bottom-rtItem.Height;
17370
+
17371
+ if (item.Position===1)
17372
+ {
17373
+ rtItem.Right=x-1;
17374
+ rtItem.Left=rtItem.Right-rtItem.Width;
17375
+ }
17376
+ else
17377
+ {
17378
+ rtItem.Left=x+1;
17379
+ rtItem.Right=rtItem.Left+rtItem.Width;
17380
+ }
17381
+
17382
+ if (item.Config.BGColor)
17383
+ {
17384
+ this.Canvas.fillStyle = item.Config.BGColor;
17385
+ this.Canvas.fillRect(rtItem.Left, rtItem.Top, rtItem.Width, rtItem.Height);
17386
+ }
17387
+
17388
+ if (item.Config.BorderColor)
17389
+ {
17390
+ this.Canvas.strokeStyle = item.Config.BorderColor;
17391
+ this.Canvas.strokeRect(ToFixedPoint(rtItem.Left), ToFixedPoint(rtItem.Top), ToFixedRect(rtItem.Width), ToFixedRect(rtItem.Height));
17392
+ }
17393
+
17394
+
17395
+ this.Canvas.fillStyle = item.Config.Color;
17396
+ this.Canvas.fillText(text, rtItem.Left+item.Config.Margin.Left, rtItem.Bottom-item.Config.Margin.Bottom );
17397
+ }
17398
+
17399
+ }
17400
+
17312
17401
  //选中的画图工具X轴坐标信息
17313
17402
  this.DrawPictureXCoordinate=function(drawPicture, range, option)
17314
17403
  {
@@ -18888,6 +18977,89 @@ function MinuteHScreenFrame()
18888
18977
  return this.GetLeftExtendYFromData(value,isLimit,obj);
18889
18978
  }
18890
18979
 
18980
+ this.DrawNightDayBG=function()
18981
+ {
18982
+ if (this.DayCount!=1) return;
18983
+ if (!this.HQChart) return;
18984
+ if (!this.HQChart.EnableNightDayBG) return;
18985
+
18986
+ var symbol=this.HQChart.Symbol;
18987
+ if (!symbol) return;
18988
+
18989
+ var xIndex=-1;
18990
+ //获取夜盘和日期的分界线X索引位置
18991
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX)
18992
+ if (!event || !event.Callback) return;
18993
+
18994
+ var sendData={ Symbol:symbol, XIndex:xIndex, MinuteTimeStringData:g_MinuteTimeStringData };
18995
+ event.Callback(event,sendData,this);
18996
+ xIndex=sendData.XIndex;
18997
+ if (xIndex<0) return;
18998
+
18999
+ var border=this.ChartBorder.GetHScreenBorder();
19000
+ var y=this.GetXFromIndex(xIndex);
19001
+
19002
+ var rtNight={ Left: border.Left, Top:border.Top, Right:border.RightEx, Bottom:y };
19003
+ rtNight.Width=rtNight.Right-rtNight.Left;
19004
+ rtNight.Height=rtNight.Bottom-rtNight.Top;
19005
+
19006
+ this.Canvas.fillStyle = this.NightDayConfig.NightBGColor;
19007
+ this.Canvas.fillRect(rtNight.Left, rtNight.Top, rtNight.Width, rtNight.Height);
19008
+
19009
+ if (this.Identify!=0) return;
19010
+
19011
+ //显示 日盘夜盘文字
19012
+ this.Canvas.font=this.NightDayConfig.Font;
19013
+ this.Canvas.textBaseline = "bottom";
19014
+ this.Canvas.textAlign = 'left';
19015
+ var aryTitle=[{ Title:"夜盘", Position:1, Config:this.NightDayConfig.Night }, { Title:"日盘", Position:0,Config:this.NightDayConfig.Day }];
19016
+ var textHeight= this.Canvas.measureText("擎").width;
19017
+ for(var i=0;i<aryTitle.length;++i)
19018
+ {
19019
+ var item=aryTitle[i];
19020
+ var text=g_JSChartLocalization.GetText(item.Title,this.HQChart.LanguageID);
19021
+ var testWidth = this.Canvas.measureText(text).width;
19022
+ var rtItem=
19023
+ {
19024
+ Height:testWidth+item.Config.Margin.Left+item.Config.Margin.Right,
19025
+ Width:textHeight+item.Config.Margin.Top+item.Config.Margin.Bottom,
19026
+ Left:border.Left
19027
+ };
19028
+ rtItem.Right=rtItem.Left+rtItem.Width;
19029
+
19030
+ if (item.Position===1)
19031
+ {
19032
+ rtItem.Bottom=y-1;
19033
+ rtItem.Top=rtItem.Bottom-rtItem.Height;
19034
+ }
19035
+ else
19036
+ {
19037
+ rtItem.Top=y+1;
19038
+ rtItem.Bottom=rtItem.Top+rtItem.Height;
19039
+ }
19040
+
19041
+ if (item.Config.BGColor)
19042
+ {
19043
+ this.Canvas.fillStyle = item.Config.BGColor;
19044
+ this.Canvas.fillRect(rtItem.Left, rtItem.Top, rtItem.Width, rtItem.Height);
19045
+ }
19046
+
19047
+ if (item.Config.BorderColor)
19048
+ {
19049
+ this.Canvas.strokeStyle = item.Config.BorderColor;
19050
+ this.Canvas.strokeRect(ToFixedPoint(rtItem.Left), ToFixedPoint(rtItem.Top), ToFixedRect(rtItem.Width), ToFixedRect(rtItem.Height));
19051
+ }
19052
+
19053
+ this.Canvas.fillStyle = item.Config.Color;
19054
+ var xText=rtItem.Left;
19055
+ var yText=rtItem.Top;
19056
+ this.Canvas.save();
19057
+ this.Canvas.translate(xText,yText);
19058
+ this.Canvas.rotate(90 * Math.PI / 180);
19059
+ this.Canvas.fillText(text, item.Config.Margin.Left, -item.Config.Margin.Bottom);
19060
+ this.Canvas.restore();
19061
+ }
19062
+ }
18891
19063
 
18892
19064
  }
18893
19065
 
@@ -22814,6 +22986,7 @@ function HQTradeFrame()
22814
22986
  for (var i in this.SubFrame)
22815
22987
  {
22816
22988
  var item = this.SubFrame[i];
22989
+ if (item.Height<=0) continue;
22817
22990
  if (item.Frame.DrawInsideHorizontal) item.Frame.DrawInsideHorizontal();
22818
22991
  }
22819
22992
  }
@@ -53665,8 +53838,8 @@ function ChartCorssCursor()
53665
53838
  }
53666
53839
  }
53667
53840
 
53668
- //X轴 Bottom=10 使用第1个指标框位置
53669
- if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==10) && this.StringFormatX.Operator())
53841
+ //X轴 Bottom==8 自定义
53842
+ if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
53670
53843
  {
53671
53844
  var text=this.StringFormatX.Text;
53672
53845
  this.Canvas.font=this.Font;
@@ -53675,49 +53848,53 @@ function ChartCorssCursor()
53675
53848
 
53676
53849
  var yCenter=bottom+2+this.TextHeight/2;
53677
53850
  var yTop=bottom+2;
53851
+ var bShowText=true;
53678
53852
  if (this.ShowTextMode.Bottom==2)
53679
53853
  {
53680
53854
  yCenter=bottom-this.TextHeight/2-2;
53681
53855
  yTop=bottom-this.TextHeight-2;
53682
53856
  }
53683
- else if (this.ShowTextMode.Bottom==10)
53857
+ else if (this.ShowTextMode.Bottom==8)
53684
53858
  {
53685
- var frame=this.Frame.SubFrame[0].Frame;
53686
- if (frame.GetCorssCursorTop)
53859
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
53860
+ if (event && event.Callback)
53687
53861
  {
53688
- var value=frame.GetCorssCursorTop();
53689
- if (IFrameSplitOperator.IsNumber(value))
53690
- {
53691
- yCenter=value+this.TextHeight/2;
53692
- yTop=value;
53693
- }
53862
+ var sendData={ YCenter:yCenter, YTop:yTop, Height:this.TextHeight, IsShowText:bShowText };
53863
+ event.Callback(event, sendData, this);
53864
+
53865
+ yCenter=sendData.YCenter;
53866
+ yTop=sendData.YTop;
53867
+ bShowText=sendData.IsShowText;
53694
53868
  }
53695
53869
  }
53696
53870
 
53697
53871
  //JSConsole.Chart.Log('[ChartCorssCursor::Draw] ',yCenter);
53698
- if (x-textWidth/2<3) //左边位置不够了, 顶着左边画
53699
- {
53700
- this.DrawTextBGRect(x-1,yTop,textWidth,this.TextHeight);
53701
- this.Canvas.textAlign="left";
53702
- this.Canvas.textBaseline="middle";
53703
- this.Canvas.fillStyle=this.TextColor;
53704
- this.Canvas.fillText(text,x+1,yCenter,textWidth);
53705
- }
53706
- else if (x+textWidth/2>=right)
53872
+ if (bShowText)
53707
53873
  {
53708
- this.DrawTextBGRect(right-textWidth,yTop,textWidth,this.TextHeight);
53709
- this.Canvas.textAlign="right";
53710
- this.Canvas.textBaseline="middle";
53711
- this.Canvas.fillStyle=this.TextColor;
53712
- this.Canvas.fillText(text,right-2,yCenter,textWidth);
53713
- }
53714
- else
53715
- {
53716
- this.DrawTextBGRect(x-textWidth/2,yTop,textWidth,this.TextHeight);
53717
- this.Canvas.textAlign="center";
53718
- this.Canvas.textBaseline="middle";
53719
- this.Canvas.fillStyle=this.TextColor;
53720
- this.Canvas.fillText(text,x,yCenter,textWidth);
53874
+ if (x-textWidth/2<3) //左边位置不够了, 顶着左边画
53875
+ {
53876
+ this.DrawTextBGRect(x-1,yTop,textWidth,this.TextHeight);
53877
+ this.Canvas.textAlign="left";
53878
+ this.Canvas.textBaseline="middle";
53879
+ this.Canvas.fillStyle=this.TextColor;
53880
+ this.Canvas.fillText(text,x+1,yCenter,textWidth);
53881
+ }
53882
+ else if (x+textWidth/2>=right)
53883
+ {
53884
+ this.DrawTextBGRect(right-textWidth,yTop,textWidth,this.TextHeight);
53885
+ this.Canvas.textAlign="right";
53886
+ this.Canvas.textBaseline="middle";
53887
+ this.Canvas.fillStyle=this.TextColor;
53888
+ this.Canvas.fillText(text,right-2,yCenter,textWidth);
53889
+ }
53890
+ else
53891
+ {
53892
+ this.DrawTextBGRect(x-textWidth/2,yTop,textWidth,this.TextHeight);
53893
+ this.Canvas.textAlign="center";
53894
+ this.Canvas.textBaseline="middle";
53895
+ this.Canvas.fillStyle=this.TextColor;
53896
+ this.Canvas.fillText(text,x,yCenter,textWidth);
53897
+ }
53721
53898
  }
53722
53899
  }
53723
53900
 
@@ -54220,8 +54397,8 @@ function ChartCorssCursor()
54220
54397
  }
54221
54398
  }
54222
54399
 
54223
- //X轴 Bottom=10 使用第1个指标框位置
54224
- if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==10) && this.StringFormatX.Operator())
54400
+ //X轴 Bottom=8 自定义X轴文字位置
54401
+ if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
54225
54402
  {
54226
54403
  var text=this.StringFormatX.Text;
54227
54404
  this.Canvas.font=this.Font;
@@ -54229,64 +54406,67 @@ function ChartCorssCursor()
54229
54406
  this.Canvas.fillStyle=this.TextBGColor;
54230
54407
  var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
54231
54408
  var xText=left;
54232
-
54233
- if (this.ShowTextMode.Bottom==10)
54409
+ var bShowText=true;
54410
+ if (this.ShowTextMode.Bottom==8)
54234
54411
  {
54235
- var frame=this.Frame.SubFrame[0].Frame;
54236
- if (frame.GetCorssCursorTop)
54412
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
54413
+ if (event && event.Callback)
54237
54414
  {
54238
- var value=frame.GetCorssCursorTop();
54239
- if (IFrameSplitOperator.IsNumber(value))
54240
- {
54241
- xText=value;
54242
- }
54415
+ var sendData={ XText:xText, Height:this.TextHeight, IsShowText:bShowText };
54416
+ event.Callback(event, sendData, this);
54417
+
54418
+ xText=sendData.XText;
54419
+ bShowText=sendData.IsShowText;
54243
54420
  }
54244
54421
  }
54245
54422
 
54246
- if (y-textWidth/2<3) //左边位置不够了, 顶着左边画
54423
+ if (bShowText)
54247
54424
  {
54248
- var yText=y;
54249
- this.Canvas.save();
54250
- this.Canvas.translate(xText, yText);
54251
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54425
+ if (y-textWidth/2<3) //左边位置不够了, 顶着左边画
54426
+ {
54427
+ var yText=y;
54428
+ this.Canvas.save();
54429
+ this.Canvas.translate(xText, yText);
54430
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54252
54431
 
54253
- this.Canvas.fillRect(0,0,textWidth,this.TextHeight);
54254
- this.Canvas.textAlign="left";
54255
- this.Canvas.textBaseline="middle";
54256
- this.Canvas.fillStyle=this.TextColor;
54257
- this.Canvas.fillText(text,2,this.TextHeight/2,textWidth);
54432
+ this.Canvas.fillRect(0,0,textWidth,this.TextHeight);
54433
+ this.Canvas.textAlign="left";
54434
+ this.Canvas.textBaseline="middle";
54435
+ this.Canvas.fillStyle=this.TextColor;
54436
+ this.Canvas.fillText(text,2,this.TextHeight/2,textWidth);
54258
54437
 
54259
- this.Canvas.restore();
54260
- }
54261
- else if (y+textWidth/2>=bottom)
54262
- {
54263
- var yText=y;
54264
- this.Canvas.save();
54265
- this.Canvas.translate(xText, yText);
54266
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54438
+ this.Canvas.restore();
54439
+ }
54440
+ else if (y+textWidth/2>=bottom)
54441
+ {
54442
+ var yText=y;
54443
+ this.Canvas.save();
54444
+ this.Canvas.translate(xText, yText);
54445
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54267
54446
 
54268
- this.Canvas.fillRect(-textWidth,0,textWidth,this.TextHeight);
54269
- this.Canvas.textAlign="right";
54270
- this.Canvas.textBaseline="middle";
54271
- this.Canvas.fillStyle=this.TextColor;
54272
- this.Canvas.fillText(text,-2,this.TextHeight/2,textWidth);
54447
+ this.Canvas.fillRect(-textWidth,0,textWidth,this.TextHeight);
54448
+ this.Canvas.textAlign="right";
54449
+ this.Canvas.textBaseline="middle";
54450
+ this.Canvas.fillStyle=this.TextColor;
54451
+ this.Canvas.fillText(text,-2,this.TextHeight/2,textWidth);
54273
54452
 
54274
- this.Canvas.restore();
54275
- }
54276
- else
54277
- {
54278
- var yText=y;
54279
- this.Canvas.save();
54280
- this.Canvas.translate(xText, yText);
54281
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54453
+ this.Canvas.restore();
54454
+ }
54455
+ else
54456
+ {
54457
+ var yText=y;
54458
+ this.Canvas.save();
54459
+ this.Canvas.translate(xText, yText);
54460
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54282
54461
 
54283
- this.Canvas.fillRect(-textWidth/2,0,textWidth,this.TextHeight);
54284
- this.Canvas.textAlign="center";
54285
- this.Canvas.textBaseline="middle";
54286
- this.Canvas.fillStyle=this.TextColor;
54287
- this.Canvas.fillText(text,0,this.TextHeight/2,textWidth);
54462
+ this.Canvas.fillRect(-textWidth/2,0,textWidth,this.TextHeight);
54463
+ this.Canvas.textAlign="center";
54464
+ this.Canvas.textBaseline="middle";
54465
+ this.Canvas.fillStyle=this.TextColor;
54466
+ this.Canvas.fillText(text,0,this.TextHeight/2,textWidth);
54288
54467
 
54289
- this.Canvas.restore();
54468
+ this.Canvas.restore();
54469
+ }
54290
54470
  }
54291
54471
  }
54292
54472
 
@@ -70750,6 +70930,14 @@ function JSChartResource()
70750
70930
  Point:{ Color:"rgb(65,105,225)", Radius:2*GetDevicePixelRatio() },
70751
70931
  };
70752
70932
 
70933
+ this.Minute.NightDay=
70934
+ {
70935
+ NightBGColor:"rgba(0,0,0,0.2)",
70936
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
70937
+ Day: { Color:"rgb(0,0,0)", BGColor:"rgb(179,179,179)", BorderColor:"rgb(179,179,179)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
70938
+ Night: { Color:"rgb(0,0,0)", BGColor:"rgb(179,179,179)", BorderColor:"rgb(179,179,179)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
70939
+ }
70940
+
70753
70941
  this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
70754
70942
  this.DefaultTextFont=14*GetDevicePixelRatio() +'px 微软雅黑'; //图形中默认的字体
70755
70943
  this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
@@ -70772,6 +70960,7 @@ function JSChartResource()
70772
70960
  },
70773
70961
 
70774
70962
  ArrowType:0,
70963
+ EnableIndexArrow:true, //指标数值是否带上涨下跌箭头
70775
70964
 
70776
70965
  NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
70777
70966
  }
@@ -72033,6 +72222,29 @@ function JSChartResource()
72033
72222
  if (item.Point.Radius) this.Minute.After.Point.Radius=item.Point.Radius;
72034
72223
  }
72035
72224
  }
72225
+
72226
+ if (style.Minute.NightDay)
72227
+ {
72228
+ var item=style.Minute.NightDay;
72229
+ if (item.NightBGColor) this.Minute.NightDay.NightBGColor=item.NightBGColor;
72230
+ if (item.Font) this.Minute.NightDay.Font=item.Font;
72231
+ if (item.Day)
72232
+ {
72233
+ var subItem=item.Day;
72234
+ if (subItem.Color) this.Minute.NightDay.Day.Color=subItem.Color;
72235
+ if (subItem.BGColor) this.Minute.NightDay.Day.BGColor=subItem.BGColor;
72236
+ if (subItem.BorderColor) this.Minute.NightDay.Day.BorderColor=subItem.BorderColor;
72237
+ CopyMarginConfig(this.Minute.NightDay.Day.Margin,subItem.Margin);
72238
+ }
72239
+ if (item.Night)
72240
+ {
72241
+ var subItem=item.Night;
72242
+ if (subItem.Color) this.Minute.NightDay.Night.Color=subItem.Color;
72243
+ if (subItem.BGColor) this.Minute.NightDay.Night.BGColor=subItem.BGColor;
72244
+ if (subItem.BorderColor) this.Minute.NightDay.Night.BorderColor=subItem.BorderColor;
72245
+ CopyMarginConfig(this.Minute.NightDay.Night.Margin,subItem.Margin);
72246
+ }
72247
+ }
72036
72248
  }
72037
72249
 
72038
72250
  if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
@@ -72073,6 +72285,7 @@ function JSChartResource()
72073
72285
  }
72074
72286
 
72075
72287
  if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
72288
+ if (IFrameSplitOperator.IsBool(item.EnableIndexArrow)) this.IndexTitle.EnableIndexArrow=item.EnableIndexArrow;
72076
72289
 
72077
72290
  if (item.NameArrow)
72078
72291
  {
@@ -73243,7 +73456,11 @@ function JSChartLocalization()
73243
73456
  ["Toolbar-"+JSCHART_BUTTON_ID.CHIP_LONG, {CN:"远期成本分布", EN:"Long chip", TC:"远期成本分布"}],
73244
73457
  ["Toolbar-"+JSCHART_BUTTON_ID.CHIP_DEFULT, {CN:"默认筹码分布", EN:"Default chip", TC:"默认筹码分布"}],
73245
73458
  ["Toolbar-"+JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE, {CN:"删除", EN:"Delete", TC:"删除"}],
73246
- ["Toolbar-"+JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING, {CN:"设置", EN:"Setting", TC:"设置"}]
73459
+ ["Toolbar-"+JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING, {CN:"设置", EN:"Setting", TC:"设置"}],
73460
+
73461
+ //日盘|夜盘
73462
+ ["日盘",{CN:'日盘', EN:'Day', TC:'日盤'}],
73463
+ ["夜盘",{CN:'夜盘', EN:'Night', TC:'夜盤'} ]
73247
73464
  ]);
73248
73465
 
73249
73466
  this.GetText=function(key,language)
@@ -74856,6 +75073,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
74856
75073
  this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
74857
75074
  this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
74858
75075
  this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
75076
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
74859
75077
 
74860
75078
  //创建等待提示
74861
75079
  this.ChartSplashPaint = new ChartSplashPaint();
@@ -81761,6 +81979,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
81761
81979
 
81762
81980
  this.ZoomStepPixel=50;
81763
81981
  this.BaselineType=0; //基准线类型 0=最新昨收盘 1=多日前昨收盘
81982
+ this.EnableNightDayBG=false; //是否启动夜盘背景色
81764
81983
 
81765
81984
  //集合竞价设置 obj={ Left:true/false, Right:true/false, MultiDay:{Left:, Right:} }
81766
81985
  this.SetCallCationDataBorder=function(obj)
@@ -83463,6 +83682,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83463
83682
  this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
83464
83683
  this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
83465
83684
  this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
83685
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
83466
83686
 
83467
83687
 
83468
83688
  //创建等待提示
@@ -83550,6 +83770,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83550
83770
  frame.GlobalOption=this.GlobalOption;
83551
83771
  if (i<2) frame.ChartBorder.TitleHeight=0;
83552
83772
  frame.XPointCount=243;
83773
+ frame.HQChart=this;
83774
+ frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
83553
83775
 
83554
83776
  if (i>=2)
83555
83777
  {
@@ -83639,6 +83861,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83639
83861
  frame.Identify=id; //窗口序号
83640
83862
  frame.XPointCount=243;
83641
83863
  frame.GlobalOption=this.GlobalOption;
83864
+ frame.HQChart=this;
83865
+ frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
83642
83866
 
83643
83867
 
83644
83868
  if (id>=2)
@@ -89072,6 +89296,7 @@ function KLineChartHScreenContainer(uielement)
89072
89296
  this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
89073
89297
  this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
89074
89298
  this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
89299
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
89075
89300
 
89076
89301
  //创建等待提示
89077
89302
  this.ChartSplashPaint = new ChartSplashPaint();
@@ -89217,6 +89442,7 @@ function MinuteChartHScreenContainer(uielement)
89217
89442
  this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
89218
89443
  this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
89219
89444
  this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
89445
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
89220
89446
 
89221
89447
  //创建等待提示
89222
89448
  this.ChartSplashPaint = new ChartSplashPaint();
@@ -89270,6 +89496,8 @@ function MinuteChartHScreenContainer(uielement)
89270
89496
  frame.Identify=i;
89271
89497
  if (i<2) frame.ChartBorder.TitleHeight=0;
89272
89498
  frame.XPointCount=243;
89499
+ frame.HQChart=this;
89500
+ frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
89273
89501
 
89274
89502
  var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
89275
89503
  frame.HorizontalMax=DEFAULT_HORIZONTAL[0];
@@ -122268,6 +122496,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
122268
122496
  if (item.isshow==false) outVarItem.IsShow = false;
122269
122497
  if (item.isexdata==true) outVarItem.IsExData = true;
122270
122498
  if (item.BreakPoint) outVarItem.BreakPoint=item.BreakPoint;
122499
+ if (item.UpColor) outVarItem.UpColor=item.UpColor;
122500
+ if (item.DownColor) outVarItem.DownColor=item.DownColor;
122271
122501
 
122272
122502
  result.push(outVarItem);
122273
122503
  }
@@ -123799,6 +124029,13 @@ function GetBlackStyle()
123799
124029
  {
123800
124030
  BGColor:"rgba(105,105,105,0.5)",
123801
124031
  AvPriceColor:'rgb(248,248,255)' //均线
124032
+ },
124033
+ NightDay:
124034
+ {
124035
+ NightBGColor:"rgb(22,22,22)",
124036
+ Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
124037
+ Day: { Color:"rgb(153,153,153)", BGColor:"rgb(51,51,51)", BorderColor:"rgb(51,51,51)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
124038
+ Night: { Color:"rgb(153,153,153)", BGColor:"rgb(51,51,51)", BorderColor:"rgb(51,51,51)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
123802
124039
  }
123803
124040
  },
123804
124041
 
@@ -137167,7 +137404,7 @@ function ScrollBarBGChart()
137167
137404
 
137168
137405
 
137169
137406
 
137170
- var HQCHART_VERSION="1.1.13613";
137407
+ var HQCHART_VERSION="1.1.13635";
137171
137408
 
137172
137409
  function PrintHQChartVersion()
137173
137410
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13613";
8
+ var HQCHART_VERSION="1.1.13635";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {