hqchart 1.1.15354 → 1.1.15356

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.
@@ -4366,7 +4366,7 @@ this.CalculateRowHeight=function(rtBG){if(this.RowHeightType==1){this.RowHeight=
4366
4366
  var isHScreen=this.ChartFrame.IsHScreen===true;if(isHScreen)return;if(this.RowCount<=0)return;var dataWidth=this.ChartFrame.DataWidth;var distanceWidth=this.ChartFrame.DistanceWidth;var xPointCount=this.ChartFrame.XPointCount;var border=this.ChartFrame.GetBorder();var height=border.Bottom-border.TopTitle;var xOffset=border.LeftEx+g_JSChartResource.FrameLeftMargin;var chartright=border.RightEx;var top=border.TopTitle;var bottom=border.Bottom;//绘制背景
4367
4367
  if(this.Style===1){var rtBG={Left:border.LeftEx,Top:border.TopTitle,Right:border.RightEx,Bottom:border.TopEx};rtBG.Width=rtBG.Right-rtBG.Left;rtBG.Height=rtBG.Bottom-rtBG.Top;}else if(this.Style===2){var rtBG={Left:border.LeftEx,Top:border.BottomEx,Right:border.RightEx,Bottom:border.Bottom};rtBG.Width=rtBG.Right-rtBG.Left;rtBG.Height=rtBG.Bottom-rtBG.Top;top=rtBG.Top;}else{var rtBG={Left:border.LeftEx,Top:top,Right:border.RightEx,Bottom:bottom};rtBG.Width=rtBG.Right-rtBG.Left;rtBG.Height=rtBG.Bottom-rtBG.Top;}this.CalculateRowHeight(rtBG);this.DrawBG(rtBG);var itemHeight=this.RowHeight;var itemWidth=dataWidth+distanceWidth;if(itemHeight-this.ItemMargin.Top-this.ItemMargin.Bottom>0)itemHeight=itemHeight-this.ItemMargin.Top-this.ItemMargin.Bottom;if(itemWidth-this.ItemMargin.Left-this.ItemMargin.Right>0)itemWidth=itemWidth-this.ItemMargin.Left-this.ItemMargin.Right;var font=this.GetDynamicTextFont(itemHeight,itemWidth);this.TextFont=font;this.Canvas.font=this.TextFont;var bMinute=this.IsMinuteFrame();var cellWidth=1;if(bMinute){cellWidth=(border.Right-border.Left)/this.ChartFrame.XPointCount;if(cellWidth<1)cellWidth=1;}for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length&&j<xPointCount;++i,++j,xOffset+=dataWidth+distanceWidth){var kItem=this.Data.Data[i];if(!kItem)continue;if(bMinute){var x=this.ChartFrame.GetXFromIndex(j);var left=x-cellWidth/2;var right=x+cellWidth/2;}else{var left=xOffset;var right=xOffset+dataWidth+distanceWidth;if(right>chartright)break;var x=left+(right-left)/2;if(x>chartright)break;}var bDrawName=false;if(j==0&&this.RowNamePosition===1)bDrawName=true;if(bDrawName)this.DrawRowName(top,bottom,left,right);var key=this.BuildKey(kItem);if(!this.MapCache.has(key))continue;var mapItem=this.MapCache.get(key);if(!bDrawName)this.DrawRow(mapItem,top,bottom,left,right);//绘制一列
4368
4368
  }if(this.RowNamePosition==3)this.DrawRightRowName(rtBG);this.DrawBorder(rtBG);};this.DrawRowName=function(top,bottom,left,right){if(!IFrameSplitOperator.IsNonEmptyArray(this.RowName))return;var x=left,y=top,width=right-left;var yOffset=3;if(this.ItemMargin.YOffset)yOffset=this.ItemMargin.YOffset;for(var i=0;i<this.RowName.length;++i){var item=this.RowName[i];var rtBG={Left:x,Top:y,Right:right,Height:this.RowHeight,Width:width};rtBG.Bottom=rtBG.Top+this.RowHeight;var yText=rtBG.Bottom-yOffset;if(item.Name&&rtBG.Width>10){this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;this.Canvas.textBaseline='bottom';if(item.TextAlign=='right'){this.Canvas.textAlign='right';this.Canvas.fillText(item.Name,rtBG.Right-2,yText,width-4);}else if(item.TextAlign=='center'){this.Canvas.textAlign='center';this.Canvas.fillText(item.Name,rtBG.Left+rtBG.Width/2,yText,width-4);}else{this.Canvas.textAlign='left';this.Canvas.fillText(item.Name,rtBG.Left+2,yText,width-4);}}y+=this.RowHeight;}};//绘制右侧行名
