hqchart 1.1.15223 → 1.1.15225
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
CHANGED
|
@@ -2685,6 +2685,8 @@ this.AreaData;//区域: { Start:, End:, BGColor:, Position:[0=左, 1=右] }
|
|
|
2685
2685
|
//this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
|
|
2686
2686
|
//Y轴文字偏移
|
|
2687
2687
|
//this.YOffset=[{ Offset:5}, { Offset:10} ] //目前只对框子外的刻度文字生效 0=外左 1=外右 2=内左 3=内右
|
|
2688
|
+
//X轴文字
|
|
2689
|
+
//this.XOffset=[{ Position:1} ] //Position:1=线段移动到左侧K线间距 2=线段移动到K线右侧间距
|
|
2688
2690
|
}//边框信息
|
|
2689
2691
|
function ChartBorder(){this.UIElement;//四周间距
|
|
2690
2692
|
this.Left=50;this.Right=80;this.Top=50;this.Bottom=50;this.TitleHeight=24;//标题高度
|
|
@@ -2891,7 +2893,7 @@ this.DrawVertical=function(){var border=this.GetBorder();var top=border.TopTitle
|
|
|
2891
2893
|
//if (this.ChartBorder.Bottom<=5*GetDevicePixelRatio()) return; //高度不够 不显示
|
|
2892
2894
|
var mapX=null;if(this.GetVerticalXCache)mapX=this.GetVerticalXCache();var bottomTextExtend=null;if(this.XTextExtend){bottomTextExtend=this.XTextExtend[0];}var bottomLineExtend=null;if(this.XLineExtend){bottomLineExtend=this.XLineExtend[0];}var xPrev=null;//上一个坐标x的值
|
|
2893
2895
|
var textRightPrev=null;//上一次刻度输出右边x坐标
|
|
2894
|
-
for(var i=0;i<this.VerticalInfo.length;++i){var item=this.VerticalInfo[i];var x=null;if(mapX&&mapX.has(item.Value))x=mapX.get(item.Value);else x=this.GetXFromIndex(item.Value);if(x>right)break;if(xPrev!=null&&Math.abs(x-xPrev)<this.MinXDistance)continue;var item=this.VerticalInfo[i];var xFixed=ToFixedPoint(x);if(this.IsShowXLine){if(item.LineType==2)//虚线
|
|
2896
|
+
for(var i=0;i<this.VerticalInfo.length;++i){var item=this.VerticalInfo[i];var x=null;if(mapX&&mapX.has(item.Value))x=mapX.get(item.Value);else x=this.GetXFromIndex(item.Value);if(item.XOffset&&item.XOffset[0]){var subItem=item.XOffset[0];if(subItem.Position===1){x-=this.DataWidth/2;x-=this.DistanceWidth/2;}else if(subItem.Position===2){x+=this.DataWidth/2;x+=this.DistanceWidth/2;}}if(x>right)break;if(xPrev!=null&&Math.abs(x-xPrev)<this.MinXDistance)continue;var item=this.VerticalInfo[i];var xFixed=ToFixedPoint(x);if(this.IsShowXLine){if(item.LineType==2)//虚线
|
|
2895
2897
|
{this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;if(item.LineDash)this.Canvas.setLineDash(item.LineDash);else this.Canvas.setLineDash([5*pixelRatio,5*pixelRatio]);this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();this.Canvas.setLineDash([]);}else if(item.LineType==3){}else if(item.LineType>0)//实线
|
|
2896
2898
|
{if(g_JSChartResource.FrameXLineDash){this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;this.Canvas.setLineDash(g_JSChartResource.FrameXLineDash);//虚线
|
|
2897
2899
|
this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();this.Canvas.setLineDash([]);}else{this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();}}}if(item.BG&&this.DrawDayVertical){this.DrawDayVertical(item,x,border);}if(item.Message[0]!=null&&this.ChartBorder.Bottom>5*pixelRatio){if(IFrameSplitOperator.IsObject(item.Message[0])){var textObj=item.Message[0];if(!textObj.Font)textObj.Font=item.Font;if(!textObj.TextColor)textObj.TextColor=item.TextColor;var drawInfo=this.GetMultiLineVTextSize(textObj);if(drawInfo){drawInfo.XCenter=x;var rtBottom={Left:0,Right:right,Top:bottom+2*pixelRatio,Bottom:border.Height};rtBottom.Width=rtBottom.Right-rtBottom.Left;rtBottom.Height=rtBottom.Bottom-rtBottom.Top;drawInfo.RectBottom=rtBottom;drawInfo.TextRightPrev=textRightPrev;this.DrawMultiLineVText(drawInfo);if(drawInfo.TextRight)textRightPrev=drawInfo.TextRight;}}else{if(item.Font)this.Canvas.font=item.Font;var textLeft=0;this.Canvas.strokeStyle=item.TextColor;var testWidth=this.Canvas.measureText(item.Message[0]).width;var textHeight=this.Canvas.measureText("擎").width;if(bottomTextExtend&&bottomTextExtend.Align==1){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";textLeft=x;}else{if(x<testWidth/2){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";textLeft=x;}else if(x+testWidth/2>=this.ChartBorder.GetChartWidth()){this.Canvas.textAlign="right";this.Canvas.textBaseline="top";textLeft=x-testWidth;}else{this.Canvas.textAlign="center";this.Canvas.textBaseline="top";textLeft=x-testWidth/2;}}if(textRightPrev==null||textLeft>textRightPrev){var yText=bottom;if(item.LineType==3){var lineLength=this.ShortXLineLength*pixelRatio;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,yText);this.Canvas.lineTo(xFixed,yText+lineLength);this.Canvas.stroke();yText+=lineLength+2*pixelRatio;}if(bottomLineExtend){if(bottomLineExtend.Mode===1){if(item.Value>1){if(bottomLineExtend.Color)this.Canvas.strokeStyle=bottomLineExtend.Color;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,bottom);this.Canvas.lineTo(xFixed,border.ChartHeight);this.Canvas.stroke();x+=1;}}else if(bottomLineExtend.Mode===2){if(bottomLineExtend.Width>=1){var lineLength=bottomLineExtend.Width;if(bottomLineExtend.Color)this.Canvas.strokeStyle=bottomLineExtend.Color;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,yText);this.Canvas.lineTo(xFixed,yText+lineLength);this.Canvas.stroke();yText+=lineLength+2;}}}//item.TextBGColor="rgb(0,255,0)";
|
|
@@ -15642,7 +15644,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
15642
15644
|
this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
|
|
15643
15645
|
* 版本信息输出
|
|
15644
15646
|
*
|
|
15645
|
-
*/var HQCHART_VERSION="1.1.
|
|
15647
|
+
*/var HQCHART_VERSION="1.1.15224";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
15646
15648
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
15647
15649
|
// BaseIndex:BaseIndex,
|
|
15648
15650
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -12991,6 +12991,8 @@ function CoordinateInfo()
|
|
|
12991
12991
|
//this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
|
|
12992
12992
|
//Y轴文字偏移
|
|
12993
12993
|
//this.YOffset=[{ Offset:5}, { Offset:10} ] //目前只对框子外的刻度文字生效 0=外左 1=外右 2=内左 3=内右
|
|
12994
|
+
//X轴文字
|
|
12995
|
+
//this.XOffset=[{ Position:1} ] //Position:1=线段移动到左侧K线间距 2=线段移动到K线右侧间距
|
|
12994
12996
|
}
|
|
12995
12997
|
|
|
12996
12998
|
|
|
@@ -14970,6 +14972,22 @@ function AverageWidthFrame()
|
|
|
14970
14972
|
var x=null;
|
|
14971
14973
|
if (mapX && mapX.has(item.Value)) x=mapX.get(item.Value);
|
|
14972
14974
|
else x=this.GetXFromIndex(item.Value);
|
|
14975
|
+
|
|
14976
|
+
if (item.XOffset && item.XOffset[0])
|
|
14977
|
+
{
|
|
14978
|
+
var subItem=item.XOffset[0];
|
|
14979
|
+
if (subItem.Position===1)
|
|
14980
|
+
{
|
|
14981
|
+
x-=this.DataWidth/2;
|
|
14982
|
+
x-=this.DistanceWidth/2;
|
|
14983
|
+
}
|
|
14984
|
+
else if (subItem.Position===2)
|
|
14985
|
+
{
|
|
14986
|
+
x+=this.DataWidth/2;
|
|
14987
|
+
x+=this.DistanceWidth/2;
|
|
14988
|
+
}
|
|
14989
|
+
}
|
|
14990
|
+
|
|
14973
14991
|
if (x>right) break;
|
|
14974
14992
|
if (xPrev!=null && Math.abs(x-xPrev)<this.MinXDistance) continue;
|
|
14975
14993
|
|
|
@@ -17087,6 +17087,8 @@ function CoordinateInfo()
|
|
|
17087
17087
|
//this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
|
|
17088
17088
|
//Y轴文字偏移
|
|
17089
17089
|
//this.YOffset=[{ Offset:5}, { Offset:10} ] //目前只对框子外的刻度文字生效 0=外左 1=外右 2=内左 3=内右
|
|
17090
|
+
//X轴文字
|
|
17091
|
+
//this.XOffset=[{ Position:1} ] //Position:1=线段移动到左侧K线间距 2=线段移动到K线右侧间距
|
|
17090
17092
|
}
|
|
17091
17093
|
|
|
17092
17094
|
|
|
@@ -19066,6 +19068,22 @@ function AverageWidthFrame()
|
|
|
19066
19068
|
var x=null;
|
|
19067
19069
|
if (mapX && mapX.has(item.Value)) x=mapX.get(item.Value);
|
|
19068
19070
|
else x=this.GetXFromIndex(item.Value);
|
|
19071
|
+
|
|
19072
|
+
if (item.XOffset && item.XOffset[0])
|
|
19073
|
+
{
|
|
19074
|
+
var subItem=item.XOffset[0];
|
|
19075
|
+
if (subItem.Position===1)
|
|
19076
|
+
{
|
|
19077
|
+
x-=this.DataWidth/2;
|
|
19078
|
+
x-=this.DistanceWidth/2;
|
|
19079
|
+
}
|
|
19080
|
+
else if (subItem.Position===2)
|
|
19081
|
+
{
|
|
19082
|
+
x+=this.DataWidth/2;
|
|
19083
|
+
x+=this.DistanceWidth/2;
|
|
19084
|
+
}
|
|
19085
|
+
}
|
|
19086
|
+
|
|
19069
19087
|
if (x>right) break;
|
|
19070
19088
|
if (xPrev!=null && Math.abs(x-xPrev)<this.MinXDistance) continue;
|
|
19071
19089
|
|
|
@@ -154191,7 +154209,7 @@ function ScrollBarBGChart()
|
|
|
154191
154209
|
|
|
154192
154210
|
|
|
154193
154211
|
|
|
154194
|
-
var HQCHART_VERSION="1.1.
|
|
154212
|
+
var HQCHART_VERSION="1.1.15224";
|
|
154195
154213
|
|
|
154196
154214
|
function PrintHQChartVersion()
|
|
154197
154215
|
{
|
|
@@ -17131,6 +17131,8 @@ function CoordinateInfo()
|
|
|
17131
17131
|
//this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
|
|
17132
17132
|
//Y轴文字偏移
|
|
17133
17133
|
//this.YOffset=[{ Offset:5}, { Offset:10} ] //目前只对框子外的刻度文字生效 0=外左 1=外右 2=内左 3=内右
|
|
17134
|
+
//X轴文字
|
|
17135
|
+
//this.XOffset=[{ Position:1} ] //Position:1=线段移动到左侧K线间距 2=线段移动到K线右侧间距
|
|
17134
17136
|
}
|
|
17135
17137
|
|
|
17136
17138
|
|
|
@@ -19110,6 +19112,22 @@ function AverageWidthFrame()
|
|
|
19110
19112
|
var x=null;
|
|
19111
19113
|
if (mapX && mapX.has(item.Value)) x=mapX.get(item.Value);
|
|
19112
19114
|
else x=this.GetXFromIndex(item.Value);
|
|
19115
|
+
|
|
19116
|
+
if (item.XOffset && item.XOffset[0])
|
|
19117
|
+
{
|
|
19118
|
+
var subItem=item.XOffset[0];
|
|
19119
|
+
if (subItem.Position===1)
|
|
19120
|
+
{
|
|
19121
|
+
x-=this.DataWidth/2;
|
|
19122
|
+
x-=this.DistanceWidth/2;
|
|
19123
|
+
}
|
|
19124
|
+
else if (subItem.Position===2)
|
|
19125
|
+
{
|
|
19126
|
+
x+=this.DataWidth/2;
|
|
19127
|
+
x+=this.DistanceWidth/2;
|
|
19128
|
+
}
|
|
19129
|
+
}
|
|
19130
|
+
|
|
19113
19131
|
if (x>right) break;
|
|
19114
19132
|
if (xPrev!=null && Math.abs(x-xPrev)<this.MinXDistance) continue;
|
|
19115
19133
|
|
|
@@ -166248,7 +166266,7 @@ function HQChartScriptWorker()
|
|
|
166248
166266
|
|
|
166249
166267
|
|
|
166250
166268
|
|
|
166251
|
-
var HQCHART_VERSION="1.1.
|
|
166269
|
+
var HQCHART_VERSION="1.1.15224";
|
|
166252
166270
|
|
|
166253
166271
|
function PrintHQChartVersion()
|
|
166254
166272
|
{
|