hqchart 1.1.14900 → 1.1.14903

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.
@@ -5529,7 +5529,7 @@ IFrameSplitOperator.IsPlusNumber=function(value){if(value==null)return false;if(
5529
5529
  IFrameSplitOperator.IsInteger=function(x){return typeof x==='number'&&x%1===0;};//判断字段是否存在
5530
5530
  IFrameSplitOperator.IsObjectExist=function(obj){if(obj===undefined)return false;if(obj==null)return false;return true;};//是否时bool
5531
5531
  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;};//是否是非空的数组
5532
- 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);};//是否有效
5532
+ IFrameSplitOperator.IsNonEmptyArray=function(ary){if(!ary)return false;if(!Array.isArray(ary))return false;return ary.length>0;};IFrameSplitOperator.IsArray=function(ary){if(!ary)return false;if(!Array.isArray(ary))return false;return true;};IFrameSplitOperator.IsFloat=function(value){if(value===undefined)return false;if(value==null)return false;if(isNaN(value))return false;return value!=parseInt(value);};//是否有效
5533
5533
  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;};//移除代码市场后缀
5534
5534
  IFrameSplitOperator.RemoveMarketSuffix=function(symbol){if(!symbol)return symbol;var pos=symbol.lastIndexOf(".");if(pos>0)return symbol.substring(0,pos);return symbol;};function FrameSplitKLinePriceY(){this.newMethod=IFrameSplitOperator;//派生
5535
5535
  this.newMethod();delete this.newMethod;this.CoordinateType=0;//坐标类型 0=普通坐标 1=百分比坐标 (右边坐标刻度) 2=对数对标 3=等比坐标 4=等分坐标 5=黄金分割
@@ -13326,7 +13326,8 @@ this.UIElement.ontouchstart=function(e){_this59.OnTouchStart(e);};this.UIElement
13326
13326
  this.Canvas.lineWidth=pixelTatio;//手机端需要根据分辨率比调整线段宽度
13327
13327
  this.LastMouseStatus.MouseOnStatus=null;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash){this.Frame.Draw({IsEnableSplash:this.ChartSplashPaint.IsEnableSplash});this.ChartSplashPaint.Draw();return;}this.Frame.Draw();this.Frame.DrawLogo();//框架内图形
13328
13328
  for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(item.IsDrawFirst)item.Draw(this.LastMouseStatus);}for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(!item.IsDrawFirst)item.Draw(this.LastMouseStatus);}if(this.GlobalOption.FlashBGCount>0){this.DelayDraw(500);}};this.DelayDraw=function(frequency){var _this60=this;if(typeof this.FlashBGTimer=='number'){clearTimeout(this.FlashBGTimer);this.FlashBGTimer=null;}this.FlashBGTimer=setTimeout(function(){_this60.Draw();},frequency);};this.ResetReportStatus=function(){this.Data.XOffset=0;this.Data.YOffset=0;};this.ResetReportSelectStatus=function(){var chart=this.GetReportChart();if(chart){chart.SelectedRow=-1;chart.SelectedFixedRow=-1;chart.MultiSelectedRow=[];}};this.ClearData=function(){this.SourceData.Data=[];this.Data.Data=[];this.Data.Virtual.Count=0;this.BlockData=new _map2.default();};this.ClearMapStockData=function(){this.MapStockData=new _map2.default();};this.ResetSortStatus=function(){this.SortInfo.Field=-1;this.SortInfo.Sort=0;};this.SetSelectedRow=function(option){var reportChart=this.GetReportChart();if(!reportChart)return false;if(!reportChart.SetSelectedRow(option))return false;this.Draw();};//设置股票列表
13329
- this.SetSymbolList=function(arySymbol,option){this.ClearData();this.ResetReportStatus();this.ResetSortStatus();if(IFrameSplitOperator.IsNonEmptyArray(arySymbol)){for(var i=0;i<arySymbol.length;++i){this.Data.Data.push(arySymbol[i]);}}var chart=this.ChartPaint[0];if(chart)chart.Data=this.Data;this.Draw();};this.ChangeSymbol=function(symbol,option){var _this61=this;this.Symbol=symbol;this.ClearData();this.ResetReportStatus();this.ResetSortStatus();this.ResetReportSelectStatus();if(option){if(IFrameSplitOperator.IsNumber(option.TabSelected)){var chartTab=this.GetTabChart();if(chartTab)chartTab.SelectedTabIndex=option.TabSelected;}if(Array.isArray(option.FixedSymbol)){var chart=this.GetReportChart();if(chart){chart.FixedRowCount=0;this.FixedRowData.Type=1;this.FixedRowData.Symbol=[];var aryData=option.FixedSymbol;for(var i=0;i<aryData.length;++i){var item=aryData[i];this.FixedRowData.Symbol.push(item.Symbol);++chart.FixedRowCount;}this.SetSizeChange(true);}}if(option.SortInfo){var item=option.SortInfo;if(IFrameSplitOperator.IsNumber(item.Field))this.SortInfo.Field=item.Field;if(IFrameSplitOperator.IsNumber(item.Sort))this.SortInfo.Sort=item.Sort;}if(IFrameSplitOperator.IsBool(option.IsReloadStockList)&&option.IsReloadStockList){var requestOption={Callback:null};if(this.Symbol)requestOption.Callback=function(){_this61.RequestMemberListData();};this.MapStockData=new _map2.default();this.RequestStockListData(requestOption);return;}}this.RequestMemberListData();};//更新数据
13329
+ this.SetSymbolList=function(arySymbol,option){this.ClearData();this.ResetReportStatus();this.ResetSortStatus();if(IFrameSplitOperator.IsNonEmptyArray(arySymbol)){for(var i=0;i<arySymbol.length;++i){this.Data.Data.push(arySymbol[i]);}}var chart=this.ChartPaint[0];if(chart)chart.Data=this.Data;this.Draw();};this.ChangeSymbol=function(symbol,option){var _this61=this;this.Symbol=symbol;this.ClearData();this.ResetReportStatus();this.ResetSortStatus();this.ResetReportSelectStatus();if(option){if(IFrameSplitOperator.IsNumber(option.TabSelected)){var chartTab=this.GetTabChart();if(chartTab)chartTab.SelectedTabIndex=option.TabSelected;}if(Array.isArray(option.FixedSymbol)){var chart=this.GetReportChart();if(chart){chart.FixedRowCount=0;this.FixedRowData.Type=1;this.FixedRowData.Symbol=[];var aryData=option.FixedSymbol;for(var i=0;i<aryData.length;++i){var item=aryData[i];this.FixedRowData.Symbol.push(item.Symbol);++chart.FixedRowCount;}this.SetSizeChange(true);}}if(option.SortInfo){var item=option.SortInfo;if(IFrameSplitOperator.IsNumber(item.Field))this.SortInfo.Field=item.Field;if(IFrameSplitOperator.IsNumber(item.Sort))this.SortInfo.Sort=item.Sort;}if(IFrameSplitOperator.IsNonEmptyArray(option.Column))//字段重新设置
13330
+ {this.SetColumn(option.Column,{Draw:false});}if(IFrameSplitOperator.IsBool(option.IsReloadStockList)&&option.IsReloadStockList){var requestOption={Callback:null};if(this.Symbol)requestOption.Callback=function(){_this61.RequestMemberListData();};this.MapStockData=new _map2.default();this.RequestStockListData(requestOption);return;}}this.RequestMemberListData();};//更新数据
13330
13331
  this.UpdateFullData=function(data){var arySymbol=[];if(IFrameSplitOperator.IsNonEmptyArray(data.data)){//0=证券代码 1=股票名称
13331
13332
  for(var i=0;i<data.data.length;++i){var item=data.data[i];var symbol=item[0];var stock=null;if(this.MapStockData.has(symbol)){stock=this.MapStockData.get(symbol);}else{stock=new HQReportItem();stock.OriginalSymbol=symbol;this.MapStockData.set(symbol,stock);}stock.Symbol=this.GetSymbolNoSuffix(symbol);stock.Name=item[1];this.ReadStockJsonData(stock,item);arySymbol.push(symbol);}}//设置显示数据
13332
13333
  this.Data.Data=[];this.SourceData.Data=[];if(IFrameSplitOperator.IsNonEmptyArray(arySymbol)){for(var i=0;i<arySymbol.length;++i){this.Data.Data.push(arySymbol[i]);this.SourceData.Data.push(arySymbol[i]);}}this.Draw();};//设置全部的数据
@@ -13401,8 +13402,9 @@ Explain:'报价列表股票数据',Request:{Data:{stocks:arySymbol},symbol:this.
13401
13402
  };this.RecvStockData=function(data){var _this63=this;var setUpdateSymbol=new _set2.default();//更新的股票列表
13402
13403
  if(IFrameSplitOperator.IsNonEmptyArray(data.data)){//0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本
13403
13404
  for(var i=0;i<data.data.length;++i){var item=data.data[i];var symbol=item[0];if(!symbol)continue;var stock=null;if(this.MapStockData.has(symbol)){stock=this.MapStockData.get(symbol);}else{stock=new HQReportItem();stock.OriginalSymbol=symbol;stock.Symbol=this.GetSymbolNoSuffix(symbol);this.MapStockData.set(symbol,stock);}this.ReadStockJsonData(stock,item);if(!setUpdateSymbol.has(symbol))setUpdateSymbol.add(symbol);}}//重新更新板块成员
13404
- if(IFrameSplitOperator.IsNonEmptyArray(data.members)){this.SourceData.Data=[];this.Data.Data=[];var aryMember=data.members;for(var i=0;i<aryMember.length;++i){var value=aryMember[i];this.Data.Data.push(value);this.SourceData.Data.push(value);}}var chart=this.ChartPaint[0];if(!chart)return;var bUpdate=false;//实时本地数据排序
13405
- var chart=this.ChartPaint[0];if(chart&&(this.SortInfo.Sort==1||this.SortInfo.Sort==2)&&IFrameSplitOperator.IsNumber(this.SortInfo.Field)&&this.SortInfo.Field>=0){var column=chart.Column[this.SortInfo.Field];var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);var bLocalSrot=true;if(event&&event.Callback){var sendData={Column:column,SortInfo:this.SortInfo,SymbolList:this.Data.Data,Result:null,PreventDefault:false};event.Callback(event,sendData,this);if(event.PreventDefault){bLocalSrot=false;if(Array.isArray(sendData.Result))this.Data.Data=sendData.Result;}}if(bLocalSrot)this.Data.Data.sort(function(left,right){return _this63.LocalSort(left,right,column,_this63.SortInfo.Sort);});bUpdate=true;//排序暂时每次都刷新
13405
+ if(IFrameSplitOperator.IsArray(data.members)){this.SourceData.Data=[];this.Data.Data=[];var aryMember=data.members;for(var i=0;i<aryMember.length;++i){var value=aryMember[i];this.Data.Data.push(value);this.SourceData.Data.push(value);}}var chart=this.ChartPaint[0];if(!chart)return;var bUpdate=false;//实时本地数据排序
13406
+ var chart=this.ChartPaint[0];if(chart&&(this.SortInfo.Sort==1||this.SortInfo.Sort==2)&&IFrameSplitOperator.IsNumber(this.SortInfo.Field)&&this.SortInfo.Field>=0){var column=chart.Column[this.SortInfo.Field];var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);//当前选中的股票
13407
+ var selectedSymbol=null;if(chart.SelectedRowData&&chart.SelectedModel==1)selectedSymbol=chart.SelectedRowData.Symbol;var bLocalSrot=true;if(event&&event.Callback){var sendData={Column:column,SortInfo:this.SortInfo,SymbolList:this.Data.Data,Result:null,PreventDefault:false};event.Callback(event,sendData,this);if(event.PreventDefault){bLocalSrot=false;if(Array.isArray(sendData.Result))this.Data.Data=sendData.Result;}}if(bLocalSrot)this.Data.Data.sort(function(left,right){return _this63.LocalSort(left,right,column,_this63.SortInfo.Sort);});if(selectedSymbol){chart.SetSelectedRow({Symbol:selectedSymbol});}bUpdate=true;//排序暂时每次都刷新
13406
13408
  }else{//更新的股票在当前页面,需要重绘
13407
13409
  var aryStock=chart.ShowSymbol;for(var i=0;i<aryStock.length;++i){if(setUpdateSymbol.has(aryStock[i].Symbol)){bUpdate=true;break;}}}if(bUpdate)this.Draw();};//读取单条股票json数据