4369
- this.DrawRightRowName=function(rtBG){var border=this.ChartFrame.GetBorder();if(this.BGColor){if(this.Style===1){var height=this.RowCount*this.RowHeight;height=Math.min(rtBG.Height,height);var width=border.ChartWidth-rtBG.Right-2;var maxTextWidth=0;for(var i=0;i<this.RowName.length;++i){var item=this.RowName[i];if(!item||!item.Name)continue;var textWidth=this.Canvas.measureText(item.Name).width;if(textWidth>maxTextWidth)maxTextWidth=textWidth;}if(maxTextWidth>0){maxTextWidth+=4;width=Math.min(width,maxTextWidth);}var rtRightBG={Left:rtBG.Right+1,Top:rtBG.Top+1,Width:width,Height:height};rtRightBG.Right=rtRightBG.Left+rtRightBG.Width;rtRightBG.Bottom=rtRightBG.Top+rtRightBG.Height;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtRightBG.Left,rtRightBG.Top,rtRightBG.Width,rtRightBG.Height);}else{var rtRightBG={Left:border.RightEx,Top:border.Top,Right:border.ChartWidth,Bottom:border.Bottom};rtRightBG.Width=rtRightBG.Right-rtRightBG.Left;rtRightBG.Height=rtRightBG.Bottom-rtRightBG.Top;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtRightBG.Left+1,rtRightBG.Top,rtRightBG.Width-2,rtRightBG.Height);}}var x=rtBG.Right,y=rtBG.Top;var yOffset=3;if(this.ItemMargin.YOffset)yOffset=this.ItemMargin.YOffset;for(var i=0;i<this.RowName.length;++i){var item=this.RowName[i];var rtBG={Left:x,Top:y,Right:border.ChartWidth,Height:this.RowHeight};rtBG.Bottom=rtBG.Top+this.RowHeight;rtBG.Width=rtBG.Right-rtBG.Left;var yText=rtBG.Bottom-yOffset;if(rtBG.Bottom>border.Bottom)break;if(item.Name&&rtBG.Width>10){if(item.BGColor){this.Canvas.fillStyle=item.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;this.Canvas.textBaseline='bottom';this.Canvas.textAlign='left';this.Canvas.fillText(item.Name,rtBG.Left+2,yText);this.AryNameRect.push({Rect:rtBG,Item:item,Index:i});}y+=this.RowHeight;}};this.DrawRow=function(data,top,bottom,left,right){if(!IFrameSplitOperator.IsNonEmptyArray(data.Data))return;var x=left,y=top,width=right-left;var yOffset=3;if(this.ItemMargin.YOffset)yOffset=this.ItemMargin.YOffset;for(var i=0;i<data.Data.length;++i,y+=this.RowHeight){var item=data.Data[i];if(!item)continue;var rtBG={Left:x,Top:y,Right:right,Height:this.RowHeight,Width:width};rtBG.Bottom=rtBG.Top+this.RowHeight;if(rtBG.Bottom>bottom)break;if(IFrameSplitOperator.IsNonEmptyArray(item.AryText))//左右显示
4369
+ this.DrawRightRowName=function(rtBG){var border=this.ChartFrame.GetBorder();var maxTextWidth=0;if(this.BGColor){if(this.Style===1){var height=this.RowCount*this.RowHeight;height=Math.min(rtBG.Height,height);var width=border.ChartWidth-rtBG.Right-2;for(var i=0;i<this.RowName.length;++i){var item=this.RowName[i];if(!item||!item.Name)continue;var textWidth=this.Canvas.measureText(item.Name).width;if(textWidth>maxTextWidth)maxTextWidth=textWidth;}if(maxTextWidth>0){maxTextWidth+=4;width=Math.min(width,maxTextWidth);}var rtRightBG={Left:rtBG.Right+1,Top:rtBG.Top+1,Width:width,Height:height};rtRightBG.Right=rtRightBG.Left+rtRightBG.Width;rtRightBG.Bottom=rtRightBG.Top+rtRightBG.Height;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtRightBG.Left,rtRightBG.Top,rtRightBG.Width,rtRightBG.Height);}else{var rtRightBG={Left:border.RightEx,Top:border.Top,Right:border.ChartWidth,Bottom:border.Bottom};rtRightBG.Width=rtRightBG.Right-rtRightBG.Left;rtRightBG.Height=rtRightBG.Bottom-rtRightBG.Top;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtRightBG.Left+1,rtRightBG.Top,rtRightBG.Width-2,rtRightBG.Height);}}var x=rtBG.Right,y=rtBG.Top;var yOffset=3;if(this.ItemMargin.YOffset)yOffset=this.ItemMargin.YOffset;for(var i=0;i<this.RowName.length;++i){var item=this.RowName[i];var rtBG={Left:x,Top:y,Right:border.ChartWidth,Height:this.RowHeight};rtBG.Bottom=rtBG.Top+this.RowHeight;rtBG.Width=rtBG.Right-rtBG.Left;var yText=rtBG.Bottom-yOffset;if(rtBG.Bottom>border.Bottom)break;if(item.Name&&rtBG.Width>10){if(item.BGColor){this.Canvas.fillStyle=item.BGColor;if(maxTextWidth>0)this.Canvas.fillRect(rtBG.Left,rtBG.Top,maxTextWidth,rtBG.Height);else this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;this.Canvas.textBaseline='bottom';this.Canvas.textAlign='left';this.Canvas.fillText(item.Name,rtBG.Left+2,yText);this.AryNameRect.push({Rect:rtBG,Item:item,Index:i});}y+=this.RowHeight;}};this.DrawRow=function(data,top,bottom,left,right){if(!IFrameSplitOperator.IsNonEmptyArray(data.Data))return;var x=left,y=top,width=right-left;var yOffset=3;if(this.ItemMargin.YOffset)yOffset=this.ItemMargin.YOffset;for(var i=0;i<data.Data.length;++i,y+=this.RowHeight){var item=data.Data[i];if(!item)continue;var rtBG={Left:x,Top:y,Right:right,Height:this.RowHeight,Width:width};rtBG.Bottom=rtBG.Top+this.RowHeight;if(rtBG.Bottom>bottom)break;if(IFrameSplitOperator.IsNonEmptyArray(item.AryText))//左右显示
4370
4370
  {var subCellWidth=rtBG.Width/item.AryText.length;var xCell=rtBG.Left;for(var j=0;j<item.AryText.length;++j){var subItem=item.AryText[j];var rtSubBG={Left:xCell,Top:rtBG.Top,Bottom:rtBG.Bottom,Width:subCellWidth,Height:rtBG.Height};rtSubBG.Right=rtSubBG.Left+rtSubBG.Width;if(subItem&&subItem.BGColor){this.Canvas.fillStyle=subItem.BGColor;this.Canvas.fillRect(rtSubBG.Left,rtSubBG.Top,rtSubBG.Width,rtSubBG.Height);}if(subItem&&subItem.Color&&subCellWidth>10){this.Canvas.fillStyle=subItem.Color;this.Canvas.textBaseline='bottom';var yText=rtSubBG.Bottom-yOffset;if(subItem.TextAlign=='right'){this.Canvas.textAlign='right';this.Canvas.fillText(subItem.Text,rtSubBG.Right-2,yText,width-4);}else if(subItem.TextAlign=='center'){this.Canvas.textAlign='center';this.Canvas.fillText(subItem.Text,rtSubBG.Left+rtSubBG.Width/2,yText,width-4);}else{this.Canvas.textAlign='left';this.Canvas.fillText(subItem.Text,rtSubBG.Left+2,yText,width-4);}}if(rtBG.Width>5){this.AryCellRect.push({Item:{Cell:item,Colunm:data,RowIndex:i,SubCell:subItem,SubIndex:j,Tooltip:subItem.Tooltip,Type:2},Rect:rtSubBG});}xCell+=subCellWidth;}}else{if(item.BGColor){this.Canvas.fillStyle=item.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}if(item.Text&&rtBG.Width>10){if(item.Color)this.Canvas.fillStyle=item.Color;else this.Canvas.fillStyle=this.TextColor;this.Canvas.textBaseline='bottom';var yText=rtBG.Bottom-yOffset;if(item.TextAlign=='right'){this.Canvas.textAlign='right';this.Canvas.fillText(item.Text,rtBG.Right-2,yText,width-4);}else if(item.TextAlign=='center'){this.Canvas.textAlign='center';this.Canvas.fillText(item.Text,rtBG.Left+rtBG.Width/2,yText,width-4);}else{this.Canvas.textAlign='left';this.Canvas.fillText(item.Text,rtBG.Left+2,yText,width-4);}}if(rtBG.Width>5){this.AryCellRect.push({Item:{Cell:item,Colunm:data,RowIndex:i,Tooltip:item.Tooltip,Type:1},Rect:rtBG});}}}};this.GetDynamicTextFont=function(cellHeight,width,fontOption){var fontSize=parseInt(cellHeight)-2;if(cellHeight<5)fontSize=parseInt(cellHeight);//高度太小了就不要上下间距了
4371
4371
  if(fontSize>this.TextFontConfig.FontMaxSize)fontSize=this.TextFontConfig.FontMaxSize;else if(fontSize<=0)fontSize=1;var font=this.FormatFontString(fontSize,this.TextFontConfig.Family,fontOption);return font;};this.FormatFontString=function(fontSize,family,option){var font;if(!option){font=fontSize+'px '+family;}else{if(option.Weight)font=option.Weight+' '+fontSize+'px '+family;}return font;};this.GetMaxMin=function(){return{Min:0,Max:this.RowCount};};this.GetTooltipData=function(x,y,tooltip){if(!this.IsShow)return false;for(var i=0;i<this.AryCellRect.length;++i){var item=this.AryCellRect[i];if(!item.Rect)continue;var rect=item.Rect;if(x>=rect.Left&&x<=rect.Right&&y>=rect.Top&&y<=rect.Bottom){var data=item.Item;JSConsole.Chart.Log('[ChartKLineTable::GetTooltipData] cell',item);tooltip.Data={Rect:item.Rect,Item:data};tooltip.ChartPaint=this;tooltip.Type=9;//ChartKLineTable
4372
4372
  return true;}}return false;};}//表格
