hqchart 1.1.14030 → 1.1.14037

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.
@@ -1493,6 +1493,7 @@ ON_CLICK_TREPORT_HEADER:124,//单击T型报价表头
1493
1493
  ON_RCLICK_TREPORT_HEADER:125,//右键点击T型报价表头
1494
1494
  ON_TREPORT_LOCAL_SORT:126,//T型报价列表本地排序
1495
1495
  ON_CLICK_TREPORT_ROW:127,//左键点击点击T型报价列表
1496
+ ON_MOVE_SELECTED_TREPORT_ROW:128,//选中行变动
1496
1497
  ON_DRAW_REPORT_ROW_BG:140,//报价列表整行背景
1497
1498
  ON_CLICK_REPORT_CHECKBOX:141,//报价列表checkbox
1498
1499
  ON_CLICK_REPORT_BUTTON:142,//报价列表按钮
@@ -5149,7 +5150,7 @@ IFrameSplitOperator.IsInteger=function(x){return typeof x==='number'&&x%1===0;};
5149
5150
  IFrameSplitOperator.IsObjectExist=function(obj){if(obj===undefined)return false;if(obj==null)return false;return true;};//是否时bool
5150
5151
  IFrameSplitOperator.IsBool=function(value){if(value===true||value===false)return true;return false;};IFrameSplitOperator.IsString=function(value){var type=typeof value==='undefined'?'undefined':(0,_typeof3.default)(value);if(type=='string')return true;return false;};//是否是非空的数组
5151
5152
  IFrameSplitOperator.IsNonEmptyArray=function(ary){if(!ary)return false;if(!Array.isArray(ary))return false;return ary.length>0;};IFrameSplitOperator.IsFloat=function(value){if(value===undefined)return false;if(value==null)return false;if(isNaN(value))return false;return value!=parseInt(value);};//是否有效
5152
- IFrameSplitOperator.IsVaild=function(value){if(isNaN(value))return false;if(value==null)return false;if(value===undefined)return false;return true;};IFrameSplitOperator.IsUndefined=function(value){return value===undefined;};IFrameSplitOperator.RemoveZero=function(strValue){while(strValue.length>0){var index=strValue.length-1;var ch=strValue[index];if(ch=="0"){strValue=strValue.substr(0,index);}else if(ch=="."){strValue=strValue.substr(0,index);break;}else{break;}}return strValue;};function FrameSplitKLinePriceY(){this.newMethod=IFrameSplitOperator;//派生
5153
+ IFrameSplitOperator.IsVaild=function(value){if(isNaN(value))return false;if(value==null)return false;if(value===undefined)return false;return true;};IFrameSplitOperator.IsUndefined=function(value){return value===undefined;};IFrameSplitOperator.IsObject=function(value){return value instanceof Object;};IFrameSplitOperator.RemoveZero=function(strValue){while(strValue.length>0){var index=strValue.length-1;var ch=strValue[index];if(ch=="0"){strValue=strValue.substr(0,index);}else if(ch=="."){strValue=strValue.substr(0,index);break;}else{break;}}return strValue;};function FrameSplitKLinePriceY(){this.newMethod=IFrameSplitOperator;//派生
5153
5154
  this.newMethod();delete this.newMethod;this.CoordinateType=0;//坐标类型 0=普通坐标 1=百分比坐标 (右边坐标刻度) 2=对数对标 3=等比坐标 4=等分坐标 5=黄金分割
5154
5155
  this.Symbol;this.Data;//K线数据 (计算百分比坐标)
5155
5156
  this.FrameSplitData2;//坐标轴分割方法(计算百分比刻度)
@@ -12812,7 +12813,7 @@ if(chart.MultiSelectModel==1){var pageStatus=chart.GetCurrentPageStatus();if(IFr
12812
12813
  {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)//可翻页模式
12813
12814
  {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;};//左右移动
12814
12815
  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;//显示最后一屏
12815
- 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();}};//列排序
12816
+ 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;scrollbar.SetOption(option);};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();}};//列排序
12816
12817
  this.SortColumn=function(index,sortType){var _this58=this;if(index<0)return false;var reportChart=this.GetReportChart();if(!reportChart)return false;var column=reportChart.Column[index];if(!column)return false;if(column.Sort!=1&&column.Sort!=2)return false;var sortInfo={Field:index,Sort:sortType};if(this.Data.Virtual&&this.Data.Virtual.Enable){this.SortInfo.Field=sortInfo.Field;this.SortInfo.Sort=sortInfo.Sort;this.Data.YOffset=0;this.ResetReportSelectStatus();this.RequestVirtualStockData();//虚拟表格
12817
12818
  return true;}else if(sortInfo.Sort==0)//不排序还原
12818
12819
  {this.Data.Data=[];if(IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))this.Data.Data=this.SourceData.Data.slice();}else if(sortInfo.Sort==1||sortInfo.Sort==2){if(column.Sort==1)//本地排序
@@ -13026,7 +13027,7 @@ switch(column.ColorType){case 1:drawInfo.TextColor=this.GetUpDownColor(value,0);
13026
13027
  {this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(column.ValueType==0){if(column.FormatType==1)drawInfo.Text=IFrameSplitOperator.FormatDateString(value,"YYYY/MM/DD");else drawInfo.Text=IFrameSplitOperator.FormatDateString(value);}};this.GetCustomIconDrawInfo=function(data,column,drawInfo){if(column.IsDrawCallback)//外部处理输出格式
13027
13028
  {this.GetCustomIconData(column,data.Symbol,drawInfo,data);return;}};this.GetCustomCheckBoxDrawInfo=function(data,column,drawInfo){var checkData=this.GetExtendData(data,column);if(!checkData)return;if(!IFrameSplitOperator.IsBool(checkData.Checked))return;drawInfo.Checked=checkData.Checked;drawInfo.Enable=true;drawInfo.Data=checkData;if(IFrameSplitOperator.IsBool(checkData.DisableCheckBox))drawInfo.Enable=!checkData.DisableCheckBox;drawInfo.CheckBox=column.CheckBox;};this.GetCustomButtonDrawInfo=function(data,column,drawInfo){var buttonData=this.GetExtendData(data,column);if(!buttonData)return;drawInfo.Text=buttonData.Title;drawInfo.Button=column.Button;drawInfo.Font=column.Button.Font;drawInfo.Enable=true;drawInfo.Data=buttonData;if(IFrameSplitOperator.IsBool(buttonData.Enable))drawInfo.Enable=buttonData.Enable;};this.GetCustomProgressBarDrawInfo=function(data,column,drawInfo){var barData=this.GetExtendData(data,column);if(!barData)return;drawInfo.Text=barData.Title;drawInfo.ProgressBar=column.ProgressBar;drawInfo.Enable=true;drawInfo.Value=barData.Value;//占比
13028
13029
  drawInfo.Data=barData;if(IFrameSplitOperator.IsBool(barData.Enable))drawInfo.Enable=barData.Enable;if(barData.TextColor)drawInfo.TextColor=barData.TextColor;if(barData.BarColor)drawInfo.BarColor=barData.BarColor;if(barData.BGColor)drawInfo.BGColor=barData.BGColor;};this.GetCustomLinkDrawInfo=function(data,column,drawInfo){var linkData=this.GetExtendData(data,column);if(!linkData)return;drawInfo.Text=linkData.Title;drawInfo.Link=column.Link;drawInfo.Enable=true;drawInfo.Data=linkData;drawInfo.MaxText=column.MaxText;if(IFrameSplitOperator.IsBool(linkData.Enable))drawInfo.Enable=linkData.Enable;if(linkData.TextColor)drawInfo.TextColor=linkData.TextColor;};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}//TODO: 不同类型的 格式化输出
13029
- drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var text=data[fieldName];if(!IFrameSplitOperator.IsString(text))return;drawInfo.Text=text;};this.FormaTimeDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Time))return;if(column.ValueType==0)//0=hhmm 1=hhmmss 2=hhmmss.fff
13030
+ drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsObject(item)){if(item.Text)drawInfo.Text=item.Text;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}else if(IFrameSplitOperator.IsString(item)){drawInfo.Text=item;}};this.FormaTimeDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Time))return;if(column.ValueType==0)//0=hhmm 1=hhmmss 2=hhmmss.fff
13030
13031
  {drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM");}else if(column.ValueType==1){drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM:SS");}else if(column.ValueType==2){drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM:SS.fff");}};this.FormaDateDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Date))return;if(column.FormatType==0)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY-MM-DD");else if(column.FormatType==1)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY/MM/DD");else if(column.FormatType==2)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY/MM/DD/W");else if(column.FormatType==3)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY-MM");else if(column.FormatType==4)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"MM/DD");else if(column.FormatType==4)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"MM-DD");};//自定义图标
