hqchart 1.1.14093 → 1.1.14097

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.
@@ -2033,7 +2033,7 @@ this.DeleteExtendChart=function(data){if(data.Index>=this.ExtendChartPaint.lengt
2033
2033
  this.DeleteExtendChartByID=function(id){for(var i=0;i<this.ExtendChartPaint.length;++i){var item=this.ExtendChartPaint[i];if(item.ID==id){this.ExtendChartPaint.splice(i,1);return true;}}return false;};//全屏提示信息 { Title:提示信息, Draw:false/true 是否立即重绘, }
2034
2034
  this.EnableSplashScreen=function(enable,option){if(!this.ChartSplashPaint)return;this.ChartSplashPaint.EnableSplash(enable);if(option&&option.Draw===false)return;if(enable)this.DrawSplashScreen(option);else this.Draw();};//设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
2035
2035
  this.SetSubFrameAttribute=function(subFrame,windowItem,frameItem){if(!subFrame||!subFrame.Frame)return;var frame=subFrame.Frame;if(windowItem){if(IFrameSplitOperator.IsBool(windowItem.Modify))frame.ModifyIndex=windowItem.Modify;if(IFrameSplitOperator.IsBool(windowItem.Change))frame.ChangeIndex=windowItem.Change;if(IFrameSplitOperator.IsBool(windowItem.Close))frame.CloseIndex=windowItem.Close;if(IFrameSplitOperator.IsBool(windowItem.Overlay))frame.OverlayIndex=windowItem.Overlay;if(IFrameSplitOperator.IsBool(windowItem.IsDrawTitleBG))frame.IsDrawTitleBG=windowItem.IsDrawTitleBG;if(IFrameSplitOperator.IsNumber(windowItem.TitleHeight))frame.ChartBorder.TitleHeight=windowItem.TitleHeight;else windowItem.TitleHeight=frame.ChartBorder.TitleHeight;if(IFrameSplitOperator.IsBool(windowItem.IsShowTitleArrow))frame.IsShowTitleArrow=windowItem.IsShowTitleArrow;if(IFrameSplitOperator.IsNumber(windowItem.TitleArrowType))frame.TitleArrowType=windowItem.TitleArrowType;if(IFrameSplitOperator.IsBool(windowItem.IsShowIndexName))frame.IsShowIndexName=windowItem.IsShowIndexName;if(IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace))frame.IndexParamSpace=windowItem.IndexParamSpace;if(IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace))frame.IndexTitleSpace=windowItem.IndexTitleSpace;if(!IFrameSplitOperator.IsUndefined(windowItem.HorizontalReserved))frame.HorizontalReserved=windowItem.HorizontalReserved;//Y轴上下预留
2036
- }if(frameItem){if(frameItem.SplitCount)frame.YSplitOperator.SplitCount=frameItem.SplitCount;if(IFrameSplitOperator.IsNumber(frameItem.SplitType)){frame.YSplitOperator.SplitType=frameItem.SplitType;frame.YSplitOperator.DefaultSplitType=frameItem.SplitType;}if(IFrameSplitOperator.IsBool(frameItem.IsShowXLine))frame.IsShowXLine=frameItem.IsShowXLine;if(IFrameSplitOperator.IsBool(frameItem.IsShowYLine))frame.IsShowYLine=frameItem.IsShowYLine;if(IFrameSplitOperator.IsBool(frameItem.IsShowLeftText)){frame.IsShowYText[0]=frameItem.IsShowLeftText;frame.YSplitOperator.IsShowLeftText=frameItem.IsShowLeftText;//显示左边刻度
2036
+ if(IFrameSplitOperator.IsBool(windowItem.IsShowNameArrow))frame.IsShowNameArrow=windowItem.IsShowNameArrow;}if(frameItem){if(frameItem.SplitCount)frame.YSplitOperator.SplitCount=frameItem.SplitCount;if(IFrameSplitOperator.IsNumber(frameItem.SplitType)){frame.YSplitOperator.SplitType=frameItem.SplitType;frame.YSplitOperator.DefaultSplitType=frameItem.SplitType;}if(IFrameSplitOperator.IsBool(frameItem.IsShowXLine))frame.IsShowXLine=frameItem.IsShowXLine;if(IFrameSplitOperator.IsBool(frameItem.IsShowYLine))frame.IsShowYLine=frameItem.IsShowYLine;if(IFrameSplitOperator.IsBool(frameItem.IsShowLeftText)){frame.IsShowYText[0]=frameItem.IsShowLeftText;frame.YSplitOperator.IsShowLeftText=frameItem.IsShowLeftText;//显示左边刻度
2037
2037
  }if(IFrameSplitOperator.IsBool(frameItem.IsShowRightText)){frame.IsShowYText[1]=frameItem.IsShowRightText;frame.YSplitOperator.IsShowRightText=frameItem.IsShowRightText;//显示右边刻度
2038
2038
  }if(IFrameSplitOperator.IsNumber(frameItem.Height)&&frameItem.Height>=0)subFrame.Height=frameItem.Height;}};this.SetSubFrameOption=function(subFrame,option){if(!option)return;var frame=subFrame.Frame;if(option.Window){var item=option.Window;if(IFrameSplitOperator.IsBool(item.Modify))frame.ModifyIndex=item.Modify;if(IFrameSplitOperator.IsBool(item.Change))frame.ChangeIndex=item.Change;if(IFrameSplitOperator.IsBool(item.Close))frame.CloseIndex=item.Close;if(IFrameSplitOperator.IsBool(item.Overlay))frame.OverlayIndex=item.Overlay;if(IFrameSplitOperator.IsBool(item.Export))frame.ExportData=item.Export;if(IFrameSplitOperator.IsBool(item.MaxMin))frame.MaxMinWindow=item.MaxMin;if(IFrameSplitOperator.IsBool(item.TitleWindow))frame.TitleWindow=item.TitleWindow;if(IFrameSplitOperator.IsBool(item.IsDrawTitleBG))frame.IsDrawTitleBG=item.IsDrawTitleBG;if(IFrameSplitOperator.IsBool(item.IsShowNameArrow))frame.IsShowNameArrow=item.IsShowNameArrow;if(item.OverlayIndexType){if(IFrameSplitOperator.IsNumber(item.OverlayIndexType.Position))frame.OverlayIndexType.Position=item.OverlayIndexType.Position;if(IFrameSplitOperator.IsNumber(item.OverlayIndexType.LineSpace))frame.OverlayIndexType.LineSpace=item.OverlayIndexType.LineSpace;}if(IFrameSplitOperator.IsNonEmptyArray(item.CustomToolbar))//自定义工具按钮
2039
2039
  {frame.CustomToolbar=item.CustomToolbar.slice();}}if(IFrameSplitOperator.IsNumber(option.SplitCount))subFrame.Frame.YSplitOperator.SplitCount=option.SplitCount;if(IFrameSplitOperator.IsNumber(option.TitleHeight))subFrame.Frame.ChartBorder.TitleHeight=option.TitleHeight;if(IFrameSplitOperator.IsBool(option.IsShowTitleArrow))subFrame.Frame.IsShowTitleArrow=option.IsShowTitleArrow;if(IFrameSplitOperator.IsNumber(option.TitleArrowType))subFrame.Frame.TitleArrowType=option.TitleArrowType;if(IFrameSplitOperator.IsBool(option.IsShowIndexName))subFrame.Frame.IsShowIndexName=option.IsShowIndexName;if(IFrameSplitOperator.IsBool(option.IsShowOverlayIndexName))subFrame.Frame.IsShowOverlayIndexName=option.IsShowOverlayIndexName;if(IFrameSplitOperator.IsNumber(option.IndexParamSpace))subFrame.Frame.IndexParamSpace=option.IndexParamSpace;if(IFrameSplitOperator.IsBool(option.IsShowXLine))subFrame.Frame.IsShowXLine=option.IsShowXLine;if(IFrameSplitOperator.IsBool(option.IsShowYLine))subFrame.Frame.IsShowYLine=option.IsShowYLine;if(IFrameSplitOperator.IsBool(option.IsShowIndexTitle))subFrame.Frame.IsShowIndexTitle=option.IsShowIndexTitle;if(IFrameSplitOperator.IsBool(option.IsShowLeftText)){subFrame.Frame.IsShowYText[0]=option.IsShowLeftText;subFrame.Frame.YSplitOperator.IsShowLeftText=option.IsShowLeftText;//显示左边刻度
@@ -5149,7 +5149,8 @@ IFrameSplitOperator.IsInteger=function(x){return typeof x==='number'&&x%1===0;};
5149
5149
  IFrameSplitOperator.IsObjectExist=function(obj){if(obj===undefined)return false;if(obj==null)return false;return true;};//是否时bool
5150
5150
  IFrameSplitOperator.IsBool=function(value){if(value===true||value===false)return true;return false;};IFrameSplitOperator.IsString=function(value){var type=typeof value==='undefined'?'undefined':(0,_typeof3.default)(value);if(type=='string')return true;return false;};//是否是非空的数组
5151
5151
  IFrameSplitOperator.IsNonEmptyArray=function(ary){if(!ary)return false;if(!Array.isArray(ary))return false;return ary.length>0;};IFrameSplitOperator.IsFloat=function(value){if(value===undefined)return false;if(value==null)return false;if(isNaN(value))return false;return value!=parseInt(value);};//是否有效
5152
- IFrameSplitOperator.IsVaild=function(value){if(isNaN(value))return false;if(value==null)return false;if(value===undefined)return false;return true;};IFrameSplitOperator.IsUndefined=function(value){return value===undefined;};IFrameSplitOperator.IsObject=function(value){return value instanceof Object;};IFrameSplitOperator.RemoveZero=function(strValue){while(strValue.length>0){var index=strValue.length-1;var ch=strValue[index];if(ch=="0"){strValue=strValue.substr(0,index);}else if(ch=="."){strValue=strValue.substr(0,index);break;}else{break;}}return strValue;};function FrameSplitKLinePriceY(){this.newMethod=IFrameSplitOperator;//派生
5152
+ IFrameSplitOperator.IsVaild=function(value){if(isNaN(value))return false;if(value==null)return false;if(value===undefined)return false;return true;};IFrameSplitOperator.IsUndefined=function(value){return value===undefined;};IFrameSplitOperator.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;};//移除代码市场后缀
5153
+ 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;//派生
5153
5154
  this.newMethod();delete this.newMethod;this.CoordinateType=0;//坐标类型 0=普通坐标 1=百分比坐标 (右边坐标刻度) 2=对数对标 3=等比坐标 4=等分坐标 5=黄金分割
5154
5155
  this.Symbol;this.Data;//K线数据 (计算百分比坐标)
5155
5156
  this.FrameSplitData2;//坐标轴分割方法(计算百分比刻度)
@@ -6943,7 +6944,8 @@ SortColor:"rgb(255,0,0)",//排序箭头颜色
6943
6944
  Mergin:{Left:5,Right:5,Top:4,Bottom:4},//表头四周间距
6944
6945
  Font:{Size:12,Name:"微软雅黑"}//表头字体
6945
6946
  },//排序图标
6946
- SortIcon:{Size:12,Family:"iconfont",Arrow:[null,'\uE6B2','\uE6B1'],Color:[null,"rgb(255,0,0)","rgb(255,0,0)"],Margin:{Left:0,Bottom:6}},Item:{Mergin:{Top:2,Bottom:4,Left:5,Right:5},//单元格四周间距
6947
+ SortIcon:{Size:12,Family:"iconfont",Arrow:[null,'\uE6B2','\uE6B1'],//[0]=默认排序的图标背景色
6948
+ Color:[null,"rgb(255,0,0)","rgb(255,0,0)"],Margin:{Left:0,Bottom:6}},Item:{Mergin:{Top:2,Bottom:4,Left:5,Right:5},//单元格四周间距
6947
6949
  Font:{Size:15,Name:"微软雅黑"},BarMergin:{Top:2,Left:3,Right:3,Bottom:2},//单元格字体
6948
6950
  NameFont:{Size:14,Name:"微软雅黑"},SymbolFont:{Size:12,Name:"微软雅黑"}},//固定行
6949
6951
  FixedItem:{Font:{Size:15,Name:"微软雅黑"}},LimitBorder:{Color:"rgb(180,180,180)",Mergin:{Top:1,Bottom:1,Left:0,Right:0}},NameSymbolV2:{Name:{Size:14,Name:"微软雅黑",Color:"rgb(60,60,60)"},Symbol:{Size:10,Name:"微软雅黑",Color:"rgb(105 105 105)"}},//涨停 跌停背景色
@@ -12959,10 +12961,11 @@ this.UpdateCacheData=function(){this.RectClient.Left=this.ChartBorder.GetLeft();
12959
12961
  {if(recalculate)this.CalculateSize();var size=this.RowCount;return size;};this.GetCurrentPageStatus=function()//{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
12960
12962
  {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()//计算大小
12961
12963
  {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];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.SYMBOL_NAME_V2_ID)//单行显示
12962
- {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.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;var yBottom=top+this.HeaderHeight;this.Canvas.font=this.HeaderFont;var textLeft=left;//固定列
12964
+ {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.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;var yBottom=top+this.HeaderHeight;var bDrawSortBG=this.IsDrawSortBGIcon();this.Canvas.font=this.HeaderFont;var textLeft=left;//固定列
12963
12965
  for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];var itemWidth=item.Width;var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;var x=textLeft+this.HeaderMergin.Left;if(item.HeaderBGColor){var rtBG={Left:textLeft,Top:top,Width:itemWidth,Height:this.HeaderHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;this.DrawItemBG({Rect:rtBG,BGColor:item.HeaderBGColor});}var iconWidth=0;if(item.Icon&&item.Icon.Symbol)//图标
12964
- {var iconWidth=item.Icon.Size;if(item.Icon.Margin){var margin=item.Icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))iconWidth+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))iconWidth+=margin.Right;}}textWidth-=iconWidth;if(item.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;else this.Canvas.fillStyle=this.HeaderColor;var textSize={};if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort,textSize);}else{this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);}if(iconWidth>0){this.DrawHeaderIcon(item.Icon,textSize.Right,yBottom,i,item);this.Canvas.font=this.HeaderFont;}this.Canvas.fillStyle=this.HeaderColor;textLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];var itemWidth=item.Width;var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;var x=textLeft+this.HeaderMergin.Left;if(item.HeaderBGColor){var rtBG={Left:textLeft,Top:top,Width:itemWidth,Height:this.HeaderHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;this.DrawItemBG({Rect:rtBG,BGColor:item.HeaderBGColor});}var iconWidth=0;if(item.Icon&&item.Icon.Symbol)//图标
12965
- {var iconWidth=item.Icon.Size;if(item.Icon.Margin){var margin=item.Icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))iconWidth+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))iconWidth+=margin.Right;}}textWidth-=iconWidth;if(item.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;else this.Canvas.fillStyle=this.HeaderColor;var textSize={};if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort,textSize);}else{this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);}if(iconWidth>0){this.DrawHeaderIcon(item.Icon,textSize.Right,yBottom,i,item);this.Canvas.font=this.HeaderFont;}textLeft+=item.Width;}};this.DrawText=function(text,textAlign,x,yBottom,cellWidth,textSize){var textWidth=this.Canvas.measureText(text).width;if(textAlign=='center'){x=x+(cellWidth-textWidth)/2;}else if(textAlign=='right'){x=x+cellWidth-textWidth;}this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";this.Canvas.fillText(text,x,yBottom-this.HeaderMergin.Bottom);if(textSize){textSize.Right=x+textWidth;textSize.Width=textWidth;}};this.DrawHeaderIcon=function(icon,x,yBottom,index,column){var iconFont=icon.Size+'px '+icon.Family;this.Canvas.font=iconFont;this.Canvas.textAlign="left";if(icon.Color)this.Canvas.fillStyle=icon.Color;var xIcon=x;var yIcon=yBottom;if(icon.Margin&&IFrameSplitOperator.IsNumber(icon.Margin.Left))xIcon+=icon.Margin.Left;if(icon.Margin&&IFrameSplitOperator.IsNumber(icon.Margin.Bottom))yIcon-=icon.Margin.Bottom;this.Canvas.fillText(icon.Symbol,xIcon,yIcon);if(icon.Tooltip){var rtIcon={Left:xIcon,Bottom:yIcon,Width:icon.Size,Height:icon.Size};rtIcon.Right=rtIcon.Left+rtIcon.Width;rtIcon.Top=rtIcon.Bottom-rtIcon.Height;var tooltipData={Rect:rtIcon,Type:2,Column:column,Index:index,Data:icon.Tooltip.Data};this.TooltipRect.push(tooltipData);}};this.DrawSortHeader=function(text,textAlign,x,yBottom,width,sortType,textSize){var pixelRatio=GetDevicePixelRatio();var sortText=this.SortConfig.Arrow[sortType];this.Canvas.font=this.HeaderFont;var textWidth=this.Canvas.measureText(text).width;var sortTextWidth=this.SortConfig.Size*pixelRatio+this.SortConfig.Margin.Left;if(textAlign=='center'){x=x+width/2-(sortTextWidth+textWidth)/2;}else if(textAlign=='right'){x=x+width-sortTextWidth-textWidth;}this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";var xText=x;this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;this.Canvas.fillText(text,xText,yBottom-this.HeaderMergin.Bottom);xText+=textWidth+this.SortConfig.Margin.Left;this.Canvas.font=this.SortFont;this.Canvas.fillStyle=this.SortConfig.Color[sortType];this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;if(textSize){textSize.Right=x+textWidth+sortTextWidth;textSize.Width=textWidth+sortTextWidth;}};this.DrawBorder=function(){if(!this.IsDrawBorder)return;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=this.RectClient.Bottom;this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(top+this.HeaderHeight));this.Canvas.lineTo(right,ToFixedPoint(top+this.HeaderHeight));var rowTop=top+this.HeaderHeight+this.RowHeight;var rotBottom=rowTop;for(var i=0;i<this.FixedRowCount;++i){var drawTop=ToFixedPoint(rowTop);this.Canvas.moveTo(left,drawTop);this.Canvas.lineTo(right,drawTop);rotBottom=rowTop;rowTop+=this.FixedRowHeight;}var rowTop=top+this.HeaderHeight+this.RowHeight+this.FixedRowHeight*this.FixedRowCount;var rotBottom=rowTop;//横线
12966
+ {var iconWidth=item.Icon.Size;if(item.Icon.Margin){var margin=item.Icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))iconWidth+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))iconWidth+=margin.Right;}}textWidth-=iconWidth;if(item.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;else this.Canvas.fillStyle=this.HeaderColor;var textSize={};if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort,textSize);}else if(item.Sort>0&&bDrawSortBG){this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0,textSize);}else{this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);}if(iconWidth>0){this.DrawHeaderIcon(item.Icon,textSize.Right,yBottom,i,item);this.Canvas.font=this.HeaderFont;}this.Canvas.fillStyle=this.HeaderColor;textLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];var itemWidth=item.Width;var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;var x=textLeft+this.HeaderMergin.Left;if(item.HeaderBGColor){var rtBG={Left:textLeft,Top:top,Width:itemWidth,Height:this.HeaderHeight};rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Bottom=rtBG.Top+rtBG.Height;this.DrawItemBG({Rect:rtBG,BGColor:item.HeaderBGColor});}var iconWidth=0;if(item.Icon&&item.Icon.Symbol)//图标
12967
+ {var iconWidth=item.Icon.Size;if(item.Icon.Margin){var margin=item.Icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))iconWidth+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))iconWidth+=margin.Right;}}textWidth-=iconWidth;if(item.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;else this.Canvas.fillStyle=this.HeaderColor;var textSize={};if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort,textSize);}else if(item.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0,textSize);}else{this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);}if(iconWidth>0){this.DrawHeaderIcon(item.Icon,textSize.Right,yBottom,i,item);this.Canvas.font=this.HeaderFont;}textLeft+=item.Width;}};this.DrawText=function(text,textAlign,x,yBottom,cellWidth,textSize){var textWidth=this.Canvas.measureText(text).width;if(textAlign=='center'){x=x+(cellWidth-textWidth)/2;}else if(textAlign=='right'){x=x+cellWidth-textWidth;}this.Canvas.textAlign="left";this.Canvas.textBaseline="bottom";this.Canvas.fillText(text,x,yBottom-this.HeaderMergin.Bottom);if(textSize){textSize.Right=x+textWidth;textSize.Width=textWidth;}};this.DrawHeaderIcon=function(icon,x,yBottom,index,column){var iconFont=icon.Size+'px '+icon.Family;this.Canvas.font=iconFont;this.Canvas.textAlign="left";if(icon.Color)this.Canvas.fillStyle=icon.Color;var xIcon=x;var yIcon=yBottom;if(icon.Margin&&IFrameSplitOperator.IsNumber(icon.Margin.Left))xIcon+=icon.Margin.Left;if(icon.Margin&&IFrameSplitOperator.IsNumber(icon.Margin.Bottom))yIcon-=icon.Margin.Bottom;this.Canvas.fillText(icon.Symbol,xIcon,yIcon);if(icon.Tooltip){var rtIcon={Left:xIcon,Bottom:yIcon,Width:icon.Size,Height:icon.Size};rtIcon.Right=rtIcon.Left+rtIcon.Width;rtIcon.Top=rtIcon.Bottom-rtIcon.Height;var tooltipData={Rect:rtIcon,Type:2,Column:column,Index:index,Data:icon.Tooltip.Data};this.TooltipRect.push(tooltipData);}};//是否绘制排序背景图标
12968
+ this.IsDrawSortBGIcon=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Arrow))return false;if(!this.SortConfig.Arrow[0])return false;if(!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Color))return false;if(!this.SortConfig.Color[0])return false;return true;};this.DrawSortHeader=function(text,textAlign,x,yBottom,width,sortType,textSize){var pixelRatio=GetDevicePixelRatio();var sortText=this.SortConfig.Arrow[sortType];var sortBGText=this.SortConfig.Arrow[0];var sortBGColor=this.SortConfig.Color[0];this.Canvas.font=this.HeaderFont;var textWidth=this.Canvas.measureText(text).width;var sortTextWidth=this.SortConfig.Size*pixelRatio+this.SortConfig.Margin.Left;if(textAlign=='center'){x=x+width/2-(sortTextWidth+textWidth)/2;}else if(textAlign=='right'){x=x+width-sortTextWidth-textWidth;}this.Canvas.textBaseline="bottom";this.Canvas.textAlign="left";var xText=x;this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;this.Canvas.fillText(text,xText,yBottom-this.HeaderMergin.Bottom);xText+=textWidth+this.SortConfig.Margin.Left;this.Canvas.font=this.SortFont;if(sortBGText&&sortBGColor){this.Canvas.fillStyle=sortBGColor;this.Canvas.fillText(sortBGText,xText,yBottom-this.SortConfig.Margin.Bottom);}if(sortType>0){this.Canvas.fillStyle=this.SortConfig.Color[sortType];this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);}this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;if(textSize){textSize.Right=x+textWidth+sortTextWidth;textSize.Width=textWidth+sortTextWidth;}};this.DrawBorder=function(){if(!this.IsDrawBorder)return;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=this.RectClient.Bottom;this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(top+this.HeaderHeight));this.Canvas.lineTo(right,ToFixedPoint(top+this.HeaderHeight));var rowTop=top+this.HeaderHeight+this.RowHeight;var rotBottom=rowTop;for(var i=0;i<this.FixedRowCount;++i){var drawTop=ToFixedPoint(rowTop);this.Canvas.moveTo(left,drawTop);this.Canvas.lineTo(right,drawTop);rotBottom=rowTop;rowTop+=this.FixedRowHeight;}var rowTop=top+this.HeaderHeight+this.RowHeight+this.FixedRowHeight*this.FixedRowCount;var rotBottom=rowTop;//横线
12966
12969
  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;}//竖线