13408
13410
  this.ReadStockJsonData=function(stock,item){//0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本 16=涨停价 17=跌停价
@@ -13540,9 +13542,9 @@ return true;}else{return false;}}var offset=this.Data.YOffset;offset-=pageSize;i
13540
13542
  {setp=Math.abs(setp);var offset=this.Data.YOffset;if(bCycle){var pageSize=pageStatus.PageSize;for(var i=0;i<setp;++i){--offset;if(offset<0)offset=this.Data.Data.length-pageSize;}}else{if(this.Data.YOffset<=0)return false;for(var i=0;i<setp;++i){if(offset-1<0)break;--offset;}}this.Data.YOffset=offset;return true;}return false;};// option={ EnablePageCycle: true/false(是否循环翻页) }
13541
13543
  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,OldIndex:-1,NewIndex:-1};//Redraw=重绘, Update=更新数据
13542
13544
  if(chart.MultiSelectModel==1){var pageStatus=chart.GetCurrentPageStatus();if(IFrameSplitOperator.IsNonEmptyArray(pageStatus.MultiSelectedRow)){var selected=pageStatus.MultiSelectedRow[0];if(step>0){if(selected==this.Data.Data.length-1)return result;if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.MultiSelectedRow=[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.MultiSelectedRow=[selected];this.Data.YOffset=offset;return result;}else if(step<0){if(selected==0)return result;if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.MultiSelectedRow=[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.MultiSelectedRow=[selected];this.Data.YOffset=offset;return result;}else{return null;}return result;}else{var selected=-1;if(step>0)selected=pageStatus.Start;else if(step<0)selected=pageStatus.End;else return null;chart.MultiSelectedRow=[selected];result.Redraw=true;}return result;}if(chart.SelectedModel==0)//不可翻页模式, 只能在当前页移动
13543
- {var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.End-pageStatus.Start+1;var selected=pageStatus.SelectedRow;result.OldIndex=this.Data.YOffset+selected;if(step>0){selected+=step;selected=selected%pageSize;chart.SelectedRow=selected;chart.SelectedFixedRow=-1;result.Redraw=true;result.NewIndex=this.Data.YOffset+selected;return result;}else if(step<0){selected+=step;if(selected<0){selected=selected%pageSize;selected=pageSize+selected;}chart.SelectedRow=selected;chart.SelectedFixedRow=-1;result.NewIndex=this.Data.YOffset+selected;result.Redraw=true;return result;}}else if(chart.SelectedModel==1)//可翻页模式
13544
- {var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.PageSize;var selected=pageStatus.SelectedRow;result.OldIndex=pageStatus.SelectedRow;if(step>0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.Start;result.Redraw=true;result.NewIndex=pageStatus.Start;return result;}var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selected+1>=this.Data.Data.length&&!bPageCycle)break;++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;result.NewIndex=selected;return result;}else if(step<0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.End;result.Redraw=true;result.NewIndex=pageStatus.End;return result;}step=Math.abs(step);var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selected<=0&&!bPageCycle)//不能循环翻页
13545
- break;--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;result.NewIndex=selected;return result;}}return null;};this.MoveSelectedRowEvent=function(oldIndex,newIndex){var chart=this.ChartPaint[0];if(!chart)return null;if(oldIndex==newIndex)return;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOVE_SELECTED_REPORT_ROW);if(!event||!event.Callback)return;if(!IFrameSplitOperator.IsNonEmptyArray(chart.Data.Data))return;var arySymbol=chart.Data.Data;var oldData=null,newData=null;if(oldIndex>=0&&oldIndex<arySymbol.length){var symbol=arySymbol[oldIndex];oldData={Symbol:symbol,Index:oldIndex};}if(newIndex>=0&&newIndex<arySymbol.length){var symbol=arySymbol[newIndex];newData={Symbol:symbol,Index:newIndex};}var endData={Old:oldData,Now:newData};event.Callback(event,endData,this);};//左右移动
13545
+ {var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.End-pageStatus.Start+1;var selected=pageStatus.SelectedRow;result.OldIndex=this.Data.YOffset+selected;if(step>0){selected+=step;selected=selected%pageSize;var dataIndex=this.Data.YOffset+selected;chart.SelectedRowData={Index:selected,Symbol:this.Data.Data[dataIndex]};chart.SelectedFixedRow=-1;result.Redraw=true;result.NewIndex=dataIndex;return result;}else if(step<0){selected+=step;if(selected<0){selected=selected%pageSize;selected=pageSize+selected;}var dataIndex=this.Data.YOffset+selected;chart.SelectedRowData={Index:selected,Symbol:this.Data.Data[dataIndex]};chart.SelectedFixedRow=-1;result.NewIndex=dataIndex;result.Redraw=true;return result;}}else if(chart.SelectedModel==1)//可翻页模式
13546
+ {var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.PageSize;var selected=pageStatus.SelectedRow;result.OldIndex=pageStatus.SelectedRow;if(step>0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.Start;result.Redraw=true;result.NewIndex=pageStatus.Start;return result;}var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selected+1>=this.Data.Data.length&&!bPageCycle)break;++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.SelectedRowData={DataIndex:selected,Symbol:this.Data.Data[selected]};this.Data.YOffset=offset;result.NewIndex=selected;return result;}else if(step<0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.End;result.Redraw=true;result.NewIndex=pageStatus.End;return result;}step=Math.abs(step);var offset=this.Data.YOffset;for(var i=0;i<step;++i){if(selected<=0&&!bPageCycle)//不能循环翻页
13547
+ break;--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.SelectedRowData={DataIndex:selected,Symbol:this.Data.Data[selected]};this.Data.YOffset=offset;result.NewIndex=selected;return result;}}return null;};this.MoveSelectedRowEvent=function(oldIndex,newIndex){var chart=this.ChartPaint[0];if(!chart)return null;if(oldIndex==newIndex)return;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MOVE_SELECTED_REPORT_ROW);if(!event||!event.Callback)return;if(!IFrameSplitOperator.IsNonEmptyArray(chart.Data.Data))return;var arySymbol=chart.Data.Data;var oldData=null,newData=null;if(oldIndex>=0&&oldIndex<arySymbol.length){var symbol=arySymbol[oldIndex];oldData={Symbol:symbol,Index:oldIndex};}if(newIndex>=0&&newIndex<arySymbol.length){var symbol=arySymbol[newIndex];newData={Symbol:symbol,Index:newIndex};}var endData={Old:oldData,Now:newData};event.Callback(event,endData,this);};//左右移动
13546
13548
  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;//显示最后一屏
13547
13549
  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||option.Draw)){this.SetSizeChange(true);this.Draw();}if(this.TooltipMinuteChart)this.TooltipMinuteChart.ReloadResource(option);//分时图
13548
13550
  if(this.TooltipKLineChart)this.TooltipKLineChart.ReloadResource(option);};//列排序
@@ -13668,7 +13670,7 @@ this.FixedColumn=2;//固定列
13668
13670
  this.FixedRowCount=0;//固定行
13669
13671
  this.IsShowHeader=true;//是否显示表头
13670
13672
  this.SizeChange=true;this.SelectedModel=0;//选中模式 0=SelectedRow表示当前屏索引
13671
- this.SelectedRow=-1;//选中行ID
13673
+ this.SelectedRowData;//{ DataIndex:, Index:, Symbol: }
13672
13674
  this.SelectedFixedRow=-1;//选中固定行ID
13673
13675
  this.SelectedStyle=1;//选中行样式 1=整行填充 2=底部绘制直线
13674
13676
  this.IsDrawBorder=1;//是否绘制单元格边框
@@ -13753,7 +13755,7 @@ this.Canvas.clip();};this.Draw=function(lastMouseStatus){this.ShowSymbol=[];this
13753
13755
  var columnLeft=left;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];columnLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];if(this.DragHeader){if(this.DragHeader.ClickData){var clickData=this.DragHeader.ClickData;if(clickData.Header.Index==i){var rtBG={Left:columnLeft,Top:top,Bottom:bottom,Right:columnLeft+item.Width};rtBG.Width=rtBG.Right-rtBG.Left;rtBG.Height=rtBG.Bottom-rtBG.Top;this.Canvas.fillStyle=this.DragSrcRowColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}}if(this.DragHeader.MoveToData){var moveToData=this.DragHeader.MoveToData;if(moveToData.Header.Index==i){var rtBG={Left:columnLeft,Top:top,Bottom:bottom,Right:columnLeft+item.Width};rtBG.Width=rtBG.Right-rtBG.Left;rtBG.Height=rtBG.Bottom-rtBG.Top;this.Canvas.fillStyle=this.DragMoveRowColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}}}columnLeft+=item.Width;}};//更新缓存变量
13754
13756
  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 是否重新计算
13755
13757
  {if(recalculate)this.CalculateSize();var size=this.RowCount;return size;};this.GetCurrentPageStatus=function()//{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
