hqchart 1.1.13614 → 1.1.13623

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.
@@ -6582,6 +6582,7 @@ var JSCHART_EVENT_ID=
6582
6582
  ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
6583
6583
 
6584
6584
  ON_FORMAT_KLINE_HIGH_LOW_TITLE:154, //K线最高最低价格式化内容
6585
+ ON_CUSTOM_CORSSCURSOR_POSITION:155, //自定义十字光标X轴的输出的位置
6585
6586
  }
6586
6587
 
6587
6588
  var JSCHART_OPERATOR_ID=
@@ -14269,7 +14270,7 @@ function IChartFramePainting()
14269
14270
 
14270
14271
  this.YSpecificMaxMin=null; //指定Y轴最大最小值
14271
14272
  this.IsShowBorder = true; //是否显示边框
14272
- this.IsShowTitleArrow=true; //是否显示指标信息上涨下跌箭头
14273
+ this.IsShowTitleArrow=g_JSChartResource.IndexTitle.EnableIndexArrow; //是否显示指标信息上涨下跌箭头
14273
14274
  this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
14274
14275
  this.IsShowIndexName=true; //是否显示指标名字
14275
14276
  this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
@@ -53709,8 +53710,8 @@ function ChartCorssCursor()
53709
53710
  }
53710
53711
  }
53711
53712
 
53712
- //X轴 Bottom=10 使用第1个指标框位置
53713
- if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==10) && this.StringFormatX.Operator())
53713
+ //X轴 Bottom==8 自定义
53714
+ if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
53714
53715
  {
53715
53716
  var text=this.StringFormatX.Text;
53716
53717
  this.Canvas.font=this.Font;
@@ -53719,49 +53720,53 @@ function ChartCorssCursor()
53719
53720
 
53720
53721
  var yCenter=bottom+2+this.TextHeight/2;
53721
53722
  var yTop=bottom+2;
53723
+ var bShowText=true;
53722
53724
  if (this.ShowTextMode.Bottom==2)
53723
53725
  {
53724
53726
  yCenter=bottom-this.TextHeight/2-2;
53725
53727
  yTop=bottom-this.TextHeight-2;
53726
53728
  }
53727
- else if (this.ShowTextMode.Bottom==10)
53729
+ else if (this.ShowTextMode.Bottom==8)
53728
53730
  {
53729
- var frame=this.Frame.SubFrame[0].Frame;
53730
- if (frame.GetCorssCursorTop)
53731
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
53732
+ if (event && event.Callback)
53731
53733
  {
53732
- var value=frame.GetCorssCursorTop();
53733
- if (IFrameSplitOperator.IsNumber(value))
53734
- {
53735
- yCenter=value+this.TextHeight/2;
53736
- yTop=value;
53737
- }
53734
+ var sendData={ YCenter:yCenter, YTop:yTop, Height:this.TextHeight, IsShowText:bShowText };
53735
+ event.Callback(event, sendData, this);
53736
+
53737
+ yCenter=sendData.YCenter;
53738
+ yTop=sendData.YTop;
53739
+ bShowText=sendData.IsShowText;
53738
53740
  }
53739
53741
  }
53740
53742
 
53741
53743
  //JSConsole.Chart.Log('[ChartCorssCursor::Draw] ',yCenter);
53742
- if (x-textWidth/2<3) //左边位置不够了, 顶着左边画
53744
+ if (bShowText)
53743
53745
  {
53744
- this.DrawTextBGRect(x-1,yTop,textWidth,this.TextHeight);
53745
- this.Canvas.textAlign="left";
53746
- this.Canvas.textBaseline="middle";
53747
- this.Canvas.fillStyle=this.TextColor;
53748
- this.Canvas.fillText(text,x+1,yCenter,textWidth);
53749
- }
53750
- else if (x+textWidth/2>=right)
53751
- {
53752
- this.DrawTextBGRect(right-textWidth,yTop,textWidth,this.TextHeight);
53753
- this.Canvas.textAlign="right";
53754
- this.Canvas.textBaseline="middle";
53755
- this.Canvas.fillStyle=this.TextColor;
53756
- this.Canvas.fillText(text,right-2,yCenter,textWidth);
53757
- }
53758
- else
53759
- {
53760
- this.DrawTextBGRect(x-textWidth/2,yTop,textWidth,this.TextHeight);
53761
- this.Canvas.textAlign="center";
53762
- this.Canvas.textBaseline="middle";
53763
- this.Canvas.fillStyle=this.TextColor;
53764
- this.Canvas.fillText(text,x,yCenter,textWidth);
53746
+ if (x-textWidth/2<3) //左边位置不够了, 顶着左边画
53747
+ {
53748
+ this.DrawTextBGRect(x-1,yTop,textWidth,this.TextHeight);
53749
+ this.Canvas.textAlign="left";
53750
+ this.Canvas.textBaseline="middle";
53751
+ this.Canvas.fillStyle=this.TextColor;
53752
+ this.Canvas.fillText(text,x+1,yCenter,textWidth);
53753
+ }
53754
+ else if (x+textWidth/2>=right)
53755
+ {
53756
+ this.DrawTextBGRect(right-textWidth,yTop,textWidth,this.TextHeight);
53757
+ this.Canvas.textAlign="right";
53758
+ this.Canvas.textBaseline="middle";
53759
+ this.Canvas.fillStyle=this.TextColor;
53760
+ this.Canvas.fillText(text,right-2,yCenter,textWidth);
53761
+ }
53762
+ else
53763
+ {
53764
+ this.DrawTextBGRect(x-textWidth/2,yTop,textWidth,this.TextHeight);
53765
+ this.Canvas.textAlign="center";
53766
+ this.Canvas.textBaseline="middle";
53767
+ this.Canvas.fillStyle=this.TextColor;
53768
+ this.Canvas.fillText(text,x,yCenter,textWidth);
53769
+ }
53765
53770
  }
53766
53771
  }