13031
13032
  this.GetCustomIconData=function(columnInfo,symbol,drawInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DRAW_CUSTOM_ICON);if(!event||!event.Callback)return false;var sendData={Symbol:symbol,Column:columnInfo,Data:data,Out:{Text:null,TextColor:null,TextAlign:null,Font: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;if(sendData.Out.Font)drawInfo.Font=sendData.Out.Font;return true;};this.GetPriceDrawInfo=function(price,stock,data,drawInfo,option){if(!IFrameSplitOperator.IsNumber(price))return false;drawInfo.Text=price.toFixed(data.Decimal);var yClose=null;if(stock.PriceColorType===1)//昨结算价 计算颜色
13032
13033
  {if(IFrameSplitOperator.IsNumber(stock.YFClose))yClose=stock.YFClose;}else//昨收价 计算颜色
@@ -13112,8 +13113,12 @@ this.IsDrawFirst=false;this.GetEventCallback;//获取事件
13112
13113
  this.Report;this.MaxPos=15;//滚动条可移动长度
13113
13114
  this.CurrentPos=15;//当前滚动条移动位置
13114
13115
  this.Step=1;//滚动条移动步长
13115
- 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};//滚动条区域
13116
- 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;if(rtBar.Bottom>rtBottom.Top-2){rtBar.Bottom=rtBottom.Top-2;rtBar.Top=rtBar.Bottom-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 滚动条
13116
+ this.ButtonSize=25;this.Enable=false;this.LastStatus={Draw:false};this.GlobalOption;this.Style=0;//0=滚动条+按钮 1=滚动条
13117
+ 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.Margin={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};//滚动条区域
13118
+ //this.BarWithConfig.Size=2;
13119
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
13120
+ this.SetOption=function(option){if(!option)return;if(IFrameSplitOperator.IsBool(option.Enable))this.Enable=option.Enable;if(IFrameSplitOperator.IsNumber(option.Style))this.Style=option.Style;if(IFrameSplitOperator.IsNumber(option.BarWidth))this.BarWithConfig.Size=option.BarWidth;if(option.Margin){var item=option.Margin;if(IFrameSplitOperator.IsNumber(item.Top))this.Margin.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))this.Margin.Bottom=item.Bottom;if(IFrameSplitOperator.IsNumber(item.Left))this.Margin.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))this.Margin.Right=item.Right;}};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.Margin.Left+this.Margin.Right;this.ButtonSize=Math.min(25,width);};//不带上下按钮的滚动条样式
13121
+ this.DrawScrollbarStyle2=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 scrollTop=top+this.Margin.Top+2;var scrollBottom=bottom-this.Margin.Bottom-2;var centerHeight=scrollBottom-scrollTop;var value=centerHeight-this.ScrollBarHeight;var yOffset=value*this.CurrentPos/this.MaxPos;var y=scrollTop+2+yOffset;var rtBar={Right:right-this.Margin.Right,Top:y,Width:buttonSize,Height:this.ScrollBarHeight};rtBar.Left=rtBar.Right-buttonSize;rtBar.Bottom=rtBar.Top+rtBar.Height;if(rtBar.Bottom>scrollBottom-2){rtBar.Bottom=scrollBottom-2;rtBar.Top=rtBar.Bottom-rtBar.Height;}this.RectScroll.Bar=rtBar;this.RectScroll.Client={Left:rtBar.Left,Right:rtBar.Right,Top:scrollTop,Bottom:scrollBottom};var rtBG={Right:right,Top:top,Bottom:bottom,Width:buttonSize+this.Margin.Right+this.Margin.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.BarColor;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.LastStatus.Draw=true;};this.DrawScrollbarStyle=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.Margin.Right,Top:top+this.Margin.Top,Width:buttonSize,Height:buttonSize};rtTop.Left=rtTop.Right-buttonSize;rtTop.Bottom=rtTop.Top+buttonSize;var rtBottom={Right:right-this.Margin.Right,Bottom:bottom-this.Margin.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.Margin.Right,Top:y,Width:buttonSize,Height:this.ScrollBarHeight};rtBar.Left=rtBar.Right-buttonSize;rtBar.Bottom=rtBar.Top+rtBar.Height;if(rtBar.Bottom>rtBottom.Top-2){rtBar.Bottom=rtBottom.Top-2;rtBar.Top=rtBar.Bottom-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.Margin.Right+this.Margin.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.DrawScrollbar=function(left,top,right,bottom){if(this.Style==1)this.DrawScrollbarStyle2(left,top,right,bottom);else this.DrawScrollbarStyle(left,top,right,bottom);};this.OnMouseDown=function(x,y,e){return this.PtInScroll(x,y);};// Type 1-4 滚动条
13117
13122
  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;};}function ChartCellTooltip(){this.Canvas;//画布
13118
13123
  this.ChartBorder;//边框信息
13119
13124
  this.ChartFrame;//框架画法
@@ -13252,7 +13257,7 @@ if(item[32])stock.CloseLine=item[32];//32=收盘价线
13252
13257
  if(item[33])stock.KLine=item[33];//33=K线
13253
13258
  //10个数值型 101-199
13254
13259
  if(IFrameSplitOperator.IsNumber(item[101]))stock.ReserveNumber1=item[101];if(IFrameSplitOperator.IsNumber(item[102]))stock.ReserveNumber2=item[102];if(IFrameSplitOperator.IsNumber(item[103]))stock.ReserveNumber3=item[103];if(IFrameSplitOperator.IsNumber(item[104]))stock.ReserveNumber4=item[104];if(IFrameSplitOperator.IsNumber(item[105]))stock.ReserveNumber5=item[105];if(IFrameSplitOperator.IsNumber(item[106]))stock.ReserveNumber6=item[106];if(IFrameSplitOperator.IsNumber(item[107]))stock.ReserveNumber7=item[107];if(IFrameSplitOperator.IsNumber(item[108]))stock.ReserveNumber8=item[108];if(IFrameSplitOperator.IsNumber(item[109]))stock.ReserveNumber9=item[109];if(IFrameSplitOperator.IsNumber(item[110]))stock.ReserveNumber10=item[110];//10个字符型 201-299
13255
- if(IFrameSplitOperator.IsString(item[201]))stock.ReserveString1=item[201];if(IFrameSplitOperator.IsString(item[202]))stock.ReserveString2=item[202];if(IFrameSplitOperator.IsString(item[203]))stock.ReserveString3=item[203];if(IFrameSplitOperator.IsString(item[204]))stock.ReserveString4=item[204];if(IFrameSplitOperator.IsString(item[205]))stock.ReserveString5=item[205];if(IFrameSplitOperator.IsString(item[206]))stock.ReserveString6=item[206];if(IFrameSplitOperator.IsString(item[207]))stock.ReserveString7=item[207];if(IFrameSplitOperator.IsString(item[208]))stock.ReserveString8=item[208];if(IFrameSplitOperator.IsString(item[209]))stock.ReserveString9=item[209];if(IFrameSplitOperator.IsString(item[210]))stock.ReserveString10=item[210];};this.AutoUpdate=function(waitTime)//waitTime 更新时间
13260
+ if(IFrameSplitOperator.IsString(item[201])||IFrameSplitOperator.IsObject(item[201]))stock.ReserveString1=item[201];if(IFrameSplitOperator.IsString(item[202])||IFrameSplitOperator.IsObject(item[202]))stock.ReserveString2=item[202];if(IFrameSplitOperator.IsString(item[203])||IFrameSplitOperator.IsObject(item[203]))stock.ReserveString3=item[203];if(IFrameSplitOperator.IsString(item[204])||IFrameSplitOperator.IsObject(item[204]))stock.ReserveString4=item[204];if(IFrameSplitOperator.IsString(item[205])||IFrameSplitOperator.IsObject(item[205]))stock.ReserveString5=item[205];if(IFrameSplitOperator.IsString(item[206])||IFrameSplitOperator.IsObject(item[206]))stock.ReserveString6=item[206];if(IFrameSplitOperator.IsString(item[207])||IFrameSplitOperator.IsObject(item[207]))stock.ReserveString7=item[207];if(IFrameSplitOperator.IsString(item[208])||IFrameSplitOperator.IsObject(item[208]))stock.ReserveString8=item[208];if(IFrameSplitOperator.IsString(item[209])||IFrameSplitOperator.IsObject(item[209]))stock.ReserveString9=item[209];if(IFrameSplitOperator.IsString(item[210])||IFrameSplitOperator.IsObject(item[210]))stock.ReserveString10=item[210];};this.AutoUpdate=function(waitTime)//waitTime 更新时间
13256
13261
  {this.CancelAutoUpdate();if(!this.IsAutoUpdate)return;var self=this;var marketStatus=2;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TREPORT_MARKET_STATUS);if(event&&event.Callback){var sendData={MarketStatus:2};event.Callback(event,sendData,this);if(IFrameSplitOperator.IsNumber(sendData.MarketStatus))marketStatus=sendData.MarketStatus;}if(marketStatus==0||marketStatus==3)return;//闭市,盘后
13257
13262
  var frequency=this.AutoUpdateFrequency;if(marketStatus==1)//盘前
13258
13263
  {this.AutoUpdateTimer=setTimeout(function(){self.AutoUpdate();},frequency);}else if(marketStatus==2)//盘中
@@ -13290,11 +13295,12 @@ switch(keyID){/*
13290
13295
  */case 38://up
13291
13296
  var result=this.MoveSelectedRow(-1,{EnablePageCycle:this.EnablePageCycle});if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}break;case 40://down
13292
13297
  var result=this.MoveSelectedRow(1,{EnablePageCycle:this.EnablePageCycle});if(result){if(result.Redraw)this.Draw();if(result.Update)this.DelayUpdateStockData();}break;}//不让滚动条滚动
