hqchart 1.1.14742 → 1.1.14746

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.
@@ -2009,7 +2009,7 @@ for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint
2009
2009
  info.LineColor=item.Color;info.TextColor=g_JSChartResource.FrameLatestPrice.OverlayTextColor;if(item.Title)info.Title=item.Title;frame.CustomHorizontalInfo.push(info);}};this.OffscreenToShowCanvas=function(){if(!this.ShowCanvas)return;this.ShowCanvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);this.ShowCanvas.drawImage(this.OffscreenCanvasElement,0,0);};this.GetDrawStatus=function(){var status={Point:{X:this.LastPoint.X,Y:this.LastPoint.Y},IsOnTouch:this.IsOnTouch,CorssCursorTouchEnd:this.CorssCursorTouchEnd,IsTitleShowLatestData:this.IsTitleShowLatestData,IsMinuteChart:this.ClassName=="MinuteChartContainer"||this.ClassName=="MinuteChartHScreenContainer"?true:false};status.FrameID=this.Frame.PtInFrame(this.LastPoint.X,this.LastPoint.Y);return status;};this.InvokeBeforeDrawSplashScreenCallback=function(){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_SPLASH_SCREEN);if(!event||!event.Callback)return null;var data={PreventDefault:false};event.Callback(event,data,this);return data;};this.DrawSplashScreen=function(option){var data=this.InvokeBeforeDrawSplashScreenCallback();if(data&&data.PreventDefault===true)return;if(this.Frame.ScreenImageData==null&&!this.CacheCanvas)return;if(this.Frame.ScreenImageData){this.Canvas.putImageData(this.Frame.ScreenImageData,0,0);}else if(this.CacheCanvas){this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);this.Canvas.drawImage(this.CacheElement,0,0);}var bgColor=g_JSChartResource.SplashScreen.BGColor;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(0,0,this.UIElement.width,this.UIElement.height);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash){var title=g_JSChartResource.SplashScreen.Title;if(option&&option.Title)title=option.Title;this.ChartSplashPaint.SetTitle(title);this.ChartSplashPaint.Draw();}};//十字光标坐标
2010
2010
  this.GetCorssCursorPosition=function(){var position={LastPoint:{X:this.LastPoint.X,Y:this.LastPoint.Y},CursorIndex:this.CursorIndex};return position;};this.IsLockCorssCursor=function(){if(!this.GlobalOption||!this.GlobalOption.LockCorssCursor)return false;return this.GlobalOption.LockCorssCursor.X.Enable;};//画动态信息
