hqchart 1.1.13123 → 1.1.13127

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.
@@ -7104,7 +7104,7 @@ case 11://2小时
7104
7104
  case 12://4小时
7105
7105
  if(this.SourceData.DataType!=1)isDataTypeChange=true;break;case 10://分笔线
7106
7106
  if(this.SourceData.DataType!=2)isDataTypeChange=true;break;}}}this.Period=period;if(right!=null)this.Right=right;this.ReloadChartDrawPicture();//切换周期了 清空画图工具
7107
- this.ClearRectSelect(true);this.Frame.ClearUpDonwFrameYData();this.ClearCustomKLine();var kLineDrawType=this.GetKLineDrawType();if(kLineDrawType==10||kLineDrawType==11||kLineDrawType==12||kLineDrawType==16)isDataTypeChange=true;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CHANGE_KLINE_PERIOD);if(event&&event.Callback){var sendData={IsApiPeriod:this.IsApiPeriod,Old:oldData,Now:{Period:this.Period,Right:this.Right,KLineDrawType:this.KLineDrawType},IsDataTypeChange:isDataTypeChange//数据类型是否改变 true 重新请求数据
7107
+ this.ClearRectSelect(true);this.Frame.ClearUpDonwFrameYData();this.ClearCustomKLine();this.ClearKLineCaluate();var kLineDrawType=this.GetKLineDrawType();if(kLineDrawType==10||kLineDrawType==11||kLineDrawType==12||kLineDrawType==16)isDataTypeChange=true;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CHANGE_KLINE_PERIOD);if(event&&event.Callback){var sendData={IsApiPeriod:this.IsApiPeriod,Old:oldData,Now:{Period:this.Period,Right:this.Right,KLineDrawType:this.KLineDrawType},IsDataTypeChange:isDataTypeChange//数据类型是否改变 true 重新请求数据
7108
7108
  };event.Callback(event,sendData,this);isDataTypeChange=sendData.IsDataTypeChange;}if(isDataTypeChange==false&&!this.IsApiPeriod){this.ClearIndexRunCount();this.Update({UpdateCursorIndexType:2});//更新的时候 取消显示十字光标
7109
7109
  return;}this.ClearIndexPaint();if(ChartData.IsDayPeriod(this.Period,true)){this.CancelAutoUpdate();//先停止定时器
7110
7110
  this.AutoUpdateEvent(false,'KLineChartContainer::ChangePeriod');//切换周期先停止更新
@@ -12386,7 +12386,9 @@ this.SelectedColor=g_JSChartResource.Report.SelectedColor;//选中行
12386
12386
  //表头配置
12387
12387
  this.HeaderFontConfig={Size:g_JSChartResource.Report.Header.Font.Size,Name:g_JSChartResource.Report.Header.Font.Name};this.HeaderColor=g_JSChartResource.Report.Header.Color;this.SortColor=g_JSChartResource.Report.Header.SortColor;//排序箭头颜色
12388
12388
  this.HeaderMergin={Left:g_JSChartResource.Report.Header.Mergin.Left,Right:g_JSChartResource.Report.Header.Mergin.Right,Top:g_JSChartResource.Report.Header.Mergin.Top,Bottom:g_JSChartResource.Report.Header.Mergin.Bottom};//表格内容配置
12389
- this.ItemFontConfig={Size:g_JSChartResource.Report.Item.Font.Size,Name:g_JSChartResource.Report.Item.Font.Name};this.ItemMergin={Left:g_JSChartResource.Report.Item.Mergin.Left,Right:g_JSChartResource.Report.Item.Mergin.Right,Top:g_JSChartResource.Report.Item.Mergin.Top,Bottom:g_JSChartResource.Report.Item.Mergin.Bottom};this.BarMergin={Top:g_JSChartResource.Report.Item.BarMergin.Top,Left:g_JSChartResource.Report.Item.BarMergin.Left,Right:g_JSChartResource.Report.Item.BarMergin.Right,Bottom:g_JSChartResource.Report.Item.BarMergin.Bottom};this.LimitBorderColor=g_JSChartResource.Report.LimitBorder.Color;this.LimitMergin={Top:g_JSChartResource.Report.LimitBorder.Mergin.Top,Left:g_JSChartResource.Report.LimitBorder.Mergin.Left,Right:g_JSChartResource.Report.LimitBorder.Mergin.Right,Bottom:g_JSChartResource.Report.LimitBorder.Mergin.Bottom};for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.INDEX_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Index;else if(item.Type==REPORT_COLUMN_ID.SYMBOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Symbol;else if(item.Type==REPORT_COLUMN_ID.NAME_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Name;else if(item.Type==REPORT_COLUMN_ID.VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.BUY_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.SELL_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.AMOUNT_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Amount;else if(item.Type==REPORT_COLUMN_ID.VOL_IN_ID)item.TextColor=g_JSChartResource.Report.DownTextColor;else if(item.Type==REPORT_COLUMN_ID.VOL_OUT_ID)item.TextColor=g_JSChartResource.Report.UpTextColor;else item.TextColor=g_JSChartResource.Report.FieldColor.Text;}if(this.Tab)this.Tab.ReloadResource(resource);if(this.VScrollbar)this.VScrollbar.ReloadResource(resource);};this.SetColumn=function(aryColumn){if(!IFrameSplitOperator.IsNonEmptyArray(aryColumn))return;this.Column=[];for(var i=0;i<aryColumn.length;++i){var item=aryColumn[i];var colItem=this.GetDefaultColunm(item.Type);if(!colItem)continue;if(item.Title)colItem.Title=item.Title;if(item.TextAlign)colItem.TextAlign=item.TextAlign;if(item.TextColor)colItem.TextColor=item.TextColor;if(item.HeaderColor)colItem.HeaderColor=item.HeaderColor;if(item.MaxText)colItem.MaxText=item.MaxText;if(item.ID)colItem.ID=item.ID;if(IFrameSplitOperator.IsNumber(item.Sort))colItem.Sort=item.Sort;if(IFrameSplitOperator.IsBool(item.EnableTooltip))colItem.EnableTooltip=item.EnableTooltip;if(IFrameSplitOperator.IsNumber(item.FixedWidth))colItem.FixedWidth=item.FixedWidth;if(IFrameSplitOperator.IsBool(item.EnableDragWidth))colItem.EnableDragWidth=item.EnableDragWidth;if(IFrameSplitOperator.IsBool(item.IsDrawCallback))colItem.IsDrawCallback=item.IsDrawCallback;else colItem.IsDrawCallback=false;if(item.Sort==1||item.Sort==2)//1本地排序 2=远程排序
12389
+ this.ItemFontConfig={Size:g_JSChartResource.Report.Item.Font.Size,Name:g_JSChartResource.Report.Item.Font.Name};this.ItemMergin={Left:g_JSChartResource.Report.Item.Mergin.Left,Right:g_JSChartResource.Report.Item.Mergin.Right,Top:g_JSChartResource.Report.Item.Mergin.Top,Bottom:g_JSChartResource.Report.Item.Mergin.Bottom};this.BarMergin={Top:g_JSChartResource.Report.Item.BarMergin.Top,Left:g_JSChartResource.Report.Item.BarMergin.Left,Right:g_JSChartResource.Report.Item.BarMergin.Right,Bottom:g_JSChartResource.Report.Item.BarMergin.Bottom};this.LimitBorderColor=g_JSChartResource.Report.LimitBorder.Color;this.LimitMergin={Top:g_JSChartResource.Report.LimitBorder.Mergin.Top,Left:g_JSChartResource.Report.LimitBorder.Mergin.Left,Right:g_JSChartResource.Report.LimitBorder.Mergin.Right,Bottom:g_JSChartResource.Report.LimitBorder.Mergin.Bottom};for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.INDEX_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Index;else if(item.Type==REPORT_COLUMN_ID.SYMBOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Symbol;else if(item.Type==REPORT_COLUMN_ID.NAME_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Name;else if(item.Type==REPORT_COLUMN_ID.VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.BUY_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.SELL_VOL_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Vol;else if(item.Type==REPORT_COLUMN_ID.AMOUNT_ID)item.TextColor=g_JSChartResource.Report.FieldColor.Amount;else if(item.Type==REPORT_COLUMN_ID.VOL_IN_ID)item.TextColor=g_JSChartResource.Report.DownTextColor;else if(item.Type==REPORT_COLUMN_ID.VOL_OUT_ID)item.TextColor=g_JSChartResource.Report.UpTextColor;else item.TextColor=g_JSChartResource.Report.FieldColor.Text;}if(this.Tab)this.Tab.ReloadResource(resource);if(this.VScrollbar)this.VScrollbar.ReloadResource(resource);};this.SetColumn=function(aryColumn){if(!IFrameSplitOperator.IsNonEmptyArray(aryColumn))return;this.Column=[];for(var i=0;i<aryColumn.length;++i){var item=aryColumn[i];var colItem=this.GetDefaultColunm(item.Type);if(!colItem)continue;if(item.Title)colItem.Title=item.Title;if(item.TextAlign)colItem.TextAlign=item.TextAlign;if(item.TextColor)colItem.TextColor=item.TextColor;if(item.HeaderColor)colItem.HeaderColor=item.HeaderColor;if(item.MaxText)colItem.MaxText=item.MaxText;if(item.ID)colItem.ID=item.ID;if(item.FullColBGColor)colItem.FullColBGColor=item.FullColBGColor;//整列背景色
12390
+ if(item.HeaderBGColor)colItem.HeaderBGColor=item.HeaderBGColor;//表头背景色
12391
+ if(IFrameSplitOperator.IsNumber(item.Sort))colItem.Sort=item.Sort;if(IFrameSplitOperator.IsBool(item.EnableTooltip))colItem.EnableTooltip=item.EnableTooltip;if(IFrameSplitOperator.IsNumber(item.FixedWidth))colItem.FixedWidth=item.FixedWidth;if(IFrameSplitOperator.IsBool(item.EnableDragWidth))colItem.EnableDragWidth=item.EnableDragWidth;if(IFrameSplitOperator.IsBool(item.IsDrawCallback))colItem.IsDrawCallback=item.IsDrawCallback;else colItem.IsDrawCallback=false;if(item.Sort==1||item.Sort==2)//1本地排序 2=远程排序
12390
12392
  {colItem.SortType=[1,2];//默认 降序 ,升序
12391
12393
  if(IFrameSplitOperator.IsNonEmptyArray(item.SortType))colItem.SortType=item.SortType.slice();}if(item.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
12392
12394
  if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))continue;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
@@ -12407,15 +12409,15 @@ this.Canvas.clip();this.DrawHeader();this.DrawBody();this.Canvas.restore();if(th
12407
12409
  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 是否重新计算
12408
12410
  {if(recalculate)this.CalculateSize();var size=this.RowCount;return size;};this.GetCurrentPageStatus=function()//{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
12409
12411
  {var result={Start:this.Data.YOffset,PageSize:this.RowCount,IsEnd:false,SelectedRow:this.SelectedRow,IsSinglePage:false,DataCount:0};if(IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)){result.End=this.Data.YOffset+this.RowCount-1;result.IsSinglePage=this.Data.Data.length<=this.RowCount;result.DataCount=this.Data.Data.length;if(result.End>=this.Data.Data.length-1)result.IsEnd=true;if(result.End>=this.Data.Data.length)result.End=this.Data.Data.length-1;}else{result.Start=0;result.End=0;result.IsEnd=true;result.IsSinglePage=true;}return result;};this.CalculateSize=function()//计算大小
12410
- {if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}if(this.VScrollbar&&this.VScrollbar.Enable)this.VScrollbar.CalculateSize();this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else{if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}}this.Canvas.font=this.HeaderFont;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(!item.Title||item.Title.length<=0)continue;var text=item.Title;if(item.Sort>0)text+="↓";itemWidth=this.Canvas.measureText(text).width;itemWidth+=4+this.HeaderMergin.Left+this.HeaderMergin.Right;if(item.Width<itemWidth)item.Width=itemWidth;}this.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;this.Canvas.font=this.HeaderFont;this.Canvas.fillStyle=this.HeaderColor;var textLeft=left;//固定列
12411
- 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.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,y,textWidth,this.SortInfo.Sort);}else{this.DrawText(item.Title,item.TextAlign,x,y,textWidth);}if(item.HeaderColor)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.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,y,textWidth,this.SortInfo.Sort);}else{this.DrawText(item.Title,item.TextAlign,x,y,textWidth);}if(item.HeaderColor)this.Canvas.fillStyle=this.HeaderColor;textLeft+=item.Width;}};this.DrawText=function(text,textAlign,x,y,textWidth){if(textAlign=='center'){x=x+textWidth/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=x+textWidth;this.Canvas.textAlign="right";}else{this.Canvas.textAlign="left";}this.Canvas.textBaseline="middle";this.Canvas.fillText(text,x,y);};this.DrawSortHeader=function(text,textAlign,x,y,width,sortType){var sortText=sortType==1?"↓":"↑";var sortTextWidth=this.Canvas.measureText(sortText).width;var textWidth=this.Canvas.measureText(text).width+2;this.Canvas.textBaseline="middle";this.Canvas.textAlign="left";if(textAlign=='center'){x=x+width/2-(sortTextWidth+textWidth)/2;}else if(textAlign=='right'){x=x+width-sortTextWidth-textWidth;}else{}this.Canvas.fillText(text,x,y);this.Canvas.fillStyle=this.SortColor;this.Canvas.fillText(sortText,x+textWidth,y);this.Canvas.fillStyle=this.HeaderColor;};this.DrawBorder=function(){if(!this.IsDrawBorder)return;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=this.RectClient.Bottom;this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(top+this.HeaderHeight));this.Canvas.lineTo(right,ToFixedPoint(top+this.HeaderHeight));var rowTop=top+this.HeaderHeight+this.RowHeight;var rotBottom=rowTop;for(var i=0;i<this.FixedRowCount;++i){var drawTop=ToFixedPoint(rowTop);this.Canvas.moveTo(left,drawTop);this.Canvas.lineTo(right,drawTop);rotBottom=rowTop;rowTop+=this.FixedRowHeight;}var rowTop=top+this.HeaderHeight+this.RowHeight+this.FixedRowHeight*this.FixedRowCount;var rotBottom=rowTop;//横线
12412
+ {if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}if(this.VScrollbar&&this.VScrollbar.Enable)this.VScrollbar.CalculateSize();this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.RowHeight=this.GetFontHeight(this.ItemFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else{if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}}this.Canvas.font=this.HeaderFont;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(!item.Title||item.Title.length<=0)continue;var text=item.Title;if(item.Sort>0)text+="↓";itemWidth=this.Canvas.measureText(text).width;itemWidth+=4+this.HeaderMergin.Left+this.HeaderMergin.Right;if(item.Width<itemWidth)item.Width=itemWidth;}this.HeaderHeight=this.GetFontHeight(this.HeaderFont,"擎")+this.HeaderMergin.Top+this.HeaderMergin.Bottom;if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeader=function(){if(!this.IsShowHeader)return;var left=this.RectClient.Left;var top=this.RectClient.Top;var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;this.Canvas.font=this.HeaderFont;var textLeft=left;//固定列
12413
+ 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});}if(item.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;else this.Canvas.fillStyle=this.HeaderColor;if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,y,textWidth,this.SortInfo.Sort);}else{this.DrawText(item.Title,item.TextAlign,x,y,textWidth);}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});}if(item.HeaderColor)this.Canvas.fillStyle=item.HeaderColor;else this.Canvas.fillStyle=this.HeaderColor;if(this.SortInfo&&this.SortInfo.Field==i&&this.SortInfo.Sort>0){this.DrawSortHeader(item.Title,item.TextAlign,x,y,textWidth,this.SortInfo.Sort);}else{this.DrawText(item.Title,item.TextAlign,x,y,textWidth);}textLeft+=item.Width;}};this.DrawText=function(text,textAlign,x,y,textWidth){if(textAlign=='center'){x=x+textWidth/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=x+textWidth;this.Canvas.textAlign="right";}else{this.Canvas.textAlign="left";}this.Canvas.textBaseline="middle";this.Canvas.fillText(text,x,y);};this.DrawSortHeader=function(text,textAlign,x,y,width,sortType){var sortText=sortType==1?"↓":"↑";var sortTextWidth=this.Canvas.measureText(sortText).width;var textWidth=this.Canvas.measureText(text).width+2;this.Canvas.textBaseline="middle";this.Canvas.textAlign="left";if(textAlign=='center'){x=x+width/2-(sortTextWidth+textWidth)/2;}else if(textAlign=='right'){x=x+width-sortTextWidth-textWidth;}else{}this.Canvas.fillText(text,x,y);this.Canvas.fillStyle=this.SortColor;this.Canvas.fillText(sortText,x+textWidth,y);this.Canvas.fillStyle=this.HeaderColor;};this.DrawBorder=function(){if(!this.IsDrawBorder)return;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=this.RectClient.Bottom;this.Canvas.strokeStyle=this.BorderColor;this.Canvas.beginPath();this.Canvas.moveTo(left,ToFixedPoint(top+this.HeaderHeight));this.Canvas.lineTo(right,ToFixedPoint(top+this.HeaderHeight));var rowTop=top+this.HeaderHeight+this.RowHeight;var rotBottom=rowTop;for(var i=0;i<this.FixedRowCount;++i){var drawTop=ToFixedPoint(rowTop);this.Canvas.moveTo(left,drawTop);this.Canvas.lineTo(right,drawTop);rotBottom=rowTop;rowTop+=this.FixedRowHeight;}var rowTop=top+this.HeaderHeight+this.RowHeight+this.FixedRowHeight*this.FixedRowCount;var rotBottom=rowTop;//横线
12412
12414
  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;}//竖线
