hqchart 1.1.13725 → 1.1.13732

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.
@@ -1769,7 +1769,8 @@ var selectedChart={Chart:this.SelectedChart.Selected.Chart,Identify:this.Selecte
1769
1769
  this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;var isDrawPictrue=false;if(this.CurrentChartDrawPicture)//画图工具模式
1770
1770
  {var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y,true);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y,true);//只有1个点 直接完成
1771
1771
  if(this.FinishChartDrawPicturePoint()){if(drawPicture.IsDrawMain)this.Draw();else this.DrawDynamicInfo({Corss:false,Tooltip:false});}}if(e.cancelable)e.preventDefault();return;}else{var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);var drawPictrueData={X:pt.X,Y:pt.Y};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
1772
- if(this.GetChartDrawPictureByPoint(drawPictrueData)){drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
1772
+ if(this.GetChartDrawPictureByPoint(drawPictrueData)){if(drawPictrueData.ChartDrawPicture.EnableMove==true)//是否可以移动
1773
+ {drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;}else{this.CurrentChartDrawPicture=null;this.SelectChartDrawPicture=null;}var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
1773
1774
  if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}var drawType=0;if(drawPictrueData.ChartDrawPicture.IsDrawMain)drawType=1;else if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart&&drawPictureActive.Select.Chart.IsDrawMain)drawType=1;if(drawType==1)this.Draw();if(e.cancelable)e.preventDefault();return;}}if(bStartTimer){//长按2秒,十字光标
1774
1775
  var self=this;this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
1775
1776
  {var mouseDrag=self.MouseDrag;self.MouseDrag=null;if(self.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID)self.TouchStatus.CorssCursorShow=true;//十字显示
@@ -2346,7 +2347,7 @@ this.GetYData=function(y,isLimit){if(this.Logarithmic&&this.GetYLogarithmicFromD
2346
2347
  this.GetXData=function(x){if(x<=this.ChartBorder.GetLeft())return 0;if(x>=this.ChartBorder.GetRight())return this.XPointCount;return(x-this.ChartBorder.GetLeft())*(this.XPointCount*1.0/this.ChartBorder.GetWidth());};//选中的画图工具X,Y轴坐标信息
2347
2348
  this.DrawPictureXCoordinate=function(drawPicture,range,option){if(this.IsHScreen)return;if(!range)return;if(!IFrameSplitOperator.IsNonEmptyArray(range.Points))return;var border=this.GetBorder();var left=border.Left;var right=border.Right;this.Canvas.font=this.DrawPicture.Font;var fontHeight=this.GetFontHeight();this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";if(range.X){var xRange=range.X;var xLeft=xRange.Min.X;var xRight=xRange.Max.X;if(xLeft<left)xLeft=left;if(xRight>right)xRight=right;this.Canvas.fillStyle=this.DrawPicture.BGColor;this.Canvas.fillRect(xLeft,border.Bottom,xRight-xLeft,fontHeight);}for(var i=0;i<range.Points.length;++i){var item=range.Points[i];if(item.X<left||item.X>right)continue;var index=this.GetXData(item.X,false);var index=Math.round(index);var kItem=this.GetKItem(index);if(kItem){var text=IFrameSplitOperator.FormatDateString(kItem.Date,null);if(ChartData.IsMinutePeriod(option.Period))text+=" "+IFrameSplitOperator.FormatTimeString(kItem.Time,"HH:MM");else if(ChartData.IsMilliSecondPeriod(option.Period))text+=" "+IFrameSplitOperator.FormatTimeString(kItem.Time,"HH:MM:SS.fff");var textWidth=this.Canvas.measureText(text).width+2;var textLeft=item.X-textWidth/2;if(textLeft<left)textLeft=left;this.Canvas.fillStyle=this.DrawPicture.TextBGColor;this.Canvas.fillRect(textLeft,border.Bottom,textWidth,fontHeight);this.Canvas.fillStyle=this.DrawPicture.TextColor;var yCenter=border.Bottom+fontHeight;this.Canvas.fillText(text,textLeft+1,yCenter);}}};this.GetKItem=function(currentIndex){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;var index=this.Data.DataOffset+currentIndex;return this.Data.Data[index];};this.DrawPictureYCoordinate=function(drawPicture,range,option){if(this.IsHScreen)return;if(!range)return;if(!IFrameSplitOperator.IsNonEmptyArray(range.Points))return;var border=this.GetBorder();var top=border.TopEx;var bottom=border.BottomEx;var right=border.Right;this.Canvas.font=this.DrawPicture.Font;var fontHeight=this.GetFontHeight();this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";var defaultfloatPrecision=2;if(option&&option.Symbol)defaultfloatPrecision=GetfloatPrecision(option.Symbol);var textWidth=0;for(var i=0;i<range.Points.length;++i){var item=range.Points[i];var Value=this.GetYData(item.Y);var text=Value.toFixed(defaultfloatPrecision);var value=this.Canvas.measureText(text).width;if(textWidth<value)textWidth=value;range.Points[i].Text=text;}textWidth+=this.YTextPadding[1]+2;if(range.Y){var yRange=range.Y;var yTop=yRange.Min.Y;var yBottom=yRange.Max.Y;if(yRange.Min.Y<top)yTop=top;if(yRange.Max.Y>bottom)yBottom=bottom;this.Canvas.fillStyle=this.DrawPicture.BGColor;this.Canvas.fillRect(right,yTop,textWidth+5,yBottom-yTop);}for(var i=0;i<range.Points.length;++i){var item=range.Points[i];if(item.Y<top||item.Y>bottom)continue;this.Canvas.fillStyle=this.DrawPicture.TextBGColor;this.Canvas.fillRect(right,item.Y-fontHeight/2,textWidth,fontHeight);this.Canvas.fillStyle=this.DrawPicture.TextColor;var yText=item.Y+fontHeight/2;this.Canvas.fillText(item.Text,right+this.YTextPadding[1],yText);}};this.DrawPicturePointYCoordinate=function(drawPicture,option){if(this.IsHScreen)return;if(!drawPicture.GetYCoordinatePoint)return;var aryPoint=drawPicture.GetYCoordinatePoint();if(!IFrameSplitOperator.IsNonEmptyArray(aryPoint))return;var border=this.GetBorder();var top=border.TopEx;var bottom=border.BottomEx;var right=border.Right;this.Canvas.font=this.DrawPicture.Font;var fontHeight=this.GetFontHeight();this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";var defaultfloatPrecision=2;if(option&&option.Symbol)defaultfloatPrecision=GetfloatPrecision(option.Symbol);for(var i=0;i<aryPoint.length;++i){var item=aryPoint[i];if(!item)continue;if(item.Y<top||item.Y>bottom)continue;var text=item.YValue.toFixed(defaultfloatPrecision);var textWidth=this.Canvas.measureText(text).width+2;textWidth+=this.YTextPadding[1];this.Canvas.fillStyle=this.DrawPicture.TextBGColor;this.Canvas.fillRect(right,item.Y-fontHeight/2,textWidth,fontHeight);this.Canvas.fillStyle=this.DrawPicture.TextColor;var yText=item.Y+fontHeight/2;this.Canvas.fillText(text,right+this.YTextPadding[1],yText);}};//字体外部设置好
2348
2349
  this.GetCustomItemTextInfo=function(item,bLeft,pixelTatio){var text=bLeft?item.Message[0]:item.Message[1];var aryText=[];var width=0;if(Array.isArray(text)){for(var i=0;i<text.length;++i){var item=text[i];if(item.Type===1){aryText.push({Type:item.Type});}else{var value=this.Canvas.measureText(text[i].Text).width;if(value>width)width=value;var outItem={Text:text[i].Text,Width:value+2*pixelTatio};if(item.TextColor)outItem.TextColor=item.TextColor;aryText.push(outItem);}}if(width>0)width+=2*pixelTatio;}else{width=this.Canvas.measureText(text).width+2*pixelTatio;aryText.push({Text:text,Width:width});}return{MaxWidth:width,Text:aryText};};this.DrawCustomItem=function(item,mapTextRect)//显示自定义Y刻度
2349
- {if(!item.Message[1]&&!item.Message[0])return;if(item.Value>this.HorizontalMax||item.Value<this.HorizontalMin){this.SendDrawCountDownEvent({IsShow:false});return;}var border=this.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=border.Top;var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var titleHeight=this.ChartBorder.TitleHeight;if(this.IsHScreen){borderLeft=this.ChartBorder.Top;borderRight=this.ChartBorder.Bottom;top=border.Top;bottom=border.Bottom;}var pixelTatio=GetDevicePixelRatio();var defaultTextHeight=18*pixelTatio;var textHeight=defaultTextHeight;var y=this.GetYFromData(item.Value);var position=0;var emptyBGColor;if(item.ExtendData&&item.ExtendData.Custom){var customItem=item.ExtendData.Custom;if(IFrameSplitOperator.IsNumber(customItem.Position))position=customItem.Position;if(customItem.EmptyBGColor)emptyBGColor=customItem.EmptyBGColor;}if(item.Message[0])// 左
2350
+ {if(!item.Message[1]&&!item.Message[0])return;if(item.Value>this.HorizontalMax||item.Value<this.HorizontalMin){this.SendDrawCountDownEvent({IsShow:false});return;}var border=this.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=border.Top;var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var titleHeight=this.ChartBorder.TitleHeight;if(this.IsHScreen){borderLeft=this.ChartBorder.Top;borderRight=this.ChartBorder.Bottom;top=border.Top;bottom=border.Bottom;}var pixelTatio=GetDevicePixelRatio();var defaultTextHeight=18*pixelTatio;var textHeight=defaultTextHeight;var y;if(item.Value=="TopEx")y=border.TopEx;else if(item.Value=="TopTitle")y=border.TopTitle;else if(item.Value=="Top")y=border.Top;else if(item.Value=="BottomEx")y=border.BottomEx;else if(item.Value=="Bottom")y=border.Bottom;else y=this.GetYFromData(item.Value);if(IFrameSplitOperator.IsNumber(item.YOffset))y+=item.YOffset;var position=0;var emptyBGColor;if(item.ExtendData&&item.ExtendData.Custom){var customItem=item.ExtendData.Custom;if(IFrameSplitOperator.IsNumber(customItem.Position))position=customItem.Position;if(customItem.EmptyBGColor)emptyBGColor=customItem.EmptyBGColor;}if(item.Message[0])// 左
2350
2351
  {if(borderLeft<10||position==1){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
2351
2352
  var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=top;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){}else{var bgTop=yText-textHeight/2-1*pixelTatio;var textLeft=left+1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);if(i==0)this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}}else{if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="right";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){if(i==0)var bgTop=top-itemText.Width;else var bgTop=top-textWidth;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{var bgTop=yText-textHeight/2-1*pixelTatio;if(i==0){var rectLeft=left-itemText.Width;var textLeft=left;}else{var rectLeft=left-textWidth;var textLeft=left-(textWidth-itemText.Width);}if(emptyBGColor){this.Canvas.fillStyle=emptyBGColor;this.Canvas.fillRect(rectLeft-1,bgTop,itemText.Width+1,textHeight);this.Canvas.strokeStyle=item.LineColor;this.Canvas.strokeRect(ToFixedPoint(rectLeft-1),ToFixedPoint(bgTop),ToFixedPoint(itemText.Width+1),ToFixedPoint(textHeight));this.Canvas.fillStyle=item.LineColor;this.Canvas.fillText(itemText.Text,textLeft-1*pixelTatio,yText);}else{this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(rectLeft,bgTop,itemText.Width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft-1*pixelTatio,yText);}if(i==0)this.DrawLine(left,right,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}}else if(item.Message[1])//右
2352
2353
  {if(borderRight<10||position==1){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
@@ -2430,7 +2431,8 @@ var text=IFrameSplitOperator.FormatTimeString(kItem.Time,"HH:MM");var textWidth=
2430
2431
  this.SplitXYCoordinate=function(){if(this.XYSplit==false){//计算自定义刻度
2431
2432
  if(this.YCustomSplit){if(this.YSplitOperator&&this.YSplitOperator.CustomCoordinate)this.YSplitOperator.CustomCoordinate();}return;}if(this.XSplitOperator!=null)this.XSplitOperator.Operator();if(this.YSplitOperator!=null)this.YSplitOperator.Operator();};this.GetMultiDayXFromIndex=function(index,border){var dayBorder=border.DayBorder;var minuteIndex=index%this.MinuteCount;var dayIndex=parseInt(index/this.MinuteCount);if(dayIndex>=dayBorder.length)dayIndex=dayBorder.length-1;var client=dayBorder[dayIndex];var count=this.MinuteCount-1;if(minuteIndex>=count){return client.RightEx;}else{var width=client.RightEx-client.LeftEx;var offset=client.LeftEx+width*minuteIndex/count;return offset;}};this.GetXFromIndex=function(index){var count=this.XPointCount-1;var border=this.ChartBorder.GetBorder();if(border.DayBorder)return this.GetMultiDayXFromIndex(index,border);if(count==1){if(index==0)return border.LeftEx;else return border.RightEx;}else if(count<=0){return border.LeftEx;}else if(index>=count){return border.RightEx;}else{var width=border.RightEx-border.LeftEx;var offset=border.LeftEx+width*index/count;return offset;}};this.GetMultiDayXData=function(x,border){var dayBorder=border.DayBorder;for(var i=0;i<dayBorder.length;++i){var client=dayBorder[i];if(x>=client.Left&&x<=client.Right){var count=this.MinuteCount-1;var dayMinuteCount=this.MinuteCount*i;if(x<=client.LeftEx)return 0+dayMinuteCount;if(x>=client.RightEx)return count+dayMinuteCount;var width=client.RightEx-client.LeftEx;return(x-client.LeftEx)*(count*1.0/width)+dayMinuteCount;}}};//X坐标转x轴数值
2432
2433
  this.GetXData=function(x){var count=this.XPointCount-1;if(count<0)count=0;var border=this.ChartBorder.GetBorder();if(border.DayBorder)return this.GetMultiDayXData(x,border);if(x<=border.LeftEx)return 0;if(x>=border.RightEx)return count;var width=border.RightEx-border.LeftEx;return(x-border.LeftEx)*(count*1.0/width);};this.DrawCustomHorizontal=function()//Y轴刻度定制显示
2433
- {if(this.IsMinSize)return;for(var i in this.CustomHorizontalInfo){var item=this.CustomHorizontalInfo[i];switch(item.Type){case 0:case 1:this.DrawCustomItem(item);//自定义刻度
2434
+ {if(this.IsMinSize)return;for(var i in this.CustomHorizontalInfo){var item=this.CustomHorizontalInfo[i];switch(item.Type){case 0:case 1:case 10://自定义的
2435
+ this.DrawCustomItem(item);//自定义刻度
2434
2436
  break;}}};this.GetLeftExtendXFromIndex=function(index,obj){var count=obj.TotalCount-1;var border=this.ChartBorder.GetBorder();if(border.DayBorder)return this.GetLeftExtendMultiDayXFromIndex(index,obj,border);var left=border.Left;var width=this.ChartBorder.LeftExtendWidth;var offset=left+width*index/count;return offset;};this.GetLeftExtendMultiDayXFromIndex=function(index,obj,border){var dayBorder=border.DayBorder;var client=dayBorder[obj.Index];var count=obj.TotalCount-1;var left=client.Left;var right=client.LeftEx;var width=right-left;var offset=left+width*index/count;return offset;};this.GetLeftExtendMultiDayXData=function(x,obj,border){var dayBorder=border.DayBorder;for(var i=0;i<dayBorder.length;++i){var client=dayBorder[i];if(x>=client.Left&&x<=client.LeftEx){if(!obj[i])return null;var count=obj[i].TotalCount-1;var left=client.Left;var right=client.LeftEx;var width=right-left;var index=(x-left)*(count*1.0/width);return{DayIndex:parseInt(i),DataIndex:index};}}};this.GetLeftExtendXData=function(x,obj){var border=this.ChartBorder.GetBorder();if(border.DayBorder)return this.GetLeftExtendMultiDayXData(x,obj,border);var count=obj.TotalCount-1;if(count<0)count=0;var left=border.Left;var right=border.LeftEx;if(x<=left)return 0;if(x>=right)return count;var width=right-left;return(x-left)*(count*1.0/width);};this.MoveXIndexLeft=function(step,obj){JSConsole.Chart.Log("[MinuteFrame::MoveXIndexLeft] obj ",obj);if(obj.DataType==2)//多日数据
2435
2437
  {var dayIndex=obj.IndexData.DayIndex;var dataIndex=obj.IndexData.DataIndex-step;var itemIndex=-1;if(obj.IndexData.Type==20)itemIndex=0;else if(obj.IndexData.Type==10)itemIndex=1;else if(obj.IndexData.Type==30)itemIndex=2;else return false;for(var i=dayIndex,j=itemIndex;i>=0;--i){var dayItem=obj.Data[i];for(;j>=0;--j){var dataItem=dayItem[j];if(!dataItem.DayItem||!dataItem.DayItem.Data)continue;if(dataIndex==null)dataIndex=dataItem.DayItem.Data.length-1;for(;dataIndex>=0;--dataIndex){var item=dataItem.DayItem.Data[dataIndex];if(!item)continue;if(dataItem.Type==10){var cursorIndex=this.MinuteCount*i+dataIndex;obj.Point.X=this.GetXFromIndex(cursorIndex);obj.Point.Y=this.GetYFromData(item.Close);obj.IndexData.CursorIndex=cursorIndex;obj.IndexData.DayIndex=i;obj.IndexData.DataIndex=dataIndex;obj.IndexData.Type=dataItem.Type;return true;}else if(dataItem.Type==20){if(!IFrameSplitOperator.IsNumber(item.Price))continue;obj.Point.X=this.GetLeftExtendXFromIndex(dataIndex,dataItem.DayItem);obj.Point.Y=this.GetLeftExtendYFromData(item.Price);obj.IndexData.CursorIndex=-1;obj.IndexData.DayIndex=i;obj.IndexData.DataIndex=dataIndex;obj.IndexData.Type=dataItem.Type;return true;}else if(dataItem.Type==30){if(!IFrameSplitOperator.IsNumber(item.Price))continue;obj.Point.X=this.GetRightExtendXFromIndex(dataIndex,dataItem.DayItem);obj.Point.Y=this.GetRightExtendYFromData(item.Price);obj.IndexData.CursorIndex=-1;obj.IndexData.DayIndex=i;obj.IndexData.DataIndex=dataIndex;obj.IndexData.Type=dataItem.Type;return true;}}dataIndex=null;}j=2;}return false;}else if(obj.DataType==1)//单日
2436
2438
  {var dayIndex=obj.IndexData.DayIndex;var dataIndex=obj.IndexData.DataIndex-step;var itemIndex=-1;if(obj.IndexData.Type==2)itemIndex=0;else if(obj.IndexData.Type==1)itemIndex=1;else if(obj.IndexData.Type==3)itemIndex=2;else return false;for(var i=itemIndex;i>=0;--i){var dataItem=obj.Data[i];if(!dataItem||!dataItem.DayItem||!dataItem.DayItem.Data)continue;if(dataIndex==null)dataIndex=dataItem.DayItem.Data.length-1;for(;dataIndex>=0;--dataIndex){if(dataItem.Type==1){var offset=dataItem.DayItem.DataOffset;var item=dataItem.DayItem.Data[dataIndex+offset];if(!item)continue;var cursorIndex=dataIndex;obj.Point.X=this.GetXFromIndex(cursorIndex);obj.Point.Y=this.GetYFromData(item.Close);obj.IndexData.CursorIndex=cursorIndex;obj.IndexData.DayIndex=0;obj.IndexData.DataIndex=dataIndex;obj.IndexData.Type=dataItem.Type;return true;}else if(dataItem.Type==2){var item=dataItem.DayItem.Data[dataIndex];if(!item)continue;if(!IFrameSplitOperator.IsNumber(item.Price))continue;obj.Point.X=this.GetLeftExtendXFromIndex(dataIndex,dataItem.DayItem);obj.Point.Y=this.GetLeftExtendYFromData(item.Price);obj.IndexData.CursorIndex=-1;obj.IndexData.DayIndex=0;obj.IndexData.DataIndex=dataIndex;obj.IndexData.Type=dataItem.Type;return true;}else if(dataItem.Type==3){var item=dataItem.DayItem.Data[dataIndex];if(!item)continue;if(!IFrameSplitOperator.IsNumber(item.Price))continue;obj.Point.X=this.GetRightExtendXFromIndex(dataIndex,dataItem.DayItem);obj.Point.Y=this.GetRightExtendYFromData(item.Price);obj.IndexData.CursorIndex=-1;obj.IndexData.DayIndex=0;obj.IndexData.DataIndex=dataIndex;obj.IndexData.Type=dataItem.Type;return true;}}dataIndex=null;}}};this.MoveXIndexRight=function(step,obj){JSConsole.Chart.Log("[MinuteFrame::MoveXIndexRight] obj ",obj);if(obj.DataType==2)//多日数据
@@ -2585,6 +2587,7 @@ case 1://固定价格刻度
2585
2587
  this.DrawCustomItem(item,mapTextRect);break;case 2://当前屏最后一个K线价格刻度
2586
2588
  case 3://主图K线涨幅刻度
2587
2589
  case 4://叠加K线涨幅刻度
2590
+ case 10://自定义的
2588
2591
  this.DrawCustomItem(item,mapTextRect);break;}}};//Y轴面积背景
2589
2592
  this.DrawCustomHorizontalArea=function(){if(this.IsMinSize)return;if(this.ChartBorder.IsShowTitleOnly)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.CustomHorizontalInfo))return;for(var i=0;i<this.CustomHorizontalInfo.length;++i){var item=this.CustomHorizontalInfo[i];if(item.Type==5)this.DrawCustomAreaItem(item);}};this.DrawCustomVerticalItem=function(item){this.Canvas.save();if(item.Data.Line.Type==1)this.Canvas.setLineDash([5,5]);//虚线
2590
2593
  this.Canvas.strokeStyle=item.Data.Line.Color;this.Canvas.beginPath();if(item.IsHScreen){this.Canvas.moveTo(item.Top,ToFixedPoint(item.X));this.Canvas.lineTo(item.Bottom,ToFixedPoint(item.X));}else{this.Canvas.moveTo(ToFixedPoint(item.X),item.Top);this.Canvas.lineTo(ToFixedPoint(item.X),item.Bottom);}this.Canvas.stroke();this.Canvas.restore();};this.DrawCustomVertical=function()//X轴定制刻度显示
@@ -7937,7 +7940,7 @@ var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsolut
7937
7940
  {var pt=self.PointAbsoluteToRelative(drag.Click.X,drag.Click.Y,true);var x=pt.X;var y=pt.Y;self.OnMouseMove(x,y,e);}};if(this.ChartDrawOption.IsLockScreen){this.MouseDrag=drag;if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;if(this.CurrentChartDrawPicture)//画图工具模式
7938
7941
  {var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y,true);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y,true);//只有1个点 直接完成
7939
7942
  if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo({Corss:false,Tooltip:false});}if(e.cancelable)e.preventDefault();return;}else{var drawPictrueData={};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
7940
- drawPictrueData.X=touches[0].clientX-uielement.getBoundingClientRect().left;drawPictrueData.Y=touches[0].clientY-uielement.getBoundingClientRect().top;if(this.GetChartDrawPictureByPoint(drawPictrueData)){drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
7943
+ drawPictrueData.X=touches[0].clientX-uielement.getBoundingClientRect().left;drawPictrueData.Y=touches[0].clientY-uielement.getBoundingClientRect().top;if(this.GetChartDrawPictureByPoint(drawPictrueData)){if(drawPictrueData.ChartDrawPicture.EnableMove==true){drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;}else{this.CurrentChartDrawPicture=null;this.SelectChartDrawPicture=null;}var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
7941
7944
  if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}if(e.cancelable)e.preventDefault();return;}}}else{if(this.EnableScrollUpDown==true){this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y){var mouseDrag=self.MouseDrag;self.MouseDrag=null;T_ShowCorssCursor();self.PreventTouchEvent(e);}},800);}this.MouseDrag=drag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};this.SelectChartDrawPicture=null;if(this.EnableScrollUpDown==false)T_ShowCorssCursor();//移动十字光标
7942
7945
  else if(this.IsClickShowCorssCursor)T_ShowCorssCursor();}if(this.EnableZoomIndexWindow){this.PhoneDBClick.AddTouchStart(touches[0].clientX,touches[0].clientY,Date.now());JSConsole.Chart.Log("[MinuteChartContainer::OnTouchStart] PhoneDBClick ",this.PhoneDBClick);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);}else if(this.IsPhonePinching(e)){var phonePinch={"Start":{},"Last":{}};var touches=this.GetToucheData(e,this.IsForceLandscape);phonePinch.Start={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};this.PhonePinch=phonePinch;this.SelectChartDrawPicture=null;}};this.OnTouchMove=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var touches=this.GetToucheData(e,this.IsForceLandscape);if(this.IsPhoneDragging(e)){var drag=this.MouseDrag;if(drag==null){var pixelTatio=GetDevicePixelRatio();var x=touches[0].clientX-uielement.getBoundingClientRect().left*pixelTatio;var y=touches[0].clientY-uielement.getBoundingClientRect().top*pixelTatio;this.OnMouseMove(x,y,e);}else{var moveAngle=this.GetMoveAngle(drag.LastMove,{X:touches[0].clientX,Y:touches[0].clientY});var moveSetp=Math.abs(drag.LastMove.X-touches[0].clientX);var moveUpDown=Math.abs(drag.LastMove.Y-touches[0].clientY);moveSetp=parseInt(moveSetp);if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==1||drawPicture.Status==2){if(moveSetp<5&&moveUpDown<5)return;if(this.SetChartDrawPictureSecondPoint(touches[0].clientX,touches[0].clientY,true)){this.DrawDynamicInfo();}}else if(drawPicture.Status==3){if(this.SetChartDrawPictureThirdPoint(touches[0].clientX,touches[0].clientY,true)){this.DrawDynamicInfo();}}else if(drawPicture.Status==20)//画图工具移动
7943
7946
  {if(moveSetp<5&&moveUpDown<5)return;if(this.MoveChartDrawPicture(touches[0].clientX-drag.LastMove.X,touches[0].clientY-drag.LastMove.Y,true)){this.DrawDynamicInfo();}}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}else{//上下滚动
@@ -12668,7 +12671,7 @@ for(var i=0;i<data.data.length;++i){var item=data.data[i];var symbol=item[0];if(
12668
12671
  var bUpdate=false;var aryStock=chart.ShowSymbol;for(var i=0;i<aryStock.length;++i){if(setUpdateSymbol.has(aryStock[i].Symbol)){bUpdate=true;break;}}if(bUpdate)this.Draw();};//读取单条股票json数据
12669
12672
  this.ReadStockJsonData=function(stock,item){//0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本 16=涨停价 17=跌停价
12670
12673
  //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值
12671
- //30=全局扩展数据 31=当前板块扩展数据
12674
+ //30=全局扩展数据 31=当前板块扩展数据 36=日期字段
12672
12675
  //88=价格颜色类型
12673
12676
  if(IFrameSplitOperator.IsString(item[1]))stock.Name=item[1];if(IFrameSplitOperator.IsNumber(item[2]))stock.YClose=item[2];if(IFrameSplitOperator.IsNumber(item[3]))stock.Open=item[3];if(IFrameSplitOperator.IsNumber(item[4]))stock.High=item[4];if(IFrameSplitOperator.IsNumber(item[5]))stock.Low=item[5];if(IFrameSplitOperator.IsNumber(item[6]))stock.Price=item[6];if(IFrameSplitOperator.IsNumber(item[7]))stock.Vol=item[7];if(IFrameSplitOperator.IsNumber(item[8]))stock.Amount=item[8];if(IFrameSplitOperator.IsNumber(item[9]))stock.BuyPrice=item[9];if(IFrameSplitOperator.IsNumber(item[10]))stock.BuyVol=item[10];if(IFrameSplitOperator.IsNumber(item[11]))stock.SellPrice=item[11];if(IFrameSplitOperator.IsNumber(item[12]))stock.SellVol=item[12];if(IFrameSplitOperator.IsNumber(item[13]))stock.AvPrice=item[13];//均价
12674
12677
  if(IFrameSplitOperator.IsNumber(item[14]))stock.OutShares=item[14];//流通股
@@ -12798,7 +12801,7 @@ this.OnClickHeader=function(clickData,e){var _this60=this;var header=clickData.H
12798
12801
  {var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);if(event&&event.Callback){var sendData={Column:header.Column,SortInfo:sortInfo,SymbolList:this.Data.Data,Result:null};event.Callback(event,sendData,this);if(Array.isArray(sendData.Result))this.Data.Data=sendData.Result;}else{this.Data.Data.sort(function(left,right){return _this60.LocalSort(left,right,header.Column,sortInfo.Sort);});}}else if(header.Column.Sort==2)//远程排序
12799
12802
  {if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;this.SortInfo.Field=sortInfo.Field;this.SortInfo.Sort=sortInfo.Sort;this.Data.YOffset=0;this.ResetReportSelectStatus();this.RequestStockSortData(header.Column,sortInfo.Field,sortInfo.Sort);//远程排序
12800
12803
  return;}}this.Data.YOffset=0;this.ResetReportSelectStatus();this.SortInfo.Field=sortInfo.Field;this.SortInfo.Sort=sortInfo.Sort;this.Draw();this.DelayUpdateStockData();}}};this.PopupHeaderMenu=function(clickData,e){var _this61=this;if(!this.JSPopMenu)return;if(!this.GetEventCallback)return;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_REPORT_HEADER_MENU);if(!event||!event.Callback)return;var header=clickData.Header;var column=header.Column;var menuData={Menu:null,Position:JSPopMenu.POSITION_ID.DROPDOWN_MENU_ID};menuData.ClickCallback=function(data){_this61.OnClickHeaderMenu(column,data);};var sendData={MenuData:menuData,Column:column,Index:header.Index,PreventDefault:false,e:e};event.Callback(event,sendData,this);if(sendData.PreventDefault==true)return;if(!menuData.Menu)return;this.PopupMenuByDrapdown(menuData,header.Rect);};//下拉菜单
