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.
- package/lib/umychart.vue.js +42 -31
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +2 -0
- package/src/jscommon/umychart.js +311 -83
- package/src/jscommon/umychart.style.js +7 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +321 -84
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +321 -84
|
@@ -4829,6 +4829,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4829
4829
|
if (IFrameSplitOperator.IsBool(option.EnableNewIndex)) chart.EnableNewIndex=option.EnableNewIndex;
|
|
4830
4830
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
4831
4831
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
4832
|
+
if (IFrameSplitOperator.IsBool(option.EnableNightDayBG)) chart.EnableNightDayBG=option.EnableNightDayBG;
|
|
4832
4833
|
|
|
4833
4834
|
if (option.GlobalOption)
|
|
4834
4835
|
{
|
|
@@ -6582,6 +6583,9 @@ var JSCHART_EVENT_ID=
|
|
|
6582
6583
|
ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
|
|
6583
6584
|
|
|
6584
6585
|
ON_FORMAT_KLINE_HIGH_LOW_TITLE:154, //K线最高最低价格式化内容
|
|
6586
|
+
ON_CUSTOM_CORSSCURSOR_POSITION:155, //自定义十字光标X轴的输出的位置
|
|
6587
|
+
|
|
6588
|
+
ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX:156, //日盘夜盘的分界线
|
|
6585
6589
|
}
|
|
6586
6590
|
|
|
6587
6591
|
var JSCHART_OPERATOR_ID=
|
|
@@ -12370,6 +12374,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12370
12374
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowIndexName)) frame.IsShowIndexName=windowItem.IsShowIndexName;
|
|
12371
12375
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
|
|
12372
12376
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
|
|
12377
|
+
if (!IFrameSplitOperator.IsUndefined(windowItem.HorizontalReserved)) frame.HorizontalReserved=windowItem.HorizontalReserved; //Y轴上下预留
|
|
12373
12378
|
}
|
|
12374
12379
|
|
|
12375
12380
|
if (frameItem)
|
|
@@ -14269,7 +14274,7 @@ function IChartFramePainting()
|
|
|
14269
14274
|
|
|
14270
14275
|
this.YSpecificMaxMin=null; //指定Y轴最大最小值
|
|
14271
14276
|
this.IsShowBorder = true; //是否显示边框
|
|
14272
|
-
this.IsShowTitleArrow=
|
|
14277
|
+
this.IsShowTitleArrow=g_JSChartResource.IndexTitle.EnableIndexArrow; //是否显示指标信息上涨下跌箭头
|
|
14273
14278
|
this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
|
|
14274
14279
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
14275
14280
|
this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
|
|
@@ -16899,6 +16904,8 @@ function MinuteFrame()
|
|
|
16899
16904
|
this.BeforeOpenVerticalInfo=[]; //盘前集合竞价X轴
|
|
16900
16905
|
this.AfterCloseVerticalInfo=[]; //收盘集合竞价X轴
|
|
16901
16906
|
|
|
16907
|
+
this.NightDayConfig=CloneData(g_JSChartResource.Minute.NightDay);
|
|
16908
|
+
|
|
16902
16909
|
this.DrawFrame=function()
|
|
16903
16910
|
{
|
|
16904
16911
|
if (!this.IsMinSize)
|
|
@@ -16910,6 +16917,8 @@ function MinuteFrame()
|
|
|
16910
16917
|
|
|
16911
16918
|
if (this.BeforeDrawXYCallback) this.BeforeDrawXYCallback(this);
|
|
16912
16919
|
|
|
16920
|
+
this.DrawNightDayBG(); //绘制夜盘 日盘背景
|
|
16921
|
+
|
|
16913
16922
|
this.DrawTitleBG();
|
|
16914
16923
|
this.DrawHorizontal();
|
|
16915
16924
|
this.DrawVertical();
|
|
@@ -17353,6 +17362,86 @@ function MinuteFrame()
|
|
|
17353
17362
|
}
|
|
17354
17363
|
}
|
|
17355
17364
|
|
|
17365
|
+
this.DrawNightDayBG=function()
|
|
17366
|
+
{
|
|
17367
|
+
if (this.DayCount!=1) return;
|
|
17368
|
+
if (!this.HQChart) return;
|
|
17369
|
+
if (!this.HQChart.EnableNightDayBG) return;
|
|
17370
|
+
|
|
17371
|
+
var symbol=this.HQChart.Symbol;
|
|
17372
|
+
if (!symbol) return;
|
|
17373
|
+
|
|
17374
|
+
var xIndex=-1;
|
|
17375
|
+
//获取夜盘和日期的分界线X索引位置
|
|
17376
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX)
|
|
17377
|
+
if (!event || !event.Callback) return;
|
|
17378
|
+
|
|
17379
|
+
var sendData={ Symbol:symbol, XIndex:xIndex, MinuteTimeStringData:g_MinuteTimeStringData };
|
|
17380
|
+
event.Callback(event,sendData,this);
|
|
17381
|
+
xIndex=sendData.XIndex;
|
|
17382
|
+
if (xIndex<0) return;
|
|
17383
|
+
|
|
17384
|
+
var border=this.ChartBorder.GetBorder();
|
|
17385
|
+
var x=this.GetXFromIndex(xIndex);
|
|
17386
|
+
|
|
17387
|
+
var rtNight={ Left: border.Left, Top:border.TopEx, Right:x, Bottom:border.Bottom };
|
|
17388
|
+
rtNight.Width=rtNight.Right-rtNight.Left;
|
|
17389
|
+
rtNight.Height=rtNight.Bottom-rtNight.Top;
|
|
17390
|
+
|
|
17391
|
+
this.Canvas.fillStyle = this.NightDayConfig.NightBGColor;
|
|
17392
|
+
this.Canvas.fillRect(rtNight.Left, rtNight.Top, rtNight.Width, rtNight.Height);
|
|
17393
|
+
|
|
17394
|
+
if (this.Identify!=0) return;
|
|
17395
|
+
|
|
17396
|
+
//显示 日盘夜盘文字
|
|
17397
|
+
this.Canvas.font=this.NightDayConfig.Font;
|
|
17398
|
+
this.Canvas.textBaseline = "bottom";
|
|
17399
|
+
this.Canvas.textAlign = 'left';
|
|
17400
|
+
var aryTitle=[{ Title:"夜盘", Position:1, Config:this.NightDayConfig.Night }, { Title:"日盘", Position:0,Config:this.NightDayConfig.Day }];
|
|
17401
|
+
var textHeight= this.Canvas.measureText("擎").width;
|
|
17402
|
+
for(var i=0;i<aryTitle.length;++i)
|
|
17403
|
+
{
|
|
17404
|
+
var item=aryTitle[i];
|
|
17405
|
+
var text=g_JSChartLocalization.GetText(item.Title,this.HQChart.LanguageID);
|
|
17406
|
+
var testWidth = this.Canvas.measureText(text).width;
|
|
17407
|
+
var rtItem=
|
|
17408
|
+
{
|
|
17409
|
+
Width:testWidth+item.Config.Margin.Left+item.Config.Margin.Right,
|
|
17410
|
+
Height:textHeight+item.Config.Margin.Top+item.Config.Margin.Bottom,
|
|
17411
|
+
Bottom:border.Bottom
|
|
17412
|
+
};
|
|
17413
|
+
rtItem.Top=rtItem.Bottom-rtItem.Height;
|
|
17414
|
+
|
|
17415
|
+
if (item.Position===1)
|
|
17416
|
+
{
|
|
17417
|
+
rtItem.Right=x-1;
|
|
17418
|
+
rtItem.Left=rtItem.Right-rtItem.Width;
|
|
17419
|
+
}
|
|
17420
|
+
else
|
|
17421
|
+
{
|
|
17422
|
+
rtItem.Left=x+1;
|
|
17423
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
17424
|
+
}
|
|
17425
|
+
|
|
17426
|
+
if (item.Config.BGColor)
|
|
17427
|
+
{
|
|
17428
|
+
this.Canvas.fillStyle = item.Config.BGColor;
|
|
17429
|
+
this.Canvas.fillRect(rtItem.Left, rtItem.Top, rtItem.Width, rtItem.Height);
|
|
17430
|
+
}
|
|
17431
|
+
|
|
17432
|
+
if (item.Config.BorderColor)
|
|
17433
|
+
{
|
|
17434
|
+
this.Canvas.strokeStyle = item.Config.BorderColor;
|
|
17435
|
+
this.Canvas.strokeRect(ToFixedPoint(rtItem.Left), ToFixedPoint(rtItem.Top), ToFixedRect(rtItem.Width), ToFixedRect(rtItem.Height));
|
|
17436
|
+
}
|
|
17437
|
+
|
|
17438
|
+
|
|
17439
|
+
this.Canvas.fillStyle = item.Config.Color;
|
|
17440
|
+
this.Canvas.fillText(text, rtItem.Left+item.Config.Margin.Left, rtItem.Bottom-item.Config.Margin.Bottom );
|
|
17441
|
+
}
|
|
17442
|
+
|
|
17443
|
+
}
|
|
17444
|
+
|
|
17356
17445
|
//选中的画图工具X轴坐标信息
|
|
17357
17446
|
this.DrawPictureXCoordinate=function(drawPicture, range, option)
|
|
17358
17447
|
{
|
|
@@ -18932,6 +19021,89 @@ function MinuteHScreenFrame()
|
|
|
18932
19021
|
return this.GetLeftExtendYFromData(value,isLimit,obj);
|
|
18933
19022
|
}
|
|
18934
19023
|
|
|
19024
|
+
this.DrawNightDayBG=function()
|
|
19025
|
+
{
|
|
19026
|
+
if (this.DayCount!=1) return;
|
|
19027
|
+
if (!this.HQChart) return;
|
|
19028
|
+
if (!this.HQChart.EnableNightDayBG) return;
|
|
19029
|
+
|
|
19030
|
+
var symbol=this.HQChart.Symbol;
|
|
19031
|
+
if (!symbol) return;
|
|
19032
|
+
|
|
19033
|
+
var xIndex=-1;
|
|
19034
|
+
//获取夜盘和日期的分界线X索引位置
|
|
19035
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX)
|
|
19036
|
+
if (!event || !event.Callback) return;
|
|
19037
|
+
|
|
19038
|
+
var sendData={ Symbol:symbol, XIndex:xIndex, MinuteTimeStringData:g_MinuteTimeStringData };
|
|
19039
|
+
event.Callback(event,sendData,this);
|
|
19040
|
+
xIndex=sendData.XIndex;
|
|
19041
|
+
if (xIndex<0) return;
|
|
19042
|
+
|
|
19043
|
+
var border=this.ChartBorder.GetHScreenBorder();
|
|
19044
|
+
var y=this.GetXFromIndex(xIndex);
|
|
19045
|
+
|
|
19046
|
+
var rtNight={ Left: border.Left, Top:border.Top, Right:border.RightEx, Bottom:y };
|
|
19047
|
+
rtNight.Width=rtNight.Right-rtNight.Left;
|
|
19048
|
+
rtNight.Height=rtNight.Bottom-rtNight.Top;
|
|
19049
|
+
|
|
19050
|
+
this.Canvas.fillStyle = this.NightDayConfig.NightBGColor;
|
|
19051
|
+
this.Canvas.fillRect(rtNight.Left, rtNight.Top, rtNight.Width, rtNight.Height);
|
|
19052
|
+
|
|
19053
|
+
if (this.Identify!=0) return;
|
|
19054
|
+
|
|
19055
|
+
//显示 日盘夜盘文字
|
|
19056
|
+
this.Canvas.font=this.NightDayConfig.Font;
|
|
19057
|
+
this.Canvas.textBaseline = "bottom";
|
|
19058
|
+
this.Canvas.textAlign = 'left';
|
|
19059
|
+
var aryTitle=[{ Title:"夜盘", Position:1, Config:this.NightDayConfig.Night }, { Title:"日盘", Position:0,Config:this.NightDayConfig.Day }];
|
|
19060
|
+
var textHeight= this.Canvas.measureText("擎").width;
|
|
19061
|
+
for(var i=0;i<aryTitle.length;++i)
|
|
19062
|
+
{
|
|
19063
|
+
var item=aryTitle[i];
|
|
19064
|
+
var text=g_JSChartLocalization.GetText(item.Title,this.HQChart.LanguageID);
|
|
19065
|
+
var testWidth = this.Canvas.measureText(text).width;
|
|
19066
|
+
var rtItem=
|
|
19067
|
+
{
|
|
19068
|
+
Height:testWidth+item.Config.Margin.Left+item.Config.Margin.Right,
|
|
19069
|
+
Width:textHeight+item.Config.Margin.Top+item.Config.Margin.Bottom,
|
|
19070
|
+
Left:border.Left
|
|
19071
|
+
};
|
|
19072
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
19073
|
+
|
|
19074
|
+
if (item.Position===1)
|
|
19075
|
+
{
|
|
19076
|
+
rtItem.Bottom=y-1;
|
|
19077
|
+
rtItem.Top=rtItem.Bottom-rtItem.Height;
|
|
19078
|
+
}
|
|
19079
|
+
else
|
|
19080
|
+
{
|
|
19081
|
+
rtItem.Top=y+1;
|
|
19082
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
19083
|
+
}
|
|
19084
|
+
|
|
19085
|
+
if (item.Config.BGColor)
|
|
19086
|
+
{
|
|
19087
|
+
this.Canvas.fillStyle = item.Config.BGColor;
|
|
19088
|
+
this.Canvas.fillRect(rtItem.Left, rtItem.Top, rtItem.Width, rtItem.Height);
|
|
19089
|
+
}
|
|
19090
|
+
|
|
19091
|
+
if (item.Config.BorderColor)
|
|
19092
|
+
{
|
|
19093
|
+
this.Canvas.strokeStyle = item.Config.BorderColor;
|
|
19094
|
+
this.Canvas.strokeRect(ToFixedPoint(rtItem.Left), ToFixedPoint(rtItem.Top), ToFixedRect(rtItem.Width), ToFixedRect(rtItem.Height));
|
|
19095
|
+
}
|
|
19096
|
+
|
|
19097
|
+
this.Canvas.fillStyle = item.Config.Color;
|
|
19098
|
+
var xText=rtItem.Left;
|
|
19099
|
+
var yText=rtItem.Top;
|
|
19100
|
+
this.Canvas.save();
|
|
19101
|
+
this.Canvas.translate(xText,yText);
|
|
19102
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
19103
|
+
this.Canvas.fillText(text, item.Config.Margin.Left, -item.Config.Margin.Bottom);
|
|
19104
|
+
this.Canvas.restore();
|
|
19105
|
+
}
|
|
19106
|
+
}
|
|
18935
19107
|
|
|
18936
19108
|
}
|
|
18937
19109
|
|
|
@@ -22858,6 +23030,7 @@ function HQTradeFrame()
|
|
|
22858
23030
|
for (var i in this.SubFrame)
|
|
22859
23031
|
{
|
|
22860
23032
|
var item = this.SubFrame[i];
|
|
23033
|
+
if (item.Height<=0) continue;
|
|
22861
23034
|
if (item.Frame.DrawInsideHorizontal) item.Frame.DrawInsideHorizontal();
|
|
22862
23035
|
}
|
|
22863
23036
|
}
|
|
@@ -53709,8 +53882,8 @@ function ChartCorssCursor()
|
|
|
53709
53882
|
}
|
|
53710
53883
|
}
|
|
53711
53884
|
|
|
53712
|
-
//X轴 Bottom
|
|
53713
|
-
if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==
|
|
53885
|
+
//X轴 Bottom==8 自定义
|
|
53886
|
+
if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
|
|
53714
53887
|
{
|
|
53715
53888
|
var text=this.StringFormatX.Text;
|
|
53716
53889
|
this.Canvas.font=this.Font;
|
|
@@ -53719,49 +53892,53 @@ function ChartCorssCursor()
|
|
|
53719
53892
|
|
|
53720
53893
|
var yCenter=bottom+2+this.TextHeight/2;
|
|
53721
53894
|
var yTop=bottom+2;
|
|
53895
|
+
var bShowText=true;
|
|
53722
53896
|
if (this.ShowTextMode.Bottom==2)
|
|
53723
53897
|
{
|
|
53724
53898
|
yCenter=bottom-this.TextHeight/2-2;
|
|
53725
53899
|
yTop=bottom-this.TextHeight-2;
|
|
53726
53900
|
}
|
|
53727
|
-
else if (this.ShowTextMode.Bottom==
|
|
53901
|
+
else if (this.ShowTextMode.Bottom==8)
|
|
53728
53902
|
{
|
|
53729
|
-
var
|
|
53730
|
-
if (
|
|
53903
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
|
|
53904
|
+
if (event && event.Callback)
|
|
53731
53905
|
{
|
|
53732
|
-
var
|
|
53733
|
-
|
|
53734
|
-
|
|
53735
|
-
|
|
53736
|
-
|
|
53737
|
-
|
|
53906
|
+
var sendData={ YCenter:yCenter, YTop:yTop, Height:this.TextHeight, IsShowText:bShowText };
|
|
53907
|
+
event.Callback(event, sendData, this);
|
|
53908
|
+
|
|
53909
|
+
yCenter=sendData.YCenter;
|
|
53910
|
+
yTop=sendData.YTop;
|
|
53911
|
+
bShowText=sendData.IsShowText;
|
|
53738
53912
|
}
|
|
53739
53913
|
}
|
|
53740
53914
|
|
|
53741
53915
|
//JSConsole.Chart.Log('[ChartCorssCursor::Draw] ',yCenter);
|
|
53742
|
-
if (
|
|
53743
|
-
{
|
|
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)
|
|
53916
|
+
if (bShowText)
|
|
53751
53917
|
{
|
|
53752
|
-
|
|
53753
|
-
|
|
53754
|
-
|
|
53755
|
-
|
|
53756
|
-
|
|
53757
|
-
|
|
53758
|
-
|
|
53759
|
-
|
|
53760
|
-
|
|
53761
|
-
|
|
53762
|
-
|
|
53763
|
-
|
|
53764
|
-
|
|
53918
|
+
if (x-textWidth/2<3) //左边位置不够了, 顶着左边画
|
|
53919
|
+
{
|
|
53920
|
+
this.DrawTextBGRect(x-1,yTop,textWidth,this.TextHeight);
|
|
53921
|
+
this.Canvas.textAlign="left";
|
|
53922
|
+
this.Canvas.textBaseline="middle";
|
|
53923
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
53924
|
+
this.Canvas.fillText(text,x+1,yCenter,textWidth);
|
|
53925
|
+
}
|
|
53926
|
+
else if (x+textWidth/2>=right)
|
|
53927
|
+
{
|
|
53928
|
+
this.DrawTextBGRect(right-textWidth,yTop,textWidth,this.TextHeight);
|
|
53929
|
+
this.Canvas.textAlign="right";
|
|
53930
|
+
this.Canvas.textBaseline="middle";
|
|
53931
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
53932
|
+
this.Canvas.fillText(text,right-2,yCenter,textWidth);
|
|
53933
|
+
}
|
|
53934
|
+
else
|
|
53935
|
+
{
|
|
53936
|
+
this.DrawTextBGRect(x-textWidth/2,yTop,textWidth,this.TextHeight);
|
|
53937
|
+
this.Canvas.textAlign="center";
|
|
53938
|
+
this.Canvas.textBaseline="middle";
|
|
53939
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
53940
|
+
this.Canvas.fillText(text,x,yCenter,textWidth);
|
|
53941
|
+
}
|
|
53765
53942
|
}
|
|
53766
53943
|
}
|
|
53767
53944
|
|
|
@@ -54264,8 +54441,8 @@ function ChartCorssCursor()
|
|
|
54264
54441
|
}
|
|
54265
54442
|
}
|
|
54266
54443
|
|
|
54267
|
-
//X轴 Bottom=
|
|
54268
|
-
if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==
|
|
54444
|
+
//X轴 Bottom=8 自定义X轴文字位置
|
|
54445
|
+
if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
|
|
54269
54446
|
{
|
|
54270
54447
|
var text=this.StringFormatX.Text;
|
|
54271
54448
|
this.Canvas.font=this.Font;
|
|
@@ -54273,64 +54450,67 @@ function ChartCorssCursor()
|
|
|
54273
54450
|
this.Canvas.fillStyle=this.TextBGColor;
|
|
54274
54451
|
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
|
|
54275
54452
|
var xText=left;
|
|
54276
|
-
|
|
54277
|
-
if (this.ShowTextMode.Bottom==
|
|
54453
|
+
var bShowText=true;
|
|
54454
|
+
if (this.ShowTextMode.Bottom==8)
|
|
54278
54455
|
{
|
|
54279
|
-
var
|
|
54280
|
-
if (
|
|
54456
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
|
|
54457
|
+
if (event && event.Callback)
|
|
54281
54458
|
{
|
|
54282
|
-
var
|
|
54283
|
-
|
|
54284
|
-
|
|
54285
|
-
|
|
54286
|
-
|
|
54459
|
+
var sendData={ XText:xText, Height:this.TextHeight, IsShowText:bShowText };
|
|
54460
|
+
event.Callback(event, sendData, this);
|
|
54461
|
+
|
|
54462
|
+
xText=sendData.XText;
|
|
54463
|
+
bShowText=sendData.IsShowText;
|
|
54287
54464
|
}
|
|
54288
54465
|
}
|
|
54289
54466
|
|
|
54290
|
-
if (
|
|
54467
|
+
if (bShowText)
|
|
54291
54468
|
{
|
|
54292
|
-
|
|
54293
|
-
|
|
54294
|
-
|
|
54295
|
-
|
|
54469
|
+
if (y-textWidth/2<3) //左边位置不够了, 顶着左边画
|
|
54470
|
+
{
|
|
54471
|
+
var yText=y;
|
|
54472
|
+
this.Canvas.save();
|
|
54473
|
+
this.Canvas.translate(xText, yText);
|
|
54474
|
+
this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
|
|
54296
54475
|
|
|
54297
|
-
|
|
54298
|
-
|
|
54299
|
-
|
|
54300
|
-
|
|
54301
|
-
|
|
54476
|
+
this.Canvas.fillRect(0,0,textWidth,this.TextHeight);
|
|
54477
|
+
this.Canvas.textAlign="left";
|
|
54478
|
+
this.Canvas.textBaseline="middle";
|
|
54479
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
54480
|
+
this.Canvas.fillText(text,2,this.TextHeight/2,textWidth);
|
|
54302
54481
|
|
|
54303
|
-
|
|
54304
|
-
|
|
54305
|
-
|
|
54306
|
-
|
|
54307
|
-
|
|
54308
|
-
|
|
54309
|
-
|
|
54310
|
-
|
|
54482
|
+
this.Canvas.restore();
|
|
54483
|
+
}
|
|
54484
|
+
else if (y+textWidth/2>=bottom)
|
|
54485
|
+
{
|
|
54486
|
+
var yText=y;
|
|
54487
|
+
this.Canvas.save();
|
|
54488
|
+
this.Canvas.translate(xText, yText);
|
|
54489
|
+
this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
|
|
54311
54490
|
|
|
54312
|
-
|
|
54313
|
-
|
|
54314
|
-
|
|
54315
|
-
|
|
54316
|
-
|
|
54491
|
+
this.Canvas.fillRect(-textWidth,0,textWidth,this.TextHeight);
|
|
54492
|
+
this.Canvas.textAlign="right";
|
|
54493
|
+
this.Canvas.textBaseline="middle";
|
|
54494
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
54495
|
+
this.Canvas.fillText(text,-2,this.TextHeight/2,textWidth);
|
|
54317
54496
|
|
|
54318
|
-
|
|
54319
|
-
|
|
54320
|
-
|
|
54321
|
-
|
|
54322
|
-
|
|
54323
|
-
|
|
54324
|
-
|
|
54325
|
-
|
|
54497
|
+
this.Canvas.restore();
|
|
54498
|
+
}
|
|
54499
|
+
else
|
|
54500
|
+
{
|
|
54501
|
+
var yText=y;
|
|
54502
|
+
this.Canvas.save();
|
|
54503
|
+
this.Canvas.translate(xText, yText);
|
|
54504
|
+
this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
|
|
54326
54505
|
|
|
54327
|
-
|
|
54328
|
-
|
|
54329
|
-
|
|
54330
|
-
|
|
54331
|
-
|
|
54506
|
+
this.Canvas.fillRect(-textWidth/2,0,textWidth,this.TextHeight);
|
|
54507
|
+
this.Canvas.textAlign="center";
|
|
54508
|
+
this.Canvas.textBaseline="middle";
|
|
54509
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
54510
|
+
this.Canvas.fillText(text,0,this.TextHeight/2,textWidth);
|
|
54332
54511
|
|
|
54333
|
-
|
|
54512
|
+
this.Canvas.restore();
|
|
54513
|
+
}
|
|
54334
54514
|
}
|
|
54335
54515
|
}
|
|
54336
54516
|
|
|
@@ -70794,6 +70974,14 @@ function JSChartResource()
|
|
|
70794
70974
|
Point:{ Color:"rgb(65,105,225)", Radius:2*GetDevicePixelRatio() },
|
|
70795
70975
|
};
|
|
70796
70976
|
|
|
70977
|
+
this.Minute.NightDay=
|
|
70978
|
+
{
|
|
70979
|
+
NightBGColor:"rgba(0,0,0,0.2)",
|
|
70980
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
70981
|
+
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 } },
|
|
70982
|
+
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 } },
|
|
70983
|
+
}
|
|
70984
|
+
|
|
70797
70985
|
this.DefaultTextColor="rgb(43,54,69)"; //图形中默认的字体颜色
|
|
70798
70986
|
this.DefaultTextFont=14*GetDevicePixelRatio() +'px 微软雅黑'; //图形中默认的字体
|
|
70799
70987
|
this.TitleFont=13*GetDevicePixelRatio() +'px 微软雅黑'; //指标显示,tooltip显示字体
|
|
@@ -70816,6 +71004,7 @@ function JSChartResource()
|
|
|
70816
71004
|
},
|
|
70817
71005
|
|
|
70818
71006
|
ArrowType:0,
|
|
71007
|
+
EnableIndexArrow:true, //指标数值是否带上涨下跌箭头
|
|
70819
71008
|
|
|
70820
71009
|
NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
|
|
70821
71010
|
}
|
|
@@ -72077,6 +72266,29 @@ function JSChartResource()
|
|
|
72077
72266
|
if (item.Point.Radius) this.Minute.After.Point.Radius=item.Point.Radius;
|
|
72078
72267
|
}
|
|
72079
72268
|
}
|
|
72269
|
+
|
|
72270
|
+
if (style.Minute.NightDay)
|
|
72271
|
+
{
|
|
72272
|
+
var item=style.Minute.NightDay;
|
|
72273
|
+
if (item.NightBGColor) this.Minute.NightDay.NightBGColor=item.NightBGColor;
|
|
72274
|
+
if (item.Font) this.Minute.NightDay.Font=item.Font;
|
|
72275
|
+
if (item.Day)
|
|
72276
|
+
{
|
|
72277
|
+
var subItem=item.Day;
|
|
72278
|
+
if (subItem.Color) this.Minute.NightDay.Day.Color=subItem.Color;
|
|
72279
|
+
if (subItem.BGColor) this.Minute.NightDay.Day.BGColor=subItem.BGColor;
|
|
72280
|
+
if (subItem.BorderColor) this.Minute.NightDay.Day.BorderColor=subItem.BorderColor;
|
|
72281
|
+
CopyMarginConfig(this.Minute.NightDay.Day.Margin,subItem.Margin);
|
|
72282
|
+
}
|
|
72283
|
+
if (item.Night)
|
|
72284
|
+
{
|
|
72285
|
+
var subItem=item.Night;
|
|
72286
|
+
if (subItem.Color) this.Minute.NightDay.Night.Color=subItem.Color;
|
|
72287
|
+
if (subItem.BGColor) this.Minute.NightDay.Night.BGColor=subItem.BGColor;
|
|
72288
|
+
if (subItem.BorderColor) this.Minute.NightDay.Night.BorderColor=subItem.BorderColor;
|
|
72289
|
+
CopyMarginConfig(this.Minute.NightDay.Night.Margin,subItem.Margin);
|
|
72290
|
+
}
|
|
72291
|
+
}
|
|
72080
72292
|
}
|
|
72081
72293
|
|
|
72082
72294
|
if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
|
|
@@ -72117,6 +72329,7 @@ function JSChartResource()
|
|
|
72117
72329
|
}
|
|
72118
72330
|
|
|
72119
72331
|
if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
|
|
72332
|
+
if (IFrameSplitOperator.IsBool(item.EnableIndexArrow)) this.IndexTitle.EnableIndexArrow=item.EnableIndexArrow;
|
|
72120
72333
|
|
|
72121
72334
|
if (item.NameArrow)
|
|
72122
72335
|
{
|
|
@@ -73287,7 +73500,11 @@ function JSChartLocalization()
|
|
|
73287
73500
|
["Toolbar-"+JSCHART_BUTTON_ID.CHIP_LONG, {CN:"远期成本分布", EN:"Long chip", TC:"远期成本分布"}],
|
|
73288
73501
|
["Toolbar-"+JSCHART_BUTTON_ID.CHIP_DEFULT, {CN:"默认筹码分布", EN:"Default chip", TC:"默认筹码分布"}],
|
|
73289
73502
|
["Toolbar-"+JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE, {CN:"删除", EN:"Delete", TC:"删除"}],
|
|
73290
|
-
["Toolbar-"+JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING, {CN:"设置", EN:"Setting", TC:"设置"}]
|
|
73503
|
+
["Toolbar-"+JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING, {CN:"设置", EN:"Setting", TC:"设置"}],
|
|
73504
|
+
|
|
73505
|
+
//日盘|夜盘
|
|
73506
|
+
["日盘",{CN:'日盘', EN:'Day', TC:'日盤'}],
|
|
73507
|
+
["夜盘",{CN:'夜盘', EN:'Night', TC:'夜盤'} ]
|
|
73291
73508
|
]);
|
|
73292
73509
|
|
|
73293
73510
|
this.GetText=function(key,language)
|
|
@@ -74900,6 +75117,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
74900
75117
|
this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
74901
75118
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
74902
75119
|
this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
|
|
75120
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
74903
75121
|
|
|
74904
75122
|
//创建等待提示
|
|
74905
75123
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -81805,6 +82023,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81805
82023
|
|
|
81806
82024
|
this.ZoomStepPixel=50;
|
|
81807
82025
|
this.BaselineType=0; //基准线类型 0=最新昨收盘 1=多日前昨收盘
|
|
82026
|
+
this.EnableNightDayBG=false; //是否启动夜盘背景色
|
|
81808
82027
|
|
|
81809
82028
|
//集合竞价设置 obj={ Left:true/false, Right:true/false, MultiDay:{Left:, Right:} }
|
|
81810
82029
|
this.SetCallCationDataBorder=function(obj)
|
|
@@ -83507,6 +83726,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
83507
83726
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
83508
83727
|
this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
|
|
83509
83728
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
83729
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
83510
83730
|
|
|
83511
83731
|
|
|
83512
83732
|
//创建等待提示
|
|
@@ -83594,6 +83814,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
83594
83814
|
frame.GlobalOption=this.GlobalOption;
|
|
83595
83815
|
if (i<2) frame.ChartBorder.TitleHeight=0;
|
|
83596
83816
|
frame.XPointCount=243;
|
|
83817
|
+
frame.HQChart=this;
|
|
83818
|
+
frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
83597
83819
|
|
|
83598
83820
|
if (i>=2)
|
|
83599
83821
|
{
|
|
@@ -83683,6 +83905,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
83683
83905
|
frame.Identify=id; //窗口序号
|
|
83684
83906
|
frame.XPointCount=243;
|
|
83685
83907
|
frame.GlobalOption=this.GlobalOption;
|
|
83908
|
+
frame.HQChart=this;
|
|
83909
|
+
frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
83686
83910
|
|
|
83687
83911
|
|
|
83688
83912
|
if (id>=2)
|
|
@@ -89116,6 +89340,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
89116
89340
|
this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
|
|
89117
89341
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
89118
89342
|
this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
|
|
89343
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
89119
89344
|
|
|
89120
89345
|
//创建等待提示
|
|
89121
89346
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -89261,6 +89486,7 @@ function MinuteChartHScreenContainer(uielement)
|
|
|
89261
89486
|
this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
|
|
89262
89487
|
this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
89263
89488
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
89489
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
89264
89490
|
|
|
89265
89491
|
//创建等待提示
|
|
89266
89492
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -89314,6 +89540,8 @@ function MinuteChartHScreenContainer(uielement)
|
|
|
89314
89540
|
frame.Identify=i;
|
|
89315
89541
|
if (i<2) frame.ChartBorder.TitleHeight=0;
|
|
89316
89542
|
frame.XPointCount=243;
|
|
89543
|
+
frame.HQChart=this;
|
|
89544
|
+
frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
89317
89545
|
|
|
89318
89546
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
89319
89547
|
frame.HorizontalMax=DEFAULT_HORIZONTAL[0];
|
|
@@ -122312,6 +122540,8 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
122312
122540
|
if (item.isshow==false) outVarItem.IsShow = false;
|
|
122313
122541
|
if (item.isexdata==true) outVarItem.IsExData = true;
|
|
122314
122542
|
if (item.BreakPoint) outVarItem.BreakPoint=item.BreakPoint;
|
|
122543
|
+
if (item.UpColor) outVarItem.UpColor=item.UpColor;
|
|
122544
|
+
if (item.DownColor) outVarItem.DownColor=item.DownColor;
|
|
122315
122545
|
|
|
122316
122546
|
result.push(outVarItem);
|
|
122317
122547
|
}
|
|
@@ -123843,6 +124073,13 @@ function GetBlackStyle()
|
|
|
123843
124073
|
{
|
|
123844
124074
|
BGColor:"rgba(105,105,105,0.5)",
|
|
123845
124075
|
AvPriceColor:'rgb(248,248,255)' //均线
|
|
124076
|
+
},
|
|
124077
|
+
NightDay:
|
|
124078
|
+
{
|
|
124079
|
+
NightBGColor:"rgb(22,22,22)",
|
|
124080
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
124081
|
+
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 } },
|
|
124082
|
+
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 } },
|
|
123846
124083
|
}
|
|
123847
124084
|
},
|
|
123848
124085
|
|
|
@@ -141125,7 +141362,7 @@ function HQChartScriptWorker()
|
|
|
141125
141362
|
|
|
141126
141363
|
|
|
141127
141364
|
|
|
141128
|
-
var HQCHART_VERSION="1.1.
|
|
141365
|
+
var HQCHART_VERSION="1.1.13635";
|
|
141129
141366
|
|
|
141130
141367
|
function PrintHQChartVersion()
|
|
141131
141368
|
{
|