13293
- if(e.preventDefault)e.preventDefault();else e.returnValue=false;};//是否循环翻页 { EnablePageCycle: true/false }
13298
+ if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.MoveSelectedRowEvent=function(oldData,nowData){var chart=this.ChartPaint[0];if(!chart)return null;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOVE_SELECTED_TREPORT_ROW);if(!event||!event.Callback)return;if(oldData&&nowData){if(oldData.ExePrice==nowData.ExePrice&&oldData.CellType==nowData.CellType)return;}if(oldData){if(chart.GetExePriceDataCallback)oldData.TData=chart.GetExePriceDataCallback(oldData.ExePrice);if(oldData.TData){if(oldData.CellType==1)oldData.Item=oldData.TData.LeftData;else if(oldData.CellType==2)oldData.Item=oldData.TData.RightData;}}if(nowData){if(chart.GetExePriceDataCallback)nowData.TData=chart.GetExePriceDataCallback(nowData.ExePrice);if(nowData.TData){if(nowData.CellType==1)nowData.Item=nowData.TData.LeftData;else if(nowData.CellType==2)nowData.Item=nowData.TData.RightData;}}var endData={Old:oldData,Now:nowData,Symbol:this.Symbol};event.Callback(event,endData,this);};//是否循环翻页 { EnablePageCycle: true/false }
13294
13299
  this.MoveSelectedRow=function(step,option){var chart=this.ChartPaint[0];if(!chart)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;var bPageCycle=false;if(option){if(IFrameSplitOperator.IsBool(option.EnablePageCycle))bPageCycle=option.EnablePageCycle;}var result={Redraw:false,Update:false};//Redraw=重绘, Update=更新数据
13295
- var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.PageSize;var selectedIndex=pageStatus.Start;var cellType=1;if(pageStatus.SelectedRow){cellType=pageStatus.SelectedRow.CellType;for(var i=0;i<this.Data.Data.length;++i){if(pageStatus.SelectedRow.ExePrice==this.Data.Data[i]){selectedIndex=i;break;}}}if(step>0){if(selectedIndex<0||selectedIndex<pageStatus.Start||selectedIndex>pageStatus.End){chart.SelectedRow={ExePrice:this.Data.Data[pageStatus.Start],CellType:cellType};result.Redraw=true;return result;}var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selectedIndex+1>=this.Data.Data.length&&!bPageCycle)break;++selectedIndex;if(selectedIndex>pageStatus.End)++offset;if(selectedIndex>=this.Data.Data.length){selectedIndex=0;offset=0;}}result.Redraw=true;result.Update=offset!=this.Data.YOffset;chart.SelectedRow={ExePrice:this.Data.Data[selectedIndex],CellType:cellType};this.Data.YOffset=offset;return result;}else if(step<0){if(selectedIndex<0||selectedIndex<pageStatus.Start||selectedIndex>pageStatus.End){chart.SelectedRow={ExePrice:this.Data.Data[pageStatus.End],CellType:cellType};result.Redraw=true;return result;}step=Math.abs(step);var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selectedIndex<=0&&!bPageCycle)//不能循环翻页
13300
+ var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.PageSize;var selectedIndex=pageStatus.Start;var cellType=1;if(pageStatus.SelectedRow){cellType=pageStatus.SelectedRow.CellType;for(var i=0;i<this.Data.Data.length;++i){if(pageStatus.SelectedRow.ExePrice==this.Data.Data[i]){selectedIndex=i;break;}}}var oldData=null,nowData=null;if(chart.SelectedRow)oldData=CloneData(chart.SelectedRow);//上一个数据保存下
13301
+ if(step>0){if(selectedIndex<0||selectedIndex<pageStatus.Start||selectedIndex>pageStatus.End){chart.SelectedRow={ExePrice:this.Data.Data[pageStatus.Start],CellType:cellType};result.Redraw=true;nowData=CloneData(chart.SelectedRow);this.MoveSelectedRowEvent(oldData,nowData);return result;}var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selectedIndex+1>=this.Data.Data.length&&!bPageCycle)break;++selectedIndex;if(selectedIndex>pageStatus.End)++offset;if(selectedIndex>=this.Data.Data.length){selectedIndex=0;offset=0;}}result.Redraw=true;result.Update=offset!=this.Data.YOffset;chart.SelectedRow={ExePrice:this.Data.Data[selectedIndex],CellType:cellType};this.Data.YOffset=offset;nowData=CloneData(chart.SelectedRow);this.MoveSelectedRowEvent(oldData,nowData);return result;}else if(step<0){if(selectedIndex<0||selectedIndex<pageStatus.Start||selectedIndex>pageStatus.End){chart.SelectedRow={ExePrice:this.Data.Data[pageStatus.End],CellType:cellType};result.Redraw=true;nowData=CloneData(chart.SelectedRow);this.MoveSelectedRowEvent(oldData,nowData);return result;}step=Math.abs(step);var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selectedIndex<=0&&!bPageCycle)//不能循环翻页
13296
13302
  break;--selectedIndex;if(selectedIndex<pageStatus.Start)--offset;if(selectedIndex<0)//自动翻到最后一页
13297
- {selectedIndex=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={ExePrice:this.Data.Data[selectedIndex],CellType:cellType};this.Data.YOffset=offset;return result;}return null;};//obj={ ID:, Color: , Time:, Count: }
13303
+ {selectedIndex=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={ExePrice:this.Data.Data[selectedIndex],CellType:cellType};this.Data.YOffset=offset;nowData=CloneData(chart.SelectedRow);this.MoveSelectedRowEvent(oldData,nowData);return result;}return null;};//obj={ ID:, Color: , Time:, Count: }
13298
13304
  this.SetFlashBGItem=function(symbol,obj){var item={ID:obj.ID,Color:obj.Color,Count:1};if(IFrameSplitOperator.IsNumber(obj.Count))item.Count=obj.Count;if(IFrameSplitOperator.IsNumber(obj.Time))item.Time=obj.Time;else item.Time=Date.now();if(this.FlashBG.has(symbol)){var stockItem=this.FlashBG.get(symbol);stockItem.LastTime=item.Time;stockItem.Data.set(item.ID,item);}else{var stockItem={LastTime:item.Time,Data:new _map2.default([[item.ID,item]])};this.FlashBG.set(symbol,stockItem);}};this.GetFlashBGData=function(symbol,time){if(!this.FlashBG)return null;if(!this.FlashBG.has(symbol))return null;var timeDiff=3*1000;var stockItem=this.FlashBG.get(symbol);if(time-stockItem.LastTime>=timeDiff)//超时的删除
13299
13305
  {this.FlashBG.delete(symbol);return null;}if(!stockItem.Data||stockItem.Data.size<=0){this.FlashBG.delete(symbol);return null;}var aryDelID=[];//超时需要参数的
13300
13306
  var _iteratorNormalCompletion26=true;var _didIteratorError26=false;var _iteratorError26=undefined;try{for(var _iterator26=(0,_getIterator3.default)(stockItem.Data),_step26;!(_iteratorNormalCompletion26=(_step26=_iterator26.next()).done);_iteratorNormalCompletion26=true){var mapItem=_step26.value;var item=mapItem[1];if(time-item.Time>=timeDiff||item.Count<=0)aryDelID.push(item.ID);}}catch(err){_didIteratorError26=true;_iteratorError26=err;}finally{try{if(!_iteratorNormalCompletion26&&_iterator26.return){_iterator26.return();}}finally{if(_didIteratorError26){throw _iteratorError26;}}}if(IFrameSplitOperator.IsNonEmptyArray(aryDelID)){for(var i=0;i<aryDelID.length;++i){stockItem.Data.delete(aryDelID[i]);}if(stockItem.Data.size<=0){this.FlashBG.delete(symbol);return null;}}return stockItem;};}function JSTReportFrame(){this.ChartBorder;this.Canvas;//画布
@@ -13404,7 +13410,7 @@ case TREPORT_COLUMN_ID.POSITION_ID://持仓量
13404
13410
  case TREPORT_COLUMN_ID.VOL_ID://成交量
13405
13411
  case TREPORT_COLUMN_ID.AMOUNT_ID://成交金额
13406
13412
  var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(fieldName)drawInfo.Text=this.FormatVolString(data[fieldName]);break;case TREPORT_COLUMN_ID.INCREASE_ID:case TREPORT_COLUMN_ID.UPDOWN_ID:case TREPORT_COLUMN_ID.AMPLITUDE_ID:var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(fieldName){var value=data[fieldName];if(IFrameSplitOperator.IsNumber(value)){drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}else{this.GetNullDrawInfo(drawInfo);}}break;case TREPORT_COLUMN_ID.RESERVE_NUMBER1_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER2_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER3_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER4_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER5_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER6_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER7_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER8_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER9_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER10_ID:this.FormatReserveNumber(column,data,drawInfo);break;case TREPORT_COLUMN_ID.RESERVE_STRING1_ID:case TREPORT_COLUMN_ID.RESERVE_STRING2_ID:case TREPORT_COLUMN_ID.RESERVE_STRING3_ID:case TREPORT_COLUMN_ID.RESERVE_STRING4_ID:case TREPORT_COLUMN_ID.RESERVE_STRING5_ID:case TREPORT_COLUMN_ID.RESERVE_STRING6_ID:case TREPORT_COLUMN_ID.RESERVE_STRING7_ID:case TREPORT_COLUMN_ID.RESERVE_STRING8_ID:case TREPORT_COLUMN_ID.RESERVE_STRING9_ID:case TREPORT_COLUMN_ID.RESERVE_STRING10_ID:this.FormatReserveString(column,data,drawInfo);break;default:drawInfo.Text='-----';}this.GetMarkBorderData(drawInfo,exePriceData.ExePrice,column.Type,cellType);this.GetFlashBGData(drawInfo,exePriceData,column.Type,cellType);}this.DrawCell(drawInfo,exePriceData,column.Type,cellType);};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}//TODO: 不同类型的 格式化输出