12801
- this.PopupMenuByDrapdown=function(menuData,rtButton){if(!this.JSPopMenu)return;var pixelRatio=GetDevicePixelRatio();var rtCell={Left:rtButton.Left/pixelRatio,Right:rtButton.Right/pixelRatio,Bottom:rtButton.Bottom/pixelRatio,Top:rtButton.Top/pixelRatio};rtCell.Width=rtCell.Right-rtCell.Left;rtCell.Height=rtCell.Bottom-rtCell.Top;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var offsetLeft=rtClient.left+rtScroll.Left;var offsetTop=rtClient.top+rtScroll.Top;rtCell.Left+=offsetLeft;rtCell.Right+=offsetLeft;rtCell.Top+=offsetTop;rtCell.Bottom+=offsetTop;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByDrapdown(rtCell);};this.GetTabPopMenu=function(tabItem){var aryMenu=[];if(IFrameSplitOperator.IsNonEmptyArray(tabItem.ArySubMenu)){for(var i=0;i<tabItem.ArySubMenu.length;++i){var item=tabItem.ArySubMenu[i];var menuItem={Name:item.Title,Data:{ID:item.CommandID,Args:[item.ID]}};aryMenu.push(menuItem);}}return aryMenu;};this.PopupTabMenu=function(menuData,tab,e){if(!this.JSPopMenu)return;var rtTab=tab.Rect;var pixelRatio=GetDevicePixelRatio();var rtCell={Left:rtTab.Left/pixelRatio,Right:rtTab.Right/pixelRatio,Bottom:rtTab.Bottom/pixelRatio,Top:rtTab.Top/pixelRatio};rtCell.Width=rtCell.Right-rtCell.Left;rtCell.Height=rtCell.Bottom-rtCell.Top;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var offsetLeft=rtClient.left+rtScroll.Left;var offsetTop=rtClient.top+rtScroll.Top;rtCell.Left+=offsetLeft;rtCell.Right+=offsetLeft;rtCell.Top+=offsetTop;rtCell.Bottom+=offsetTop;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByTab(rtCell);if(e.preventDefault)e.preventDefault();if(e.stopPropagation)e.stopPropagation();};//点击标签
12804
+ this.PopupMenuByDrapdown=function(menuData,rtButton){if(!this.JSPopMenu)return;var pixelRatio=GetDevicePixelRatio();var rtCell={Left:rtButton.Left/pixelRatio,Right:rtButton.Right/pixelRatio,Bottom:rtButton.Bottom/pixelRatio,Top:rtButton.Top/pixelRatio};rtCell.Width=rtCell.Right-rtCell.Left;rtCell.Height=rtCell.Bottom-rtCell.Top;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var offsetLeft=rtClient.left+rtScroll.Left;var offsetTop=rtClient.top+rtScroll.Top;rtCell.Left+=offsetLeft;rtCell.Right+=offsetLeft;rtCell.Top+=offsetTop;rtCell.Bottom+=offsetTop;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByDrapdown(rtCell);};this.GetTabPopMenu=function(tabItem){var aryMenu=[];if(IFrameSplitOperator.IsNonEmptyArray(tabItem.ArySubMenu)){for(var i=0;i<tabItem.ArySubMenu.length;++i){var item=tabItem.ArySubMenu[i];var menuItem={Name:item.Title,Data:{ID:item.CommandID,Args:[item.ID]}};if(item.Text)menuItem.Text=item.Text;aryMenu.push(menuItem);}}return aryMenu;};this.PopupTabMenu=function(menuData,tab,e){if(!this.JSPopMenu)return;var rtTab=tab.Rect;var pixelRatio=GetDevicePixelRatio();var rtCell={Left:rtTab.Left/pixelRatio,Right:rtTab.Right/pixelRatio,Bottom:rtTab.Bottom/pixelRatio,Top:rtTab.Top/pixelRatio};rtCell.Width=rtCell.Right-rtCell.Left;rtCell.Height=rtCell.Bottom-rtCell.Top;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();var offsetLeft=rtClient.left+rtScroll.Left;var offsetTop=rtClient.top+rtScroll.Top;rtCell.Left+=offsetLeft;rtCell.Right+=offsetLeft;rtCell.Top+=offsetTop;rtCell.Bottom+=offsetTop;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByTab(rtCell);if(e.preventDefault)e.preventDefault();if(e.stopPropagation)e.stopPropagation();};//点击标签
12802
12805
  this.OnClickTab=function(tabData,e){var _this62=this;if(!tabData.Tab)return;var redraw=false;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var uiElement={Left:this.UIElement.getBoundingClientRect().left,Top:this.UIElement.getBoundingClientRect().top};if(tabData.Tab.IsMenu){var menuData={Menu:this.GetTabPopMenu(tabData.Tab),Position:JSPopMenu.POSITION_ID.TAB_MENU_ID};menuData.ClickCallback=function(data){_this62.OnClickTabPopMenu(tabData,data);};var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_REPORT_TABMENU);if(event&&event.Callback){var sendData={MenuData:menuData,Tab:tabData,PreventDefault:false,e:e};event.Callback(event,sendData,this);if(sendData.PreventDefault==true)return;}this.PopupTabMenu(menuData,tabData.Tab,e);}else{var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_REPORT_TAB);if(event&&event.Callback){var sendData={Data:tabData,IsSide:{X:x,Y:x},UIElement:uiElement,e:e,Redraw:redraw,PreventDefault:false};event.Callback(event,sendData,this);if(IFrameSplitOperator.IsBool(sendData.Redraw))redraw=sendData.Redraw;if(sendData.PreventDefault==true)return;}if(tabData.Tab.CommandID==JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID){this.ExecuteMenuCommand(tabData.Tab.CommandID,[tabData.Tab.ID]);this.SetSelectedTab(tabData.Index);redraw=true;}}if(redraw)this.Draw();};this.OnClickTabPopMenu=function(tabData,data){JSConsole.Chart.Log('[JSReportChartContainer::OnClickTabPopMenu] ',tabData,data);var cmdID=data.Data.ID;//命令ID
12803
12806
  var aryArgs=data.Data.Args;//参数
12804
12807
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MENU_COMMAND);//回调通知外部
@@ -13645,7 +13648,7 @@ this.CreatePopMenu=function(data){this.Clear();if(!IFrameSplitOperator.IsNonEmpt
13645
13648
  this.Clear=function(){this.Data.Menu=[];this.Data.Position=JSPopMenu.POSITION_ID.RIGHT_MENU_ID;this.ClickCallback=null;if(!this.RootDOM)return;document.body.removeChild(this.RootDOM);this.RootDOM=null;this.TBodyDOM=null;for(var i=0;i<this.ArySubRootDOM.length;++i){document.body.removeChild(this.ArySubRootDOM[i]);}this.ArySubRootDOM=[];};this.CreateMenu=function(parentItem,item){var _this77=this;var trDom=document.createElement("tr");trDom.className='UMyChart_MenuItem_Tr';if(item.Disable===true)trDom.classList.add('UMyChart_DrawTool_Disable_Tr');var prtTdDom=null;for(var i=0;i<this.AryTDClassName.length;++i){var tdDom=document.createElement("td");tdDom.className=this.AryTDClassName[i];if(i==0)//图标
13646
13649
  {if(item.Checked){var spanDom=document.createElement("span");spanDom.className=this.CheckedClassName;spanDom.style["font-size"]="10px";tdDom.appendChild(spanDom);}}else if(i==1)//内容
13647
13650
  {tdDom.innerText=item.Name;}else if(i==2)//快捷方式
13648
- {}else if(i==3)//箭头
13651
+ {if(item.Text)tdDom.innerText=item.Text;}else if(i==3)//箭头
13649
13652
  {if(IFrameSplitOperator.IsNonEmptyArray(item.SubMenu)){var spanDom=document.createElement("span");spanDom.className=this.RightArrowClassName;spanDom.style["font-size"]="10px";tdDom.appendChild(spanDom);}}trDom.appendChild(tdDom);}if(IFrameSplitOperator.IsNonEmptyArray(item.SubMenu))//子菜单
13650
13653
  {var subRoot=document.createElement("div");subRoot.className="UMyChart_PopSubMenu";var subTable=document.createElement("table");subTable.className="UMyChart_PopMenu_Table";subRoot.appendChild(subTable);var subTbody=document.createElement("tbody");subTbody.className="UMyChart_PopMenu_TBody";subTable.appendChild(subTbody);var subRootData={Root:subRoot,TBody:subTbody,Table:subTable};subRoot.JSMenuData=subRootData;var preTrDom=null;for(var i=0;i<item.SubMenu.length;++i){var subItem=item.SubMenu[i];if(subItem.Name==JSPopMenu.SEPARATOR_LINE_NAME){var trSeparator=this.CreateSeparatorTr();if(trSeparator)subTbody.appendChild(trSeparator);continue;}var subTrDom=this.CreateMenu(subRootData,subItem);preTrDom=subTrDom;subTbody.appendChild(subTrDom);}trDom.onmouseover=function(e){_this77.OnMouseOver(e,parentItem,trDom,subRoot);};document.body.appendChild(subRoot);this.ArySubRootDOM.push(subRoot);}else{if(item.Disable===true){}else{trDom.onmousedown=function(e){_this77.OnClickMenu(e,item,false);};//菜单点击
13651
13654
  trDom.onmouseover=function(e){_this77.OnMouseOver(e,parentItem);};}}return trDom;};this.CreateSeparatorTr=function(){var trSeparator=document.createElement("tr");trSeparator.className='UMyChart_MenuItem_Tr_Separator';var tdDom=document.createElement("td");tdDom.className="UMyChart_MenuItem_Td_Status_Separator";trSeparator.appendChild(tdDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_MenuItem_Td_Separator";trSeparator.appendChild(tdDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_MenuItem_Td_Separator";trSeparator.appendChild(tdDom);var tdDom=document.createElement("td");tdDom.className="UMyChart_MenuItem_Td_Separator";trSeparator.appendChild(tdDom);return trSeparator;};//弹tab菜单
@@ -13775,7 +13778,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13775
13778
  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);};}/********************************************************************************
13776
13779
  * 版本信息输出
13777
13780
  *
13778
- */var HQCHART_VERSION="1.1.13724";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();//把给外界调用的方法暴露出来
13781
+ */var HQCHART_VERSION="1.1.13731";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();//把给外界调用的方法暴露出来
13779
13782
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13780
13783
  // BaseIndex:BaseIndex,