53767
53772
 
@@ -54265,7 +54270,7 @@ function ChartCorssCursor()
54265
54270
  }
54266
54271
 
54267
54272
  //X轴 Bottom=10 使用第1个指标框位置
54268
- if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==10) && this.StringFormatX.Operator())
54273
+ if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
54269
54274
  {
54270
54275
  var text=this.StringFormatX.Text;
54271
54276
  this.Canvas.font=this.Font;
@@ -54273,64 +54278,67 @@ function ChartCorssCursor()
54273
54278
  this.Canvas.fillStyle=this.TextBGColor;
54274
54279
  var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
54275
54280
  var xText=left;
54276
-
54277
- if (this.ShowTextMode.Bottom==10)
54281
+ var bShowText=true;
54282
+ if (this.ShowTextMode.Bottom==8)
54278
54283
  {
54279
- var frame=this.Frame.SubFrame[0].Frame;
54280
- if (frame.GetCorssCursorTop)
54284
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
54285
+ if (event && event.Callback)
54281
54286
  {
54282
- var value=frame.GetCorssCursorTop();
54283
- if (IFrameSplitOperator.IsNumber(value))
54284
- {
54285
- xText=value;
54286
- }
54287
+ var sendData={ XText:xText, Height:this.TextHeight, IsShowText:bShowText };
54288
+ event.Callback(event, sendData, this);
54289
+
54290
+ xText=sendData.XText;
54291
+ bShowText=sendData.IsShowText;
54287
54292
  }
54288
54293
  }
54289
54294
 
54290
- if (y-textWidth/2<3) //左边位置不够了, 顶着左边画
54295
+ if (bShowText)
54291
54296
  {
54292
- var yText=y;
54293
- this.Canvas.save();
54294
- this.Canvas.translate(xText, yText);
54295
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54297
+ if (y-textWidth/2<3) //左边位置不够了, 顶着左边画
54298
+ {
54299
+ var yText=y;
54300
+ this.Canvas.save();
54301
+ this.Canvas.translate(xText, yText);
54302
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54296
54303
 
54297
- this.Canvas.fillRect(0,0,textWidth,this.TextHeight);
54298
- this.Canvas.textAlign="left";
54299
- this.Canvas.textBaseline="middle";
54300
- this.Canvas.fillStyle=this.TextColor;
54301
- this.Canvas.fillText(text,2,this.TextHeight/2,textWidth);
54304
+ this.Canvas.fillRect(0,0,textWidth,this.TextHeight);
54305
+ this.Canvas.textAlign="left";
54306
+ this.Canvas.textBaseline="middle";
54307
+ this.Canvas.fillStyle=this.TextColor;
54308
+ this.Canvas.fillText(text,2,this.TextHeight/2,textWidth);
54302
54309
 
54303
- this.Canvas.restore();
54304
- }
54305
- else if (y+textWidth/2>=bottom)
54306
- {
54307
- var yText=y;
54308
- this.Canvas.save();
54309
- this.Canvas.translate(xText, yText);
54310
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54310
+ this.Canvas.restore();
54311
+ }
54312
+ else if (y+textWidth/2>=bottom)
54313
+ {
54314
+ var yText=y;
54315
+ this.Canvas.save();
54316
+ this.Canvas.translate(xText, yText);
54317
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54311
54318
 
54312
- this.Canvas.fillRect(-textWidth,0,textWidth,this.TextHeight);
54313
- this.Canvas.textAlign="right";
54314
- this.Canvas.textBaseline="middle";
54315
- this.Canvas.fillStyle=this.TextColor;
54316
- this.Canvas.fillText(text,-2,this.TextHeight/2,textWidth);
54319
+ this.Canvas.fillRect(-textWidth,0,textWidth,this.TextHeight);
54320
+ this.Canvas.textAlign="right";
54321
+ this.Canvas.textBaseline="middle";
54322
+ this.Canvas.fillStyle=this.TextColor;
54323
+ this.Canvas.fillText(text,-2,this.TextHeight/2,textWidth);
54317
54324
 
54318
- this.Canvas.restore();
54319
- }
54320
- else
54321
- {
54322
- var yText=y;
54323
- this.Canvas.save();
54324
- this.Canvas.translate(xText, yText);
54325
- this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54325
+ this.Canvas.restore();
54326
+ }
54327
+ else
54328
+ {
54329
+ var yText=y;
54330
+ this.Canvas.save();
54331
+ this.Canvas.translate(xText, yText);
54332
+ this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
54326
54333
 
54327
- this.Canvas.fillRect(-textWidth/2,0,textWidth,this.TextHeight);
54328
- this.Canvas.textAlign="center";
54329
- this.Canvas.textBaseline="middle";
54330
- this.Canvas.fillStyle=this.TextColor;
54331
- this.Canvas.fillText(text,0,this.TextHeight/2,textWidth);
54334
+ this.Canvas.fillRect(-textWidth/2,0,textWidth,this.TextHeight);
54335
+ this.Canvas.textAlign="center";
54336
+ this.Canvas.textBaseline="middle";
54337
+ this.Canvas.fillStyle=this.TextColor;
54338
+ this.Canvas.fillText(text,0,this.TextHeight/2,textWidth);
54332
54339
 
54333
- this.Canvas.restore();
54340
+ this.Canvas.restore();
54341
+ }
54334
54342
  }
54335
54343
  }