12967
12970
  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();};//获取一共多少行
12968
12971
  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;//固定行
@@ -12984,8 +12987,8 @@ if(drawInfo.Tooltip){//Type:1=数据截断
12984
12987
  var tooltipData={Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowType,Type:drawInfo.Tooltip.Type,Data:drawInfo.Tooltip.Data};this.TooltipRect.push(tooltipData);}if(drawInfo.Botton){var buttonData={Stock:stock,Index:index,ColumnIndex:columnIndex,Column:column,Rect:drawInfo.Botton.Rect,Type:drawInfo.Botton.Type,Data:drawInfo.Data};this.ButtonRect.push(buttonData);}};this.IsReserveProgressBarColumn=function(value){var ARARY_TYPE=[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID];return ARARY_TYPE.includes(value);};this.DrawCustomText=function(drawInfo,column,left,top,cellWidth){if(!drawInfo.Text)return;var text=drawInfo.Text;var x=left;if(drawInfo.TextAlign=='center'){x=left+cellWidth/2;this.Canvas.textAlign="center";}else if(drawInfo.TextAlign=='right'){x=left+cellWidth-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textWidth=this.Canvas.measureText(text).width+1;var bClip=false;if(textWidth>=cellWidth)//长度超过单元格 裁剪
12985
12988
  {if(column.FormatType==2){var count=text.length+5;text="";for(var i=0;i<count;++i){text+="#";}}else if(column.FormatType==1){text=this.TextEllipsis(text,cellWidth,column.MaxText);}this.Canvas.save();bClip=true;var rtCell={Left:left,Top:top+this.ItemMergin.Top,Width:cellWidth,Height:this.RowHeight};this.Canvas.beginPath();this.Canvas.rect(rtCell.Left,rtCell.Top,rtCell.Width,rtCell.Height);//this.Canvas.stroke(); //调试用
12986
12989
  this.Canvas.clip();//数据截断提示信息
12987
- drawInfo.Tooltip={Type:1,Data:{AryText:[{Text:drawInfo.Text}]}};}this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=drawInfo.TextColor;this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);if(bClip)this.Canvas.restore();};this.DrawSymbolName=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=data.Symbol;var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textColor=this.GetNameColor(column,symbol,rowType);var text=name;if(text){this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=textColor;this.Canvas.font=this.ItemNameFont;text=this.TextEllipsis(text,width,column.MaxText);if(text)this.Canvas.fillText(text,x,y);}text=symbol;if(text){this.Canvas.textBaseline="bottom";this.Canvas.font=this.ItemSymbolFont;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y+this.ItemSymbolHeight);}this.Canvas.font=this.ItemFont;//还原字体
12988
- };this.DrawSymbolNameV2=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=data.Symbol;var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}this.Canvas.textBaseline="bottom";var textColor=column.TextColor;var text=name;if(text){this.Canvas.fillStyle=textColor;this.Canvas.font=this.NameSymbolFont.Name;text=this.TextEllipsis(text,width,column.MaxText);if(text){this.Canvas.fillText(text,x,y);var textWidth=this.Canvas.measureText(text).width;var space=2;if(IFrameSplitOperator.IsNumber(column.Space))space=column.Space;x+=textWidth+space;}}var textColor=column.TextColor2;text=symbol;if(text){this.Canvas.font=this.NameSymbolFont.Symbol;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y);}this.Canvas.font=this.ItemFont;//还原字体
12990
+ drawInfo.Tooltip={Type:1,Data:{AryText:[{Text:drawInfo.Text}]}};}this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=drawInfo.TextColor;this.Canvas.fillText(text,x,top+this.RowHeight-this.ItemMergin.Bottom);if(bClip)this.Canvas.restore();};this.DrawSymbolName=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textColor=this.GetNameColor(column,symbol,rowType);var text=name;if(text){this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=textColor;this.Canvas.font=this.ItemNameFont;text=this.TextEllipsis(text,width,column.MaxText);if(text)this.Canvas.fillText(text,x,y);}text=symbol;if(text){this.Canvas.textBaseline="bottom";this.Canvas.font=this.ItemSymbolFont;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y+this.ItemSymbolHeight);}this.Canvas.font=this.ItemFont;//还原字体
12991
+ };this.DrawSymbolNameV2=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}this.Canvas.textBaseline="bottom";var textColor=column.TextColor;var text=name;if(text){this.Canvas.fillStyle=textColor;this.Canvas.font=this.NameSymbolFont.Name;text=this.TextEllipsis(text,width,column.MaxText);if(text){this.Canvas.fillText(text,x,y);var textWidth=this.Canvas.measureText(text).width;var space=2;if(IFrameSplitOperator.IsNumber(column.Space))space=column.Space;x+=textWidth+space;}}var textColor=column.TextColor2;text=symbol;if(text){this.Canvas.font=this.NameSymbolFont.Symbol;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y);}this.Canvas.font=this.ItemFont;//还原字体
12989
12992
  };this.DrawLimitPriceBorder=function(value,stock,left,top,itemWidth){if(!IFrameSplitOperator.IsNumber(value)||!stock)return;var bDraw=false;if(IFrameSplitOperator.IsNumber(stock.LimitHigh)){if(value>=stock.LimitHigh)bDraw=true;}if(IFrameSplitOperator.IsNumber(stock.LimitLow)){if(value<=stock.LimitLow)bDraw=true;}if(!bDraw)return;var x=left+this.ItemMergin.Left+this.LimitMergin.Left;var width=itemWidth-this.ItemMergin.Left-this.ItemMergin.Right-this.LimitMergin.Left-this.LimitMergin.Right;var y=top+this.ItemMergin.Top+this.LimitMergin.Top;var height=this.RowHeight-this.ItemMergin.Top-this.ItemMergin.Bottom-this.LimitMergin.Top-this.LimitMergin.Bottom;this.Canvas.strokeStyle=this.LimitBorderColor;this.Canvas.strokeRect(ToFixedPoint(x),ToFixedPoint(y),ToFixedRect(width),ToFixedRect(height));};this.GetExtendData=function(data,column){if(IFrameSplitOperator.IsNumber(column.DataIndex)){if(!data.Stock||!data.Stock.ExtendData)return null;if(column.DataIndex<0)return;return data.Stock.ExtendData[column.DataIndex];}if(IFrameSplitOperator.IsNumber(column.BlockIndex)){if(!data.Block)return;if(column.BlockIndex<0)return;return data.Block[column.BlockIndex];}return null;};this.GetCustomStringDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(column.IsDrawCallback)//外部处理输出格式
