hqchart 1.1.15354 → 1.1.15358
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
|
@@ -1490,7 +1490,9 @@ if(item.IsShowRightText==false)chart.Frame.SubFrame[i].Frame.YSplitOperator.IsSh
|
|
|
1490
1490
|
{for(var i=0;i<option.Overlay.length;++i){var item=option.Overlay[i];chart.OverlaySymbol(item.Symbol,item);}}if(option.ExtendChart){for(var i=0;i<option.ExtendChart.length;++i){var item=option.ExtendChart[i];chart.CreateExtendChart(item.Name,item);}}if(IFrameSplitOperator.IsNonEmptyArray(option.Windows)){//创建子窗口的指标
|
|
1491
1491
|
for(var i=0;i<option.Windows.length;++i){var item=option.Windows[i];if(item.Script){chart.WindowIndex[i]=new ScriptIndex(item.Name,item.Script,item.Args,item);//脚本执行
|
|
1492
1492
|
}else{var indexItem=JSIndexMap.Get(item.Index);if(indexItem){chart.WindowIndex[i]=indexItem.Create();chart.CreateWindowIndex(i);}else{var scriptData=new JSIndexScript();var indexInfo=scriptData.Get(item.Index);if(!indexInfo)continue;if(item.Lock)indexInfo.Lock=item.Lock;chart.WindowIndex[i]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo);//脚本执行
|
|
1493
|
-
}}
|
|
1493
|
+
}}chart.SetSubFrameAttribute(chart.Frame.SubFrame[i],item,null);}}//叠加指标宽度
|
|
1494
|
+
if(option.OverlayIndexFrameWidth>40)chart.Frame.FixedRightWidth.Overlay=option.OverlayIndexFrameWidth;//叠加指标
|
|
1495
|
+
if(IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex)){for(var i=0;i<option.OverlayIndex.length;++i){var item=option.OverlayIndex[i];if(item.Windows>=chart.Frame.SubFrame.length)continue;var itemString=(0,_stringify2.default)(item);var obj=JSON.parse(itemString);if(item.Index)obj.IndexName=item.Index;if(item.Windows>=0)obj.WindowIndex=item.Windows;chart.CreateOverlayWindowsIndex(obj);}}this.AdjustTitleHeight(chart);return chart;};//深度图
|
|
1494
1496
|
this.CreateDepthChartContainer=function(option){var chart=null;chart=new DepthChartContainer(this.CanvasElement);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;if(option.EnableScrollUpDown==true)chart.EnableScrollUpDown=option.EnableScrollUpDown;if(IFrameSplitOperator.IsPlusNumber(option.MaxVolRate))chart.MaxVolRate=option.MaxVolRate;if(option.ZoomStepPixel>0)chart.ZoomStepPixel=option.ZoomStepPixel;if(IFrameSplitOperator.IsString(option.SplashTitle))chart.LoadDataSplashTitle=option.SplashTitle;if(IFrameSplitOperator.IsBool(option.EnableVerifyRecvData))chart.EnableVerifyRecvData=option.EnableVerifyRecvData;if(option.Language){var value=g_JSChartLocalization.GetLanguageID(option.Language);if(IFrameSplitOperator.IsNumber(value))chart.LanguageID=value;}chart.Create(option.Listener);if(option.Border){if(IFrameSplitOperator.IsNumber(option.Border.Left))chart.Frame.ChartBorder.Left=option.Border.Left;else option.Border.Left=chart.Frame.ChartBorder.Left;if(IFrameSplitOperator.IsNumber(option.Border.Right))chart.Frame.ChartBorder.Right=option.Border.Right;else option.Border.Right=chart.Frame.ChartBorder.Right;if(IFrameSplitOperator.IsNumber(option.Border.Top))chart.Frame.ChartBorder.Top=option.Border.Top;else option.Border.Top=chart.Frame.ChartBorder.Top;if(IFrameSplitOperator.IsNumber(option.Border.Bottom))chart.Frame.ChartBorder.Bottom=option.Border.Bottom;else option.Border.Bottom=chart.Frame.ChartBorder.Bottom;}this.AdjustChartBorder(chart);if(option.CorssCursorTouchEnd===true)chart.CorssCursorTouchEnd=option.CorssCursorTouchEnd;if(option.CorssCursorInfo){var item=option.CorssCursorInfo;if(IFrameSplitOperator.IsNumber(item.HPenType))chart.ChartCorssCursor.HPenType=item.HPenType;if(IFrameSplitOperator.IsNumber(item.VPenType))chart.ChartCorssCursor.VPenType=item.VPenType;if(IFrameSplitOperator.IsBool(item.IsShowTooltip))chart.ChartCorssCursor.IsShowTooltip=item.IsShowTooltip;}if(option.Frame){var item=option.Frame;if(item.SplitCount)chart.Frame.YSplitOperator.SplitCount=item.SplitCount;if(IFrameSplitOperator.IsNumber(item.SplitType))chart.Frame.YSplitOperator.SplitType=item.SplitType;if(IFrameSplitOperator.IsNumber(item.Height))chart.Frame.Height=item.Height;if(IFrameSplitOperator.IsNumber(item.YLineType))chart.Frame.YSplitOperator.LineType=item.YLineType;if(IFrameSplitOperator.IsNumber(item.XLineType))chart.Frame.XSplitOperator.LineType=item.XLineType;if(Array.isArray(item.IgnoreYValue))chart.Frame.YSplitOperator.IgnoreYValue=item.IgnoreYValue;if(item.IsShowLeftText===false||item.IsShowLeftText===true){chart.Frame.IsShowYText[0]=item.IsShowLeftText;chart.Frame.YSplitOperator.IsShowLeftText=item.IsShowLeftText;//显示左边刻度
|
|
1495
1497
|
}if(item.IsShowRightText===false||item.IsShowRightText===true){chart.Frame.IsShowYText[1]=item.IsShowRightText;chart.Frame.YSplitOperator.IsShowRightText=item.IsShowRightText;//显示右边刻度
|
|
1496
1498
|
}if(item.IsShowXLine==false)chart.Frame.IsShowXLine=item.IsShowXLine;if(item.IsShowYLine==false)chart.Frame.IsShowYLine=item.IsShowYLine;if(IFrameSplitOperator.IsNumber(item.XSplitCount))chart.Frame.XSplitOperator.SplitCount=item.XSplitCount;//X轴刻度个数 半边的
|
|
@@ -4366,7 +4368,7 @@ this.CalculateRowHeight=function(rtBG){if(this.RowHeightType==1){this.RowHeight=
|
|
|
4366
4368
|
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
4369
|
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
4370
|
}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;
|
|
4371
|
+
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
4372
|
{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
4373
|
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
4374
|
return true;}}return false;};}//表格
|
|
@@ -15766,7 +15768,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
15766
15768
|
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
15769
|
* 版本信息输出
|
|
15768
15770
|
*
|
|
15769
|
-
*/var HQCHART_VERSION="1.1.
|
|
15771
|
+
*/var HQCHART_VERSION="1.1.15357";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
15772
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
15771
15773
|
// BaseIndex:BaseIndex,
|
|
15772
15774
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -1794,22 +1794,26 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1794
1794
|
|
|
1795
1795
|
}
|
|
1796
1796
|
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
if (item.Overlay!=null) frame.OverlayIndex=item.Overlay;
|
|
1801
|
-
if (IFrameSplitOperator.IsBool(item.Export)) frame.ExportData=item.Export;
|
|
1802
|
-
if (IFrameSplitOperator.IsBool(item.MaxMin)) chart.Frame.SubFrame[i].Frame.MaxMinWindow=item.MaxMin;
|
|
1803
|
-
if (IFrameSplitOperator.IsBool(item.TitleWindow)) chart.Frame.SubFrame[i].Frame.TitleWindow=item.TitleWindow;
|
|
1804
|
-
if (IFrameSplitOperator.IsBool(item.IsDrawTitleBG)) chart.Frame.SubFrame[i].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
1805
|
-
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
1797
|
+
chart.SetSubFrameAttribute(chart.Frame.SubFrame[i],item, null)
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1806
1800
|
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1801
|
+
//叠加指标宽度
|
|
1802
|
+
if (option.OverlayIndexFrameWidth>40) chart.Frame.FixedRightWidth.Overlay=option.OverlayIndexFrameWidth;
|
|
1803
|
+
|
|
1804
|
+
//叠加指标
|
|
1805
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
1806
|
+
{
|
|
1807
|
+
for(var i=0;i<option.OverlayIndex.length;++i)
|
|
1808
|
+
{
|
|
1809
|
+
var item=option.OverlayIndex[i];
|
|
1810
|
+
if (item.Windows>=chart.Frame.SubFrame.length) continue;
|
|
1811
|
+
|
|
1812
|
+
var itemString = JSON.stringify(item);
|
|
1813
|
+
var obj = JSON.parse(itemString);
|
|
1814
|
+
if (item.Index) obj.IndexName=item.Index;
|
|
1815
|
+
if (item.Windows>=0) obj.WindowIndex=item.Windows;
|
|
1816
|
+
chart.CreateOverlayWindowsIndex(obj);
|
|
1813
1817
|
}
|
|
1814
1818
|
}
|
|
1815
1819
|
|
|
@@ -34736,7 +34740,7 @@ function ChartKLineTable()
|
|
|
34736
34740
|
this.DrawRightRowName=function(rtBG)
|
|
34737
34741
|
{
|
|
34738
34742
|
var border=this.ChartFrame.GetBorder();
|
|
34739
|
-
|
|
34743
|
+
var maxTextWidth=0;
|
|
34740
34744
|
if (this.BGColor)
|
|
34741
34745
|
{
|
|
34742
34746
|
if (this.Style===1)
|
|
@@ -34744,7 +34748,6 @@ function ChartKLineTable()
|
|
|
34744
34748
|
var height=this.RowCount*this.RowHeight;
|
|
34745
34749
|
height=Math.min(rtBG.Height,height);
|
|
34746
34750
|
var width=border.ChartWidth-rtBG.Right-2;
|
|
34747
|
-
var maxTextWidth=0;
|
|
34748
34751
|
for(var i=0;i<this.RowName.length;++i)
|
|
34749
34752
|
{
|
|
34750
34753
|
var item=this.RowName[i];
|
|
@@ -34796,7 +34799,8 @@ function ChartKLineTable()
|
|
|
34796
34799
|
if (item.BGColor)
|
|
34797
34800
|
{
|
|
34798
34801
|
this.Canvas.fillStyle=item.BGColor;
|
|
34799
|
-
this.Canvas.fillRect(rtBG.Left, rtBG.Top,
|
|
34802
|
+
if (maxTextWidth>0) this.Canvas.fillRect(rtBG.Left, rtBG.Top, maxTextWidth, rtBG.Height);
|
|
34803
|
+
else this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
34800
34804
|
}
|
|
34801
34805
|
|
|
34802
34806
|
this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;
|
|
@@ -5890,22 +5890,26 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5890
5890
|
|
|
5891
5891
|
}
|
|
5892
5892
|
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
if (item.Overlay!=null) frame.OverlayIndex=item.Overlay;
|
|
5897
|
-
if (IFrameSplitOperator.IsBool(item.Export)) frame.ExportData=item.Export;
|
|
5898
|
-
if (IFrameSplitOperator.IsBool(item.MaxMin)) chart.Frame.SubFrame[i].Frame.MaxMinWindow=item.MaxMin;
|
|
5899
|
-
if (IFrameSplitOperator.IsBool(item.TitleWindow)) chart.Frame.SubFrame[i].Frame.TitleWindow=item.TitleWindow;
|
|
5900
|
-
if (IFrameSplitOperator.IsBool(item.IsDrawTitleBG)) chart.Frame.SubFrame[i].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
5901
|
-
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
5893
|
+
chart.SetSubFrameAttribute(chart.Frame.SubFrame[i],item, null)
|
|
5894
|
+
}
|
|
5895
|
+
}
|
|
5902
5896
|
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5897
|
+
//叠加指标宽度
|
|
5898
|
+
if (option.OverlayIndexFrameWidth>40) chart.Frame.FixedRightWidth.Overlay=option.OverlayIndexFrameWidth;
|
|
5899
|
+
|
|
5900
|
+
//叠加指标
|
|
5901
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
5902
|
+
{
|
|
5903
|
+
for(var i=0;i<option.OverlayIndex.length;++i)
|
|
5904
|
+
{
|
|
5905
|
+
var item=option.OverlayIndex[i];
|
|
5906
|
+
if (item.Windows>=chart.Frame.SubFrame.length) continue;
|
|
5907
|
+
|
|
5908
|
+
var itemString = JSON.stringify(item);
|
|
5909
|
+
var obj = JSON.parse(itemString);
|
|
5910
|
+
if (item.Index) obj.IndexName=item.Index;
|
|
5911
|
+
if (item.Windows>=0) obj.WindowIndex=item.Windows;
|
|
5912
|
+
chart.CreateOverlayWindowsIndex(obj);
|
|
5909
5913
|
}
|
|
5910
5914
|
}
|
|
5911
5915
|
|
|
@@ -38832,7 +38836,7 @@ function ChartKLineTable()
|
|
|
38832
38836
|
this.DrawRightRowName=function(rtBG)
|
|
38833
38837
|
{
|
|
38834
38838
|
var border=this.ChartFrame.GetBorder();
|
|
38835
|
-
|
|
38839
|
+
var maxTextWidth=0;
|
|
38836
38840
|
if (this.BGColor)
|
|
38837
38841
|
{
|
|
38838
38842
|
if (this.Style===1)
|
|
@@ -38840,7 +38844,6 @@ function ChartKLineTable()
|
|
|
38840
38844
|
var height=this.RowCount*this.RowHeight;
|
|
38841
38845
|
height=Math.min(rtBG.Height,height);
|
|
38842
38846
|
var width=border.ChartWidth-rtBG.Right-2;
|
|
38843
|
-
var maxTextWidth=0;
|
|
38844
38847
|
for(var i=0;i<this.RowName.length;++i)
|
|
38845
38848
|
{
|
|
38846
38849
|
var item=this.RowName[i];
|
|
@@ -38892,7 +38895,8 @@ function ChartKLineTable()
|
|
|
38892
38895
|
if (item.BGColor)
|
|
38893
38896
|
{
|
|
38894
38897
|
this.Canvas.fillStyle=item.BGColor;
|
|
38895
|
-
this.Canvas.fillRect(rtBG.Left, rtBG.Top,
|
|
38898
|
+
if (maxTextWidth>0) this.Canvas.fillRect(rtBG.Left, rtBG.Top, maxTextWidth, rtBG.Height);
|
|
38899
|
+
else this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
38896
38900
|
}
|
|
38897
38901
|
|
|
38898
38902
|
this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;
|
|
@@ -155431,7 +155435,7 @@ function ScrollBarBGChart()
|
|
|
155431
155435
|
|
|
155432
155436
|
|
|
155433
155437
|
|
|
155434
|
-
var HQCHART_VERSION="1.1.
|
|
155438
|
+
var HQCHART_VERSION="1.1.15357";
|
|
155435
155439
|
|
|
155436
155440
|
function PrintHQChartVersion()
|
|
155437
155441
|
{
|
|
@@ -5934,22 +5934,26 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5934
5934
|
|
|
5935
5935
|
}
|
|
5936
5936
|
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
if (item.Overlay!=null) frame.OverlayIndex=item.Overlay;
|
|
5941
|
-
if (IFrameSplitOperator.IsBool(item.Export)) frame.ExportData=item.Export;
|
|
5942
|
-
if (IFrameSplitOperator.IsBool(item.MaxMin)) chart.Frame.SubFrame[i].Frame.MaxMinWindow=item.MaxMin;
|
|
5943
|
-
if (IFrameSplitOperator.IsBool(item.TitleWindow)) chart.Frame.SubFrame[i].Frame.TitleWindow=item.TitleWindow;
|
|
5944
|
-
if (IFrameSplitOperator.IsBool(item.IsDrawTitleBG)) chart.Frame.SubFrame[i].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
5945
|
-
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
5937
|
+
chart.SetSubFrameAttribute(chart.Frame.SubFrame[i],item, null)
|
|
5938
|
+
}
|
|
5939
|
+
}
|
|
5946
5940
|
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5941
|
+
//叠加指标宽度
|
|
5942
|
+
if (option.OverlayIndexFrameWidth>40) chart.Frame.FixedRightWidth.Overlay=option.OverlayIndexFrameWidth;
|
|
5943
|
+
|
|
5944
|
+
//叠加指标
|
|
5945
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
5946
|
+
{
|
|
5947
|
+
for(var i=0;i<option.OverlayIndex.length;++i)
|
|
5948
|
+
{
|
|
5949
|
+
var item=option.OverlayIndex[i];
|
|
5950
|
+
if (item.Windows>=chart.Frame.SubFrame.length) continue;
|
|
5951
|
+
|
|
5952
|
+
var itemString = JSON.stringify(item);
|
|
5953
|
+
var obj = JSON.parse(itemString);
|
|
5954
|
+
if (item.Index) obj.IndexName=item.Index;
|
|
5955
|
+
if (item.Windows>=0) obj.WindowIndex=item.Windows;
|
|
5956
|
+
chart.CreateOverlayWindowsIndex(obj);
|
|
5953
5957
|
}
|
|
5954
5958
|
}
|
|
5955
5959
|
|
|
@@ -38876,7 +38880,7 @@ function ChartKLineTable()
|
|
|
38876
38880
|
this.DrawRightRowName=function(rtBG)
|
|
38877
38881
|
{
|
|
38878
38882
|
var border=this.ChartFrame.GetBorder();
|
|
38879
|
-
|
|
38883
|
+
var maxTextWidth=0;
|
|
38880
38884
|
if (this.BGColor)
|
|
38881
38885
|
{
|
|
38882
38886
|
if (this.Style===1)
|
|
@@ -38884,7 +38888,6 @@ function ChartKLineTable()
|
|
|
38884
38888
|
var height=this.RowCount*this.RowHeight;
|
|
38885
38889
|
height=Math.min(rtBG.Height,height);
|
|
38886
38890
|
var width=border.ChartWidth-rtBG.Right-2;
|
|
38887
|
-
var maxTextWidth=0;
|
|
38888
38891
|
for(var i=0;i<this.RowName.length;++i)
|
|
38889
38892
|
{
|
|
38890
38893
|
var item=this.RowName[i];
|
|
@@ -38936,7 +38939,8 @@ function ChartKLineTable()
|
|
|
38936
38939
|
if (item.BGColor)
|
|
38937
38940
|
{
|
|
38938
38941
|
this.Canvas.fillStyle=item.BGColor;
|
|
38939
|
-
this.Canvas.fillRect(rtBG.Left, rtBG.Top,
|
|
38942
|
+
if (maxTextWidth>0) this.Canvas.fillRect(rtBG.Left, rtBG.Top, maxTextWidth, rtBG.Height);
|
|
38943
|
+
else this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
38940
38944
|
}
|
|
38941
38945
|
|
|
38942
38946
|
this.Canvas.fillStyle=item.Color?item.Color:this.TextColor;
|
|
@@ -167490,7 +167494,7 @@ function HQChartScriptWorker()
|
|
|
167490
167494
|
|
|
167491
167495
|
|
|
167492
167496
|
|
|
167493
|
-
var HQCHART_VERSION="1.1.
|
|
167497
|
+
var HQCHART_VERSION="1.1.15357";
|
|
167494
167498
|
|
|
167495
167499
|
function PrintHQChartVersion()
|
|
167496
167500
|
{
|