2011
2011
  this.DrawDynamicInfo=function(option){this.LastMouseStatus.MouseOnToolbar=null;//鼠标在工具栏按钮上
2012
- var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_DYNAMIC_INFO);if(event&&event.Callback){var sendData={};event.Callback(event,sendData,this);}if(this.Frame.ScreenImageData==null&&!this.CacheCanvas)return;var isErase=false;if(this.ChartCorssCursor){if(this.ChartCorssCursor.PointX!=null||this.ChartCorssCursor.PointY!=null)isErase=true;}isErase=true;//每次都擦除背景
2012
+ if(this.ChartCorssCursor)this.ChartCorssCursor.Status=0;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_DYNAMIC_INFO);if(event&&event.Callback){var sendData={};event.Callback(event,sendData,this);}if(this.Frame.ScreenImageData==null&&!this.CacheCanvas)return;var isErase=false;if(this.ChartCorssCursor){if(this.ChartCorssCursor.PointX!=null||this.ChartCorssCursor.PointY!=null)isErase=true;}isErase=true;//每次都擦除背景
2013
2013
  if(isErase==false){for(var i=0;i<this.ExtendChartPaint.length;++i){var item=this.ExtendChartPaint[i];if(item.IsCallbackDraw)continue;if(item.IsDynamic&&item.IsEraseBG){isErase=true;break;}}}if(isErase){if(this.Frame.ScreenImageData){this.Canvas.putImageData(this.Frame.ScreenImageData,0,0);}else if(this.CacheCanvas){this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);this.Canvas.drawImage(this.CacheElement,0,0);}}if(this.Frame.DrawToolbar)this.Frame.DrawToolbar(this.LastMouseStatus);this.DrawSelectedStatus();this.DrawSelectedBorder();if(this.DrawSelectedXBorder)this.DrawSelectedXBorder();var moveonPoint=null;if(this.LastMouseStatus&&this.LastMouseStatus.MoveOnPoint)moveonPoint=this.LastMouseStatus.MoveOnPoint;this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_20,{MoveonPoint:moveonPoint,LastMouseStatus:this.LastMouseStatus});/*
2014
2014
  for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
2015
2015
  {
@@ -2587,7 +2587,7 @@ this.FrameData={SubFrameItem:null};//窗口框架信息
2587
2587
  //画图工具刻度
2588
2588
  this.DrawPicture={BGColor:g_JSChartResource.DrawPicture.XYCoordinate.BGColor,TextBGColor:g_JSChartResource.DrawPicture.XYCoordinate.TextBGColor,TextColor:g_JSChartResource.DrawPicture.XYCoordinate.TextColor,Font:g_JSChartResource.DrawPicture.XYCoordinate.Font};this.IChartFramePainting_ReloadResource=this.ReloadResource;this.ReloadResource=function(resource){this.IChartFramePainting_ReloadResource(resource);if(!resource){this.ToolbarButtonStyle=g_JSChartResource.ToolbarButtonStyle;this.CloseWindowButton=CloneData(g_JSChartResource.Buttons.CloseWindow);this.OverlayIndexButton=CloneData(g_JSChartResource.Buttons.OverlayIndex);this.ChangeIndexButton=CloneData(g_JSChartResource.Buttons.ChangeIndex);this.ModifyIndexParamButton=CloneData(g_JSChartResource.Buttons.ModifyIndexParam);this.MaxMinWindowButton=CloneData(g_JSChartResource.Buttons.MaxMinWindow);this.TitleWindowButton=CloneData(g_JSChartResource.Buttons.TitleWindow);this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);}};this.DrawFrame=function(){if(this.XPointCount>0){var dInterval=this.ChartBorder.GetWidth()/(6*this.XPointCount);//分6份, 数据4 间距2
2589
2589
  this.DistanceWidth=2*dInterval;this.DataWidth=4*dInterval;}this.DrawHorizontal();this.DrawVertical();};this.DrawTitleButton=function(aryButton,moveonPoint,mouseStatus){var border=this.GetBorder();if(this.IsHScreen){var y=border.Bottom-3;var x=border.RightTitle+this.ChartBorder.TitleHeight/2;this.Canvas.save();this.Canvas.translate(x,y);this.Canvas.rotate(90*Math.PI/180);//底部开始画
2590
- var yButton=0,xButton=0,bottom=0;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xButton=bottom-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var color=item.Style.Color;this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xButton,0);var rtButton={Left:x-size/2,Right:x+size/2,Bottom:y,Width:size,Height:size+item.Style.MerginLeft};rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;this.Buttons.push({ID:item.ID,Rect:rtButton});bottom=xButton;y=rtButton.Top;}this.Canvas.restore();}else{var right=border.Right-3;var left=border.Left;var yButton=border.Top+this.ChartBorder.TitleHeight/2;this.ToolbarCacheSize={RToolbar:{Right:right,Left:right}//右往左绘制
2590
+ var yButton=0,xButton=0,bottom=0;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xButton=bottom-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var color=item.Style.Color;this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xButton,0);var rtButton={Left:x-size/2,Right:x+size/2,Bottom:y,Width:size,Height:size+item.Style.MerginLeft};rtButton.Top=rtButton.Bottom-size-item.Style.MerginLeft;this.Buttons.push({ID:item.ID,Rect:rtButton});bottom=xButton;y=rtButton.Top;}this.Canvas.restore();}else{var right=border.RightEx-3;var left=border.Left;var yButton=border.Top+this.ChartBorder.TitleHeight/2;this.ToolbarCacheSize={RToolbar:{Right:right,Left:right}//右往左绘制
2591
2591
  };for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var size=item.Style.Size;var xBotton=right-size-item.Style.MerginLeft;var font=size+'px '+item.Style.Family;var rtButton={Left:xBotton,Top:yButton-size/2,Right:xBotton+size+item.Style.MerginLeft,Bottom:yButton+size/2,Width:size+item.Style.MerginLeft,Height:size};var color=item.Style.Color;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){color=item.Style.MoveOnColor;if(mouseStatus)mouseStatus.MouseOnToolbar={Rect:rtButton,Item:item,Frame:this,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,xBotton,yButton);this.Buttons.push({ID:item.ID,Rect:rtButton});this.ToolbarCacheSize.RToolbar.Left=rtButton.Left;right=xBotton;}}};this.DrawToolbarTooltip=function(mouseOnToolbar){if(!mouseOnToolbar)return;var border=this.GetBorder();var text=null;if(mouseOnToolbar.Item.TooltipText){text=mouseOnToolbar.Item.TooltipText;}else{var key='Toolbar-'+mouseOnToolbar.Item.ID;text=g_JSChartLocalization.GetText(key,0);}if(!text)return;var pixelRatio=GetDevicePixelRatio();var canvas=this.Canvas;if(this.GetExtraCanvas){var finder=this.GetExtraCanvas(JSChart.TooltipCursorCanvasKey);if(finder)canvas=finder.Canvas;}var xCenter=mouseOnToolbar.Rect.Left+mouseOnToolbar.Rect.Width/2;canvas.font=this.ButtonTooltip.Font;canvas.textAlign="left";canvas.textBaseline="bottom";var mergin=this.ButtonTooltip.Mergin;var textWidth=canvas.measureText(text).width+mergin.Left+mergin.Right;var textHeight=this.GetFontHeight();var bgHeight=textHeight+mergin.Top+mergin.Bottom;if(mouseOnToolbar.ID=="TitleButton"){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;}else if(JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID==mouseOnToolbar.Item.ID){var x=mouseOnToolbar.Rect.Right+5;var y=mouseOnToolbar.Rect.Top;}else if(JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE==mouseOnToolbar.Item.ID||JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING==mouseOnToolbar.Item.ID||mouseOnToolbar.Item.ID>=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_1&&mouseOnToolbar.Item.ID<=JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_18){var x=mouseOnToolbar.Point.X;var y=mouseOnToolbar.Point.Y+20;if(x+textWidth>=border.ChartWidth)x=border.ChartWidth-textWidth-2;}else{var x=xCenter-textWidth/2;var y=border.Top-bgHeight;if(y<0)y=border.TopEx+1;if(x+textWidth>border.ChartWidth)x=border.ChartWidth-textWidth-2;}if(IFrameSplitOperator.IsNumber(this.ButtonTooltip.BorderRadius))//圆角
2592
2592
  {var roundRadius=this.ButtonTooltip.BorderRadius;canvas.beginPath();canvas.roundRect(ToFixedPoint(x),ToFixedPoint(y),ToFixedRect(textWidth),ToFixedRect(bgHeight),[roundRadius]);canvas.closePath();canvas.fillStyle=this.ButtonTooltip.ColorBG;canvas.fill();canvas.strokeStyle=this.ButtonTooltip.ColorBorder;canvas.stroke();canvas.fillStyle=this.ButtonTooltip.Color;canvas.fillText(text,x+mergin.Left,y+bgHeight-mergin.Bottom);}else{canvas.fillStyle=this.ButtonTooltip.ColorBG;canvas.fillRect(x,y,textWidth,bgHeight);//画一个背景色, 不然是一个黑的背景
2593
2593
  canvas.fillStyle=this.ButtonTooltip.Color;canvas.fillText(text,x+mergin.Left,y+bgHeight-mergin.Bottom);}};//isLimit 是否限制在当前坐标下
@@ -6227,7 +6227,8 @@ this.IsShowColorIndexTitle=true;this.IsShowUpDownArrow=true;//指标数据是否
6227
6227
  this.TitleArrowType=0;//指标数据上涨下跌箭头类型 0=独立颜色 1=跟指标颜色一致
6228
6228
  this.IsShowIndexName=true;//是否显示指标名字
6229
6229
  this.IsShowIndexTitle=true;//是否显示指标标题信息
6230
- this.IsShowNameArrow=false;this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);this.TradeIndex;//专家系统名字{Name:'名字', Param:'参数'}
6230
+ this.IsShowNameArrow=false;this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);this.CustomLocation;//自定义位置 { IsShow:, Top:, TitleHeight: }
6231
+ this.TradeIndex;//专家系统名字{Name:'名字', Param:'参数'}
6231
6232
  this.IsShowTradeIndexTitle=true;this.OverlayIndex=new _map2.default();//叠加指标 key=Identify value={ Data:数据, Title:标题, Identify:标识}
6232
6233
  this.IsShowOverlayIndexName=true;//是否显示叠加指标名字
6233
6234
  this.OverlayIndexType={Position:0,LineSpace:5,BGColor:g_JSChartResource.OverlayIndexTitleBGColor};//Position 0=主图指标后面显示 1=叠加指标单行显示
@@ -6261,14 +6262,15 @@ if(item.YFClose>0&&MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol)){var value=(it
6261
6262
  {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))//成交金额
6262
6263
  {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;}//十字光标锁定状态 禁用显示最后一个数据
6263
6264
  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;//当前屏数据索引
6264
- }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();/* 测试用
6265
+ }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.CustomLocation){if(!this.CustomLocation.IsShow)return;if(!IFrameSplitOperator.IsNumber(this.CustomLocation.Top)||!IFrameSplitOperator.IsNumber(this.CustomLocation.TitleHeight))return;}else{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();/* 测试用
6265
6266
  if (this.TitleRect)
6266
6267
  {
6267
6268
  this.Canvas.strokeStyle='rgba(200,0,50,0.5)';
6268
6269
  this.Canvas.strokeRect(ToFixedPoint(this.TitleRect.Left),ToFixedPoint(this.TitleRect.Top),ToFixedRect(this.TitleRect.Width),ToFixedRect(this.TitleRect.Height));
6269
6270
  }
6270
6271
  */return;}var left=this.Frame.ChartBorder.GetLeft()+this.MerginLeft;var bottom=this.Frame.ChartBorder.GetTop()+this.Frame.ChartBorder.TitleHeight/2;//上下居中显示