12990
12993
  {this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(!IFrameSplitOperator.IsString(value))return;drawInfo.Text=value;};this.GetCustomNumberDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(column.IsDrawCallback)//外部处理输出格式
12991
12994
  {this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(!IFrameSplitOperator.IsNumber(value))return;//格式化输出
@@ -14059,7 +14062,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
14059
14062
  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);};}/********************************************************************************
14060
14063
  * 版本信息输出
14061
14064
  *
14062
- */var HQCHART_VERSION="1.1.14092";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();//把给外界调用的方法暴露出来
14065
+ */var HQCHART_VERSION="1.1.14096";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();//把给外界调用的方法暴露出来
14063
14066
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
14064
14067
  // BaseIndex:BaseIndex,
14065
14068
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14093",
3
+ "version": "1.1.14097",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -8815,6 +8815,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8815
8815
  if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
8816
8816
  if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
8817
8817
  if (!IFrameSplitOperator.IsUndefined(windowItem.HorizontalReserved)) frame.HorizontalReserved=windowItem.HorizontalReserved; //Y轴上下预留
8818
+ if (IFrameSplitOperator.IsBool(windowItem.IsShowNameArrow)) frame.IsShowNameArrow=windowItem.IsShowNameArrow;
8818
8819
  }
8819
8820
 