12413
12415
  var columnLeft=left;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];var drawLeft=ToFixedPoint(columnLeft+item.Width);this.Canvas.moveTo(drawLeft,top);this.Canvas.lineTo(drawLeft,rotBottom);columnLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];var drawLeft=ToFixedPoint(columnLeft+item.Width);this.Canvas.moveTo(drawLeft,top);this.Canvas.lineTo(drawLeft,rotBottom);columnLeft+=item.Width;}this.Canvas.stroke();};this.DrawBody=function(){if(!this.Data)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return;this.Canvas.font=this.ItemFont;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var rowWidth=this.RectClient.Right-this.RectClient.Left;//固定行
12414
12416
  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;for(var i=this.Data.YOffset,j=0;i<this.Data.Data.length&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var bFillRow=false;if(this.SelectedModel==0){if(j==this.SelectedRow)bFillRow=true;//选中行
12415
12417
  }else{if(i==this.SelectedRow)bFillRow=true;//选中行
12416
12418
  }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;}if(bFillRow){this.Canvas.fillStyle=this.SelectedColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}this.DrawRow(symbol,textTop,i);this.ShowSymbol.push({Index:i,Symbol:symbol});textTop+=this.RowHeight;}};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=拖拽行
12417
12419
  {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);//小数位数
