hqchart 1.1.14711 → 1.1.14713
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
|
@@ -6122,6 +6122,7 @@ this.SelectedChart;//选中的图形
|
|
|
6122
6122
|
this.ArgumentsText;//参数信息
|
|
6123
6123
|
this.MerginLeft=g_JSChartResource.IndexTitleMerginLeft;//标题输出左边间距
|
|
6124
6124
|
this.Buttons=[];//按钮
|
|
6125
|
+
this.NameButtonHeight=0;//指标名字按钮高度
|
|
6125
6126
|
this.UpDownArrowConfig={UpColor:g_JSChartResource.IndexTitle.UpDownArrow.UpColor,DownColor:g_JSChartResource.IndexTitle.UpDownArrow.DownColor,UnchangeColor:g_JSChartResource.IndexTitle.UpDownArrow.UnchangeColor};//K线标题颜色
|
|
6126
6127
|
this.UpColor=g_JSChartResource.UpTextColor;this.DownColor=g_JSChartResource.DownTextColor;this.UnchangeColor=g_JSChartResource.UnchagneTextColor;this.VolColor=g_JSChartResource.Title.VolColor;this.AmountColor=g_JSChartResource.Title.AmountColor;this.DateTimeColor=g_JSChartResource.Title.DateTimeColor;this.NameColor=g_JSChartResource.Title.NameColor;this.PositionColor=g_JSChartResource.Title.PositionColor;//持仓
|
|
6127
6128
|
//动态标题
|
|
@@ -6138,7 +6139,7 @@ if(item.YFClose>0&&MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol)){var value=(it
|
|
|
6138
6139
|
{var unit=MARKET_SUFFIX_NAME.GetVolUnit(upperSymbol);var vol=item.Vol/unit;var text=g_JSChartLocalization.GetText('KTitle-Vol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(vol,2,this.LanguageID);aryText.push({Text:text,Color:this.VolColor,LeftSpace:leftSpace});}if(IFrameSplitOperator.IsNumber(item.Amount))//成交金额
|
|
6139
6140
|
{var text=g_JSChartLocalization.GetText('KTitle-Amount',this.LanguageID)+IFrameSplitOperator.FormatValueString(item.Amount,2,this.LanguageID);aryText.push({Text:text,Color:this.AmountColor,LeftSpace:leftSpace});}return aryText;};this.FormatIndexTitle=function(kItem,dataInfo){var result=null;var aryText=[];if(dataInfo.Name){aryText.push({Text:dataInfo.Name,Color:dataInfo.Color});result={Text:null,ArrayText:aryText};}if(!kItem)return result;if(!dataInfo.Chart)return result;var titleItem=dataInfo.Chart.GetItem(kItem);if(!titleItem||!titleItem.Data)return result;if(!IFrameSplitOperator.IsNonEmptyArray(titleItem.Data.AryText))return result;if(!result)result={Text:null,ArrayText:aryText};for(var i=0;i<titleItem.Data.AryText.length;++i){var item=titleItem.Data.AryText[i];if(!item)continue;var textItem={Name:null,Text:null};if(item.Name)textItem.Name=item.Name;if(item.Text)textItem.Text=item.Text;if(item.Color)textItem.Color=item.Color;if(IFrameSplitOperator.IsNumber(item.LeftSpace))textItem.LeftSpace=item.LeftSpace;aryText.push(textItem);}return result;};this.GetColor=function(price,yClose){if(!IFrameSplitOperator.IsNumber(yClose))return this.UnchangeColor;if(price>yClose)return this.UpColor;else if(price<yClose)return this.DownColor;else return this.UnchangeColor;};this.ForamtMultiLineTitle=function(dataIndex,dataInfo){if(!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Lines))return null;var aryText=[];for(var i=0;i<dataInfo.Lines.length;++i){var line=dataInfo.Lines[i];for(var j=0;j<line.Point.length;++j){var item=line.Point[j];if(item.Index==dataIndex){var item={Text:item.Value.toFixed(2)};if(aryText.length==0)item.Name=dataInfo.Name;item.Color=line.Color;aryText.push(item);break;}}}if(!IFrameSplitOperator.IsNonEmptyArray(aryText))return null;return aryText;};this.ForamtMultiPointTitle=function(dataIndex,dataInfo){if(!dataInfo.GetItemCallback)return null;if(!dataInfo.Data||!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Data.Data))return null;var kItem=dataInfo.Data.Data[dataIndex];if(!kItem)return null;var group=dataInfo.GetItemCallback(kItem);if(!group||!IFrameSplitOperator.IsNonEmptyArray(group.Data))return null;var aryText=[];for(var i=0;i<group.Data.length;++i){var item=group.Data[i];var config=item.ColorConfig;var color=null;if(config.BGColor)color=config.BGColor;else if(config.Color)color=config.Color;if(config.Name)aryText.push({Text:config.Name+':',Color:color});var value=item.Data.Value;if(IFrameSplitOperator.IsString(item.Data.Value))value=ChartData.GetKValue(kItem,item.Data.Value);aryText.push({Text:this.FormatValue(value,dataInfo),Color:color});}if(!IFrameSplitOperator.IsNonEmptyArray(aryText))return null;return aryText;};this.ForamtMultiBarTitle=function(dataIndex,dataInfo){if(!dataInfo.GetItemCallback)return null;if(!dataInfo.Data||!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Data.Data))return null;var kItem=dataInfo.Data.Data[dataIndex];if(!kItem)return null;var group=dataInfo.GetItemCallback(kItem);if(!group||!IFrameSplitOperator.IsNonEmptyArray(group.Data))return null;var aryText=[];for(var i=0;i<group.Data.length;++i){var item=group.Data[i];var config=item.ColorConfig;var color=null;if(config.BGColor)color=config.BGColor;else if(config.Color)color=config.Color;if(config.Name)aryText.push({Text:config.Name+':',Color:color});var value=item.Data.Value;if(IFrameSplitOperator.IsString(item.Data.Value))value=ChartData.GetKValue(kItem,item.Data.Value);var value2=item.Data.Value2;if(IFrameSplitOperator.IsString(item.Data.Value2))value2=ChartData.GetKValue(kItem,item.Data.Value2);aryText.push({Text:'['+this.FormatValue(value,dataInfo)+', '+this.FormatValue(value2,dataInfo)+'] ',Color:color});}if(!IFrameSplitOperator.IsNonEmptyArray(aryText))return null;return aryText;};this.FormatVPVRTitle=function(pt,dataInfo){var chart=dataInfo.Chart;var aryText=[];if(chart.VolType==0){var item={Text:" Up/Down ",Color:this.TitleColor};aryText.push(item);}else{var item={Text:" Total ",Color:this.TitleColor};aryText.push(item);}if(!IFrameSplitOperator.IsNumber(pt.Y))return aryText;var top=this.Frame.ChartBorder.GetTopEx();var bottom=this.Frame.ChartBorder.GetBottomEx();if(pt.Y<top||pt.Y>bottom)return aryText;var yPrice=this.Frame.GetYData(pt.Y);var find=null;for(var i=0;i<dataInfo.Data.Data.length;++i){var item=dataInfo.Data.Data[i];if(yPrice>=item.Price-dataInfo.Data.PriceOffset/2&&yPrice<item.Price+dataInfo.Data.PriceOffset/2){find=item;break;}}if(!find)return null;if(chart.VolType==0){var total=0;for(var i=0;i<find.Vol.length;++i){var volItem=find.Vol[i];if(!IFrameSplitOperator.IsNumber(volItem.Value))continue;var item={Text:IFrameSplitOperator.FormatVolString(volItem.Value,this.LanguageID)};total+=volItem.Value;if(IFrameSplitOperator.IsNumber(volItem.ColorID))item.Color=chart.BarColor[volItem.ColorID];else if(volItem.Color)item.Color=volItem.Color;aryText.push(item);}var item={Text:IFrameSplitOperator.FormatVolString(total,this.LanguageID),Color:this.TitleColor};aryText.push(item);}else{if(find.TotalVol&&IFrameSplitOperator.IsNumber(find.TotalVol.Value)){var item={Text:IFrameSplitOperator.FormatVolString(find.TotalVol.Value,this.LanguageID)};if(IFrameSplitOperator.IsNumber(find.TotalVol.ColorID))item.Color=chart.BarColor[find.TotalVol.ColorID];else if(find.TotalVol.Color)item.Color=find.TotalVol.Color;aryText.push(item);}}return aryText;};this.IsShowLastData=function(){if(this.HQChart&&this.HQChart.EnableClickModel&&this.HQChart.ClickModel){var clickModel=this.HQChart.ClickModel;if(clickModel.IsShowCorssCursor)return false;}var isShowLastData=false;if(this.DrawStatus&&this.DrawStatus.IsTitleShowLatestData){var status=this.DrawStatus;if(!IFrameSplitOperator.IsNumber(status.FrameID)||status.FrameID<0)isShowLastData=true;else if(status.CorssCursorTouchEnd&&status.IsOnTouch==false)isShowLastData=true;}else if(this.GlobalOption&&this.GlobalOption.IsDisplayLatest){isShowLastData=true;}//十字光标锁定状态 禁用显示最后一个数据
|
|
6140
6141
|
if(this.GlobalOption&&this.GlobalOption.LockCorssCursor&&this.GlobalOption.LockCorssCursor.X.Enable)isShowLastData=false;return isShowLastData;};this.OnDrawTitleEvent=function(){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_INDEXTITLE_DRAW);if(!event)return;var data={Index:null,Data:this.Data,Title:this.Title,Script:this.Script,FrameID:this.Frame.Identify,OverlayIndex:this.OverlayIndex,IsShowTitleOnly:false};if(this.ArgumentsText)data.ArgumentsText=this.ArgumentsText;if(this.Frame&&this.Frame.ChartBorder)data.IsShowTitleOnly=this.Frame.ChartBorder.IsShowTitleOnly;if(IFrameSplitOperator.IsNumber(this.CursorIndex)){var index=Math.abs(this.CursorIndex);index=parseInt(index.toFixed(0));data.Index=index;//当前屏数据索引
|
|
6141
|
-
}var pixelTatio=GetDevicePixelRatio();var border=this.Frame.GetBorder();data.Left=border.LeftEx/pixelTatio;data.Top=border.Top/pixelTatio;data.Right=border.RightEx/pixelTatio;event.Callback(event,data,this);};this.IsSelectedChart=function(id){if(!id)return false;if(!this.SelectedChart)return false;if(!this.SelectedChart.Selected)return false;return this.SelectedChart.Selected.Identify==id;};this.Draw=function(moveonPoint,mouseStatus){this.Buttons=[];if(this.Frame.IsMinSize)return;this.IsKLineFrame=this.Frame.IsKLineFrame(false);this.IsMinuteFrame=this.Frame.IsMinuteFrame(false);this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;this.IsShowNameArrow=this.Frame.IsShowNameArrow;this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;this.TitleArrowType=this.Frame.TitleArrowType;this.IsShowIndexName=this.Frame.IsShowIndexName;this.IsShowOverlayIndexName=this.Frame.IsShowOverlayIndexName;this.OverlayIndexType.Position=this.Frame.OverlayIndexType.Position;this.OverlayIndexType.LineSpace=this.Frame.OverlayIndexType.LineSpace;this.ParamSpace=this.Frame.IndexParamSpace;this.TitleSpace=this.Frame.IndexTitleSpace;this.TitleRect=null;this.GlobalOption=this.Frame.GlobalOption;this.OnDrawTitleEvent();if(this.Frame.IsShowIndexTitle==false)return;if(g_JSChartResource.IsDOMFrameTitle===true)return;if(!this.Data)return;if(this.Frame.ChartBorder.TitleHeight<5)return;if(this.CursorIndex==null&&!(this.GlobalOption&&this.GlobalOption.IsDisplayLatest))return;if(this.Frame.IsHScreen===true){this.Canvas.save();this.HScreenDraw();this.Canvas.restore();/* 测试用
|
|
6142
|
+
}var pixelTatio=GetDevicePixelRatio();var border=this.Frame.GetBorder();data.Left=border.LeftEx/pixelTatio;data.Top=border.Top/pixelTatio;data.Right=border.RightEx/pixelTatio;event.Callback(event,data,this);};this.IsSelectedChart=function(id){if(!id)return false;if(!this.SelectedChart)return false;if(!this.SelectedChart.Selected)return false;return this.SelectedChart.Selected.Identify==id;};this.Draw=function(moveonPoint,mouseStatus){this.Buttons=[];this.NameButtonHeight=0;if(this.Frame.IsMinSize)return;this.IsKLineFrame=this.Frame.IsKLineFrame(false);this.IsMinuteFrame=this.Frame.IsMinuteFrame(false);this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;this.IsShowNameArrow=this.Frame.IsShowNameArrow;this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;this.TitleArrowType=this.Frame.TitleArrowType;this.IsShowIndexName=this.Frame.IsShowIndexName;this.IsShowOverlayIndexName=this.Frame.IsShowOverlayIndexName;this.OverlayIndexType.Position=this.Frame.OverlayIndexType.Position;this.OverlayIndexType.LineSpace=this.Frame.OverlayIndexType.LineSpace;this.ParamSpace=this.Frame.IndexParamSpace;this.TitleSpace=this.Frame.IndexTitleSpace;this.TitleRect=null;this.GlobalOption=this.Frame.GlobalOption;this.OnDrawTitleEvent();if(this.Frame.IsShowIndexTitle==false)return;if(g_JSChartResource.IsDOMFrameTitle===true)return;if(!this.Data)return;if(this.Frame.ChartBorder.TitleHeight<5)return;if(this.CursorIndex==null&&!(this.GlobalOption&&this.GlobalOption.IsDisplayLatest))return;if(this.Frame.IsHScreen===true){this.Canvas.save();this.HScreenDraw();this.Canvas.restore();/* 测试用
|
|
6142
6143
|
if (this.TitleRect)
|
|
6143
6144
|
{
|
|
6144
6145
|
this.Canvas.strokeStyle='rgba(200,0,50,0.5)';
|
|
@@ -6146,7 +6147,7 @@ if(this.GlobalOption&&this.GlobalOption.LockCorssCursor&&this.GlobalOption.LockC
|
|
|
6146
6147
|
}
|
|
6147
6148
|
*/return;}var left=this.Frame.ChartBorder.GetLeft()+this.MerginLeft;var bottom=this.Frame.ChartBorder.GetTop()+this.Frame.ChartBorder.TitleHeight/2;//上下居中显示
|
|
6148
6149
|
var right=this.Frame.ChartBorder.GetRight();var toolbarInfo={Width:0,YCenter:bottom};this.DrawToolbar(toolbarInfo,moveonPoint,mouseStatus);left+=toolbarInfo.Width;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.font=this.Font;var pixelRatio=GetDevicePixelRatio();if(this.Title&&this.IsShowIndexName&&this.IsShowMainIndexTitle){if(this.IsDrawTitleBG){var rtButton={Left:left,YCenter:bottom,Width:0};this.DrawNameButton(rtButton,moveonPoint,mouseStatus);this.Buttons.push({ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON,Rect:rtButton,FrameID:this.Frame.Identify,Type:2});//Type 0=主图按钮 1=附图按钮 2=主图指标名字按钮
|
|
6149
|
-
if(this.IsSelectedChart(this.Identify))this.DrawSelectedLine(left,bottom,textWidth);this.TitleRect=rtButton;left+=rtButton.Width+3*pixelRatio;left+=this.TitleSpace;}else{var textWidth=this.Canvas.measureText(this.Title).width+2;this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(this.Title,left,bottom,textWidth);if(this.IsSelectedChart(this.Identify))this.DrawSelectedLine(left,bottom,textWidth);left+=textWidth;left+=this.TitleSpace;}}if(this.ArgumentsText&&this.IsShowIndexName&&this.IsShowMainIndexTitle){var textWidth=this.Canvas.measureText(this.ArgumentsText).width+2;this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(this.ArgumentsText,left,bottom,textWidth);left+=textWidth;left+=this.TitleSpace;}var isShowLastData=this.IsShowLastData();var lockRect=this.Frame.GetLockRect();if(lockRect)//指标上锁区域不显示动态标题
|
|
6150
|
+
this.NameButtonHeight=rtButton.Height;if(this.IsSelectedChart(this.Identify))this.DrawSelectedLine(left,bottom,textWidth);this.TitleRect=rtButton;left+=rtButton.Width+3*pixelRatio;left+=this.TitleSpace;}else{var textWidth=this.Canvas.measureText(this.Title).width+2;this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(this.Title,left,bottom,textWidth);if(this.IsSelectedChart(this.Identify))this.DrawSelectedLine(left,bottom,textWidth);left+=textWidth;left+=this.TitleSpace;}}if(this.ArgumentsText&&this.IsShowIndexName&&this.IsShowMainIndexTitle){var textWidth=this.Canvas.measureText(this.ArgumentsText).width+2;this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(this.ArgumentsText,left,bottom,textWidth);left+=textWidth;left+=this.TitleSpace;}var isShowLastData=this.IsShowLastData();var lockRect=this.Frame.GetLockRect();if(lockRect)//指标上锁区域不显示动态标题
|
|
6150
6151
|
{var index=Math.abs(this.CursorIndex);if(this.IsKLineFrame)index=this.CursorIndex;var x=this.Frame.GetXFromIndex(index.toFixed(0));if(x>=lockRect.Left)return;if(isShowLastData)return;}var rtText={Left:left,Right:left};if(this.IsMinuteFrame&&this.PointInfo&&(this.PointInfo.ClientPos==2||this.PointInfo.ClientPos==3||this.PointInfo.ClientPos>=200&&this.PointInfo.ClientPos<=299||this.PointInfo.ClientPos>=300&&this.PointInfo.ClientPos<=399)){var result={PreventDefault:false};this.DrawMainCallAuction({Left:left,Right:right,Bottom:bottom},rtText,result);if(result.PreventDefault===false)this.DrawMainIndexTitle({Left:left,Right:right,Bottom:bottom},isShowLastData,rtText);}else{var yRight=right;if(this.Frame.ToolbarCacheSize&&this.Frame.ToolbarCacheSize.RToolbar)yRight=this.Frame.ToolbarCacheSize.RToolbar.Left-2;//右侧按钮宽度要去掉
|
|
6151
6152
|
this.DrawMainIndexTitle({Left:left,Right:yRight,Bottom:bottom},isShowLastData,rtText);if(IFrameSplitOperator.IsNumber(rtText.Bottom))bottom=rtText.Bottom;}left=rtText.Left;if(this.Explain)//说明信息
|
|
6152
6153
|
{this.Canvas.fillStyle=this.TitleColor;var text="说明:"+this.Explain;var textWidth=this.Canvas.measureText(text).width+2;if(left+textWidth<right){this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}if(this.ColorIndex&&this.IsShowColorIndexTitle){this.Canvas.fillStyle=g_JSChartResource.Title.ColorIndexColor;var tradeName=this.ColorIndex.Name+this.ColorIndex.Param;var textWidth=this.Canvas.measureText(tradeName).width+2;//后空2个像素
|
|
@@ -6164,7 +6165,7 @@ var value=null;var preVaildItem=null;if(item.DataType=="StraightLine")//直线
|
|
|
6164
6165
|
if(this.IsShowUpDownArrow){var preValue=null;if(dataIndex-1>=0)preValue=item.Data.Data[dataIndex-1];if(IFrameSplitOperator.IsNumber(preValue)){if(preValue>value)arrowSuper={Text:'↓',TextColor:this.UpDownArrowConfig.DownColor};else if(preValue<value)arrowSuper={Text:'↑',TextColor:this.UpDownArrowConfig.UpColor};else arrowSuper={Text:'→',TextColor:this.UpDownArrowConfig.UnchangeColor};if(this.TitleArrowType==1)arrowSuper.TextColor=item.Color;}}valueText=this.FormatValue(value,item);if(item.Name){var dyValue=this.GetDynamicOutValue(item.Name,valueText);if(dyValue)valueText=dyValue;}if(arrowSuper){var outItem={Name:null,Text:valueText,Color:item.Color,TextEx:[arrowSuper]};if(item.Name){var text=item.Name;var dyTitle=this.GetDynamicOutName(item.Name);//动态标题
|
|
6165
6166
|
if(dyTitle)text=dyTitle;outItem.Name=text;}//outItem.BG='rgb(100,100,100)';
|
|
6166
6167
|
aryText=[outItem];valueText=null;}}}return{Text:valueText,ArrayText:aryText};};//绘制主图指标 rtText 返回画完以后的区域
|
|
6167
|
-
this.DrawMainIndexTitle=function(positionInfo,isShowLastData,rtText){if(!this.IsShowMainIndexTitle)return;var left=positionInfo.Left;var newLineLeft=this.Frame.ChartBorder.GetLeft()+this.MerginLeft+5;var right=positionInfo.Right;var bottom=positionInfo.Bottom;var pixelRatio=GetDevicePixelRatio();var lineHeight=this.Canvas.measureText("擎").width+2;for(var i=0;i<this.Data.length;++i){var item=this.Data[i];var outText=this.GetTitleItem(item,isShowLastData,i);if(!outText)continue;var valueText=outText.Text;var aryText=outText.ArrayText;if(aryText)//多变量输出
|
|
6168
|
+
this.DrawMainIndexTitle=function(positionInfo,isShowLastData,rtText){if(!this.IsShowMainIndexTitle)return;var left=positionInfo.Left;var newLineLeft=this.Frame.ChartBorder.GetLeft()+this.MerginLeft+5;var right=positionInfo.Right;var bottom=positionInfo.Bottom;var pixelRatio=GetDevicePixelRatio();var lineHeight=this.Canvas.measureText("擎").width+2;if(lineHeight<this.NameButtonHeight)lineHeight=this.NameButtonHeight;for(var i=0;i<this.Data.length;++i){var item=this.Data[i];var outText=this.GetTitleItem(item,isShowLastData,i);if(!outText)continue;var valueText=outText.Text;var aryText=outText.ArrayText;if(aryText)//多变量输出
|
|
6168
6169
|
{var text;for(var k=0;k<aryText.length;++k){var titleItem=aryText[k];if(titleItem.Name)text=titleItem.Name+":"+titleItem.Text;else text=titleItem.Text;if(IFrameSplitOperator.IsNumber(titleItem.LeftSpace))left+=titleItem.LeftSpace*pixelRatio;var space=this.ParamSpace*pixelRatio;var indexTextWidth=this.Canvas.measureText(text).width;//标题+数值长度
|
|
6169
6170
|
var textWidth=indexTextWidth;if(IFrameSplitOperator.IsNonEmptyArray(titleItem.TextEx)){var xLeft=left;for(var n=0;n<titleItem.TextEx.length;++n){var outItem=titleItem.TextEx[n];var outTextWidth=this.Canvas.measureText(outItem.Text).width+2;outItem.Width=outTextWidth;outItem.Left=xLeft;textWidth+=outTextWidth;xLeft+=outTextWidth;}}if(left+textWidth+space>right){left=newLineLeft;bottom+=lineHeight;right=this.Frame.ChartBorder.GetRight();//第2行以后 右侧边框
|
|
6170
6171
|
}if(titleItem.BG)//背景
|
|
@@ -14788,7 +14789,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14788
14789
|
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);};}/********************************************************************************
|
|
14789
14790
|
* 版本信息输出
|
|
14790
14791
|
*
|
|
14791
|
-
*/var HQCHART_VERSION="1.1.
|
|
14792
|
+
*/var HQCHART_VERSION="1.1.14712";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();//把给外界调用的方法暴露出来
|
|
14792
14793
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14793
14794
|
// BaseIndex:BaseIndex,
|
|
14794
14795
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -60144,6 +60144,7 @@ function DynamicChartTitlePainting()
|
|
|
60144
60144
|
this.MerginLeft=g_JSChartResource.IndexTitleMerginLeft; //标题输出左边间距
|
|
60145
60145
|
|
|
60146
60146
|
this.Buttons=[]; //按钮
|
|
60147
|
+
this.NameButtonHeight=0; //指标名字按钮高度
|
|
60147
60148
|
|
|
60148
60149
|
this.UpDownArrowConfig=
|
|
60149
60150
|
{
|
|
@@ -60776,6 +60777,7 @@ function DynamicChartTitlePainting()
|
|
|
60776
60777
|
this.Draw=function(moveonPoint, mouseStatus)
|
|
60777
60778
|
{
|
|
60778
60779
|
this.Buttons=[];
|
|
60780
|
+
this.NameButtonHeight=0;
|
|
60779
60781
|
if (this.Frame.IsMinSize) return;
|
|
60780
60782
|
|
|
60781
60783
|
this.IsKLineFrame= this.Frame.IsKLineFrame(false);
|
|
@@ -60838,6 +60840,7 @@ function DynamicChartTitlePainting()
|
|
|
60838
60840
|
this.DrawNameButton(rtButton, moveonPoint, mouseStatus);
|
|
60839
60841
|
|
|
60840
60842
|
this.Buttons.push({ ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON, Rect:rtButton, FrameID:this.Frame.Identify, Type:2 }); //Type 0=主图按钮 1=附图按钮 2=主图指标名字按钮
|
|
60843
|
+
this.NameButtonHeight=rtButton.Height;
|
|
60841
60844
|
|
|
60842
60845
|
if (this.IsSelectedChart(this.Identify))
|
|
60843
60846
|
this.DrawSelectedLine(left, bottom, textWidth);
|
|
@@ -61126,6 +61129,7 @@ function DynamicChartTitlePainting()
|
|
|
61126
61129
|
var bottom=positionInfo.Bottom;
|
|
61127
61130
|
var pixelRatio=GetDevicePixelRatio();
|
|
61128
61131
|
var lineHeight=this.Canvas.measureText("擎").width+2;
|
|
61132
|
+
if (lineHeight<this.NameButtonHeight) lineHeight=this.NameButtonHeight;
|
|
61129
61133
|
for(var i=0; i<this.Data.length; ++i)
|
|
61130
61134
|
{
|
|
61131
61135
|
var item=this.Data[i];
|
|
@@ -64240,6 +64240,7 @@ function DynamicChartTitlePainting()
|
|
|
64240
64240
|
this.MerginLeft=g_JSChartResource.IndexTitleMerginLeft; //标题输出左边间距
|
|
64241
64241
|
|
|
64242
64242
|
this.Buttons=[]; //按钮
|
|
64243
|
+
this.NameButtonHeight=0; //指标名字按钮高度
|
|
64243
64244
|
|
|
64244
64245
|
this.UpDownArrowConfig=
|
|
64245
64246
|
{
|
|
@@ -64872,6 +64873,7 @@ function DynamicChartTitlePainting()
|
|
|
64872
64873
|
this.Draw=function(moveonPoint, mouseStatus)
|
|
64873
64874
|
{
|
|
64874
64875
|
this.Buttons=[];
|
|
64876
|
+
this.NameButtonHeight=0;
|
|
64875
64877
|
if (this.Frame.IsMinSize) return;
|
|
64876
64878
|
|
|
64877
64879
|
this.IsKLineFrame= this.Frame.IsKLineFrame(false);
|
|
@@ -64934,6 +64936,7 @@ function DynamicChartTitlePainting()
|
|
|
64934
64936
|
this.DrawNameButton(rtButton, moveonPoint, mouseStatus);
|
|
64935
64937
|
|
|
64936
64938
|
this.Buttons.push({ ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON, Rect:rtButton, FrameID:this.Frame.Identify, Type:2 }); //Type 0=主图按钮 1=附图按钮 2=主图指标名字按钮
|
|
64939
|
+
this.NameButtonHeight=rtButton.Height;
|
|
64937
64940
|
|
|
64938
64941
|
if (this.IsSelectedChart(this.Identify))
|
|
64939
64942
|
this.DrawSelectedLine(left, bottom, textWidth);
|
|
@@ -65222,6 +65225,7 @@ function DynamicChartTitlePainting()
|
|
|
65222
65225
|
var bottom=positionInfo.Bottom;
|
|
65223
65226
|
var pixelRatio=GetDevicePixelRatio();
|
|
65224
65227
|
var lineHeight=this.Canvas.measureText("擎").width+2;
|
|
65228
|
+
if (lineHeight<this.NameButtonHeight) lineHeight=this.NameButtonHeight;
|
|
65225
65229
|
for(var i=0; i<this.Data.length; ++i)
|
|
65226
65230
|
{
|
|
65227
65231
|
var item=this.Data[i];
|
|
@@ -147886,7 +147890,7 @@ function ScrollBarBGChart()
|
|
|
147886
147890
|
|
|
147887
147891
|
|
|
147888
147892
|
|
|
147889
|
-
var HQCHART_VERSION="1.1.
|
|
147893
|
+
var HQCHART_VERSION="1.1.14712";
|
|
147890
147894
|
|
|
147891
147895
|
function PrintHQChartVersion()
|
|
147892
147896
|
{
|
|
@@ -64284,6 +64284,7 @@ function DynamicChartTitlePainting()
|
|
|
64284
64284
|
this.MerginLeft=g_JSChartResource.IndexTitleMerginLeft; //标题输出左边间距
|
|
64285
64285
|
|
|
64286
64286
|
this.Buttons=[]; //按钮
|
|
64287
|
+
this.NameButtonHeight=0; //指标名字按钮高度
|
|
64287
64288
|
|
|
64288
64289
|
this.UpDownArrowConfig=
|
|
64289
64290
|
{
|
|
@@ -64916,6 +64917,7 @@ function DynamicChartTitlePainting()
|
|
|
64916
64917
|
this.Draw=function(moveonPoint, mouseStatus)
|
|
64917
64918
|
{
|
|
64918
64919
|
this.Buttons=[];
|
|
64920
|
+
this.NameButtonHeight=0;
|
|
64919
64921
|
if (this.Frame.IsMinSize) return;
|
|
64920
64922
|
|
|
64921
64923
|
this.IsKLineFrame= this.Frame.IsKLineFrame(false);
|
|
@@ -64978,6 +64980,7 @@ function DynamicChartTitlePainting()
|
|
|
64978
64980
|
this.DrawNameButton(rtButton, moveonPoint, mouseStatus);
|
|
64979
64981
|
|
|
64980
64982
|
this.Buttons.push({ ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON, Rect:rtButton, FrameID:this.Frame.Identify, Type:2 }); //Type 0=主图按钮 1=附图按钮 2=主图指标名字按钮
|
|
64983
|
+
this.NameButtonHeight=rtButton.Height;
|
|
64981
64984
|
|
|
64982
64985
|
if (this.IsSelectedChart(this.Identify))
|
|
64983
64986
|
this.DrawSelectedLine(left, bottom, textWidth);
|
|
@@ -65266,6 +65269,7 @@ function DynamicChartTitlePainting()
|
|
|
65266
65269
|
var bottom=positionInfo.Bottom;
|
|
65267
65270
|
var pixelRatio=GetDevicePixelRatio();
|
|
65268
65271
|
var lineHeight=this.Canvas.measureText("擎").width+2;
|
|
65272
|
+
if (lineHeight<this.NameButtonHeight) lineHeight=this.NameButtonHeight;
|
|
65269
65273
|
for(var i=0; i<this.Data.length; ++i)
|
|
65270
65274
|
{
|
|
65271
65275
|
var item=this.Data[i];
|
|
@@ -158701,7 +158705,7 @@ function HQChartScriptWorker()
|
|
|
158701
158705
|
|
|
158702
158706
|
|
|
158703
158707
|
|
|
158704
|
-
var HQCHART_VERSION="1.1.
|
|
158708
|
+
var HQCHART_VERSION="1.1.14712";
|
|
158705
158709
|
|
|
158706
158710
|
function PrintHQChartVersion()
|
|
158707
158711
|
{
|