8820
8821
  if (frameItem)
@@ -48411,6 +48412,17 @@ IFrameSplitOperator.RemoveZero=function(strValue)
48411
48412
  return strValue;
48412
48413
  }
48413
48414
 
48415
+ //移除代码市场后缀
48416
+ IFrameSplitOperator.RemoveMarketSuffix=function(symbol)
48417
+ {
48418
+ if (!symbol) return symbol;
48419
+
48420
+ var pos=symbol.lastIndexOf(".");
48421
+ if (pos>0) return symbol.substring(0,pos);
48422
+
48423
+ return symbol;
48424
+ }
48425
+
48414
48426
  function FrameSplitKLinePriceY()
48415
48427
  {
48416
48428
  this.newMethod=IFrameSplitOperator; //派生
@@ -69819,7 +69831,7 @@ function JSChartResource()
69819
69831
  SortIcon:
69820
69832
  {
69821
69833
  Size:12, Family:"iconfont",
69822
- Arrow:[null, "\ue6b2", "\ue6b1"],
69834
+ Arrow:[null, "\ue6b2", "\ue6b1"], //[0]=默认排序的图标背景色
69823
69835
  Color:[null, "rgb(255,0,0)", "rgb(255,0,0)"],
69824
69836
  Margin:{ Left:0, Bottom:6 }
69825
69837
  },
@@ -5092,6 +5092,7 @@ function ChartReport()
5092
5092
  var top=this.RectClient.Top;
5093
5093
  var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
5094
5094
  var yBottom=top+this.HeaderHeight;
5095
+ var bDrawSortBG=this.IsDrawSortBGIcon();
5095
5096
 
5096
5097
  this.Canvas.font=this.HeaderFont;
5097
5098
 
@@ -5133,6 +5134,10 @@ function ChartReport()
5133
5134
  {
5134
5135
  this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort, textSize);
5135
5136
  }