13407
- drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var text=data[fieldName];if(!IFrameSplitOperator.IsString(text))return;drawInfo.Text=text;};this.GetFlashBGData=function(drawInfo,exePriceData,columnType,cellType){if(!exePriceData.TData)return;var data=null;if(cellType==1)data=exePriceData.TData.LeftFlashBG;else if(cellType==2)data=exePriceData.TData.RightFlashBG;if(!data||!data.Data)return;if(data.Data.has(columnType)){var item=data.Data.get(columnType);drawInfo.FlashBGColor=item.Color;--item.Count;if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}};this.GetMarkBorderData=function(drawInfo,exePrice,columnType,cellType){if(!this.BorderData||!this.BorderData.MapData)return;if(!this.BorderData.MapData.has(columnType))return;var borderData=this.BorderData.MapData.get(columnType);if(!IFrameSplitOperator.IsNonEmptyArray(borderData.Data))return;if(cellType==1){var leftBorder=borderData.Data[1];if(!leftBorder)return;if(leftBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}else if(cellType==2){var rightBorder=borderData.Data[2];if(!rightBorder)return;if(rightBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}};this.GetNullDrawInfo=function(drawInfo){drawInfo.Text="--";drawInfo.TextColor=this.UnchangeColor;};this.GetPriceDrawInfo=function(price,stock,data,drawInfo){if(!IFrameSplitOperator.IsNumber(price)){this.GetNullDrawInfo(drawInfo);return;}drawInfo.Text=price.toFixed(data.Decimal);if(!IFrameSplitOperator.IsNumber(stock.YClose))drawInfo.TextColor=this.UnchangeColor;else drawInfo.TextColor=this.GetUpDownColor(price,stock.YClose);};//单独处理成交量显示
13413
+ drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsObject(item)){if(item.Text)drawInfo.Text=item.Text;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}else if(IFrameSplitOperator.IsString(item)){drawInfo.Text=item;}};this.GetFlashBGData=function(drawInfo,exePriceData,columnType,cellType){if(!exePriceData.TData)return;var data=null;if(cellType==1)data=exePriceData.TData.LeftFlashBG;else if(cellType==2)data=exePriceData.TData.RightFlashBG;if(!data||!data.Data)return;if(data.Data.has(columnType)){var item=data.Data.get(columnType);drawInfo.FlashBGColor=item.Color;--item.Count;if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}};this.GetMarkBorderData=function(drawInfo,exePrice,columnType,cellType){if(!this.BorderData||!this.BorderData.MapData)return;if(!this.BorderData.MapData.has(columnType))return;var borderData=this.BorderData.MapData.get(columnType);if(!IFrameSplitOperator.IsNonEmptyArray(borderData.Data))return;if(cellType==1){var leftBorder=borderData.Data[1];if(!leftBorder)return;if(leftBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}else if(cellType==2){var rightBorder=borderData.Data[2];if(!rightBorder)return;if(rightBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}};this.GetNullDrawInfo=function(drawInfo){drawInfo.Text="--";drawInfo.TextColor=this.UnchangeColor;};this.GetPriceDrawInfo=function(price,stock,data,drawInfo){if(!IFrameSplitOperator.IsNumber(price)){this.GetNullDrawInfo(drawInfo);return;}drawInfo.Text=price.toFixed(data.Decimal);if(!IFrameSplitOperator.IsNumber(stock.YClose))drawInfo.TextColor=this.UnchangeColor;else drawInfo.TextColor=this.GetUpDownColor(price,stock.YClose);};//单独处理成交量显示
13408
13414
  this.FormatVolString=function(value,languageID){if(!IFrameSplitOperator.IsNumber(value))return null;return IFrameSplitOperator.FormatVolString(value,languageID);};this.GetUpDownColor=function(price,price2){if(price>price2)return this.UpColor;else if(price<price2)return this.DownColor;else return this.UnchangeColor;};this.GetUpDownColorV2=function(price,price2){if(price>=price2)return this.UpColor;else return this.DownColor;};this.DrawCell=function(drawInfo){var rtText=drawInfo.RectText;var yCenter=rtText.Top+rtText.Height/2;if(drawInfo.BGColor)//背景
13409
13415
  {var rtItem=drawInfo.Rect;this.Canvas.fillStyle=drawInfo.BGColor;this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);}if(drawInfo.FlashBGColor)//闪动背景
13410
13416
  {var rtItem=drawInfo.Rect;this.Canvas.fillStyle=drawInfo.FlashBGColor;this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);}if(drawInfo.BorderColor)//边框
@@ -13928,7 +13934,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13928
13934
  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);};}/********************************************************************************
13929
13935
  * 版本信息输出
13930
13936
  *
13931
- */var HQCHART_VERSION="1.1.14029";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13937
+ */var HQCHART_VERSION="1.1.14036";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13932
13938
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13933
13939
  // BaseIndex:BaseIndex,
13934
13940
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14030",
3
+ "version": "1.1.14037",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -892,16 +892,16 @@ function JSTReportChartContainer(uielement)
892
892
 
893
893
 
894
894
  //10个字符型 201-299
895
- if (IFrameSplitOperator.IsString(item[201])) stock.ReserveString1=item[201];
896
- if (IFrameSplitOperator.IsString(item[202])) stock.ReserveString2=item[202];
897
- if (IFrameSplitOperator.IsString(item[203])) stock.ReserveString3=item[203];
898
- if (IFrameSplitOperator.IsString(item[204])) stock.ReserveString4=item[204];
899
- if (IFrameSplitOperator.IsString(item[205])) stock.ReserveString5=item[205];
900
- if (IFrameSplitOperator.IsString(item[206])) stock.ReserveString6=item[206];
901
- if (IFrameSplitOperator.IsString(item[207])) stock.ReserveString7=item[207];
902
- if (IFrameSplitOperator.IsString(item[208])) stock.ReserveString8=item[208];
903
- if (IFrameSplitOperator.IsString(item[209])) stock.ReserveString9=item[209];
904
- if (IFrameSplitOperator.IsString(item[210])) stock.ReserveString10=item[210];
895
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) stock.ReserveString1=item[201];
896
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) stock.ReserveString2=item[202];
897
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) stock.ReserveString3=item[203];
898
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) stock.ReserveString4=item[204];
899
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) stock.ReserveString5=item[205];
900
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) stock.ReserveString6=item[206];
901
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) stock.ReserveString7=item[207];
902
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) stock.ReserveString8=item[208];
903
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) stock.ReserveString9=item[209];
904
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) stock.ReserveString10=item[210];
905
905
  }
906
906
 
907
907
 
@@ -1268,6 +1268,43 @@ function JSTReportChartContainer(uielement)
1268
1268
  else e.returnValue = false;
1269
1269
  }
1270
1270
 
1271
+ this.MoveSelectedRowEvent=function(oldData, nowData)
1272
+ {
1273
+ var chart=this.ChartPaint[0];
1274
+ if (!chart) return null;
1275
+
1276
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOVE_SELECTED_TREPORT_ROW);
1277
+ if (!event || !event.Callback) return;
1278
+
1279
+ if (oldData && nowData)
1280
+ {
1281
+ if (oldData.ExePrice==nowData.ExePrice && oldData.CellType==nowData.CellType) return;
1282
+ }
1283
+
1284
+ if (oldData)
1285
+ {
1286
+ if (chart.GetExePriceDataCallback) oldData.TData=chart.GetExePriceDataCallback(oldData.ExePrice);
1287
+ if (oldData.TData)
1288
+ {
1289
+ if (oldData.CellType==1) oldData.Item=oldData.TData.LeftData;
1290
+ else if (oldData.CellType==2) oldData.Item=oldData.TData.RightData;
1291
+ }
1292
+ }
1293
+
1294
+ if (nowData)
1295
+ {
1296
+ if (chart.GetExePriceDataCallback) nowData.TData=chart.GetExePriceDataCallback(nowData.ExePrice);
1297
+ if (nowData.TData)
1298
+ {
1299
+ if (nowData.CellType==1) nowData.Item=nowData.TData.LeftData;
1300
+ else if (nowData.CellType==2) nowData.Item=nowData.TData.RightData;
1301
+ }
1302
+ }
1303
+
1304
+ var endData={ Old:oldData, Now:nowData, Symbol:this.Symbol };
1305
+ event.Callback(event, endData, this);
1306
+ }
1307
+
1271
1308
  //是否循环翻页 { EnablePageCycle: true/false }
1272
1309
  this.MoveSelectedRow=function(step, option)
1273
1310
  {
@@ -1299,13 +1336,19 @@ function JSTReportChartContainer(uielement)
1299
1336
  }
1300
1337
  }
1301
1338
  }
1302
-
1339
+
1340
+ var oldData=null, nowData=null;
1341
+ if (chart.SelectedRow) oldData=CloneData(chart.SelectedRow); //上一个数据保存下
1342
+
1303
1343
  if (step>0)
