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=
|
|
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
|
|
53713
|
-
if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==
|
|
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==
|
|
53729
|
+
else if (this.ShowTextMode.Bottom==8)
|
|
53728
53730
|
{
|
|
53729
|
-
var
|
|
53730
|
-
if (
|
|
53731
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
|
|
53732
|
+
if (event && event.Callback)
|
|
53731
53733
|
{
|
|
53732
|
-
var
|
|
53733
|
-
|
|
53734
|
-
|
|
53735
|
-
|
|
53736
|
-
|
|
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 (
|
|
53744
|
+
if (bShowText)
|
|
53743
53745
|
{
|
|
53744
|
-
|
|
53745
|
-
|
|
53746
|
-
|
|
53747
|
-
|
|
53748
|
-
|
|
53749
|
-
|
|
53750
|
-
|
|
53751
|
-
|
|
53752
|
-
|
|
53753
|
-
|
|
53754
|
-
|
|
53755
|
-
|
|
53756
|
-
|
|
53757
|
-
|
|
53758
|
-
|
|
53759
|
-
|
|
53760
|
-
|
|
53761
|
-
|
|
53762
|
-
|
|
53763
|
-
|
|
53764
|
-
|
|
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==
|
|
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==
|
|
54281
|
+
var bShowText=true;
|
|
54282
|
+
if (this.ShowTextMode.Bottom==8)
|
|
54278
54283
|
{
|
|
54279
|
-
var
|
|
54280
|
-
if (
|
|
54284
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
|
|
54285
|
+
if (event && event.Callback)
|
|
54281
54286
|
{
|
|
54282
|
-
var
|
|
54283
|
-
|
|
54284
|
-
|
|
54285
|
-
|
|
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 (
|
|
54295
|
+
if (bShowText)
|
|
54291
54296
|
{
|
|
54292
|
-
|
|
54293
|
-
|
|
54294
|
-
|
|
54295
|
-
|
|
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
|
-
|
|
54298
|
-
|
|
54299
|
-
|
|
54300
|
-
|
|
54301
|
-
|
|
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
|
-
|
|
54304
|
-
|
|
54305
|
-
|
|
54306
|
-
|
|
54307
|
-
|
|
54308
|
-
|
|
54309
|
-
|
|
54310
|
-
|
|
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
|
-
|
|
54313
|
-
|
|
54314
|
-
|
|
54315
|
-
|
|
54316
|
-
|
|
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
|
-
|
|
54319
|
-
|
|
54320
|
-
|
|
54321
|
-
|
|
54322
|
-
|
|
54323
|
-
|
|
54324
|
-
|
|
54325
|
-
|
|
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
|
-
|
|
54328
|
-
|
|
54329
|
-
|
|
54330
|
-
|
|
54331
|
-
|
|
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
|
-
|
|
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.
|
|
141142
|
+
var HQCHART_VERSION="1.1.13622";
|
|
141129
141143
|
|
|
141130
141144
|
function PrintHQChartVersion()
|
|
141131
141145
|
{
|