13756
- {var result={Start:this.Data.YOffset,PageSize:this.RowCount,IsEnd:false,SelectedRow:this.SelectedRow,IsSinglePage:false,DataCount:0,MultiSelectModel:this.MultiSelectModel};if(this.MultiSelectModel==1){result.SelectedRow=-1;result.MultiSelectedRow=this.MultiSelectedRow.slice();result.MultiSelectedRow.sort(function(left,right){return left>right;});}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()//计算大小
13758
+ {var result={Start:this.Data.YOffset,PageSize:this.RowCount,IsEnd:false,SelectedRowData:null,SelectedRow:-1,IsSinglePage:false,DataCount:0,MultiSelectModel:this.MultiSelectModel};if(this.MultiSelectModel==1){result.SelectedRow=-1;result.MultiSelectedRow=this.MultiSelectedRow.slice();result.MultiSelectedRow.sort(function(left,right){return left>right;});}else{result.SelectedRowData=this.SelectedRowData;if(this.SelectedRowData){if(this.SelectedModel==1)result.SelectedRow=this.SelectedRowData.DataIndex;else result.SelectedRow=this.SelectedRowData.Index;}}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()//计算大小
13757
13759
  {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.NameSymbolFont.Symbol=this.NameSymbolV2Config.Symbol.Size*pixelRatio+'px '+this.NameSymbolV2Config.Symbol.Name;this.NameSymbolFont.Name=this.ItemSymbolFontConfig.Name.Size*pixelRatio+'px '+this.NameSymbolV2Config.Name.Name;this.ItemFontHeight=this.GetFontHeight(this.ItemFont,"擎");this.RowHeight=this.ItemFontHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=1;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.SortFont=this.SortConfig.Size*pixelRatio+'px '+this.SortConfig.Family;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];this.Canvas.font=this.ItemFont;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.ItemSymbolHeight=symboHeight;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;this.ItemTextLines=2;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){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.ItemTextLines=item.AryField.length;var rowHeight=this.ItemFontHeight*item.AryField.length+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID)//单行显示
13758
13760
  {this.Canvas.font==this.NameSymbolFont.Name;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.Canvas.font==this.NameSymbolFont.Symbol;var symbolWidth=this.Canvas.measureText(item.MaxText2).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.ItemNameHeight=Math.abs(nameHeight,symboHeight);var space=2;if(IFrameSplitOperator.IsNumber(item.Space))space=item.Space;itemWidth=nameWidth+symbolWidth+space;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}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;}if(item.Icon&&item.Icon.Symbol){item.Width+=item.Icon.Size;if(item.Icon.Margin){var margin=item.Icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))item.Width+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))item.Width+=margin.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;itemWidth=this.Canvas.measureText(text).width;if(item.Sort>0)itemWidth+=this.SortConfig.Size*pixelRatio;itemWidth+=4+this.HeaderMergin.Left+this.HeaderMergin.Right;if(item.Width<itemWidth)item.Width=itemWidth;}this.HeaderFontHeight=this.GetFontHeight(this.HeaderFont,"擎");if(this.HeaderRowCount<=1)//单行
13759
13761
  {this.HeaderHeight=this.HeaderFontHeight+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);}else{this.HeaderHeight=this.HeaderFontHeight*this.HeaderRowCount+(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.DrawHeaderItem=function(column,rtCell,index,option){if(column.HeaderBGColor)//背景色
@@ -13776,15 +13778,14 @@ this.IsDrawSortBGIcon=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.So
13776
13778
  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;}//竖线
13777
13779
  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();};//获取一共多少行
13778
13780
  this.GetAllRowCount=function(){var count=this.Data.Data.length;if(this.Data.Virtual&&this.Data.Virtual.Enable)count=this.Data.Virtual.Count;return count;};this.DrawBody=function(){if(!this.Data)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)&&!this.Data.Virtual.Enable)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;var arySelectedRow=[];//固定行