5137
+ else if (item.Sort>0 && bDrawSortBG)
5138
+ {
5139
+ this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0,textSize);
5140
+ }
5136
5141
  else
5137
5142
  {
5138
5143
  this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);
@@ -5186,6 +5191,10 @@ function ChartReport()
5186
5191
  {
5187
5192
  this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort,textSize);
5188
5193
  }
5194
+ else if (item.Sort>0)
5195
+ {
5196
+ this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0, textSize);
5197
+ }
5189
5198
  else
5190
5199
  {
5191
5200
  this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);
@@ -5248,10 +5257,24 @@ function ChartReport()
5248
5257
  }
5249
5258
  }
5250
5259
 
5260
+ //是否绘制排序背景图标
5261
+ this.IsDrawSortBGIcon=function()
5262
+ {
5263
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Arrow)) return false;
5264
+ if (!this.SortConfig.Arrow[0]) return false;
5265
+
5266
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Color)) return false;
5267
+ if (!this.SortConfig.Color[0]) return false;
5268
+
5269
+ return true;
5270
+ }
5271
+
5251
5272
  this.DrawSortHeader=function(text, textAlign, x, yBottom, width, sortType,textSize)
5252
5273
  {
5253
5274
  var pixelRatio=GetDevicePixelRatio();
5254
5275
  var sortText=this.SortConfig.Arrow[sortType];
5276
+ var sortBGText=this.SortConfig.Arrow[0];
5277
+ var sortBGColor=this.SortConfig.Color[0];
5255
5278
  this.Canvas.font=this.HeaderFont;
5256
5279
  var textWidth=this.Canvas.measureText(text).width;
5257
5280
  var sortTextWidth=this.SortConfig.Size*pixelRatio+this.SortConfig.Margin.Left;
@@ -5275,8 +5298,17 @@ function ChartReport()
5275
5298
 
5276
5299
  xText+=(textWidth+this.SortConfig.Margin.Left);
5277
5300
  this.Canvas.font=this.SortFont;
5278
- this.Canvas.fillStyle=this.SortConfig.Color[sortType];
5279
- this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
5301
+ if (sortBGText && sortBGColor)
5302
+ {
5303
+ this.Canvas.fillStyle=sortBGColor;
5304
+ this.Canvas.fillText(sortBGText,xText,yBottom-this.SortConfig.Margin.Bottom);
5305
+ }
5306
+
5307
+ if (sortType>0)
5308
+ {
5309
+ this.Canvas.fillStyle=this.SortConfig.Color[sortType];
5310
+ this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
5311
+ }
5280
5312
 
5281
5313
  this.Canvas.font=this.HeaderFont;
5282
5314
  this.Canvas.fillStyle=this.HeaderColor;
@@ -5288,7 +5320,6 @@ function ChartReport()
5288
5320
  }
