hqchart 1.1.13728 → 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.
package/lib/umychart.vue.js
CHANGED
|
@@ -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)){
|
|
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;if(item.Value=="Top")y=
|
|
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+')';//内部刻度 背景增加透明度
|
|
@@ -7939,7 +7940,7 @@ var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsolut
|
|
|
7939
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)//画图工具模式
|
|
7940
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个点 直接完成
|
|
7941
7942
|
if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo({Corss:false,Tooltip:false});}if(e.cancelable)e.preventDefault();return;}else{var drawPictrueData={};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
7942
|
-
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);//选中画图工具事件
|
|
7943
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();//移动十字光标
|
|
7944
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)//画图工具移动
|
|
7945
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{//上下滚动
|
|
@@ -13777,7 +13778,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13777
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);};}/********************************************************************************
|
|
13778
13779
|
* 版本信息输出
|
|
13779
13780
|
*
|
|
13780
|
-
*/var HQCHART_VERSION="1.1.
|
|
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();//把给外界调用的方法暴露出来
|
|
13781
13782
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13782
13783
|
// BaseIndex:BaseIndex,
|
|
13783
13784
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -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.
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
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 };
|
|
@@ -12231,10 +12241,16 @@ function AverageWidthFrame()
|
|
|
12231
12241
|
var defaultTextHeight=18*pixelTatio;
|
|
12232
12242
|
var textHeight=defaultTextHeight;
|
|
12233
12243
|
var y;
|
|
12234
|
-
|
|
12235
|
-
|
|
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;
|
|
12236
12250
|
else y = this.GetYFromData(item.Value);
|
|
12237
|
-
|
|
12251
|
+
|
|
12252
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset;
|
|
12253
|
+
|
|
12238
12254
|
var position=0;
|
|
12239
12255
|
var emptyBGColor;
|
|
12240
12256
|
if (item.ExtendData && item.ExtendData.Custom)
|
|
@@ -79532,12 +79548,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
79532
79548
|
drawPictrueData.Y=(touches[0].clientY-uielement.getBoundingClientRect().top);
|
|
79533
79549
|
if (this.GetChartDrawPictureByPoint(drawPictrueData))
|
|
79534
79550
|
{
|
|
79535
|
-
drawPictrueData.ChartDrawPicture.
|
|
79536
|
-
|
|
79537
|
-
|
|
79538
|
-
|
|
79539
|
-
|
|
79540
|
-
|
|
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
|
+
|
|
79541
79566
|
let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
|
|
79542
79567
|
if (event && event.Callback)
|
|
79543
79568
|
{
|
|
@@ -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.
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
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 };
|
|
@@ -16156,10 +16166,16 @@ function AverageWidthFrame()
|
|
|
16156
16166
|
var defaultTextHeight=18*pixelTatio;
|
|
16157
16167
|
var textHeight=defaultTextHeight;
|
|
16158
16168
|
var y;
|
|
16159
|
-
|
|
16160
|
-
|
|
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;
|
|
16161
16175
|
else y = this.GetYFromData(item.Value);
|
|
16162
|
-
|
|
16176
|
+
|
|
16177
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset;
|
|
16178
|
+
|
|
16163
16179
|
var position=0;
|
|
16164
16180
|
var emptyBGColor;
|
|
16165
16181
|
if (item.ExtendData && item.ExtendData.Custom)
|
|
@@ -83457,12 +83473,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
83457
83473
|
drawPictrueData.Y=(touches[0].clientY-uielement.getBoundingClientRect().top);
|
|
83458
83474
|
if (this.GetChartDrawPictureByPoint(drawPictrueData))
|
|
83459
83475
|
{
|
|
83460
|
-
drawPictrueData.ChartDrawPicture.
|
|
83461
|
-
|
|
83462
|
-
|
|
83463
|
-
|
|
83464
|
-
|
|
83465
|
-
|
|
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
|
+
|
|
83466
83491
|
let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
|
|
83467
83492
|
if (event && event.Callback)
|
|
83468
83493
|
{
|
|
@@ -138332,7 +138357,7 @@ function ScrollBarBGChart()
|
|
|
138332
138357
|
|
|
138333
138358
|
|
|
138334
138359
|
|
|
138335
|
-
var HQCHART_VERSION="1.1.
|
|
138360
|
+
var HQCHART_VERSION="1.1.13731";
|
|
138336
138361
|
|
|
138337
138362
|
function PrintHQChartVersion()
|
|
138338
138363
|
{
|
|
@@ -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.
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
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 };
|
|
@@ -16200,10 +16210,16 @@ function AverageWidthFrame()
|
|
|
16200
16210
|
var defaultTextHeight=18*pixelTatio;
|
|
16201
16211
|
var textHeight=defaultTextHeight;
|
|
16202
16212
|
var y;
|
|
16203
|
-
|
|
16204
|
-
|
|
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;
|
|
16205
16219
|
else y = this.GetYFromData(item.Value);
|
|
16206
|
-
|
|
16220
|
+
|
|
16221
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset;
|
|
16222
|
+
|
|
16207
16223
|
var position=0;
|
|
16208
16224
|
var emptyBGColor;
|
|
16209
16225
|
if (item.ExtendData && item.ExtendData.Custom)
|
|
@@ -83501,12 +83517,21 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
83501
83517
|
drawPictrueData.Y=(touches[0].clientY-uielement.getBoundingClientRect().top);
|
|
83502
83518
|
if (this.GetChartDrawPictureByPoint(drawPictrueData))
|
|
83503
83519
|
{
|
|
83504
|
-
drawPictrueData.ChartDrawPicture.
|
|
83505
|
-
|
|
83506
|
-
|
|
83507
|
-
|
|
83508
|
-
|
|
83509
|
-
|
|
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
|
+
|
|
83510
83535
|
let event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE); //选中画图工具事件
|
|
83511
83536
|
if (event && event.Callback)
|
|
83512
83537
|
{
|
|
@@ -142863,7 +142888,7 @@ function HQChartScriptWorker()
|
|
|
142863
142888
|
|
|
142864
142889
|
|
|
142865
142890
|
|
|
142866
|
-
var HQCHART_VERSION="1.1.
|
|
142891
|
+
var HQCHART_VERSION="1.1.13731";
|
|
142867
142892
|
|
|
142868
142893
|
function PrintHQChartVersion()
|
|
142869
142894
|
{
|