13779
- var textTop=top;this.Canvas.font=this.ItemFixedFont;for(var i=0;i<this.FixedRowCount;++i){if(this.SelectedFixedRow==i){this.Canvas.fillStyle=this.SelectedColor;;this.Canvas.fillRect(left,textTop,rowWidth,this.FixedRowHeight);}if(this.FixedRowData.Type==1)this.DrawFixedSymbolRow(textTop,i);else this.DrawFixedRow(textTop,i);textTop+=this.FixedRowHeight;}textTop=top+this.FixedRowHeight*this.FixedRowCount;this.Canvas.font=this.ItemFont;var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);var selectedSymbol=this.GetSelectedSymbol();var setSelected;if(this.MultiSelectModel==1)setSelected=new _set2.default(this.MultiSelectedRow);var dataCount=this.GetAllRowCount();for(var i=this.Data.YOffset,j=0;i<dataCount&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRowBG={Left:left,Top:textTop,Width:rowWidth,Height:this.RowHeight};rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;var bFillRow=false;if(this.MultiSelectModel==1){if(setSelected.has(i))bFillRow=true;}else{if(this.SelectedModel==0){if(j==this.SelectedRow)bFillRow=true;//选中行
13780
- }else{if(i==this.SelectedRow)bFillRow=true;//选中行
13781
+ var textTop=top;this.Canvas.font=this.ItemFixedFont;for(var i=0;i<this.FixedRowCount;++i){if(this.SelectedFixedRow==i){this.Canvas.fillStyle=this.SelectedColor;;this.Canvas.fillRect(left,textTop,rowWidth,this.FixedRowHeight);}if(this.FixedRowData.Type==1)this.DrawFixedSymbolRow(textTop,i);else this.DrawFixedRow(textTop,i);textTop+=this.FixedRowHeight;}textTop=top+this.FixedRowHeight*this.FixedRowCount;this.Canvas.font=this.ItemFont;var eventDrawBG=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_REPORT_ROW_BG);var selectedSymbol=this.GetSelectedSymbol();var setSelected;if(this.MultiSelectModel==1)setSelected=new _set2.default(this.MultiSelectedRow);var dataCount=this.GetAllRowCount();for(var i=this.Data.YOffset,j=0;i<dataCount&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRowBG={Left:left,Top:textTop,Width:rowWidth,Height:this.RowHeight};rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;var bFillRow=false;if(this.MultiSelectModel==1){if(setSelected.has(i))bFillRow=true;}else{if(this.SelectedModel==0){if(this.SelectedRowData&&this.SelectedRowData.Index==j&&this.SelectedRowData.Symbol==symbol)bFillRow=true;//选中行
13782
+ }else{if(this.SelectedRowData&&this.SelectedRowData.DataIndex==i&&this.SelectedRowData.Symbol==symbol)bFillRow=true;//选中行
13781
13783
  }}if(this.DragRow){if(this.DragRow.Data){var dataIndex=this.DragRow.Data.Row.DataIndex;if(dataIndex==i){this.Canvas.fillStyle=this.DragSrcRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}}if(this.DragRow.MoveRow){var dataIndex=this.DragRow.MoveRow.Data.DataIndex;if(dataIndex==i){this.Canvas.fillStyle=this.DragMoveRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}}bFillRow=false;}this.DrawFullRowBGColor(symbol,eventDrawBG,i,rtRowBG,{Selected:selectedSymbol});this.DrawFlashFullRowBGColor(symbol,rtRowBG);if(bFillRow){this.AryFullSelectedRow.push(rtRowBG);if(this.SelectedStyle===1){this.Canvas.fillStyle=this.SelectedColor;this.Canvas.fillRect(rtRowBG.Left,rtRowBG.Top,rtRowBG.Width,rtRowBG.Height);}}this.DrawRow(symbol,textTop,i);this.ShowSymbol.push({Index:i,Symbol:symbol});textTop+=this.RowHeight;}};//绘制整行背景色
13782
13784
  this.DrawFullRowBGColor=function(symbol,event,index,rtBG,option){var data={Symbol:symbol,Stock:null};if(this.GetStockDataCallback)data.Stock=this.GetStockDataCallback(symbol);if(data.Stock&&data.Stock.BGColor){this.Canvas.fillStyle=data.Stock.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}if(event&&event.Callback){//Out:{ BGColor: }
13783
- var sendData={RowIndex:index,Symbol:symbol,Out:null,MultiSelectModel:this.MultiSelectModel};if(option){if(option.Selected)sendData.Selected=option.Selected;}event.Callback(event,sendData,this);if(sendData.Out&&sendData.Out.BGColor){this.Canvas.fillStyle=sendData.Out.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}}};this.DrawFlashFullRowBGColor=function(symbol,rtBG){var data={Symbol:symbol,FlashBG:null};if(this.GetFlashBGDataCallback)data.FlashBG=this.GetFlashBGDataCallback(symbol,Date.now());if(!data.FlashBG)return;var id=-1;if(!data.FlashBG.Data.has(id))return;var flashItem=data.FlashBG.Data.get(id);if(flashItem&&flashItem.Count){this.Canvas.fillStyle=flashItem.Color;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}--flashItem.Count;if(this.GlobalOption)++this.GlobalOption.FlashBGCount;};this.DrawSelectedRow=function(){if(this.SelectedStyle===2&&IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow)){this.Canvas.fillStyle=this.SelectedLineConfig.Color;var lineWidth=this.SelectedLineConfig.Width;for(var i=0;i<this.AryFullSelectedRow.length;++i){var rtBG=this.AryFullSelectedRow[i];this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);}}};this.GetSelectedSymbol=function(){if(this.MultiSelectModel==1){if(!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow))return null;var aryData=[];for(var i=0;i<this.MultiSelectedRow.length;++i){var item=this.Data.Data[this.MultiSelectedRow[i]];if(!item)continue;aryData.push(item);}return aryData;}else{if(this.SelectedRow<0)return null;var index=this.SelectedRow;if(this.SelectedModel==0)//当前屏选中
13784
- index=this.Data.YOffset+this.SelectedRow;var symbol=this.Data.Data[index];return[symbol];}};//单行选中模式选中股票
13785
+ var sendData={RowIndex:index,Symbol:symbol,Out:null,MultiSelectModel:this.MultiSelectModel};if(option){if(option.Selected)sendData.Selected=option.Selected;}event.Callback(event,sendData,this);if(sendData.Out&&sendData.Out.BGColor){this.Canvas.fillStyle=sendData.Out.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}}};this.DrawFlashFullRowBGColor=function(symbol,rtBG){var data={Symbol:symbol,FlashBG:null};if(this.GetFlashBGDataCallback)data.FlashBG=this.GetFlashBGDataCallback(symbol,Date.now());if(!data.FlashBG)return;var id=-1;if(!data.FlashBG.Data.has(id))return;var flashItem=data.FlashBG.Data.get(id);if(flashItem&&flashItem.Count){this.Canvas.fillStyle=flashItem.Color;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}--flashItem.Count;if(this.GlobalOption)++this.GlobalOption.FlashBGCount;};this.DrawSelectedRow=function(){if(this.SelectedStyle===2&&IFrameSplitOperator.IsNonEmptyArray(this.AryFullSelectedRow)){this.Canvas.fillStyle=this.SelectedLineConfig.Color;var lineWidth=this.SelectedLineConfig.Width;for(var i=0;i<this.AryFullSelectedRow.length;++i){var rtBG=this.AryFullSelectedRow[i];this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);}}};this.GetSelectedSymbol=function(){if(this.MultiSelectModel==1){if(!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow))return null;var aryData=[];for(var i=0;i<this.MultiSelectedRow.length;++i){var item=this.Data.Data[this.MultiSelectedRow[i]];if(!item)continue;aryData.push(item);}return aryData;}else{if(!this.SelectedRowData)return null;if(!this.SelectedRowData.Symbol)return null;return[this.SelectedRowData.Symbol];}};//单行选中模式选中股票
13785
13786
  this.GetSelectedSingleSymbol=function(){if(this.MultiSelectModel==1)return null;//多选
13786
13787
  if(this.SelectedModel==0)return null;//当前屏选中
13787
- if(this.SelectedRow<0)return null;var symbol=this.Data.Data[this.SelectedRow];return symbol;};this.DrawFixedSymbolRow=function(top,dataIndex){var left=this.RectClient.Left;var chartRight=this.RectClient.Right;if(!this.FixedRowData||!IFrameSplitOperator.IsNonEmptyArray(this.FixedRowData.Symbol))return;var symbol=this.FixedRowData.Symbol[dataIndex];if(!symbol)return;this.DrawRow(symbol,top,dataIndex,1);this.ShowSymbol.push({Index:dataIndex,Symbol:symbol,RowType:1});};this.DrawFixedRow=function(top,dataIndex){var left=this.RectClient.Left;var chartRight=this.RectClient.Right;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawFixedItem(dataIndex,i,item,left,top);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.DrawFixedItem(dataIndex,i,item,left,top);left+=item.Width;if(left>=chartRight)break;}};this.DrawFixedItem=function(dataIndex,colIndex,column,left,top){var x=left+this.ItemMergin.Left;var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var drawInfo={Text:null,TextColor:column.TextColor,TextAlign:column.TextAlign};if(this.GetFixedRowTextDrawInfo(dataIndex,colIndex,column,drawInfo)){this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth);return;}if(!this.FixedRowData||!IFrameSplitOperator.IsNonEmptyArray(this.FixedRowData.Data))return;var data=this.FixedRowData.Data;var rowData=data[dataIndex];if(!IFrameSplitOperator.IsNonEmptyArray(rowData))return;var itemData=rowData[colIndex];if(!itemData||!itemData.Text)return;drawInfo.Text=itemData.Text;if(itemData.Color)drawInfo.TextColor=itemData.Color;if(itemData.TextAlign)drawInfo.TextAlign=itemData.TextAlign;this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth);};this.DrawRow=function(symbol,top,dataIndex,rowType)//rowType 0=表格行 1=顶部固定行 2=拖拽行
13788
+ if(!this.SelectedRowData)return null;return this.SelectedRowData.Symbol;};this.DrawFixedSymbolRow=function(top,dataIndex){var left=this.RectClient.Left;var chartRight=this.RectClient.Right;if(!this.FixedRowData||!IFrameSplitOperator.IsNonEmptyArray(this.FixedRowData.Symbol))return;var symbol=this.FixedRowData.Symbol[dataIndex];if(!symbol)return;this.DrawRow(symbol,top,dataIndex,1);this.ShowSymbol.push({Index:dataIndex,Symbol:symbol,RowType:1});};this.DrawFixedRow=function(top,dataIndex){var left=this.RectClient.Left;var chartRight=this.RectClient.Right;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawFixedItem(dataIndex,i,item,left,top);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.DrawFixedItem(dataIndex,i,item,left,top);left+=item.Width;if(left>=chartRight)break;}};this.DrawFixedItem=function(dataIndex,colIndex,column,left,top){var x=left+this.ItemMergin.Left;var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var drawInfo={Text:null,TextColor:column.TextColor,TextAlign:column.TextAlign};if(this.GetFixedRowTextDrawInfo(dataIndex,colIndex,column,drawInfo)){this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth);return;}if(!this.FixedRowData||!IFrameSplitOperator.IsNonEmptyArray(this.FixedRowData.Data))return;var data=this.FixedRowData.Data;var rowData=data[dataIndex];if(!IFrameSplitOperator.IsNonEmptyArray(rowData))return;var itemData=rowData[colIndex];if(!itemData||!itemData.Text)return;drawInfo.Text=itemData.Text;if(itemData.Color)drawInfo.TextColor=itemData.Color;if(itemData.TextAlign)drawInfo.TextAlign=itemData.TextAlign;this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth);};this.DrawRow=function(symbol,top,dataIndex,rowType)//rowType 0=表格行 1=顶部固定行 2=拖拽行
13788
13789
  {var left=this.RectClient.Left;var chartRight=this.RectClient.Right;var data={Symbol:symbol,Stock:null,Block:null};if(this.GetStockDataCallback)data.Stock=this.GetStockDataCallback(symbol);if(this.GetBlockDataCallback)data.Block=this.GetBlockDataCallback(symbol);if(this.GetFlashBGDataCallback)data.FlashBG=this.GetFlashBGDataCallback(symbol,Date.now());data.Decimal=GetfloatPrecision(symbol);//小数位数
13789
13790
  for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,rowType,i);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,rowType,i);left+=item.Width;if(left>=chartRight)break;}};this.BuildSubCellTextData=function(subItem,column,stock,drawInfo,data,option){switch(subItem.Type){case REPORT_COLUMN_ID.NAME_ID:if(stock&&stock.Name)drawInfo.Text=stock.Name;else drawInfo.Text=data.Name;break;case REPORT_COLUMN_ID.SYMBOL_ID:if(stock&&stock.Symbol)drawInfo.Text=stock.Symbol;else drawInfo.Text=data.Symbol;break;case REPORT_COLUMN_ID.PRICE_ID:case REPORT_COLUMN_ID.OPEN_ID:case REPORT_COLUMN_ID.HIGH_ID:case REPORT_COLUMN_ID.LOW_ID:case REPORT_COLUMN_ID.YCLOSE_ID:case REPORT_COLUMN_ID.BUY_PRICE_ID:case REPORT_COLUMN_ID.SELL_PRICE_ID:case REPORT_COLUMN_ID.AVERAGE_PRICE_ID:case REPORT_COLUMN_ID.FUTURES_CLOSE_ID:case REPORT_COLUMN_ID.FUTURES_YCLOSE_ID:var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName]))this.GetPriceDrawInfo(stock[fieldName],stock,data,drawInfo,option);break;case REPORT_COLUMN_ID.INCREASE_ID:case REPORT_COLUMN_ID.AMPLITUDE_ID:case REPORT_COLUMN_ID.UPDOWN_ID:case REPORT_COLUMN_ID.RISING_SPEED_1M_ID:case REPORT_COLUMN_ID.RISING_SPEED_3M_ID:case REPORT_COLUMN_ID.RISING_SPEED_5M_ID:case REPORT_COLUMN_ID.RISING_SPEED_10M_ID:case REPORT_COLUMN_ID.RISING_SPEED_15M_ID:var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];var text=value.toFixed(2);if(subItem.DynamicFormat)text=subItem.DynamicFormat.replace('{Value}',text);drawInfo.Text=text;drawInfo.TextColor=this.GetUpDownColor(value,0);}break;}};this.DrawSubCellText=function(drawInfo,column,rtText){if(!drawInfo.Text)return;var text=drawInfo.Text;var x=rtText.Left;if(drawInfo.TextAlign=='center'){x=rtText.Left+rtText.Width/2;this.Canvas.textAlign="center";}else if(drawInfo.TextAlign=='right'){x=rtText.Left+rtText.Width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var bClip=false;this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=drawInfo.TextColor;this.Canvas.fillText(text,x,rtText.Bottom);if(bClip)this.Canvas.restore();};this.DrawItem=function(index,data,column,left,top,rowType,columnIndex){var itemWidth=column.Width;var x=left+this.ItemMergin.Left;var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var stock=data.Stock;var drawInfo={Text:null,TextColor:column.TextColor,TextAlign:column.TextAlign,Tooltip:null,Index:index,ColumnIndex:columnIndex};var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;if(column.FullColBGColor){this.DrawItemBG({Rect:rtItem,BGColor:column.FullColBGColor});}if(column.Type==REPORT_COLUMN_ID.INDEX_ID){if(rowType==1)return;//固定行序号空
13790
13791
  drawInfo.Text=(index+1).toString();}else if(column.Type==REPORT_COLUMN_ID.SYMBOL_ID){if(stock&&stock.Symbol)drawInfo.Text=stock.Symbol;else drawInfo.Text=data.Symbol;this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.DrawSymbolName(data,column,left,top,rowType);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID){this.DrawSymbolNameV2(data,column,left,top,rowType);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.NAME_ID){if(stock&&stock.Name){if(IFrameSplitOperator.IsString(stock.Name)){drawInfo.Text=this.TextEllipsis(stock.Name,textWidth,column.MaxText);drawInfo.TextColor=this.GetNameColor(column,data.Symbol,rowType);}}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.NAME_EX_ID){//复杂格式 { Text:, Symbol:{ Family:'iconfont', Size:, Data:[ { Text:'\ue631', Color:'#1c65db'}, ...] } ]}
@@ -13844,10 +13845,10 @@ this.DrawKLine=function(klineData,column,rtItem,data){if(column.IsDrawCallback)/
13844
13845
  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=右侧滚动条
13845
13846
  {if(!this.Data)return null;if(this.Tab){var tab=this.Tab.OnMouseDown(x,y,e);if(tab)return{Type:1,Tab:tab};//底部工具栏
13846
13847
  }if(this.VScrollbar){var item=this.VScrollbar.OnMouseDown(x,y,e);if(item)return{Type:5,VScrollbar:item};//右侧滚动条
13847
- }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;this.MultiSelectedRow=[];return{Type:4,Redraw:bRedraw,Row:row};//行
13848
+ }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.SelectedRowData=null;this.MultiSelectedRow=[];return{Type:4,Redraw:bRedraw,Row:row};//行
13848
13849
  }var row=this.PtInBody(x,y);if(row){var btnStatus={Redraw:false};this.OnClickButton(x,y,e,btnStatus);var bRedraw=true;if(this.MultiSelectModel==1){if(e&&e.ctrlKey)//多选
13849
13850
  {var pos=this.MultiSelectedRow.indexOf(row.DataIndex);if(pos>=0)this.MultiSelectedRow.splice(pos,1);else this.MultiSelectedRow.push(row.DataIndex);}else if(e&&e.shiftKey)//批量多选
13850
- {this.OnShiftClickRow(row);}else{if(this.MultiSelectedRow.length==1&&this.MultiSelectedRow[0]==row.DataIndex)bRedraw=false;else this.MultiSelectedRow=[row.DataIndex];}this.SelectedFixedRow=-1;}else{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||btnStatus.Redraw,Row:row};//行
13851
+ {this.OnShiftClickRow(row);}else{if(this.MultiSelectedRow.length==1&&this.MultiSelectedRow[0]==row.DataIndex)bRedraw=false;else this.MultiSelectedRow=[row.DataIndex];}this.SelectedFixedRow=-1;}else{if(this.SelectedModel==0){if(this.SelectedRowData&&this.SelectedRowData.Index==row.Index&&this.SelectedRowData.Symbol==row.Symbol)bRedraw=false;this.SelectedRowData={Index:row.Index,Symbol:row.Symbol};this.SelectedFixedRow=-1;}else{if(this.SelectedRowData&&this.SelectedRowData.DataIndex==row.DataIndex&&this.SelectedRowData.Symbol==row.Symbol)bRedraw=false;this.SelectedRowData={DataIndex:row.DataIndex,Symbol:row.Symbol};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||btnStatus.Redraw,Row:row};//行
13851
13852
  }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};//表头
13852
13853
  }return null;};this.OnShiftClickRow=function(row){if(this.MultiSelectedRow.length<=0){this.MultiSelectedRow.push(row.DataIndex);return;}var max=null,min=null;for(var i=0;i<this.MultiSelectedRow.length;++i){var value=this.MultiSelectedRow[i];if(max==null||max<value)max=value;if(min==null||min>value)min=value;if(value==row.DataIndex)//移除
13853
13854
  {this.MultiSelectedRow.splice(i,1);return;}}if(max==min){var start=row.DataIndex,end=max;if(start>end){start=max;end=row.DataIndex;}this.MultiSelectedRow=[];for(var i=start;i<=end;++i){this.MultiSelectedRow.push(i);}}else{if(row.DataIndex<=max&&row.DataIndex>=min){this.MultiSelectedRow.push(row.DataIndex);}else{var start=Math.min(row.DataIndex,min);var end=Math.max(row.DataIndex,max);this.MultiSelectedRow=[];for(var i=start;i<=end;++i){this.MultiSelectedRow.push(i);}}}};this.OnDragRow=function(x,y,e)//Type: 5=顶部 6=空白行 2=行 7=底部