5289
5321
  }
5290
5322
 
5291
-
5292
5323
  this.DrawBorder=function()
5293
5324
  {
5294
5325
  if (!this.IsDrawBorder) return;
@@ -6067,7 +6098,7 @@ function ChartReport()
6067
6098
  this.DrawSymbolName=function(data, column, left, top, rowType)
6068
6099
  {
6069
6100
  var stock=data.Stock;
6070
- var symbol=data.Symbol;
6101
+ var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);
6071
6102
  var name;
6072
6103
  if (stock)
6073
6104
  {
@@ -6124,7 +6155,7 @@ function ChartReport()
6124
6155
  this.DrawSymbolNameV2=function(data, column, left, top, rowType)
6125
6156
  {
6126
6157
  var stock=data.Stock;
6127
- var symbol=data.Symbol;
6158
+ var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);
6128
6159
  var name;
6129
6160
  if (stock)
6130
6161
  {
@@ -1221,6 +1221,7 @@ input[type="color"] {
1221
1221
  font-family: "微软雅黑";
1222
1222
  cursor: default;
1223
1223
  padding: 2px;
1224
+ z-index: 99;
1224
1225
 
1225
1226
  }
1226
1227
 
@@ -1356,6 +1357,7 @@ input[type="color"] {
1356
1357
  background-color: rgba(250,250,250,1);
1357
1358
  left:1px;
1358
1359
  top:1px;
1360
+ z-index: 99;
1359
1361
  }
1360
1362
 
1361
1363
  .UMyChart_DrawTool_Title_Div
@@ -1462,6 +1464,7 @@ input[type="color"] {
1462
1464
  left:1px;
1463
1465
  top:1px;
1464
1466
  display: flex;
1467
+ z-index: 99;
1465
1468
  }
1466
1469
 
1467
1470
  .UMyChart_Draw_Modify_Dialog_Drag_Div
@@ -1510,6 +1513,7 @@ input[type="color"] {
1510
1513
  border: solid 1px rgba(200, 210, 219, 0.92);
1511
1514
  display: flex;
1512
1515
  flex-flow: column;
1516
+ z-index: 99;
1513
1517
  }
1514
1518
 
1515
1519
  .jschart_pop_minute_chart
@@ -1563,6 +1567,7 @@ input[type="color"] {
1563
1567
  border: solid 1px rgb(0, 0, 0);
1564
1568
  display: flex;
1565
1569
  flex-flow: column;
1570
+ z-index: 99;
1566
1571
  }
1567
1572
 
1568
1573
  .jschart_keyboard_Title_Div
@@ -1634,6 +1639,7 @@ input[type="color"] {
1634
1639
  background-color: rgba(20,20,20,1);
1635
1640
  left:1px;
1636
1641
  top:1px;
1642
+ z-index: 99;
1637
1643
 
1638
1644
  }
1639
1645
 
@@ -1728,6 +1734,7 @@ input[type="color"] {
1728
1734
  background-color: rgba(230,230,230,1);
1729
1735
  left:1px;
1730
1736
  top:1px;
1737
+ z-index: 99;
1731
1738
  }
1732
1739
 
1733
1740
  .UMyChart_SelectRect_Title_Div
@@ -1868,6 +1875,7 @@ input[type="color"] {
1868
1875
  left:1px;
1869
1876
  top:1px;
1870
1877
  pointer-events:none;
1878
+ z-index: 98;
1871
1879
  }
1872
1880
 
1873
1881
 
@@ -1947,6 +1955,7 @@ input[type="color"] {
1947
1955
  background-color: rgba(20,20,20,1);
1948
1956
  left:1px;
1949
1957
  top:1px;
1958
+ z-index: 99;
1950
1959
  }
1951
1960
 
1952
1961
  .UMyChart_SearchIndex_Title_Div
@@ -2069,6 +2078,7 @@ input[type="color"] {
2069
2078
  background-color: rgba(20,20,20,1);
2070
2079
  left:1px;
2071
2080
  top:1px;
2081
+ z-index: 99;
2072
2082
  }
2073
2083
 
2074
2084
  .UMyChart_ModifyIndexParam_Title_Div
@@ -12740,6 +12740,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12740
12740
  if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
12741
12741
  if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
12742
12742
  if (!IFrameSplitOperator.IsUndefined(windowItem.HorizontalReserved)) frame.HorizontalReserved=windowItem.HorizontalReserved; //Y轴上下预留
12743
+ if (IFrameSplitOperator.IsBool(windowItem.IsShowNameArrow)) frame.IsShowNameArrow=windowItem.IsShowNameArrow;
12743
12744
  }
12744
12745
 
12745
12746
  if (frameItem)
@@ -52336,6 +52337,17 @@ IFrameSplitOperator.RemoveZero=function(strValue)
52336
52337
  return strValue;
52337
52338
  }
52338
52339
 
52340
+ //移除代码市场后缀
52341
+ IFrameSplitOperator.RemoveMarketSuffix=function(symbol)
52342
+ {
52343
+ if (!symbol) return symbol;
52344
+
52345
+ var pos=symbol.lastIndexOf(".");
52346
+ if (pos>0) return symbol.substring(0,pos);
52347
+
52348
+ return symbol;
52349
+ }
52350
+
52339
52351
  function FrameSplitKLinePriceY()
52340
52352
  {
52341
52353
  this.newMethod=IFrameSplitOperator; //派生
@@ -73744,7 +73756,7 @@ function JSChartResource()
73744
73756
  SortIcon:
73745
73757
  {
73746
73758
  Size:12, Family:"iconfont",
73747
- Arrow:[null, "\ue6b2", "\ue6b1"],
73759
+ Arrow:[null, "\ue6b2", "\ue6b1"], //[0]=默认排序的图标背景色
73748
73760
  Color:[null, "rgb(255,0,0)", "rgb(255,0,0)"],
73749
73761
  Margin:{ Left:0, Bottom:6 }
73750
73762
  },
@@ -132017,6 +132029,7 @@ function ChartReport()
132017
132029
  var top=this.RectClient.Top;
132018
132030
  var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
132019
132031
  var yBottom=top+this.HeaderHeight;
132032
+ var bDrawSortBG=this.IsDrawSortBGIcon();
132020
132033
 
132021
132034
  this.Canvas.font=this.HeaderFont;
132022
132035
 
@@ -132058,6 +132071,10 @@ function ChartReport()
132058
132071
  {
132059
132072
  this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort, textSize);
132060
132073
  }
132074
+ else if (item.Sort>0 && bDrawSortBG)
132075
+ {
132076
+ this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0,textSize);
132077
+ }
132061
132078
  else
