hqchart 1.1.14900 → 1.1.14905

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();};//设置全部的数据
@@ -13394,15 +13395,18 @@ this.SetFlashBGItem=function(symbol,obj){var item={ID:obj.ID,Color:obj.Color,Cou
13394
13395
  {this.FlashBG.delete(symbol);return null;}if(!stockItem.Data||stockItem.Data.size<=0){this.FlashBG.delete(symbol);return null;}var aryDelID=[];//超时需要参数的
13395
13396
  var _iteratorNormalCompletion25=true;var _didIteratorError25=false;var _iteratorError25=undefined;try{for(var _iterator25=(0,_getIterator3.default)(stockItem.Data),_step25;!(_iteratorNormalCompletion25=(_step25=_iterator25.next()).done);_iteratorNormalCompletion25=true){var mapItem=_step25.value;var item=mapItem[1];if(time-item.Time>=timeDiff||item.Count<=0)aryDelID.push(item.ID);}}catch(err){_didIteratorError25=true;_iteratorError25=err;}finally{try{if(!_iteratorNormalCompletion25&&_iterator25.return){_iterator25.return();}}finally{if(_didIteratorError25){throw _iteratorError25;}}}if(IFrameSplitOperator.IsNonEmptyArray(aryDelID)){for(var i=0;i<aryDelID.length;++i){stockItem.Data.delete(aryDelID[i]);}if(stockItem.Data.size<=0){this.FlashBG.delete(symbol);return null;}}return stockItem;};//delay=是否延迟
13396
13397
  this.DelayUpdateStockData=function(){var _this62=this;if(this.DelayUpdateTimer!=null){clearTimeout(this.DelayUpdateTimer);this.DelayUpdateTimer=null;}var frequency=this.DelayUpdateFrequency;this.DelayUpdateTimer=setTimeout(function(){_this62.UpdateStockData();},frequency);};this.UpdateStockData=function(){var chart=this.ChartPaint[0];if(!chart)return;if(this.Data.Virtual&&this.Data.Virtual.Enable){this.RequestVirtualStockData();//虚拟表格 全部取后台
13397
- return;}if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;if(this.SortInfo&&this.SortInfo.Field>=0&&this.SortInfo.Sort>0){var column=chart.Column[this.SortInfo.Field];if(column.Sort==2){this.RequestStockSortData(column,this.SortInfo.Field,this.SortInfo.Sort);//远程排序
13398
- return;}}var arySymbol=chart.ShowSymbol;if(!IFrameSplitOperator.IsNonEmptyArray(arySymbol))return;this.RequestStockData(arySymbol);};//下载股票数据
13398
+ return;}//if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
13399
+ if(this.SortInfo&&this.SortInfo.Field>=0&&this.SortInfo.Sort>0){var column=chart.Column[this.SortInfo.Field];if(column.Sort==2){this.RequestStockSortData(column,this.SortInfo.Field,this.SortInfo.Sort);//远程排序
13400
+ return;}}var arySymbol=chart.ShowSymbol;//if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return;
13401
+ this.RequestStockData(arySymbol);};//下载股票数据
13399
13402
  this.RequestStockData=function(arySymbol){var self=this;if(this.NetworkFilter){var obj={Name:'JSDealChartContainer::RequestStockData',//类名::函数名
13400
13403
  Explain:'报价列表股票数据',Request:{Data:{stocks:arySymbol},symbol:this.Symbol,name:this.Name},Self:this,PreventDefault:false};this.NetworkFilter(obj,function(data){self.RecvStockData(data);self.AutoUpdate();});if(obj.PreventDefault==true)return;}//throw { Name:'JSReportChartContainer::RequestStockData', Error:'(报价列表股票数据)不提供内置测试数据' };
13401
13404
  };this.RecvStockData=function(data){var _this63=this;var setUpdateSymbol=new _set2.default();//更新的股票列表
13402
13405
  if(IFrameSplitOperator.IsNonEmptyArray(data.data)){//0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本
13403
13406
  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;//排序暂时每次都刷新
13407
+ 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;//实时本地数据排序
13408
+ 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);//当前选中的股票
13409
+ 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
13410
  }else{//更新的股票在当前页面,需要重绘
13407
13411
  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
13412
  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 +13544,9 @@ return true;}else{return false;}}var offset=this.Data.YOffset;offset-=pageSize;i
13540
13544
  {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
13545
  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
13546
  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);};//左右移动
13547
+ {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)//可翻页模式
13548
+ {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)//不能循环翻页
13549
+ 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
13550
  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
13551
  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
13552
  if(this.TooltipKLineChart)this.TooltipKLineChart.ReloadResource(option);};//列排序