13781
13784
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13725",
3
+ "version": "1.1.13732",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -4659,13 +4659,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4659
4659
  var pixelTatio = GetDevicePixelRatio(); //鼠标移动坐标是原始坐标 需要乘以放大倍速
4660
4660
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
4661
4661
  {
4662
- drawPictrueData.ChartDrawPicture.Status=20;
4663
- drawPictrueData.ChartDrawPicture.ValueToPoint();
4664
- drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
4665
- drawPictrueData.ChartDrawPicture.IsSelected=true;
4666
- this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
4667
- this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
4668
- let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
4662
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true) //是否可以移动
4663
+ {
4664
+ drawPictrueData.ChartDrawPicture.Status=20;
4665
+ drawPictrueData.ChartDrawPicture.ValueToPoint();
4666
+ drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
4667
+ drawPictrueData.ChartDrawPicture.IsSelected=true;
4668
+ this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
4669
+ this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
4670
+
4671
+ }
4672
+ else
4673
+ {
4674
+ this.CurrentChartDrawPicture=null;
4675
+ this.SelectChartDrawPicture=null;
4676
+ }
4677
+
4678
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
4669
4679
  if (event && event.Callback)
4670
4680
  {
4671
4681
  let sendData={ DrawPicture: drawPictrueData.ChartDrawPicture };
@@ -12230,8 +12240,17 @@ function AverageWidthFrame()
12230
12240
  var pixelTatio = GetDevicePixelRatio();
12231
12241
  var defaultTextHeight=18*pixelTatio;
12232
12242
  var textHeight=defaultTextHeight;
12233
-
12234
- var y = this.GetYFromData(item.Value);
12243
+ var y;
12244
+
12245
+ if (item.Value=="TopEx") y=border.TopEx;
12246
+ else if (item.Value=="TopTitle") y=border.TopTitle;
12247
+ else if (item.Value=="Top") y=border.Top;
12248
+ else if (item.Value=="BottomEx") y=border.BottomEx;
12249
+ else if (item.Value=="Bottom") y=border.Bottom;
12250
+ else y = this.GetYFromData(item.Value);
12251
+
12252
+ if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset;
12253
+
12235
12254
  var position=0;
12236
12255
  var emptyBGColor;
12237
12256
  if (item.ExtendData && item.ExtendData.Custom)
@@ -13770,6 +13789,7 @@ function MinuteFrame()
13770
13789
  {
13771
13790
  case 0:
13772
13791
  case 1:
13792
+ case 10://自定义的
13773
13793
  this.DrawCustomItem(item); //自定义刻度
13774
13794
  break;
13775
13795
  }
@@ -16408,6 +16428,7 @@ function KLineFrame()
16408
16428
  case 2: //当前屏最后一个K线价格刻度
16409
16429
  case 3: //主图K线涨幅刻度
16410
16430
  case 4: //叠加K线涨幅刻度
16431
+ case 10://自定义的
16411
16432
  this.DrawCustomItem(item, mapTextRect);
16412
16433
  break;
16413
16434
  }