1304
1344
  {
1305
1345
  if (selectedIndex<0 || selectedIndex<pageStatus.Start || selectedIndex>pageStatus.End)
1306
1346
  {
1307
1347
  chart.SelectedRow={ ExePrice:this.Data.Data[pageStatus.Start], CellType:cellType };
1308
1348
  result.Redraw=true;
1349
+
1350
+ nowData=CloneData(chart.SelectedRow);
1351
+ this.MoveSelectedRowEvent(oldData,nowData);
1309
1352
  return result;
1310
1353
  }
1311
1354
 
@@ -1331,6 +1374,8 @@ function JSTReportChartContainer(uielement)
1331
1374
  chart.SelectedRow={ ExePrice:this.Data.Data[selectedIndex], CellType:cellType };
1332
1375
  this.Data.YOffset=offset;
1333
1376
 
1377
+ nowData=CloneData(chart.SelectedRow);
1378
+ this.MoveSelectedRowEvent(oldData,nowData);
1334
1379
  return result;
1335
1380
  }
1336
1381
  else if (step<0)
@@ -1339,6 +1384,9 @@ function JSTReportChartContainer(uielement)
1339
1384
  {
1340
1385
  chart.SelectedRow={ ExePrice:this.Data.Data[pageStatus.End], CellType:cellType };
1341
1386
  result.Redraw=true;
1387
+
1388
+ nowData=CloneData(chart.SelectedRow);
1389
+ this.MoveSelectedRowEvent(oldData,nowData);
1342
1390
  return result;
1343
1391
  }
1344
1392
 
@@ -1366,6 +1414,8 @@ function JSTReportChartContainer(uielement)
1366
1414
  chart.SelectedRow={ ExePrice:this.Data.Data[selectedIndex], CellType:cellType };
1367
1415
  this.Data.YOffset=offset;
1368
1416
 
1417
+ nowData=CloneData(chart.SelectedRow);
1418
+ this.MoveSelectedRowEvent(oldData,nowData);
1369
1419
  return result;
1370
1420
  }
1371
1421
 
@@ -2419,10 +2469,17 @@ function ChartTReport()
2419
2469
  var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);
2420
2470
  if (!fieldName) return;
2421
2471
 
2422
- var text=data[fieldName];
2423
- if (!IFrameSplitOperator.IsString(text)) return;
2424
-
2425
- drawInfo.Text=text;
2472
+ var item=data[fieldName];
2473
+ if (IFrameSplitOperator.IsObject(item))
2474
+ {
2475
+ if (item.Text) drawInfo.Text=item.Text;
2476
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
2477
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
2478
+ }
2479
+ else if (IFrameSplitOperator.IsString(item))
2480
+ {
2481
+ drawInfo.Text=item;
2482
+ }
2426
2483
  }
2427
2484
 
2428
2485
  this.GetFlashBGData=function(drawInfo, exePriceData, columnType, cellType)
@@ -2615,6 +2615,7 @@ var JSCHART_EVENT_ID=
2615
2615
  ON_RCLICK_TREPORT_HEADER:125, //右键点击T型报价表头
2616
2616
  ON_TREPORT_LOCAL_SORT:126, //T型报价列表本地排序
2617
2617
  ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
2618
+ ON_MOVE_SELECTED_TREPORT_ROW:128, //选中行变动
2618
2619
 
2619
2620
  ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
2620
2621
  ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
@@ -48326,6 +48327,11 @@ IFrameSplitOperator.IsUndefined=function(value)
48326
48327
  return value===undefined;
48327
48328
  }
48328
48329
 
48330
+ IFrameSplitOperator.IsObject=function(value)
48331
+ {
48332
+ return value instanceof Object;
48333
+ }
48334
+
48329
48335
  IFrameSplitOperator.RemoveZero=function(strValue)
48330
48336
  {
48331
48337
  while(strValue.length>0)
@@ -3098,7 +3098,7 @@ function JSReportChartContainer(uielement)
3098
3098
  var scrollbar=chart.VScrollbar;
3099
3099
  if (!scrollbar) return;
3100
3100
 
3101
- if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
3101
+ scrollbar.SetOption(option);
3102
3102
  }
3103
3103
 
3104
3104
  this.SetSelectedTab=function(index, opiton)
@@ -6328,10 +6328,17 @@ function ChartReport()
6328
6328
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);
6329
6329
  if (!fieldName) return;
6330
6330
 
6331
- var text=data[fieldName];
6332
- if (!IFrameSplitOperator.IsString(text)) return;
6333
-
6334
- drawInfo.Text=text;
6331
+ var item=data[fieldName];
6332
+ if (IFrameSplitOperator.IsObject(item))
6333
+ {
6334
+ if (item.Text) drawInfo.Text=item.Text;
6335
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
6336
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
6337
+ }
6338
+ else if (IFrameSplitOperator.IsString(item))
6339
+ {
6340
+ drawInfo.Text=item;
6341
+ }
6335
6342
  }
6336
6343
 
6337
6344
  this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
@@ -8349,15 +8356,37 @@ function ChartVScrollbar()
8349
8356
  this.LastStatus={ Draw:false, };
8350
8357
  this.GlobalOption;
8351
8358
 
8359
+ this.Style=0; //0=滚动条+按钮 1=滚动条
8360
+
8352
8361
  this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
8353
8362
  this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
8354
8363
  this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
8355
8364
  this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
8356
8365
  this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
8357
- this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
8366
+ this.Margin={ Left:2, Right:2, Top:2, Bottom:2 };
8358
8367
  this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
8359
8368
 
8360
8369
  this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
8370
+
8371
+ //this.BarWithConfig.Size=2;
8372
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
8373
+
8374
+ this.SetOption=function(option)
8375
+ {
8376
+ if (!option) return;
8377
+
8378
+ if (IFrameSplitOperator.IsBool(option.Enable)) this.Enable=option.Enable;
8379
+ if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
8380
+ if (IFrameSplitOperator.IsNumber(option.BarWidth)) this.BarWithConfig.Size=option.BarWidth;
8381
+ if (option.Margin)
8382
+ {
8383
+ var item=option.Margin;
8384
+ if (IFrameSplitOperator.IsNumber(item.Top)) this.Margin.Top=item.Top;
8385
+ if (IFrameSplitOperator.IsNumber(item.Bottom)) this.Margin.Bottom=item.Bottom;
8386
+ if (IFrameSplitOperator.IsNumber(item.Left)) this.Margin.Left=item.Left;
8387
+ if (IFrameSplitOperator.IsNumber(item.Right)) this.Margin.Right=item.Right;
8388
+ }
8389
+ }
8361
8390
 
8362
8391
  this.ReloadResource=function(resource)