@@ -13568,7 +13572,7 @@ this.LocalSort=function(left,right,column,sortType){switch(column.Type){case REP
13568
13572
  case REPORT_COLUMN_ID.FUTURES_POSITION_ID:case REPORT_COLUMN_ID.FUTURES_CLOSE_ID:case REPORT_COLUMN_ID.FUTURES_YCLOSE_ID:case REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID:case REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID:case REPORT_COLUMN_ID.VOL_IN_ID:case REPORT_COLUMN_ID.VOL_OUT_ID:case REPORT_COLUMN_ID.DATE_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER1_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER2_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER3_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER4_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER5_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER6_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER7_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER8_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER9_ID:case REPORT_COLUMN_ID.RESERVE_NUMBER10_ID:return this.LocalNumberSort(left,right,column,sortType);case REPORT_COLUMN_ID.RESERVE_DATETIME1_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME2_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME3_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME4_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME5_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME6_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME7_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME8_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME9_ID:case REPORT_COLUMN_ID.RESERVE_DATETIME10_ID:return this.LocalReserveDateTimeSort(left,right,column,sortType);case REPORT_COLUMN_ID.RESERVE_STRING1_ID:case REPORT_COLUMN_ID.RESERVE_STRING2_ID:case REPORT_COLUMN_ID.RESERVE_STRING3_ID:case REPORT_COLUMN_ID.RESERVE_STRING4_ID:case REPORT_COLUMN_ID.RESERVE_STRING5_ID:case REPORT_COLUMN_ID.RESERVE_STRING6_ID:case REPORT_COLUMN_ID.RESERVE_STRING7_ID:case REPORT_COLUMN_ID.RESERVE_STRING8_ID:case REPORT_COLUMN_ID.RESERVE_STRING9_ID:case REPORT_COLUMN_ID.RESERVE_STRING10_ID:return this.LocalReserveStringSort(left,right,column,sortType);case REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID://自定义数值字段
13569
13573
  return this.LoacCustomNumberSort(left,right,column,sortType);case REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID://自定义字符串字段
13570
13574
  return this.LoacCustomStringSort(left,right,column,sortType);case REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID:return this.LoacCustomDateTimeSort(left,right,column,sortType);default:return 0;}};this.GetStockExtendData=function(symbol,column){if(IFrameSplitOperator.IsNumber(column.DataIndex)){if(column.DataIndex<0)return null;var stock=this.GetStockData(symbol);if(!stock||!stock.ExtendData)return null;return stock.ExtendData[column.DataIndex];}if(IFrameSplitOperator.IsNumber(column.BlockIndex)){if(column.BlockIndex<0)return null;var stock=this.GetBlockData(symbol);if(!stock)return null;return stock[column.BlockIndex];}return null;};this.LocalNameExSort=function(left,right,column,sortType){var leftStock=this.GetStockData(left);var rightStock=this.GetStockData(right);var leftValue="",rightValue="";if(sortType==2){leftValue="啊啊啊啊啊";rightValue="啊啊啊啊啊";}if(leftStock&&leftStock.Name)leftValue=leftStock.Name;if(rightStock&&rightStock.Name)rightValue=rightStock.Name;if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue<leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LocalStringSort=function(left,right,column,sortType){var leftStock=this.GetStockData(left);var rightStock=this.GetStockData(right);var leftValue="",rightValue="";if(sortType==2){leftValue="啊啊啊啊啊";rightValue="啊啊啊啊啊";}var filedName=MAP_COLUMN_FIELD.get(column.Type);if(leftStock&&leftStock[filedName])leftValue=leftStock[filedName];if(rightStock&&rightStock[filedName])rightValue=rightStock[filedName];if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LocalReserveStringSort=function(left,right,column,sortType){var leftStock=this.GetStockData(left);var rightStock=this.GetStockData(right);var leftValue="",rightValue="";if(sortType==2){leftValue="啊啊啊啊啊";rightValue="啊啊啊啊啊";}var filedName=MAP_COLUMN_FIELD.get(column.Type);if(leftStock&&leftStock[filedName]){var value=leftStock[filedName];if(IFrameSplitOperator.IsObject(value))leftValue=value.Text;else leftValue=value;}if(rightStock&&rightStock[filedName]){var value=rightStock[filedName];if(IFrameSplitOperator.IsObject(value))rightValue=value.Text;else rightValue=value;}if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LocalNumberSort=function(left,right,column,sortType){var leftStock=this.GetStockData(left);var rightStock=this.GetStockData(right);var leftValue=-99999999999999,rightValue=-99999999999999;if(sortType==2)leftValue=rightValue=99999999999999;var filedName=MAP_COLUMN_FIELD.get(column.Type);if(leftStock&&IFrameSplitOperator.IsNumber(leftStock[filedName]))leftValue=leftStock[filedName];if(rightStock&&IFrameSplitOperator.IsNumber(rightStock[filedName]))rightValue=rightStock[filedName];if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};//Date数据排序
13571
- this.LocalReserveDateTimeSort=function(left,right,column,sortType){var leftStock=this.GetStockData(left);var rightStock=this.GetStockData(right);var leftValue=new Date(0),rightValue=new Date(0);if(sortType==2)leftValue=rightValue=Date(2999,12,30);var filedName=MAP_COLUMN_FIELD.get(column.Type);if(leftStock&&leftStock[filedName]){var value=leftStock[filedName];if(value.DateTime)leftValue=value.DateTime;}if(rightStock&&rightStock[filedName]){var value=rightStock[filedName];if(value.DateTime)rightValue=value.DateTime;}if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LoacCustomNumberSort=function(left,right,column,sortType){var leftValue=-99999999999999,rightValue=-99999999999999;if(sortType==2)leftValue=rightValue=99999999999999;var value=this.GetStockExtendData(left,column);if(IFrameSplitOperator.IsNumber(value))leftValue=value;var value=this.GetStockExtendData(right,column);if(IFrameSplitOperator.IsNumber(value))rightValue=value;if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LoacCustomDateTimeSort=function(left,right,column,sortType){var leftValue=-99999999999999,rightValue=-99999999999999;if(sortType==2)leftValue=rightValue=99999999999999;var value=this.GetStockExtendData(left,column);if(IFrameSplitOperator.IsNumber(value))leftValue=value;var value=this.GetStockExtendData(right,column);if(IFrameSplitOperator.IsNumber(value))rightValue=value;if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LoacCustomStringSort=function(left,right,column,sortType){var leftValue="",rightValue="";if(sortType==2)rightValue=leftValue="啊啊啊啊啊";var value=this.GetStockExtendData(left,column);if(IFrameSplitOperator.IsString(value))leftValue=value;var value=this.GetStockExtendData(right,column);if(IFrameSplitOperator.IsString(value))rightValue=value;if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.RequestStockSortData=function(column,filedid,sortType){var chart=this.ChartPaint[0];if(!chart)return;var self=this;var startIndex=this.Data.YOffset;var pageSize=chart.GetPageSize();var endIndex=startIndex+pageSize;if(endIndex>=this.Data.Data.length)endIndex=this.Data.Data.length-1;if(this.NetworkFilter){var obj={Name:'JSDealChartContainer::RequestStockSortData',//类名::函数名
13575
+ this.LocalReserveDateTimeSort=function(left,right,column,sortType){var leftStock=this.GetStockData(left);var rightStock=this.GetStockData(right);var leftValue=new Date(0),rightValue=new Date(0);if(sortType==2)leftValue=rightValue=Date(2999,12,30);var filedName=MAP_COLUMN_FIELD.get(column.Type);if(leftStock&&leftStock[filedName]){var value=leftStock[filedName];if(value.DateTime)leftValue=value.DateTime;}if(rightStock&&rightStock[filedName]){var value=rightStock[filedName];if(value.DateTime)rightValue=value.DateTime;}if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LoacCustomNumberSort=function(left,right,column,sortType){var leftValue=-99999999999999,rightValue=-99999999999999;if(sortType==2)leftValue=rightValue=99999999999999;var value=this.GetStockExtendData(left,column);if(IFrameSplitOperator.IsNumber(value))leftValue=value;var value=this.GetStockExtendData(right,column);if(IFrameSplitOperator.IsNumber(value))rightValue=value;if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LoacCustomDateTimeSort=function(left,right,column,sortType){var leftValue=-99999999999999,rightValue=-99999999999999;if(sortType==2)leftValue=rightValue=99999999999999;var value=this.GetStockExtendData(left,column);if(IFrameSplitOperator.IsNumber(value))leftValue=value;var value=this.GetStockExtendData(right,column);if(IFrameSplitOperator.IsNumber(value))rightValue=value;if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.LoacCustomStringSort=function(left,right,column,sortType){var leftValue="",rightValue="";if(sortType==2)rightValue=leftValue="啊啊啊啊啊";var value=this.GetStockExtendData(left,column);if(IFrameSplitOperator.IsString(value))leftValue=value;var value=this.GetStockExtendData(right,column);if(IFrameSplitOperator.IsString(value))rightValue=value;if(sortType==1){if(rightValue<leftValue)return-1;else if(rightValue>leftValue)return 1;else return 0;}else{if(leftValue<rightValue)return-1;else if(leftValue>rightValue)return 1;else return 0;}};this.RequestStockSortData=function(column,filedid,sortType){var chart=this.ChartPaint[0];if(!chart)return;var self=this;var pageSize=chart.GetPageSize();var endIndex=0;var startIndex=0;if(IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)){startIndex=this.Data.YOffset;endIndex=startIndex+pageSize;if(endIndex>=this.Data.Data.length)endIndex=this.Data.Data.length-1;}if(this.NetworkFilter){var obj={Name:'JSDealChartContainer::RequestStockSortData',//类名::函数名
13572
13576
  Explain:'报价列表股票排序数据',Request:{Data:{range:{start:startIndex,end:endIndex,count:this.Data.Data.length},column:{name:column.Title,type:column.Type,index:filedid,ID:column.ID},sort:sortType,symbol:this.Symbol,name:this.Name,pageSize:pageSize}},Self:this,PreventDefault:false};if(chart.FixedRowCount>0&&chart.FixedRowData.Type==1){var arySymbol=[];for(var i=0;i<chart.FixedRowData.Symbol.length;++i){var item=chart.FixedRowData.Symbol[i];if(item)arySymbol.push(item);}obj.Request.FixedSymbol=arySymbol;}this.NetworkFilter(obj,function(data){self.RecvStockSortData(data);self.AutoUpdate();});if(obj.PreventDefault==true)return;}//throw { Name:'JSReportChartContainer::RequestStockSortData', Error:'(报价列表股票排序数据)不提供内置测试数据' };
13573
13577
  };this.RecvStockSortData=function(data){var chart=this.ChartPaint[0];if(!chart)return;var selectedSymbol=chart.GetSelectedSingleSymbol();//更新股票数据
13574
13578
  var arySymbol=[];if(IFrameSplitOperator.IsNonEmptyArray(data.data)){for(var i=0;i<data.data.length;++i){var item=data.data[i];//数据
@@ -13668,7 +13672,7 @@ this.FixedColumn=2;//固定列
13668
13672
  this.FixedRowCount=0;//固定行
13669
13673
  this.IsShowHeader=true;//是否显示表头
13670
13674
  this.SizeChange=true;this.SelectedModel=0;//选中模式 0=SelectedRow表示当前屏索引
13671
- this.SelectedRow=-1;//选中行ID
13675
+ this.SelectedRowData;//{ DataIndex:, Index:, Symbol: }
13672
13676
  this.SelectedFixedRow=-1;//选中固定行ID
13673
13677
  this.SelectedStyle=1;//选中行样式 1=整行填充 2=底部绘制直线
13674
13678
  this.IsDrawBorder=1;//是否绘制单元格边框
@@ -13753,7 +13757,7 @@ this.Canvas.clip();};this.Draw=function(lastMouseStatus){this.ShowSymbol=[];this
13753
13757
  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
13758
  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
13759
  {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()//计算大小
13760
+ {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
13761
  {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
13762
  {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
13763
  {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 +13780,14 @@ this.IsDrawSortBGIcon=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.So
13776
13780
  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
13781
  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
13782
  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;//选中行
13783
+ 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;//选中行
13784
+ }else{if(this.SelectedRowData&&this.SelectedRowData.DataIndex==i&&this.SelectedRowData.Symbol==symbol)bFillRow=true;//选中行
13781
13785
  }}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
13786
  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];}};//单行选中模式选中股票
13787
+ 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
13788
  this.GetSelectedSingleSymbol=function(){if(this.MultiSelectModel==1)return null;//多选
13786
13789
  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=拖拽行
13790
+ 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
13791
  {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
13792
  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
13793
  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 +13847,10 @@ this.DrawKLine=function(klineData,column,rtItem,data){if(column.IsDrawCallback)/
13844
13847
  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
13848
  {if(!this.Data)return null;if(this.Tab){var tab=this.Tab.OnMouseDown(x,y,e);if(tab)return{Type:1,Tab:tab};//底部工具栏
13846
13849
  }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};//行
13850
+ }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
13851
  }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
13852
  {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};//行
13853
+ {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
13854
  }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
13855
  }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
13856
  {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 +13866,7 @@ this.Canvas.fillStyle=this.DragRowColor;this.Canvas.fillRect(rtRow.Left,rtRow.To
13863
13866
  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
13867
  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
13868
  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行
13869
+ 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
13870
  };}//报价列表底部tab和横向滚动条
13868
13871
  function ChartReportTab(){this.Canvas;//画布
13869
13872
  this.ChartBorder;//边框信息
@@ -15173,7 +15176,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
15173
15176
  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
15177
  * 版本信息输出
15175
15178
  *
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();//把给外界调用的方法暴露出来
15179
+ */var HQCHART_VERSION="1.1.14904";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
15180
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
15178
15181
  // BaseIndex:BaseIndex,
15179
15182
  // 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.14905",
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();
@@ -1511,7 +1515,7 @@ function JSReportChartContainer(uielement)
1511
1515
  return;
1512
1516
  }
1513
1517
 
1514
- if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
1518
+ //if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
1515
1519
  if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0)
1516
1520
  {
1517
1521
  var column=chart.Column[this.SortInfo.Field];
@@ -1523,7 +1527,7 @@ function JSReportChartContainer(uielement)
1523
1527
  }
1524
1528
 
1525
1529
  var arySymbol=chart.ShowSymbol;
1526
- if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return;
1530
+ //if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return;
1527
1531
  this.RequestStockData(arySymbol);
1528
1532
  }
1529
1533
 
@@ -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
 
@@ -4367,10 +4382,15 @@ function JSReportChartContainer(uielement)
4367
4382
  if (!chart) return;
4368
4383
 
4369
4384
  var self=this;
4370
- var startIndex=this.Data.YOffset;
4371
4385
  var pageSize=chart.GetPageSize();
4372
- var endIndex=startIndex+pageSize;
4373
- if (endIndex>=this.Data.Data.length) endIndex=this.Data.Data.length-1;
4386
+ var endIndex=0;
4387
+ var startIndex=0;
4388
+ if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
4389
+ {
4390
+ startIndex=this.Data.YOffset;
4391
+ endIndex=startIndex+pageSize;
4392
+ if (endIndex>=this.Data.Data.length) endIndex=this.Data.Data.length-1;
4393
+ }
4374
4394
 
4375
4395
  if (this.NetworkFilter)
4376
4396
  {
@@ -4910,7 +4930,7 @@ function ChartReport()
4910
4930
  this.SizeChange=true;
4911
4931
 
4912
4932
  this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
4913
- this.SelectedRow=-1; //选中行ID
4933
+ this.SelectedRowData; //{ DataIndex:, Index:, Symbol: }
4914
4934
  this.SelectedFixedRow=-1; //选中固定行ID
4915
4935
  this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
4916
4936
  this.IsDrawBorder=1; //是否绘制单元格边框
@@ -5682,13 +5702,23 @@ function ChartReport()
5682
5702
 
5683
5703
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
5684
5704
  {
5685
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
5705
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRowData:null, SelectedRow:-1, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
5706
+
5686
5707
  if (this.MultiSelectModel==1)
5687
5708
  {
5688
5709
  result.SelectedRow=-1;
5689
5710
  result.MultiSelectedRow=this.MultiSelectedRow.slice();
5690
5711
  result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
5691
5712
  }
5713
+ else
5714
+ {
5715
+ result.SelectedRowData=this.SelectedRowData;
5716
+ if (this.SelectedRowData)
5717
+ {
5718
+ if (this.SelectedModel==1) result.SelectedRow=this.SelectedRowData.DataIndex;
5719
+ else result.SelectedRow=this.SelectedRowData.Index;
5720
+ }
5721
+ }
5692
5722
 
5693
5723
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
5694
5724
  {
@@ -6200,11 +6230,13 @@ function ChartReport()
6200
6230
  {
6201
6231
  if (this.SelectedModel==0)
6202
6232
  {
6203
- if (j==this.SelectedRow) bFillRow=true; //选中行
6233
+ if (this.SelectedRowData && this.SelectedRowData.Index==j && this.SelectedRowData.Symbol==symbol)
6234
+ bFillRow=true; //选中行
6204
6235
  }
6205
6236
  else
6206
6237
  {
6207
- if (i==this.SelectedRow) bFillRow=true; //选中行
6238
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==i && this.SelectedRowData.Symbol==symbol)
6239
+ bFillRow=true; //选中行
6208
6240
  }
6209
6241
  }
6210
6242
 
@@ -6339,14 +6371,10 @@ function ChartReport()
6339
6371
  }
6340
6372
  else
6341
6373
  {
6342
- if (this.SelectedRow<0) return null;
6374
+ if (!this.SelectedRowData) return null;
6375
+ if (!this.SelectedRowData.Symbol) return null;
6343
6376
 
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];
6377
+ return [this.SelectedRowData.Symbol];
6350
6378
  }
6351
6379
  }
6352
6380
 
@@ -6355,10 +6383,9 @@ function ChartReport()
6355
6383
  {
6356
6384
  if (this.MultiSelectModel==1) return null; //多选
6357
6385
  if (this.SelectedModel==0) return null; //当前屏选中
6358
- if (this.SelectedRow<0) return null;
6386
+ if (!this.SelectedRowData) return null;
6359
6387
 
6360
- var symbol=this.Data.Data[this.SelectedRow];
6361
- return symbol;
6388
+ return this.SelectedRowData.Symbol;
6362
6389
  }
6363
6390
 
6364
6391
 
@@ -8580,7 +8607,7 @@ function ChartReport()
8580
8607
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
8581
8608
 
8582
8609
  this.SelectedFixedRow=row.Index;
8583
- this.SelectedRow=-1;
8610
+ this.SelectedRowData=null;
8584
8611
  this.MultiSelectedRow=[];
8585
8612
 
8586
8613
  return { Type:4, Redraw:bRedraw, Row:row }; //行
@@ -8618,14 +8645,18 @@ function ChartReport()
8618
8645
  {
8619
8646
  if (this.SelectedModel==0)
8620
8647
  {
8621
- if (this.SelectedRow==row.Index) bRedraw=false;
8622
- this.SelectedRow=row.Index;
8648
+ if (this.SelectedRowData && this.SelectedRowData.Index==row.Index && this.SelectedRowData.Symbol==row.Symbol)
8649
+ bRedraw=false;
8650
+ this.SelectedRowData={ Index:row.Index, Symbol:row.Symbol };
8623
8651
  this.SelectedFixedRow=-1;
8624
8652
  }
8625
8653
  else
8626
8654
  {
8627
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
8628
- this.SelectedRow=row.DataIndex;
8655
+
8656
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==row.DataIndex && this.SelectedRowData.Symbol==row.Symbol)
8657
+ bRedraw=false;
8658
+
8659
+ this.SelectedRowData={ DataIndex:row.DataIndex, Symbol:row.Symbol };
8629
8660
  this.SelectedFixedRow=-1;
8630
8661
  }
8631
8662
  }
@@ -9180,10 +9211,10 @@ function ChartReport()
9180
9211
  var symbol=option.Symbol;
9181
9212
  var bFinder=false;
9182
9213
 
9183
- if (this.SelectedRow>=0)
9214
+ if (this.SelectedRowData)
9184
9215
  {
9185
- var item=this.Data.Data[this.SelectedRow];
9186
- if (symbol==item) bFinder=true;
9216
+ var item=this.Data.Data[this.SelectedRowData.DataIndex];
9217
+ if (symbol==item && symbol==this.SelectedRowData.Symbol) bFinder=true;
9187
9218
  }
9188
9219
 
9189
9220
  if (!bFinder)
@@ -9193,7 +9224,7 @@ function ChartReport()
9193
9224
  var item=this.Data.Data[i];
9194
9225
  if (symbol==item)
9195
9226
  {
9196
- this.SelectedRow=i;
9227
+ this.SelectedRowData={ DataIndex:i, Symbol:item };
9197
9228
  bFinder=true;
9198
9229
  break;
9199
9230
  }
@@ -9204,7 +9235,7 @@ function ChartReport()
9204
9235
 
9205
9236
  if (option.AutoYScroll===true)
9206
9237
  {
9207
- this.UpdatePageYOffset({ SelectedRow:this.SelectedRow });
9238
+ this.UpdatePageYOffset({ SelectedRow:this.SelectedRowData.DataIndex });
9208
9239
  }
9209
9240
 
9210
9241
  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();
@@ -139036,7 +139048,7 @@ function JSReportChartContainer(uielement)
139036
139048
  return;
139037
139049
  }
139038
139050
 
139039
- if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
139051
+ //if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
139040
139052
  if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0)
139041
139053
  {
139042
139054
  var column=chart.Column[this.SortInfo.Field];
@@ -139048,7 +139060,7 @@ function JSReportChartContainer(uielement)
139048
139060
  }
139049
139061
 
139050
139062
  var arySymbol=chart.ShowSymbol;
139051
- if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return;
139063
+ //if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return;
139052
139064
  this.RequestStockData(arySymbol);
139053
139065
  }
139054
139066
 
@@ -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
 
@@ -141892,10 +141915,15 @@ function JSReportChartContainer(uielement)
141892
141915
  if (!chart) return;
141893
141916
 
141894
141917
  var self=this;
141895
- var startIndex=this.Data.YOffset;
141896
141918
  var pageSize=chart.GetPageSize();
141897
- var endIndex=startIndex+pageSize;
141898
- if (endIndex>=this.Data.Data.length) endIndex=this.Data.Data.length-1;
141919
+ var endIndex=0;
141920
+ var startIndex=0;
141921
+ if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
141922
+ {
141923
+ startIndex=this.Data.YOffset;
141924
+ endIndex=startIndex+pageSize;
141925
+ if (endIndex>=this.Data.Data.length) endIndex=this.Data.Data.length-1;
141926
+ }
141899
141927
 
141900
141928
  if (this.NetworkFilter)
141901
141929
  {
@@ -142435,7 +142463,7 @@ function ChartReport()
142435
142463
  this.SizeChange=true;
142436
142464
 
142437
142465
  this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
142438
- this.SelectedRow=-1; //选中行ID
142466
+ this.SelectedRowData; //{ DataIndex:, Index:, Symbol: }
142439
142467
  this.SelectedFixedRow=-1; //选中固定行ID
142440
142468
  this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
142441
142469
  this.IsDrawBorder=1; //是否绘制单元格边框
@@ -143207,13 +143235,23 @@ function ChartReport()
143207
143235
 
143208
143236
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
143209
143237
  {
143210
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143238
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRowData:null, SelectedRow:-1, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143239
+
143211
143240
  if (this.MultiSelectModel==1)
143212
143241
  {
143213
143242
  result.SelectedRow=-1;
143214
143243
  result.MultiSelectedRow=this.MultiSelectedRow.slice();
143215
143244
  result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
143216
143245
  }
143246
+ else
143247
+ {
143248
+ result.SelectedRowData=this.SelectedRowData;
143249
+ if (this.SelectedRowData)
143250
+ {
143251
+ if (this.SelectedModel==1) result.SelectedRow=this.SelectedRowData.DataIndex;
143252
+ else result.SelectedRow=this.SelectedRowData.Index;
143253
+ }
143254
+ }
143217
143255
 
143218
143256
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
143219
143257
  {
@@ -143725,11 +143763,13 @@ function ChartReport()
143725
143763
  {
143726
143764
  if (this.SelectedModel==0)
143727
143765
  {
143728
- if (j==this.SelectedRow) bFillRow=true; //选中行
143766
+ if (this.SelectedRowData && this.SelectedRowData.Index==j && this.SelectedRowData.Symbol==symbol)
143767
+ bFillRow=true; //选中行
143729
143768
  }
143730
143769
  else
143731
143770
  {
143732
- if (i==this.SelectedRow) bFillRow=true; //选中行
143771
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==i && this.SelectedRowData.Symbol==symbol)
143772
+ bFillRow=true; //选中行
143733
143773
  }
143734
143774
  }
143735
143775
 
@@ -143864,14 +143904,10 @@ function ChartReport()
143864
143904
  }
143865
143905
  else
143866
143906
  {
143867
- if (this.SelectedRow<0) return null;
143907
+ if (!this.SelectedRowData) return null;
143908
+ if (!this.SelectedRowData.Symbol) return null;
143868
143909
 
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];
143910
+ return [this.SelectedRowData.Symbol];
143875
143911
  }
143876
143912
  }
143877
143913
 
@@ -143880,10 +143916,9 @@ function ChartReport()
143880
143916
  {
143881
143917
  if (this.MultiSelectModel==1) return null; //多选
143882
143918
  if (this.SelectedModel==0) return null; //当前屏选中
143883
- if (this.SelectedRow<0) return null;
143919
+ if (!this.SelectedRowData) return null;
143884
143920
 
143885
- var symbol=this.Data.Data[this.SelectedRow];
143886
- return symbol;
143921
+ return this.SelectedRowData.Symbol;
143887
143922
  }
143888
143923
 
143889
143924
 
@@ -146105,7 +146140,7 @@ function ChartReport()
146105
146140
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
146106
146141
 
146107
146142
  this.SelectedFixedRow=row.Index;
146108
- this.SelectedRow=-1;
146143
+ this.SelectedRowData=null;
146109
146144
  this.MultiSelectedRow=[];
146110
146145
 
146111
146146
  return { Type:4, Redraw:bRedraw, Row:row }; //行
@@ -146143,14 +146178,18 @@ function ChartReport()
146143
146178
  {
146144
146179
  if (this.SelectedModel==0)
146145
146180
  {
146146
- if (this.SelectedRow==row.Index) bRedraw=false;
146147
- this.SelectedRow=row.Index;
146181
+ if (this.SelectedRowData && this.SelectedRowData.Index==row.Index && this.SelectedRowData.Symbol==row.Symbol)
146182
+ bRedraw=false;
146183
+ this.SelectedRowData={ Index:row.Index, Symbol:row.Symbol };
146148
146184
  this.SelectedFixedRow=-1;
146149
146185
  }
146150
146186
  else
146151
146187
  {
146152
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
146153
- this.SelectedRow=row.DataIndex;
146188
+
146189
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==row.DataIndex && this.SelectedRowData.Symbol==row.Symbol)
146190
+ bRedraw=false;
146191
+
146192
+ this.SelectedRowData={ DataIndex:row.DataIndex, Symbol:row.Symbol };
146154
146193
  this.SelectedFixedRow=-1;
146155
146194
  }
146156
146195
  }
@@ -146705,10 +146744,10 @@ function ChartReport()
146705
146744
  var symbol=option.Symbol;
146706
146745
  var bFinder=false;
146707
146746
 
146708
- if (this.SelectedRow>=0)
146747
+ if (this.SelectedRowData)
146709
146748
  {
146710
- var item=this.Data.Data[this.SelectedRow];
146711
- if (symbol==item) bFinder=true;
146749
+ var item=this.Data.Data[this.SelectedRowData.DataIndex];
146750
+ if (symbol==item && symbol==this.SelectedRowData.Symbol) bFinder=true;
146712
146751
  }
146713
146752
 
146714
146753
  if (!bFinder)
@@ -146718,7 +146757,7 @@ function ChartReport()
146718
146757
  var item=this.Data.Data[i];
146719
146758
  if (symbol==item)
146720
146759
  {
146721
- this.SelectedRow=i;
146760
+ this.SelectedRowData={ DataIndex:i, Symbol:item };
146722
146761
  bFinder=true;
146723
146762
  break;
146724
146763
  }
@@ -146729,7 +146768,7 @@ function ChartReport()
146729
146768
 
146730
146769
  if (option.AutoYScroll===true)
146731
146770
  {
146732
- this.UpdatePageYOffset({ SelectedRow:this.SelectedRow });
146771
+ this.UpdatePageYOffset({ SelectedRow:this.SelectedRowData.DataIndex });
146733
146772
  }
146734
146773
 
146735
146774
  return bFinder;
@@ -150876,7 +150915,7 @@ function ScrollBarBGChart()
150876
150915
 
150877
150916
 
150878
150917
 
150879
- var HQCHART_VERSION="1.1.14899";
150918
+ var HQCHART_VERSION="1.1.14904";
150880
150919
 
150881
150920
  function PrintHQChartVersion()
150882
150921
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14899";
8
+ var HQCHART_VERSION="1.1.14904";
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();
@@ -139080,7 +139092,7 @@ function JSReportChartContainer(uielement)
139080
139092
  return;
139081
139093
  }
139082
139094
 
139083
- if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
139095
+ //if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
139084
139096
  if (this.SortInfo && this.SortInfo.Field>=0 && this.SortInfo.Sort>0)
139085
139097
  {
139086
139098
  var column=chart.Column[this.SortInfo.Field];
@@ -139092,7 +139104,7 @@ function JSReportChartContainer(uielement)
139092
139104
  }
139093
139105
 
139094
139106
  var arySymbol=chart.ShowSymbol;
139095
- if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return;
139107
+ //if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return;
139096
139108
  this.RequestStockData(arySymbol);
139097
139109
  }
139098
139110
 
@@ -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
 
@@ -141936,10 +141959,15 @@ function JSReportChartContainer(uielement)
141936
141959
  if (!chart) return;
141937
141960
 
141938
141961
  var self=this;
141939
- var startIndex=this.Data.YOffset;
141940
141962
  var pageSize=chart.GetPageSize();
141941
- var endIndex=startIndex+pageSize;
141942
- if (endIndex>=this.Data.Data.length) endIndex=this.Data.Data.length-1;
141963
+ var endIndex=0;
141964
+ var startIndex=0;
141965
+ if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
141966
+ {
141967
+ startIndex=this.Data.YOffset;
141968
+ endIndex=startIndex+pageSize;
141969
+ if (endIndex>=this.Data.Data.length) endIndex=this.Data.Data.length-1;
141970
+ }
141943
141971
 
141944
141972
  if (this.NetworkFilter)
141945
141973
  {
@@ -142479,7 +142507,7 @@ function ChartReport()
142479
142507
  this.SizeChange=true;
142480
142508
 
142481
142509
  this.SelectedModel=0; //选中模式 0=SelectedRow表示当前屏索引
142482
- this.SelectedRow=-1; //选中行ID
142510
+ this.SelectedRowData; //{ DataIndex:, Index:, Symbol: }
142483
142511
  this.SelectedFixedRow=-1; //选中固定行ID
142484
142512
  this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
142485
142513
  this.IsDrawBorder=1; //是否绘制单元格边框
@@ -143251,13 +143279,23 @@ function ChartReport()
143251
143279
 
143252
143280
  this.GetCurrentPageStatus=function() //{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
143253
143281
  {
143254
- var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRow:this.SelectedRow, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143282
+ var result={ Start:this.Data.YOffset, PageSize:this.RowCount, IsEnd:false, SelectedRowData:null, SelectedRow:-1, IsSinglePage:false, DataCount:0, MultiSelectModel:this.MultiSelectModel };
143283
+
143255
143284
  if (this.MultiSelectModel==1)
143256
143285
  {
143257
143286
  result.SelectedRow=-1;
143258
143287
  result.MultiSelectedRow=this.MultiSelectedRow.slice();
143259
143288
  result.MultiSelectedRow.sort((left, right)=>{ return left>right; });
143260
143289
  }
143290
+ else
143291
+ {
143292
+ result.SelectedRowData=this.SelectedRowData;
143293
+ if (this.SelectedRowData)
143294
+ {
143295
+ if (this.SelectedModel==1) result.SelectedRow=this.SelectedRowData.DataIndex;
143296
+ else result.SelectedRow=this.SelectedRowData.Index;
143297
+ }
143298
+ }
143261
143299
 
143262
143300
  if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
143263
143301
  {
@@ -143769,11 +143807,13 @@ function ChartReport()
143769
143807
  {
143770
143808
  if (this.SelectedModel==0)
143771
143809
  {
143772
- if (j==this.SelectedRow) bFillRow=true; //选中行
143810
+ if (this.SelectedRowData && this.SelectedRowData.Index==j && this.SelectedRowData.Symbol==symbol)
143811
+ bFillRow=true; //选中行
143773
143812
  }
143774
143813
  else
143775
143814
  {
143776
- if (i==this.SelectedRow) bFillRow=true; //选中行
143815
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==i && this.SelectedRowData.Symbol==symbol)
143816
+ bFillRow=true; //选中行
143777
143817
  }
143778
143818
  }
143779
143819
 
@@ -143908,14 +143948,10 @@ function ChartReport()
143908
143948
  }
143909
143949
  else
143910
143950
  {
143911
- if (this.SelectedRow<0) return null;
143951
+ if (!this.SelectedRowData) return null;
143952
+ if (!this.SelectedRowData.Symbol) return null;
143912
143953
 
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];
143954
+ return [this.SelectedRowData.Symbol];
143919
143955
  }
143920
143956
  }
143921
143957
 
@@ -143924,10 +143960,9 @@ function ChartReport()
143924
143960
  {
143925
143961
  if (this.MultiSelectModel==1) return null; //多选
143926
143962
  if (this.SelectedModel==0) return null; //当前屏选中
143927
- if (this.SelectedRow<0) return null;
143963
+ if (!this.SelectedRowData) return null;
143928
143964
 
143929
- var symbol=this.Data.Data[this.SelectedRow];
143930
- return symbol;
143965
+ return this.SelectedRowData.Symbol;
143931
143966
  }
143932
143967
 
143933
143968
 
@@ -146149,7 +146184,7 @@ function ChartReport()
146149
146184
  this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
146150
146185
 
146151
146186
  this.SelectedFixedRow=row.Index;
146152
- this.SelectedRow=-1;
146187
+ this.SelectedRowData=null;
146153
146188
  this.MultiSelectedRow=[];
146154
146189
 
146155
146190
  return { Type:4, Redraw:bRedraw, Row:row }; //行
@@ -146187,14 +146222,18 @@ function ChartReport()
146187
146222
  {
146188
146223
  if (this.SelectedModel==0)
146189
146224
  {
146190
- if (this.SelectedRow==row.Index) bRedraw=false;
146191
- this.SelectedRow=row.Index;
146225
+ if (this.SelectedRowData && this.SelectedRowData.Index==row.Index && this.SelectedRowData.Symbol==row.Symbol)
146226
+ bRedraw=false;
146227
+ this.SelectedRowData={ Index:row.Index, Symbol:row.Symbol };
146192
146228
  this.SelectedFixedRow=-1;
146193
146229
  }
146194
146230
  else
146195
146231
  {
146196
- if (this.SelectedRow==row.DataIndex) bRedraw=false;
146197
- this.SelectedRow=row.DataIndex;
146232
+
146233
+ if (this.SelectedRowData && this.SelectedRowData.DataIndex==row.DataIndex && this.SelectedRowData.Symbol==row.Symbol)
146234
+ bRedraw=false;
146235
+
146236
+ this.SelectedRowData={ DataIndex:row.DataIndex, Symbol:row.Symbol };
146198
146237
  this.SelectedFixedRow=-1;
146199
146238
  }
146200
146239
  }
@@ -146749,10 +146788,10 @@ function ChartReport()
146749
146788
  var symbol=option.Symbol;
146750
146789
  var bFinder=false;
146751
146790
 
146752
- if (this.SelectedRow>=0)
146791
+ if (this.SelectedRowData)
146753
146792
  {
146754
- var item=this.Data.Data[this.SelectedRow];
146755
- if (symbol==item) bFinder=true;
146793
+ var item=this.Data.Data[this.SelectedRowData.DataIndex];
146794
+ if (symbol==item && symbol==this.SelectedRowData.Symbol) bFinder=true;
146756
146795
  }
146757
146796
 
146758
146797
  if (!bFinder)
@@ -146762,7 +146801,7 @@ function ChartReport()
146762
146801
  var item=this.Data.Data[i];
146763
146802
  if (symbol==item)
146764
146803
  {
146765
- this.SelectedRow=i;
146804
+ this.SelectedRowData={ DataIndex:i, Symbol:item };
146766
146805
  bFinder=true;
146767
146806
  break;
146768
146807
  }
@@ -146773,7 +146812,7 @@ function ChartReport()
146773
146812
 
146774
146813
  if (option.AutoYScroll===true)
146775
146814
  {
146776
- this.UpdatePageYOffset({ SelectedRow:this.SelectedRow });
146815
+ this.UpdatePageYOffset({ SelectedRow:this.SelectedRowData.DataIndex });
146777
146816
  }
146778
146817
 
146779
146818
  return bFinder;
@@ -162096,7 +162135,7 @@ function HQChartScriptWorker()
162096
162135
 
162097
162136
 
162098
162137
 
162099
- var HQCHART_VERSION="1.1.14899";
162138
+ var HQCHART_VERSION="1.1.14904";
162100
162139
 
162101
162140
  function PrintHQChartVersion()
162102
162141
  {