hqchart 1.1.13100 → 1.1.13107
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 +61 -39
- package/package.json +1 -1
- package/src/jscommon/umychart.js +347 -219
- package/src/jscommon/umychart.report.js +324 -2
- package/src/jscommon/umychart.style.js +10 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +682 -222
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +682 -222
package/lib/umychart.vue.js
CHANGED
|
@@ -1634,17 +1634,19 @@ this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursor
|
|
|
1634
1634
|
{if(e.cancelable)e.preventDefault();}if(this.IsPhoneDragging(e)){var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
|
|
1635
1635
|
{var x=pt.X;var y=pt.Y;if(this.TryClickLock&&this.TryClickLock(x,y))return;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(pt.X,pt.Y);if(button){this.ClickFrameButton(button,e);return;}}if(this.EnableVerticalDrag){this.VerticalDrag={IsDrag:false};if(this.Frame.PtInFrameVertical(pt.X,pt.Y))this.VerticalDrag.IsDrag=true;}var bStartTimer=true;if(this.ChartDrawOption.IsLockScreen){bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){if(this.TouchStatus.CorssCursorShow==true)bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){bStartTimer=false;}else{if(!isSingleTouch)bStartTimer=false;}if(this.VerticalDrag)bStartTimer=false;if(this.EnableClickModel&&this.ClickModel.IsShowCorssCursor==true)bStartTimer=false;var drag={"Click":{},"LastMove":{}//最后移动的位置
|
|
1636
1636
|
};//var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
1637
|
-
drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;this.MouseDrag=drag;
|
|
1637
|
+
drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;this.MouseDrag=drag;var drawPictureActive=this.GetActiveDrawPicture();//上一次选中的
|
|
1638
|
+
var selectedChart={Chart:this.SelectedChart.Selected.Chart,Identify:this.SelectedChart.Selected.Identify};//上一次选中的图形
|
|
1639
|
+
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)//画图工具模式
|
|
1638
1640
|
{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个点 直接完成
|
|
1639
|
-
if(this.FinishChartDrawPicturePoint())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();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
1641
|
+
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();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
1640
1642
|
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);//选中画图工具事件
|
|
1641
|
-
if(_event&&_event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};_event.Callback(_event,sendData,this);}if(e.cancelable)e.preventDefault();return;}}if(bStartTimer){//长按2秒,十字光标
|
|
1643
|
+
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秒,十字光标
|
|
1642
1644
|
var self=this;this.DragTimer=setTimeout(function(){if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
|
|
1643
1645
|
{var mouseDrag=self.MouseDrag;self.MouseDrag=null;if(self.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID)self.TouchStatus.CorssCursorShow=true;//十字显示
|
|
1644
1646
|
if(self.EnableClickModel===true)self.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
1645
1647
|
}},self.PressTime);}if(this.EnableZoomIndexWindow){this.PhoneDBClick.AddTouchStart(touches[0].clientX,touches[0].clientY,Date.now());JSConsole.Chart.Log("[JSChartContainer::OnTouchStart] PhoneDBClick ",this.PhoneDBClick);}if(this.ChartDrawOption.IsLockScreen){this.MouseDrag=null;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){this.MouseDrag=null;this.MoveCorssCursor(drag.Click,e);}else if(this.EnableClickModel){//if (this.ClickModel.IsShowCorssCursor===true) this.MoveCorssCursor(drag.Click,e)
|
|
1646
1648
|
}else if(this.VerticalDrag){if(!this.VerticalDrag.IsDrag)this.MoveCorssCursor(drag.Click,e);//没有点击X轴, 就显示十字光标
|
|
1647
|
-
}else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}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){if(this.IsForceLandscape)y=uielement.getBoundingClientRect().width-touches[0].clientY;//强制横屏Y计算
|
|
1649
|
+
}else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);var drawType=0;if(drawPictureActive.Select.Guid!=null){if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart)drawType=1;}if(drawType==1)this.Draw();}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){if(this.IsForceLandscape)y=uielement.getBoundingClientRect().width-touches[0].clientY;//强制横屏Y计算
|
|
1648
1650
|
if(!this.ChartDrawOption.IsLockScreen)this.MoveCorssCursor({X:touches[0].clientX,Y:touches[0].clientY},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);var isMoveCorssCursor=this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true;//是否移动十字光标
|
|
1649
1651
|
if(this.VerticalDrag){if(this.VerticalDrag.IsDrag===true)isMoveCorssCursor=false;else isMoveCorssCursor=true;}if(this.EnableClickModel){if(this.ClickModel.IsShowCorssCursor===true)isMoveCorssCursor=true;else isMoveCorssCursor=false;}//JSConsole.Chart.Log(`[JSChartContainer::OnTouchMove] moveAngle=${moveAngle} , moveUpDown=${moveUpDown}, moveSetp=${moveSetp}`);
|
|
1650
1652
|
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)//画图工具移动
|
|
@@ -5618,7 +5620,7 @@ this.OverlayIndexType={Position:0,LineSpace:5,BGColor:g_JSChartResource.OverlayI
|
|
|
5618
5620
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;this.TitleRect;//指标名字显示区域
|
|
5619
5621
|
this.IsDrawTitleBG=false;//是否绘制指标名字背景色
|
|
5620
5622
|
this.BGColor=g_JSChartResource.IndexTitleBGColor;this.BGBorderColor=g_JSChartResource.IndexTitleBorderColor;this.BGBorderMoveOnColor=g_JSChartResource.IndexTitleBorderMoveOnColor;this.BorderRoundRadius=2;//圆角矩形角度
|
|
5621
|
-
this.OnDrawEvent;this.ParamSpace=2;//参数显示的间距
|
|
5623
|
+
this.NameButtonStyle=g_JSChartResource.IndexTitleBorderStyle,this.OnDrawEvent;this.ParamSpace=2;//参数显示的间距
|
|
5622
5624
|
this.TitleSpace=2;//指标名字和参数之间的间距
|
|
5623
5625
|
this.TitleColor=g_JSChartResource.IndexTitleColor;//指标名字颜色
|
|
5624
5626
|
this.SelectedColor=g_JSChartResource.IndexTitleSelectedColor;this.IsKLineFrame=false;//是否是K线框架标题
|
|
@@ -5679,7 +5681,7 @@ this.Canvas.fillStyle=this.BGColor;var drawRect={Left:left,Top:bottom-bgHeight/2
|
|
|
5679
5681
|
if(left+textWidth>right)break;this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}if(this.Explain)//说明信息
|
|
5680
5682
|
{this.Canvas.fillStyle=this.TitleColor;var text="说明:"+this.Explain;var textWidth=this.Canvas.measureText(text).width+2;if(left+textWidth<right){this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}if(this.OverlayIndexType.Position==1){if(!this.Frame.ChartBorder.IsShowTitleOnly)this.DrawOverlayIndexSingleLine();}else{this.DrawOverlayIndex(left+5*GetDevicePixelRatio());//间距都空点 和主指标区分开
|
|
5681
5683
|
}};this.OnDrawEventCallback=function(drawData){if(!this.OnDrawEvent||!this.OnDrawEvent.Callback)return;var data={Draw:drawData,Name:'DynamicChartTitlePainting'};this.OnDrawEvent.Callback(this.OnDrawEvent,data,this);};this.GetFontHeight=function(font){return GetFontHeight(this.Canvas,font,"擎");};//指标名字按钮
|
|
5682
|
-
this.DrawNameButton=function(rtButton,moveonPoint,mouseStatus){var pixelRatio=GetDevicePixelRatio();var title=this.Title;if(this.IsShowNameArrow)title+='▼';var textWidth=this.Canvas.measureText(title).width;var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;var roundRadius=this.BorderRoundRadius*pixelRatio;var bgWidth=textWidth+4*pixelRatio+roundRadius*2;rtButton.Top=rtButton.YCenter-bgHeight/2-1,rtButton.Width=bgWidth;rtButton.Height=bgHeight;rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var borderColor=this.BGBorderColor;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){if(this.BGBorderMoveOnColor)borderColor=this.BGBorderMoveOnColor;if(mouseStatus){var btnItem={ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON};mouseStatus.MouseOnToolbar={ID:"IndexNameButton",Rect:rtButton,Item:btnItem,Frame:this.Frame,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}}this.Canvas.beginPath();this.Canvas.roundRect(ToFixedPoint(rtButton.Left),ToFixedPoint(rtButton.Top),ToFixedRect(rtButton.Width),ToFixedRect(rtButton.Height),[roundRadius]);this.Canvas.closePath();this.Canvas.fillStyle=this.BGColor;this.Canvas.fill();if(borderColor){this.Canvas.strokeStyle=borderColor;this.Canvas.stroke();}this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(title,rtButton.Left+roundRadius+2*pixelRatio,rtButton.YCenter,textWidth);};//绘制按钮
|
|
5684
|
+
this.DrawNameButton=function(rtButton,moveonPoint,mouseStatus){var pixelRatio=GetDevicePixelRatio();var title=this.Title;if(this.IsShowNameArrow)title+='▼';var textWidth=this.Canvas.measureText(title).width;var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;var roundRadius=this.BorderRoundRadius*pixelRatio;var bgWidth=textWidth+4*pixelRatio+roundRadius*2;rtButton.Top=rtButton.YCenter-bgHeight/2-1,rtButton.Width=bgWidth;rtButton.Height=bgHeight;rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var borderColor=this.BGBorderColor;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){if(this.BGBorderMoveOnColor)borderColor=this.BGBorderMoveOnColor;if(mouseStatus){var btnItem={ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON};mouseStatus.MouseOnToolbar={ID:"IndexNameButton",Rect:rtButton,Item:btnItem,Frame:this.Frame,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}}if(this.NameButtonStyle==1){this.Canvas.beginPath();this.Canvas.roundRect(ToFixedPoint(rtButton.Left),ToFixedPoint(rtButton.Top),ToFixedRect(rtButton.Width),ToFixedRect(rtButton.Height),[roundRadius]);this.Canvas.closePath();this.Canvas.fillStyle=this.BGColor;this.Canvas.fill();if(borderColor){this.Canvas.strokeStyle=borderColor;this.Canvas.stroke();}}else{this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtButton.Left,rtButton.Top,rtButton.Width,rtButton.Height);if(borderColor){this.Canvas.strokeStyle=borderColor;this.Canvas.strokeRect(ToFixedPoint(rtButton.Left),ToFixedPoint(rtButton.Top),ToFixedRect(rtButton.Width),ToFixedRect(rtButton.Height),[roundRadius]);}}this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(title,rtButton.Left+roundRadius+2*pixelRatio,rtButton.YCenter,textWidth);};//绘制按钮
|
|
5683
5685
|
this.DrawButton=function(item,rtButton,moveonPoint,mouseStatus){var size=item.Style.Size;if(IFrameSplitOperator.IsNumber(item.Style.YMoveOffset))rtButton.YCenter+=item.Style.YMoveOffset;var font=size+'px '+item.Style.Family;rtButton.Top=rtButton.YCenter-size/2;rtButton.Width=size+item.Style.MerginLeft;rtButton.Height=size;rtButton.Bottom=rtButton.Top+rtButton.Height;rtButton.Right=rtButton.Left+rtButton.Width;var color=item.Style.Color;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){color=item.Style.MoveOnColor;if(mouseStatus)mouseStatus.MouseOnToolbar={ID:"TitleButton",Rect:rtButton,Item:item,Frame:this.Frame,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,rtButton.Left,rtButton.YCenter);return true;};this.DrawToolbar=function(toolbarInfo,moveonPoint,mouseStatus){toolbarInfo.Width=0;if(!this.Frame||!this.Frame.GetLeftToolbar)return;var aryButton=this.Frame.GetLeftToolbar();if(!IFrameSplitOperator.IsNonEmptyArray(aryButton))return;if(this.Frame.IsHScreen===true){}else{var border=this.Frame.GetBorder();var right=border.Right-3;var left=border.Left+3;var yCenter=toolbarInfo.YCenter;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var rtButton={Left:left,YCenter:yCenter};this.DrawButton(item,rtButton,moveonPoint,mouseStatus);this.Buttons.push({ID:item.ID,Rect:rtButton,FrameID:this.Frame.Identify,Type:0});//Type 0=主图按钮 1=附图按钮 2=主图指标名字按钮
|
|
5684
5686
|
left=rtButton.Right;toolbarInfo.Width+=rtButton.Width;}if(toolbarInfo.Width>0)toolbarInfo.Width+=3;}};this.DrawOverlayToolbar=function(overlayItem,toolbarInfo,moveonPoint,mouseStatus){toolbarInfo.Width=0;if(!overlayItem||!overlayItem.Frame||!overlayItem.Frame.GetLeftToolbar)return;var frame=overlayItem.Frame;var aryButton=frame.GetLeftToolbar({Overlay:overlayItem,OverlayID:toolbarInfo.ID});if(!IFrameSplitOperator.IsNonEmptyArray(aryButton))return;if(this.Frame.IsHScreen===true){}else{var border=frame.GetBorder();var right=border.Right-3;var left=border.Left+3;var yCenter=toolbarInfo.YCenter;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var rtButton={Left:left,YCenter:yCenter};this.DrawButton(item,rtButton,moveonPoint,mouseStatus);this.Buttons.push({ID:item.ID,Rect:rtButton,FrameID:this.Frame.Identify,Type:1,OverlayID:toolbarInfo.ID,Title:overlayItem.Title});left=rtButton.Right;toolbarInfo.Width+=rtButton.Width;}if(toolbarInfo.Width>0)toolbarInfo.Width+=3;}};this.PtInButtons=function(x,y){for(var i=0;i<this.Buttons.length;++i){var item=this.Buttons[i];if(!item.Rect)continue;var rect=item.Rect;if(x>rect.Left&&x<rect.Right&&y>rect.Top&&y<rect.Bottom){var result={ID:item.ID,Rect:rect,FrameID:item.FrameID,Type:item.Type};if(item.Type==1){result.Title=item.Title;result.OverlayID=item.OverlayID;}return result;}}return null;};}//画图工具
|
|
5685
5687
|
function IChartDrawPicture(){this.Frame;this.Canvas;this.Point=new Array();//画图的点
|
|
@@ -5885,8 +5887,9 @@ this.ValueTextColor='rgb(250,250,250)';this.IsShowCorssCursor=true;//画的时
|
|
|
5885
5887
|
this.GetLabelCallback;//绘制标题回调函数
|
|
5886
5888
|
this.PointCount=1;this.ClassName='ChartDrawHLine';this.Font=14*GetDevicePixelRatio()+"px 微软雅黑";this.TextFont=12*GetDevicePixelRatio()+"px 微软雅黑";this.RightSpaceWidth=50;this.ButtonPosition=0;//按钮位置, 0=价格后面, 1=价格上面
|
|
5887
5889
|
this.ButtonBGColor='rgb(190,190,190)';this.ButtonSpace=3;this.Button={CloseIcon:{Text:'\uE62B',Color:'rgb(255,255,255)',Family:"iconfont",Size:16},SettingIcon:{Text:'\uE623',Color:'rgb(255,255,255)',Family:"iconfont",Size:16}};this.AryButton=[];this.ExtendData;//扩展数据
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
+
this.ShowPriceTextConfig={IsShow:[false,false,true],//[0]=left内 [1]=right内 [2]=right外
|
|
5891
|
+
Font:[12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1']};//内部变量
|
|
5892
|
+
this.ColseButtonSize=0;this.SettingButtonSize=0;this.ButtonBGWidth=0;this.SetOption=function(option){if(this.Super_SetOption)this.Super_SetOption(option);if(option){if(option.GetLabelCallback){this.GetLabelCallback=option.GetLabelCallback;}if(IFrameSplitOperator.IsNumber(option.Precision))this.Precision=option.Precision;if(IFrameSplitOperator.IsNumber(option.Precision))this.Precision=option.Precision;if(option.Font)this.Font=option.Font;if(option.ValueTextColor)this.ValueTextColor=option.ValueTextColor;if(IFrameSplitOperator.IsNumber(option.ButtonPosition))this.ButtonPosition=option.ButtonPosition;if(IFrameSplitOperator.IsNumber(option.RightSpaceWidth))this.RightSpaceWidth=option.RightSpaceWidth;if(option.Button){var item=option.Button;if(item.CloseIcon)this.Button.CloseIcon=CloneData(item.CloseIcon);if(item.SettingIcon)this.Button.SettingIcon=CloneData(item.SettingIcon);}if(option.ExtendData)this.ExtendData=option.ExtendData;if(IFrameSplitOperator.IsNonEmptyArray(option.IsShowPriceText)){for(var i=0;i<option.IsShowPriceText.length&&i<3;++i){var value=option.IsShowPriceText[i];if(IFrameSplitOperator.IsBool(value))this.ShowPriceTextConfig.IsShow[i]=value;}}}};this.ExportStorageData=function(){var storageData;if(this.Super_ExportStorageData){storageData=this.Super_ExportStorageData();if(this.Label)storageData.Label=this.Label;}return storageData;};this.IsPointIn=this.IsPointIn_XYValue_Line;/*
|
|
5890
5893
|
this.GetXYCoordinate=function()
|
|
5891
5894
|
{
|
|
5892
5895
|
if (this.IsFrameMinSize()) return null;
|
|
@@ -5896,13 +5899,14 @@ this.ColseButtonSize=0;this.SettingButtonSize=0;this.ButtonBGWidth=0;this.SetOpt
|
|
|
5896
5899
|
}
|
|
5897
5900
|
*/this.IsDrawMain=function()//选中绘制在动态绘图上, 没有选中绘制在背景上
|
|
5898
5901
|
{if(!this.GetActiveDrawPicture)return true;var active=this.GetActiveDrawPicture();if(active.Select.Guid==this.Guid)return false;return true;};this.MainDraw=function(){this.Draw();};this.Draw=function(moveonPoint,mouseStatus){this.LinePoint=[];this.AryButton=[];this.ColseButtonSize=0;this.SettingButtonSize=0;this.ButtonBGWidth=0;if(this.IsFrameMinSize())return;if(!this.IsShow)return;var drawPoint=this.CalculateDrawPoint();if(!drawPoint||drawPoint.length!=1)return;if(!this.Frame)return;if(this.Value.length!=1)return;if(!this.IsYValueInFrame(this.Value[0].YValue))return null;var isHScreen=this.Frame.IsHScreen;var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();if(isHScreen){left=this.Frame.ChartBorder.GetTop();right=this.Frame.ChartBorder.GetBottom();}this.ClipFrame();//画线段
|
|
5899
|
-
this.Canvas.strokeStyle=this.LineColor;this.SetLineWidth();this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(drawPoint[0].X,left);this.Canvas.lineTo(drawPoint[0].X,right);}else{this.Canvas.moveTo(left,ToFixedPoint(drawPoint[0].Y));this.Canvas.lineTo(right,ToFixedPoint(drawPoint[0].Y));}this.Canvas.stroke();this.RestoreLineWidth()
|
|
5902
|
+
this.Canvas.strokeStyle=this.LineColor;this.SetLineWidth();this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(drawPoint[0].X,left);this.Canvas.lineTo(drawPoint[0].X,right);}else{this.Canvas.moveTo(left,ToFixedPoint(drawPoint[0].Y));this.Canvas.lineTo(right,ToFixedPoint(drawPoint[0].Y));}this.Canvas.stroke();this.RestoreLineWidth();//画水平线段
|
|
5903
|
+
var line={Start:new Point(),End:new Point()};if(isHScreen){line.Start.X=drawPoint[0].X;line.Start.Y=left;line.End.X=drawPoint[0].X;line.End.Y=right;}else{line.Start.X=left;line.Start.Y=drawPoint[0].Y;line.End.X=right;line.End.Y=drawPoint[0].Y;}this.LinePoint.push(line);var yValue=this.Frame.GetYData(drawPoint[0].Y);var strPrice=yValue.toFixed(this.Precision);if(this.ShowPriceTextConfig.IsShow[0]){this.DrawPriceText(strPrice,line.Start,line.End,0);}if(this.ShowPriceTextConfig.IsShow[1]){this.DrawPriceText(strPrice,line.Start,line.End,1);}var labInfo;if(this.GetLabelCallback)labInfo=this.GetLabelCallback(this);//描述信息
|
|
5900
5904
|
if(labInfo)this.DrawLab(labInfo,drawPoint[0].Y);//画中心点
|
|
5901
|
-
var xCenter=left+(right-left)/2;var point={X:xCenter,Y:drawPoint[0].Y};this.DrawPoint([point]);this.Canvas.restore()
|
|
5902
|
-
this.CalculateButtonSize();this.DrawValueText(drawPoint[0].Y,rtDraw,labInfo);if(labInfo)this.DrawRightLab(labInfo,rtDraw)
|
|
5905
|
+
var xCenter=left+(right-left)/2;var point={X:xCenter,Y:drawPoint[0].Y};this.DrawPoint([point]);this.Canvas.restore();//外部右侧显示价格
|
|
5906
|
+
if(this.ShowPriceTextConfig.IsShow[2]){var rtDraw={};this.CalculateButtonSize();this.DrawValueText(drawPoint[0].Y,rtDraw,labInfo);if(labInfo)this.DrawRightLab(labInfo,rtDraw);}//鼠标是否在按钮上
|
|
5903
5907
|
if(moveonPoint&&mouseStatus){for(var i=0;i<this.AryButton.length;++i){var item=this.AryButton[i];var rtButton=item.Rect;if(moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){mouseStatus.MouseOnToolbar={Rect:rtButton,Item:item,Frame:this.Frame,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};break;}}}};this.CalculateLabSize=function(labInfo){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";this.Canvas.font=this.TextFont;var lineHeight=this.Canvas.measureText("擎").width+2;var maxNameWidth=0,maxTextWidth=0;var lineCount=0;var lineSpace=0;if(IFrameSplitOperator.IsNumber(labInfo.LineSpace))lineSpace=labInfo.LineSpace;var maxNameWidth=0,maxTextWidth=0;var lineCount=0;var maxWidth=0;for(var i=0;i<labInfo.AryText.length;++i){var item=labInfo.AryText[i];item.NameWidth=0;item.TextWidth=0;if(item.Name)item.NameWidth=this.Canvas.measureText(item.Name).width+2;if(item.Text)item.TextWidth=this.Canvas.measureText(item.Text).width+2;if(maxNameWidth<item.NameWidth)maxNameWidth=item.NameWidth;if(maxTextWidth<item.TextWidth)maxTextWidth=item.TextWidth;var itemWidth=item.NameWidth+item.TextWidth;if(maxWidth<itemWidth)maxWidth=itemWidth;++lineCount;}var size={Width:maxWidth,Height:lineCount*(lineHeight+lineSpace)+lineSpace,NameWidth:maxNameWidth,TextWidth:maxTextWidth,LineHeight:lineHeight};return size;};this.DrawLab=function(labInfo,y){if(!labInfo)return;if(!IFrameSplitOperator.IsNonEmptyArray(labInfo.AryText))return;if(labInfo.Position===2)return;var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var labSize=this.CalculateLabSize(labInfo);var drawLeft=right-labSize.Width;var drawTop=y-labSize.Height-1;//背景色
|
|
5904
5908
|
if(labInfo.BGColor){this.Canvas.fillStyle=labInfo.BGColor;var rtTop=y-labSize.Height-4;this.Canvas.fillRect(ToFixedRect(drawLeft),ToFixedRect(rtTop),ToFixedRect(right+drawLeft),ToFixedRect(y-rtTop));}var yText=drawTop;for(var i=0;i<labInfo.AryText.length;++i){var item=labInfo.AryText[i];if(item.Name){this.Canvas.fillStyle=item.NameColor;this.Canvas.fillText(item.Name,drawLeft+1,yText+1);}if(item.Text){this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Text,drawLeft+labSize.NameWidth+1,yText+1);}yText+=labSize.LineHeight;}};this.DrawRightLab=function(labInfo,rtLeftDraw){if(!labInfo)return;if(!IFrameSplitOperator.IsNonEmptyArray(labInfo.AryText))return;if(labInfo.Position!=2)return;var labSize=this.CalculateLabSize(labInfo);var drawLeft=rtLeftDraw.Right-labSize.Width;var drawTop=rtLeftDraw.Bottom;var lineSpace=0;if(IFrameSplitOperator.IsNumber(labInfo.LineSpace))lineSpace=labInfo.LineSpace;//背景色
|
|
5905
|
-
if(labInfo.BGColor){this.Canvas.fillStyle=labInfo.BGColor;var rtTop=drawTop;this.Canvas.fillRect(ToFixedRect(drawLeft),ToFixedRect(rtTop),ToFixedRect(labSize.Width),ToFixedRect(labSize.Height));}var yText=drawTop+1+lineSpace;this.Canvas.textBaseline="top";for(var i=0;i<labInfo.AryText.length;++i){var item=labInfo.AryText[i];if(item.Name){this.Canvas.textAlign="left";this.Canvas.fillStyle=item.NameColor;this.Canvas.fillText(item.Name,drawLeft+1,yText+1);}if(item.Text){this.Canvas.textAlign="right";this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Text,rtLeftDraw.Right-1,yText+1);}yText+=labSize.LineHeight+lineSpace;}};this.DrawValueText=function(y,rtDraw,labInfo){var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();if(this.RightSpaceWidth>0){this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(right,ToFixedPoint(y));this.Canvas.lineTo(right+this.RightSpaceWidth,ToFixedPoint(y));this.Canvas.stroke();}var yValue=this.Frame.GetYData(y);var strValue=yValue.toFixed(this.Precision);if(labInfo&&labInfo.PriceSuffixText)strValue+=labInfo.PriceSuffixText;this.Canvas.fillStyle=this.LineColor;this.Canvas.font=this.Font;var textWidth=this.Canvas.measureText(strValue).width;var lineHeight=this.GetFontHeight();var rtBG={Left:right+this.RightSpaceWidth,Top:y-lineHeight/2,Width:textWidth+4,Height:lineHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;if(this.ButtonPosition==1)this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width+this.ButtonBGWidth),ToFixedRect(rtBG.Height));else this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));this.Canvas.fillStyle=this.ValueTextColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(strValue,rtBG.Left+2,y);rtDraw.Left=rtBG.Left;rtDraw.Top=rtBG.Top;rtDraw.Bottom=rtBG.Bottom;rtDraw.Right=rtBG.Right;this.DrawButton(rtBG.Top,rtBG.Right,lineHeight,rtDraw);};this.CalculateButtonSize=function(){var pixelRatio=GetDevicePixelRatio();if(this.Button.SettingIcon){var icon=this.Button.SettingIcon;var font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.font=font;var width=this.Canvas.measureText(icon.Text).width;this.SettingButtonSize=width;}if(this.Button.CloseIcon){var icon=this.Button.CloseIcon;var font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.font=font;var width=this.Canvas.measureText(icon.Text).width;this.ColseButtonSize=width;}if(this.ColseButtonSize<=0&&this.SettingButtonSize<=0)return;var buttonWidth=0;if(this.SettingButtonSize>0)buttonWidth+=this.SettingButtonSize;if(this.ColseButtonSize>0){if(buttonWidth>0)buttonWidth+=this.ButtonSpace;buttonWidth+=this.ColseButtonSize;}buttonWidth+=4;this.ButtonBGWidth=buttonWidth;};this.DrawButton=function(drawTop,drawLeft,drawHeight,rtDraw){if(this.ColseButtonSize<=0&&this.SettingButtonSize<=0)return;if(this.ButtonPosition==1)drawTop-=drawHeight;this.Canvas.fillStyle=this.LineColor;var left=drawLeft;var rtBG={Left:drawLeft,Top:drawTop,Width:this.ButtonBGWidth,Height:drawHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;this.Canvas.fillStyle=this.ButtonBGColor;this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));left+=1;var pixelRatio=GetDevicePixelRatio();if(this.Button.SettingIcon){var rtButton={Left:left,Top:drawTop,Width:this.SettingButtonSize,Height:drawHeight};rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var yCenter=rtButton.Top+rtButton.Height/2;var xCenter=rtButton.Left+rtButton.Width/2;var icon=this.Button.SettingIcon;this.Canvas.font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.textAlign="center";this.Canvas.textBaseline="middle";this.Canvas.fillStyle=icon.Color;this.Canvas.fillText(this.Button.SettingIcon.Text,xCenter,yCenter);this.AryButton.push({Rect:rtButton,ID:JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING});/*
|
|
5909
|
+
if(labInfo.BGColor){this.Canvas.fillStyle=labInfo.BGColor;var rtTop=drawTop;this.Canvas.fillRect(ToFixedRect(drawLeft),ToFixedRect(rtTop),ToFixedRect(labSize.Width),ToFixedRect(labSize.Height));}var yText=drawTop+1+lineSpace;this.Canvas.textBaseline="top";for(var i=0;i<labInfo.AryText.length;++i){var item=labInfo.AryText[i];if(item.Name){this.Canvas.textAlign="left";this.Canvas.fillStyle=item.NameColor;this.Canvas.fillText(item.Name,drawLeft+1,yText+1);}if(item.Text){this.Canvas.textAlign="right";this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Text,rtLeftDraw.Right-1,yText+1);}yText+=labSize.LineHeight+lineSpace;}};this.DrawValueText=function(y,rtDraw,labInfo){var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();if(this.RightSpaceWidth>0){this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(right,ToFixedPoint(y));this.Canvas.lineTo(right+this.RightSpaceWidth,ToFixedPoint(y));this.Canvas.stroke();}var yValue=this.Frame.GetYData(y);var strValue=yValue.toFixed(this.Precision);if(labInfo&&labInfo.PriceSuffixText)strValue+=labInfo.PriceSuffixText;this.Canvas.fillStyle=this.LineColor;this.Canvas.font=this.Font;var textWidth=this.Canvas.measureText(strValue).width;var lineHeight=this.GetFontHeight();var rtBG={Left:right+this.RightSpaceWidth,Top:y-lineHeight/2,Width:textWidth+4,Height:lineHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;if(this.ButtonPosition==1)this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width+this.ButtonBGWidth),ToFixedRect(rtBG.Height));else this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));this.Canvas.fillStyle=this.ValueTextColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(strValue,rtBG.Left+2,y);rtDraw.Left=rtBG.Left;rtDraw.Top=rtBG.Top;rtDraw.Bottom=rtBG.Bottom;rtDraw.Right=rtBG.Right;this.DrawButton(rtBG.Top,rtBG.Right,lineHeight,rtDraw);};this.DrawPriceText=function(text,ptStart,ptEnd,position){if(position!=1&&position!=0)return;var font=this.ShowPriceTextConfig.Font[position];this.Canvas.fillStyle=this.LineColor;this.Canvas.font=font;var textWidth=this.Canvas.measureText(text).width;var lineHeight=this.GetFontHeight();var rtBG=null;if(position==1){var rtBG={Left:ptStart.X,Top:ptStart.Y-lineHeight/2,Width:textWidth+4,Height:lineHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;}else if(position==0){var rtBG={Right:ptEnd.X,Top:ptEnd.Y-lineHeight/2,Width:textWidth+4,Height:lineHeight};rtBG.Left=rtBG.Right-rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;}this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width+this.ButtonBGWidth),ToFixedRect(rtBG.Height));this.Canvas.fillStyle=this.ValueTextColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(text,rtBG.Left+2,ptStart.Y);};this.CalculateButtonSize=function(){var pixelRatio=GetDevicePixelRatio();if(this.Button.SettingIcon){var icon=this.Button.SettingIcon;var font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.font=font;var width=this.Canvas.measureText(icon.Text).width;this.SettingButtonSize=width;}if(this.Button.CloseIcon){var icon=this.Button.CloseIcon;var font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.font=font;var width=this.Canvas.measureText(icon.Text).width;this.ColseButtonSize=width;}if(this.ColseButtonSize<=0&&this.SettingButtonSize<=0)return;var buttonWidth=0;if(this.SettingButtonSize>0)buttonWidth+=this.SettingButtonSize;if(this.ColseButtonSize>0){if(buttonWidth>0)buttonWidth+=this.ButtonSpace;buttonWidth+=this.ColseButtonSize;}buttonWidth+=4;this.ButtonBGWidth=buttonWidth;};this.DrawButton=function(drawTop,drawLeft,drawHeight,rtDraw){if(this.ColseButtonSize<=0&&this.SettingButtonSize<=0)return;if(this.ButtonPosition==1)drawTop-=drawHeight;this.Canvas.fillStyle=this.LineColor;var left=drawLeft;var rtBG={Left:drawLeft,Top:drawTop,Width:this.ButtonBGWidth,Height:drawHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;this.Canvas.fillStyle=this.ButtonBGColor;this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));left+=1;var pixelRatio=GetDevicePixelRatio();if(this.Button.SettingIcon&&this.Button.SettingIcon.Text){var rtButton={Left:left,Top:drawTop,Width:this.SettingButtonSize,Height:drawHeight};rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var yCenter=rtButton.Top+rtButton.Height/2;var xCenter=rtButton.Left+rtButton.Width/2;var icon=this.Button.SettingIcon;this.Canvas.font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.textAlign="center";this.Canvas.textBaseline="middle";this.Canvas.fillStyle=icon.Color;this.Canvas.fillText(this.Button.SettingIcon.Text,xCenter,yCenter);this.AryButton.push({Rect:rtButton,ID:JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING});/*
|
|
5906
5910
|
if (this.ColseButtonSize>0)
|
|
5907
5911
|
{
|
|
5908
5912
|
var xLine=rtButton.Right+this.ButtonSpace/2;
|
|
@@ -5913,7 +5917,7 @@ if(labInfo.BGColor){this.Canvas.fillStyle=labInfo.BGColor;var rtTop=drawTop;this
|
|
|
5913
5917
|
this.Canvas.lineTo(xLine,rtButton.Bottom);
|
|
5914
5918
|
this.Canvas.stroke();
|
|
5915
5919
|
}
|
|
5916
|
-
*/left=rtButton.Right+this.ButtonSpace;}if(this.Button.CloseIcon){var rtButton={Left:left,Top:drawTop,Width:this.ColseButtonSize,Height:drawHeight};rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var yCenter=rtButton.Top+rtButton.Height/2;var xCenter=rtButton.Left+rtButton.Width/2;var icon=this.Button.CloseIcon;this.Canvas.font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.textAlign="center";this.Canvas.textBaseline="middle";this.Canvas.fillStyle=icon.Color;this.Canvas.fillText(this.Button.CloseIcon.Text,xCenter,yCenter);this.AryButton.push({Rect:rtButton,ID:JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE});left=rtButton.Right;}rtDraw.Right=rtBG.Right;};this.PtInButtons=function(x,y){for(var i=0;i<this.AryButton.length;++i){var item=this.AryButton[i];if(!item.Rect)continue;var rect=item.Rect;this.Canvas.beginPath();this.Canvas.rect(rect.Left,rect.Top,rect.Width,rect.Height);if(this.Canvas.isPointInPath(x,y)){return{ID:item.ID,Rect:rect};}}return null;};}//趋势线
|
|
5920
|
+
*/left=rtButton.Right+this.ButtonSpace;}if(this.Button.CloseIcon&&this.Button.CloseIcon.Text){var rtButton={Left:left,Top:drawTop,Width:this.ColseButtonSize,Height:drawHeight};rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var yCenter=rtButton.Top+rtButton.Height/2;var xCenter=rtButton.Left+rtButton.Width/2;var icon=this.Button.CloseIcon;this.Canvas.font=icon.Size*pixelRatio+'px '+icon.Family;this.Canvas.textAlign="center";this.Canvas.textBaseline="middle";this.Canvas.fillStyle=icon.Color;this.Canvas.fillText(this.Button.CloseIcon.Text,xCenter,yCenter);this.AryButton.push({Rect:rtButton,ID:JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE});left=rtButton.Right;}rtDraw.Right=rtBG.Right;};this.PtInButtons=function(x,y){for(var i=0;i<this.AryButton.length;++i){var item=this.AryButton[i];if(!item.Rect)continue;var rect=item.Rect;this.Canvas.beginPath();this.Canvas.rect(rect.Left,rect.Top,rect.Width,rect.Height);if(this.Canvas.isPointInPath(x,y)){return{ID:item.ID,Rect:rect};}}return null;};}//趋势线
|
|
5917
5921
|
function ChartDrawPictureTrendLine(){this.newMethod=IChartDrawPicture;//派生
|
|
5918
5922
|
this.newMethod();delete this.newMethod;this.ClassName='ChartDrawPictureTrendLine';this.IsPointIn=this.IsPointIn_XYValue_Line;this.GetXYCoordinate=this.GetXYCoordinate_default;this.OnlyMoveXIndex=true;this.IsSupportMagnet=true;this.Draw=function(){this.LinePoint=[];if(this.IsFrameMinSize())return;if(!this.IsShow)return;var drawPoint=this.CalculateDrawPoint({IsCheckX:false,IsCheckY:false});if(!drawPoint||drawPoint.length!=2)return;var ptStart=drawPoint[0];var ptEnd=drawPoint[1];var extendLine=this.CalculateExtendLinePoint(ptStart,ptEnd);this.ClipFrame();this.Canvas.strokeStyle=this.LineColor;this.SetLineWidth();this.Canvas.beginPath();this.Canvas.moveTo(extendLine.Start.X,extendLine.Start.Y);this.Canvas.lineTo(extendLine.End.X,extendLine.End.Y);this.Canvas.stroke();this.RestoreLineWidth();var line={Start:ptStart,End:ptEnd};this.LinePoint.push(line);this.DrawPoint(drawPoint);//画点
|
|
5919
5923
|
this.Canvas.restore();};}//画图工具-矩形
|
|
@@ -6356,6 +6360,7 @@ this.TitleFont=13*GetDevicePixelRatio()+'px 微软雅黑';//指标显示,tooltip
|
|
|
6356
6360
|
this.IndexTitleBGColor='rgb(250,250,250)';//指标名字背景色
|
|
6357
6361
|
this.IndexTitleBorderColor='rgb(180,180,180)';//指标名字边框颜色
|
|
6358
6362
|
this.IndexTitleBorderMoveOnColor='rgb(0,0,0)';//指标名字边框颜色(鼠标在上面)
|
|
6363
|
+
this.IndexTitleBorderStyle=1,//0=直角边框 1=圆角边框
|
|
6359
6364
|
this.IndexTitleColor="rgb(43,54,69)";//指标名字颜色
|
|
6360
6365
|
this.IndexTitleSelectedColor="rgb(65,105,225)";this.OverlayIndexTitleBGColor='rgba(255,255,255,0.7)';this.IndexTitleMerginLeft=1;//指标输出左边间距
|
|
6361
6366
|
this.IndexTitle={UpDownArrow://数值涨跌箭头
|
|
@@ -6571,7 +6576,7 @@ Text:"rgb(60,60,60)"//默认文本
|
|
|
6571
6576
|
DownTextColor:"rgb(25,158,0)",//下跌文字颜色
|
|
6572
6577
|
UnchagneTextColor:"rgb(90,90,90)",//平盘文字颜色
|
|
6573
6578
|
CloseLine:{CloseColor:"rgb(30,144,255)",YCloseColor:"rgba(105,105,105,0.5)",//昨收线
|
|
6574
|
-
AreaColor:'rgba(0,191,255,0.2)'},KLine:{UpColor:"rgb(255,0,0)",DownColor:"rgb(0,128,0)",UnchagneColor:'rgb(90,90,90)',DataWidth:16,DistanceWidth:3},Tab:{Font:{Size:12,Name:"微软雅黑"},ScrollBarWidth:100,ButtonColor:"rgb(252,252,252)",BarColor:"rgb(180,180,180)",BorderColor:'rgb(180,180,180)',Mergin:{Left:5,Right:5,Top:4,Bottom:2},TabTitleColor:'rgb(60,60,60)',TabSelectedTitleColor:'rgb(0,0,0)',TabSelectedBGColor:"rgb(252,252,252)",TabMoveOnTitleColor:"rgb(0,0,0)",TabBGColor:"rgb(220,220,220)"},PageInfo:{Font:{Size:15,Name:"微软雅黑"},TextColor:"rgb(0,0,0)",BGColor:"rgba(180,180,180,0.5)",Mergin:{Left:5,Right:5,Top:4,Bottom:2}},DragRow:{Color:"rgba(190,190,190,0.8)",TextColor:'rgba(0,0, 0, 0.8)',MoveRowColor:'rgb(240,128,128)',SrcRowColor:'rgb(180,240,240)'}},//报价列表
|
|
6579
|
+
AreaColor:'rgba(0,191,255,0.2)'},KLine:{UpColor:"rgb(255,0,0)",DownColor:"rgb(0,128,0)",UnchagneColor:'rgb(90,90,90)',DataWidth:16,DistanceWidth:3},Tab:{Font:{Size:12,Name:"微软雅黑"},ScrollBarWidth:100,ButtonColor:"rgb(252,252,252)",BarColor:"rgb(180,180,180)",BorderColor:'rgb(180,180,180)',Mergin:{Left:5,Right:5,Top:4,Bottom:2},TabTitleColor:'rgb(60,60,60)',TabSelectedTitleColor:'rgb(0,0,0)',TabSelectedBGColor:"rgb(252,252,252)",TabMoveOnTitleColor:"rgb(0,0,0)",TabBGColor:"rgb(220,220,220)"},PageInfo:{Font:{Size:15,Name:"微软雅黑"},TextColor:"rgb(0,0,0)",BGColor:"rgba(180,180,180,0.5)",Mergin:{Left:5,Right:5,Top:4,Bottom:2}},DragRow:{Color:"rgba(190,190,190,0.8)",TextColor:'rgba(0,0, 0, 0.8)',MoveRowColor:'rgb(240,128,128)',SrcRowColor:'rgb(180,240,240)'},VScrollbar:{ScrollBarHeight:60,ButtonColor:"rgba(252,252,252,0.8)",BarColor:"rgba(168,168,168,0.9)",BorderColor:'rgba(180,180,180,0.9)',BGColor:"rgba(234,239,248,0.9)",BarWidth:{Size:12}}},//报价列表
|
|
6575
6580
|
this.TReport={BorderColor:'rgb(192,192,192)',//边框线
|
|
6576
6581
|
SelectedColor:"rgb(3,89,245)",//选中行
|
|
6577
6582
|
Header:{Color:"rgb(60,60,60)",//表头文字颜色
|
|
@@ -6595,7 +6600,7 @@ TextColor:"rgb(0,0,0)",Item:{Mergin:{Top:2,Bottom:0,Left:1,Right:1},//单元格
|
|
|
6595
6600
|
Font:{Size:15,Name:"微软雅黑"},BarMergin:{Top:2,Left:0,Right:0,Bottom:2},//单元格字体
|
|
6596
6601
|
NameFont:{Size:14,Name:"微软雅黑"},SymbolFont:{Size:12,Name:"微软雅黑"}}},//滚动条
|
|
6597
6602
|
this.ScrollBar={BorderColor:'rgb(192,192,192)',XSplitTextFont:12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',XSplitTextColor:"rgb(0,0,0)",XSplitLineColor:"rgba(0,0,0,0.8)",BGChart:{Color:"rgb(135,206,250)",LineWidth:1,AreaColor:"rgba(135,206,250,0.5)"},Slider:{DateFont:14*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',DateColor:'rgb(0,0,0)',BarColor:"rgb(207,207,207)",BarAreaColor:"rgba(232,232,232,0.65)"}},//自定义风格
|
|
6598
|
-
this.SetStyle=function(style){var T_SetButtonStyle=function T_SetButtonStyle(item,dest){if(!item)return;if(item.Color)dest.Color=item.Color;if(item.MoveOnColor)dest.MoveOnColor=item.MoveOnColor;if(item.SelectedColor)dest.SelectedColor=item.SelectedColor;if(item.Family)dest.Family=item.Family;if(item.Text)dest.Text=item.Text;if(IFrameSplitOperator.IsNumber(item.Size))dest.Size=item.Size;if(IFrameSplitOperator.IsNumber(item.MerginLeft))dest.MerginLeft=item.MerginLeft;};if(style.TooltipBGColor)this.TooltipBGColor=style.TooltipBGColor;if(style.TooltipAlpha)this.TooltipAlpha=style.TooltipAlpha;if(style.SelectRectBGColor)this.SelectRectBGColor=style.SelectRectBGColor;if(style.UpBarColor)this.UpBarColor=style.UpBarColor;if(style.DownBarColor)this.DownBarColor=style.DownBarColor;if(style.UnchagneBarColor)this.UnchagneBarColor=style.UnchagneBarColor;if(style.EmptyBarBGColor)this.EmptyBarBGColor=style.EmptyBarBGColor;if(style.HighLowBarColor)this.HighLowBarColor=style.HighLowBarColor;if(style.SplashScreen){var item=style.SplashScreen;if(item.BGColor)this.SplashScreen.BGColor=item.BGColor;if(item.Title)this.SplashScreen.Title=item.Title;if(item.TextColor)this.SplashScreen.TextColor=item.TextColor;if(item.Font)this.SplashScreen.Font=item.Font;}if(style.HLCArea){var item=style.HLCArea;if(item.HighLineColor)this.HLCArea.HighLineColor=item.HighLineColor;if(item.LowLineColor)this.HLCArea.LowLineColor=item.LowLineColor;if(item.CloseLineColor)this.HLCArea.CloseLineColor=item.CloseLineColor;if(item.UpAreaColor)this.HLCArea.UpAreaColor=item.UpAreaColor;if(item.DownAreaColor)this.HLCArea.DownAreaColor=item.DownAreaColor;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.HLCArea.LineWidth=item.LineWidth;}if(style.Minute){if(style.Minute.VolBarColor)this.Minute.VolBarColor=style.Minute.VolBarColor;if(style.Minute.VolTitleColor)this.Minute.VolTitleColor=style.Minute.VolTitleColor;if(style.Minute.PriceColor)this.Minute.PriceColor=style.Minute.PriceColor;if(IFrameSplitOperator.IsNumber(style.Minute.PriceLineWidth))this.Minute.PriceLineWidth=style.Minute.PriceLineWidth;if(style.Minute.AvPriceColor)this.Minute.AvPriceColor=style.Minute.AvPriceColor;if(style.Minute.AreaPriceColor)this.Minute.AreaPriceColor=style.Minute.AreaPriceColor;if(style.Minute.PositionColor)this.Minute.PositionColor=style.Minute.PositionColor;if(style.Minute.FrameSplitTextColor)this.Minute.FrameSplitTextColor=style.Minute.FrameSplitTextColor;if(style.Minute.Before){var item=style.Minute.Before;if(item.BGColor)this.Minute.Before.BGColor=item.BGColor;if(item.LineColor)this.Minute.Before.LineColor=item.LineColor;if(item.VolColor)this.Minute.Before.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.Before.AvPriceColor=item.AvPriceColor;if(item.CloseIcon)T_SetButtonStyle(item.CloseIcon,this.Minute.Before.CloseIcon);if(item.Point){if(item.Point.Color)this.Minute.Before.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.Before.Point.Radius=item.Point.Radius;}}if(style.Minute.After){var item=style.Minute.After;if(item.BGColor)this.Minute.After.BGColor=item.BGColor;if(item.LineColor)this.Minute.After.LineColor=item.LineColor;if(item.VolColor)this.Minute.After.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.After.AvPriceColor=item.AvPriceColor;if(item.Point){if(item.Point.Color)this.Minute.After.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.After.Point.Radius=item.Point.Radius;}}}if(style.DefaultTextColor)this.DefaultTextColor=style.DefaultTextColor;if(style.DefaultTextFont)this.DefaultTextFont=style.DefaultTextFont;if(style.TitleFont)this.TitleFont=style.TitleFont;if(style.IndexTitleBGColor)this.IndexTitleBGColor=style.IndexTitleBGColor;if(style.IndexTitleBorderColor)this.IndexTitleBorderColor=style.IndexTitleBorderColor;if(style.IndexTitleBorderMoveOnColor)this.IndexTitleBorderMoveOnColor=style.IndexTitleBorderMoveOnColor;if(style.IndexTitleColor)this.IndexTitleColor=style.IndexTitleColor;if(style.IndexTitleSelectedColor)this.IndexTitleSelectedColor=style.IndexTitleSelectedColor;if(style.OverlayIndexTitleBGColor)this.OverlayIndexTitleBGColor=style.OverlayIndexTitleBGColor;if(style.UpTextColor)this.UpTextColor=style.UpTextColor;if(style.DownTextColor)this.DownTextColor=style.DownTextColor;if(style.UnchagneTextColor)this.UnchagneTextColor=style.UnchagneTextColor;if(style.CloseLineColor)this.CloseLineColor=style.CloseLineColor;if(style.CloseLineAreaColor)this.CloseLineAreaColor=style.CloseLineAreaColor;if(style.CloseLineWidth)this.CloseLineWidth=style.CloseLineWidth;if(style.FrameBorderPen)this.FrameBorderPen=style.FrameBorderPen;if(style.MultiDayBorderPen)this.MultiDayBorderPen=style.MultiDayBorderPen;if(style.FrameSplitPen)this.FrameSplitPen=style.FrameSplitPen;if(style.FrameDotSplitPen)this.FrameDotSplitPen=style.FrameDotSplitPen;if(style.FrameSplitTextColor)this.FrameSplitTextColor=style.FrameSplitTextColor;if(style.FrameSplitTextFont)this.FrameSplitTextFont=style.FrameSplitTextFont;if(style.FrameTitleBGColor)this.FrameTitleBGColor=style.FrameTitleBGColor;if(style.SelFrameBorderColor)this.SelFrameBorderColor=style.SelFrameBorderColor;if(IFrameSplitOperator.IsNumber(style.IndexTitleMerginLeft))this.IndexTitleMerginLeft=style.IndexTitleMerginLeft;if(style.IndexTitle){var item=style.IndexTitle;if(item.UpDownArrow){var subItem=item.UpDownArrow;if(subItem.UpColor)this.IndexTitle.UpDownArrow.UpColor=subItem.UpColor;if(subItem.DownColor)this.IndexTitle.UpDownArrow.DownColor=subItem.DownColor;if(subItem.UnchangeColor)this.IndexTitle.UpDownArrow.UnchangeColor=subItem.UnchangeColor;}}if(style.Frame){if(style.Frame.XBottomOffset)this.Frame.XBottomOffset=style.Frame.XBottomOffset;if(style.Frame.YTopOffset)this.Frame.YTopOffset=style.Frame.YTopOffset;if(style.Frame.PercentageText){var item=style.Frame.PercentageText;if(item.PriceColor)this.Frame.PercentageText.PriceColor=item.PriceColor;if(item.PercentageColor)this.Frame.PercentageText.PercentageColor=item.PercentageColor;if(item.SplitColor)this.Frame.PercentageText.SplitColor=item.SplitColor;if(item.Font)this.Frame.PercentageText.Font=item.Font;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(IFrameSplitOperator.IsBool(style.IsDOMFrameTitle))this.IsDOMFrameTitle=style.IsDOMFrameTitle;if(style.FrameLatestPrice){var item=style.FrameLatestPrice;if(style.FrameLatestPrice.TextColor)this.FrameLatestPrice.TextColor=style.FrameLatestPrice.TextColor;if(style.FrameLatestPrice.UpBarColor)this.FrameLatestPrice.UpBarColor=style.FrameLatestPrice.UpBarColor;if(style.FrameLatestPrice.DownBarColor)this.FrameLatestPrice.DownBarColor=style.FrameLatestPrice.DownBarColor;if(style.FrameLatestPrice.UnchagneBarColor)this.FrameLatestPrice.UnchagneBarColor=style.FrameLatestPrice.UnchagneBarColor;if(style.FrameLatestPrice.BGAlpha)this.FrameLatestPrice.BGAlpha=style.FrameLatestPrice.BGAlpha;if(style.FrameLatestPrice.OverlayTextColor)this.FrameLatestPrice.OverlayTextColor=style.FrameLatestPrice.OverlayTextColor;if(item.EmptyBGColor)this.FrameLatestPrice.EmptyBGColor=item.EmptyBGColor;}if(style.OverlayFrame){var item=style.OverlayFrame;if(style.OverlayFrame.BolderPen)this.OverlayFrame.BolderPen=style.OverlayFrame.BolderPen;if(style.OverlayFrame.TitleColor)this.OverlayFrame.TitleColor=style.OverlayFrame.TitleColor;if(style.OverlayFrame.TitleFont)this.OverlayFrame.TitleFont=style.OverlayFrame.TitleFont;}if(style.CorssCursorBGColor)this.CorssCursorBGColor=style.CorssCursorBGColor;if(style.CorssCursorTextColor)this.CorssCursorTextColor=style.CorssCursorTextColor;if(style.CorssCursorTextFont)this.CorssCursorTextFont=style.CorssCursorTextFont;if(style.CorssCursorVPenColor)this.CorssCursorVPenColor=style.CorssCursorVPenColor;if(style.CorssCursorHPenColor)this.CorssCursorHPenColor=style.CorssCursorHPenColor;if(style.CorssCursorBorderColor)this.CorssCursorBorderColor=style.CorssCursorBorderColor;if(style.CorssCursorXRangeBGColor)this.CorssCursorXRangeBGColor=style.CorssCursorXRangeBGColor;if(style.CorssCursor&&style.CorssCursor.RightButton){var item=style.CorssCursor.RightButton;if(item.BGColor)this.CorssCursor.RightButton.BGColor=item.BGColor;if(item.PenColor)this.CorssCursor.RightButton.PenColor=item.PenColor;if(item.Icon)this.CorssCursor.RightButton.Icon=item.Icon;}if(style.KLine)this.KLine=style.KLine;if(style.VirtualKLine){var item=style.VirtualKLine;if(item.Color)this.VirtualKLine.Color=item.Color;if(item.LineDash)this.VirtualKLine.LineDash=item.LineDash;}if(style.PriceGapStyple){var item=style.PriceGapStyple;if(item.Line&&item.Line.Color)this.PriceGapStyple.Line.Color=item.Line.Color;if(item.Text){if(item.Text.Color)this.PriceGapStyple.Text.Color=item.Text.Color;if(item.Text.Font)this.PriceGapStyple.Text.Font=item.Text.Font;}}if(style.Index){if(style.Index.LineColor)this.Index.LineColor=style.Index.LineColor;if(style.Index.NotSupport)this.Index.NotSupport=style.Index.NotSupport;}if(style.ColorArray)this.ColorArray=style.ColorArray;if(style.DrawPicture){var item=style.DrawPicture;if(item.LineColor)this.DrawPicture.LineColor=item.LineColor;if(item.PointColor)this.DrawPicture.PointColor=item.PointColor;if(item.XYCoordinate)this.DrawPicture.XYCoordinate=item.XYCoordinate;if(IFrameSplitOperator.IsNumber(item.PointType))this.DrawPicture.PointType=item.PointType;if(IFrameSplitOperator.IsBool(item.IsShowPoint))this.DrawPicture.IsShowPoint=item.IsShowPoint;}if(style.TooltipPaint){if(style.TooltipPaint.BGColor)this.TooltipPaint.BGColor=style.TooltipPaint.BGColor;if(style.TooltipPaint.BorderColor)this.TooltipPaint.BorderColor=style.TooltipPaint.BorderColor;if(style.TooltipPaint.TitleColor)this.TooltipPaint.TitleColor=style.TooltipPaint.TitleColor;if(style.TooltipPaint.TitleFont)this.TooltipPaint.TitleFont=style.TooltipPaint.TitleFont;if(style.TooltipPaint.DateTimeColor)this.TooltipPaint.DateTimeColor=style.TooltipPaint.DateTimeColor;if(style.TooltipPaint.VolColor)this.TooltipPaint.VolColor=style.TooltipPaint.VolColor;if(style.TooltipPaint.AmountColor)this.TooltipPaint.AmountColor=style.TooltipPaint.AmountColor;}if(style.PCTooltipPaint){var item=style.PCTooltipPaint;if(item.BGColor)this.PCTooltipPaint.BGColor=item.BGColor;if(item.BorderColor)this.PCTooltipPaint.BorderColor=item.BorderColor;if(item.TitleColor)this.PCTooltipPaint.TitleColor=item.TitleColor;if(item.TitleFont)this.PCTooltipPaint.TitleFont=item.TitleFont;if(item.DateTimeColor)this.PCTooltipPaint.DateTimeColor=item.DateTimeColor;if(item.VolColor)this.PCTooltipPaint.VolColor=item.VolColor;if(item.AmountColor)this.PCTooltipPaint.AmountColor=item.AmountColor;}if(style.MinuteInfo){var item=style.MinuteInfo;if(style.MinuteInfo.TextColor)this.MinuteInfo.TextColor=style.MinuteInfo.TextColor;if(style.MinuteInfo.Font)this.MinuteInfo.Font=style.MinuteInfo.Font;if(style.MinuteInfo.PointColor)this.MinuteInfo.PointColor=style.MinuteInfo.PointColor;if(style.MinuteInfo.LineColor)this.MinuteInfo.LineColor=style.MinuteInfo.LineColor;if(style.MinuteInfo.TextBGColor)this.MinuteInfo.TextBGColor=style.MinuteInfo.TextBGColor;if(IFrameSplitOperator.IsNumber(item.PointRadius))this.MinuteInfo.PointRadius=item.PointRadius;}if(style.Title){if(style.Title.TradeIndexColor)this.Title.TradeIndexColor=style.Title.TradeIndexColor;if(style.Title.ColorIndexColor)this.Title.ColorIndexColor=style.Title.ColorIndexColor;if(style.Title.VolColor)this.Title.VolColor=style.Title.VolColor;if(style.Title.AmountColor)this.Title.AmountColor=style.Title.AmountColor;if(style.Title.DateTimeColor)this.Title.DateTimeColor=style.Title.DateTimeColor;if(style.Title.NameColor)this.Title.NameColor=style.Title.NameColor;if(style.Title.SettingColor)this.Title.SettingColor=style.Title.SettingColor;if(style.Title.TurnoverRateColor)this.Title.TurnoverRateColor=style.Title.TurnoverRateColor;if(style.Title.PositionColor)this.Title.PositionColor=style.Title.PositionColor;}if(style.DRAWICON){if(style.DRAWICON.Icon){var item=style.DRAWICON.Icon;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Icon.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Icon.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Icon.Zoom=item.Zoom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Icon.YOffset=item.YOffset;}if(style.DRAWICON.Text){var item=style.DRAWICON.Text;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Text.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Text.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Text.Zoom=item.Zoom;if(item.FontName)this.DRAWICON.Text.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Text.YOffset=item.YOffset;}}if(style.DRAWTEXT){var item=style.DRAWTEXT;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.MinSize=item.MinSize;if(item.Zoom)this.DRAWTEXT.Zoom=item.Zoom;if(item.FontName)this.DRAWTEXT.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWTEXT.YOffset=item.YOffset;}if(style.DRAWTEXT_FIX){var item=style.DRAWTEXT_FIX;if(item.Font)this.DRAWTEXT_FIX.Font=item.Font;}if(style.DRAWNUMBER_FIX){var item=style.DRAWNUMBER_FIX;if(item.Font)this.DRAWNUMBER_FIX.Font=item.Font;}if(style.DRAWNUMBER){var item=style.DRAWNUMBER;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWNUMBER.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWNUMBER.MinSize=item.MinSize;if(item.Zoom)this.DRAWNUMBER.Zoom=item.Zoom;if(item.FontName)this.DRAWNUMBER.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWNUMBER.YOffset=item.YOffset;}if(style.DRAWABOVE){var item=style.DRAWABOVE;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWABOVE.YOffset=item.YOffset;}if(style.DOTLINE)this.DOTLINE=style.DOTLINE;if(style.DRAWSL)this.DOTLINE=style.DRAWSL;if(style.DragSubFrameBorder)this.DragSubFrameBorder=style.DragSubFrameBorder;if(style.DepthMapPaint){var item=style.DepthMapPaint;if(item.LineColor)this.DepthMapPaint.LineColor=item.LineColor;if(item.AreaColor)this.DepthMapPaint.AreaColor=item.AreaColor;if(item.TextColor)this.DepthMapPaint.TextColor=item.TextColor;if(item.TextBGColor)this.DepthMapPaint.TextBGColor=item.TextBGColor;}if(style.KLineYAxisBGPaint){var item=style.KLineYAxisBGPaint;if(item.Font)this.KLineYAxisBGPaint.Font=item.Font;if(item.LineColor)this.KLineYAxisBGPaint.LineColor=item.LineColor;if(item.DiffValutTextColor)this.KLineYAxisBGPaint.DiffValutTextColor=item.DiffValutTextColor;if(item.DiffValueBGColor)this.KLineYAxisBGPaint.DiffValueBGColor=item.DiffValueBGColor;}if(style.StockChip){var item=style.StockChip;if(item.InfoColor)this.StockChip.InfoColor=item.InfoColor;if(item.DayInfoColor)this.StockChip.DayInfoColor=item.DayInfoColor;if(item.DefaultButton)T_SetButtonStyle(item.DefaultButton,this.StockChip.DefaultButton);if(item.LongButton)T_SetButtonStyle(item.LongButton,this.StockChip.LongButton);if(item.RecentButton)T_SetButtonStyle(item.RecentButton,this.StockChip.RecentButton);}if(style.DepthChart){var item=style.DepthChart;if(item.BidColor){if(item.BidColor.Line)this.DepthChart.BidColor.Line=item.BidColor.Line;if(item.BidColor.Area)this.DepthChart.BidColor.Area=item.BidColor.Area;}if(item.AskColor){if(item.AskColor.Line)this.DepthChart.AskColor.Line=item.AskColor.Line;if(item.AskColor.Area)this.DepthChart.AskColor.Area=item.AskColor.Area;}if(item.LineWidth)this.DepthChart.LineWidth=item.LineWidth;}if(style.DepthCorss){var item=style.DepthCorss;if(item.BidColor){if(item.BidColor.Line)this.DepthCorss.BidColor.Line=item.BidColor.Line;}if(item.AskColor){if(item.AskColor.Line)this.DepthCorss.AskColor.Line=item.AskColor.Line;}if(item.LineWidth)this.DepthCorss.LineWidth=item.LineWidth;if(item.LineDash)this.DepthCorss.LineDash=item.LineDash;if(item.Tooltip){var tooltip=item.Tooltip;if(tooltip.BGColor)this.DepthCorss.Tooltip.BGColor=tooltip.BGColor;if(tooltip.TextColor)this.DepthCorss.Tooltip.TextColor=tooltip.TextColor;if(tooltip.Font)this.DepthCorss.Tooltip.Font=tooltip.Font;if(tooltip.LineHeight)this.DepthCorss.Tooltip.LineHeight=tooltip.LineHeight;var border=tooltip.Border;if(IFrameSplitOperator.IsNumber(border.Top))this.DepthCorss.Tooltip.Border.Top=border.Top;if(IFrameSplitOperator.IsNumber(border.Bottom))this.DepthCorss.Tooltip.Border.Bottom=border.Bottom;if(IFrameSplitOperator.IsNumber(border.Left))this.DepthCorss.Tooltip.Border.Left=border.Left;if(IFrameSplitOperator.IsNumber(border.Right))this.DepthCorss.Tooltip.Border.Right=border.Right;if(IFrameSplitOperator.IsNumber(border.ItemSpace))this.DepthCorss.Tooltip.Border.ItemSpace=border.ItemSpace;}}if(style.CIRCLEDOT){var item=style.CIRCLEDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.CIRCLEDOT.Radius=item.Radius;}if(style.POINTDOT){var item=style.POINTDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.POINTDOT.Radius=item.Radius;}if(style.RectSelect){var item=style.RectSelect;if(item.LineColor)this.RectSelect.LineColor=item.LineColor;if(item.LineWidth>0)this.RectSelect.LineWidth=item.LineWidth;if(item.LineDotted)this.RectSelect.LineDotted=item.LineDotted;if(item.AreaColor)this.RectSelect.AreaColor=item.AreaColor;if(item.SubAreaColor)this.RectSelect.SubAreaColor=item.SubAreaColor;if(item.RangeTextColor)this.RectSelect.RangeTextColor=item.RangeTextColor;if(item.RangeTextFont)this.RectSelect.RangeTextFont=item.RangeTextFont;if(item.RangeTextBGColor)this.RectSelect.RangeTextBGColor=item.RangeTextBGColor;if(item.RangeTextSubColor)this.RectSelect.RangeTextSubColor=item.RangeTextSubColor;if(item.RangeTextSubFont)this.RectSelect.RangeTextSubFont=item.RangeTextSubFont;if(item.RangeTextSubBGColor)this.RectSelect.RangeTextSubBGColor=item.RangeTextSubBGColor;}if(style.OrderFlow){item=style.OrderFlow;if(item.UpColor)this.OrderFlow.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow.UnchagneColor=item.UnchagneColor;if(item.Text)this.OrderFlow.Text=item.Text;if(item.Line)this.OrderFlow.Line=item.Line;}if(style.OrderFlow_Style2){item=style.OrderFlow_Style2;if(item.UpColor)this.OrderFlow_Style2.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow_Style2.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow_Style2.UnchagneColor=item.UnchagneColor;if(IFrameSplitOperator.IsNumber(item.BarWidth))this.OrderFlow_Style2.BarWidth=item.BarWidth;}if(style.ChartOX){var item=style.ChartOX;if(item.Family)this.ChartOX.Family=item.Family;if(item.Up)this.ChartOX.Up=item.Up;if(item.Down)this.ChartOX.Down=item.Down;if(item.SquareLineColor)this.ChartOX.SquareLineColor=item.SquareLineColor;}if(style.DealList){var item=style.DealList;if(item.BorderColor)this.DealList.BorderColor=item.BorderColor;if(item.UpTextColor)this.DealList.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.DealList.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.DealList.UnchagneTextColor=item.UnchagneTextColor;if(item.CloseLineColor)this.DealList.CloseLineColor=item.CloseLineColor;if(item.Header){var header=item.Header;if(header.Color)this.DealList.Header.Color=header.Color;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.DealList.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Header.Font.Size=font.Size;}}if(item.Row){var row=item.Row;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.DealList.Row.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Row.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Row.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Row.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.BarMergin.Bottom=mergin.Bottom;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Vol)this.DealList.FieldColor.Vol=filed.Vol;if(filed.Time)this.DealList.FieldColor.Time=filed.Time;if(filed.Deal)this.DealList.FieldColor.Deal=filed.Deal;if(filed.Index)this.DealList.FieldColor.Index=filed.Index;if(filed.BarTitle)this.DealList.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.DealList.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.DealList.FieldColor.Bar[i]=filed.Bar[i];}}}}if(style.Report){var item=style.Report;if(item.BorderColor)this.Report.BorderColor=item.BorderColor;if(item.UpTextColor)this.Report.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.Report.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.Report.UnchagneTextColor=item.UnchagneTextColor;if(item.BorderColor)this.Report.SelectedColor=item.SelectedColor;if(item.CloseLine){var closeLine=item.CloseLine;if(closeLine.CloseColor)this.Report.CloseLine.CloseColor=closeLine.CloseColor;if(closeLine.YCloseColor)this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;if(closeLine.AreaColor)this.Report.CloseLine.AreaColor=closeLine.AreaColor;}if(item.KLine){var kline=item.KLine;if(kline.UpColor)this.Report.KLine.UpColor=kline.UpColor;if(kline.DownColor)this.Report.KLine.DownColor=kline.DownColor;if(kline.UnchagneColor)this.Report.KLine.UnchagneColor=kline.UnchagneColor;if(IFrameSplitOperator.IsNumber(kline.DataWidth))this.Report.KLine.DataWidth=kline.DataWidth;if(IFrameSplitOperator.IsNumber(kline.DistanceWidth))this.Report.KLine.DistanceWidth=kline.DistanceWidth;}if(item.Header){var header=item.Header;if(header.Color)this.Report.Header.Color=header.Color;if(header.SortColor)this.Report.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.Report.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Header.Font.Size=font.Size;}}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.Report.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.BarMergin.Bottom=mergin.Bottom;}if(row.NameFont){var font=row.NameFont;if(font.Name)this.Report.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)this.Report.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.SymbolFont.Size=font.Size;}}if(item.FixedItem){var row=item.FixedItem;if(row.Font){var font=row.Font;if(font.Name)this.Report.FixedItem.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.FixedItem.Font.Size=font.Size;}}if(item.LimitBorder){var limit=item.LimitBorder;if(limit.Color)this.Report.LimitBorder.Color=limit.Color;if(limit.Mergin){var mergin=limit.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.LimitBorder.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.LimitBorder.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.LimitBorder.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;}}if(item.LimitColor){var limit=item.LimitColor;if(limit.UpColor)this.Report.LimitColor.UpColor=limit.UpColor;if(limit.DownColor)this.Report.LimitColor.DownColor=limit.DownColor;if(limit.TextColor)this.Report.LimitColor.UpColor=limit.TextColor;}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)this.Report.FieldColor.Name=filed.Name;if(filed.Symbol)this.Report.FieldColor.Symbol=filed.Symbol;if(filed.Vol)this.Report.FieldColor.Vol=filed.Vol;if(filed.Amount)this.Report.FieldColor.Amount=filed.Amount;if(filed.Index)this.Report.FieldColor.Index=filed.Index;if(filed.BarTitle)this.Report.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.Report.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.Report.FieldColor.Bar[i]=filed.Bar[i];}}}if(item.Tab){var tab=item.Tab;if(tab.Font){var font=tab.Font;if(font.Name)this.Report.Tab.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Tab.Font.Size=font.Size;}if(IFrameSplitOperator.IsNumber(tab.ScrollBarWidth))this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;if(tab.ButtonColor)this.Report.Tab.ButtonColor=tab.ButtonColor;if(tab.BarColor)this.Report.Tab.BarColor=tab.BarColor;if(tab.BorderColor)this.Report.Tab.BorderColor=tab.BorderColor;if(tab.TabTitleColor)this.Report.Tab.TabTitleColor=tab.TabTitleColor;if(tab.TabSelectedTitleColor)this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;if(tab.TabSelectedBGColor)this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;if(tab.TabMoveOnTitleColor)this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;if(tab.TabBGColor)this.Report.Tab.TabBGColor=tab.TabBGColor;}if(item.PageInfo){var pageinfo=item.PageInfo;if(pageinfo.Font){var font=pageinfo.Font;if(font.Name)this.Report.PageInfo.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.PageInfo.Font.Size=font.Size;}if(pageinfo.TextColor)this.Report.PageInfo.TextColor=pageinfo.TextColor;if(pageinfo.BGColor)this.Report.PageInfo.BGColor=pageinfo.BGColor;if(pageinfo.Mergin){var mergin=pageinfo.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.PageInfo.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.PageInfo.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.PageInfo.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;}}if(item.DragRow){var dragRow=item.DragRow;if(dragRow.Color)this.Report.DragRow.Color=dragRow.Color;if(dragRow.TextColor)this.Report.DragRow.TextColor=dragRow.TextColor;if(dragRow.MoveRowColor)this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;if(dragRow.SrcRowColor)this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;}}if(style.TReport)this.SetTReportStyle(style.TReport);if(style.SelectedChart){var item=style.SelectedChart;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.SelectedChart.LineWidth=item.LineWidth;if(IFrameSplitOperator.IsNumber(item.Radius))this.SelectedChart.Radius=item.Radius;if(IFrameSplitOperator.IsNumber(item.MinSpace))this.SelectedChart.MinSpace=item.MinSpace;if(item.LineColor)this.SelectedChart.LineColor=item.LineColor;if(item.LineColor)this.SelectedChart.BGColor=item.BGColor;}if(style.DragMovePaint){var item=style.DragMovePaint;if(item.TextColor)this.DragMovePaint.TextColor=item.TextColor;if(item.Font)this.DragMovePaint.Font=item.Font;}if(style.SessionBreaksPaint){var item=style.SessionBreaksPaint;if(IFrameSplitOperator.IsNonEmptyArray(item.BGColor))this.SessionBreaksPaint.BGColor=item.BGColor.slice();if(item.SplitLine){var subItem=item.SplitLine;if(subItem.Color)this.SessionBreaksPaint.SplitLine.Color=subItem.Color;if(IFrameSplitOperator.IsNumber(subItem.Width))this.SessionBreaksPaint.SplitLine.Width=subItem.Width;this.SessionBreaksPaint.SplitLine.Dash=subItem.Dash;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(style.Buttons){var buttons=style.Buttons;T_SetButtonStyle(buttons.CloseOverlayIndex,this.Buttons.CloseOverlayIndex);T_SetButtonStyle(buttons.CloseWindow,this.Buttons.CloseWindow);T_SetButtonStyle(buttons.ChangeIndex,this.Buttons.ChangeIndex);T_SetButtonStyle(buttons.OverlayIndex,this.Buttons.OverlayIndex);T_SetButtonStyle(buttons.ModifyIndexParam,this.Buttons.ModifyIndexParam);T_SetButtonStyle(buttons.MaxMinWindow,this.Buttons.MaxMinWindow);T_SetButtonStyle(buttons.TitleWindow,this.Buttons.TitleWindow);T_SetButtonStyle(buttons.ExportData,this.Buttons.ExportData);}if(style.ChartDrawVolProfile){var item=style.ChartDrawVolProfile;if(item.UpVolColor)this.ChartDrawVolProfile.UpVolColor=item.UpVolColor;if(item.DownVolColor)this.ChartDrawVolProfile.DownVolColor=item.DownVolColor;if(item.AreaUpColor)this.ChartDrawVolProfile.AreaUpColor=item.AreaUpColor;if(item.AreaDonwColor)this.ChartDrawVolProfile.AreaDonwColor=item.AreaDonwColor;if(item.BGColor)this.ChartDrawVolProfile.BGColor=item.BGColor;if(item.BorderColor)this.ChartDrawVolProfile.BorderColor=item.BorderColor;if(item.VolLineColor)this.ChartDrawVolProfile.VolLineColor=item.VolLineColor;if(item.Text){if(item.Text.Color)this.ChartDrawVolProfile.Text.Color=item.Text.Color;if(item.Text.Family)this.ChartDrawVolProfile.Text.Family=item.Text.Family;if(IFrameSplitOperator.IsNumber(item.Text.FontMaxSize))this.ChartDrawVolProfile.Text.FontMaxSize=item.Text.FontMaxSize;if(IFrameSplitOperator.IsNumber(item.Text.FontMinSize))this.ChartDrawVolProfile.Text.FontMinSize=item.Text.FontMinSize;}}if(style.DisableLogo===true){if(this.FrameLogo)this.FrameLogo.Text=null;}if(style.ScrollBar){var item=style.ScrollBar;if(item.BorderColor)this.ScrollBar.BorderColor=item.BorderColor;if(item.XSplitTextFont)this.ScrollBar.XSplitTextFont=item.XSplitTextFont;if(item.XSplitTextColor)this.ScrollBar.XSplitTextColor=item.XSplitTextColor;if(item.XSplitLineColor)this.ScrollBar.XSplitLineColor=item.XSplitLineColor;if(item.Slider){var subItem=item.Slider;if(subItem.DateFont)this.ScrollBar.Slider.DateFont=subItem.DateFont;if(subItem.DateColor)this.ScrollBar.Slider.DateColor=subItem.DateColor;if(subItem.BarColor)this.ScrollBar.Slider.BarColor=subItem.BarColor;if(subItem.BarAreaColor)this.ScrollBar.Slider.BarAreaColor=subItem.BarAreaColor;}if(item.BGChart){var subItem=item.BGChart;if(subItem.Color)this.ScrollBar.BGChart.Color=subItem.Color;if(subItem.AreaColor)this.ScrollBar.BGChart.AreaColor=subItem.AreaColor;if(IFrameSplitOperator.IsPlusNumber(subItem.LineWidth))this.ScrollBar.BGChart.LineWidth=subItem.LineWidth;}}};this.SetTReportStyle=function(style){var item=style;var dest=this.TReport;if(item.BorderColor)dest.BorderColor=item.BorderColor;if(item.UpTextColor)dest.UpTextColor=item.UpTextColor;if(item.DownTextColor)dest.DownTextColor=item.DownTextColor;if(item.UnchangeTextColor)dest.UnchangeTextColor=item.UnchangeTextColor;if(item.BorderColor)dest.SelectedColor=item.SelectedColor;if(item.UpBGColor)dest.UpBGColor=item.UpBGColor;if(item.DownBGColor)dest.DownBGColor=item.DownBGColor;if(item.Header){var header=item.Header;if(header.Color)dest.Header.Color=header.Color;if(header.SortColor)dest.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)dest.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Header.Font.Size=font.Size;}}if(item.CenterItem){var cell=item.CenterItem;if(cell.TextColor)dest.CenterItem.TextColor=cell.TextColor;if(cell.BaseTextColor)dest.CenterItem.BaseTextColor=cell.BaseTextColor;if(cell.BGColor)dest.CenterItem.BGColor=cell.BGColor;}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)dest.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.Font.Size=font.Size;}if(row.NameFont){var font=row.NameFont;if(font.Name)dest.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)dest.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.SymbolFont.Size=font.Size;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)dest.FieldColor.Name=filed.Name;if(filed.Symbol)dest.FieldColor.Symbol=filed.Symbol;if(filed.Vol)dest.FieldColor.Vol=filed.Vol;if(filed.Amount)dest.FieldColor.Amount=filed.Amount;if(filed.Index)dest.FieldColor.Index=filed.Index;if(filed.Text)dest.FieldColor.Text=filed.Text;if(filed.Position)dest.FieldColor.Position=filed.Position;}if(item.MarkBorder){var subIem=item.MarkBorder;if(subIem.MaxPositionColor)dest.MarkBorder.MaxPositionColor=subIem.MaxPositionColor;}};}var g_JSChartResource=new JSChartResource();/////////////////////////////////////////////////////////////////////////////////
|
|
6603
|
+
this.SetStyle=function(style){var T_SetButtonStyle=function T_SetButtonStyle(item,dest){if(!item)return;if(item.Color)dest.Color=item.Color;if(item.MoveOnColor)dest.MoveOnColor=item.MoveOnColor;if(item.SelectedColor)dest.SelectedColor=item.SelectedColor;if(item.Family)dest.Family=item.Family;if(item.Text)dest.Text=item.Text;if(IFrameSplitOperator.IsNumber(item.Size))dest.Size=item.Size;if(IFrameSplitOperator.IsNumber(item.MerginLeft))dest.MerginLeft=item.MerginLeft;};if(style.TooltipBGColor)this.TooltipBGColor=style.TooltipBGColor;if(style.TooltipAlpha)this.TooltipAlpha=style.TooltipAlpha;if(style.SelectRectBGColor)this.SelectRectBGColor=style.SelectRectBGColor;if(style.UpBarColor)this.UpBarColor=style.UpBarColor;if(style.DownBarColor)this.DownBarColor=style.DownBarColor;if(style.UnchagneBarColor)this.UnchagneBarColor=style.UnchagneBarColor;if(style.EmptyBarBGColor)this.EmptyBarBGColor=style.EmptyBarBGColor;if(style.HighLowBarColor)this.HighLowBarColor=style.HighLowBarColor;if(style.SplashScreen){var item=style.SplashScreen;if(item.BGColor)this.SplashScreen.BGColor=item.BGColor;if(item.Title)this.SplashScreen.Title=item.Title;if(item.TextColor)this.SplashScreen.TextColor=item.TextColor;if(item.Font)this.SplashScreen.Font=item.Font;}if(style.HLCArea){var item=style.HLCArea;if(item.HighLineColor)this.HLCArea.HighLineColor=item.HighLineColor;if(item.LowLineColor)this.HLCArea.LowLineColor=item.LowLineColor;if(item.CloseLineColor)this.HLCArea.CloseLineColor=item.CloseLineColor;if(item.UpAreaColor)this.HLCArea.UpAreaColor=item.UpAreaColor;if(item.DownAreaColor)this.HLCArea.DownAreaColor=item.DownAreaColor;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.HLCArea.LineWidth=item.LineWidth;}if(style.Minute){if(style.Minute.VolBarColor)this.Minute.VolBarColor=style.Minute.VolBarColor;if(style.Minute.VolTitleColor)this.Minute.VolTitleColor=style.Minute.VolTitleColor;if(style.Minute.PriceColor)this.Minute.PriceColor=style.Minute.PriceColor;if(IFrameSplitOperator.IsNumber(style.Minute.PriceLineWidth))this.Minute.PriceLineWidth=style.Minute.PriceLineWidth;if(style.Minute.AvPriceColor)this.Minute.AvPriceColor=style.Minute.AvPriceColor;if(style.Minute.AreaPriceColor)this.Minute.AreaPriceColor=style.Minute.AreaPriceColor;if(style.Minute.PositionColor)this.Minute.PositionColor=style.Minute.PositionColor;if(style.Minute.FrameSplitTextColor)this.Minute.FrameSplitTextColor=style.Minute.FrameSplitTextColor;if(style.Minute.Before){var item=style.Minute.Before;if(item.BGColor)this.Minute.Before.BGColor=item.BGColor;if(item.LineColor)this.Minute.Before.LineColor=item.LineColor;if(item.VolColor)this.Minute.Before.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.Before.AvPriceColor=item.AvPriceColor;if(item.CloseIcon)T_SetButtonStyle(item.CloseIcon,this.Minute.Before.CloseIcon);if(item.Point){if(item.Point.Color)this.Minute.Before.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.Before.Point.Radius=item.Point.Radius;}}if(style.Minute.After){var item=style.Minute.After;if(item.BGColor)this.Minute.After.BGColor=item.BGColor;if(item.LineColor)this.Minute.After.LineColor=item.LineColor;if(item.VolColor)this.Minute.After.VolColor=item.VolColor;if(item.AvPriceColor)this.Minute.After.AvPriceColor=item.AvPriceColor;if(item.Point){if(item.Point.Color)this.Minute.After.Point.Color=item.Point.Color;if(item.Point.Radius)this.Minute.After.Point.Radius=item.Point.Radius;}}}if(style.DefaultTextColor)this.DefaultTextColor=style.DefaultTextColor;if(style.DefaultTextFont)this.DefaultTextFont=style.DefaultTextFont;if(style.TitleFont)this.TitleFont=style.TitleFont;if(style.IndexTitleBGColor)this.IndexTitleBGColor=style.IndexTitleBGColor;if(style.IndexTitleBorderColor)this.IndexTitleBorderColor=style.IndexTitleBorderColor;if(style.IndexTitleBorderMoveOnColor)this.IndexTitleBorderMoveOnColor=style.IndexTitleBorderMoveOnColor;if(IFrameSplitOperator.IsNumber(style.IndexTitleBorderStyle))this.IndexTitleBorderStyle=style.IndexTitleBorderStyle;if(style.IndexTitleColor)this.IndexTitleColor=style.IndexTitleColor;if(style.IndexTitleSelectedColor)this.IndexTitleSelectedColor=style.IndexTitleSelectedColor;if(style.OverlayIndexTitleBGColor)this.OverlayIndexTitleBGColor=style.OverlayIndexTitleBGColor;if(style.UpTextColor)this.UpTextColor=style.UpTextColor;if(style.DownTextColor)this.DownTextColor=style.DownTextColor;if(style.UnchagneTextColor)this.UnchagneTextColor=style.UnchagneTextColor;if(style.CloseLineColor)this.CloseLineColor=style.CloseLineColor;if(style.CloseLineAreaColor)this.CloseLineAreaColor=style.CloseLineAreaColor;if(style.CloseLineWidth)this.CloseLineWidth=style.CloseLineWidth;if(style.FrameBorderPen)this.FrameBorderPen=style.FrameBorderPen;if(style.MultiDayBorderPen)this.MultiDayBorderPen=style.MultiDayBorderPen;if(style.FrameSplitPen)this.FrameSplitPen=style.FrameSplitPen;if(style.FrameDotSplitPen)this.FrameDotSplitPen=style.FrameDotSplitPen;if(style.FrameSplitTextColor)this.FrameSplitTextColor=style.FrameSplitTextColor;if(style.FrameSplitTextFont)this.FrameSplitTextFont=style.FrameSplitTextFont;if(style.FrameTitleBGColor)this.FrameTitleBGColor=style.FrameTitleBGColor;if(style.SelFrameBorderColor)this.SelFrameBorderColor=style.SelFrameBorderColor;if(IFrameSplitOperator.IsNumber(style.IndexTitleMerginLeft))this.IndexTitleMerginLeft=style.IndexTitleMerginLeft;if(style.IndexTitle){var item=style.IndexTitle;if(item.UpDownArrow){var subItem=item.UpDownArrow;if(subItem.UpColor)this.IndexTitle.UpDownArrow.UpColor=subItem.UpColor;if(subItem.DownColor)this.IndexTitle.UpDownArrow.DownColor=subItem.DownColor;if(subItem.UnchangeColor)this.IndexTitle.UpDownArrow.UnchangeColor=subItem.UnchangeColor;}}if(style.Frame){if(style.Frame.XBottomOffset)this.Frame.XBottomOffset=style.Frame.XBottomOffset;if(style.Frame.YTopOffset)this.Frame.YTopOffset=style.Frame.YTopOffset;if(style.Frame.PercentageText){var item=style.Frame.PercentageText;if(item.PriceColor)this.Frame.PercentageText.PriceColor=item.PriceColor;if(item.PercentageColor)this.Frame.PercentageText.PercentageColor=item.PercentageColor;if(item.SplitColor)this.Frame.PercentageText.SplitColor=item.SplitColor;if(item.Font)this.Frame.PercentageText.Font=item.Font;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(IFrameSplitOperator.IsBool(style.IsDOMFrameTitle))this.IsDOMFrameTitle=style.IsDOMFrameTitle;if(style.FrameLatestPrice){var item=style.FrameLatestPrice;if(style.FrameLatestPrice.TextColor)this.FrameLatestPrice.TextColor=style.FrameLatestPrice.TextColor;if(style.FrameLatestPrice.UpBarColor)this.FrameLatestPrice.UpBarColor=style.FrameLatestPrice.UpBarColor;if(style.FrameLatestPrice.DownBarColor)this.FrameLatestPrice.DownBarColor=style.FrameLatestPrice.DownBarColor;if(style.FrameLatestPrice.UnchagneBarColor)this.FrameLatestPrice.UnchagneBarColor=style.FrameLatestPrice.UnchagneBarColor;if(style.FrameLatestPrice.BGAlpha)this.FrameLatestPrice.BGAlpha=style.FrameLatestPrice.BGAlpha;if(style.FrameLatestPrice.OverlayTextColor)this.FrameLatestPrice.OverlayTextColor=style.FrameLatestPrice.OverlayTextColor;if(item.EmptyBGColor)this.FrameLatestPrice.EmptyBGColor=item.EmptyBGColor;}if(style.OverlayFrame){var item=style.OverlayFrame;if(style.OverlayFrame.BolderPen)this.OverlayFrame.BolderPen=style.OverlayFrame.BolderPen;if(style.OverlayFrame.TitleColor)this.OverlayFrame.TitleColor=style.OverlayFrame.TitleColor;if(style.OverlayFrame.TitleFont)this.OverlayFrame.TitleFont=style.OverlayFrame.TitleFont;}if(style.CorssCursorBGColor)this.CorssCursorBGColor=style.CorssCursorBGColor;if(style.CorssCursorTextColor)this.CorssCursorTextColor=style.CorssCursorTextColor;if(style.CorssCursorTextFont)this.CorssCursorTextFont=style.CorssCursorTextFont;if(style.CorssCursorVPenColor)this.CorssCursorVPenColor=style.CorssCursorVPenColor;if(style.CorssCursorHPenColor)this.CorssCursorHPenColor=style.CorssCursorHPenColor;if(style.CorssCursorBorderColor)this.CorssCursorBorderColor=style.CorssCursorBorderColor;if(style.CorssCursorXRangeBGColor)this.CorssCursorXRangeBGColor=style.CorssCursorXRangeBGColor;if(style.CorssCursor&&style.CorssCursor.RightButton){var item=style.CorssCursor.RightButton;if(item.BGColor)this.CorssCursor.RightButton.BGColor=item.BGColor;if(item.PenColor)this.CorssCursor.RightButton.PenColor=item.PenColor;if(item.Icon)this.CorssCursor.RightButton.Icon=item.Icon;}if(style.KLine)this.KLine=style.KLine;if(style.VirtualKLine){var item=style.VirtualKLine;if(item.Color)this.VirtualKLine.Color=item.Color;if(item.LineDash)this.VirtualKLine.LineDash=item.LineDash;}if(style.PriceGapStyple){var item=style.PriceGapStyple;if(item.Line&&item.Line.Color)this.PriceGapStyple.Line.Color=item.Line.Color;if(item.Text){if(item.Text.Color)this.PriceGapStyple.Text.Color=item.Text.Color;if(item.Text.Font)this.PriceGapStyple.Text.Font=item.Text.Font;}}if(style.Index){if(style.Index.LineColor)this.Index.LineColor=style.Index.LineColor;if(style.Index.NotSupport)this.Index.NotSupport=style.Index.NotSupport;}if(style.ColorArray)this.ColorArray=style.ColorArray;if(style.DrawPicture){var item=style.DrawPicture;if(item.LineColor)this.DrawPicture.LineColor=item.LineColor;if(item.PointColor)this.DrawPicture.PointColor=item.PointColor;if(item.XYCoordinate)this.DrawPicture.XYCoordinate=item.XYCoordinate;if(IFrameSplitOperator.IsNumber(item.PointType))this.DrawPicture.PointType=item.PointType;if(IFrameSplitOperator.IsBool(item.IsShowPoint))this.DrawPicture.IsShowPoint=item.IsShowPoint;}if(style.TooltipPaint){if(style.TooltipPaint.BGColor)this.TooltipPaint.BGColor=style.TooltipPaint.BGColor;if(style.TooltipPaint.BorderColor)this.TooltipPaint.BorderColor=style.TooltipPaint.BorderColor;if(style.TooltipPaint.TitleColor)this.TooltipPaint.TitleColor=style.TooltipPaint.TitleColor;if(style.TooltipPaint.TitleFont)this.TooltipPaint.TitleFont=style.TooltipPaint.TitleFont;if(style.TooltipPaint.DateTimeColor)this.TooltipPaint.DateTimeColor=style.TooltipPaint.DateTimeColor;if(style.TooltipPaint.VolColor)this.TooltipPaint.VolColor=style.TooltipPaint.VolColor;if(style.TooltipPaint.AmountColor)this.TooltipPaint.AmountColor=style.TooltipPaint.AmountColor;}if(style.PCTooltipPaint){var item=style.PCTooltipPaint;if(item.BGColor)this.PCTooltipPaint.BGColor=item.BGColor;if(item.BorderColor)this.PCTooltipPaint.BorderColor=item.BorderColor;if(item.TitleColor)this.PCTooltipPaint.TitleColor=item.TitleColor;if(item.TitleFont)this.PCTooltipPaint.TitleFont=item.TitleFont;if(item.DateTimeColor)this.PCTooltipPaint.DateTimeColor=item.DateTimeColor;if(item.VolColor)this.PCTooltipPaint.VolColor=item.VolColor;if(item.AmountColor)this.PCTooltipPaint.AmountColor=item.AmountColor;}if(style.MinuteInfo){var item=style.MinuteInfo;if(style.MinuteInfo.TextColor)this.MinuteInfo.TextColor=style.MinuteInfo.TextColor;if(style.MinuteInfo.Font)this.MinuteInfo.Font=style.MinuteInfo.Font;if(style.MinuteInfo.PointColor)this.MinuteInfo.PointColor=style.MinuteInfo.PointColor;if(style.MinuteInfo.LineColor)this.MinuteInfo.LineColor=style.MinuteInfo.LineColor;if(style.MinuteInfo.TextBGColor)this.MinuteInfo.TextBGColor=style.MinuteInfo.TextBGColor;if(IFrameSplitOperator.IsNumber(item.PointRadius))this.MinuteInfo.PointRadius=item.PointRadius;}if(style.Title){if(style.Title.TradeIndexColor)this.Title.TradeIndexColor=style.Title.TradeIndexColor;if(style.Title.ColorIndexColor)this.Title.ColorIndexColor=style.Title.ColorIndexColor;if(style.Title.VolColor)this.Title.VolColor=style.Title.VolColor;if(style.Title.AmountColor)this.Title.AmountColor=style.Title.AmountColor;if(style.Title.DateTimeColor)this.Title.DateTimeColor=style.Title.DateTimeColor;if(style.Title.NameColor)this.Title.NameColor=style.Title.NameColor;if(style.Title.SettingColor)this.Title.SettingColor=style.Title.SettingColor;if(style.Title.TurnoverRateColor)this.Title.TurnoverRateColor=style.Title.TurnoverRateColor;if(style.Title.PositionColor)this.Title.PositionColor=style.Title.PositionColor;}if(style.DRAWICON){if(style.DRAWICON.Icon){var item=style.DRAWICON.Icon;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Icon.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Icon.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Icon.Zoom=item.Zoom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Icon.YOffset=item.YOffset;}if(style.DRAWICON.Text){var item=style.DRAWICON.Text;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.Text.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.Text.MinSize=item.MinSize;if(item.Zoom)this.DRAWICON.Text.Zoom=item.Zoom;if(item.FontName)this.DRAWICON.Text.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWICON.Text.YOffset=item.YOffset;}}if(style.DRAWTEXT){var item=style.DRAWTEXT;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWICON.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWICON.MinSize=item.MinSize;if(item.Zoom)this.DRAWTEXT.Zoom=item.Zoom;if(item.FontName)this.DRAWTEXT.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWTEXT.YOffset=item.YOffset;}if(style.DRAWTEXT_FIX){var item=style.DRAWTEXT_FIX;if(item.Font)this.DRAWTEXT_FIX.Font=item.Font;}if(style.DRAWNUMBER_FIX){var item=style.DRAWNUMBER_FIX;if(item.Font)this.DRAWNUMBER_FIX.Font=item.Font;}if(style.DRAWNUMBER){var item=style.DRAWNUMBER;if(IFrameSplitOperator.IsPlusNumber(item.MaxSize))this.DRAWNUMBER.MaxSize=item.MaxSize;if(IFrameSplitOperator.IsPlusNumber(item.MinSize))this.DRAWNUMBER.MinSize=item.MinSize;if(item.Zoom)this.DRAWNUMBER.Zoom=item.Zoom;if(item.FontName)this.DRAWNUMBER.FontName=item.FontName;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWNUMBER.YOffset=item.YOffset;}if(style.DRAWABOVE){var item=style.DRAWABOVE;if(IFrameSplitOperator.IsNumber(item.YOffset))this.DRAWABOVE.YOffset=item.YOffset;}if(style.DOTLINE)this.DOTLINE=style.DOTLINE;if(style.DRAWSL)this.DOTLINE=style.DRAWSL;if(style.DragSubFrameBorder)this.DragSubFrameBorder=style.DragSubFrameBorder;if(style.DepthMapPaint){var item=style.DepthMapPaint;if(item.LineColor)this.DepthMapPaint.LineColor=item.LineColor;if(item.AreaColor)this.DepthMapPaint.AreaColor=item.AreaColor;if(item.TextColor)this.DepthMapPaint.TextColor=item.TextColor;if(item.TextBGColor)this.DepthMapPaint.TextBGColor=item.TextBGColor;}if(style.KLineYAxisBGPaint){var item=style.KLineYAxisBGPaint;if(item.Font)this.KLineYAxisBGPaint.Font=item.Font;if(item.LineColor)this.KLineYAxisBGPaint.LineColor=item.LineColor;if(item.DiffValutTextColor)this.KLineYAxisBGPaint.DiffValutTextColor=item.DiffValutTextColor;if(item.DiffValueBGColor)this.KLineYAxisBGPaint.DiffValueBGColor=item.DiffValueBGColor;}if(style.StockChip){var item=style.StockChip;if(item.InfoColor)this.StockChip.InfoColor=item.InfoColor;if(item.DayInfoColor)this.StockChip.DayInfoColor=item.DayInfoColor;if(item.DefaultButton)T_SetButtonStyle(item.DefaultButton,this.StockChip.DefaultButton);if(item.LongButton)T_SetButtonStyle(item.LongButton,this.StockChip.LongButton);if(item.RecentButton)T_SetButtonStyle(item.RecentButton,this.StockChip.RecentButton);}if(style.DepthChart){var item=style.DepthChart;if(item.BidColor){if(item.BidColor.Line)this.DepthChart.BidColor.Line=item.BidColor.Line;if(item.BidColor.Area)this.DepthChart.BidColor.Area=item.BidColor.Area;}if(item.AskColor){if(item.AskColor.Line)this.DepthChart.AskColor.Line=item.AskColor.Line;if(item.AskColor.Area)this.DepthChart.AskColor.Area=item.AskColor.Area;}if(item.LineWidth)this.DepthChart.LineWidth=item.LineWidth;}if(style.DepthCorss){var item=style.DepthCorss;if(item.BidColor){if(item.BidColor.Line)this.DepthCorss.BidColor.Line=item.BidColor.Line;}if(item.AskColor){if(item.AskColor.Line)this.DepthCorss.AskColor.Line=item.AskColor.Line;}if(item.LineWidth)this.DepthCorss.LineWidth=item.LineWidth;if(item.LineDash)this.DepthCorss.LineDash=item.LineDash;if(item.Tooltip){var tooltip=item.Tooltip;if(tooltip.BGColor)this.DepthCorss.Tooltip.BGColor=tooltip.BGColor;if(tooltip.TextColor)this.DepthCorss.Tooltip.TextColor=tooltip.TextColor;if(tooltip.Font)this.DepthCorss.Tooltip.Font=tooltip.Font;if(tooltip.LineHeight)this.DepthCorss.Tooltip.LineHeight=tooltip.LineHeight;var border=tooltip.Border;if(IFrameSplitOperator.IsNumber(border.Top))this.DepthCorss.Tooltip.Border.Top=border.Top;if(IFrameSplitOperator.IsNumber(border.Bottom))this.DepthCorss.Tooltip.Border.Bottom=border.Bottom;if(IFrameSplitOperator.IsNumber(border.Left))this.DepthCorss.Tooltip.Border.Left=border.Left;if(IFrameSplitOperator.IsNumber(border.Right))this.DepthCorss.Tooltip.Border.Right=border.Right;if(IFrameSplitOperator.IsNumber(border.ItemSpace))this.DepthCorss.Tooltip.Border.ItemSpace=border.ItemSpace;}}if(style.CIRCLEDOT){var item=style.CIRCLEDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.CIRCLEDOT.Radius=item.Radius;}if(style.POINTDOT){var item=style.POINTDOT;if(IFrameSplitOperator.IsNumber(item.Radius))this.POINTDOT.Radius=item.Radius;}if(style.RectSelect){var item=style.RectSelect;if(item.LineColor)this.RectSelect.LineColor=item.LineColor;if(item.LineWidth>0)this.RectSelect.LineWidth=item.LineWidth;if(item.LineDotted)this.RectSelect.LineDotted=item.LineDotted;if(item.AreaColor)this.RectSelect.AreaColor=item.AreaColor;if(item.SubAreaColor)this.RectSelect.SubAreaColor=item.SubAreaColor;if(item.RangeTextColor)this.RectSelect.RangeTextColor=item.RangeTextColor;if(item.RangeTextFont)this.RectSelect.RangeTextFont=item.RangeTextFont;if(item.RangeTextBGColor)this.RectSelect.RangeTextBGColor=item.RangeTextBGColor;if(item.RangeTextSubColor)this.RectSelect.RangeTextSubColor=item.RangeTextSubColor;if(item.RangeTextSubFont)this.RectSelect.RangeTextSubFont=item.RangeTextSubFont;if(item.RangeTextSubBGColor)this.RectSelect.RangeTextSubBGColor=item.RangeTextSubBGColor;}if(style.OrderFlow){item=style.OrderFlow;if(item.UpColor)this.OrderFlow.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow.UnchagneColor=item.UnchagneColor;if(item.Text)this.OrderFlow.Text=item.Text;if(item.Line)this.OrderFlow.Line=item.Line;}if(style.OrderFlow_Style2){item=style.OrderFlow_Style2;if(item.UpColor)this.OrderFlow_Style2.UpColor=item.UpColor;if(item.DownColor)this.OrderFlow_Style2.DownColor=item.DownColor;if(item.UnchagneColor)this.OrderFlow_Style2.UnchagneColor=item.UnchagneColor;if(IFrameSplitOperator.IsNumber(item.BarWidth))this.OrderFlow_Style2.BarWidth=item.BarWidth;}if(style.ChartOX){var item=style.ChartOX;if(item.Family)this.ChartOX.Family=item.Family;if(item.Up)this.ChartOX.Up=item.Up;if(item.Down)this.ChartOX.Down=item.Down;if(item.SquareLineColor)this.ChartOX.SquareLineColor=item.SquareLineColor;}if(style.DealList){var item=style.DealList;if(item.BorderColor)this.DealList.BorderColor=item.BorderColor;if(item.UpTextColor)this.DealList.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.DealList.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.DealList.UnchagneTextColor=item.UnchagneTextColor;if(item.CloseLineColor)this.DealList.CloseLineColor=item.CloseLineColor;if(item.Header){var header=item.Header;if(header.Color)this.DealList.Header.Color=header.Color;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.DealList.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Header.Font.Size=font.Size;}}if(item.Row){var row=item.Row;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.DealList.Row.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.DealList.Row.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.DealList.Row.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.DealList.Row.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.DealList.Row.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.DealList.Row.BarMergin.Bottom=mergin.Bottom;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Vol)this.DealList.FieldColor.Vol=filed.Vol;if(filed.Time)this.DealList.FieldColor.Time=filed.Time;if(filed.Deal)this.DealList.FieldColor.Deal=filed.Deal;if(filed.Index)this.DealList.FieldColor.Index=filed.Index;if(filed.BarTitle)this.DealList.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.DealList.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.DealList.FieldColor.Bar[i]=filed.Bar[i];}}}}if(style.Report)this.SetReportStyle(style.Report);if(style.TReport)this.SetTReportStyle(style.TReport);if(style.SelectedChart){var item=style.SelectedChart;if(IFrameSplitOperator.IsNumber(item.LineWidth))this.SelectedChart.LineWidth=item.LineWidth;if(IFrameSplitOperator.IsNumber(item.Radius))this.SelectedChart.Radius=item.Radius;if(IFrameSplitOperator.IsNumber(item.MinSpace))this.SelectedChart.MinSpace=item.MinSpace;if(item.LineColor)this.SelectedChart.LineColor=item.LineColor;if(item.LineColor)this.SelectedChart.BGColor=item.BGColor;}if(style.DragMovePaint){var item=style.DragMovePaint;if(item.TextColor)this.DragMovePaint.TextColor=item.TextColor;if(item.Font)this.DragMovePaint.Font=item.Font;}if(style.SessionBreaksPaint){var item=style.SessionBreaksPaint;if(IFrameSplitOperator.IsNonEmptyArray(item.BGColor))this.SessionBreaksPaint.BGColor=item.BGColor.slice();if(item.SplitLine){var subItem=item.SplitLine;if(subItem.Color)this.SessionBreaksPaint.SplitLine.Color=subItem.Color;if(IFrameSplitOperator.IsNumber(subItem.Width))this.SessionBreaksPaint.SplitLine.Width=subItem.Width;this.SessionBreaksPaint.SplitLine.Dash=subItem.Dash;}}if(IFrameSplitOperator.IsNumber(style.ToolbarButtonStyle))this.ToolbarButtonStyle=style.ToolbarButtonStyle;if(style.Buttons){var buttons=style.Buttons;T_SetButtonStyle(buttons.CloseOverlayIndex,this.Buttons.CloseOverlayIndex);T_SetButtonStyle(buttons.CloseWindow,this.Buttons.CloseWindow);T_SetButtonStyle(buttons.ChangeIndex,this.Buttons.ChangeIndex);T_SetButtonStyle(buttons.OverlayIndex,this.Buttons.OverlayIndex);T_SetButtonStyle(buttons.ModifyIndexParam,this.Buttons.ModifyIndexParam);T_SetButtonStyle(buttons.MaxMinWindow,this.Buttons.MaxMinWindow);T_SetButtonStyle(buttons.TitleWindow,this.Buttons.TitleWindow);T_SetButtonStyle(buttons.ExportData,this.Buttons.ExportData);}if(style.ChartDrawVolProfile){var item=style.ChartDrawVolProfile;if(item.UpVolColor)this.ChartDrawVolProfile.UpVolColor=item.UpVolColor;if(item.DownVolColor)this.ChartDrawVolProfile.DownVolColor=item.DownVolColor;if(item.AreaUpColor)this.ChartDrawVolProfile.AreaUpColor=item.AreaUpColor;if(item.AreaDonwColor)this.ChartDrawVolProfile.AreaDonwColor=item.AreaDonwColor;if(item.BGColor)this.ChartDrawVolProfile.BGColor=item.BGColor;if(item.BorderColor)this.ChartDrawVolProfile.BorderColor=item.BorderColor;if(item.VolLineColor)this.ChartDrawVolProfile.VolLineColor=item.VolLineColor;if(item.Text){if(item.Text.Color)this.ChartDrawVolProfile.Text.Color=item.Text.Color;if(item.Text.Family)this.ChartDrawVolProfile.Text.Family=item.Text.Family;if(IFrameSplitOperator.IsNumber(item.Text.FontMaxSize))this.ChartDrawVolProfile.Text.FontMaxSize=item.Text.FontMaxSize;if(IFrameSplitOperator.IsNumber(item.Text.FontMinSize))this.ChartDrawVolProfile.Text.FontMinSize=item.Text.FontMinSize;}}if(style.DisableLogo===true){if(this.FrameLogo)this.FrameLogo.Text=null;}if(style.ScrollBar){var item=style.ScrollBar;if(item.BorderColor)this.ScrollBar.BorderColor=item.BorderColor;if(item.XSplitTextFont)this.ScrollBar.XSplitTextFont=item.XSplitTextFont;if(item.XSplitTextColor)this.ScrollBar.XSplitTextColor=item.XSplitTextColor;if(item.XSplitLineColor)this.ScrollBar.XSplitLineColor=item.XSplitLineColor;if(item.Slider){var subItem=item.Slider;if(subItem.DateFont)this.ScrollBar.Slider.DateFont=subItem.DateFont;if(subItem.DateColor)this.ScrollBar.Slider.DateColor=subItem.DateColor;if(subItem.BarColor)this.ScrollBar.Slider.BarColor=subItem.BarColor;if(subItem.BarAreaColor)this.ScrollBar.Slider.BarAreaColor=subItem.BarAreaColor;}if(item.BGChart){var subItem=item.BGChart;if(subItem.Color)this.ScrollBar.BGChart.Color=subItem.Color;if(subItem.AreaColor)this.ScrollBar.BGChart.AreaColor=subItem.AreaColor;if(IFrameSplitOperator.IsPlusNumber(subItem.LineWidth))this.ScrollBar.BGChart.LineWidth=subItem.LineWidth;}}};this.SetReportStyle=function(style){var item=style;var dest=this.Report;if(item.BorderColor)this.Report.BorderColor=item.BorderColor;if(item.UpTextColor)this.Report.UpTextColor=item.UpTextColor;if(item.DownTextColor)this.Report.DownTextColor=item.DownTextColor;if(item.UnchagneTextColor)this.Report.UnchagneTextColor=item.UnchagneTextColor;if(item.BorderColor)this.Report.SelectedColor=item.SelectedColor;if(item.CloseLine){var closeLine=item.CloseLine;if(closeLine.CloseColor)this.Report.CloseLine.CloseColor=closeLine.CloseColor;if(closeLine.YCloseColor)this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;if(closeLine.AreaColor)this.Report.CloseLine.AreaColor=closeLine.AreaColor;}if(item.KLine){var kline=item.KLine;if(kline.UpColor)this.Report.KLine.UpColor=kline.UpColor;if(kline.DownColor)this.Report.KLine.DownColor=kline.DownColor;if(kline.UnchagneColor)this.Report.KLine.UnchagneColor=kline.UnchagneColor;if(IFrameSplitOperator.IsNumber(kline.DataWidth))this.Report.KLine.DataWidth=kline.DataWidth;if(IFrameSplitOperator.IsNumber(kline.DistanceWidth))this.Report.KLine.DistanceWidth=kline.DistanceWidth;}if(item.Header){var header=item.Header;if(header.Color)this.Report.Header.Color=header.Color;if(header.SortColor)this.Report.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)this.Report.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Header.Font.Size=font.Size;}}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)this.Report.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.Font.Size=font.Size;}if(row.BarMergin){var mergin=row.BarMergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.Item.BarMergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.Item.BarMergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.Item.BarMergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.Item.BarMergin.Bottom=mergin.Bottom;}if(row.NameFont){var font=row.NameFont;if(font.Name)this.Report.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)this.Report.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Item.SymbolFont.Size=font.Size;}}if(item.FixedItem){var row=item.FixedItem;if(row.Font){var font=row.Font;if(font.Name)this.Report.FixedItem.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.FixedItem.Font.Size=font.Size;}}if(item.LimitBorder){var limit=item.LimitBorder;if(limit.Color)this.Report.LimitBorder.Color=limit.Color;if(limit.Mergin){var mergin=limit.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.LimitBorder.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.LimitBorder.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.LimitBorder.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.LimitBorder.Mergin.Bottom=mergin.Bottom;}}if(item.LimitColor){var limit=item.LimitColor;if(limit.UpColor)this.Report.LimitColor.UpColor=limit.UpColor;if(limit.DownColor)this.Report.LimitColor.DownColor=limit.DownColor;if(limit.TextColor)this.Report.LimitColor.UpColor=limit.TextColor;}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)this.Report.FieldColor.Name=filed.Name;if(filed.Symbol)this.Report.FieldColor.Symbol=filed.Symbol;if(filed.Vol)this.Report.FieldColor.Vol=filed.Vol;if(filed.Amount)this.Report.FieldColor.Amount=filed.Amount;if(filed.Index)this.Report.FieldColor.Index=filed.Index;if(filed.BarTitle)this.Report.FieldColor.BarTitle=filed.BarTitle;if(filed.Text)this.Report.FieldColor.Text=filed.Text;if(IFrameSplitOperator.IsNonEmptyArray(filed.Bar)){for(var i=0;i<filed.Bar.length;++i){this.Report.FieldColor.Bar[i]=filed.Bar[i];}}}if(item.Tab){var tab=item.Tab;if(tab.Font){var font=tab.Font;if(font.Name)this.Report.Tab.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.Tab.Font.Size=font.Size;}if(IFrameSplitOperator.IsNumber(tab.ScrollBarWidth))this.Report.Tab.ScrollBarWidth=tab.ScrollBarWidth;if(tab.ButtonColor)this.Report.Tab.ButtonColor=tab.ButtonColor;if(tab.BarColor)this.Report.Tab.BarColor=tab.BarColor;if(tab.BorderColor)this.Report.Tab.BorderColor=tab.BorderColor;if(tab.TabTitleColor)this.Report.Tab.TabTitleColor=tab.TabTitleColor;if(tab.TabSelectedTitleColor)this.Report.Tab.TabSelectedTitleColor=tab.TabSelectedTitleColor;if(tab.TabSelectedBGColor)this.Report.Tab.TabSelectedBGColor=tab.TabSelectedBGColor;if(tab.TabMoveOnTitleColor)this.Report.Tab.TabMoveOnTitleColor=tab.TabMoveOnTitleColor;if(tab.TabBGColor)this.Report.Tab.TabBGColor=tab.TabBGColor;}if(item.PageInfo){var pageinfo=item.PageInfo;if(pageinfo.Font){var font=pageinfo.Font;if(font.Name)this.Report.PageInfo.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))this.Report.PageInfo.Font.Size=font.Size;}if(pageinfo.TextColor)this.Report.PageInfo.TextColor=pageinfo.TextColor;if(pageinfo.BGColor)this.Report.PageInfo.BGColor=pageinfo.BGColor;if(pageinfo.Mergin){var mergin=pageinfo.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))this.Report.PageInfo.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Top))this.Report.PageInfo.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Right))this.Report.PageInfo.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Bottom))this.Report.PageInfo.Mergin.Bottom=mergin.Bottom;}}if(item.DragRow){var dragRow=item.DragRow;if(dragRow.Color)this.Report.DragRow.Color=dragRow.Color;if(dragRow.TextColor)this.Report.DragRow.TextColor=dragRow.TextColor;if(dragRow.MoveRowColor)this.Report.DragRow.MoveRowColor=dragRow.MoveRowColor;if(dragRow.SrcRowColor)this.Report.DragRow.SrcRowColor=dragRow.SrcRowColor;}if(item.VScrollbar){var subItem=item.VScrollbar;if(IFrameSplitOperator.IsNumber(subItem.ScrollBarHeight))dest.VScrollbar.ScrollBarHeight=subItem.ScrollBarHeight;if(subItem.ButtonColor)dest.VScrollbar.ButtonColor=subItem.ButtonColor;if(subItem.BarColor)dest.VScrollbar.BarColor=subItem.BarColor;if(subItem.BorderColor)dest.VScrollbar.BorderColor=subItem.BorderColor;if(subItem.BGColor)dest.VScrollbar.BGColor=subItem.BGColor;}};this.SetTReportStyle=function(style){var item=style;var dest=this.TReport;if(item.BorderColor)dest.BorderColor=item.BorderColor;if(item.UpTextColor)dest.UpTextColor=item.UpTextColor;if(item.DownTextColor)dest.DownTextColor=item.DownTextColor;if(item.UnchangeTextColor)dest.UnchangeTextColor=item.UnchangeTextColor;if(item.BorderColor)dest.SelectedColor=item.SelectedColor;if(item.UpBGColor)dest.UpBGColor=item.UpBGColor;if(item.DownBGColor)dest.DownBGColor=item.DownBGColor;if(item.Header){var header=item.Header;if(header.Color)dest.Header.Color=header.Color;if(header.SortColor)dest.Header.SortColor=header.SortColor;if(header.Mergin){var mergin=header.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Header.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Header.Mergin.Left=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Header.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Header.Mergin.Bottom=mergin.Bottom;}if(header.Font){var font=header.Font;if(font.Name)dest.Header.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Header.Font.Size=font.Size;}}if(item.CenterItem){var cell=item.CenterItem;if(cell.TextColor)dest.CenterItem.TextColor=cell.TextColor;if(cell.BaseTextColor)dest.CenterItem.BaseTextColor=cell.BaseTextColor;if(cell.BGColor)dest.CenterItem.BGColor=cell.BGColor;}if(item.Item){var row=item.Item;if(row.Mergin){var mergin=row.Mergin;if(IFrameSplitOperator.IsNumber(mergin.Left))dest.Item.Mergin.Left=mergin.Left;if(IFrameSplitOperator.IsNumber(mergin.Right))dest.Item.Mergin.Right=mergin.Right;if(IFrameSplitOperator.IsNumber(mergin.Top))dest.Item.Mergin.Top=mergin.Top;if(IFrameSplitOperator.IsNumber(mergin.Bottom))dest.Item.Mergin.Bottom=mergin.Bottom;}if(row.Font){var font=row.Font;if(font.Name)dest.Item.Font.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.Font.Size=font.Size;}if(row.NameFont){var font=row.NameFont;if(font.Name)dest.Item.NameFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.NameFont.Size=font.Size;}if(row.SymbolFont){var font=row.SymbolFont;if(font.Name)dest.Item.SymbolFont.Name=font.Name;if(IFrameSplitOperator.IsNumber(font.Size))dest.Item.SymbolFont.Size=font.Size;}}if(item.FieldColor){var filed=item.FieldColor;if(filed.Name)dest.FieldColor.Name=filed.Name;if(filed.Symbol)dest.FieldColor.Symbol=filed.Symbol;if(filed.Vol)dest.FieldColor.Vol=filed.Vol;if(filed.Amount)dest.FieldColor.Amount=filed.Amount;if(filed.Index)dest.FieldColor.Index=filed.Index;if(filed.Text)dest.FieldColor.Text=filed.Text;if(filed.Position)dest.FieldColor.Position=filed.Position;}if(item.MarkBorder){var subIem=item.MarkBorder;if(subIem.MaxPositionColor)dest.MarkBorder.MaxPositionColor=subIem.MaxPositionColor;}};}var g_JSChartResource=new JSChartResource();/////////////////////////////////////////////////////////////////////////////////
|
|
6599
6604
|
//
|
|
6600
6605
|
//
|
|
6601
6606
|
//
|
|
@@ -11894,7 +11899,7 @@ Text:"rgb(245,245,245)"//默认文本
|
|
|
11894
11899
|
AreaColor:'rgba(220,220,220,0.2)'},KLine:{UpColor:"rgb(255,0,0)",DownColor:"rgb(0,128,0)",UnchagneColor:'rgb(240,240,240)',DataWidth:16,DistanceWidth:3},UpTextColor:"rgb(238,21,21)",//上涨文字颜色
|
|
11895
11900
|
DownTextColor:"rgb(25,158,0)",//下跌文字颜色
|
|
11896
11901
|
UnchagneTextColor:"rgb(228,228,228)",//平盘文字颜色
|
|
11897
|
-
Tab:{Font:{Size:12,Name:"微软雅黑"},ScrollBarWidth:100,ButtonColor:"rgb(13,12,15)",BarColor:"rgb(48,48,48)",BorderColor:'rgb(48,48,48)',TabTitleColor:'rgb(153,153,153)',TabSelectedTitleColor:'rgb(255,255,255)',TabSelectedBGColor:"rgb(13,12,15)",TabMoveOnTitleColor:"rgb(255,255,255)",TabBGColor:"rgb(28,28,31)"},PageInfo:{Font:{Size:15,Name:"微软雅黑"},TextColor:"rgb(255,255,255)",BGColor:"rgba(49,48,56,0.8)",Mergin:{Left:5,Right:5,Top:4,Bottom:2}},DragRow:{Color:"rgba(255,250, 250,0.8)",TextColor:'rgba(0,0, 0, 0.8)',MoveRowColor:'rgb(135,206,250)',SrcRowColor:'rgb(49,48,56)'}},//T型报价
|
|
11902
|
+
Tab:{Font:{Size:12,Name:"微软雅黑"},ScrollBarWidth:100,ButtonColor:"rgb(13,12,15)",BarColor:"rgb(48,48,48)",BorderColor:'rgb(48,48,48)',TabTitleColor:'rgb(153,153,153)',TabSelectedTitleColor:'rgb(255,255,255)',TabSelectedBGColor:"rgb(13,12,15)",TabMoveOnTitleColor:"rgb(255,255,255)",TabBGColor:"rgb(28,28,31)"},PageInfo:{Font:{Size:15,Name:"微软雅黑"},TextColor:"rgb(255,255,255)",BGColor:"rgba(49,48,56,0.8)",Mergin:{Left:5,Right:5,Top:4,Bottom:2}},DragRow:{Color:"rgba(255,250, 250,0.8)",TextColor:'rgba(0,0, 0, 0.8)',MoveRowColor:'rgb(135,206,250)',SrcRowColor:'rgb(49,48,56)'},VScrollbar:{BarWidth:40,ScrollBarHeight:60,ButtonColor:"rgba(13,12,15,0.8)",BarColor:"rgba(48,48,48,0.9)",BorderColor:'rgba(48,48,48,0.9)',BGColor:"rgba(211,211,211,0.5)"}},//T型报价
|
|
11898
11903
|
TReport:{BorderColor:'rgb(38,38,41)',//边框线
|
|
11899
11904
|
SelectedColor:"rgb(180,180,180)",//选中行
|
|
11900
11905
|
Header:{Color:"rgb(187,187,187)",//表头文字颜色
|
|
@@ -12068,7 +12073,7 @@ this.CanvasElement=document.createElement("canvas");this.CanvasElement.className
|
|
|
12068
12073
|
var height=parseInt(this.DivElement.style.height.replace("px",""));this.CanvasElement.height=height;this.CanvasElement.width=parseInt(this.DivElement.style.width.replace("px",""));this.CanvasElement.style.width=this.CanvasElement.width+'px';this.CanvasElement.style.height=this.CanvasElement.height+'px';var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
12069
12074
|
this.CanvasElement.height*=pixelTatio;this.CanvasElement.width*=pixelTatio;JSConsole.Chart.Log('[JSReportChart::OnSize] devicePixelRatio='+window.devicePixelRatio+', height='+this.CanvasElement.height+', width='+this.CanvasElement.width);if(this.JSChartContainer&&this.JSChartContainer.OnSize){this.JSChartContainer.OnSize();}};this.SetOption=function(option){var chart=this.CreateJSReportChartContainer(option);if(!chart)return false;if(option.OnCreatedCallback)option.OnCreatedCallback(chart);this.JSChartContainer=chart;this.DivElement.JSChart=this;//div中保存一份
|
|
12070
12075
|
if(option.Symbol)chart.Symbol=option.Symbol;if(option.Name)chart.Name=option.Name;var requestOption={Callback:null};if(chart.Symbol)requestOption.Callback=function(){chart.RequestMemberListData();};chart.RequestStockListData(requestOption);//下载码表
|
|
12071
|
-
};this.CreateJSReportChartContainer=function(option){var chart=new JSReportChartContainer(this.CanvasElement);chart.Create(option);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;if(IFrameSplitOperator.IsNonEmptyArray(option.Column))chart.SetColumn(option.Column);if(IFrameSplitOperator.IsNonEmptyArray(option.Tab))chart.SetTab(option.Tab);if(IFrameSplitOperator.IsNumber(option.TabSelected))chart.SetSelectedTab(option.TabSelected);if(IFrameSplitOperator.IsBool(option.EnableDragRow))chart.EnableDragRow=option.EnableDragRow;if(IFrameSplitOperator.IsNumber(option.DragRowType))chart.DragRowType=option.DragRowType;if(IFrameSplitOperator.IsBool(option.EnableDragHeader))chart.EnableDragHeader=option.EnableDragHeader;if(option.SortInfo){var item=option.SortInfo;if(IFrameSplitOperator.IsNumber(item.Field))chart.SortInfo.Field=item.Field;if(IFrameSplitOperator.IsNumber(item.Sort))chart.SortInfo.Sort=item.Sort;}this.SetChartBorder(chart,option);//是否自动更新
|
|
12076
|
+
};this.CreateJSReportChartContainer=function(option){var chart=new JSReportChartContainer(this.CanvasElement);chart.Create(option);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;if(IFrameSplitOperator.IsNonEmptyArray(option.Column))chart.SetColumn(option.Column);if(IFrameSplitOperator.IsNonEmptyArray(option.Tab))chart.SetTab(option.Tab);if(IFrameSplitOperator.IsNumber(option.TabSelected))chart.SetSelectedTab(option.TabSelected);if(IFrameSplitOperator.IsBool(option.EnableDragRow))chart.EnableDragRow=option.EnableDragRow;if(IFrameSplitOperator.IsNumber(option.DragRowType))chart.DragRowType=option.DragRowType;if(IFrameSplitOperator.IsBool(option.EnableDragHeader))chart.EnableDragHeader=option.EnableDragHeader;if(option.VScrollbar)chart.SetVScrollbar(option.VScrollbar);if(option.SortInfo){var item=option.SortInfo;if(IFrameSplitOperator.IsNumber(item.Field))chart.SortInfo.Field=item.Field;if(IFrameSplitOperator.IsNumber(item.Sort))chart.SortInfo.Sort=item.Sort;}this.SetChartBorder(chart,option);//是否自动更新
|
|
12072
12077
|
if(option.IsAutoUpdate!=null)chart.IsAutoUpdate=option.IsAutoUpdate;if(option.AutoUpdateFrequency>0)chart.AutoUpdateFrequency=option.AutoUpdateFrequency;if(IFrameSplitOperator.IsBool(option.EnableFilter))chart.EnableFilter=option.EnableFilter;//注册事件
|
|
12073
12078
|
if(option.EventCallback){for(var i=0;i<option.EventCallback.length;++i){var item=option.EventCallback[i];chart.AddEventCallback(item);}}return chart;};this.SetChartBorder=function(chart,option){if(!option.Border)return;var item=option.Border;if(IFrameSplitOperator.IsNumber(option.Border.Left))chart.Frame.ChartBorder.Left=option.Border.Left;if(IFrameSplitOperator.IsNumber(option.Border.Right))chart.Frame.ChartBorder.Right=option.Border.Right;if(IFrameSplitOperator.IsNumber(option.Border.Top))chart.Frame.ChartBorder.Top=option.Border.Top;if(IFrameSplitOperator.IsNumber(option.Border.Bottom))chart.Frame.ChartBorder.Bottom=option.Border.Bottom;var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
12074
12079
|
chart.Frame.ChartBorder.Left*=pixelTatio;chart.Frame.ChartBorder.Right*=pixelTatio;chart.Frame.ChartBorder.Top*=pixelTatio;chart.Frame.ChartBorder.Bottom*=pixelTatio;};/////////////////////////////////////////////////////////////////////////////
|
|
@@ -12112,8 +12117,8 @@ this.BlockData=new _map2.default();//当前板块数据
|
|
|
12112
12117
|
this.MapStockData=new _map2.default();//原始股票数据
|
|
12113
12118
|
this.FixedRowData={Data:[],Type:0,Symbol:[]};//顶部固定行Data:[{ Value:, Text:, Color:, TextAgiln: }], Type:0=自定义数据, 1 =(股票数据) Symbol:[],
|
|
12114
12119
|
this.FlashBG=new _map2.default();this.FlashBGTimer=null;//闪烁背景 Value:{ LastTime:数据最后的时间, Data: { Key:ID, BGColor:, Time: , Count: 次数 } };
|
|
12115
|
-
this.GlobalOption={FlashBGCount:0
|
|
12116
|
-
|
|
12120
|
+
this.GlobalOption={FlashBGCount:0};//this.FixedRowData.Data=[ [null, {Value:11, Text:"11" }], [null, null, null, {Value:12, Text:"ddddd", Color:"rgb(45,200,4)"}]];
|
|
12121
|
+
this.SortInfo={Field:-1,Sort:0};//排序信息 {Field:排序字段id, Sort:0 不排序 1升序 2降序 }
|
|
12117
12122
|
//行拖拽
|
|
12118
12123
|
this.DragRow;this.DragColumnWidth;//列宽拖动
|
|
12119
12124
|
this.EnableDragRow=false;this.DragRowType=0;//0=插入 1=交换
|
|
@@ -12130,7 +12135,7 @@ this.YStepPixel=5*GetDevicePixelRatio();this.XStepPixel=10*GetDevicePixelRatio()
|
|
|
12130
12135
|
this.DragPageCycle=true;//手机翻页循环
|
|
12131
12136
|
//拖拽滚动条
|
|
12132
12137
|
this.DragXScroll=null;//{Start:{x,y}, End:{x, y}}
|
|
12133
|
-
this.IsDestroy=false;//是否已经销毁了
|
|
12138
|
+
this.DragYScroll=null;this.IsShowVScrollbar=false;this.IsDestroy=false;//是否已经销毁了
|
|
12134
12139
|
this.ChartDestory=function()//销毁
|
|
12135
12140
|
{this.IsDestroy=true;this.StopAutoUpdate();};this.StopAutoDragScrollTimer=function(){JSConsole.Chart.Log("[JSReportChartContainer::StopAutoDragScrollTimer] stop ");this.EnablePageScroll=false;if(this.AutoDragScrollTimer!=null){clearTimeout(this.AutoDragScrollTimer);this.AutoDragScrollTimer=null;}};this.AutoScrollPage=function(step){var _this49=this;this.AutoDragScrollTimer=setTimeout(function(){_this49.ChartOperator_Temp_ScrollPage(step);},300);};this.ChartOperator_Temp_ScrollPage=function(moveSetp){if(!this.EnablePageScroll)return;var reportChart=this.GetReportChart();if(!reportChart)return;if(moveSetp>0){var pageStatus=reportChart.GetCurrentPageStatus();if(pageStatus.IsEnd)return;this.MoveYOffset(moveSetp,false);++moveSetp;}else if(moveSetp<0){if(this.Data.YOffset<=0)return;this.MoveYOffset(moveSetp,false);--moveSetp;}else{return;}this.Draw();if(!this.EnablePageScroll)return;this.AutoScrollPage(moveSetp);return;};//清空固定行数据
|
|
12136
12141
|
this.ClearFixedRowData=function(){this.FixedRowData.Data=[];this.FixedRowData.Symbol=[];};//设置固定行
|
|
@@ -12138,7 +12143,7 @@ this.SetFixedRowCount=function(value){var chart=this.GetReportChart();if(!chart)
|
|
|
12138
12143
|
this.Create=function(option){var _this50=this;this.UIElement.JSChartContainer=this;//创建等待提示
|
|
12139
12144
|
this.ChartSplashPaint=new ChartSplashPaint();this.ChartSplashPaint.Canvas=this.Canvas;this.ChartSplashPaint.SetTitle(this.LoadDataSplashTitle);this.ChartSplashPaint.IsEnableSplash=true;//创建框架
|
|
12140
12145
|
this.Frame=new JSReportFrame();this.Frame.ChartBorder=new ChartBorder();this.Frame.ChartBorder.UIElement=this.UIElement;this.Frame.ChartBorder.Top=30;this.Frame.ChartBorder.Left=5;this.Frame.ChartBorder.Bottom=20;this.Frame.Canvas=this.Canvas;this.ChartSplashPaint.Frame=this.Frame;//创建表格
|
|
12141
|
-
var chart=new ChartReport();chart.Frame=this.Frame;chart.ChartBorder=this.Frame.ChartBorder;chart.Canvas=this.Canvas;chart.UIElement=this.UIElement;chart.GetEventCallback=function(id){return _this50.GetEventCallback(id);};chart.GetStockDataCallback=function(symbol){return _this50.GetStockData(symbol);};chart.GetBlockDataCallback=function(symbol){return _this50.GetBlockData(symbol);};chart.GetFlashBGDataCallback=function(symbol,time){return _this50.GetFlashBGData(symbol,time);};chart.Data=this.Data;chart.GlobalOption=this.GlobalOption;chart.FixedRowData=this.FixedRowData;chart.SortInfo=this.SortInfo;chart.Tab=new ChartReportTab();chart.Tab.Frame=this.Frame;chart.Tab.Canvas=this.Canvas;chart.Tab.ChartBorder=this.Frame.ChartBorder;chart.Tab.Report=chart;this.ChartPaint[0]=chart;//页脚
|
|
12146
|
+
var chart=new ChartReport();chart.Frame=this.Frame;chart.ChartBorder=this.Frame.ChartBorder;chart.Canvas=this.Canvas;chart.UIElement=this.UIElement;chart.GetEventCallback=function(id){return _this50.GetEventCallback(id);};chart.GetStockDataCallback=function(symbol){return _this50.GetStockData(symbol);};chart.GetBlockDataCallback=function(symbol){return _this50.GetBlockData(symbol);};chart.GetFlashBGDataCallback=function(symbol,time){return _this50.GetFlashBGData(symbol,time);};chart.Data=this.Data;chart.GlobalOption=this.GlobalOption;chart.FixedRowData=this.FixedRowData;chart.SortInfo=this.SortInfo;chart.Tab=new ChartReportTab();chart.Tab.Frame=this.Frame;chart.Tab.Canvas=this.Canvas;chart.Tab.ChartBorder=this.Frame.ChartBorder;chart.Tab.Report=chart;chart.VScrollbar=new ChartVScrollbar();chart.VScrollbar.Frame=this.Frame;chart.VScrollbar.Canvas=this.Canvas;chart.VScrollbar.ChartBorder=this.Frame.ChartBorder;chart.VScrollbar.Report=chart;chart.VScrollbar.IsShowCallback=function(){if(_this50.DragYScroll)return true;return _this50.IsShowVScrollbar;};this.ChartPaint[0]=chart;//页脚
|
|
12142
12147
|
if(option&&option.PageInfo===true){var pageInfoChart=new ChartReportPageInfo();pageInfoChart.Frame=this.Frame;pageInfoChart.ChartBorder=this.Frame.ChartBorder;pageInfoChart.Canvas=this.Canvas;pageInfoChart.Report=chart;this.ChartPaint[1]=pageInfoChart;}if(option){if(IFrameSplitOperator.IsBool(option.IsShowHeader))chart.IsShowHeader=option.IsShowHeader;//是否显示表头
|
|
12143
12148
|
if(IFrameSplitOperator.IsNumber(option.FixedColumn))chart.FixedColumn=option.FixedColumn;//固定列
|
|
12144
12149
|
if(IFrameSplitOperator.IsNumber(option.BorderLine))this.Frame.BorderLine=option.BorderLine;//边框
|
|
@@ -12223,7 +12228,7 @@ var result=this.MoveSelectedRow(-1);if(result){if(result.Redraw)this.Draw();if(r
|
|
|
12223
12228
|
var result=this.MoveSelectedRow(1);if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}break;case 37://left
|
|
12224
12229
|
if(this.MoveXOffset(-1))this.Draw();break;case 39://right
|
|
12225
12230
|
if(this.MoveXOffset(1))this.Draw();break;}//不让滚动条滚动
|
|
12226
|
-
if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.UIOnDblClick=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var chart=this.ChartPaint[0];if(chart)chart.OnDblClick(x,y,e);};this.UIOnMouseDown=function(e){var _this54=this;this.DragXScroll=null;this.DragHeader=null;this.DragColumnWidth=null;this.DragMove={Click:{X:e.clientX,Y:e.clientY},Move:{X:e.clientX,Y:e.clientY},PreMove:{X:e.clientX,Y:e.clientY}};var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var chart=this.ChartPaint[0];if(chart){var dragColumnWidth=chart.PtInHeaderDragBorder(x,y);if(dragColumnWidth){this.DragColumnWidth={ClickPoint:{X:x,Y:y},LastPoint:{X:x,Y:y},//Click:{ X:e.clientX, Y:e.clientY },
|
|
12231
|
+
if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.UIOnDblClick=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var chart=this.ChartPaint[0];if(chart)chart.OnDblClick(x,y,e);};this.UIOnMouseDown=function(e){var _this54=this;this.DragXScroll=null;this.DragYScroll=null;this.DragHeader=null;this.DragColumnWidth=null;this.DragMove={Click:{X:e.clientX,Y:e.clientY},Move:{X:e.clientX,Y:e.clientY},PreMove:{X:e.clientX,Y:e.clientY}};var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;var chart=this.ChartPaint[0];if(chart){var dragColumnWidth=chart.PtInHeaderDragBorder(x,y);if(dragColumnWidth){this.DragColumnWidth={ClickPoint:{X:x,Y:y},LastPoint:{X:x,Y:y},//Click:{ X:e.clientX, Y:e.clientY },
|
|
12227
12232
|
//LastMove:{ X:e.clientX, Y:e.clientY},
|
|
12228
12233
|
ClickData:dragColumnWidth,ColumnWidth:dragColumnWidth.Column.Width};}else{var clickData=chart.OnMouseDown(x,y,e);if(!clickData)return;//if (e.button!=0) return;
|
|
12229
12234
|
if((clickData.Type==2||clickData.Type==4)&&(e.button==0||e.button==2))//点击行|固定行
|
|
@@ -12234,17 +12239,22 @@ if((clickData.Type==2||clickData.Type==4)&&(e.button==0||e.button==2))//点击
|
|
|
12234
12239
|
{if(this.MoveXOffset(1))this.Draw();}else if(tabData.Type==3)//滚动条
|
|
12235
12240
|
{this.DragXScroll={Click:{X:x,Y:y},LastMove:{X:x,Y:y}};}else if(tabData.Type==4)//滚动条内部
|
|
12236
12241
|
{if(this.SetXOffset(tabData.Pos))this.Draw();}else if(tabData.Type==5)//标签
|
|
12237
|
-
{this.OnClickTab(tabData,e);}}
|
|
12242
|
+
{this.OnClickTab(tabData,e);}}else if(clickData.Type==5&&e.button==0)//右侧滚动条
|
|
12243
|
+
{var scroll=clickData.VScrollbar;if(scroll.Type==1)//顶部按钮
|
|
12244
|
+
{if(this.MoveYOffset(-1)){this.Draw();this.DelayUpdateStockData();}}else if(scroll.Type==2)//底部按钮
|
|
12245
|
+
{if(this.MoveYOffset(1)){this.Draw();this.DelayUpdateStockData();}}else if(scroll.Type==3)//滚动条
|
|
12246
|
+
{this.DragYScroll={Click:{X:x,Y:y},LastMove:{X:x,Y:y}};}else if(scroll.Type==4)//滚动条内部
|
|
12247
|
+
{if(this.SetYOffset(scroll.Pos)){this.Draw();this.DelayUpdateStockData();}}}}}document.onmousemove=function(e){_this54.DocOnMouseMove(e);};document.onmouseup=function(e){_this54.DocOnMouseUp(e);};};this.UIOnMounseUp=function(e){console.log('"UIOnMounseUp');};//去掉右键菜单
|
|
12238
12248
|
this.UIOnContextMenu=function(e){e.preventDefault();};this.UIOnMouseMove=function(e){var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;if(this.DragRow)return;if(this.DrawHeader)return;if(this.DragColumnWidth)return;var tabChart=this.GetTabChart();if(tabChart){var tabData=tabChart.PtInTab(x,y);if(tabData){var index=tabData.Index;if(tabChart.MoveOnTabIndex!=index){tabChart.MoveOnTabIndex=index;this.Draw();}}}var mouseStatus={Cursor:"default",Name:"Default"};;//鼠标状态
|
|
12239
|
-
var report=this.GetReportChart();var cell=null;if(report){var dragHeaderWidth=report.PtInHeaderDragBorder(x,y);if(dragHeaderWidth){mouseStatus={Cursor:"col-resize",Name:"DragHeaderWidth"};JSConsole.Chart.Log("[JSReportChartContainer::UIOnMouseMove] drag column width ",dragHeaderWidth);}else{cell=report.PtInCell(x,y);//是否在单元格(EnableTooltip)
|
|
12240
|
-
}}var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);if(event){var sendData={X:x,Y:y,Cell:cell};event.Callback(event,sendData,this);}if(mouseStatus)this.UIElement.style.cursor=mouseStatus.Cursor;};this.UIOnMounseOut=function(e){var tabChart=this.GetTabChart();if(tabChart&&tabChart.MoveOnTabIndex>=0){tabChart.MoveOnTabIndex=-1;this.Draw();}};this.UIOnMouseleave=function(e){var tabChart=this.GetTabChart();if(tabChart&&tabChart.MoveOnTabIndex>=0){tabChart.MoveOnTabIndex=-1;this.Draw();}};this.DocOnMouseMove=function(e){this.DragMove.PreMove.X=this.DragMove.Move.X;this.DragMove.PreMove.Y=this.DragMove.Move.Y;this.DragMove.Move.X=e.clientX;this.DragMove.Move.Y=e.clientX;if(this.DragMove.Move.X!=this.DragMove.PreMove.X||this.DragMove.Move.Y!=this.DragMove.PreMove.Y)this.StopAutoDragScrollTimer();if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;//JSConsole.Chart.Log(`[JSReportChartContainer::DocOnMouseMove] x=${x}, y=${y}`);
|
|
12241
|
-
if(this.DragRow){var drag=this.DragRow;var moveSetpY=drag.LastMove.Y-e.clientY;if(Math.abs(moveSetpY)<2)return;var reportChart=this.GetReportChart();drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;drag.Inside={X:x,Y:y};if(reportChart){var moveRow=reportChart.OnDrawgRow(x,y,e);if(moveRow){if(moveRow.Type==2){if(moveRow.Data.DataIndex!=drag.Data.Row.DataIndex){drag.MoveRow=moveRow;}}else if(moveRow.Type==7){var pageStatus=reportChart.GetCurrentPageStatus();if(!pageStatus.IsEnd){this.MoveYOffset(1,false);drag.MoveRow=null;this.EnablePageScroll=true;this.AutoScrollPage(2);}}else if(moveRow.Type==5){if(this.Data.YOffset>0){this.MoveYOffset(-1,false);drag.MoveRow=null;this.EnablePageScroll=true;this.AutoScrollPage(-2);}}}reportChart.DragRow=drag;}this.Draw();}else if(this.DragXScroll){var chart=this.ChartPaint[0];if(!chart||!chart.Tab)return;this.DragXScroll.LastMove.X=x;this.DragXScroll.LastMove.Y=y;var pos=chart.Tab.GetScrollPostionByPoint(x,y);if(this.SetXOffset(pos))this.Draw();}else if(this.DragHeader&&this.DragHeader.ClickData)//表头拖拽
|
|
12249
|
+
var report=this.GetReportChart();var cell=null;var bDraw=false;if(report){var dragHeaderWidth=report.PtInHeaderDragBorder(x,y);if(dragHeaderWidth){mouseStatus={Cursor:"col-resize",Name:"DragHeaderWidth"};JSConsole.Chart.Log("[JSReportChartContainer::UIOnMouseMove] drag column width ",dragHeaderWidth);}else{cell=report.PtInCell(x,y);//是否在单元格(EnableTooltip)
|
|
12250
|
+
}var scrollbar=report.VScrollbar;if(scrollbar.Enable){var bShowScrollbar=report.PtInClient(x,y);this.IsShowVScrollbar=bShowScrollbar;if(!this.DragYScroll){if(bShowScrollbar&&!scrollbar.LastStatus.Draw)bDraw=true;else if(!bShowScrollbar&&scrollbar.LastStatus.Draw)bDraw=true;}}}var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_MOUSE_MOVE);if(event){var sendData={X:x,Y:y,Cell:cell};event.Callback(event,sendData,this);}if(mouseStatus)this.UIElement.style.cursor=mouseStatus.Cursor;if(bDraw)this.Draw();};this.UIOnMounseOut=function(e){var bDraw=false;var tabChart=this.GetTabChart();if(tabChart&&tabChart.MoveOnTabIndex>=0){tabChart.MoveOnTabIndex=-1;bDraw=true;this.Draw();}var scrollbar=this.GetVScrollbarChart();if(scrollbar.Enable){this.IsShowVScrollbar=false;if(!this.DragYScroll){if(scrollbar.LastStatus.Draw)bDraw=true;}}if(bDraw)this.Draw();};this.UIOnMouseleave=function(e){var tabChart=this.GetTabChart();if(tabChart&&tabChart.MoveOnTabIndex>=0){tabChart.MoveOnTabIndex=-1;this.Draw();}};this.DocOnMouseMove=function(e){this.DragMove.PreMove.X=this.DragMove.Move.X;this.DragMove.PreMove.Y=this.DragMove.Move.Y;this.DragMove.Move.X=e.clientX;this.DragMove.Move.Y=e.clientX;if(this.DragMove.Move.X!=this.DragMove.PreMove.X||this.DragMove.Move.Y!=this.DragMove.PreMove.Y)this.StopAutoDragScrollTimer();if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;//JSConsole.Chart.Log(`[JSReportChartContainer::DocOnMouseMove] x=${x}, y=${y}`);
|
|
12251
|
+
if(this.DragRow){var drag=this.DragRow;var moveSetpY=drag.LastMove.Y-e.clientY;if(Math.abs(moveSetpY)<2)return;var reportChart=this.GetReportChart();drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;drag.Inside={X:x,Y:y};if(reportChart){var moveRow=reportChart.OnDrawgRow(x,y,e);if(moveRow){if(moveRow.Type==2){if(moveRow.Data.DataIndex!=drag.Data.Row.DataIndex){drag.MoveRow=moveRow;}}else if(moveRow.Type==7){var pageStatus=reportChart.GetCurrentPageStatus();if(!pageStatus.IsEnd){this.MoveYOffset(1,false);drag.MoveRow=null;this.EnablePageScroll=true;this.AutoScrollPage(2);}}else if(moveRow.Type==5){if(this.Data.YOffset>0){this.MoveYOffset(-1,false);drag.MoveRow=null;this.EnablePageScroll=true;this.AutoScrollPage(-2);}}}reportChart.DragRow=drag;}this.Draw();}else if(this.DragXScroll){var chart=this.ChartPaint[0];if(!chart||!chart.Tab)return;this.DragXScroll.LastMove.X=x;this.DragXScroll.LastMove.Y=y;var pos=chart.Tab.GetScrollPostionByPoint(x,y);if(this.SetXOffset(pos))this.Draw();}else if(this.DragYScroll){var chart=this.ChartPaint[0];if(!chart||!chart.VScrollbar)return;this.DragYScroll.LastMove.X=x;this.DragYScroll.LastMove.Y=y;var pos=chart.VScrollbar.GetScrollPostionByPoint(x,y);if(this.SetYOffset(pos)){this.Draw();this.DelayUpdateStockData();}}else if(this.DragHeader&&this.DragHeader.ClickData)//表头拖拽
|
|
12242
12252
|
{if(this.DragHeader.ClickData.Header.IsFixed)return;if(!this.EnableDragHeader)return;var xMove=e.clientX-this.DragHeader.Click.X;var yMove=e.clientY-this.DragHeader.Click.Y;if(Math.abs(yMove)<=1&&Math.abs(xMove)<=1)return;this.DragHeader.LastMove.X=e.clientX;this.DragHeader.LastMove.Y=e.clientY;if(!this.DragHeader.MovePoint){this.DragHeader.MovePoint={X:x,Y:y};}else{this.DragHeader.MovePoint.X=x;this.DragHeader.MovePoint.Y=y;}this.OnMoveDragHeader(x,y,e);this.ShowDragHeaderTooltip(x,y,e);}else if(this.DragColumnWidth&&this.DragColumnWidth.ClickData)//列宽度拖拽
|
|
12243
12253
|
{var xMove=x-this.DragColumnWidth.ClickPoint.X;if(Math.abs(xMove)<1)return;var fixedWidth=this.DragColumnWidth.ColumnWidth+xMove;if(fixedWidth<=10)return;var index=this.DragColumnWidth.ClickData.Index;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DRAG_COLUMN_WIDTH);if(event&&event.Callback){var sendData={Index:index,Width:fixedWidth,PreventDefault:false};if(this.DragColumnWidth&&this.DragColumnWidth.ClickData)sendData.Column=this.DragColumnWidth.ClickData.Column;event.Callback(event,sendData,this);if(sendData.PreventDefault)return;}this.SetColumnFixedWidth(index,fixedWidth);this.DragColumnWidth.LastPoint.X=x;this.DragColumnWidth.LastPoint.Y=y;}};this.SetColumnFixedWidth=function(index,width){var chart=this.ChartPaint[0];if(!chart)return;var item=chart.Column[index];if(!item)return;item.FixedWidth=width;this.SetSizeChange(true);this.Draw();};this.OnMoveDragHeader=function(x,y,e){var chart=this.ChartPaint[0];if(!chart)return;var clickData=this.DragHeader.ClickData;this.DragHeader.MoveToData=null;if(!clickData.Header.IsFixed)//固定列不能拖
|
|
12244
12254
|
{var yHeader=this.DragHeader.ClickPoint.Y;var moveData=chart.OnMouseDown(x,yHeader,e);if(!moveData||!moveData.Header)return;if(moveData.Header.IsFixed)return;if(moveData.Header.Index==clickData.Header.Index)return;this.DragHeader.MoveToData=moveData;console.log('[JSReportChartContainer::OnMoveDragHeader] Click[Index='+clickData.Header.Index+', Title='+clickData.Header.Column.Title+'] => Move[Index='+moveData.Header.Index+', Title='+moveData.Header.Column.Title+']');}};this.ShowDragHeaderTooltip=function(x,y,e){if(!this.DragHeader)return;var drag=this.DragHeader;if(!drag.ClickData||!drag.MovePoint)return;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DRAG_HEADER_TOOLTIP);if(event){var sendData={PreventDefault:false,e:e,X:x,Y:y,DragHeader:this.DragHeader,Tooltip:this.Tooltip};event.Callback(event,sendData,this);if(sendData.PreventDefault)return;}var title=drag.ClickData.Header.Column.Title;this.Tooltip.className='jchart-chartdrawsvg-tooltip';//ChartDrawSVG指标数据
|
|
12245
12255
|
this.Tooltip.style.position="absolute";this.Tooltip.style.left=e.clientX+"px";this.Tooltip.style.top=e.clientY+"px";this.Tooltip.style.width=100+"px";this.Tooltip.style.height=null;this.Tooltip.innerHTML=title;this.Tooltip.style.display="block";};this.HideTooltip=function(){if(this.Tooltip.style.display!="none")this.Tooltip.style.display="none";};this.DocOnMouseUp=function(e){//清空事件
|
|
12246
12256
|
document.onmousemove=null;document.onmouseup=null;this.StopAutoDragScrollTimer();this.HideTooltip();var reportChart=this.GetReportChart();var mouseStatus={Cursor:"default",Name:"Default"};;//鼠标状态
|
|
12247
|
-
var bRedraw=false;if(this.DragRow){if(reportChart){this.OnDragRow();reportChart.DragRow=null;}bRedraw=true;}var dragHeader=this.DragHeader;this.DragHeader=null;this.DragXScroll=null;this.DragRow=null;this.DragMove=null;this.DragColumnWidth=null;if(bRedraw)this.Draw();if(dragHeader){var clickData=dragHeader.ClickData;var moveToData=dragHeader.MoveToData;if(clickData&&moveToData){this.SwapColumn(clickData.Header.Index,moveToData.Header.Index,{Redraw:true});}else{this.OnClickHeader(clickData,e);}}if(mouseStatus)this.UIElement.style.cursor=mouseStatus.Cursor;};this.OnDragRow=function(){if(!this.SourceData||!IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))return;if(!this.DragRow||!this.DragRow.MoveRow)return;var drag=this.DragRow;var srcIndex=drag.Data.Row.DataIndex;var moveIndex=drag.MoveRow.Data.DataIndex;if(srcIndex==moveIndex||srcIndex<0||moveIndex<0)return;var data=this.SourceData.Data;if(srcIndex>=data.length||moveIndex>=data.length)return;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DRAG_ROW);if(event){var sendData={Symbol:this.Symbol,Src:{Index:srcIndex,Symbol:data[srcIndex]},To:{Index:moveIndex,Symbol:data[moveIndex]},PreventDefault:false//PreventDefault 是否阻止内置的点击处理
|
|
12257
|
+
var bRedraw=false;if(this.DragRow){if(reportChart){this.OnDragRow();reportChart.DragRow=null;}bRedraw=true;}var dragHeader=this.DragHeader;this.DragHeader=null;this.DragXScroll=null;if(this.DragYScroll){bRedraw=true;this.DragYScroll=null;}this.DragRow=null;this.DragMove=null;this.DragColumnWidth=null;if(bRedraw)this.Draw();if(dragHeader){var clickData=dragHeader.ClickData;var moveToData=dragHeader.MoveToData;if(clickData&&moveToData){this.SwapColumn(clickData.Header.Index,moveToData.Header.Index,{Redraw:true});}else{this.OnClickHeader(clickData,e);}}if(mouseStatus)this.UIElement.style.cursor=mouseStatus.Cursor;};this.OnDragRow=function(){if(!this.SourceData||!IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))return;if(!this.DragRow||!this.DragRow.MoveRow)return;var drag=this.DragRow;var srcIndex=drag.Data.Row.DataIndex;var moveIndex=drag.MoveRow.Data.DataIndex;if(srcIndex==moveIndex||srcIndex<0||moveIndex<0)return;var data=this.SourceData.Data;if(srcIndex>=data.length||moveIndex>=data.length)return;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DRAG_ROW);if(event){var sendData={Symbol:this.Symbol,Src:{Index:srcIndex,Symbol:data[srcIndex]},To:{Index:moveIndex,Symbol:data[moveIndex]},PreventDefault:false//PreventDefault 是否阻止内置的点击处理
|
|
12248
12258
|
};event.Callback(event,sendData,this);if(sendData.PreventDefault)return;}if(this.DragRowType==1){//原始数据交换顺序
|
|
12249
12259
|
var temp=data[srcIndex];data[srcIndex]=data[moveIndex];data[moveIndex]=temp;this.Data.Data=data.slice(0);}else{//插入模式
|
|
12250
12260
|
var srcItem=data[srcIndex];data.splice(srcIndex,1);data.splice(moveIndex,0,srcItem);this.Data.Data=data.slice(0);}//更新选中行
|
|
@@ -12260,7 +12270,7 @@ var oneStep=this.YStepPixel;if(oneStep<=0)oneStep=5;var step=parseInt(moveUpDown
|
|
|
12260
12270
|
var oneStep=this.XStepPixel;if(oneStep<=0)oneStep=5;var step=parseInt(moveLeftRight/oneStep);//除以4个像素
|
|
12261
12271
|
if(step<=0)return false;if(!isLeft)step*=-1;if(this.MoveXOffset(step)){drag.IsXMove=true;this.Draw();}return true;};this.OnTouchMove=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var reportChart=this.GetReportChart();if(!reportChart)return;var touches=this.GetTouchData(e);if(this.IsPhoneDragging(e)){var drag=this.TouchDrag;this.TouchInfo.Move={X:touches[0].clientX,Y:touches[0].clientY};if(drag){this.PreventTouchEvent(e);var moveAngle=this.GetMoveAngle(drag.LastMove,{X:touches[0].clientX,Y:touches[0].clientY});var moveLeftRight=Math.abs(drag.LastMove.X-touches[0].clientX);var moveUpDown=Math.abs(drag.LastMove.Y-touches[0].clientY);if(drag.IsYMove==true){this.ShowPageInfo(true);if(!this.OnDragYOffset(drag,touches,moveUpDown,e))return;}else if(drag.IsXMove==true){if(!this.OnDragXOffset(drag,touches,moveLeftRight,e))return;}else if(moveUpDown>0&&moveAngle<this.TouchMoveMinAngle){this.ShowPageInfo(true);if(!this.OnDragYOffset(drag,touches,moveUpDown,e))return;}else if(moveLeftRight>0&&moveAngle>=this.TouchMoveMinAngle){if(!this.OnDragXOffset(drag,touches,moveLeftRight,e))return;}else{return;}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}}};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[JSReportChartContainer:OnTouchEnd]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.ShowPageInfo(false);this.OnTouchClick(this.TouchInfo,e);this.IsOnTouch=false;this.TouchDrag=null;this.TouchInfo=null;};this.OnTouchClick=function(touchInfo,e){if(!touchInfo||!touchInfo.Click)return false;if(touchInfo.Move)return false;var clickPoint=touchInfo.InsideClick;var reportChart=this.GetReportChart();if(!reportChart)return false;var clickData=reportChart.OnMouseDown(clickPoint.X,clickPoint.Y,e);if(!clickData)return false;if(clickData.Type==2||clickData.Type==4)//点击行
|
|
12262
12272
|
{if(clickData.Redraw==true)this.Draw();}else if(clickData.Type==3)//表头
|
|
12263
|
-
{this.OnClickHeader(clickData,e);}JSConsole.Chart.Log('[JSReportChartContainer:OnTouchClick] clickData',clickData);};this.GetTabChart=function(){var chart=this.ChartPaint[0];if(!chart)return null;return chart.Tab;};this.GetReportChart=function(){var chart=this.ChartPaint[0];return chart;};this.GotoNextPage=function(bCycle)//bCycle 是否循环
|
|
12273
|
+
{this.OnClickHeader(clickData,e);}JSConsole.Chart.Log('[JSReportChartContainer:OnTouchClick] clickData',clickData);};this.GetTabChart=function(){var chart=this.ChartPaint[0];if(!chart)return null;return chart.Tab;};this.GetVScrollbarChart=function(){var chart=this.ChartPaint[0];if(!chart)return null;return chart.VScrollbar;};this.GetReportChart=function(){var chart=this.ChartPaint[0];return chart;};this.GotoNextPage=function(bCycle)//bCycle 是否循环
|
|
12264
12274
|
{if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return false;var chart=this.ChartPaint[0];if(!chart)return false;var pageSize=chart.GetPageSize();if(pageSize>this.Data.Data.length)return false;if(this.Data.YOffset+pageSize>=this.Data.Data.length){if(bCycle===true){this.Data.YOffset=0;//循环到第1页
|
|
12265
12275
|
return true;}else{return false;}}this.Data.YOffset+=pageSize;var showDataCount=this.Data.Data.length-this.Data.YOffset;if(chart.SelectedModel==0){if(chart.SelectedRow>showDataCount-1)chart.SelectedRow=showDataCount-1;}return true;};this.GotoPreviousPage=function(bCycle)//bCycle 是否循环
|
|
12266
12276
|
{if(!this.Data||!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return false;var chart=this.ChartPaint[0];if(!chart)return false;var pageSize=chart.GetPageSize();if(pageSize>this.Data.Data.length)return false;if(this.Data.YOffset<=0){if(bCycle===true){this.Data.YOffset=this.Data.Data.length-pageSize;//循环到最后一页
|
|
@@ -12271,8 +12281,8 @@ return true;}else{return false;}}var offset=this.Data.YOffset;offset-=pageSize;i
|
|
|
12271
12281
|
if(chart.SelectedModel==0)//不可翻页模式, 只能在当前页移动
|
|
12272
12282
|
{var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.End-pageStatus.Start+1;var selected=pageStatus.SelectedRow;if(step>0){selected+=step;selected=selected%pageSize;chart.SelectedRow=selected;chart.SelectedFixedRow=-1;result.Redraw=true;return result;}else if(step<0){selected+=step;if(selected<0){selected=selected%pageSize;selected=pageSize+selected;}chart.SelectedRow=selected;chart.SelectedFixedRow=-1;result.Redraw=true;return result;}}else if(chart.SelectedModel==1)//可翻页模式
|
|
12273
12283
|
{var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.PageSize;var selected=pageStatus.SelectedRow;if(step>0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.Start;result.Redraw=true;return result;}var offset=this.Data.YOffset;for(var i=0;i<step;++i){++selected;if(selected>pageStatus.End)++offset;if(selected>=this.Data.Data.length){selected=0;offset=0;}}result.Redraw=true;result.Update=offset!=this.Data.YOffset;chart.SelectedRow=selected;this.Data.YOffset=offset;return result;}else if(step<0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.End;result.Redraw=true;return result;}step=Math.abs(step);var offset=this.Data.YOffset;for(var i=0;i<step;++i){--selected;if(selected<pageStatus.Start)--offset;if(selected<0){selected=this.Data.Data.length-1;offset=this.Data.Data.length-pageSize;if(offset<0)offset=0;}}result.Redraw=true;result.Update=offset!=this.Data.YOffset;chart.SelectedRow=selected;this.Data.YOffset=offset;return result;}}return null;};//左右移动
|
|
12274
|
-
this.MoveXOffset=function(step){var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetXScrollRange();if(maxOffset<=0)return false;if(step>0){if(this.Data.XOffset>=maxOffset)return false;for(var i=0;i<step;++i){if(this.Data.XOffset>=maxOffset)break;++this.Data.XOffset;}return true;}else if(step<0){if(this.Data.XOffset<=0)return false;step=Math.abs(step);for(var i=0;i<step;++i){if(this.Data.XOffset-1<0)break;--this.Data.XOffset;}return true;}return false;};this.SetXOffset=function(pos){if(!IFrameSplitOperator.IsNumber(pos))return false;var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetXScrollRange();if(pos<0)pos=0;if(pos>maxOffset)pos=maxOffset;this.Data.XOffset=pos;return true;};this.GotoLastPage=function(){var chart=this.ChartPaint[0];if(!chart)return;//显示最后一屏
|
|
12275
|
-
var pageSize=chart.GetPageSize(true);var offset=this.Data.Data.length-pageSize;if(offset<0)offset=0;this.Data.DataOffset=offset;};this.SetColumn=function(aryColunm,option){var chart=this.ChartPaint[0];if(!chart)return;chart.SetColumn(aryColunm);chart.SizeChange=true;if(option&&option.Redraw)this.Draw();};this.SetTab=function(aryTab,option){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SetTabList(aryTab);if(option&&option.Redraw)this.Draw();};this.SetSelectedTab=function(index,opiton){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SelectedTabIndex=index;};this.ReloadResource=function(option){this.Frame.ReloadResource(option);for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(item.ReloadResource)item.ReloadResource(option);}if(option&&option.Redraw){this.SetSizeChange(true);this.Draw();}};//点表头
|
|
12284
|
+
this.MoveXOffset=function(step){var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetXScrollRange();if(maxOffset<=0)return false;if(step>0){if(this.Data.XOffset>=maxOffset)return false;for(var i=0;i<step;++i){if(this.Data.XOffset>=maxOffset)break;++this.Data.XOffset;}return true;}else if(step<0){if(this.Data.XOffset<=0)return false;step=Math.abs(step);for(var i=0;i<step;++i){if(this.Data.XOffset-1<0)break;--this.Data.XOffset;}return true;}return false;};this.SetXOffset=function(pos){if(!IFrameSplitOperator.IsNumber(pos))return false;var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetXScrollRange();if(pos<0)pos=0;if(pos>maxOffset)pos=maxOffset;this.Data.XOffset=pos;return true;};this.SetYOffset=function(pos){if(!IFrameSplitOperator.IsNumber(pos))return false;var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetYScrollRange();if(pos<0)pos=0;if(pos>maxOffset)pos=maxOffset;this.Data.YOffset=pos;return true;};this.GotoLastPage=function(){var chart=this.ChartPaint[0];if(!chart)return;//显示最后一屏
|
|
12285
|
+
var pageSize=chart.GetPageSize(true);var offset=this.Data.Data.length-pageSize;if(offset<0)offset=0;this.Data.DataOffset=offset;};this.SetColumn=function(aryColunm,option){var chart=this.ChartPaint[0];if(!chart)return;chart.SetColumn(aryColunm);chart.SizeChange=true;if(option&&option.Redraw)this.Draw();};this.SetTab=function(aryTab,option){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SetTabList(aryTab);if(option&&option.Redraw)this.Draw();};this.SetVScrollbar=function(option){var chart=this.GetReportChart();if(!chart)return;var scrollbar=chart.VScrollbar;if(!scrollbar)return;if(IFrameSplitOperator.IsBool(option.Enable))scrollbar.Enable=option.Enable;};this.SetSelectedTab=function(index,opiton){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SelectedTabIndex=index;};this.ReloadResource=function(option){this.Frame.ReloadResource(option);for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(item.ReloadResource)item.ReloadResource(option);}if(option&&option.Redraw){this.SetSizeChange(true);this.Draw();}};//点表头
|
|
12276
12286
|
this.OnClickHeader=function(clickData,e){var _this55=this;var header=clickData.Header;if(header.Column&&(header.Column.Sort==1||header.Column.Sort==2)){var index=header.Index;var sortInfo={Field:this.SortInfo.Field,Sort:this.SortInfo.Sort};var arySortType=header.Column.SortType;if(sortInfo.Field!=index){sortInfo.Field=index;sortInfo.Sort=arySortType[0];}else{if(arySortType.length==1){sortInfo.Sort=arySortType[0];}else{for(var i=0;i<arySortType.length;++i){if(sortInfo.Sort==arySortType[i]){sortInfo.Sort=arySortType[(i+1)%arySortType.length];break;}}}}if(header.Column.Sort==1||header.Column.Sort==2){if(sortInfo.Sort==0){this.Data.Data=[];for(var i=0;i<this.SourceData.Data.length;++i){this.Data.Data.push(this.SourceData.Data[i]);}}else{if(header.Column.Sort==1)//本地排序
|
|
12277
12287
|
{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 _this55.LocalSort(left,right,header.Column,sortInfo.Sort);});}}else if(header.Column.Sort==2)//远程排序
|
|
12278
12288
|
{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);//远程排序
|
|
@@ -12345,7 +12355,7 @@ this.SelectedFixedRow=-1;//选中固定行ID
|
|
|
12345
12355
|
this.IsDrawBorder=1;//是否绘制单元格边框
|
|
12346
12356
|
this.ShowSymbol=[];//显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
|
|
12347
12357
|
this.DragRow;//拖拽行
|
|
12348
|
-
this.Tab;this.GlobalOption;//涨跌颜色
|
|
12358
|
+
this.Tab;this.VScrollbar;this.GlobalOption;//涨跌颜色
|
|
12349
12359
|
this.UpColor=g_JSChartResource.Report.UpTextColor;this.DownColor=g_JSChartResource.Report.DownTextColor;this.UnchagneColor=g_JSChartResource.Report.UnchagneTextColor;this.BorderColor=g_JSChartResource.Report.BorderColor;//边框线
|
|
12350
12360
|
this.SelectedColor=g_JSChartResource.Report.SelectedColor;//选中行
|
|
12351
12361
|
//表头配置
|
|
@@ -12369,7 +12379,7 @@ this.SelectedColor=g_JSChartResource.Report.SelectedColor;//选中行
|
|
|
12369
12379
|
//表头配置
|
|
12370
12380
|
this.HeaderFontConfig={Size:g_JSChartResource.Report.Header.Font.Size,Name:g_JSChartResource.Report.Header.Font.Name};this.HeaderColor=g_JSChartResource.Report.Header.Color;this.SortColor=g_JSChartResource.Report.Header.SortColor;//排序箭头颜色
|
|
12371
12381
|
this.HeaderMergin={Left:g_JSChartResource.Report.Header.Mergin.Left,Right:g_JSChartResource.Report.Header.Mergin.Right,Top:g_JSChartResource.Report.Header.Mergin.Top,Bottom:g_JSChartResource.Report.Header.Mergin.Bottom};//表格内容配置
|
|
12372
|
-
this.ItemFontConfig={Size:g_JSChartResource.Report.Item.Font.Size,Name:g_JSChartResource.Report.Item.Font.Name};this.ItemMergin={Left:g_JSChartResource.Report.Item.Mergin.Left,Right:g_JSChartResource.Report.Item.Mergin.Right,Top:g_JSChartResource.Report.Item.Mergin.Top,Bottom:g_JSChartResource.Report.Item.Mergin.Bottom};this.BarMergin={Top:g_JSChartResource.Report.Item.BarMergin.Top,Left:g_JSChartResource.Report.Item.BarMergin.Left,Right:g_JSChartResource.Report.Item.BarMergin.Right,Bottom:g_JSChartResource.Report.Item.BarMergin.Bottom};this.LimitBorderColor=g_JSChartResource.Report.LimitBorder.Color;this.LimitMergin={Top:g_JSChartResource.Report.LimitBorder.Mergin.Top,Left:g_JSChartResource.Report.LimitBorder.Mergin.Left,Right:g_JSChartResource.Report.LimitBorder.Mergin.Right,Bottom:g_JSChartResource.Report.LimitBorder.Mergin.Bottom};for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.INDEX_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Index;else if(item.Type==REPORT_COLUMN_ID.SYMBOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Symbol;else if(item.Type==REPORT_COLUMN_ID.NAME_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Name;else if(item.Type==REPORT_COLUMN_ID.VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.BUY_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.SELL_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.AMOUNT_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Amount;else if(item.Type==REPORT_COLUMN_ID.VOL_IN_ID)item.TextColor=g_JSChartResource.Report.DownTextColor;else if(item.Type==REPORT_COLUMN_ID.VOL_OUT_ID)item.TextColor=g_JSChartResource.Report.UpTextColor;else item.TextColor=g_JSChartResource.Report.FieldColor.Text;}if(this.Tab)this.Tab.ReloadResource(resource);};this.SetColumn=function(aryColumn){if(!IFrameSplitOperator.IsNonEmptyArray(aryColumn))return;this.Column=[];for(var i=0;i<aryColumn.length;++i){var item=aryColumn[i];var colItem=this.GetDefaultColunm(item.Type);if(!colItem)continue;if(item.Title)colItem.Title=item.Title;if(item.TextAlign)colItem.TextAlign=item.TextAlign;if(item.TextColor)colItem.TextColor=item.TextColor;if(item.MaxText)colItem.MaxText=item.MaxText;if(item.ID)colItem.ID=item.ID;if(IFrameSplitOperator.IsNumber(item.Sort))colItem.Sort=item.Sort;if(IFrameSplitOperator.IsBool(item.EnableTooltip))colItem.EnableTooltip=item.EnableTooltip;if(IFrameSplitOperator.IsNumber(item.FixedWidth))colItem.FixedWidth=item.FixedWidth;if(IFrameSplitOperator.IsBool(item.EnableDragWidth))colItem.EnableDragWidth=item.EnableDragWidth;if(IFrameSplitOperator.IsBool(item.IsDrawCallback))colItem.IsDrawCallback=item.IsDrawCallback;else colItem.IsDrawCallback=false;if(item.Sort==1||item.Sort==2)//1本地排序 2=远程排序
|
|
12382
|
+
this.ItemFontConfig={Size:g_JSChartResource.Report.Item.Font.Size,Name:g_JSChartResource.Report.Item.Font.Name};this.ItemMergin={Left:g_JSChartResource.Report.Item.Mergin.Left,Right:g_JSChartResource.Report.Item.Mergin.Right,Top:g_JSChartResource.Report.Item.Mergin.Top,Bottom:g_JSChartResource.Report.Item.Mergin.Bottom};this.BarMergin={Top:g_JSChartResource.Report.Item.BarMergin.Top,Left:g_JSChartResource.Report.Item.BarMergin.Left,Right:g_JSChartResource.Report.Item.BarMergin.Right,Bottom:g_JSChartResource.Report.Item.BarMergin.Bottom};this.LimitBorderColor=g_JSChartResource.Report.LimitBorder.Color;this.LimitMergin={Top:g_JSChartResource.Report.LimitBorder.Mergin.Top,Left:g_JSChartResource.Report.LimitBorder.Mergin.Left,Right:g_JSChartResource.Report.LimitBorder.Mergin.Right,Bottom:g_JSChartResource.Report.LimitBorder.Mergin.Bottom};for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.INDEX_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Index;else if(item.Type==REPORT_COLUMN_ID.SYMBOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Symbol;else if(item.Type==REPORT_COLUMN_ID.NAME_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Name;else if(item.Type==REPORT_COLUMN_ID.VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.BUY_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.SELL_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.AMOUNT_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Amount;else if(item.Type==REPORT_COLUMN_ID.VOL_IN_ID)item.TextColor=g_JSChartResource.Report.DownTextColor;else if(item.Type==REPORT_COLUMN_ID.VOL_OUT_ID)item.TextColor=g_JSChartResource.Report.UpTextColor;else item.TextColor=g_JSChartResource.Report.FieldColor.Text;}if(this.Tab)this.Tab.ReloadResource(resource);if(this.VScrollbar)this.VScrollbar.ReloadResource(resource);};this.SetColumn=function(aryColumn){if(!IFrameSplitOperator.IsNonEmptyArray(aryColumn))return;this.Column=[];for(var i=0;i<aryColumn.length;++i){var item=aryColumn[i];var colItem=this.GetDefaultColunm(item.Type);if(!colItem)continue;if(item.Title)colItem.Title=item.Title;if(item.TextAlign)colItem.TextAlign=item.TextAlign;if(item.TextColor)colItem.TextColor=item.TextColor;if(item.MaxText)colItem.MaxText=item.MaxText;if(item.ID)colItem.ID=item.ID;if(IFrameSplitOperator.IsNumber(item.Sort))colItem.Sort=item.Sort;if(IFrameSplitOperator.IsBool(item.EnableTooltip))colItem.EnableTooltip=item.EnableTooltip;if(IFrameSplitOperator.IsNumber(item.FixedWidth))colItem.FixedWidth=item.FixedWidth;if(IFrameSplitOperator.IsBool(item.EnableDragWidth))colItem.EnableDragWidth=item.EnableDragWidth;if(IFrameSplitOperator.IsBool(item.IsDrawCallback))colItem.IsDrawCallback=item.IsDrawCallback;else colItem.IsDrawCallback=false;if(item.Sort==1||item.Sort==2)//1本地排序 2=远程排序
|
|
12373
12383
|
{colItem.SortType=[1,2];//默认 降序 ,升序
|
|
12374
12384
|
if(IFrameSplitOperator.IsNonEmptyArray(item.SortType))colItem.SortType=item.SortType.slice();}if(item.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12375
12385
|
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
@@ -12383,14 +12393,14 @@ if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIn
|
|
|
12383
12393
|
colItem.ValueType=0;//0=yyyymmdd 1=hhmmss
|
|
12384
12394
|
if(IFrameSplitOperator.IsNumber(item.FormatType))colItem.FormatType=item.FormatType;//输出样式
|
|
12385
12395
|
if(IFrameSplitOperator.IsNumber(item.ValueType))colItem.FormatType=item.ValueType;//输出样式
|
|
12386
|
-
}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){}else if(item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){if(IFrameSplitOperator.IsBool(item.IsDrawArea))colItem.IsDrawArea=item.IsDrawArea;}this.Column.push(colItem);}};this.SwapColumn=function(leftIndex,rightIndex){if(!IFrameSplitOperator.IsNumber(leftIndex)||!IFrameSplitOperator.IsNumber(rightIndex))return false;var count=this.Column.length;if(leftIndex<0||leftIndex>=count)return false;if(rightIndex<0||rightIndex>=count)return false;if(leftIndex==rightIndex)return;var tempItem=this.Column[leftIndex];this.Column[leftIndex]=this.Column[rightIndex];this.Column[rightIndex]=tempItem;return true;};this.GetXScrollPos=function(){return this.Data.XOffset;};this.GetXScrollRange=function(){var maxOffset=this.Column.length-this.FixedColumn-3;if(maxOffset<0)return 0;return maxOffset;};this.GetDefaultColunm=function(id){var DEFAULT_COLUMN=[{Type:REPORT_COLUMN_ID.INDEX_ID,Title:"序号",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Index,MaxText:"8888"},{Type:REPORT_COLUMN_ID.SYMBOL_ID,Title:"代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Symbol,MaxText:"888888"},{Type:REPORT_COLUMN_ID.NAME_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.NAME_EX_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_ID,Title:"股票名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.INCREASE_ID,Title:"涨幅%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.PRICE_ID,Title:"现价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.UPDOWN_ID,Title:"涨跌",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.AMPLITUDE_ID,Title:"振幅%",TextAlign:"right",Width:null,MaxText:"888.88"},{Type:REPORT_COLUMN_ID.BUY_PRICE_ID,Title:"买价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.SELL_PRICE_ID,Title:"卖价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.AVERAGE_PRICE_ID,Title:"均价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.OPEN_ID,Title:"今开",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.HIGH_ID,Title:"最高",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.LOW_ID,Title:"最低",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.YCLOSE_ID,Title:"昨收",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.VOL_ID,Title:"总量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.AMOUNT_ID,Title:"总金额",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Amount,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.EXCHANGE_RATE_ID,Title:"换手%",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"88.88"},{Type:REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID,Title:"流通股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.TOTAL_SHARES_ID,Title:"总股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID,Title:"流通市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.MARKET_VALUE_ID,Title:"总市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_IN_ID,Title:"内盘",TextAlign:"right",TextColor:g_JSChartResource.Report.DownTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_OUT_ID,Title:"外盘",TextAlign:"right",TextColor:g_JSChartResource.Report.UpTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CLOSE_LINE_ID,Title:"走势",TextAlign:"center",TextColor:g_JSChartResource.Report.CloseLineColor,Width:null,MaxText:"88888.88888"},{Type:REPORT_COLUMN_ID.BUY_VOL_ID,Title:"买量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.SELL_VOL_ID,Title:"卖量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},//{ Type:REPORT_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12396
|
+
}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){}else if(item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){if(IFrameSplitOperator.IsBool(item.IsDrawArea))colItem.IsDrawArea=item.IsDrawArea;}this.Column.push(colItem);}};this.SwapColumn=function(leftIndex,rightIndex){if(!IFrameSplitOperator.IsNumber(leftIndex)||!IFrameSplitOperator.IsNumber(rightIndex))return false;var count=this.Column.length;if(leftIndex<0||leftIndex>=count)return false;if(rightIndex<0||rightIndex>=count)return false;if(leftIndex==rightIndex)return;var tempItem=this.Column[leftIndex];this.Column[leftIndex]=this.Column[rightIndex];this.Column[rightIndex]=tempItem;return true;};this.GetXScrollPos=function(){return this.Data.XOffset;};this.GetXScrollRange=function(){var maxOffset=this.Column.length-this.FixedColumn-3;if(maxOffset<0)return 0;return maxOffset;};this.GetYScrollRange=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return 0;var maxOffset=this.Data.Data.length-this.RowCount;return maxOffset;};this.GetDefaultColunm=function(id){var DEFAULT_COLUMN=[{Type:REPORT_COLUMN_ID.INDEX_ID,Title:"序号",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Index,MaxText:"8888"},{Type:REPORT_COLUMN_ID.SYMBOL_ID,Title:"代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Symbol,MaxText:"888888"},{Type:REPORT_COLUMN_ID.NAME_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.NAME_EX_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_ID,Title:"股票名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.INCREASE_ID,Title:"涨幅%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.PRICE_ID,Title:"现价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.UPDOWN_ID,Title:"涨跌",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.AMPLITUDE_ID,Title:"振幅%",TextAlign:"right",Width:null,MaxText:"888.88"},{Type:REPORT_COLUMN_ID.BUY_PRICE_ID,Title:"买价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.SELL_PRICE_ID,Title:"卖价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.AVERAGE_PRICE_ID,Title:"均价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.OPEN_ID,Title:"今开",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.HIGH_ID,Title:"最高",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.LOW_ID,Title:"最低",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.YCLOSE_ID,Title:"昨收",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.VOL_ID,Title:"总量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.AMOUNT_ID,Title:"总金额",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Amount,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.EXCHANGE_RATE_ID,Title:"换手%",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"88.88"},{Type:REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID,Title:"流通股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.TOTAL_SHARES_ID,Title:"总股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID,Title:"流通市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.MARKET_VALUE_ID,Title:"总市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_IN_ID,Title:"内盘",TextAlign:"right",TextColor:g_JSChartResource.Report.DownTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_OUT_ID,Title:"外盘",TextAlign:"right",TextColor:g_JSChartResource.Report.UpTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CLOSE_LINE_ID,Title:"走势",TextAlign:"center",TextColor:g_JSChartResource.Report.CloseLineColor,Width:null,MaxText:"88888.88888"},{Type:REPORT_COLUMN_ID.BUY_VOL_ID,Title:"买量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.SELL_VOL_ID,Title:"卖量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},//{ Type:REPORT_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12387
12397
|
//{ Type:REPORT_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12388
12398
|
{Type:REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CUSTOM_ICON_ID,Title:" ",TextAlign:"left",FixedWidth:20,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.KLINE_ID,Title:"K线",TextAlign:"left",FixedWidth:50,TextColor:g_JSChartResource.Report.FieldColor.Text}];for(var i=0;i<DEFAULT_COLUMN.length;++i){var item=DEFAULT_COLUMN[i];if(item.Type==id)return item;}return null;};this.Draw=function(){this.ShowSymbol=[];this.TooltipRect=[];if(this.GlobalOption)this.GlobalOption.FlashBGCount=0;if(this.SizeChange)this.CalculateSize();else this.UpdateCacheData();this.Canvas.save();this.Canvas.beginPath();this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,this.RectClient.Right-this.RectClient.Left,this.RectClient.Bottom-this.RectClient.Top);//this.Canvas.stroke(); //调试用
|
|
12389
|
-
this.Canvas.clip();this.DrawHeader();this.DrawBody();this.Canvas.restore();if(this.Tab&&this.BottomToolbarHeight>0){var bottom=this.ChartBorder.GetBottom();this.Tab.DrawTab(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);this.Tab.DrawScrollbar(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);}this.DrawBorder();this.DrawDragRow();this.SizeChange=false;};//更新缓存变量
|
|
12399
|
+
this.Canvas.clip();this.DrawHeader();this.DrawBody();this.Canvas.restore();if(this.Tab&&this.BottomToolbarHeight>0){var bottom=this.ChartBorder.GetBottom();this.Tab.DrawTab(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);this.Tab.DrawScrollbar(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);}this.DrawBorder();this.DrawDragRow();if(this.VScrollbar){var bottom=this.ChartBorder.GetBottom();this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight,this.RectClient.Right,bottom-this.BottomToolbarHeight-4);}this.SizeChange=false;};//更新缓存变量
|
|
12390
12400
|
this.UpdateCacheData=function(){this.RectClient.Left=this.ChartBorder.GetLeft();this.RectClient.Right=this.ChartBorder.GetRight();this.RectClient.Top=this.ChartBorder.GetTop();this.RectClient.Bottom=this.ChartBorder.GetBottom()-this.BottomToolbarHeight;};this.GetPageSize=function(recalculate)//recalculate 是否重新计算
|
|
12391
12401
|
{if(recalculate)this.CalculateSize();var size=this.RowCount;return size;};this.GetCurrentPageStatus=function()//{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
12392
12402
|
{var result={Start:this.Data.YOffset,PageSize:this.RowCount,IsEnd:false,SelectedRow:this.SelectedRow,IsSinglePage:false,DataCount:0};if(IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)){result.End=this.Data.YOffset+this.RowCount-1;result.IsSinglePage=this.Data.Data.length<=this.RowCount;result.DataCount=this.Data.Data.length;if(result.End>=this.Data.Data.length-1)result.IsEnd=true;if(result.End>=this.Data.Data.length)result.End=this.Data.Data.length-1;}else{result.Start=0;result.End=0;result.IsEnd=true;result.IsSinglePage=true;}return result;};this.CalculateSize=function()//计算大小
|
|
12393
|
-
{if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else{if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}}this.Canvas.font=this.HeaderFont;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(!item.Title||item.Title.length<=0)continue;var text=item.Title;if(item.Sort>0)text+="↓";itemWidth=this.Canvas.measureText(text).width;itemWidth+=4+this.HeaderMergin.Left+this.HeaderMergin.Right;if(item.Width<itemWidth)item.Width=itemWidth;}this.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;var textLeft=left;//固定列
|
|
12403
|
+
{if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}if(this.VScrollbar&&this.VScrollbar.Enable)this.VScrollbar.CalculateSize();this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else{if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}}this.Canvas.font=this.HeaderFont;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(!item.Title||item.Title.length<=0)continue;var text=item.Title;if(item.Sort>0)text+="↓";itemWidth=this.Canvas.measureText(text).width;itemWidth+=4+this.HeaderMergin.Left+this.HeaderMergin.Right;if(item.Width<itemWidth)item.Width=itemWidth;}this.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;var textLeft=left;//固定列
|
|
12394
12404
|
for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];var itemWidth=item.Width;var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;var x=textLeft+this.HeaderMergin.Left;if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,y,textWidth,this.SortInfo.Sort);}else{this.DrawText(item.Title,item.TextAlign,x,y,textWidth);}textLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];var itemWidth=item.Width;var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;var x=textLeft+this.HeaderMergin.Left;if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,y,textWidth,this.SortInfo.Sort);}else{this.DrawText(item.Title,item.TextAlign,x,y,textWidth);}textLeft+=item.Width;}};this.DrawText=function(text,textAlign,x,y,textWidth){if(textAlign=='center'){x=x+textWidth/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=x+textWidth;this.Canvas.textAlign="right";}else{this.Canvas.textAlign="left";}this.Canvas.textBaseline="middle";this.Canvas.fillText(text,x,y);};this.DrawSortHeader=function(text,textAlign,x,y,width,sortType){var sortText=sortType==1?"↓":"↑";var sortTextWidth=this.Canvas.measureText(sortText).width;var textWidth=this.Canvas.measureText(text).width+2;this.Canvas.textBaseline="middle";this.Canvas.textAlign="left";if(textAlign=='center'){x=x+width/2-(sortTextWidth+textWidth)/2;}else if(textAlign=='right'){x=x+width-sortTextWidth-textWidth;}else{}this.Canvas.fillText(text,x,y);this.Canvas.fillStyle=this.SortColor;this.Canvas.fillText(sortText,x+textWidth,y);this.Canvas.fillStyle=this.HeaderColor;};this.DrawBorder=function(){if(!this.IsDrawBorder)return;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=this.RectClient.Bottom;this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(top+this.HeaderHeight));this.Canvas.lineTo(right,ToFixedPoint(top+this.HeaderHeight));var rowTop=top+this.HeaderHeight+this.RowHeight;var rotBottom=rowTop;for(var i=0;i<this.FixedRowCount;++i){var drawTop=ToFixedPoint(rowTop);this.Canvas.moveTo(left,drawTop);this.Canvas.lineTo(right,drawTop);rotBottom=rowTop;rowTop+=this.FixedRowHeight;}var rowTop=top+this.HeaderHeight+this.RowHeight+this.FixedRowHeight*this.FixedRowCount;var rotBottom=rowTop;//横线
|
|
12395
12405
|
for(var i=0;i<this.RowCount;++i){var drawTop=ToFixedPoint(rowTop);this.Canvas.moveTo(left,drawTop);this.Canvas.lineTo(right,drawTop);rotBottom=rowTop;rowTop+=this.RowHeight;}//竖线
|
|
12396
12406
|
var columnLeft=left;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];var drawLeft=ToFixedPoint(columnLeft+item.Width);this.Canvas.moveTo(drawLeft,top);this.Canvas.lineTo(drawLeft,rotBottom);columnLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];var drawLeft=ToFixedPoint(columnLeft+item.Width);this.Canvas.moveTo(drawLeft,top);this.Canvas.lineTo(drawLeft,rotBottom);columnLeft+=item.Width;}this.Canvas.stroke();};this.DrawBody=function(){if(!this.Data)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;this.Canvas.font=this.ItemFont;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var rowWidth=this.RectClient.Right-this.RectClient.Left;//固定行
|
|
@@ -12435,13 +12445,14 @@ this.DrawKLine=function(klineData,column,rtItem,data){if(column.IsDrawCallback)/
|
|
|
12435
12445
|
{this.DrawKBarItem(item,dataWidth,this.KLineConfig.UnchagneColor,0,xLeft,xRight,yLow,yHigh,yOpen,yClose);}}};this.DrawKBarItem=function(data,dataWidth,barColor,drawType,left,right,yLow,yHigh,yOpen,yClose){var isEmptyBar=false;if(drawType==1)isEmptyBar=true;var yBarTop=Math.min(yOpen,yClose);var yBarBottom=Math.max(yOpen,yClose);var barTopValue=Math.max(data.Open,data.Close);var barBottomValue=Math.min(data.Open,data.Close);this.Canvas.fillStyle=barColor;this.Canvas.strokeStyle=barColor;var x=left+(right-left)/2;if(isEmptyBar){if(dataWidth%2!=0)dataWidth-=1;}if(dataWidth>=4){if(data.High>barTopValue){this.Canvas.beginPath();var xBar=x;if(isEmptyBar)xBar=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarTop));this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yHigh));this.Canvas.stroke();}if(Math.abs(yBarBottom-yBarTop)<1){this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(yBarTop),ToFixedRect(dataWidth),1);//高度小于1,统一使用高度1
|
|
12436
12446
|
}else{if(isEmptyBar){this.Canvas.beginPath();this.Canvas.rect(ToFixedPoint(left),ToFixedPoint(yBarTop),ToFixedRect(dataWidth),ToFixedRect(yBarBottom-yBarTop));this.Canvas.stroke();}else{this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(yBarTop),ToFixedRect(dataWidth),ToFixedRect(yBarBottom-yBarTop));}}if(data.Low<barBottomValue){this.Canvas.beginPath();var xBar=x;if(isEmptyBar)xBar=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarBottom));this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yLow));this.Canvas.stroke();}}else{}};this.SetFillStyle=function(color,x0,y0,x1,y1){if(Array.isArray(color)){var gradient=this.Canvas.createLinearGradient(x0,y0,x1,y1);var offset=1/color.length;for(var i in color){gradient.addColorStop(i*offset,color[i]);}this.Canvas.fillStyle=gradient;}else{this.Canvas.fillStyle=color;}};//外部配置显示格式 颜色 对齐方式
|
|
12437
12447
|
this.GetCustomTextDrawInfo=function(columnInfo,symbol,value,drawInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_CUSTOM_TEXT);if(!event||!event.Callback)return false;var sendData={Symbol:symbol,Column:columnInfo,Value:value,Data:data,Out:{Text:null,TextColor:null,TextAlign:null}};event.Callback(event,sendData,this);if(sendData.Out.Text)drawInfo.Text=sendData.Out.Text;if(sendData.Out.TextColor)drawInfo.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)drawInfo.TextAlign=sendData.Out.TextAlign;if(sendData.Out.BGColor)drawInfo.BGColor=sendData.Out.BGColor;return true;};this.FormatDrawInfo=function(column,stock,drawInfo,data){if(!column.IsDrawCallback)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_FORMAT_DRAW_INFO);if(!event||!event.Callback)return false;var sendData={Stock:stock,Column:column,Data:data,DrawInfo:drawInfo};event.Callback(event,sendData,this);};this.GetFixedRowTextDrawInfo=function(rowIndex,colIndex,columnInfo,drawInfo){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_FIXEDROW_TEXT);if(!event||!event.Callback)return false;var sendData={RowIndex:rowIndex,ColIndex:colIndex,Column:columnInfo,Data:this.FixedRowData,Out:{Text:null,TextColor:null,TextAlign:null}};event.Callback(event,sendData,this);if(sendData.Out.Text)drawInfo.Text=sendData.Out.Text;if(sendData.Out.TextColor)drawInfo.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)drawInfo.TextAlign=sendData.Out.TextAlign;return true;};this.GetVolColor=function(colunmInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_DEAL_VOL_COLOR);if(event&&event.Callback){var sendData={Data:data,TextColor:null};event.Callback(event,sendData,this);if(sendData.TextColor)return sendData.TextColor;}return colunmInfo.TextColor;};//获取股票名称颜色
|
|
12438
|
-
this.GetNameColor=function(colunmInfo,symbol,rowType){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_NAME_COLOR);if(event&&event.Callback){var sendData={Symbol:symbol,TextColor:null,RowType:rowType};event.Callback(event,sendData,this);if(sendData.TextColor)return sendData.TextColor;}return colunmInfo.TextColor;};this.GetFontHeight=function(font,word){return GetFontHeight(this.Canvas,font,word);};this.OnMouseDown=function(x,y,e)//Type: 1=tab 4=固定行 2=行 3=表头
|
|
12448
|
+
this.GetNameColor=function(colunmInfo,symbol,rowType){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_NAME_COLOR);if(event&&event.Callback){var sendData={Symbol:symbol,TextColor:null,RowType:rowType};event.Callback(event,sendData,this);if(sendData.TextColor)return sendData.TextColor;}return colunmInfo.TextColor;};this.GetFontHeight=function(font,word){return GetFontHeight(this.Canvas,font,word);};this.OnMouseDown=function(x,y,e)//Type: 1=tab 4=固定行 2=行 3=表头 5=右侧滚动条
|
|
12439
12449
|
{if(!this.Data)return null;if(this.Tab){var tab=this.Tab.OnMouseDown(x,y,e);if(tab)return{Type:1,Tab:tab};//底部工具栏
|
|
12450
|
+
}if(this.VScrollbar){var item=this.VScrollbar.OnMouseDown(x,y,e);if(item)return{Type:5,VScrollbar:item};//右侧滚动条
|
|
12440
12451
|
}var pixelTatio=GetDevicePixelRatio();var insidePoint={X:x/pixelTatio,Y:y/pixelTatio};if(this.UIElement)var uiElement={Left:this.UIElement.getBoundingClientRect().left,Top:this.UIElement.getBoundingClientRect().top};else var uiElement={Left:null,Top:null};var row=this.PtInFixedBody(x,y);if(row){var bRedraw=true;var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_FIXEDROW;if(e.button==2)eventID=JSCHART_EVENT_ID.ON_RCLICK_REPORT_FIXEDROW;this.SendClickEvent(eventID,{Data:row,X:x,Y:y,e:e,Inside:insidePoint,UIElement:uiElement});this.SelectedFixedRow=row.Index;this.SelectedRow=-1;return{Type:4,Redraw:bRedraw,Row:row};//行
|
|
12441
12452
|
}var row=this.PtInBody(x,y);if(row){var bRedraw=true;if(this.SelectedModel==0){if(this.SelectedRow==row.Index)bRedraw=false;this.SelectedRow=row.Index;this.SelectedFixedRow=-1;}else{if(this.SelectedRow==row.DataIndex)bRedraw=false;this.SelectedRow=row.DataIndex;this.SelectedFixedRow=-1;}var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_ROW;if(e.button==2)eventID=JSCHART_EVENT_ID.ON_RCLICK_REPORT_ROW;this.SendClickEvent(eventID,{Data:row,X:x,Y:y,e:e,Inside:insidePoint,UIElement:uiElement});return{Type:2,Redraw:bRedraw,Row:row};//行
|
|
12442
12453
|
}var header=this.PtInHeader(x,y);if(header){var eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_HEADER;if(e.button==2){eventID=JSCHART_EVENT_ID.ON_RCLICK_REPORT_HEADER;}else if(e.button==0){eventID=JSCHART_EVENT_ID.ON_CLICK_REPORT_HEADER;}this.SendClickEvent(eventID,{Data:row,X:x,Y:y,e:e,Inside:insidePoint,UIElement:uiElement});return{Type:3,Redraw:bRedraw,Header:header};//表头
|
|
12443
12454
|
}return null;};this.OnDrawgRow=function(x,y,e)//Type: 5=顶部 6=空白行 2=行 7=底部
|
|
12444
|
-
{if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;var topOffset=this.RowHeight/2;var top=this.RectClient.Top+this.HeaderHeight;var right=this.ChartBorder.GetChartWidth();var textTop=top+this.FixedRowHeight*this.FixedRowCount;if(y<textTop+topOffset)return{Type:5};for(var i=this.Data.YOffset,j=0;i<this.Data.Data.length&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRow={Left:0,Top:textTop,Right:right,Bottom:textTop+this.RowHeight};rtRow.Top+=topOffset;rtRow.Bottom+=topOffset;if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={DataIndex:i,Index:j,Symbol:symbol,Pos:0};if(j==0)data.Pos=1;else if(j==this.RowCount-1)data.Pos=2;return{Type:2,Data:data};}textTop+=this.RowHeight;}if(j<this.RowCount)return{Type:6};return{Type:7};};this.OnDblClick=function(x,y,e){if(!this.Data)return false;var header=this.PtInHeaderDragBorder(x,y);if(header){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_REPORT_DRAG_COLUMN_WIDTH,{Data:header,X:x,Y:y});return true;}var row=this.PtInBody(x,y);if(row){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_REPORT_ROW,{Data:row,X:x,Y:y});return true;}return false;};this.PtInBody=function(x,y){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var rowWidth=this.RectClient.Right-this.RectClient.Left;var textTop=top+this.FixedRowHeight*this.FixedRowCount;for(var i=this.Data.YOffset,j=0;i<this.Data.Data.length&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRow={Left:left,Top:textTop,Right:right,Bottom:textTop+this.RowHeight};if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,DataIndex:i,Index:j,Symbol:symbol};data.Item=this.PtInItem(x,y,rtRow.Top,rtRow.Bottom);return data;}textTop+=this.RowHeight;}return null;};this.PtInFixedBody=function(x,y){if(this.FixedRowCount<=0)return null;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var rowWidth=this.RectClient.Right-this.RectClient.Left;var textTop=top;for(var i=0;i<this.FixedRowCount;++i){var rtRow={Left:left,Top:textTop,Right:right,Bottom:textTop+this.FixedRowHeight};if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,Index:i};data.Item=this.PtInItem(x,y,rtRow.Top,rtRow.Bottom);return data;}textTop+=this.FixedRowHeight;}return null;};this.PtInItem=function(x,y,top,bottom){var left=this.RectClient.Left;var right=this.RectClient.Right;var textLeft=left;//固定列
|
|
12455
|
+
{if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;var topOffset=this.RowHeight/2;var top=this.RectClient.Top+this.HeaderHeight;var right=this.ChartBorder.GetChartWidth();var textTop=top+this.FixedRowHeight*this.FixedRowCount;if(y<textTop+topOffset)return{Type:5};for(var i=this.Data.YOffset,j=0;i<this.Data.Data.length&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRow={Left:0,Top:textTop,Right:right,Bottom:textTop+this.RowHeight};rtRow.Top+=topOffset;rtRow.Bottom+=topOffset;if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={DataIndex:i,Index:j,Symbol:symbol,Pos:0};if(j==0)data.Pos=1;else if(j==this.RowCount-1)data.Pos=2;return{Type:2,Data:data};}textTop+=this.RowHeight;}if(j<this.RowCount)return{Type:6};return{Type:7};};this.OnDblClick=function(x,y,e){if(!this.Data)return false;var header=this.PtInHeaderDragBorder(x,y);if(header){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_REPORT_DRAG_COLUMN_WIDTH,{Data:header,X:x,Y:y});return true;}var row=this.PtInBody(x,y);if(row){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_REPORT_ROW,{Data:row,X:x,Y:y});return true;}return false;};this.PtInClient=function(x,y){if(x>this.RectClient.Left&&x<this.RectClient.Right&&y>this.RectClient.Top&&y<this.RectClient.Bottom)return true;return false;};this.PtInBody=function(x,y){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var rowWidth=this.RectClient.Right-this.RectClient.Left;var textTop=top+this.FixedRowHeight*this.FixedRowCount;for(var i=this.Data.YOffset,j=0;i<this.Data.Data.length&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRow={Left:left,Top:textTop,Right:right,Bottom:textTop+this.RowHeight};if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,DataIndex:i,Index:j,Symbol:symbol};data.Item=this.PtInItem(x,y,rtRow.Top,rtRow.Bottom);return data;}textTop+=this.RowHeight;}return null;};this.PtInFixedBody=function(x,y){if(this.FixedRowCount<=0)return null;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var rowWidth=this.RectClient.Right-this.RectClient.Left;var textTop=top;for(var i=0;i<this.FixedRowCount;++i){var rtRow={Left:left,Top:textTop,Right:right,Bottom:textTop+this.FixedRowHeight};if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,Index:i};data.Item=this.PtInItem(x,y,rtRow.Top,rtRow.Bottom);return data;}textTop+=this.FixedRowHeight;}return null;};this.PtInItem=function(x,y,top,bottom){var left=this.RectClient.Left;var right=this.RectClient.Right;var textLeft=left;//固定列
|
|
12445
12456
|
for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];var header={Left:textLeft,Right:textLeft+item.Width,Top:top,Bottom:bottom};if(x>=header.Left&&x<=header.Right&&y>=header.Top&&y<=header.Bottom){return{Rect:header,Column:item,Index:i,IsFixed:true};}textLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];if(textLeft>=right)break;var header={Left:textLeft,Right:textLeft+item.Width,Top:top,Bottom:bottom};if(x>=header.Left&&x<=header.Right&&y>=header.Top&&y<=header.Bottom){return{Rect:header,Column:item,Index:i,IsFixed:false};}textLeft+=item.Width;}return null;};this.PtInHeader=function(x,y){if(!this.IsShowHeader)return null;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=top+this.HeaderHeight;if(!(x>=left&&x<=right&&y>=top&&y<=bottom))return null;return this.PtInItem(x,y,top,bottom);};this.IsPtInBody=function(x,y){var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var bottom=this.RectClient.Bottom;if(x>=left&&x<=right&&y>=top&&y<=bottom)return true;return false;};this.IsPtInHeader=function(x,y){if(!this.IsShowHeader)return false;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=top+this.HeaderHeight;if(x>=left&&x<=right&&y>=top&&y<=bottom)return true;return false;};this.SendClickEvent=function(id,data){var event=this.GetEventCallback(id);if(event&&event.Callback){event.Callback(event,data,this);}};this.DrawDragRow=function(){if(!this.DragRow)return;var drag=this.DragRow;if(!drag.Data||!drag.Inside||!drag.Data.Row)return;var dataIndex=drag.Data.Row.DataIndex;if(!IFrameSplitOperator.IsNumber(dataIndex)||dataIndex<0)return;var textTop=drag.Inside.Y-this.RowHeight/2;var top=textTop;var left=this.RectClient.Left;var rowWidth=this.RectClient.Right-this.RectClient.Left;//背景
|
|
12446
12457
|
this.Canvas.fillStyle=this.DragRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);var symbol=this.Data.Data[dataIndex];var data={Symbol:symbol,Stock:null,Block:null};if(this.GetStockDataCallback)data.Stock=this.GetStockDataCallback(symbol);if(this.GetBlockDataCallback)data.Block=this.GetBlockDataCallback(symbol);data.Decimal=GetfloatPrecision(symbol);//小数位数
|
|
12447
12458
|
var chartRight=this.RectClient.Right;this.Canvas.font=this.ItemFont;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,3);left+=item.Width;if(left>=chartRight)break;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,3);left+=item.Width;if(left>=chartRight)break;}};//坐标所在单元格
|
|
@@ -12473,7 +12484,18 @@ this.ChartFrame;//框架画法
|
|
|
12473
12484
|
this.Name;//名称
|
|
12474
12485
|
this.ClassName='ChartPageInfo';//类名
|
|
12475
12486
|
this.IsDrawFirst=false;this.IsShow=false;//是否显示
|
|
12476
|
-
this.SizeChange=true;this.Report;this.FontConfig={Size:g_JSChartResource.Report.PageInfo.Font.Size,Name:g_JSChartResource.Report.PageInfo.Font.Name};this.TextColor=g_JSChartResource.Report.PageInfo.TextColor;this.BGColor=g_JSChartResource.Report.PageInfo.BGColor;this.Mergin={Top:g_JSChartResource.Report.PageInfo.Mergin.Top,Left:g_JSChartResource.Report.PageInfo.Mergin.Left,Right:g_JSChartResource.Report.PageInfo.Mergin.Right,Bottom:g_JSChartResource.Report.PageInfo.Mergin.Bottom};this.Font;this.TextHeight=0;this.ReloadResource=function(resource){this.FontConfig={Size:g_JSChartResource.Report.PageInfo.Font.Size,Name:g_JSChartResource.Report.PageInfo.Font.Name};this.TextColor=g_JSChartResource.Report.PageInfo.TextColor;this.BGColor=g_JSChartResource.Report.PageInfo.BGColor;this.Mergin={Top:g_JSChartResource.Report.PageInfo.Mergin.Top,Left:g_JSChartResource.Report.PageInfo.Mergin.Left,Right:g_JSChartResource.Report.PageInfo.Mergin.Right,Bottom:g_JSChartResource.Report.PageInfo.Mergin.Bottom};};this.Draw=function(){if(!this.IsShow)return;if(!this.Report)return;var pageStatus=this.Report.GetCurrentPageStatus();if(pageStatus.IsSinglePage)return;if(this.SizeChange){var pixelRatio=GetDevicePixelRatio();this.Font=this.FontConfig.Size*pixelRatio+'px '+this.FontConfig.Name;this.TextHeight=GetFontHeight(this.Canvas,this.Font,"擎")+this.Mergin.Top+this.Mergin.Bottom;}var left=this.ChartBorder.GetLeft();var right=this.ChartBorder.GetRight();var bottom=this.ChartBorder.GetBottom()-2;var center=left+(right-left)/2;var text=pageStatus.DataCount+'/'+pageStatus.DataCount;this.Canvas.font=this.Font;var textWidth=this.Canvas.measureText(text).width+4;var bgLeft=center-textWidth/2-this.Mergin.Left;var bgTop=bottom-this.TextHeight;this.Canvas.fillStyle=this.BGColor;;this.Canvas.fillRect(bgLeft,bgTop,textWidth+(this.Mergin.Left+this.Mergin.Right),this.TextHeight);text=pageStatus.Start+1+'/'+pageStatus.DataCount;this.Canvas.textAlign="center";this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=this.TextColor;this.Canvas.fillText(text,center,bottom-this.Mergin.Bottom);this.SizeChange=false;};}
|
|
12487
|
+
this.SizeChange=true;this.Report;this.FontConfig={Size:g_JSChartResource.Report.PageInfo.Font.Size,Name:g_JSChartResource.Report.PageInfo.Font.Name};this.TextColor=g_JSChartResource.Report.PageInfo.TextColor;this.BGColor=g_JSChartResource.Report.PageInfo.BGColor;this.Mergin={Top:g_JSChartResource.Report.PageInfo.Mergin.Top,Left:g_JSChartResource.Report.PageInfo.Mergin.Left,Right:g_JSChartResource.Report.PageInfo.Mergin.Right,Bottom:g_JSChartResource.Report.PageInfo.Mergin.Bottom};this.Font;this.TextHeight=0;this.ReloadResource=function(resource){this.FontConfig={Size:g_JSChartResource.Report.PageInfo.Font.Size,Name:g_JSChartResource.Report.PageInfo.Font.Name};this.TextColor=g_JSChartResource.Report.PageInfo.TextColor;this.BGColor=g_JSChartResource.Report.PageInfo.BGColor;this.Mergin={Top:g_JSChartResource.Report.PageInfo.Mergin.Top,Left:g_JSChartResource.Report.PageInfo.Mergin.Left,Right:g_JSChartResource.Report.PageInfo.Mergin.Right,Bottom:g_JSChartResource.Report.PageInfo.Mergin.Bottom};};this.Draw=function(){if(!this.IsShow)return;if(!this.Report)return;var pageStatus=this.Report.GetCurrentPageStatus();if(pageStatus.IsSinglePage)return;if(this.SizeChange){var pixelRatio=GetDevicePixelRatio();this.Font=this.FontConfig.Size*pixelRatio+'px '+this.FontConfig.Name;this.TextHeight=GetFontHeight(this.Canvas,this.Font,"擎")+this.Mergin.Top+this.Mergin.Bottom;}var left=this.ChartBorder.GetLeft();var right=this.ChartBorder.GetRight();var bottom=this.ChartBorder.GetBottom()-2;var center=left+(right-left)/2;var text=pageStatus.DataCount+'/'+pageStatus.DataCount;this.Canvas.font=this.Font;var textWidth=this.Canvas.measureText(text).width+4;var bgLeft=center-textWidth/2-this.Mergin.Left;var bgTop=bottom-this.TextHeight;this.Canvas.fillStyle=this.BGColor;;this.Canvas.fillRect(bgLeft,bgTop,textWidth+(this.Mergin.Left+this.Mergin.Right),this.TextHeight);text=pageStatus.Start+1+'/'+pageStatus.DataCount;this.Canvas.textAlign="center";this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=this.TextColor;this.Canvas.fillText(text,center,bottom-this.Mergin.Bottom);this.SizeChange=false;};}function ChartVScrollbar(){this.Canvas;//画布
|
|
12488
|
+
this.ChartBorder;//边框信息
|
|
12489
|
+
this.ChartFrame;//框架画法
|
|
12490
|
+
this.Name;//名称
|
|
12491
|
+
this.ClassName='ChartReportTab';//类名
|
|
12492
|
+
this.IsDrawFirst=false;this.GetEventCallback;//获取事件
|
|
12493
|
+
this.Report;this.MaxPos=15;//滚动条可移动长度
|
|
12494
|
+
this.CurrentPos=15;//当前滚动条移动位置
|
|
12495
|
+
this.Step=1;//滚动条移动步长
|
|
12496
|
+
this.ButtonSize=25;this.Enable=false;this.LastStatus={Draw:false};this.GlobalOption;this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;this.Mergin={Left:2,Right:2,Top:2,Bottom:2};this.BarWithConfig={Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size};this.RectScroll={Top:null,Bottom:null,Bar:null,Client:null};//滚动条区域
|
|
12497
|
+
this.ReloadResource=function(resource){this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;this.BarWithConfig={Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size};};this.CalculateSize=function(){var pixelRatio=GetDevicePixelRatio();var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;this.ButtonSize=Math.min(25,width);};this.DrawScrollbar=function(left,top,right,bottom){this.LastStatus.Draw=false;this.RectScroll={Left:null,Right:null,Bar:null,Client:null};if(!this.Enable)return;var isShow=this.IsShowCallback();if(!isShow)return;var pageInfo=this.Report.GetCurrentPageStatus();if(pageInfo.IsSinglePage)return;var xOffset=pageInfo.Start;var dataCount=pageInfo.DataCount-pageInfo.PageSize;var buttonSize=this.ButtonSize;this.MaxPos=dataCount;this.CurrentPos=xOffset;var rtTop={Right:right-this.Mergin.Right,Top:top+this.Mergin.Top,Width:buttonSize,Height:buttonSize};rtTop.Left=rtTop.Right-buttonSize;rtTop.Bottom=rtTop.Top+buttonSize;var rtBottom={Right:right-this.Mergin.Right,Bottom:bottom-this.Mergin.Bottom,Width:buttonSize,Height:buttonSize};rtBottom.Left=rtBottom.Right-buttonSize;rtBottom.Top=rtBottom.Bottom-buttonSize;var centerHeight=rtBottom.Top-2-(rtTop.Bottom+2);var value=centerHeight-this.ScrollBarHeight;var yOffset=value*this.CurrentPos/this.MaxPos;var y=rtTop.Bottom+2+yOffset;var rtBar={Right:right-this.Mergin.Right,Top:y,Width:buttonSize,Height:this.ScrollBarHeight};rtBar.Left=rtBar.Right-buttonSize;rtBar.Bottom=rtBar.Top+rtBar.Height;this.RectScroll.Top=rtTop;this.RectScroll.Bottom=rtBottom;this.RectScroll.Bar=rtBar;this.RectScroll.Client={Left:rtTop.Left,Right:rtTop.Right,Top:rtTop.Bottom,Bottom:rtBottom.Top};var rtBG={Right:right,Top:top,Bottom:bottom,Width:buttonSize+this.Mergin.Right+this.Mergin.Left};rtBG.Left=rtBG.Right-rtBG.Width;rtBG.Height=rtBG.Bottom-rtBG.Top;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.Canvas.fillStyle=this.ButtonColor;this.Canvas.fillRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);this.Canvas.fillRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);this.Canvas.strokeStyle=this.BorderColor;this.Canvas.strokeRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);this.Canvas.strokeRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);this.Canvas.fillStyle=this.BarColor;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.LastStatus.Draw=true;};this.OnMouseDown=function(x,y,e){return this.PtInScroll(x,y);};// Type 1-4 滚动条
|
|
12498
|
+
this.PtInScroll=function(x,y){if(!this.RectScroll)return null;if(this.RectScroll.Top){var rtItem=this.RectScroll.Top;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom)return{Type:1,Rect:rtItem};}if(this.RectScroll.Bottom){var rtItem=this.RectScroll.Bottom;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom)return{Type:2,Rect:rtItem};}if(this.RectScroll.Bar){var rtItem=this.RectScroll.Bar;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom)return{Type:3,Rect:rtItem};}if(this.RectScroll.Client){var rtItem=this.RectScroll.Client;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom){return{Type:4,Rect:rtItem,Pos:this.GetScrollPostionByPoint(x,y)};}}return null;};this.GetScrollPostionByPoint=function(x,y){var rtItem=this.RectScroll.Client;var value=rtItem.Bottom-rtItem.Top-this.ScrollBarHeight;var pos=parseInt(this.MaxPos*(y-rtItem.Top)/value);return pos;};}/*
|
|
12477
12499
|
Copyright (c) 2018 jones
|
|
12478
12500
|
|
|
12479
12501
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -13006,7 +13028,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13006
13028
|
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);};}/********************************************************************************
|
|
13007
13029
|
* 版本信息输出
|
|
13008
13030
|
*
|
|
13009
|
-
*/var HQCHART_VERSION="1.1.
|
|
13031
|
+
*/var HQCHART_VERSION="1.1.13106";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
13010
13032
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13011
13033
|
// BaseIndex:BaseIndex,
|
|
13012
13034
|
// ChartLine:ChartLine,
|