12418
- 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);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);left+=item.Width;if(left>=chartRight)break;}};this.DrawItem=function(index,data,column,left,top,rowType){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};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;//tooltip提示
12420
+ 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);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);left+=item.Width;if(left>=chartRight)break;}};this.DrawItem=function(index,data,column,left,top,rowType){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};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});}//tooltip提示
12419
12421
  if(column.EnableTooltip===true){this.TooltipRect.push({Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowType});}if(column.Type==REPORT_COLUMN_ID.INDEX_ID){if(rowType==1)return;//固定行序号空
12420
12422
  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.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'}, ...] } ]}
12421
12423
  if(stock&&stock.NameEx){var nameEx=stock.NameEx;drawInfo.Text=this.TextEllipsis(nameEx.Text,textWidth,column.MaxText);drawInfo.TextColor=this.GetNameColor(column,data.Symbol,rowType);if(nameEx.Symbol)drawInfo.Symbol=nameEx.Symbol;}}else if(column.Type==REPORT_COLUMN_ID.PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.Price,stock,data,drawInfo,{LimitBG:true});this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.OPEN_ID){//如果行情开盘价为涨停价或跌停价,则对内容加灰框
@@ -13036,7 +13038,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13036
13038
  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);};}/********************************************************************************
13037
13039
  * 版本信息输出
13038
13040
  *
13039
- */var HQCHART_VERSION="1.1.13122";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13041
+ */var HQCHART_VERSION="1.1.13126";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13040
13042
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13041
13043
  // BaseIndex:BaseIndex,
