hqchart 1.1.13816 → 1.1.13821
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
|
@@ -2373,15 +2373,20 @@ if(item.Value>this.HorizontalMax)position=1;else if(item.Value<this.HorizontalMi
|
|
|
2373
2373
|
this.Canvas.strokeStyle=outRange.Border.Color;this.Canvas.strokeRect(ToFixedPoint(rtBG.Left),ToFixedPoint(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));}this.Canvas.fillStyle=outRange.TextColor;this.Canvas.fillText(itemText.Text,rtBG.Right-1*pixelTatio,rtBG.Top+rtBG.Height/2+1*pixelTatio);yText+=textHeight+1;}}else if(item.Message[1]&&borderRight>=10){if(item.Font!=null)this.Canvas.font=item.Font;var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var itemRight=right+textWidth;var fontHeight=this.GetFontHeight();var textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var yText=null;if(position==1){yText=border.TopEx;if(IFrameSplitOperator.IsNumber(outRange.TopYOffset))yText+=outRange.TopYOffset;}else if(position==2){yText=border.BottomEx+textHeight;if(IFrameSplitOperator.IsNumber(outRange.BottomYOffset))yText+=outRange.BottomYOffset;}for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];var rtBG={Right:itemRight,Width:itemText.Width,Bottom:yText,Height:textHeight};rtBG.Top=rtBG.Bottom-rtBG.Height;rtBG.Left=rtBG.Right-rtBG.Width;if(item.ExtendLine&&item.ExtendLine[1])//右侧延长线
|
|
2374
2374
|
{var exLine=item.ExtendLine[1];if(IFrameSplitOperator.IsNumber(exLine.Width)){var yLine=rtBG.Bottom;if(position==2)yLine=rtBG.Top;var lineType=item.LineType;if(IFrameSplitOperator.IsNumber(outRange.ExtendLine.Type))lineType=outRange.ExtendLine.Type;if(i==0)this.DrawLine(right,right+exLine.Width,yLine,item.LineColor,lineType,item);rtBG.Left+=exLine.Width;rtBG.Right+=exLine.Width;}}this.Canvas.fillStyle=outRange.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);if(outRange.Border&&outRange.Border.Color){if(IFrameSplitOperator.IsNonEmptyArray(outRange.Border.LineDash))this.Canvas.setLineDash(outRange.Border.LineDash);//虚线
|
|
2375
2375
|
this.Canvas.strokeStyle=outRange.Border.Color;this.Canvas.strokeRect(ToFixedPoint(rtBG.Left),ToFixedPoint(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));}this.Canvas.fillStyle=outRange.TextColor;this.Canvas.fillText(itemText.Text,rtBG.Left+1*pixelTatio,rtBG.Top+rtBG.Height/2+1*pixelTatio);yText+=textHeight+1;}}this.Canvas.restore();};this.DrawCustomItem=function(item,mapTextRect)//显示自定义Y刻度
|
|
2376
|
-
{if(!item.Message[1]&&!item.Message[0])return;if(item.Value>this.HorizontalMax||item.Value<this.HorizontalMin){this.DrawOutRangeCustomItem(item,mapTextRect);this.SendDrawCountDownEvent({IsShow:false});return;}var border=this.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=border.Top;var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var titleHeight=this.ChartBorder.TitleHeight;if(this.IsHScreen){borderLeft=this.ChartBorder.Top;borderRight=this.ChartBorder.Bottom;top=border.Top;bottom=border.Bottom;}var pixelTatio=GetDevicePixelRatio();var defaultTextHeight=18*pixelTatio;var textHeight=defaultTextHeight;var y;if(item.Value=="TopEx")y=border.TopEx;else if(item.Value=="TopTitle")y=border.TopTitle;else if(item.Value=="Top")y=border.Top;else if(item.Value=="BottomEx")y=border.BottomEx;else if(item.Value=="Bottom")y=border.Bottom;else y=this.GetYFromData(item.Value);if(IFrameSplitOperator.IsNumber(item.YOffset))y+=item.YOffset;var position=0;var emptyBGColor;if(item.ExtendData&&item.ExtendData.Custom){var customItem=item.ExtendData.Custom;if(IFrameSplitOperator.IsNumber(customItem.Position))position=customItem.Position;if(customItem.EmptyBGColor)emptyBGColor=customItem.EmptyBGColor;}if(item.Message[0])// 左
|
|
2377
|
-
{if(borderLeft<10||position==1){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
|
|
2378
|
-
var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=top;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){}else{
|
|
2379
|
-
{var exLine=item.ExtendLine[0];if(IFrameSplitOperator.IsNumber(exLine.Width)){
|
|
2376
|
+
{if(!item.Message[1]&&!item.Message[0])return;if(item.Value>this.HorizontalMax||item.Value<this.HorizontalMin){this.DrawOutRangeCustomItem(item,mapTextRect);this.SendDrawCountDownEvent({IsShow:false});return;}var border=this.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=border.Top;var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var titleHeight=this.ChartBorder.TitleHeight;if(this.IsHScreen){borderLeft=this.ChartBorder.Top;borderRight=this.ChartBorder.Bottom;top=border.Top;bottom=border.Bottom;}var pixelTatio=GetDevicePixelRatio();var defaultTextHeight=18*pixelTatio;var textHeight=defaultTextHeight;var y;if(item.Value=="TopEx")y=border.TopEx;else if(item.Value=="TopTitle")y=border.TopTitle;else if(item.Value=="Top")y=border.Top;else if(item.Value=="BottomEx")y=border.BottomEx;else if(item.Value=="Bottom")y=border.Bottom;else y=this.GetYFromData(item.Value);if(IFrameSplitOperator.IsNumber(item.YOffset))y+=item.YOffset;var position=0;var emptyBGColor;if(item.ExtendData&&item.ExtendData.Custom){var customItem=item.ExtendData.Custom;if(IFrameSplitOperator.IsNumber(customItem.Position))position=customItem.Position;if(customItem.EmptyBGColor)emptyBGColor=customItem.EmptyBGColor;}if(item.Message[0])// 左 position=2 集合竞价右侧
|
|
2377
|
+
{if(borderLeft<10||position==1||position==2){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
|
|
2378
|
+
var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=top;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){}else{if(position==2)left=border.LeftEx-textInfo.MaxWidth;var bgTop=yText-textHeight/2-1*pixelTatio;var textLeft=left+1*pixelTatio;if(item.ExtendLine&&item.ExtendLine[0]&&position==2)//左侧延长线
|
|
2379
|
+
{var exLine=item.ExtendLine[0];if(IFrameSplitOperator.IsNumber(exLine.Width)){var lineType=item.LineType;if(IFrameSplitOperator.IsNumber(exLine.Type))lineType=exLine.Type;//外部设置延长线样式
|
|
2380
|
+
if(i==0)this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);textLeft-=exLine.Width;//rectLeft-=exLine.Width
|
|
2381
|
+
}}this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);if(i==0)this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}}else{if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="right";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){if(i==0)var bgTop=top-itemText.Width;else var bgTop=top-textWidth;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{var bgTop=yText-textHeight/2-1*pixelTatio;if(i==0){var rectLeft=left-itemText.Width;var textLeft=left;}else{var rectLeft=left-textWidth;var textLeft=left-(textWidth-itemText.Width);}if(item.ExtendLine&&item.ExtendLine[0])//右侧延长线
|
|
2382
|
+
{var exLine=item.ExtendLine[0];if(IFrameSplitOperator.IsNumber(exLine.Width)){var lineType=item.LineType;if(IFrameSplitOperator.IsNumber(exLine.Type))lineType=exLine.Type;//外部设置延长线样式
|
|
2383
|
+
if(i==0)this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);textLeft-=exLine.Width;rectLeft-=exLine.Width;}}if(emptyBGColor){this.Canvas.fillStyle=emptyBGColor;this.Canvas.fillRect(rectLeft-1,bgTop,itemText.Width+1,textHeight);this.Canvas.strokeStyle=item.LineColor;this.Canvas.strokeRect(ToFixedPoint(rectLeft-1),ToFixedPoint(bgTop),ToFixedPoint(itemText.Width+1),ToFixedPoint(textHeight));this.Canvas.fillStyle=item.LineColor;this.Canvas.fillText(itemText.Text,textLeft-1*pixelTatio,yText);}else{this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(rectLeft,bgTop,itemText.Width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft-1*pixelTatio,yText);}if(i==0)this.DrawLine(left,right,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}}else if(item.Message[1])//右
|
|
2380
2384
|
{if(borderRight<10||position==1){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
|
|
2381
2385
|
var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=bottom-itemText.Width;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(top,bgTop,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){if(this.GetEventCallback){var bgTop=yText-textHeight/2-1*pixelTatio;var sendData={Top:bgTop,Right:right,Height:null,IsShow:true,BGColor:item.LineColor,TextColor:item.TextColor,PixelTatio:pixelTatio,Position:"Right",IsInside:true};if(this.SendDrawCountDownEvent(sendData)){if(IFrameSplitOperator.IsPlusNumber(sendData.Height))yText+=textHeight+1*pixelTatio;}}}else{var bgTop=yText-textHeight/2-1*pixelTatio;var textLeft=right-itemText.Width;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);//文本背景区域
|
|
2382
2386
|
if(itemText.TextColor)this.Canvas.fillStyle=itemText.TextColor;else this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);if(i==0)this.DrawLine(left,textLeft,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}if(item.Type==3||item.Type==4){if(item.Title){var width=this.Canvas.measureText(item.Title).width+2*pixelTatio;if(this.IsHScreen){var bgTop=bottom-itemText.Width-width;var textLeft=y-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,width);this.DrawHScreenText({X:y,Y:bgTop},{Text:item.Title,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});}else{var bgTop=y-textHeight/2-1*pixelTatio;var textLeft=right-textWidth-width-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Title,textLeft+1*pixelTatio,y);}}}}else{if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var preTextRect=null;if(mapTextRect&&mapTextRect.has(3))preTextRect=mapTextRect.get(3);var yText=y;var rtText={};for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=bottom;//bgTop+=(textWidth-itemText.Width);
|
|
2383
2387
|
var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(top,bgTop,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){if(this.GetEventCallback){var bgTop=yText-textHeight/2-1*pixelTatio;var sendData={Top:bgTop,Left:right,Right:this.ChartBorder.GetChartWidth(),Height:null,IsShow:true,BGColor:item.LineColor,TextColor:item.TextColor,PixelTatio:pixelTatio,Position:"Right",IsInside:false};if(this.SendDrawCountDownEvent(sendData)){if(IFrameSplitOperator.IsPlusNumber(sendData.Height))yText+=textHeight+1*pixelTatio;}}}else{var bgTop=yText-textHeight/2-1*pixelTatio;if(i==0&&textInfo.Text.length==0){var textLeft=right;rtText.Left=textLeft;if(preTextRect&&bgTop<preTextRect.Rect.Bottom){yText=preTextRect.Rect.Bottom;bgTop=yText-textHeight/2-1*pixelTatio;}}else{var textLeft=right+textWidth-itemText.Width;}if(item.ExtendLine&&item.ExtendLine[1])//右侧延长线
|
|
2384
|
-
{var exLine=item.ExtendLine[1];if(IFrameSplitOperator.IsNumber(exLine.Width)){
|
|
2388
|
+
{var exLine=item.ExtendLine[1];if(IFrameSplitOperator.IsNumber(exLine.Width)){var lineType=item.LineType;if(IFrameSplitOperator.IsNumber(exLine.Type))lineType=exLine.Type;//外部设置延长线样式
|
|
2389
|
+
if(i==0)this.DrawLine(right,textLeft+exLine.Width,y,item.LineColor,lineType,item);textLeft+=exLine.Width;}}if(emptyBGColor){this.Canvas.fillStyle=emptyBGColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width+1,textHeight);this.Canvas.strokeStyle=item.LineColor;this.Canvas.strokeRect(ToFixedPoint(textLeft),ToFixedPoint(bgTop),ToFixedRect(itemText.Width+1),ToFixedRect(textHeight));this.Canvas.fillStyle=item.LineColor;this.Canvas.fillText(itemText.Text,textLeft+2*pixelTatio,yText);}else{this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);if(itemText.TextColor)this.Canvas.fillStyle=itemText.TextColor;else this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);}if(i==0)this.DrawLine(left,right,y,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;rtText.Bottom=yText;}}}if(mapTextRect&&IFrameSplitOperator.IsNumber(rtText.Left)&&IFrameSplitOperator.IsNumber(rtText.Bottom)){mapTextRect.set(3,{Rect:rtText,Item:item});}if(item.Type==3||item.Type==4){if(item.Title){var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
|
|
2385
2390
|
var width=this.Canvas.measureText(item.Title).width+2*pixelTatio;if(this.IsHScreen){var bgTop=bottom-width;var textLeft=y-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,width);this.DrawHScreenText({X:y,Y:bgTop},{Text:item.Title,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});}else{var bgTop=y-textHeight/2-1*pixelTatio;var textLeft=right-width-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Title,textLeft+1*pixelTatio,y);}}}}}};this.DrawCustomAreaItem=function(item)//自定义Y轴区域
|
|
2386
2391
|
{if(!item.AreaData)return;if(this.IsHScreen)return;//暂时不支持横屏
|
|
2387
2392
|
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右] }
|
|
@@ -13735,7 +13740,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13735
13740
|
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);};}/********************************************************************************
|
|
13736
13741
|
* 版本信息输出
|
|
13737
13742
|
*
|
|
13738
|
-
*/var HQCHART_VERSION="1.1.
|
|
13743
|
+
*/var HQCHART_VERSION="1.1.13820";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();//把给外界调用的方法暴露出来
|
|
13739
13744
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13740
13745
|
// BaseIndex:BaseIndex,
|
|
13741
13746
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -12538,9 +12538,9 @@ function AverageWidthFrame()
|
|
|
12538
12538
|
if (customItem.EmptyBGColor) emptyBGColor=customItem.EmptyBGColor;
|
|
12539
12539
|
}
|
|
12540
12540
|
|
|
12541
|
-
if (item.Message[0]) // 左
|
|
12541
|
+
if (item.Message[0]) // 左 position=2 集合竞价右侧
|
|
12542
12542
|
{
|
|
12543
|
-
if (borderLeft<10 || position==1)
|
|
12543
|
+
if (borderLeft<10 || position==1 || position==2)
|
|
12544
12544
|
{
|
|
12545
12545
|
if (item.Font != null) this.Canvas.font = item.Font;
|
|
12546
12546
|
this.Canvas.textAlign = "left";
|
|
@@ -12576,8 +12576,24 @@ function AverageWidthFrame()
|
|
|
12576
12576
|
}
|
|
12577
12577
|
else
|
|
12578
12578
|
{
|
|
12579
|
+
if (position==2) left=border.LeftEx-textInfo.MaxWidth;
|
|
12580
|
+
|
|
12579
12581
|
var bgTop=yText-textHeight/2-1*pixelTatio;
|
|
12580
|
-
var textLeft=left + 1*pixelTatio
|
|
12582
|
+
var textLeft=left + 1*pixelTatio;
|
|
12583
|
+
|
|
12584
|
+
if (item.ExtendLine && item.ExtendLine[0] && position==2) //左侧延长线
|
|
12585
|
+
{
|
|
12586
|
+
var exLine=item.ExtendLine[0];
|
|
12587
|
+
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
12588
|
+
{
|
|
12589
|
+
var lineType=item.LineType;
|
|
12590
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
12591
|
+
if (i==0) this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);
|
|
12592
|
+
textLeft-=exLine.Width;
|
|
12593
|
+
//rectLeft-=exLine.Width
|
|
12594
|
+
}
|
|
12595
|
+
}
|
|
12596
|
+
|
|
12581
12597
|
this.Canvas.fillStyle=bgColor;
|
|
12582
12598
|
this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
|
|
12583
12599
|
this.Canvas.fillStyle = item.TextColor;
|
|
@@ -12636,7 +12652,9 @@ function AverageWidthFrame()
|
|
|
12636
12652
|
var exLine=item.ExtendLine[0];
|
|
12637
12653
|
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
12638
12654
|
{
|
|
12639
|
-
|
|
12655
|
+
var lineType=item.LineType;
|
|
12656
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
12657
|
+
if (i==0) this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);
|
|
12640
12658
|
textLeft-=exLine.Width;
|
|
12641
12659
|
rectLeft-=exLine.Width
|
|
12642
12660
|
}
|
|
@@ -12825,7 +12843,9 @@ function AverageWidthFrame()
|
|
|
12825
12843
|
var exLine=item.ExtendLine[1];
|
|
12826
12844
|
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
12827
12845
|
{
|
|
12828
|
-
|
|
12846
|
+
var lineType=item.LineType;
|
|
12847
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
12848
|
+
if (i==0) this.DrawLine(right,textLeft+exLine.Width,y,item.LineColor,lineType,item);
|
|
12829
12849
|
textLeft+=exLine.Width;
|
|
12830
12850
|
}
|
|
12831
12851
|
}
|
|
@@ -16463,9 +16463,9 @@ function AverageWidthFrame()
|
|
|
16463
16463
|
if (customItem.EmptyBGColor) emptyBGColor=customItem.EmptyBGColor;
|
|
16464
16464
|
}
|
|
16465
16465
|
|
|
16466
|
-
if (item.Message[0]) // 左
|
|
16466
|
+
if (item.Message[0]) // 左 position=2 集合竞价右侧
|
|
16467
16467
|
{
|
|
16468
|
-
if (borderLeft<10 || position==1)
|
|
16468
|
+
if (borderLeft<10 || position==1 || position==2)
|
|
16469
16469
|
{
|
|
16470
16470
|
if (item.Font != null) this.Canvas.font = item.Font;
|
|
16471
16471
|
this.Canvas.textAlign = "left";
|
|
@@ -16501,8 +16501,24 @@ function AverageWidthFrame()
|
|
|
16501
16501
|
}
|
|
16502
16502
|
else
|
|
16503
16503
|
{
|
|
16504
|
+
if (position==2) left=border.LeftEx-textInfo.MaxWidth;
|
|
16505
|
+
|
|
16504
16506
|
var bgTop=yText-textHeight/2-1*pixelTatio;
|
|
16505
|
-
var textLeft=left + 1*pixelTatio
|
|
16507
|
+
var textLeft=left + 1*pixelTatio;
|
|
16508
|
+
|
|
16509
|
+
if (item.ExtendLine && item.ExtendLine[0] && position==2) //左侧延长线
|
|
16510
|
+
{
|
|
16511
|
+
var exLine=item.ExtendLine[0];
|
|
16512
|
+
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
16513
|
+
{
|
|
16514
|
+
var lineType=item.LineType;
|
|
16515
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
16516
|
+
if (i==0) this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);
|
|
16517
|
+
textLeft-=exLine.Width;
|
|
16518
|
+
//rectLeft-=exLine.Width
|
|
16519
|
+
}
|
|
16520
|
+
}
|
|
16521
|
+
|
|
16506
16522
|
this.Canvas.fillStyle=bgColor;
|
|
16507
16523
|
this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
|
|
16508
16524
|
this.Canvas.fillStyle = item.TextColor;
|
|
@@ -16561,7 +16577,9 @@ function AverageWidthFrame()
|
|
|
16561
16577
|
var exLine=item.ExtendLine[0];
|
|
16562
16578
|
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
16563
16579
|
{
|
|
16564
|
-
|
|
16580
|
+
var lineType=item.LineType;
|
|
16581
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
16582
|
+
if (i==0) this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);
|
|
16565
16583
|
textLeft-=exLine.Width;
|
|
16566
16584
|
rectLeft-=exLine.Width
|
|
16567
16585
|
}
|
|
@@ -16750,7 +16768,9 @@ function AverageWidthFrame()
|
|
|
16750
16768
|
var exLine=item.ExtendLine[1];
|
|
16751
16769
|
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
16752
16770
|
{
|
|
16753
|
-
|
|
16771
|
+
var lineType=item.LineType;
|
|
16772
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
16773
|
+
if (i==0) this.DrawLine(right,textLeft+exLine.Width,y,item.LineColor,lineType,item);
|
|
16754
16774
|
textLeft+=exLine.Width;
|
|
16755
16775
|
}
|
|
16756
16776
|
}
|
|
@@ -138238,7 +138258,7 @@ function ScrollBarBGChart()
|
|
|
138238
138258
|
|
|
138239
138259
|
|
|
138240
138260
|
|
|
138241
|
-
var HQCHART_VERSION="1.1.
|
|
138261
|
+
var HQCHART_VERSION="1.1.13820";
|
|
138242
138262
|
|
|
138243
138263
|
function PrintHQChartVersion()
|
|
138244
138264
|
{
|
|
@@ -16507,9 +16507,9 @@ function AverageWidthFrame()
|
|
|
16507
16507
|
if (customItem.EmptyBGColor) emptyBGColor=customItem.EmptyBGColor;
|
|
16508
16508
|
}
|
|
16509
16509
|
|
|
16510
|
-
if (item.Message[0]) // 左
|
|
16510
|
+
if (item.Message[0]) // 左 position=2 集合竞价右侧
|
|
16511
16511
|
{
|
|
16512
|
-
if (borderLeft<10 || position==1)
|
|
16512
|
+
if (borderLeft<10 || position==1 || position==2)
|
|
16513
16513
|
{
|
|
16514
16514
|
if (item.Font != null) this.Canvas.font = item.Font;
|
|
16515
16515
|
this.Canvas.textAlign = "left";
|
|
@@ -16545,8 +16545,24 @@ function AverageWidthFrame()
|
|
|
16545
16545
|
}
|
|
16546
16546
|
else
|
|
16547
16547
|
{
|
|
16548
|
+
if (position==2) left=border.LeftEx-textInfo.MaxWidth;
|
|
16549
|
+
|
|
16548
16550
|
var bgTop=yText-textHeight/2-1*pixelTatio;
|
|
16549
|
-
var textLeft=left + 1*pixelTatio
|
|
16551
|
+
var textLeft=left + 1*pixelTatio;
|
|
16552
|
+
|
|
16553
|
+
if (item.ExtendLine && item.ExtendLine[0] && position==2) //左侧延长线
|
|
16554
|
+
{
|
|
16555
|
+
var exLine=item.ExtendLine[0];
|
|
16556
|
+
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
16557
|
+
{
|
|
16558
|
+
var lineType=item.LineType;
|
|
16559
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
16560
|
+
if (i==0) this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);
|
|
16561
|
+
textLeft-=exLine.Width;
|
|
16562
|
+
//rectLeft-=exLine.Width
|
|
16563
|
+
}
|
|
16564
|
+
}
|
|
16565
|
+
|
|
16550
16566
|
this.Canvas.fillStyle=bgColor;
|
|
16551
16567
|
this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
|
|
16552
16568
|
this.Canvas.fillStyle = item.TextColor;
|
|
@@ -16605,7 +16621,9 @@ function AverageWidthFrame()
|
|
|
16605
16621
|
var exLine=item.ExtendLine[0];
|
|
16606
16622
|
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
16607
16623
|
{
|
|
16608
|
-
|
|
16624
|
+
var lineType=item.LineType;
|
|
16625
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
16626
|
+
if (i==0) this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);
|
|
16609
16627
|
textLeft-=exLine.Width;
|
|
16610
16628
|
rectLeft-=exLine.Width
|
|
16611
16629
|
}
|
|
@@ -16794,7 +16812,9 @@ function AverageWidthFrame()
|
|
|
16794
16812
|
var exLine=item.ExtendLine[1];
|
|
16795
16813
|
if (IFrameSplitOperator.IsNumber(exLine.Width))
|
|
16796
16814
|
{
|
|
16797
|
-
|
|
16815
|
+
var lineType=item.LineType;
|
|
16816
|
+
if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
|
|
16817
|
+
if (i==0) this.DrawLine(right,textLeft+exLine.Width,y,item.LineColor,lineType,item);
|
|
16798
16818
|
textLeft+=exLine.Width;
|
|
16799
16819
|
}
|
|
16800
16820
|
}
|
|
@@ -142794,7 +142814,7 @@ function HQChartScriptWorker()
|
|
|
142794
142814
|
|
|
142795
142815
|
|
|
142796
142816
|
|
|
142797
|
-
var HQCHART_VERSION="1.1.
|
|
142817
|
+
var HQCHART_VERSION="1.1.13820";
|
|
142798
142818
|
|
|
142799
142819
|
function PrintHQChartVersion()
|
|
142800
142820
|
{
|