@@ -13863,7 +13864,7 @@ this.Canvas.fillStyle=this.DragRowColor;this.Canvas.fillRect(rtRow.Left,rtRow.To
13863
13864
  var cellHeader={Left:rtRow.Left,Top:rtRow.Top,Right:rtRow.Right,Width:rtRow.Width,Height:this.HeaderHeight};cellHeader.Bottom=cellHeader.Top+cellHeader.Height;this.DrawHeaderItem(clickData.Header.Column,cellHeader,clickData.Header.Index,{HeaderColor:this.DragRowTextColor});var textTop=cellHeader.Bottom+this.FixedRowHeight*this.FixedRowCount;this.Canvas.font=this.ItemFont;var dataCount=this.GetAllRowCount();for(var i=this.Data.YOffset,j=0;i<dataCount&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var data={Symbol:symbol,Stock:null,Block:null};if(this.GetStockDataCallback)data.Stock=this.GetStockDataCallback(symbol);if(this.GetBlockDataCallback)data.Block=this.GetBlockDataCallback(symbol);if(this.GetFlashBGDataCallback)data.FlashBG=this.GetFlashBGDataCallback(symbol,Date.now());data.Decimal=GetfloatPrecision(symbol);//小数位数
13864
13865
  var item=this.Column[clickData.Header.Index];this.DrawItem(i,data,item,cellHeader.Left,textTop,3);textTop+=this.RowHeight;}};this.GetTooltipData=function(x,y){if(!IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect))return null;for(var i=0;i<this.TooltipRect.length;++i){var item=this.TooltipRect[i];var rt=item.Rect;if(!rt)continue;if(x>=rt.Left&&x<=rt.Right&&y>=rt.Top&&y<=rt.Bottom){return{Rect:item.Rect,Stock:item.Stock,Column:item.Column,Index:item.Index,Type:item.Type,Data:item.Data};}}return null;};this.GetButtonData=function(x,y){if(!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect))return null;for(var i=0;i<this.ButtonRect.length;++i){var item=this.ButtonRect[i];var rt=item.Rect;if(!rt)continue;if(x>=rt.Left&&x<=rt.Right&&y>=rt.Top&&y<=rt.Bottom){return{Rect:item.Rect,Stock:item.Stock,Column:item.Column,Index:item.Index,Type:item.Type,Data:item.Data,ColumnIndex:item.ColumnIndex};}}};this.PtInHeaderDragBorder=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;var textLeft=left;var dragBarWidth=5*GetDevicePixelRatio();//固定列
13865
13866
  for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];if(item.EnableDragWidth===true){var header={Right:textLeft+item.Width,Top:top,Bottom:bottom};header.Left=header.Right-dragBarWidth;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;if(item.EnableDragWidth===true){var header={Right:textLeft+item.Width,Top:top,Bottom:bottom};header.Left=header.Right-dragBarWidth;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;};//设置选中行 option={ Symbol:, AutoYScroll:true/false Y滚动条自定定位 }
13866
- this.SetSelectedRow=function(option){if(!option)return false;if(this.SelectedModel===0)return false;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return false;if(option.Symbol){var symbol=option.Symbol;var bFinder=false;if(this.SelectedRow>=0){var item=this.Data.Data[this.SelectedRow];if(symbol==item)bFinder=true;}if(!bFinder){for(var i=0;i<this.Data.Data.length;++i){var item=this.Data.Data[i];if(symbol==item){this.SelectedRow=i;bFinder=true;break;}}}if(!bFinder)return false;if(option.AutoYScroll===true){this.UpdatePageYOffset({SelectedRow:this.SelectedRow});}return bFinder;}return false;};this.UpdatePageYOffset=function(option){if(!option)return;var selectedRow=option.SelectedRow;if(selectedRow<0)return;var pageStatus=this.GetCurrentPageStatus();if(pageStatus.IsSinglePage)return;if(selectedRow>=pageStatus.Start&&selectedRow<=pageStatus.End)return;this.Data.YOffset=selectedRow;//选中行不在当前屏 设置为第1行
13867
+ this.SetSelectedRow=function(option){if(!option)return false;if(this.SelectedModel===0)return false;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return false;if(option.Symbol){var symbol=option.Symbol;var bFinder=false;if(this.SelectedRowData){var item=this.Data.Data[this.SelectedRowData.DataIndex];if(symbol==item&&symbol==this.SelectedRowData.Symbol)bFinder=true;}if(!bFinder){for(var i=0;i<this.Data.Data.length;++i){var item=this.Data.Data[i];if(symbol==item){this.SelectedRowData={DataIndex:i,Symbol:item};bFinder=true;break;}}}if(!bFinder)return false;if(option.AutoYScroll===true){this.UpdatePageYOffset({SelectedRow:this.SelectedRowData.DataIndex});}return bFinder;}return false;};this.UpdatePageYOffset=function(option){if(!option)return;var selectedRow=option.SelectedRow;if(selectedRow<0)return;var pageStatus=this.GetCurrentPageStatus();if(pageStatus.IsSinglePage)return;if(selectedRow>=pageStatus.Start&&selectedRow<=pageStatus.End)return;this.Data.YOffset=selectedRow;//选中行不在当前屏 设置为第1行
13867
13868
  };}//报价列表底部tab和横向滚动条
13868
13869
  function ChartReportTab(){this.Canvas;//画布
13869
13870
  this.ChartBorder;//边框信息
@@ -15173,7 +15174,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
15173
15174
  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);};}/********************************************************************************
15174
15175
  * 版本信息输出
15175
15176
  *
15176
- */var HQCHART_VERSION="1.1.14899";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();//把给外界调用的方法暴露出来
15177
+ */var HQCHART_VERSION="1.1.14902";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();//把给外界调用的方法暴露出来
15177
15178
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
15178
15179
  // BaseIndex:BaseIndex,
15179
15180
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14900",
3
+ "version": "1.1.14903",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -54211,6 +54211,14 @@ IFrameSplitOperator.IsNonEmptyArray=function(ary)
54211
54211
  return ary.length>0;
54212
54212
  }
54213
54213
 
54214
+ IFrameSplitOperator.IsArray=function(ary)
54215
+ {
54216
+ if (!ary) return false;
54217
+ if (!Array.isArray(ary)) return false;
54218
+
54219
+ return true;
54220
+ }
54221
+
54214
54222
  IFrameSplitOperator.IsFloat=function(value)
54215
54223
  {
54216
54224
  if (value===undefined) return false;
@@ -1022,6 +1022,11 @@ function JSReportChartContainer(uielement)
1022
1022
  if (IFrameSplitOperator.IsNumber(item.Sort)) this.SortInfo.Sort=item.Sort;
1023
1023
  }
1024
1024
 
1025
+ if (IFrameSplitOperator.IsNonEmptyArray(option.Column)) //字段重新设置
1026
+ {
1027
+ this.SetColumn(option.Column, { Draw:false })
1028
+ }
1029
+
1025
1030
  if (IFrameSplitOperator.IsBool(option.IsReloadStockList) && option.IsReloadStockList)
1026
1031
  {
1027
1032
  var requestOption={ Callback:null };
@@ -1030,7 +1035,6 @@ function JSReportChartContainer(uielement)
1030
1035
  this.RequestStockListData(requestOption);
1031
1036
  return;
1032
1037
  }
1033
-
1034
1038
  }
1035
1039
 
1036
1040
  this.RequestMemberListData();
@@ -1585,7 +1589,7 @@ function JSReportChartContainer(uielement)
1585
1589
  }
1586
1590
 
1587
1591
  //重新更新板块成员
1588
- if (IFrameSplitOperator.IsNonEmptyArray(data.members))
1592
+ if (IFrameSplitOperator.IsArray(data.members))
1589
1593
  {
1590
1594
  this.SourceData.Data=[];
1591
1595
  this.Data.Data=[];
@@ -1608,6 +1612,11 @@ function JSReportChartContainer(uielement)
1608
1612
  {
1609
1613
  var column=chart.Column[this.SortInfo.Field];
1610
1614
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
1615
+
1616
+ //当前选中的股票
1617
+ var selectedSymbol=null;
1618
+ if (chart.SelectedRowData && chart.SelectedModel==1) selectedSymbol=chart.SelectedRowData.Symbol;
1619
+
1611
1620
  var bLocalSrot=true;
1612
1621
  if (event && event.Callback)
1613
1622
  {
@@ -1621,7 +1630,12 @@ function JSReportChartContainer(uielement)
1621
1630
  }
1622
1631
 
1623
1632
  if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
1624
-
1633
+
1634
+ if (selectedSymbol)
1635
+ {
1636
+ chart.SetSelectedRow({ Symbol:selectedSymbol });
1637
+ }
1638
+
1625
1639
  bUpdate=true; //排序暂时每次都刷新
1626
1640
  }
1627
1641
  else
@@ -3290,10 +3304,11 @@ function JSReportChartContainer(uielement)
3290
3304
  {
3291
3305
  selected+=step;
3292
3306
  selected=selected%pageSize;
3293
- chart.SelectedRow=selected;
3307
+ var dataIndex=this.Data.YOffset+selected;
3308
+ chart.SelectedRowData={ Index:selected, Symbol:this.Data.Data[dataIndex] };
3294
3309
  chart.SelectedFixedRow=-1;
3295
3310
  result.Redraw=true;
3296
- result.NewIndex=this.Data.YOffset+selected;
3311
+ result.NewIndex=dataIndex
3297
3312
  return result;
3298
3313
  }
3299
3314
  else if (step<0)
@@ -3304,10 +3319,10 @@ function JSReportChartContainer(uielement)
3304
3319
  selected=selected%pageSize;
3305
3320
  selected=pageSize+selected;
3306
3321
  }