13042
13044
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13123",
3
+ "version": "1.1.13127",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -69077,6 +69077,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
69077
69077
  this.ClearRectSelect(true);
69078
69078
  this.Frame.ClearUpDonwFrameYData();
69079
69079
  this.ClearCustomKLine();
69080
+ this.ClearKLineCaluate();
69080
69081
 
69081
69082
 
69082
69083
  var kLineDrawType=this.GetKLineDrawType();
@@ -3399,6 +3399,8 @@ function ChartReport()
3399
3399
  if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
3400
3400
  if (item.MaxText) colItem.MaxText=item.MaxText;
3401
3401
  if (item.ID) colItem.ID=item.ID;
3402
+ if (item.FullColBGColor) colItem.FullColBGColor=item.FullColBGColor; //整列背景色
3403
+ if (item.HeaderBGColor) colItem.HeaderBGColor=item.HeaderBGColor; //表头背景色
3402
3404
  if (IFrameSplitOperator.IsNumber(item.Sort)) colItem.Sort=item.Sort;
3403
3405
  if (IFrameSplitOperator.IsBool(item.EnableTooltip)) colItem.EnableTooltip=item.EnableTooltip;
3404
3406
  if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
@@ -3731,7 +3733,6 @@ function ChartReport()
3731
3733
  var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