8363
8392
  {
@@ -8373,11 +8402,12 @@ function ChartVScrollbar()
8373
8402
  {
8374
8403
  var pixelRatio=GetDevicePixelRatio();
8375
8404
 
8376
- var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
8405
+ var width=this.BarWithConfig.Size*pixelRatio+this.Margin.Left+this.Margin.Right;
8377
8406
  this.ButtonSize=Math.min(25, width);
8378
8407
  }
8379
8408
 
8380
- this.DrawScrollbar=function(left, top, right, bottom)
8409
+ //不带上下按钮的滚动条样式
8410
+ this.DrawScrollbarStyle2=function(left, top, right, bottom)
8381
8411
  {
8382
8412
  this.LastStatus.Draw=false;
8383
8413
  this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
@@ -8396,11 +8426,61 @@ function ChartVScrollbar()
8396
8426
  this.MaxPos=dataCount;
8397
8427
  this.CurrentPos=xOffset;
8398
8428
 
8399
- var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
8429
+ var scrollTop=top+this.Margin.Top+2;
8430
+ var scrollBottom=bottom-this.Margin.Bottom-2;
8431
+ var centerHeight=scrollBottom-scrollTop;
8432
+ var value = centerHeight - this.ScrollBarHeight;
8433
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
8434
+ var y = scrollTop + 2 + yOffset;
8435
+
8436
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
8437
+ rtBar.Left=rtBar.Right-buttonSize;
8438
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
8439
+ if (rtBar.Bottom>scrollBottom-2)
8440
+ {
8441
+ rtBar.Bottom=scrollBottom-2;
8442
+ rtBar.Top=rtBar.Bottom-rtBar.Height;
8443
+ }
8444
+
8445
+ this.RectScroll.Bar=rtBar;
8446
+ this.RectScroll.Client={ Left:rtBar.Left, Right: rtBar.Right, Top:scrollTop, Bottom:scrollBottom };
8447
+
8448
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
8449
+ rtBG.Left=rtBG.Right-rtBG.Width;
8450
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
8451
+ this.Canvas.fillStyle=this.BGColor;
8452
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
8453
+
8454
+ this.Canvas.fillStyle=this.BarColor;
8455
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
8456
+
8457
+ this.LastStatus.Draw=true;
8458
+ }
8459
+
8460
+ this.DrawScrollbarStyle=function(left, top, right, bottom)
8461
+ {
8462
+ this.LastStatus.Draw=false;
8463
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
8464
+ if (!this.Enable) return;
8465
+
8466
+ var isShow=this.IsShowCallback();
8467
+ if (!isShow) return;
8468
+
8469
+ var pageInfo=this.Report.GetCurrentPageStatus();
8470
+ if (pageInfo.IsSinglePage) return;
8471
+
8472
+ var xOffset=pageInfo.Start;
8473
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
8474
+ var buttonSize=this.ButtonSize;
8475
+
8476
+ this.MaxPos=dataCount;
8477
+ this.CurrentPos=xOffset;
8478
+
8479
+ var rtTop={ Right:right-this.Margin.Right, Top:top+this.Margin.Top, Width:buttonSize, Height:buttonSize };
8400
8480
  rtTop.Left=rtTop.Right-buttonSize;
8401
8481
  rtTop.Bottom=rtTop.Top+buttonSize;
8402
8482
 
8403
- var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
8483
+ var rtBottom={ Right:right-this.Margin.Right, Bottom:bottom-this.Margin.Bottom, Width:buttonSize, Height:buttonSize };
8404
8484
  rtBottom.Left=rtBottom.Right-buttonSize;
8405
8485
  rtBottom.Top=rtBottom.Bottom-buttonSize;
8406
8486
 
@@ -8409,7 +8489,7 @@ function ChartVScrollbar()
8409
8489
  var yOffset = (value * this.CurrentPos) / this.MaxPos;
8410
8490
  var y = rtTop.Bottom + 2 + yOffset;
8411
8491
 
8412
- var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
8492
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
8413
8493
  rtBar.Left=rtBar.Right-buttonSize;
8414
8494
  rtBar.Bottom=rtBar.Top+rtBar.Height;
8415
8495
  if (rtBar.Bottom>rtBottom.Top-2)
@@ -8423,7 +8503,7 @@ function ChartVScrollbar()
8423
8503
  this.RectScroll.Bar=rtBar;
8424
8504
  this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
8425
8505
 
8426
- var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
8506
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
8427
8507
  rtBG.Left=rtBG.Right-rtBG.Width;
8428
8508
  rtBG.Height=rtBG.Bottom-rtBG.Top;
8429
8509
  this.Canvas.fillStyle=this.BGColor;
@@ -8443,6 +8523,14 @@ function ChartVScrollbar()
8443
8523
  this.LastStatus.Draw=true;
8444
8524
  }
8445
8525
 
8526
+ this.DrawScrollbar=function(left, top, right, bottom)
8527
+ {
8528
+ if (this.Style==1)
8529
+ this.DrawScrollbarStyle2(left, top, right, bottom);
8530
+ else
8531
+ this.DrawScrollbarStyle(left, top, right, bottom);
8532
+ }
8533
+
8446
8534
  this.OnMouseDown=function(x,y, e)
8447
8535
  {
8448
8536
  return this.PtInScroll(x,y);
@@ -6540,6 +6540,7 @@ var JSCHART_EVENT_ID=
6540
6540
  ON_RCLICK_TREPORT_HEADER:125, //右键点击T型报价表头
6541
6541
  ON_TREPORT_LOCAL_SORT:126, //T型报价列表本地排序
6542
6542
  ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
6543
+ ON_MOVE_SELECTED_TREPORT_ROW:128, //选中行变动
6543
6544
 
6544
6545
  ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
6545
6546
  ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
@@ -52251,6 +52252,11 @@ IFrameSplitOperator.IsUndefined=function(value)
52251
52252
  return value===undefined;
52252
52253
  }
52253
52254
 
52255
+ IFrameSplitOperator.IsObject=function(value)
52256
+ {
52257
+ return value instanceof Object;
52258
+ }
52259
+
52254
52260
  IFrameSplitOperator.RemoveZero=function(strValue)
52255
52261
  {
52256
52262
  while(strValue.length>0)
@@ -130270,7 +130276,7 @@ function JSReportChartContainer(uielement)
130270
130276
  var scrollbar=chart.VScrollbar;
130271
130277
  if (!scrollbar) return;
130272
130278
 
130273
- if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
130279
+ scrollbar.SetOption(option);
130274
130280
  }
130275
130281
 
130276
130282
  this.SetSelectedTab=function(index, opiton)
@@ -133500,10 +133506,17 @@ function ChartReport()
133500
133506
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);
133501
133507
  if (!fieldName) return;
133502
133508
 
133503
- var text=data[fieldName];
133504
- if (!IFrameSplitOperator.IsString(text)) return;
133505
-
133506
- drawInfo.Text=text;
133509
+ var item=data[fieldName];
133510
+ if (IFrameSplitOperator.IsObject(item))
133511
+ {
133512
+ if (item.Text) drawInfo.Text=item.Text;
133513
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
133514
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
133515
+ }
133516
+ else if (IFrameSplitOperator.IsString(item))
133517
+ {
133518
+ drawInfo.Text=item;
133519
+ }
133507
133520
  }
133508
133521
 
133509
133522
  this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
@@ -135521,15 +135534,37 @@ function ChartVScrollbar()
135521
135534
  this.LastStatus={ Draw:false, };
135522
135535
  this.GlobalOption;
135523
135536
 
135537
+ this.Style=0; //0=滚动条+按钮 1=滚动条
135538
+
135524
135539
  this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
135525
135540
  this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
135526
135541
  this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
135527
135542
  this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
135528
135543
  this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
135529
- this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
135544
+ this.Margin={ Left:2, Right:2, Top:2, Bottom:2 };
135530
135545
  this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
135531
135546
 
135532
135547
  this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
135548
+
135549
+ //this.BarWithConfig.Size=2;
135550
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
135551
+
135552
+ this.SetOption=function(option)
135553
+ {
135554
+ if (!option) return;
135555
+
135556
+ if (IFrameSplitOperator.IsBool(option.Enable)) this.Enable=option.Enable;
135557
+ if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
135558
+ if (IFrameSplitOperator.IsNumber(option.BarWidth)) this.BarWithConfig.Size=option.BarWidth;
135559
+ if (option.Margin)
135560
+ {
135561
+ var item=option.Margin;
135562
+ if (IFrameSplitOperator.IsNumber(item.Top)) this.Margin.Top=item.Top;
135563
+ if (IFrameSplitOperator.IsNumber(item.Bottom)) this.Margin.Bottom=item.Bottom;
135564
+ if (IFrameSplitOperator.IsNumber(item.Left)) this.Margin.Left=item.Left;
135565
+ if (IFrameSplitOperator.IsNumber(item.Right)) this.Margin.Right=item.Right;
135566
+ }
135567
+ }
135533
135568
 
135534
135569
  this.ReloadResource=function(resource)