6271
- 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=主图指标名字按钮
6272
+ if(this.CustomLocation)//自定义标题位置
6273
+ {bottom=this.Frame.ChartBorder.GetTop()+this.CustomLocation.Top+this.CustomLocation.TitleHeight/2;}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=主图指标名字按钮
6272
6274
  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)//指标上锁区域不显示动态标题
6273
6275
  {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};var yRight=right;if(this.Frame.ToolbarCacheSize&&this.Frame.ToolbarCacheSize.RToolbar)yRight=this.Frame.ToolbarCacheSize.RToolbar.Left-2;//右侧按钮宽度要去掉
6274
6276
  this.DrawMainCallAuction({Left:left,Right:yRight,Bottom:bottom},rtText,result);if(result.PreventDefault===false)this.DrawMainIndexTitle({Left:left,Right:yRight,Bottom:bottom},isShowLastData,rtText);if(IFrameSplitOperator.IsNumber(rtText.Bottom))bottom=rtText.Bottom;}else{var yRight=right;if(this.Frame.ToolbarCacheSize&&this.Frame.ToolbarCacheSize.RToolbar)yRight=this.Frame.ToolbarCacheSize.RToolbar.Left-2;//右侧按钮宽度要去掉
@@ -14913,7 +14915,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
14913
14915
  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);};}/********************************************************************************
14914
14916
  * 版本信息输出
14915
14917
  *
14916
- */var HQCHART_VERSION="1.1.14741";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();//把给外界调用的方法暴露出来
14918
+ */var HQCHART_VERSION="1.1.14745";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();//把给外界调用的方法暴露出来
14917
14919
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
14918
14920
  // BaseIndex:BaseIndex,