3732
3734
 
3733
3735
  this.Canvas.font=this.HeaderFont;
3734
- this.Canvas.fillStyle=this.HeaderColor;
3735
3736
 
3736
3737
  var textLeft=left;
3737
3738
  //固定列
@@ -3742,7 +3743,16 @@ function ChartReport()
3742
3743
  var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
3743
3744
  var x=textLeft+this.HeaderMergin.Left;
3744
3745
 
3746
+ if (item.HeaderBGColor)
3747
+ {
3748
+ var rtBG={Left:textLeft, Top:top, Width:itemWidth, Height:this.HeaderHeight };
3749
+ rtBG.Right=rtBG.Left+rtBG.Width;
3750
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
3751
+ this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
3752
+ }
3753
+
3745
3754
  if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
3755
+ else this.Canvas.fillStyle=this.HeaderColor;
3746
3756
 
3747
3757
  if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
3748
3758
  {
@@ -3753,7 +3763,7 @@ function ChartReport()
3753
3763
  this.DrawText(item.Title,item.TextAlign,x,y,textWidth);
3754
3764
  }
3755
3765
 
3756
- if (item.HeaderColor) this.Canvas.fillStyle=this.HeaderColor;
3766
+ this.Canvas.fillStyle=this.HeaderColor;
3757
3767
 