135535
135570
  {
@@ -135545,11 +135580,12 @@ function ChartVScrollbar()
135545
135580
  {
135546
135581
  var pixelRatio=GetDevicePixelRatio();
135547
135582
 
135548
- var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
135583
+ var width=this.BarWithConfig.Size*pixelRatio+this.Margin.Left+this.Margin.Right;
135549
135584
  this.ButtonSize=Math.min(25, width);
135550
135585
  }
135551
135586
 
135552
- this.DrawScrollbar=function(left, top, right, bottom)
135587
+ //不带上下按钮的滚动条样式
135588
+ this.DrawScrollbarStyle2=function(left, top, right, bottom)
135553
135589
  {
135554
135590
  this.LastStatus.Draw=false;
135555
135591
  this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
@@ -135568,11 +135604,61 @@ function ChartVScrollbar()
135568
135604
  this.MaxPos=dataCount;
135569
135605
  this.CurrentPos=xOffset;
135570
135606
 
135571
- var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
135607
+ var scrollTop=top+this.Margin.Top+2;
135608
+ var scrollBottom=bottom-this.Margin.Bottom-2;
135609
+ var centerHeight=scrollBottom-scrollTop;
135610
+ var value = centerHeight - this.ScrollBarHeight;
135611
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
135612
+ var y = scrollTop + 2 + yOffset;
135613
+
135614
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135615
+ rtBar.Left=rtBar.Right-buttonSize;
135616
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
135617
+ if (rtBar.Bottom>scrollBottom-2)
135618
+ {
135619
+ rtBar.Bottom=scrollBottom-2;
135620
+ rtBar.Top=rtBar.Bottom-rtBar.Height;
135621
+ }
135622
+
135623
+ this.RectScroll.Bar=rtBar;
135624
+ this.RectScroll.Client={ Left:rtBar.Left, Right: rtBar.Right, Top:scrollTop, Bottom:scrollBottom };
135625
+
135626
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135627
+ rtBG.Left=rtBG.Right-rtBG.Width;
135628
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
135629
+ this.Canvas.fillStyle=this.BGColor;
135630
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
135631
+
135632
+ this.Canvas.fillStyle=this.BarColor;
135633
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
135634
+
135635
+ this.LastStatus.Draw=true;
135636
+ }
135637
+
135638
+ this.DrawScrollbarStyle=function(left, top, right, bottom)
135639
+ {
135640
+ this.LastStatus.Draw=false;
135641
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
135642
+ if (!this.Enable) return;
135643
+
135644
+ var isShow=this.IsShowCallback();
135645
+ if (!isShow) return;
135646
+
135647
+ var pageInfo=this.Report.GetCurrentPageStatus();
135648
+ if (pageInfo.IsSinglePage) return;
135649
+
135650
+ var xOffset=pageInfo.Start;
135651
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
135652
+ var buttonSize=this.ButtonSize;
135653
+
135654
+ this.MaxPos=dataCount;
135655
+ this.CurrentPos=xOffset;
135656
+
135657
+ var rtTop={ Right:right-this.Margin.Right, Top:top+this.Margin.Top, Width:buttonSize, Height:buttonSize };
135572
135658
  rtTop.Left=rtTop.Right-buttonSize;
135573
135659
  rtTop.Bottom=rtTop.Top+buttonSize;
135574
135660
 
135575
- var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
135661
+ var rtBottom={ Right:right-this.Margin.Right, Bottom:bottom-this.Margin.Bottom, Width:buttonSize, Height:buttonSize };
135576
135662
  rtBottom.Left=rtBottom.Right-buttonSize;
135577
135663
  rtBottom.Top=rtBottom.Bottom-buttonSize;
135578
135664
 
@@ -135581,7 +135667,7 @@ function ChartVScrollbar()
135581
135667
  var yOffset = (value * this.CurrentPos) / this.MaxPos;
135582
135668
  var y = rtTop.Bottom + 2 + yOffset;
135583
135669
 
135584
- var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135670
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135585
135671
  rtBar.Left=rtBar.Right-buttonSize;
135586
135672
  rtBar.Bottom=rtBar.Top+rtBar.Height;
135587
135673
  if (rtBar.Bottom>rtBottom.Top-2)
@@ -135595,7 +135681,7 @@ function ChartVScrollbar()
135595
135681
  this.RectScroll.Bar=rtBar;
135596
135682
  this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
135597
135683
 
135598
- var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
135684
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135599
135685
  rtBG.Left=rtBG.Right-rtBG.Width;
135600
135686
  rtBG.Height=rtBG.Bottom-rtBG.Top;
135601
135687
  this.Canvas.fillStyle=this.BGColor;
@@ -135615,6 +135701,14 @@ function ChartVScrollbar()
135615
135701
  this.LastStatus.Draw=true;
135616
135702
  }
135617
135703
 
135704
+ this.DrawScrollbar=function(left, top, right, bottom)
135705
+ {
135706
+ if (this.Style==1)
135707
+ this.DrawScrollbarStyle2(left, top, right, bottom);
135708
+ else
135709
+ this.DrawScrollbarStyle(left, top, right, bottom);
135710
+ }
135711
+
135618
135712
  this.OnMouseDown=function(x,y, e)
135619
135713
  {
135620
135714
  return this.PtInScroll(x,y);
@@ -139167,7 +139261,7 @@ function ScrollBarBGChart()
139167
139261
 
139168
139262
 
139169
139263
 
139170
- var HQCHART_VERSION="1.1.14029";
139264
+ var HQCHART_VERSION="1.1.14036";
139171
139265
 
139172
139266
  function PrintHQChartVersion()
139173
139267
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14029";
8
+ var HQCHART_VERSION="1.1.14036";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -6584,6 +6584,7 @@ var JSCHART_EVENT_ID=
6584
6584
  ON_RCLICK_TREPORT_HEADER:125, //右键点击T型报价表头
6585
6585
  ON_TREPORT_LOCAL_SORT:126, //T型报价列表本地排序
6586
6586
  ON_CLICK_TREPORT_ROW:127, //左键点击点击T型报价列表
6587
+ ON_MOVE_SELECTED_TREPORT_ROW:128, //选中行变动
6587
6588
 
6588
6589
  ON_DRAW_REPORT_ROW_BG:140, //报价列表整行背景
6589
6590
  ON_CLICK_REPORT_CHECKBOX:141, //报价列表checkbox
@@ -52295,6 +52296,11 @@ IFrameSplitOperator.IsUndefined=function(value)
52295
52296
  return value===undefined;
52296
52297
  }
52297
52298
 
52299
+ IFrameSplitOperator.IsObject=function(value)
52300
+ {
52301
+ return value instanceof Object;
52302
+ }
52303
+
52298
52304
  IFrameSplitOperator.RemoveZero=function(strValue)
52299
52305
  {
52300
52306
  while(strValue.length>0)
@@ -130314,7 +130320,7 @@ function JSReportChartContainer(uielement)
130314
130320
  var scrollbar=chart.VScrollbar;
130315
130321
  if (!scrollbar) return;
130316
130322
 
130317
- if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
130323
+ scrollbar.SetOption(option);
130318
130324
  }
130319
130325
 
130320
130326
  this.SetSelectedTab=function(index, opiton)
@@ -133544,10 +133550,17 @@ function ChartReport()
133544
133550
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);
133545
133551
  if (!fieldName) return;
133546
133552
 
133547
- var text=data[fieldName];
133548
- if (!IFrameSplitOperator.IsString(text)) return;
133549
-
133550
- drawInfo.Text=text;
133553
+ var item=data[fieldName];
133554
+ if (IFrameSplitOperator.IsObject(item))
133555
+ {
133556
+ if (item.Text) drawInfo.Text=item.Text;
133557
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
133558
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
133559
+ }
133560
+ else if (IFrameSplitOperator.IsString(item))
133561
+ {
133562
+ drawInfo.Text=item;
133563
+ }
133551
133564
  }
133552
133565
 
133553
133566
  this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
@@ -135565,15 +135578,37 @@ function ChartVScrollbar()
135565
135578
  this.LastStatus={ Draw:false, };
135566
135579
  this.GlobalOption;
135567
135580
 
135581
+ this.Style=0; //0=滚动条+按钮 1=滚动条
135582
+
135568
135583
  this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
135569
135584
  this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
135570
135585
  this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
135571
135586
  this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
135572
135587
  this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
135573
- this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
135588
+ this.Margin={ Left:2, Right:2, Top:2, Bottom:2 };
135574
135589
  this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
135575
135590
 
135576
135591
  this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
135592
+
135593
+ //this.BarWithConfig.Size=2;
135594
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
135595
+
135596
+ this.SetOption=function(option)
135597
+ {
135598
+ if (!option) return;
135599
+
135600
+ if (IFrameSplitOperator.IsBool(option.Enable)) this.Enable=option.Enable;
135601
+ if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
135602
+ if (IFrameSplitOperator.IsNumber(option.BarWidth)) this.BarWithConfig.Size=option.BarWidth;
135603
+ if (option.Margin)
135604
+ {
135605
+ var item=option.Margin;
135606
+ if (IFrameSplitOperator.IsNumber(item.Top)) this.Margin.Top=item.Top;
135607
+ if (IFrameSplitOperator.IsNumber(item.Bottom)) this.Margin.Bottom=item.Bottom;
135608
+ if (IFrameSplitOperator.IsNumber(item.Left)) this.Margin.Left=item.Left;
135609
+ if (IFrameSplitOperator.IsNumber(item.Right)) this.Margin.Right=item.Right;
135610
+ }
135611
+ }
135577
135612
 
135578
135613
  this.ReloadResource=function(resource)