14919
14921
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14742",
3
+ "version": "1.1.14746",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -6248,7 +6248,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6248
6248
 
6249
6249
  var bDrawDialogTooltip=false;
6250
6250
  var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
6251
- var corssCursorPos=this.GetCorssCursorPosition()
6251
+ var corssCursorPos=this.GetCorssCursorPosition();
6252
6252
  if (corssCursorPos.LastPoint.X!=null || corssCursorPos.LastPoint.Y!=null)
6253
6253
  {
6254
6254
  if (this.ChartCorssCursor)
@@ -6702,6 +6702,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6702
6702
  this.DrawDynamicInfo=function(option)
6703
6703
  {
6704
6704
  this.LastMouseStatus.MouseOnToolbar=null; //鼠标在工具栏按钮上
6705
+ if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
6705
6706
 
6706
6707
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_DYNAMIC_INFO);
6707
6708
  if (event && event.Callback)
@@ -12996,7 +12997,7 @@ function AverageWidthFrame()
12996
12997
  }
12997
12998
  else
12998
12999
  {
12999
- var right=border.Right-3;
13000
+ var right=border.RightEx-3;
13000
13001
  var left=border.Left;
13001
13002
  var yButton=border.Top+this.ChartBorder.TitleHeight/2;
13002
13003
 
@@ -60558,6 +60559,7 @@ function DynamicChartTitlePainting()
60558
60559
  this.IsShowIndexTitle=true; //是否显示指标标题信息
60559
60560
  this.IsShowNameArrow=false;
60560
60561
  this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
60562
+ this.CustomLocation; //自定义位置 { IsShow:, Top:, TitleHeight: }
60561
60563
 
60562
60564
  this.TradeIndex; //专家系统名字{Name:'名字', Param:'参数'}
60563
60565
  this.IsShowTradeIndexTitle=true;
@@ -61247,7 +61249,16 @@ function DynamicChartTitlePainting()
61247
61249
  if (this.Frame.IsShowIndexTitle==false) return;
61248
61250
  if (g_JSChartResource.IsDOMFrameTitle===true) return;
61249
61251
  if (!this.Data) return;
61250
- if (this.Frame.ChartBorder.TitleHeight<5) return;
61252
+ if (this.CustomLocation)
61253
+ {
61254
+ if (!this.CustomLocation.IsShow) return;
61255
+ if (!IFrameSplitOperator.IsNumber(this.CustomLocation.Top) || !IFrameSplitOperator.IsNumber(this.CustomLocation.TitleHeight)) return;
61256
+ }
61257
+ else
61258
+ {
61259
+ if (this.Frame.ChartBorder.TitleHeight<5) return;
61260
+ }
61261
+
61251
61262
  if (this.CursorIndex==null && !(this.GlobalOption && this.GlobalOption.IsDisplayLatest)) return;
61252
61263
 
61253
61264
  if (this.Frame.IsHScreen===true)
@@ -61269,6 +61280,11 @@ function DynamicChartTitlePainting()
61269
61280
 
61270
61281
  var left=this.Frame.ChartBorder.GetLeft()+this.MerginLeft;
61271
61282
  var bottom=this.Frame.ChartBorder.GetTop()+this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
61283
+ if (this.CustomLocation) //自定义标题位置
61284
+ {
61285
+ bottom=this.Frame.ChartBorder.GetTop()+this.CustomLocation.Top+this.CustomLocation.TitleHeight/2;
61286
+ }
61287
+
61272
61288
  var right=this.Frame.ChartBorder.GetRight();
61273
61289
 
61274
61290
  var toolbarInfo={ Width:0, YCenter:bottom };
@@ -10344,7 +10344,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10344
10344
 
10345
10345
  var bDrawDialogTooltip=false;
10346
10346
  var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
10347
- var corssCursorPos=this.GetCorssCursorPosition()
10347
+ var corssCursorPos=this.GetCorssCursorPosition();
10348
10348
  if (corssCursorPos.LastPoint.X!=null || corssCursorPos.LastPoint.Y!=null)
10349
10349
  {
10350
10350
  if (this.ChartCorssCursor)
@@ -10798,6 +10798,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10798
10798
  this.DrawDynamicInfo=function(option)
10799
10799
  {
10800
10800
  this.LastMouseStatus.MouseOnToolbar=null; //鼠标在工具栏按钮上
10801
+ if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
10801
10802
 
10802
10803
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_DYNAMIC_INFO);
10803
10804
  if (event && event.Callback)
@@ -17092,7 +17093,7 @@ function AverageWidthFrame()
17092
17093
  }
17093
17094
  else
17094
17095
  {
17095
- var right=border.Right-3;
17096
+ var right=border.RightEx-3;
17096
17097
  var left=border.Left;
17097
17098
  var yButton=border.Top+this.ChartBorder.TitleHeight/2;
17098
17099
 
@@ -64654,6 +64655,7 @@ function DynamicChartTitlePainting()
64654
64655
  this.IsShowIndexTitle=true; //是否显示指标标题信息
64655
64656
  this.IsShowNameArrow=false;
64656
64657
  this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
64658
+ this.CustomLocation; //自定义位置 { IsShow:, Top:, TitleHeight: }
64657
64659
 
64658
64660
  this.TradeIndex; //专家系统名字{Name:'名字', Param:'参数'}
64659
64661
  this.IsShowTradeIndexTitle=true;
@@ -65343,7 +65345,16 @@ function DynamicChartTitlePainting()
65343
65345
  if (this.Frame.IsShowIndexTitle==false) return;
65344
65346
  if (g_JSChartResource.IsDOMFrameTitle===true) return;
65345
65347
  if (!this.Data) return;
65346
- if (this.Frame.ChartBorder.TitleHeight<5) return;
65348
+ if (this.CustomLocation)
65349
+ {
65350
+ if (!this.CustomLocation.IsShow) return;
65351
+ if (!IFrameSplitOperator.IsNumber(this.CustomLocation.Top) || !IFrameSplitOperator.IsNumber(this.CustomLocation.TitleHeight)) return;
65352
+ }
65353
+ else
65354
+ {
65355
+ if (this.Frame.ChartBorder.TitleHeight<5) return;
65356
+ }
65357
+
65347
65358
  if (this.CursorIndex==null && !(this.GlobalOption && this.GlobalOption.IsDisplayLatest)) return;
65348
65359
 
65349
65360
  if (this.Frame.IsHScreen===true)
@@ -65365,6 +65376,11 @@ function DynamicChartTitlePainting()
65365
65376
 
65366
65377
  var left=this.Frame.ChartBorder.GetLeft()+this.MerginLeft;
65367
65378
  var bottom=this.Frame.ChartBorder.GetTop()+this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
65379
+ if (this.CustomLocation) //自定义标题位置
65380
+ {
65381
+ bottom=this.Frame.ChartBorder.GetTop()+this.CustomLocation.Top+this.CustomLocation.TitleHeight/2;
65382
+ }
65383
+
65368
65384
  var right=this.Frame.ChartBorder.GetRight();
65369
65385
 
65370
65386
  var toolbarInfo={ Width:0, YCenter:bottom };
@@ -148383,7 +148399,7 @@ function ScrollBarBGChart()
148383
148399
 
148384
148400
 
148385
148401
 
148386
- var HQCHART_VERSION="1.1.14741";
148402
+ var HQCHART_VERSION="1.1.14745";
148387
148403
 
148388
148404
  function PrintHQChartVersion()
148389
148405
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14741";
8
+ var HQCHART_VERSION="1.1.14745";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -10388,7 +10388,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10388
10388
 
10389
10389
  var bDrawDialogTooltip=false;
10390
10390
  var ptPosition=null; //鼠标位置 null 无效 -1 在外面 >=0 对应的指标窗口中ID
10391
- var corssCursorPos=this.GetCorssCursorPosition()
10391
+ var corssCursorPos=this.GetCorssCursorPosition();
10392
10392
  if (corssCursorPos.LastPoint.X!=null || corssCursorPos.LastPoint.Y!=null)
10393
10393
  {
10394
10394
  if (this.ChartCorssCursor)
@@ -10842,6 +10842,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10842
10842
  this.DrawDynamicInfo=function(option)
10843
10843
  {
10844
10844
  this.LastMouseStatus.MouseOnToolbar=null; //鼠标在工具栏按钮上
10845
+ if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
10845
10846
 
10846
10847
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_DYNAMIC_INFO);
10847
10848
  if (event && event.Callback)
@@ -17136,7 +17137,7 @@ function AverageWidthFrame()
17136
17137
  }
17137
17138
  else
17138
17139
  {
17139
- var right=border.Right-3;
17140
+ var right=border.RightEx-3;
17140
17141
  var left=border.Left;
17141
17142
  var yButton=border.Top+this.ChartBorder.TitleHeight/2;
17142
17143
 
@@ -64698,6 +64699,7 @@ function DynamicChartTitlePainting()
64698
64699
  this.IsShowIndexTitle=true; //是否显示指标标题信息
64699
64700
  this.IsShowNameArrow=false;
64700
64701
  this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
64702
+ this.CustomLocation; //自定义位置 { IsShow:, Top:, TitleHeight: }
64701
64703
 
64702
64704
  this.TradeIndex; //专家系统名字{Name:'名字', Param:'参数'}
64703
64705
  this.IsShowTradeIndexTitle=true;
@@ -65387,7 +65389,16 @@ function DynamicChartTitlePainting()
65387
65389
  if (this.Frame.IsShowIndexTitle==false) return;
65388
65390
  if (g_JSChartResource.IsDOMFrameTitle===true) return;
65389
65391
  if (!this.Data) return;
65390
- if (this.Frame.ChartBorder.TitleHeight<5) return;
65392
+ if (this.CustomLocation)
65393
+ {
65394
+ if (!this.CustomLocation.IsShow) return;
65395
+ if (!IFrameSplitOperator.IsNumber(this.CustomLocation.Top) || !IFrameSplitOperator.IsNumber(this.CustomLocation.TitleHeight)) return;
65396
+ }
65397
+ else
65398
+ {
65399
+ if (this.Frame.ChartBorder.TitleHeight<5) return;
65400
+ }
65401
+
65391
65402
  if (this.CursorIndex==null && !(this.GlobalOption && this.GlobalOption.IsDisplayLatest)) return;
65392
65403
 
65393
65404
  if (this.Frame.IsHScreen===true)
@@ -65409,6 +65420,11 @@ function DynamicChartTitlePainting()
65409
65420
 
65410
65421
  var left=this.Frame.ChartBorder.GetLeft()+this.MerginLeft;
65411
65422
  var bottom=this.Frame.ChartBorder.GetTop()+this.Frame.ChartBorder.TitleHeight/2; //上下居中显示
65423
+ if (this.CustomLocation) //自定义标题位置
65424
+ {
65425
+ bottom=this.Frame.ChartBorder.GetTop()+this.CustomLocation.Top+this.CustomLocation.TitleHeight/2;
65426
+ }
65427
+
65412
65428
  var right=this.Frame.ChartBorder.GetRight();
65413
65429
 
65414
65430
  var toolbarInfo={ Width:0, YCenter:bottom };
@@ -159198,7 +159214,7 @@ function HQChartScriptWorker()
159198
159214
 
159199
159215
 
159200
159216
 
159201
- var HQCHART_VERSION="1.1.14741";
159217
+ var HQCHART_VERSION="1.1.14745";
159202
159218
 
159203
159219
  function PrintHQChartVersion()
159204
159220
  {