54336
54344
 
@@ -70816,6 +70824,7 @@ function JSChartResource()
70816
70824
  },
70817
70825
 
70818
70826
  ArrowType:0,
70827
+ EnableIndexArrow:true, //指标数值是否带上涨下跌箭头
70819
70828
 
70820
70829
  NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
70821
70830
  }
@@ -72117,6 +72126,7 @@ function JSChartResource()
72117
72126
  }
72118
72127
 
72119
72128
  if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
72129
+ if (IFrameSplitOperator.IsBool(item.EnableIndexArrow)) this.IndexTitle.EnableIndexArrow=item.EnableIndexArrow;
72120
72130
 
72121
72131
  if (item.NameArrow)
72122
72132
  {
@@ -74900,6 +74910,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
74900
74910
  this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
74901
74911
  this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
74902
74912
  this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
74913
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
74903
74914
 
74904
74915
  //创建等待提示
74905
74916
  this.ChartSplashPaint = new ChartSplashPaint();
@@ -83507,6 +83518,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83507
83518
  this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
83508
83519
  this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
83509
83520
  this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
83521
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
83510
83522
 
83511
83523
 
83512
83524
  //创建等待提示
@@ -89116,6 +89128,7 @@ function KLineChartHScreenContainer(uielement)
89116
89128
  this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
89117
89129
  this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
89118
89130
  this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
89131
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
89119
89132
 
89120
89133
  //创建等待提示
89121
89134
  this.ChartSplashPaint = new ChartSplashPaint();
@@ -89261,6 +89274,7 @@ function MinuteChartHScreenContainer(uielement)
89261
89274
  this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
89262
89275
  this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
89263
89276
  this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
89277
+ this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
89264
89278
 
89265
89279
  //创建等待提示
89266
89280
  this.ChartSplashPaint = new ChartSplashPaint();
@@ -141125,7 +141139,7 @@ function HQChartScriptWorker()
141125
141139
 
141126
141140
 
141127
141141
 
141128
- var HQCHART_VERSION="1.1.13613";
141142
+ var HQCHART_VERSION="1.1.13622";
141129
141143
 
141130
141144
  function PrintHQChartVersion()
141131
141145
  {