@@ -79527,12 +79548,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
79527
79548
  drawPictrueData.Y=(touches[0].clientY-uielement.getBoundingClientRect().top);
79528
79549
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
79529
79550
  {
79530
- drawPictrueData.ChartDrawPicture.Status=20;
79531
- drawPictrueData.ChartDrawPicture.ValueToPoint();
79532
- drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
79533
- drawPictrueData.ChartDrawPicture.IsSelected=true;
79534
- this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
79535
- this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
79551
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true)
79552
+ {
79553
+ drawPictrueData.ChartDrawPicture.Status=20;
79554
+ drawPictrueData.ChartDrawPicture.ValueToPoint();
79555
+ drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
79556
+ drawPictrueData.ChartDrawPicture.IsSelected=true;
79557
+ this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
79558
+ this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
79559
+ }
79560
+ else
79561
+ {
79562
+ this.CurrentChartDrawPicture=null;
79563
+ this.SelectChartDrawPicture=null;
79564
+ }
79565
+
79536
79566
  let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
79537
79567
  if (event && event.Callback)
79538
79568
  {
@@ -129,7 +129,7 @@ function JSPopMenu()
129
129
  }
130
130
  else if (i==2) //快捷方式
131
131
  {
132
-
132
+ if (item.Text) tdDom.innerText=item.Text;
133
133
  }