3307
-
3308
- chart.SelectedRow=selected;
3322
+ var dataIndex=this.Data.YOffset+selected;
3323
+ chart.SelectedRowData={ Index:selected, Symbol:this.Data.Data[dataIndex] };
3309
3324
  chart.SelectedFixedRow=-1;
3310
- result.NewIndex=this.Data.YOffset+selected;
3325
+ result.NewIndex=dataIndex;
3311
3326
  result.Redraw=true;
3312
3327
  return result;
3313
3328
  }
@@ -3347,7 +3362,7 @@ function JSReportChartContainer(uielement)
3347
3362
  result.Redraw=true;
3348
3363
  result.Update=(offset!=this.Data.YOffset);
3349
3364
 
3350
- chart.SelectedRow=selected;
3365
+ chart.SelectedRowData={ DataIndex:selected, Symbol:this.Data.Data[selected] };
3351
3366
  this.Data.YOffset=offset;
3352
3367
  result.NewIndex=selected;
3353
3368
  return result;
@@ -3383,7 +3398,7 @@ function JSReportChartContainer(uielement)
3383
3398
  result.Redraw=true;
3384
3399
  result.Update=(offset!=this.Data.YOffset);
3385
3400
 
3386
- chart.SelectedRow=selected;
3401
+ chart.SelectedRowData={ DataIndex:selected, Symbol:this.Data.Data[selected] };
3387
3402
  this.Data.YOffset=offset;
3388
3403
  result.NewIndex=selected;
3389
3404
 
@@ -4910,7 +4925,7 @@ function ChartReport()
4910
4925
  this.SizeChange=true;
4911
4926
 
4912
4927
  this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
4913
- this.SelectedRow=-1; //选中行ID
4928
+ this.SelectedRowData; //{ DataIndex:, Index:, Symbol: }
4914
4929
  this.SelectedFixedRow=-1; //选中固定行ID
4915
4930
  this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
4916
4931
  this.IsDrawBorder=1; //是否绘制单元格边框
@@ -5682,13 +5697,23 @@ function ChartReport()
5682
5697
 
5683
5698
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
5684
5699
  {
5685
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
5700
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRowData:null, SelectedRow:-1, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
5701
+
5686
5702
  if (this.MultiSelectModel==1)
5687
5703
  {
5688
5704
  result.SelectedRow=-1;
5689
5705
  result.MultiSelectedRow=this.MultiSelectedRow.slice();
5690
5706
  result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
5691
5707
  }
5708
+ else
5709
+ {
5710
+ result.SelectedRowData=this.SelectedRowData;
5711
+ if (this.SelectedRowData)
5712
+ {
5713
+ if (this.SelectedModel==1) result.SelectedRow=this.SelectedRowData.DataIndex;
5714
+ else result.SelectedRow=this.SelectedRowData.Index;
5715
+ }
5716
+ }
5692
5717
 
5693
5718
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
5694
5719
  {
@@ -6200,11 +6225,13 @@ function ChartReport()
6200
6225
  {
6201
6226
  if (this.SelectedModel==0)
6202
6227
  {
6203
- if (j==this.SelectedRow) bFillRow=true; //选中行
6228
+ if (this.SelectedRowData && this.SelectedRowData.Index==j && this.SelectedRowData.Symbol==symbol)
6229
+ bFillRow=true; //选中行
6204
6230
  }
6205
6231
  else
6206
6232
  {
6207
- if (i==this.SelectedRow) bFillRow=true; //选中行
6233
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==i && this.SelectedRowData.Symbol==symbol)
6234
+ bFillRow=true; //选中行
6208
6235
  }
6209
6236
  }
6210
6237
 
@@ -6339,14 +6366,10 @@ function ChartReport()
6339
6366
  }
6340
6367
  else
6341
6368
  {
6342
- if (this.SelectedRow<0) return null;
6369
+ if (!this.SelectedRowData) return null;
6370
+ if (!this.SelectedRowData.Symbol) return null;
6343
6371
 
6344
- var index=this.SelectedRow;
6345
- if (this.SelectedModel==0) //当前屏选中
6346
- index=this.Data.YOffset+this.SelectedRow;
6347
-
6348
- var symbol=this.Data.Data[index];
6349
- return [symbol];
6372
+ return [this.SelectedRowData.Symbol];
6350
6373
  }
6351
6374
  }
6352
6375
 
@@ -6355,10 +6378,9 @@ function ChartReport()
6355
6378
  {
6356
6379
  if (this.MultiSelectModel==1) return null; //多选
6357
6380
  if (this.SelectedModel==0) return null; //当前屏选中
6358
- if (this.SelectedRow<0) return null;
6381
+ if (!this.SelectedRowData) return null;
6359
6382
 
6360
- var symbol=this.Data.Data[this.SelectedRow];
6361
- return symbol;
6383
+ return this.SelectedRowData.Symbol;
6362
6384
  }
6363
6385
 
6364
6386
 
@@ -8580,7 +8602,7 @@ function ChartReport()
8580
8602
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
8581
8603
 
8582
8604
  this.SelectedFixedRow=row.Index;
8583
- this.SelectedRow=-1;
8605
+ this.SelectedRowData=null;
8584
8606
  this.MultiSelectedRow=[];
8585
8607
 
8586
8608
  return { Type:4, Redraw:bRedraw, Row:row }; //行
@@ -8618,14 +8640,18 @@ function ChartReport()
8618
8640
  {
8619
8641
  if (this.SelectedModel==0)
8620
8642
  {
8621
- if (this.SelectedRow==row.Index) bRedraw=false;
8622
- this.SelectedRow=row.Index;
8643
+ if (this.SelectedRowData && this.SelectedRowData.Index==row.Index && this.SelectedRowData.Symbol==row.Symbol)
8644
+ bRedraw=false;
8645
+ this.SelectedRowData={ Index:row.Index, Symbol:row.Symbol };
8623
8646
  this.SelectedFixedRow=-1;
8624
8647
  }
8625
8648
  else
8626
8649
  {
8627
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
8628
- this.SelectedRow=row.DataIndex;
8650
+
8651
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==row.DataIndex && this.SelectedRowData.Symbol==row.Symbol)
8652
+ bRedraw=false;
8653
+
8654
+ this.SelectedRowData={ DataIndex:row.DataIndex, Symbol:row.Symbol };
8629
8655
  this.SelectedFixedRow=-1;
8630
8656
  }
8631
8657
  }
@@ -9180,10 +9206,10 @@ function ChartReport()
9180
9206
  var symbol=option.Symbol;
9181
9207
  var bFinder=false;
9182
9208
 
9183
- if (this.SelectedRow>=0)
9209
+ if (this.SelectedRowData)
9184
9210
  {
9185
- var item=this.Data.Data[this.SelectedRow];
9186
- if (symbol==item) bFinder=true;
9211
+ var item=this.Data.Data[this.SelectedRowData.DataIndex];
9212
+ if (symbol==item && symbol==this.SelectedRowData.Symbol) bFinder=true;
9187
9213
  }
9188
9214
 
9189
9215
  if (!bFinder)
@@ -9193,7 +9219,7 @@ function ChartReport()
9193
9219
  var item=this.Data.Data[i];
9194
9220
  if (symbol==item)
9195
9221
  {
9196
- this.SelectedRow=i;
9222
+ this.SelectedRowData={ DataIndex:i, Symbol:item };
9197
9223
  bFinder=true;
9198
9224
  break;
9199
9225
  }
@@ -9204,7 +9230,7 @@ function ChartReport()
9204
9230
 
9205
9231
  if (option.AutoYScroll===true)
9206
9232
  {
9207
- this.UpdatePageYOffset({ SelectedRow:this.SelectedRow });
9233
+ this.UpdatePageYOffset({ SelectedRow:this.SelectedRowData.DataIndex });
9208
9234
  }
9209
9235
 
9210
9236
  return bFinder;
@@ -58307,6 +58307,14 @@ IFrameSplitOperator.IsNonEmptyArray=function(ary)
58307
58307
  return ary.length>0;
58308
58308
  }
58309
58309
 
58310
+ IFrameSplitOperator.IsArray=function(ary)
58311
+ {
58312
+ if (!ary) return false;
58313
+ if (!Array.isArray(ary)) return false;
58314
+
58315
+ return true;
58316
+ }
58317
+
58310
58318
  IFrameSplitOperator.IsFloat=function(value)
58311
58319
  {
58312
58320
  if (value===undefined) return false;
@@ -138547,6 +138555,11 @@ function JSReportChartContainer(uielement)
138547
138555
  if (IFrameSplitOperator.IsNumber(item.Sort)) this.SortInfo.Sort=item.Sort;
138548
138556
  }
138549
138557
 
138558
+ if (IFrameSplitOperator.IsNonEmptyArray(option.Column)) //字段重新设置
138559
+ {
138560
+ this.SetColumn(option.Column, { Draw:false })
138561
+ }
138562
+
138550
138563
  if (IFrameSplitOperator.IsBool(option.IsReloadStockList) && option.IsReloadStockList)
138551
138564
  {
138552
138565
  var requestOption={ Callback:null };
@@ -138555,7 +138568,6 @@ function JSReportChartContainer(uielement)
138555
138568
  this.RequestStockListData(requestOption);
138556
138569
  return;
138557
138570
  }
138558
-
138559
138571
  }
138560
138572
 
138561
138573
  this.RequestMemberListData();
@@ -139110,7 +139122,7 @@ function JSReportChartContainer(uielement)
139110
139122
  }
139111
139123
 
139112
139124
  //重新更新板块成员