3758
3768
  textLeft+=item.Width;
3759
3769
  }
@@ -3765,7 +3775,16 @@ function ChartReport()
3765
3775
  var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
3766
3776
  var x=textLeft+this.HeaderMergin.Left;
3767
3777
 
3778
+ if (item.HeaderBGColor)
3779
+ {
3780
+ var rtBG={Left:textLeft, Top:top, Width:itemWidth, Height:this.HeaderHeight };
3781
+ rtBG.Right=rtBG.Left+rtBG.Width;
3782
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
3783
+ this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
3784
+ }
3785
+
3768
3786
  if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
3787
+ else this.Canvas.fillStyle=this.HeaderColor;
3769
3788
 
3770
3789
  if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
3771
3790
  {
@@ -3776,8 +3795,6 @@ function ChartReport()
3776
3795
  this.DrawText(item.Title,item.TextAlign,x,y,textWidth);
3777
3796
  }
3778
3797
 
3779
- if (item.HeaderColor) this.Canvas.fillStyle=this.HeaderColor;
3780
-
3781
3798
  textLeft+=item.Width;
3782
3799
  }
3783
3800
  }
@@ -4086,6 +4103,11 @@ function ChartReport()
4086
4103
  rtItem.Right=rtItem.Left+rtItem.Width;
4087
4104
  rtItem.Bottom=rtItem.Top+rtItem.Height;
4088
4105
  drawInfo.Rect=rtItem;
4106
+
4107
+ if (column.FullColBGColor)
4108
+ {
4109
+ this.DrawItemBG({ Rect:rtItem, BGColor:column.FullColBGColor });
4110
+ }
4089
4111
 
4090
4112
  //tooltip提示
4091
4113
  if (column.EnableTooltip===true)
@@ -72969,6 +72969,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
72969
72969
  this.ClearRectSelect(true);
72970
72970
  this.Frame.ClearUpDonwFrameYData();
72971
72971
  this.ClearCustomKLine();
72972
+ this.ClearKLineCaluate();
72972
72973
 
72973
72974
 
72974
72975
  var kLineDrawType=this.GetKLineDrawType();
@@ -125712,6 +125713,8 @@ function ChartReport()
125712
125713
  if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
125713
125714
  if (item.MaxText) colItem.MaxText=item.MaxText;
125714
125715
  if (item.ID) colItem.ID=item.ID;
125716
+ if (item.FullColBGColor) colItem.FullColBGColor=item.FullColBGColor; //整列背景色
125717
+ if (item.HeaderBGColor) colItem.HeaderBGColor=item.HeaderBGColor; //表头背景色
125715
125718
  if (IFrameSplitOperator.IsNumber(item.Sort)) colItem.Sort=item.Sort;
125716
125719
  if (IFrameSplitOperator.IsBool(item.EnableTooltip)) colItem.EnableTooltip=item.EnableTooltip;