134
134
  else if (i==3) //箭头
135
135
  {
@@ -1347,7 +1347,7 @@ function JSReportChartContainer(uielement)
1347
1347
  {
1348
1348
  //0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本 16=涨停价 17=跌停价
1349
1349
  //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值
1350
- //30=全局扩展数据 31=当前板块扩展数据
1350
+ //30=全局扩展数据 31=当前板块扩展数据 36=日期字段
1351
1351
 
1352
1352
  //88=价格颜色类型
1353
1353
 
@@ -3248,6 +3248,7 @@ function JSReportChartContainer(uielement)
3248
3248
  {
3249
3249
  var item=tabItem.ArySubMenu[i];
3250
3250
  var menuItem={ Name:item.Title, Data:{ ID:item.CommandID, Args:[item.ID]} };
3251
+ if (item.Text) menuItem.Text=item.Text;
3251
3252
 
3252
3253
  aryMenu.push(menuItem);
3253
3254
  }
@@ -8584,13 +8584,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8584
8584
  var pixelTatio = GetDevicePixelRatio(); //鼠标移动坐标是原始坐标 需要乘以放大倍速
8585
8585
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
8586
8586
  {
8587
- drawPictrueData.ChartDrawPicture.Status=20;
8588
- drawPictrueData.ChartDrawPicture.ValueToPoint();
8589
- drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
8590
- drawPictrueData.ChartDrawPicture.IsSelected=true;
8591
- this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
8592
- this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
8593
- let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
8587
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true) //是否可以移动
8588
+ {
8589
+ drawPictrueData.ChartDrawPicture.Status=20;
8590
+ drawPictrueData.ChartDrawPicture.ValueToPoint();
8591
+ drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
8592
+ drawPictrueData.ChartDrawPicture.IsSelected=true;
8593
+ this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
8594
+ this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
8595
+
8596
+ }
8597
+ else
8598
+ {
8599
+ this.CurrentChartDrawPicture=null;
8600
+ this.SelectChartDrawPicture=null;
8601
+ }
8602
+
8603
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
8594
8604
  if (event && event.Callback)
8595
8605
  {
8596
8606
  let sendData={ DrawPicture: drawPictrueData.ChartDrawPicture };
@@ -16155,8 +16165,17 @@ function AverageWidthFrame()
16155
16165
  var pixelTatio = GetDevicePixelRatio();
16156
16166
  var defaultTextHeight=18*pixelTatio;
16157
16167
  var textHeight=defaultTextHeight;
16158
-
16159
- var y = this.GetYFromData(item.Value);
16168
+ var y;
16169
+
16170
+ if (item.Value=="TopEx") y=border.TopEx;
16171
+ else if (item.Value=="TopTitle") y=border.TopTitle;
16172
+ else if (item.Value=="Top") y=border.Top;
16173
+ else if (item.Value=="BottomEx") y=border.BottomEx;
16174
+ else if (item.Value=="Bottom") y=border.Bottom;
16175
+ else y = this.GetYFromData(item.Value);
16176
+
16177
+ if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset;
16178
+
16160
16179
  var position=0;
16161
16180
  var emptyBGColor;
16162
16181
  if (item.ExtendData && item.ExtendData.Custom)
@@ -17695,6 +17714,7 @@ function MinuteFrame()
17695
17714
  {
17696
17715
  case 0:
17697
17716
  case 1:
17717
+ case 10://自定义的
17698
17718
  this.DrawCustomItem(item); //自定义刻度
17699
17719
  break;
17700
17720
  }
@@ -20333,6 +20353,7 @@ function KLineFrame()
20333
20353
  case 2: //当前屏最后一个K线价格刻度
20334
20354
  case 3: //主图K线涨幅刻度
20335
20355
  case 4: //叠加K线涨幅刻度
20356
+ case 10://自定义的
20336
20357
  this.DrawCustomItem(item, mapTextRect);
20337
20358
  break;
20338
20359
  }
@@ -83452,12 +83473,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83452
83473
  drawPictrueData.Y=(touches[0].clientY-uielement.getBoundingClientRect().top);
83453
83474
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
83454
83475
  {
83455
- drawPictrueData.ChartDrawPicture.Status=20;
83456
- drawPictrueData.ChartDrawPicture.ValueToPoint();
83457
- drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
83458
- drawPictrueData.ChartDrawPicture.IsSelected=true;
83459
- this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
83460
- this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
83476
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true)
83477
+ {
83478
+ drawPictrueData.ChartDrawPicture.Status=20;
83479
+ drawPictrueData.ChartDrawPicture.ValueToPoint();
83480
+ drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
83481
+ drawPictrueData.ChartDrawPicture.IsSelected=true;
83482
+ this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
83483
+ this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
83484
+ }
83485
+ else
83486
+ {
83487
+ this.CurrentChartDrawPicture=null;
83488
+ this.SelectChartDrawPicture=null;
83489
+ }
83490
+
83461
83491
  let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
83462
83492
  if (event && event.Callback)
83463
83493
  {
@@ -128152,7 +128182,7 @@ function JSReportChartContainer(uielement)
128152
128182
  {
128153
128183
  //0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本 16=涨停价 17=跌停价
128154
128184
  //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值
128155
- //30=全局扩展数据 31=当前板块扩展数据
128185
+ //30=全局扩展数据 31=当前板块扩展数据 36=日期字段
128156
128186
 
128157
128187
  //88=价格颜色类型
128158
128188
 
@@ -130053,6 +130083,7 @@ function JSReportChartContainer(uielement)
130053
130083
  {
130054
130084
  var item=tabItem.ArySubMenu[i];
130055
130085
  var menuItem={ Name:item.Title, Data:{ ID:item.CommandID, Args:[item.ID]} };
130086
+ if (item.Text) menuItem.Text=item.Text;
130056
130087
 
130057
130088
  aryMenu.push(menuItem);
130058
130089
  }
@@ -138326,7 +138357,7 @@ function ScrollBarBGChart()
138326
138357
 
138327
138358
 
138328
138359
 
138329
- var HQCHART_VERSION="1.1.13724";
138360
+ var HQCHART_VERSION="1.1.13731";
138330
138361
 
138331
138362
  function PrintHQChartVersion()
138332
138363
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13724";
8
+ var HQCHART_VERSION="1.1.13731";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -8628,13 +8628,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8628
8628
  var pixelTatio = GetDevicePixelRatio(); //鼠标移动坐标是原始坐标 需要乘以放大倍速
8629
8629
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
8630
8630
  {
8631
- drawPictrueData.ChartDrawPicture.Status=20;
8632
- drawPictrueData.ChartDrawPicture.ValueToPoint();
8633
- drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
8634
- drawPictrueData.ChartDrawPicture.IsSelected=true;
8635
- this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
8636
- this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
8637
- let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
8631
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true) //是否可以移动
8632
+ {
8633
+ drawPictrueData.ChartDrawPicture.Status=20;
8634
+ drawPictrueData.ChartDrawPicture.ValueToPoint();
8635
+ drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
8636
+ drawPictrueData.ChartDrawPicture.IsSelected=true;
8637
+ this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
8638
+ this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
8639
+
8640
+ }
8641
+ else
8642
+ {
8643
+ this.CurrentChartDrawPicture=null;
8644
+ this.SelectChartDrawPicture=null;
8645
+ }
8646
+
8647
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
8638
8648
  if (event && event.Callback)
8639
8649
  {
8640
8650
  let sendData={ DrawPicture: drawPictrueData.ChartDrawPicture };
@@ -16199,8 +16209,17 @@ function AverageWidthFrame()
16199
16209
  var pixelTatio = GetDevicePixelRatio();
16200
16210
  var defaultTextHeight=18*pixelTatio;
16201
16211
  var textHeight=defaultTextHeight;
16202
-
16203
- var y = this.GetYFromData(item.Value);
16212
+ var y;
16213
+
16214
+ if (item.Value=="TopEx") y=border.TopEx;
16215
+ else if (item.Value=="TopTitle") y=border.TopTitle;
16216
+ else if (item.Value=="Top") y=border.Top;
16217
+ else if (item.Value=="BottomEx") y=border.BottomEx;
16218
+ else if (item.Value=="Bottom") y=border.Bottom;
16219
+ else y = this.GetYFromData(item.Value);
16220
+
16221
+ if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset;
16222
+
16204
16223
  var position=0;
16205
16224
  var emptyBGColor;
16206
16225
  if (item.ExtendData && item.ExtendData.Custom)
@@ -17739,6 +17758,7 @@ function MinuteFrame()
17739
17758
  {
17740
17759
  case 0:
17741
17760
  case 1:
17761
+ case 10://自定义的
17742
17762
  this.DrawCustomItem(item); //自定义刻度
17743
17763
  break;
17744
17764
  }
@@ -20377,6 +20397,7 @@ function KLineFrame()
20377
20397
  case 2: //当前屏最后一个K线价格刻度
20378
20398
  case 3: //主图K线涨幅刻度
20379
20399
  case 4: //叠加K线涨幅刻度
20400
+ case 10://自定义的
20380
20401
  this.DrawCustomItem(item, mapTextRect);
20381
20402
  break;
20382
20403
  }
@@ -83496,12 +83517,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
83496
83517
  drawPictrueData.Y=(touches[0].clientY-uielement.getBoundingClientRect().top);
83497
83518
  if (this.GetChartDrawPictureByPoint(drawPictrueData))
83498
83519
  {
83499
- drawPictrueData.ChartDrawPicture.Status=20;
83500
- drawPictrueData.ChartDrawPicture.ValueToPoint();
83501
- drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
83502
- drawPictrueData.ChartDrawPicture.IsSelected=true;
83503
- this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
83504
- this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
83520
+ if (drawPictrueData.ChartDrawPicture.EnableMove==true)
83521
+ {
83522
+ drawPictrueData.ChartDrawPicture.Status=20;
83523
+ drawPictrueData.ChartDrawPicture.ValueToPoint();
83524
+ drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;
83525
+ drawPictrueData.ChartDrawPicture.IsSelected=true;
83526
+ this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;
83527
+ this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;
83528
+ }
83529
+ else
83530
+ {
83531
+ this.CurrentChartDrawPicture=null;
83532
+ this.SelectChartDrawPicture=null;
83533
+ }
83534
+
83505
83535
  let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
83506
83536
  if (event && event.Callback)
83507
83537
  {
@@ -128196,7 +128226,7 @@ function JSReportChartContainer(uielement)
128196
128226
  {
128197
128227
  //0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本 16=涨停价 17=跌停价
128198
128228
  //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值
128199
- //30=全局扩展数据 31=当前板块扩展数据
128229
+ //30=全局扩展数据 31=当前板块扩展数据 36=日期字段
128200
128230
 
128201
128231
  //88=价格颜色类型
128202
128232
 
@@ -130097,6 +130127,7 @@ function JSReportChartContainer(uielement)
130097
130127
  {
130098
130128
  var item=tabItem.ArySubMenu[i];
130099
130129
  var menuItem={ Name:item.Title, Data:{ ID:item.CommandID, Args:[item.ID]} };
130130
+ if (item.Text) menuItem.Text=item.Text;
130100
130131
 
130101
130132
  aryMenu.push(menuItem);
130102
130133
  }
@@ -140900,7 +140931,7 @@ function JSPopMenu()
140900
140931
  }
140901
140932
  else if (i==2) //快捷方式
140902
140933
  {
140903
-
140934
+ if (item.Text) tdDom.innerText=item.Text;
140904
140935
  }
140905
140936
  else if (i==3) //箭头
140906
140937
  {
@@ -142857,7 +142888,7 @@ function HQChartScriptWorker()
142857
142888
 
142858
142889
 
142859
142890
 
142860
- var HQCHART_VERSION="1.1.13724";
142891
+ var HQCHART_VERSION="1.1.13731";
142861
142892
 
142862
142893
  function PrintHQChartVersion()
142863
142894
  {