139113
- if (IFrameSplitOperator.IsNonEmptyArray(data.members))
139125
+ if (IFrameSplitOperator.IsArray(data.members))
139114
139126
  {
139115
139127
  this.SourceData.Data=[];
139116
139128
  this.Data.Data=[];
@@ -139133,6 +139145,11 @@ function JSReportChartContainer(uielement)
139133
139145
  {
139134
139146
  var column=chart.Column[this.SortInfo.Field];
139135
139147
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
139148
+
139149
+ //当前选中的股票
139150
+ var selectedSymbol=null;
139151
+ if (chart.SelectedRowData && chart.SelectedModel==1) selectedSymbol=chart.SelectedRowData.Symbol;
139152
+
139136
139153
  var bLocalSrot=true;
139137
139154
  if (event && event.Callback)
139138
139155
  {
@@ -139146,7 +139163,12 @@ function JSReportChartContainer(uielement)
139146
139163
  }
139147
139164
 
139148
139165
  if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
139149
-
139166
+
139167
+ if (selectedSymbol)
139168
+ {
139169
+ chart.SetSelectedRow({ Symbol:selectedSymbol });
139170
+ }
139171
+
139150
139172
  bUpdate=true; //排序暂时每次都刷新
139151
139173
  }
139152
139174
  else
@@ -140815,10 +140837,11 @@ function JSReportChartContainer(uielement)
140815
140837
  {
140816
140838
  selected+=step;
140817
140839
  selected=selected%pageSize;
140818
- chart.SelectedRow=selected;
140840
+ var dataIndex=this.Data.YOffset+selected;
140841
+ chart.SelectedRowData={ Index:selected, Symbol:this.Data.Data[dataIndex] };
140819
140842
  chart.SelectedFixedRow=-1;
140820
140843
  result.Redraw=true;
140821
- result.NewIndex=this.Data.YOffset+selected;
140844
+ result.NewIndex=dataIndex
140822
140845
  return result;
140823
140846
  }
140824
140847
  else if (step<0)
@@ -140829,10 +140852,10 @@ function JSReportChartContainer(uielement)
140829
140852
  selected=selected%pageSize;
140830
140853
  selected=pageSize+selected;
140831
140854
  }
140832
-
140833
- chart.SelectedRow=selected;
140855
+ var dataIndex=this.Data.YOffset+selected;
140856
+ chart.SelectedRowData={ Index:selected, Symbol:this.Data.Data[dataIndex] };
140834
140857
  chart.SelectedFixedRow=-1;
140835
- result.NewIndex=this.Data.YOffset+selected;
140858
+ result.NewIndex=dataIndex;
140836
140859
  result.Redraw=true;
140837
140860
  return result;
140838
140861
  }
@@ -140872,7 +140895,7 @@ function JSReportChartContainer(uielement)
140872
140895
  result.Redraw=true;
140873
140896
  result.Update=(offset!=this.Data.YOffset);
140874
140897
 
140875
- chart.SelectedRow=selected;
140898
+ chart.SelectedRowData={ DataIndex:selected, Symbol:this.Data.Data[selected] };
140876
140899
  this.Data.YOffset=offset;
140877
140900
  result.NewIndex=selected;
140878
140901
  return result;
@@ -140908,7 +140931,7 @@ function JSReportChartContainer(uielement)
140908
140931
  result.Redraw=true;
140909
140932
  result.Update=(offset!=this.Data.YOffset);
140910
140933
 
140911
- chart.SelectedRow=selected;
140934
+ chart.SelectedRowData={ DataIndex:selected, Symbol:this.Data.Data[selected] };
140912
140935
  this.Data.YOffset=offset;
140913
140936
  result.NewIndex=selected;
140914
140937
 
@@ -142435,7 +142458,7 @@ function ChartReport()
142435
142458
  this.SizeChange=true;
142436
142459
 
142437
142460
  this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
142438
- this.SelectedRow=-1; //选中行ID
142461
+ this.SelectedRowData; //{ DataIndex:, Index:, Symbol: }
142439
142462
  this.SelectedFixedRow=-1; //选中固定行ID
142440
142463
  this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
142441
142464
  this.IsDrawBorder=1; //是否绘制单元格边框
@@ -143207,13 +143230,23 @@ function ChartReport()
143207
143230
 
143208
143231
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
143209
143232
  {
143210
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143233
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRowData:null, SelectedRow:-1, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143234
+
143211
143235
  if (this.MultiSelectModel==1)
143212
143236
  {
143213
143237
  result.SelectedRow=-1;
143214
143238
  result.MultiSelectedRow=this.MultiSelectedRow.slice();
143215
143239
  result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
143216
143240
  }
143241
+ else
143242
+ {
143243
+ result.SelectedRowData=this.SelectedRowData;
143244
+ if (this.SelectedRowData)
143245
+ {
143246
+ if (this.SelectedModel==1) result.SelectedRow=this.SelectedRowData.DataIndex;
143247
+ else result.SelectedRow=this.SelectedRowData.Index;
143248
+ }
143249
+ }
143217
143250
 
143218
143251
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
143219
143252
  {
@@ -143725,11 +143758,13 @@ function ChartReport()
143725
143758
  {
143726
143759
  if (this.SelectedModel==0)
143727
143760
  {
143728
- if (j==this.SelectedRow) bFillRow=true; //选中行
143761
+ if (this.SelectedRowData && this.SelectedRowData.Index==j && this.SelectedRowData.Symbol==symbol)
143762
+ bFillRow=true; //选中行
143729
143763
  }
143730
143764
  else
143731
143765
  {
143732
- if (i==this.SelectedRow) bFillRow=true; //选中行
143766
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==i && this.SelectedRowData.Symbol==symbol)
143767
+ bFillRow=true; //选中行
143733
143768
  }
143734
143769
  }
143735
143770
 
@@ -143864,14 +143899,10 @@ function ChartReport()
143864
143899
  }
143865
143900
  else
143866
143901
  {
143867
- if (this.SelectedRow<0) return null;
143902
+ if (!this.SelectedRowData) return null;
143903
+ if (!this.SelectedRowData.Symbol) return null;
143868
143904
 
143869
- var index=this.SelectedRow;
143870
- if (this.SelectedModel==0) //当前屏选中
143871
- index=this.Data.YOffset+this.SelectedRow;
143872
-
143873
- var symbol=this.Data.Data[index];
143874
- return [symbol];
143905
+ return [this.SelectedRowData.Symbol];
143875
143906
  }
143876
143907
  }
143877
143908
 
@@ -143880,10 +143911,9 @@ function ChartReport()
143880
143911
  {
143881
143912
  if (this.MultiSelectModel==1) return null; //多选
143882
143913
  if (this.SelectedModel==0) return null; //当前屏选中
143883
- if (this.SelectedRow<0) return null;
143914
+ if (!this.SelectedRowData) return null;
143884
143915
 
143885
- var symbol=this.Data.Data[this.SelectedRow];
143886
- return symbol;
143916
+ return this.SelectedRowData.Symbol;
143887
143917
  }
143888
143918
 
143889
143919
 
@@ -146105,7 +146135,7 @@ function ChartReport()
146105
146135
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
146106
146136
 
146107
146137
  this.SelectedFixedRow=row.Index;
146108
- this.SelectedRow=-1;
146138
+ this.SelectedRowData=null;
146109
146139
  this.MultiSelectedRow=[];
146110
146140
 
146111
146141
  return { Type:4, Redraw:bRedraw, Row:row }; //行
@@ -146143,14 +146173,18 @@ function ChartReport()
146143
146173
  {
146144
146174
  if (this.SelectedModel==0)
146145
146175
  {
146146
- if (this.SelectedRow==row.Index) bRedraw=false;
146147
- this.SelectedRow=row.Index;
146176
+ if (this.SelectedRowData && this.SelectedRowData.Index==row.Index && this.SelectedRowData.Symbol==row.Symbol)
146177
+ bRedraw=false;
146178
+ this.SelectedRowData={ Index:row.Index, Symbol:row.Symbol };
146148
146179
  this.SelectedFixedRow=-1;
146149
146180
  }
146150
146181
  else
146151
146182
  {
146152
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
146153
- this.SelectedRow=row.DataIndex;
146183
+
146184
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==row.DataIndex && this.SelectedRowData.Symbol==row.Symbol)
146185
+ bRedraw=false;
146186
+
146187
+ this.SelectedRowData={ DataIndex:row.DataIndex, Symbol:row.Symbol };
146154
146188
  this.SelectedFixedRow=-1;
146155
146189
  }
146156
146190
  }
@@ -146705,10 +146739,10 @@ function ChartReport()
146705
146739
  var symbol=option.Symbol;
146706
146740
  var bFinder=false;
146707
146741
 
146708
- if (this.SelectedRow>=0)
146742
+ if (this.SelectedRowData)
146709
146743
  {
146710
- var item=this.Data.Data[this.SelectedRow];
146711
- if (symbol==item) bFinder=true;
146744
+ var item=this.Data.Data[this.SelectedRowData.DataIndex];
146745
+ if (symbol==item && symbol==this.SelectedRowData.Symbol) bFinder=true;
146712
146746
  }
146713
146747
 
146714
146748
  if (!bFinder)
@@ -146718,7 +146752,7 @@ function ChartReport()
146718
146752
  var item=this.Data.Data[i];
146719
146753
  if (symbol==item)
146720
146754
  {
146721
- this.SelectedRow=i;
146755
+ this.SelectedRowData={ DataIndex:i, Symbol:item };
146722
146756
  bFinder=true;
146723
146757
  break;
146724
146758
  }
@@ -146729,7 +146763,7 @@ function ChartReport()
146729
146763
 
146730
146764
  if (option.AutoYScroll===true)
146731
146765
  {
146732
- this.UpdatePageYOffset({ SelectedRow:this.SelectedRow });
146766
+ this.UpdatePageYOffset({ SelectedRow:this.SelectedRowData.DataIndex });
146733
146767
  }
146734
146768
 
146735
146769
  return bFinder;
@@ -150876,7 +150910,7 @@ function ScrollBarBGChart()
150876
150910
 
150877
150911
 
150878
150912
 
150879
- var HQCHART_VERSION="1.1.14899";
150913
+ var HQCHART_VERSION="1.1.14902";
150880
150914
 
150881
150915
  function PrintHQChartVersion()
150882
150916
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14899";
8
+ var HQCHART_VERSION="1.1.14902";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -58351,6 +58351,14 @@ IFrameSplitOperator.IsNonEmptyArray=function(ary)
58351
58351
  return ary.length>0;
58352
58352
  }
58353
58353
 
58354
+ IFrameSplitOperator.IsArray=function(ary)
58355
+ {
58356
+ if (!ary) return false;
58357
+ if (!Array.isArray(ary)) return false;
58358
+
58359
+ return true;
58360
+ }
58361
+
58354
58362
  IFrameSplitOperator.IsFloat=function(value)
58355
58363
  {
58356
58364
  if (value===undefined) return false;
@@ -138591,6 +138599,11 @@ function JSReportChartContainer(uielement)
138591
138599
  if (IFrameSplitOperator.IsNumber(item.Sort)) this.SortInfo.Sort=item.Sort;
138592
138600
  }
138593
138601
 
138602
+ if (IFrameSplitOperator.IsNonEmptyArray(option.Column)) //字段重新设置
138603
+ {
138604
+ this.SetColumn(option.Column, { Draw:false })
138605
+ }
138606
+
138594
138607
  if (IFrameSplitOperator.IsBool(option.IsReloadStockList) && option.IsReloadStockList)