125717
125720
  if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
@@ -126044,7 +126047,6 @@ function ChartReport()
126044
126047
  var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
126045
126048
 
126046
126049
  this.Canvas.font=this.HeaderFont;
126047
- this.Canvas.fillStyle=this.HeaderColor;
126048
126050
 
126049
126051
  var textLeft=left;
126050
126052
  //固定列
@@ -126055,7 +126057,16 @@ function ChartReport()
126055
126057
  var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
126056
126058
  var x=textLeft+this.HeaderMergin.Left;
126057
126059
 
126060
+ if (item.HeaderBGColor)
126061
+ {
126062
+ var rtBG={Left:textLeft, Top:top, Width:itemWidth, Height:this.HeaderHeight };
126063
+ rtBG.Right=rtBG.Left+rtBG.Width;
126064
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
126065
+ this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
126066
+ }
126067
+
126058
126068
  if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
126069
+ else this.Canvas.fillStyle=this.HeaderColor;
126059
126070
 
126060
126071
  if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
126061
126072
  {
@@ -126066,7 +126077,7 @@ function ChartReport()
126066
126077
  this.DrawText(item.Title,item.TextAlign,x,y,textWidth);
126067
126078
  }
126068
126079
 
126069
- if (item.HeaderColor) this.Canvas.fillStyle=this.HeaderColor;
126080
+ this.Canvas.fillStyle=this.HeaderColor;
126070
126081
 
126071
126082
  textLeft+=item.Width;
126072
126083
  }
@@ -126078,7 +126089,16 @@ function ChartReport()
126078
126089
  var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
126079
126090
  var x=textLeft+this.HeaderMergin.Left;
126080
126091
 
126092
+ if (item.HeaderBGColor)
126093
+ {
126094
+ var rtBG={Left:textLeft, Top:top, Width:itemWidth, Height:this.HeaderHeight };
126095
+ rtBG.Right=rtBG.Left+rtBG.Width;
126096
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
126097
+ this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
126098
+ }
126099
+
126081
126100
  if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
126101
+ else this.Canvas.fillStyle=this.HeaderColor;
126082
126102
 
126083
126103
  if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
126084
126104
  {
@@ -126089,8 +126109,6 @@ function ChartReport()
126089
126109
  this.DrawText(item.Title,item.TextAlign,x,y,textWidth);
126090
126110
  }
126091
126111
 
126092
- if (item.HeaderColor) this.Canvas.fillStyle=this.HeaderColor;
126093
-
126094
126112
  textLeft+=item.Width;
126095
126113
  }
126096
126114
  }
@@ -126399,6 +126417,11 @@ function ChartReport()
126399
126417
  rtItem.Right=rtItem.Left+rtItem.Width;
126400
126418
  rtItem.Bottom=rtItem.Top+rtItem.Height;
126401
126419
  drawInfo.Rect=rtItem;
126420
+
126421
+ if (column.FullColBGColor)
126422
+ {
126423
+ this.DrawItemBG({ Rect:rtItem, BGColor:column.FullColBGColor });
126424
+ }
126402
126425
 
126403
126426
  //tooltip提示
126404
126427
  if (column.EnableTooltip===true)
@@ -131490,7 +131513,7 @@ function ScrollBarBGChart()
131490
131513
 
131491
131514
 
131492
131515
 
131493
- var HQCHART_VERSION="1.1.13122";
131516
+ var HQCHART_VERSION="1.1.13126";
131494
131517
 
131495
131518
  function PrintHQChartVersion()
131496
131519
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13122";
8
+ var HQCHART_VERSION="1.1.13126";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -73013,6 +73013,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73013
73013
  this.ClearRectSelect(true);
73014
73014
  this.Frame.ClearUpDonwFrameYData();
73015
73015
  this.ClearCustomKLine();
73016
+ this.ClearKLineCaluate();
73016
73017
 
73017
73018
 
73018
73019
  var kLineDrawType=this.GetKLineDrawType();
@@ -125756,6 +125757,8 @@ function ChartReport()
125756
125757
  if (item.HeaderColor) colItem.HeaderColor=item.HeaderColor;
125757
125758
  if (item.MaxText) colItem.MaxText=item.MaxText;
125758
125759
  if (item.ID) colItem.ID=item.ID;