132062
132079
  {
132063
132080
  this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);
@@ -132111,6 +132128,10 @@ function ChartReport()
132111
132128
  {
132112
132129
  this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort,textSize);
132113
132130
  }
132131
+ else if (item.Sort>0)
132132
+ {
132133
+ this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0, textSize);
132134
+ }
132114
132135
  else
132115
132136
  {
132116
132137
  this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);
@@ -132173,10 +132194,24 @@ function ChartReport()
132173
132194
  }
132174
132195
  }
132175
132196
 
132197
+ //是否绘制排序背景图标
132198
+ this.IsDrawSortBGIcon=function()
132199
+ {
132200
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Arrow)) return false;
132201
+ if (!this.SortConfig.Arrow[0]) return false;
132202
+
132203
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Color)) return false;
132204
+ if (!this.SortConfig.Color[0]) return false;
132205
+
132206
+ return true;
132207
+ }
132208
+
132176
132209
  this.DrawSortHeader=function(text, textAlign, x, yBottom, width, sortType,textSize)
132177
132210
  {
132178
132211
  var pixelRatio=GetDevicePixelRatio();
132179
132212
  var sortText=this.SortConfig.Arrow[sortType];
132213
+ var sortBGText=this.SortConfig.Arrow[0];
132214
+ var sortBGColor=this.SortConfig.Color[0];
132180
132215
  this.Canvas.font=this.HeaderFont;
132181
132216
  var textWidth=this.Canvas.measureText(text).width;
132182
132217
  var sortTextWidth=this.SortConfig.Size*pixelRatio+this.SortConfig.Margin.Left;
@@ -132200,8 +132235,17 @@ function ChartReport()
132200
132235
 
132201
132236
  xText+=(textWidth+this.SortConfig.Margin.Left);
132202
132237
  this.Canvas.font=this.SortFont;
132203
- this.Canvas.fillStyle=this.SortConfig.Color[sortType];
132204
- this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
132238
+ if (sortBGText && sortBGColor)
132239
+ {
132240
+ this.Canvas.fillStyle=sortBGColor;
132241
+ this.Canvas.fillText(sortBGText,xText,yBottom-this.SortConfig.Margin.Bottom);
132242
+ }
132243
+
132244
+ if (sortType>0)
132245
+ {
132246
+ this.Canvas.fillStyle=this.SortConfig.Color[sortType];
132247
+ this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
132248
+ }
132205
132249
 
132206
132250
  this.Canvas.font=this.HeaderFont;
132207
132251
  this.Canvas.fillStyle=this.HeaderColor;
@@ -132213,7 +132257,6 @@ function ChartReport()
132213
132257
  }
132214
132258
  }
132215
132259
 
132216
-
132217
132260
  this.DrawBorder=function()