138595
138608
  {
138596
138609
  var requestOption={ Callback:null };
@@ -138599,7 +138612,6 @@ function JSReportChartContainer(uielement)
138599
138612
  this.RequestStockListData(requestOption);
138600
138613
  return;
138601
138614
  }
138602
-
138603
138615
  }
138604
138616
 
138605
138617
  this.RequestMemberListData();
@@ -139154,7 +139166,7 @@ function JSReportChartContainer(uielement)
139154
139166
  }
139155
139167
 
139156
139168
  //重新更新板块成员
139157
- if (IFrameSplitOperator.IsNonEmptyArray(data.members))
139169
+ if (IFrameSplitOperator.IsArray(data.members))
139158
139170
  {
139159
139171
  this.SourceData.Data=[];
139160
139172
  this.Data.Data=[];
@@ -139177,6 +139189,11 @@ function JSReportChartContainer(uielement)
139177
139189
  {
139178
139190
  var column=chart.Column[this.SortInfo.Field];
139179
139191
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
139192
+
139193
+ //当前选中的股票
139194
+ var selectedSymbol=null;
139195
+ if (chart.SelectedRowData && chart.SelectedModel==1) selectedSymbol=chart.SelectedRowData.Symbol;
139196
+
139180
139197
  var bLocalSrot=true;
139181
139198
  if (event && event.Callback)
139182
139199
  {
@@ -139190,7 +139207,12 @@ function JSReportChartContainer(uielement)
139190
139207
  }
139191
139208
 
139192
139209
  if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
139193
-
139210
+
139211
+ if (selectedSymbol)
139212
+ {
139213
+ chart.SetSelectedRow({ Symbol:selectedSymbol });
139214
+ }
139215
+
139194
139216
  bUpdate=true; //排序暂时每次都刷新
139195
139217
  }
139196
139218
  else
@@ -140859,10 +140881,11 @@ function JSReportChartContainer(uielement)
140859
140881
  {
140860
140882
  selected+=step;
140861
140883
  selected=selected%pageSize;
140862
- chart.SelectedRow=selected;
140884
+ var dataIndex=this.Data.YOffset+selected;
140885
+ chart.SelectedRowData={ Index:selected, Symbol:this.Data.Data[dataIndex] };
140863
140886
  chart.SelectedFixedRow=-1;
140864
140887
  result.Redraw=true;
140865
- result.NewIndex=this.Data.YOffset+selected;
140888
+ result.NewIndex=dataIndex
140866
140889
  return result;
140867
140890
  }
140868
140891
  else if (step<0)
@@ -140873,10 +140896,10 @@ function JSReportChartContainer(uielement)
140873
140896
  selected=selected%pageSize;
140874
140897
  selected=pageSize+selected;
140875
140898
  }
140876
-
140877
- chart.SelectedRow=selected;
140899
+ var dataIndex=this.Data.YOffset+selected;
140900
+ chart.SelectedRowData={ Index:selected, Symbol:this.Data.Data[dataIndex] };
140878
140901
  chart.SelectedFixedRow=-1;
140879
- result.NewIndex=this.Data.YOffset+selected;
140902
+ result.NewIndex=dataIndex;
140880
140903
  result.Redraw=true;
140881
140904
  return result;
140882
140905
  }
@@ -140916,7 +140939,7 @@ function JSReportChartContainer(uielement)
140916
140939
  result.Redraw=true;
140917
140940
  result.Update=(offset!=this.Data.YOffset);
140918
140941
 
140919
- chart.SelectedRow=selected;
140942
+ chart.SelectedRowData={ DataIndex:selected, Symbol:this.Data.Data[selected] };
140920
140943
  this.Data.YOffset=offset;
140921
140944
  result.NewIndex=selected;
140922
140945
  return result;
@@ -140952,7 +140975,7 @@ function JSReportChartContainer(uielement)
140952
140975
  result.Redraw=true;
140953
140976
  result.Update=(offset!=this.Data.YOffset);
140954
140977
 
140955
- chart.SelectedRow=selected;
140978
+ chart.SelectedRowData={ DataIndex:selected, Symbol:this.Data.Data[selected] };
140956
140979
  this.Data.YOffset=offset;
140957
140980
  result.NewIndex=selected;
140958
140981
 
@@ -142479,7 +142502,7 @@ function ChartReport()
142479
142502
  this.SizeChange=true;
142480
142503
 
142481
142504
  this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
142482
- this.SelectedRow=-1; //选中行ID
142505
+ this.SelectedRowData; //{ DataIndex:, Index:, Symbol: }
142483
142506
  this.SelectedFixedRow=-1; //选中固定行ID
142484
142507
  this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
142485
142508
  this.IsDrawBorder=1; //是否绘制单元格边框
@@ -143251,13 +143274,23 @@ function ChartReport()
143251
143274
 
143252
143275
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
143253
143276
  {
143254
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143277
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRowData:null, SelectedRow:-1, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143278
+
143255
143279
  if (this.MultiSelectModel==1)
143256
143280
  {
143257
143281
  result.SelectedRow=-1;
143258
143282
  result.MultiSelectedRow=this.MultiSelectedRow.slice();
143259
143283
  result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
143260
143284
  }
143285
+ else
143286
+ {
143287
+ result.SelectedRowData=this.SelectedRowData;
143288
+ if (this.SelectedRowData)
143289
+ {
143290
+ if (this.SelectedModel==1) result.SelectedRow=this.SelectedRowData.DataIndex;
143291
+ else result.SelectedRow=this.SelectedRowData.Index;
143292
+ }
143293
+ }
143261
143294
 
143262
143295
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
143263
143296
  {
@@ -143769,11 +143802,13 @@ function ChartReport()
143769
143802
  {
143770
143803
  if (this.SelectedModel==0)
143771
143804
  {
143772
- if (j==this.SelectedRow) bFillRow=true; //选中行
143805
+ if (this.SelectedRowData && this.SelectedRowData.Index==j && this.SelectedRowData.Symbol==symbol)
143806
+ bFillRow=true; //选中行
143773
143807
  }
143774
143808
  else
143775
143809
  {
143776
- if (i==this.SelectedRow) bFillRow=true; //选中行
143810
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==i && this.SelectedRowData.Symbol==symbol)
143811
+ bFillRow=true; //选中行
143777
143812
  }
143778
143813
  }
143779
143814
 
@@ -143908,14 +143943,10 @@ function ChartReport()
143908
143943
  }
143909
143944
  else
143910
143945
  {
143911
- if (this.SelectedRow<0) return null;
143946
+ if (!this.SelectedRowData) return null;
143947
+ if (!this.SelectedRowData.Symbol) return null;
143912
143948
 
143913
- var index=this.SelectedRow;
143914
- if (this.SelectedModel==0) //当前屏选中
143915
- index=this.Data.YOffset+this.SelectedRow;
143916
-
143917
- var symbol=this.Data.Data[index];
143918
- return [symbol];
143949
+ return [this.SelectedRowData.Symbol];
143919
143950
  }
143920
143951
  }
143921
143952
 
@@ -143924,10 +143955,9 @@ function ChartReport()
143924
143955
  {
143925
143956
  if (this.MultiSelectModel==1) return null; //多选
143926
143957
  if (this.SelectedModel==0) return null; //当前屏选中
143927
- if (this.SelectedRow<0) return null;
143958
+ if (!this.SelectedRowData) return null;
143928
143959
 
143929
- var symbol=this.Data.Data[this.SelectedRow];
143930
- return symbol;
143960
+ return this.SelectedRowData.Symbol;
143931
143961
  }
143932
143962
 
143933
143963
 
@@ -146149,7 +146179,7 @@ function ChartReport()
146149
146179
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
146150
146180
 
146151
146181
  this.SelectedFixedRow=row.Index;
146152
- this.SelectedRow=-1;
146182
+ this.SelectedRowData=null;
146153
146183
  this.MultiSelectedRow=[];
146154
146184
 
146155
146185
  return { Type:4, Redraw:bRedraw, Row:row }; //行
@@ -146187,14 +146217,18 @@ function ChartReport()
146187
146217
  {
146188
146218
  if (this.SelectedModel==0)
146189
146219
  {
146190
- if (this.SelectedRow==row.Index) bRedraw=false;
146191
- this.SelectedRow=row.Index;
146220
+ if (this.SelectedRowData && this.SelectedRowData.Index==row.Index && this.SelectedRowData.Symbol==row.Symbol)
146221
+ bRedraw=false;
146222
+ this.SelectedRowData={ Index:row.Index, Symbol:row.Symbol };
146192
146223
  this.SelectedFixedRow=-1;
146193
146224
  }
146194
146225
  else
146195
146226
  {
146196
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
146197
- this.SelectedRow=row.DataIndex;
146227
+
146228
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==row.DataIndex && this.SelectedRowData.Symbol==row.Symbol)
146229
+ bRedraw=false;
146230
+
146231
+ this.SelectedRowData={ DataIndex:row.DataIndex, Symbol:row.Symbol };
146198
146232
  this.SelectedFixedRow=-1;
146199
146233
  }
146200
146234
  }
@@ -146749,10 +146783,10 @@ function ChartReport()
146749
146783
  var symbol=option.Symbol;
146750
146784
  var bFinder=false;
146751
146785
 
146752
- if (this.SelectedRow>=0)
146786
+ if (this.SelectedRowData)
146753
146787
  {
146754
- var item=this.Data.Data[this.SelectedRow];
146755
- if (symbol==item) bFinder=true;
146788
+ var item=this.Data.Data[this.SelectedRowData.DataIndex];
146789
+ if (symbol==item && symbol==this.SelectedRowData.Symbol) bFinder=true;
146756
146790
  }
146757
146791
 
146758
146792
  if (!bFinder)
@@ -146762,7 +146796,7 @@ function ChartReport()
146762
146796
  var item=this.Data.Data[i];
146763
146797
  if (symbol==item)
146764
146798
  {
146765
- this.SelectedRow=i;
146799
+ this.SelectedRowData={ DataIndex:i, Symbol:item };
146766
146800
  bFinder=true;
146767
146801
  break;
146768
146802
  }
@@ -146773,7 +146807,7 @@ function ChartReport()
146773
146807
 
146774
146808
  if (option.AutoYScroll===true)
146775
146809
  {
146776
- this.UpdatePageYOffset({ SelectedRow:this.SelectedRow });
146810
+ this.UpdatePageYOffset({ SelectedRow:this.SelectedRowData.DataIndex });
146777
146811
  }
146778
146812
 
146779
146813
  return bFinder;
@@ -162096,7 +162130,7 @@ function HQChartScriptWorker()
162096
162130
 
162097
162131
 
162098
162132
 
162099
- var HQCHART_VERSION="1.1.14899";
162133
+ var HQCHART_VERSION="1.1.14902";
162100
162134
 
162101
162135
  function PrintHQChartVersion()
162102
162136
  {