125760
+ if (item.FullColBGColor) colItem.FullColBGColor=item.FullColBGColor; //整列背景色
125761
+ if (item.HeaderBGColor) colItem.HeaderBGColor=item.HeaderBGColor; //表头背景色
125759
125762
  if (IFrameSplitOperator.IsNumber(item.Sort)) colItem.Sort=item.Sort;
125760
125763
  if (IFrameSplitOperator.IsBool(item.EnableTooltip)) colItem.EnableTooltip=item.EnableTooltip;
125761
125764
  if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
@@ -126088,7 +126091,6 @@ function ChartReport()
126088
126091
  var y=top+this.HeaderMergin.Top+(this.HeaderHeight-this.HeaderMergin.Top-this.HeaderMergin.Bottom)/2;
126089
126092
 
126090
126093
  this.Canvas.font=this.HeaderFont;
126091
- this.Canvas.fillStyle=this.HeaderColor;
126092
126094
 
126093
126095
  var textLeft=left;
126094
126096
  //固定列
@@ -126099,7 +126101,16 @@ function ChartReport()
126099
126101
  var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
126100
126102
  var x=textLeft+this.HeaderMergin.Left;
126101
126103
 
126104
+ if (item.HeaderBGColor)
126105
+ {
126106
+ var rtBG={Left:textLeft, Top:top, Width:itemWidth, Height:this.HeaderHeight };
126107
+ rtBG.Right=rtBG.Left+rtBG.Width;
126108
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
126109
+ this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
126110
+ }
126111
+
126102
126112
  if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
126113
+ else this.Canvas.fillStyle=this.HeaderColor;
126103
126114
 
126104
126115
  if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
126105
126116
  {
@@ -126110,7 +126121,7 @@ function ChartReport()
126110
126121
  this.DrawText(item.Title,item.TextAlign,x,y,textWidth);
126111
126122
  }
126112
126123
 
126113
- if (item.HeaderColor) this.Canvas.fillStyle=this.HeaderColor;
126124
+ this.Canvas.fillStyle=this.HeaderColor;
126114
126125
 
126115
126126
  textLeft+=item.Width;
126116
126127
  }
@@ -126122,7 +126133,16 @@ function ChartReport()
126122
126133
  var textWidth=itemWidth-this.HeaderMergin.Left-this.HeaderMergin.Right;
126123
126134
  var x=textLeft+this.HeaderMergin.Left;
126124
126135
 
126136
+ if (item.HeaderBGColor)
126137
+ {
126138
+ var rtBG={Left:textLeft, Top:top, Width:itemWidth, Height:this.HeaderHeight };
126139
+ rtBG.Right=rtBG.Left+rtBG.Width;
126140
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
126141
+ this.DrawItemBG({ Rect:rtBG, BGColor:item.HeaderBGColor });
126142
+ }
126143
+
126125
126144
  if (item.HeaderColor) this.Canvas.fillStyle=item.HeaderColor;
126145
+ else this.Canvas.fillStyle=this.HeaderColor;
126126
126146
 
126127
126147
  if (this.SortInfo && this.SortInfo.Field==i && this.SortInfo.Sort>0)
126128
126148
  {
@@ -126133,8 +126153,6 @@ function ChartReport()
126133
126153
  this.DrawText(item.Title,item.TextAlign,x,y,textWidth);
126134
126154
  }
126135
126155
 
126136
- if (item.HeaderColor) this.Canvas.fillStyle=this.HeaderColor;
126137
-
126138
126156
  textLeft+=item.Width;
126139
126157
  }
126140
126158
  }
@@ -126443,6 +126461,11 @@ function ChartReport()
126443
126461
  rtItem.Right=rtItem.Left+rtItem.Width;
126444
126462
  rtItem.Bottom=rtItem.Top+rtItem.Height;
126445
126463
  drawInfo.Rect=rtItem;
126464
+
126465
+ if (column.FullColBGColor)
126466
+ {
126467
+ this.DrawItemBG({ Rect:rtItem, BGColor:column.FullColBGColor });
126468
+ }
126446
126469
 
126447
126470
  //tooltip提示
126448
126471
  if (column.EnableTooltip===true)
@@ -134054,7 +134077,7 @@ function HQChartScriptWorker()
134054
134077
 
134055
134078
 
134056
134079
 
134057
- var HQCHART_VERSION="1.1.13122";
134080
+ var HQCHART_VERSION="1.1.13126";
134058
134081
 
134059
134082
  function PrintHQChartVersion()
134060
134083
  {