132218
132261
  {
132219
132262
  if (!this.IsDrawBorder) return;
@@ -132992,7 +133035,7 @@ function ChartReport()
132992
133035
  this.DrawSymbolName=function(data, column, left, top, rowType)
132993
133036
  {
132994
133037
  var stock=data.Stock;
132995
- var symbol=data.Symbol;
133038
+ var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);
132996
133039
  var name;
132997
133040
  if (stock)
132998
133041
  {
@@ -133049,7 +133092,7 @@ function ChartReport()
133049
133092
  this.DrawSymbolNameV2=function(data, column, left, top, rowType)
133050
133093
  {
133051
133094
  var stock=data.Stock;
133052
- var symbol=data.Symbol;
133095
+ var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);
133053
133096
  var name;
133054
133097
  if (stock)
133055
133098
  {
@@ -139126,7 +139169,7 @@ function ScrollBarBGChart()
139126
139169
 
139127
139170
 
139128
139171
 
139129
- var HQCHART_VERSION="1.1.14092";
139172
+ var HQCHART_VERSION="1.1.14096";
139130
139173
 
139131
139174
  function PrintHQChartVersion()
139132
139175
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14092";
8
+ var HQCHART_VERSION="1.1.14096";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -12784,6 +12784,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
12784
12784
  if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
12785
12785
  if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
12786
12786
  if (!IFrameSplitOperator.IsUndefined(windowItem.HorizontalReserved)) frame.HorizontalReserved=windowItem.HorizontalReserved; //Y轴上下预留
12787
+ if (IFrameSplitOperator.IsBool(windowItem.IsShowNameArrow)) frame.IsShowNameArrow=windowItem.IsShowNameArrow;
12787
12788
  }
12788
12789
 
12789
12790
  if (frameItem)
@@ -52380,6 +52381,17 @@ IFrameSplitOperator.RemoveZero=function(strValue)
52380
52381
  return strValue;
52381
52382
  }
52382
52383
 
52384
+ //移除代码市场后缀
52385
+ IFrameSplitOperator.RemoveMarketSuffix=function(symbol)
52386
+ {
52387
+ if (!symbol) return symbol;
52388
+
52389
+ var pos=symbol.lastIndexOf(".");
52390
+ if (pos>0) return symbol.substring(0,pos);
52391
+
52392
+ return symbol;
52393
+ }
52394
+
52383
52395
  function FrameSplitKLinePriceY()
52384
52396
  {
52385
52397
  this.newMethod=IFrameSplitOperator; //派生
@@ -73788,7 +73800,7 @@ function JSChartResource()
73788
73800
  SortIcon:
73789
73801
  {
73790
73802
  Size:12, Family:"iconfont",
73791
- Arrow:[null, "\ue6b2", "\ue6b1"],
73803
+ Arrow:[null, "\ue6b2", "\ue6b1"], //[0]=默认排序的图标背景色
73792
73804
  Color:[null, "rgb(255,0,0)", "rgb(255,0,0)"],
73793
73805
  Margin:{ Left:0, Bottom:6 }
73794
73806
  },
@@ -132061,6 +132073,7 @@ function ChartReport()
132061
132073
  var top=this.RectClient.Top;
132062
132074
  var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
132063
132075
  var yBottom=top+this.HeaderHeight;
132076
+ var bDrawSortBG=this.IsDrawSortBGIcon();
132064
132077
 
132065
132078
  this.Canvas.font=this.HeaderFont;
132066
132079
 
@@ -132102,6 +132115,10 @@ function ChartReport()
132102
132115
  {
132103
132116
  this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort, textSize);
132104
132117
  }
132118
+ else if (item.Sort>0 && bDrawSortBG)
132119
+ {
132120
+ this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0,textSize);
132121
+ }
132105
132122
  else
132106
132123
  {
132107
132124
  this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);
@@ -132155,6 +132172,10 @@ function ChartReport()
132155
132172
  {
132156
132173
  this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,this.SortInfo.Sort,textSize);
132157
132174
  }
132175
+ else if (item.Sort>0)
132176
+ {
132177
+ this.DrawSortHeader(item.Title,item.TextAlign,x,yBottom,textWidth,0, textSize);
132178
+ }
132158
132179
  else
132159
132180
  {
132160
132181
  this.DrawText(item.Title,item.TextAlign,x,yBottom,textWidth,textSize);
@@ -132217,10 +132238,24 @@ function ChartReport()
132217
132238
  }
132218
132239
  }
132219
132240
 
132241
+ //是否绘制排序背景图标
132242
+ this.IsDrawSortBGIcon=function()
132243
+ {
132244
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Arrow)) return false;
132245
+ if (!this.SortConfig.Arrow[0]) return false;
132246
+
132247
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.SortConfig.Color)) return false;
132248
+ if (!this.SortConfig.Color[0]) return false;
132249
+
132250
+ return true;
132251
+ }
132252
+
132220
132253
  this.DrawSortHeader=function(text, textAlign, x, yBottom, width, sortType,textSize)
132221
132254
  {
132222
132255
  var pixelRatio=GetDevicePixelRatio();
132223
132256
  var sortText=this.SortConfig.Arrow[sortType];
132257
+ var sortBGText=this.SortConfig.Arrow[0];
132258
+ var sortBGColor=this.SortConfig.Color[0];
132224
132259
  this.Canvas.font=this.HeaderFont;
132225
132260
  var textWidth=this.Canvas.measureText(text).width;
132226
132261
  var sortTextWidth=this.SortConfig.Size*pixelRatio+this.SortConfig.Margin.Left;
@@ -132244,8 +132279,17 @@ function ChartReport()
132244
132279
 
132245
132280
  xText+=(textWidth+this.SortConfig.Margin.Left);
132246
132281
  this.Canvas.font=this.SortFont;
132247
- this.Canvas.fillStyle=this.SortConfig.Color[sortType];
132248
- this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
132282
+ if (sortBGText && sortBGColor)
132283
+ {
132284
+ this.Canvas.fillStyle=sortBGColor;
132285
+ this.Canvas.fillText(sortBGText,xText,yBottom-this.SortConfig.Margin.Bottom);
132286
+ }
132287
+
132288
+ if (sortType>0)
132289
+ {
132290
+ this.Canvas.fillStyle=this.SortConfig.Color[sortType];
132291
+ this.Canvas.fillText(sortText,xText,yBottom-this.SortConfig.Margin.Bottom);
132292
+ }
132249
132293
 
132250
132294
  this.Canvas.font=this.HeaderFont;
132251
132295
  this.Canvas.fillStyle=this.HeaderColor;
@@ -132257,7 +132301,6 @@ function ChartReport()
132257
132301
  }
132258
132302
  }
132259
132303
 
132260
-
132261
132304
  this.DrawBorder=function()
132262
132305
  {
132263
132306
  if (!this.IsDrawBorder) return;
@@ -133036,7 +133079,7 @@ function ChartReport()
133036
133079
  this.DrawSymbolName=function(data, column, left, top, rowType)
133037
133080
  {
133038
133081
  var stock=data.Stock;
133039
- var symbol=data.Symbol;
133082
+ var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);
133040
133083
  var name;
133041
133084
  if (stock)
133042
133085
  {
@@ -133093,7 +133136,7 @@ function ChartReport()
133093
133136
  this.DrawSymbolNameV2=function(data, column, left, top, rowType)
133094
133137
  {
133095
133138
  var stock=data.Stock;
133096
- var symbol=data.Symbol;
133139
+ var symbol=IFrameSplitOperator.RemoveMarketSuffix(data.Symbol);
133097
133140
  var name;
133098
133141
  if (stock)
133099
133142
  {
@@ -148114,7 +148157,7 @@ function HQChartScriptWorker()
148114
148157
 
148115
148158
 
148116
148159
 
148117
- var HQCHART_VERSION="1.1.14092";
148160
+ var HQCHART_VERSION="1.1.14096";
148118
148161
 
148119
148162
  function PrintHQChartVersion()
148120
148163
  {