135579
135614
  {
@@ -135589,11 +135624,12 @@ function ChartVScrollbar()
135589
135624
  {
135590
135625
  var pixelRatio=GetDevicePixelRatio();
135591
135626
 
135592
- var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
135627
+ var width=this.BarWithConfig.Size*pixelRatio+this.Margin.Left+this.Margin.Right;
135593
135628
  this.ButtonSize=Math.min(25, width);
135594
135629
  }
135595
135630
 
135596
- this.DrawScrollbar=function(left, top, right, bottom)
135631
+ //不带上下按钮的滚动条样式
135632
+ this.DrawScrollbarStyle2=function(left, top, right, bottom)
135597
135633
  {
135598
135634
  this.LastStatus.Draw=false;
135599
135635
  this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
@@ -135612,11 +135648,61 @@ function ChartVScrollbar()
135612
135648
  this.MaxPos=dataCount;
135613
135649
  this.CurrentPos=xOffset;
135614
135650
 
135615
- var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
135651
+ var scrollTop=top+this.Margin.Top+2;
135652
+ var scrollBottom=bottom-this.Margin.Bottom-2;
135653
+ var centerHeight=scrollBottom-scrollTop;
135654
+ var value = centerHeight - this.ScrollBarHeight;
135655
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
135656
+ var y = scrollTop + 2 + yOffset;
135657
+
135658
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135659
+ rtBar.Left=rtBar.Right-buttonSize;
135660
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
135661
+ if (rtBar.Bottom>scrollBottom-2)
135662
+ {
135663
+ rtBar.Bottom=scrollBottom-2;
135664
+ rtBar.Top=rtBar.Bottom-rtBar.Height;
135665
+ }
135666
+
135667
+ this.RectScroll.Bar=rtBar;
135668
+ this.RectScroll.Client={ Left:rtBar.Left, Right: rtBar.Right, Top:scrollTop, Bottom:scrollBottom };
135669
+
135670
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135671
+ rtBG.Left=rtBG.Right-rtBG.Width;
135672
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
135673
+ this.Canvas.fillStyle=this.BGColor;
135674
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
135675
+
135676
+ this.Canvas.fillStyle=this.BarColor;
135677
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
135678
+
135679
+ this.LastStatus.Draw=true;
135680
+ }
135681
+
135682
+ this.DrawScrollbarStyle=function(left, top, right, bottom)
135683
+ {
135684
+ this.LastStatus.Draw=false;
135685
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
135686
+ if (!this.Enable) return;
135687
+
135688
+ var isShow=this.IsShowCallback();
135689
+ if (!isShow) return;
135690
+
135691
+ var pageInfo=this.Report.GetCurrentPageStatus();
135692
+ if (pageInfo.IsSinglePage) return;
135693
+
135694
+ var xOffset=pageInfo.Start;
135695
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
135696
+ var buttonSize=this.ButtonSize;
135697
+
135698
+ this.MaxPos=dataCount;
135699
+ this.CurrentPos=xOffset;
135700
+
135701
+ var rtTop={ Right:right-this.Margin.Right, Top:top+this.Margin.Top, Width:buttonSize, Height:buttonSize };
135616
135702
  rtTop.Left=rtTop.Right-buttonSize;
135617
135703
  rtTop.Bottom=rtTop.Top+buttonSize;
135618
135704
 
135619
- var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
135705
+ var rtBottom={ Right:right-this.Margin.Right, Bottom:bottom-this.Margin.Bottom, Width:buttonSize, Height:buttonSize };
135620
135706
  rtBottom.Left=rtBottom.Right-buttonSize;
135621
135707
  rtBottom.Top=rtBottom.Bottom-buttonSize;
135622
135708
 
@@ -135625,7 +135711,7 @@ function ChartVScrollbar()
135625
135711
  var yOffset = (value * this.CurrentPos) / this.MaxPos;
135626
135712
  var y = rtTop.Bottom + 2 + yOffset;
135627
135713
 
135628
- var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135714
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135629
135715
  rtBar.Left=rtBar.Right-buttonSize;
135630
135716
  rtBar.Bottom=rtBar.Top+rtBar.Height;
135631
135717
  if (rtBar.Bottom>rtBottom.Top-2)
@@ -135639,7 +135725,7 @@ function ChartVScrollbar()
135639
135725
  this.RectScroll.Bar=rtBar;
135640
135726
  this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
135641
135727
 
135642
- var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
135728
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135643
135729
  rtBG.Left=rtBG.Right-rtBG.Width;
135644
135730
  rtBG.Height=rtBG.Bottom-rtBG.Top;
135645
135731
  this.Canvas.fillStyle=this.BGColor;
@@ -135659,6 +135745,14 @@ function ChartVScrollbar()
135659
135745
  this.LastStatus.Draw=true;
135660
135746
  }
135661
135747
 
135748
+ this.DrawScrollbar=function(left, top, right, bottom)
135749
+ {
135750
+ if (this.Style==1)
135751
+ this.DrawScrollbarStyle2(left, top, right, bottom);
135752
+ else
135753
+ this.DrawScrollbarStyle(left, top, right, bottom);
135754
+ }
135755
+
135662
135756
  this.OnMouseDown=function(x,y, e)
135663
135757
  {
135664
135758
  return this.PtInScroll(x,y);
@@ -136764,16 +136858,16 @@ function JSTReportChartContainer(uielement)
136764
136858
 
136765
136859
 
136766
136860
  //10个字符型 201-299
136767
- if (IFrameSplitOperator.IsString(item[201])) stock.ReserveString1=item[201];
136768
- if (IFrameSplitOperator.IsString(item[202])) stock.ReserveString2=item[202];
136769
- if (IFrameSplitOperator.IsString(item[203])) stock.ReserveString3=item[203];
136770
- if (IFrameSplitOperator.IsString(item[204])) stock.ReserveString4=item[204];
136771
- if (IFrameSplitOperator.IsString(item[205])) stock.ReserveString5=item[205];
136772
- if (IFrameSplitOperator.IsString(item[206])) stock.ReserveString6=item[206];
136773
- if (IFrameSplitOperator.IsString(item[207])) stock.ReserveString7=item[207];
136774
- if (IFrameSplitOperator.IsString(item[208])) stock.ReserveString8=item[208];
136775
- if (IFrameSplitOperator.IsString(item[209])) stock.ReserveString9=item[209];
136776
- if (IFrameSplitOperator.IsString(item[210])) stock.ReserveString10=item[210];
136861
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) stock.ReserveString1=item[201];
136862
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) stock.ReserveString2=item[202];
136863
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) stock.ReserveString3=item[203];
136864
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) stock.ReserveString4=item[204];
136865
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) stock.ReserveString5=item[205];
136866
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) stock.ReserveString6=item[206];
136867
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) stock.ReserveString7=item[207];
136868
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) stock.ReserveString8=item[208];
136869
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) stock.ReserveString9=item[209];
136870
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) stock.ReserveString10=item[210];
136777
136871
  }
136778
136872
 
136779
136873
 
@@ -137140,6 +137234,43 @@ function JSTReportChartContainer(uielement)
137140
137234
  else e.returnValue = false;
137141
137235
  }
137142
137236
 
137237
+ this.MoveSelectedRowEvent=function(oldData, nowData)
137238
+ {
137239
+ var chart=this.ChartPaint[0];
137240
+ if (!chart) return null;
137241
+
137242
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOVE_SELECTED_TREPORT_ROW);
137243
+ if (!event || !event.Callback) return;
137244
+
137245
+ if (oldData && nowData)
137246
+ {
137247
+ if (oldData.ExePrice==nowData.ExePrice && oldData.CellType==nowData.CellType) return;
137248
+ }
137249
+
137250
+ if (oldData)
137251
+ {
137252
+ if (chart.GetExePriceDataCallback) oldData.TData=chart.GetExePriceDataCallback(oldData.ExePrice);
137253
+ if (oldData.TData)
137254
+ {
137255
+ if (oldData.CellType==1) oldData.Item=oldData.TData.LeftData;
137256
+ else if (oldData.CellType==2) oldData.Item=oldData.TData.RightData;
137257
+ }
137258
+ }
137259
+
137260
+ if (nowData)
137261
+ {
137262
+ if (chart.GetExePriceDataCallback) nowData.TData=chart.GetExePriceDataCallback(nowData.ExePrice);
137263
+ if (nowData.TData)
137264
+ {
137265
+ if (nowData.CellType==1) nowData.Item=nowData.TData.LeftData;
137266
+ else if (nowData.CellType==2) nowData.Item=nowData.TData.RightData;
137267
+ }
137268
+ }
137269
+
137270
+ var endData={ Old:oldData, Now:nowData, Symbol:this.Symbol };
137271
+ event.Callback(event, endData, this);
137272
+ }
137273
+
137143
137274
  //是否循环翻页 { EnablePageCycle: true/false }
137144
137275
  this.MoveSelectedRow=function(step, option)
137145
137276
  {
@@ -137171,13 +137302,19 @@ function JSTReportChartContainer(uielement)
137171
137302
  }
137172
137303
  }
137173
137304
  }
137174
-
137305
+
137306
+ var oldData=null, nowData=null;
137307
+ if (chart.SelectedRow) oldData=CloneData(chart.SelectedRow); //上一个数据保存下
137308
+
137175
137309
  if (step>0)
137176
137310
  {
137177
137311
  if (selectedIndex<0 || selectedIndex<pageStatus.Start || selectedIndex>pageStatus.End)
137178
137312
  {
137179
137313
  chart.SelectedRow={ ExePrice:this.Data.Data[pageStatus.Start], CellType:cellType };
137180
137314
  result.Redraw=true;
137315
+
137316
+ nowData=CloneData(chart.SelectedRow);
137317
+ this.MoveSelectedRowEvent(oldData,nowData);
137181
137318
  return result;
137182
137319
  }
137183
137320
 
@@ -137203,6 +137340,8 @@ function JSTReportChartContainer(uielement)
137203
137340
  chart.SelectedRow={ ExePrice:this.Data.Data[selectedIndex], CellType:cellType };
137204
137341
  this.Data.YOffset=offset;
137205
137342
 
137343
+ nowData=CloneData(chart.SelectedRow);
137344
+ this.MoveSelectedRowEvent(oldData,nowData);
137206
137345
  return result;
137207
137346
  }
137208
137347
  else if (step<0)
@@ -137211,6 +137350,9 @@ function JSTReportChartContainer(uielement)
137211
137350
  {
137212
137351
  chart.SelectedRow={ ExePrice:this.Data.Data[pageStatus.End], CellType:cellType };
137213
137352
  result.Redraw=true;
137353
+
137354
+ nowData=CloneData(chart.SelectedRow);
137355
+ this.MoveSelectedRowEvent(oldData,nowData);
137214
137356
  return result;
137215
137357
  }
137216
137358
 
@@ -137238,6 +137380,8 @@ function JSTReportChartContainer(uielement)
137238
137380
  chart.SelectedRow={ ExePrice:this.Data.Data[selectedIndex], CellType:cellType };
137239
137381
  this.Data.YOffset=offset;
137240
137382
 
137383
+ nowData=CloneData(chart.SelectedRow);
137384
+ this.MoveSelectedRowEvent(oldData,nowData);
137241
137385
  return result;
137242
137386
  }
137243
137387
 
@@ -138291,10 +138435,17 @@ function ChartTReport()
138291
138435
  var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);
138292
138436
  if (!fieldName) return;
138293
138437
 
138294
- var text=data[fieldName];
138295
- if (!IFrameSplitOperator.IsString(text)) return;
138296
-
138297
- drawInfo.Text=text;
138438
+ var item=data[fieldName];
138439
+ if (IFrameSplitOperator.IsObject(item))
138440
+ {
138441
+ if (item.Text) drawInfo.Text=item.Text;
138442
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
138443
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
138444
+ }
138445
+ else if (IFrameSplitOperator.IsString(item))
138446
+ {
138447
+ drawInfo.Text=item;
138448
+ }
138298
138449
  }
138299
138450
 
138300
138451
  this.GetFlashBGData=function(drawInfo, exePriceData, columnType, cellType)
@@ -145855,7 +146006,7 @@ function HQChartScriptWorker()
145855
146006
 
145856
146007
 
145857
146008
 
145858
- var HQCHART_VERSION="1.1.14029";
146009
+ var HQCHART_VERSION="1.1.14036";
145859
146010
 
145860
146011
  function PrintHQChartVersion()
145861
146012
  {