@@ -15766,7 +15766,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
15766
15766
  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);};}/********************************************************************************
15767
15767
  * 版本信息输出
15768
15768
  *
15769
- */var HQCHART_VERSION="1.1.15353";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();//把给外界调用的方法暴露出来
15769
+ */var HQCHART_VERSION="1.1.15355";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();//把给外界调用的方法暴露出来
15770
15770
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
15771
15771
  // BaseIndex:BaseIndex,
15772
15772
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.15354",
3
+ "version": "1.1.15356",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -34736,7 +34736,7 @@ function ChartKLineTable()
34736
34736
  this.DrawRightRowName=function(rtBG)
34737
34737
  {
34738
34738
  var border=this.ChartFrame.GetBorder();
34739
-
34739
+ var maxTextWidth=0;
34740
34740
  if (this.BGColor)
34741
34741
  {
34742
34742
  if (this.Style===1)
@@ -34744,7 +34744,6 @@ function ChartKLineTable()
34744
34744
  var height=this.RowCount*this.RowHeight;
34745
34745
  height=Math.min(rtBG.Height,height);
34746
34746
  var width=border.ChartWidth-rtBG.Right-2;
34747
- var maxTextWidth=0;
34748
34747
  for(var i=0;i<this.RowName.length;++i)
34749
34748
  {
34750
34749
  var item=this.RowName[i];
@@ -34796,7 +34795,8 @@ function ChartKLineTable()
34796
34795
  if (item.BGColor)
34797
34796
  {
34798
34797
  this.Canvas.fillStyle=item.BGColor;
34799
- this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
34798
+ if (maxTextWidth>0) this.Canvas.fillRect(rtBG.Left, rtBG.Top, maxTextWidth, rtBG.Height);
34799
+ else this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
34800
34800
  }
34801
34801
 
34802
34802
  this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;
@@ -38832,7 +38832,7 @@ function ChartKLineTable()
38832
38832
  this.DrawRightRowName=function(rtBG)
38833
38833
  {
38834
38834
  var border=this.ChartFrame.GetBorder();
38835
-
38835
+ var maxTextWidth=0;
38836
38836
  if (this.BGColor)
38837
38837
  {
38838
38838
  if (this.Style===1)
@@ -38840,7 +38840,6 @@ function ChartKLineTable()
38840
38840
  var height=this.RowCount*this.RowHeight;
38841
38841
  height=Math.min(rtBG.Height,height);
38842
38842
  var width=border.ChartWidth-rtBG.Right-2;
38843
- var maxTextWidth=0;
38844
38843
  for(var i=0;i<this.RowName.length;++i)
38845
38844
  {
38846
38845
  var item=this.RowName[i];
@@ -38892,7 +38891,8 @@ function ChartKLineTable()
38892
38891
  if (item.BGColor)
38893
38892
  {
38894
38893
  this.Canvas.fillStyle=item.BGColor;
38895
- this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
38894
+ if (maxTextWidth>0) this.Canvas.fillRect(rtBG.Left, rtBG.Top, maxTextWidth, rtBG.Height);
38895
+ else this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
38896
38896
  }
38897
38897
 
38898
38898
  this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;
@@ -155431,7 +155431,7 @@ function ScrollBarBGChart()
155431
155431
 
155432
155432
 
155433
155433
 
155434
- var HQCHART_VERSION="1.1.15353";
155434
+ var HQCHART_VERSION="1.1.15355";
155435
155435
 
155436
155436
  function PrintHQChartVersion()
155437
155437
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.15353";
8
+ var HQCHART_VERSION="1.1.15355";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -38876,7 +38876,7 @@ function ChartKLineTable()
38876
38876
  this.DrawRightRowName=function(rtBG)
38877
38877
  {
38878
38878
  var border=this.ChartFrame.GetBorder();
38879
-
38879
+ var maxTextWidth=0;
38880
38880
  if (this.BGColor)
38881
38881
  {
38882
38882
  if (this.Style===1)
@@ -38884,7 +38884,6 @@ function ChartKLineTable()
38884
38884
  var height=this.RowCount*this.RowHeight;
38885
38885
  height=Math.min(rtBG.Height,height);
38886
38886
  var width=border.ChartWidth-rtBG.Right-2;
38887
- var maxTextWidth=0;
38888
38887
  for(var i=0;i<this.RowName.length;++i)
38889
38888
  {
38890
38889
  var item=this.RowName[i];
@@ -38936,7 +38935,8 @@ function ChartKLineTable()
38936
38935
  if (item.BGColor)
38937
38936
  {
38938
38937
  this.Canvas.fillStyle=item.BGColor;
38939
- this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
38938
+ if (maxTextWidth>0) this.Canvas.fillRect(rtBG.Left, rtBG.Top, maxTextWidth, rtBG.Height);
38939
+ else this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
38940
38940
  }
38941
38941
 
38942
38942
  this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;
@@ -167490,7 +167490,7 @@ function HQChartScriptWorker()
167490
167490
 
167491
167491
 
167492
167492
 
167493
- var HQCHART_VERSION="1.1.15353";
167493
+ var HQCHART_VERSION="1.1.15355";
167494
167494
 
167495
167495
  function PrintHQChartVersion()
167496
167496
  {