hqchart 1.1.14033 → 1.1.14040

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.
@@ -1221,7 +1221,7 @@ for(var i=0;i<chart.ExtendChartPaint.length;++i){var item=chart.ExtendChartPaint
1221
1221
  if(IFrameSplitOperator.IsNonEmptyArray(option.Windows)){var scriptData=new JSIndexScript();for(var i=0;i<option.Windows.length;++i){var index=2+i;var item=option.Windows[i];if(item.Script){chart.WindowIndex[index]=new ScriptIndex(item.Name,item.Script,item.Args,item);//脚本执行
1222
1222
  }else if(item.API)//使用API挂接指标数据 API:{ Name:指标名字, Script:指标脚本可以为空, Args:参数可以为空, Url:指标执行地址 }
1223
1223
  {var apiItem=item.API;chart.WindowIndex[index]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);}else{var indexItem=JSIndexMap.Get(item.Index);if(indexItem){chart.WindowIndex[index]=indexItem.Create();//创建子窗口的指标
1224
- chart.CreateWindowIndex(index);}else{var indexInfo=scriptData.Get(item.Index);if(!indexInfo)continue;indexInfo.ID=item.Index;var args=indexInfo.Args;if(item.Args)args=item.Args;if(item.IsShortTitle)indexInfo.IsShortTitle=item.IsShortTitle;if(item.TitleFont)indexInfo.TitleFont=item.TitleFont;if(IFrameSplitOperator.IsBool(item.IsSync))indexInfo.IsSync=item.IsSync;chart.WindowIndex[index]=new ScriptIndex(indexInfo.Name,indexInfo.Script,args,indexInfo);//脚本执行
1224
+ chart.CreateWindowIndex(index);}else{var indexInfo=scriptData.Get(item.Index);if(!indexInfo)continue;JSIndexScript.ModifyAttribute(indexInfo,item);indexInfo.ID=item.Index;chart.WindowIndex[index]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo);//脚本执行
1225
1225
  if(item.StringFormat>0)chart.WindowIndex[index].StringFormat=item.StringFormat;if(item.FloatPrecision>=0)chart.WindowIndex[index].FloatPrecision=item.FloatPrecision;}}var frame=chart.Frame.SubFrame[index].Frame;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.IsNumber(item.YSplitType))chart.Frame.SubFrame[index].Frame.YSplitOperator.SplitType=item.YSplitType;if(IFrameSplitOperator.IsNumber(item.FilterType))chart.Frame.SubFrame[index].Frame.YSplitOperator.FilterType=item.FilterType;if(!isNaN(item.TitleHeight))chart.Frame.SubFrame[index].Frame.ChartBorder.TitleHeight=item.TitleHeight;if(IFrameSplitOperator.IsBool(item.IsDrawTitleBG))chart.Frame.SubFrame[index].Frame.IsDrawTitleBG=item.IsDrawTitleBG;if(IFrameSplitOperator.IsBool(item.IsShowNameArrow))chart.Frame.SubFrame[index].Frame.IsShowNameArrow=item.IsShowNameArrow;if(IFrameSplitOperator.IsBool(item.IsShowTitleArrow))frame.IsShowTitleArrow=item.IsShowTitleArrow;if(IFrameSplitOperator.IsNumber(item.TitleArrowType))frame.TitleArrowType=item.TitleArrowType;if(item.IsShowIndexName==false)chart.Frame.SubFrame[index].Frame.IsShowIndexName=false;if(item.IsShowOverlayIndexName==false)chart.Frame.SubFrame[index].Frame.IsShowOverlayIndexName=false;if(!IFrameSplitOperator.IsUndefined(item.HorizontalReserved))frame.HorizontalReserved=item.HorizontalReserved;}}this.AdjustTitleHeight(chart);//叠加指标
1226
1226
  if(IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex)){for(var i=0;i<option.OverlayIndex.length;++i){var item=option.OverlayIndex[i];if(item.Windows>=chart.Frame.SubFrame.length)continue;var itemString=(0,_stringify2.default)(item);var obj=JSON.parse(itemString);if(item.Index)obj.IndexName=item.Index;if(item.Windows>=0)obj.WindowIndex=item.Windows;chart.CreateOverlayWindowsIndex(obj);}}return chart;};this.CreateMinMinuteChartContainer=function(option){var chart=null;if(option.Type==="迷你分钟走势图横屏")chart=new MinuteChartHScreenContainer(this.CanvasElement);else chart=new MinuteChartContainer(this.CanvasElement);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;var windowsCount=2;if(option.BeforeOpen)//集合竞价
1227
1227
  {var item=option.BeforeOpen;if(IFrameSplitOperator.IsBool(item.IsShow))chart.IsShowBeforeData=item.IsShow;if(IFrameSplitOperator.IsNumber(item.Width))chart.ExtendWidth.Left=item.Width;if(IFrameSplitOperator.IsBool(item.IsShowMultiDay))chart.IsShowMultiDayBeforeData=item.IsShowMultiDay;if(IFrameSplitOperator.IsNumber(item.MulitiDayWidth))chart.MultiDayExtendWidth.Left=item.MulitiDayWidth;}if(option.AfterClose)//收盘集合竞价
@@ -12813,7 +12813,7 @@ if(chart.MultiSelectModel==1){var pageStatus=chart.GetCurrentPageStatus();if(IFr
12813
12813
  {var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.End-pageStatus.Start+1;var selected=pageStatus.SelectedRow;if(step>0){selected+=step;selected=selected%pageSize;chart.SelectedRow=selected;chart.SelectedFixedRow=-1;result.Redraw=true;return result;}else if(step<0){selected+=step;if(selected<0){selected=selected%pageSize;selected=pageSize+selected;}chart.SelectedRow=selected;chart.SelectedFixedRow=-1;result.Redraw=true;return result;}}else if(chart.SelectedModel==1)//可翻页模式
12814
12814
  {var pageStatus=chart.GetCurrentPageStatus();var pageSize=pageStatus.PageSize;var selected=pageStatus.SelectedRow;if(step>0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.Start;result.Redraw=true;return result;}var offset=this.Data.YOffset;for(var i=0;i<step;++i){++selected;if(selected>pageStatus.End)++offset;if(selected>=this.Data.Data.length){selected=0;offset=0;}}result.Redraw=true;result.Update=offset!=this.Data.YOffset;chart.SelectedRow=selected;this.Data.YOffset=offset;return result;}else if(step<0){if(selected<0||selected<pageStatus.Start||selected>pageStatus.End){chart.SelectedRow=pageStatus.End;result.Redraw=true;return result;}step=Math.abs(step);var offset=this.Data.YOffset;for(var i=0;i<step;++i){--selected;if(selected<pageStatus.Start)--offset;if(selected<0){selected=this.Data.Data.length-1;offset=this.Data.Data.length-pageSize;if(offset<0)offset=0;}}result.Redraw=true;result.Update=offset!=this.Data.YOffset;chart.SelectedRow=selected;this.Data.YOffset=offset;return result;}}return null;};//左右移动
12815
12815
  this.MoveXOffset=function(step){var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetXScrollRange();if(maxOffset<=0)return false;if(step>0){if(this.Data.XOffset>=maxOffset)return false;for(var i=0;i<step;++i){if(this.Data.XOffset>=maxOffset)break;++this.Data.XOffset;}return true;}else if(step<0){if(this.Data.XOffset<=0)return false;step=Math.abs(step);for(var i=0;i<step;++i){if(this.Data.XOffset-1<0)break;--this.Data.XOffset;}return true;}return false;};this.SetXOffset=function(pos){if(!IFrameSplitOperator.IsNumber(pos))return false;var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetXScrollRange();if(pos<0)pos=0;if(pos>maxOffset)pos=maxOffset;this.Data.XOffset=pos;return true;};this.SetYOffset=function(pos){if(!IFrameSplitOperator.IsNumber(pos))return false;var chart=this.ChartPaint[0];if(!chart)return false;var maxOffset=chart.GetYScrollRange();if(pos<0)pos=0;if(pos>maxOffset)pos=maxOffset;this.Data.YOffset=pos;return true;};this.GotoLastPage=function(){var chart=this.ChartPaint[0];if(!chart)return;//显示最后一屏
12816
- var pageSize=chart.GetPageSize(true);var offset=this.Data.Data.length-pageSize;if(offset<0)offset=0;this.Data.DataOffset=offset;};this.SetColumn=function(aryColunm,option){var chart=this.ChartPaint[0];if(!chart)return;chart.SetColumn(aryColunm);chart.SizeChange=true;if(option&&option.Redraw)this.Draw();};this.SetTab=function(aryTab,option){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SetTabList(aryTab);if(option&&option.Redraw)this.Draw();};this.SetVScrollbar=function(option){var chart=this.GetReportChart();if(!chart)return;var scrollbar=chart.VScrollbar;if(!scrollbar)return;if(IFrameSplitOperator.IsBool(option.Enable))scrollbar.Enable=option.Enable;};this.SetSelectedTab=function(index,opiton){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SelectedTabIndex=index;};this.ReloadResource=function(option){this.Frame.ReloadResource(option);for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(item.ReloadResource)item.ReloadResource(option);}if(option&&option.Redraw){this.SetSizeChange(true);this.Draw();}};//列排序
12816
+ var pageSize=chart.GetPageSize(true);var offset=this.Data.Data.length-pageSize;if(offset<0)offset=0;this.Data.DataOffset=offset;};this.SetColumn=function(aryColunm,option){var chart=this.ChartPaint[0];if(!chart)return;chart.SetColumn(aryColunm);chart.SizeChange=true;if(option&&option.Redraw)this.Draw();};this.SetTab=function(aryTab,option){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SetTabList(aryTab);if(option&&option.Redraw)this.Draw();};this.SetVScrollbar=function(option){var chart=this.GetReportChart();if(!chart)return;var scrollbar=chart.VScrollbar;if(!scrollbar)return;scrollbar.SetOption(option);};this.SetSelectedTab=function(index,opiton){var chart=this.ChartPaint[0];;if(!chart)return;var chartTab=chart.Tab;if(!chartTab)return;chartTab.SelectedTabIndex=index;};this.ReloadResource=function(option){this.Frame.ReloadResource(option);for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(item.ReloadResource)item.ReloadResource(option);}if(option&&option.Redraw){this.SetSizeChange(true);this.Draw();}};//列排序
12817
12817
  this.SortColumn=function(index,sortType){var _this58=this;if(index<0)return false;var reportChart=this.GetReportChart();if(!reportChart)return false;var column=reportChart.Column[index];if(!column)return false;if(column.Sort!=1&&column.Sort!=2)return false;var sortInfo={Field:index,Sort:sortType};if(this.Data.Virtual&&this.Data.Virtual.Enable){this.SortInfo.Field=sortInfo.Field;this.SortInfo.Sort=sortInfo.Sort;this.Data.YOffset=0;this.ResetReportSelectStatus();this.RequestVirtualStockData();//虚拟表格
12818
12818
  return true;}else if(sortInfo.Sort==0)//不排序还原
12819
12819
  {this.Data.Data=[];if(IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))this.Data.Data=this.SourceData.Data.slice();}else if(sortInfo.Sort==1||sortInfo.Sort==2){if(column.Sort==1)//本地排序
@@ -13027,7 +13027,7 @@ switch(column.ColorType){case 1:drawInfo.TextColor=this.GetUpDownColor(value,0);
13027
13027
  {this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(column.ValueType==0){if(column.FormatType==1)drawInfo.Text=IFrameSplitOperator.FormatDateString(value,"YYYY/MM/DD");else drawInfo.Text=IFrameSplitOperator.FormatDateString(value);}};this.GetCustomIconDrawInfo=function(data,column,drawInfo){if(column.IsDrawCallback)//外部处理输出格式
13028
13028
  {this.GetCustomIconData(column,data.Symbol,drawInfo,data);return;}};this.GetCustomCheckBoxDrawInfo=function(data,column,drawInfo){var checkData=this.GetExtendData(data,column);if(!checkData)return;if(!IFrameSplitOperator.IsBool(checkData.Checked))return;drawInfo.Checked=checkData.Checked;drawInfo.Enable=true;drawInfo.Data=checkData;if(IFrameSplitOperator.IsBool(checkData.DisableCheckBox))drawInfo.Enable=!checkData.DisableCheckBox;drawInfo.CheckBox=column.CheckBox;};this.GetCustomButtonDrawInfo=function(data,column,drawInfo){var buttonData=this.GetExtendData(data,column);if(!buttonData)return;drawInfo.Text=buttonData.Title;drawInfo.Button=column.Button;drawInfo.Font=column.Button.Font;drawInfo.Enable=true;drawInfo.Data=buttonData;if(IFrameSplitOperator.IsBool(buttonData.Enable))drawInfo.Enable=buttonData.Enable;};this.GetCustomProgressBarDrawInfo=function(data,column,drawInfo){var barData=this.GetExtendData(data,column);if(!barData)return;drawInfo.Text=barData.Title;drawInfo.ProgressBar=column.ProgressBar;drawInfo.Enable=true;drawInfo.Value=barData.Value;//占比
13029
13029
  drawInfo.Data=barData;if(IFrameSplitOperator.IsBool(barData.Enable))drawInfo.Enable=barData.Enable;if(barData.TextColor)drawInfo.TextColor=barData.TextColor;if(barData.BarColor)drawInfo.BarColor=barData.BarColor;if(barData.BGColor)drawInfo.BGColor=barData.BGColor;};this.GetCustomLinkDrawInfo=function(data,column,drawInfo){var linkData=this.GetExtendData(data,column);if(!linkData)return;drawInfo.Text=linkData.Title;drawInfo.Link=column.Link;drawInfo.Enable=true;drawInfo.Data=linkData;drawInfo.MaxText=column.MaxText;if(IFrameSplitOperator.IsBool(linkData.Enable))drawInfo.Enable=linkData.Enable;if(linkData.TextColor)drawInfo.TextColor=linkData.TextColor;};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}//TODO: 不同类型的 格式化输出
13030
- drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var text=data[fieldName];if(!IFrameSplitOperator.IsString(text))return;drawInfo.Text=text;};this.FormaTimeDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Time))return;if(column.ValueType==0)//0=hhmm 1=hhmmss 2=hhmmss.fff
13030
+ drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsObject(item)){if(item.Text)drawInfo.Text=item.Text;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}else if(IFrameSplitOperator.IsString(item)){drawInfo.Text=item;}};this.FormaTimeDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Time))return;if(column.ValueType==0)//0=hhmm 1=hhmmss 2=hhmmss.fff
13031
13031
  {drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM");}else if(column.ValueType==1){drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM:SS");}else if(column.ValueType==2){drawInfo.Text=IFrameSplitOperator.FormatTimeString(stock.Time,"HH:MM:SS.fff");}};this.FormaDateDrawInfo=function(column,stock,drawInfo,data){if(!IFrameSplitOperator.IsNumber(stock.Date))return;if(column.FormatType==0)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY-MM-DD");else if(column.FormatType==1)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY/MM/DD");else if(column.FormatType==2)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY/MM/DD/W");else if(column.FormatType==3)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"YYYY-MM");else if(column.FormatType==4)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"MM/DD");else if(column.FormatType==4)drawInfo.Text=IFrameSplitOperator.FormatDateString(stock.Date,"MM-DD");};//自定义图标
13032
13032
  this.GetCustomIconData=function(columnInfo,symbol,drawInfo,data){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DRAW_CUSTOM_ICON);if(!event||!event.Callback)return false;var sendData={Symbol:symbol,Column:columnInfo,Data:data,Out:{Text:null,TextColor:null,TextAlign:null,Font:null}};event.Callback(event,sendData,this);if(sendData.Out.Text)drawInfo.Text=sendData.Out.Text;if(sendData.Out.TextColor)drawInfo.TextColor=sendData.Out.TextColor;if(sendData.Out.TextAlign)drawInfo.TextAlign=sendData.Out.TextAlign;if(sendData.Out.BGColor)drawInfo.BGColor=sendData.Out.BGColor;if(sendData.Out.Font)drawInfo.Font=sendData.Out.Font;return true;};this.GetPriceDrawInfo=function(price,stock,data,drawInfo,option){if(!IFrameSplitOperator.IsNumber(price))return false;drawInfo.Text=price.toFixed(data.Decimal);var yClose=null;if(stock.PriceColorType===1)//昨结算价 计算颜色
13033
13033
  {if(IFrameSplitOperator.IsNumber(stock.YFClose))yClose=stock.YFClose;}else//昨收价 计算颜色
@@ -13113,8 +13113,12 @@ this.IsDrawFirst=false;this.GetEventCallback;//获取事件
13113
13113
  this.Report;this.MaxPos=15;//滚动条可移动长度
13114
13114
  this.CurrentPos=15;//当前滚动条移动位置
13115
13115
  this.Step=1;//滚动条移动步长
13116
- this.ButtonSize=25;this.Enable=false;this.LastStatus={Draw:false};this.GlobalOption;this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;this.Mergin={Left:2,Right:2,Top:2,Bottom:2};this.BarWithConfig={Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size};this.RectScroll={Top:null,Bottom:null,Bar:null,Client:null};//滚动条区域
13117
- this.ReloadResource=function(resource){this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;this.BarWithConfig={Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size};};this.CalculateSize=function(){var pixelRatio=GetDevicePixelRatio();var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;this.ButtonSize=Math.min(25,width);};this.DrawScrollbar=function(left,top,right,bottom){this.LastStatus.Draw=false;this.RectScroll={Left:null,Right:null,Bar:null,Client:null};if(!this.Enable)return;var isShow=this.IsShowCallback();if(!isShow)return;var pageInfo=this.Report.GetCurrentPageStatus();if(pageInfo.IsSinglePage)return;var xOffset=pageInfo.Start;var dataCount=pageInfo.DataCount-pageInfo.PageSize;var buttonSize=this.ButtonSize;this.MaxPos=dataCount;this.CurrentPos=xOffset;var rtTop={Right:right-this.Mergin.Right,Top:top+this.Mergin.Top,Width:buttonSize,Height:buttonSize};rtTop.Left=rtTop.Right-buttonSize;rtTop.Bottom=rtTop.Top+buttonSize;var rtBottom={Right:right-this.Mergin.Right,Bottom:bottom-this.Mergin.Bottom,Width:buttonSize,Height:buttonSize};rtBottom.Left=rtBottom.Right-buttonSize;rtBottom.Top=rtBottom.Bottom-buttonSize;var centerHeight=rtBottom.Top-2-(rtTop.Bottom+2);var value=centerHeight-this.ScrollBarHeight;var yOffset=value*this.CurrentPos/this.MaxPos;var y=rtTop.Bottom+2+yOffset;var rtBar={Right:right-this.Mergin.Right,Top:y,Width:buttonSize,Height:this.ScrollBarHeight};rtBar.Left=rtBar.Right-buttonSize;rtBar.Bottom=rtBar.Top+rtBar.Height;if(rtBar.Bottom>rtBottom.Top-2){rtBar.Bottom=rtBottom.Top-2;rtBar.Top=rtBar.Bottom-rtBar.Height;}this.RectScroll.Top=rtTop;this.RectScroll.Bottom=rtBottom;this.RectScroll.Bar=rtBar;this.RectScroll.Client={Left:rtTop.Left,Right:rtTop.Right,Top:rtTop.Bottom,Bottom:rtBottom.Top};var rtBG={Right:right,Top:top,Bottom:bottom,Width:buttonSize+this.Mergin.Right+this.Mergin.Left};rtBG.Left=rtBG.Right-rtBG.Width;rtBG.Height=rtBG.Bottom-rtBG.Top;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.Canvas.fillStyle=this.ButtonColor;this.Canvas.fillRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);this.Canvas.fillRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);this.Canvas.strokeStyle=this.BorderColor;this.Canvas.strokeRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);this.Canvas.strokeRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);this.Canvas.fillStyle=this.BarColor;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.LastStatus.Draw=true;};this.OnMouseDown=function(x,y,e){return this.PtInScroll(x,y);};// Type 1-4 滚动条
13116
+ this.ButtonSize=25;this.Enable=false;this.LastStatus={Draw:false};this.GlobalOption;this.Style=0;//0=滚动条+按钮 1=滚动条
13117
+ this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;this.Margin={Left:2,Right:2,Top:2,Bottom:2};this.BarWithConfig={Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size};this.RectScroll={Top:null,Bottom:null,Bar:null,Client:null};//滚动条区域
13118
+ //this.BarWithConfig.Size=2;
13119
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
13120
+ this.SetOption=function(option){if(!option)return;if(IFrameSplitOperator.IsBool(option.Enable))this.Enable=option.Enable;if(IFrameSplitOperator.IsNumber(option.Style))this.Style=option.Style;if(IFrameSplitOperator.IsNumber(option.BarWidth))this.BarWithConfig.Size=option.BarWidth;if(option.Margin){var item=option.Margin;if(IFrameSplitOperator.IsNumber(item.Top))this.Margin.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))this.Margin.Bottom=item.Bottom;if(IFrameSplitOperator.IsNumber(item.Left))this.Margin.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))this.Margin.Right=item.Right;}};this.ReloadResource=function(resource){this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;this.BarWithConfig={Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size};};this.CalculateSize=function(){var pixelRatio=GetDevicePixelRatio();var width=this.BarWithConfig.Size*pixelRatio+this.Margin.Left+this.Margin.Right;this.ButtonSize=Math.min(25,width);};//不带上下按钮的滚动条样式
13121
+ this.DrawScrollbarStyle2=function(left,top,right,bottom){this.LastStatus.Draw=false;this.RectScroll={Left:null,Right:null,Bar:null,Client:null};if(!this.Enable)return;var isShow=this.IsShowCallback();if(!isShow)return;var pageInfo=this.Report.GetCurrentPageStatus();if(pageInfo.IsSinglePage)return;var xOffset=pageInfo.Start;var dataCount=pageInfo.DataCount-pageInfo.PageSize;var buttonSize=this.ButtonSize;this.MaxPos=dataCount;this.CurrentPos=xOffset;var scrollTop=top+this.Margin.Top+2;var scrollBottom=bottom-this.Margin.Bottom-2;var centerHeight=scrollBottom-scrollTop;var value=centerHeight-this.ScrollBarHeight;var yOffset=value*this.CurrentPos/this.MaxPos;var y=scrollTop+2+yOffset;var rtBar={Right:right-this.Margin.Right,Top:y,Width:buttonSize,Height:this.ScrollBarHeight};rtBar.Left=rtBar.Right-buttonSize;rtBar.Bottom=rtBar.Top+rtBar.Height;if(rtBar.Bottom>scrollBottom-2){rtBar.Bottom=scrollBottom-2;rtBar.Top=rtBar.Bottom-rtBar.Height;}this.RectScroll.Bar=rtBar;this.RectScroll.Client={Left:rtBar.Left,Right:rtBar.Right,Top:scrollTop,Bottom:scrollBottom};var rtBG={Right:right,Top:top,Bottom:bottom,Width:buttonSize+this.Margin.Right+this.Margin.Left};rtBG.Left=rtBG.Right-rtBG.Width;rtBG.Height=rtBG.Bottom-rtBG.Top;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.Canvas.fillStyle=this.BarColor;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.LastStatus.Draw=true;};this.DrawScrollbarStyle=function(left,top,right,bottom){this.LastStatus.Draw=false;this.RectScroll={Left:null,Right:null,Bar:null,Client:null};if(!this.Enable)return;var isShow=this.IsShowCallback();if(!isShow)return;var pageInfo=this.Report.GetCurrentPageStatus();if(pageInfo.IsSinglePage)return;var xOffset=pageInfo.Start;var dataCount=pageInfo.DataCount-pageInfo.PageSize;var buttonSize=this.ButtonSize;this.MaxPos=dataCount;this.CurrentPos=xOffset;var rtTop={Right:right-this.Margin.Right,Top:top+this.Margin.Top,Width:buttonSize,Height:buttonSize};rtTop.Left=rtTop.Right-buttonSize;rtTop.Bottom=rtTop.Top+buttonSize;var rtBottom={Right:right-this.Margin.Right,Bottom:bottom-this.Margin.Bottom,Width:buttonSize,Height:buttonSize};rtBottom.Left=rtBottom.Right-buttonSize;rtBottom.Top=rtBottom.Bottom-buttonSize;var centerHeight=rtBottom.Top-2-(rtTop.Bottom+2);var value=centerHeight-this.ScrollBarHeight;var yOffset=value*this.CurrentPos/this.MaxPos;var y=rtTop.Bottom+2+yOffset;var rtBar={Right:right-this.Margin.Right,Top:y,Width:buttonSize,Height:this.ScrollBarHeight};rtBar.Left=rtBar.Right-buttonSize;rtBar.Bottom=rtBar.Top+rtBar.Height;if(rtBar.Bottom>rtBottom.Top-2){rtBar.Bottom=rtBottom.Top-2;rtBar.Top=rtBar.Bottom-rtBar.Height;}this.RectScroll.Top=rtTop;this.RectScroll.Bottom=rtBottom;this.RectScroll.Bar=rtBar;this.RectScroll.Client={Left:rtTop.Left,Right:rtTop.Right,Top:rtTop.Bottom,Bottom:rtBottom.Top};var rtBG={Right:right,Top:top,Bottom:bottom,Width:buttonSize+this.Margin.Right+this.Margin.Left};rtBG.Left=rtBG.Right-rtBG.Width;rtBG.Height=rtBG.Bottom-rtBG.Top;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.Canvas.fillStyle=this.ButtonColor;this.Canvas.fillRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);this.Canvas.fillRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);this.Canvas.strokeStyle=this.BorderColor;this.Canvas.strokeRect(rtTop.Left,rtTop.Top,rtTop.Width,rtTop.Height);this.Canvas.strokeRect(rtBottom.Left,rtBottom.Top,rtBottom.Width,rtBottom.Height);this.Canvas.fillStyle=this.BarColor;this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);this.LastStatus.Draw=true;};this.DrawScrollbar=function(left,top,right,bottom){if(this.Style==1)this.DrawScrollbarStyle2(left,top,right,bottom);else this.DrawScrollbarStyle(left,top,right,bottom);};this.OnMouseDown=function(x,y,e){return this.PtInScroll(x,y);};// Type 1-4 滚动条
13118
13122
  this.PtInScroll=function(x,y){if(!this.RectScroll)return null;if(this.RectScroll.Top){var rtItem=this.RectScroll.Top;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom)return{Type:1,Rect:rtItem};}if(this.RectScroll.Bottom){var rtItem=this.RectScroll.Bottom;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom)return{Type:2,Rect:rtItem};}if(this.RectScroll.Bar){var rtItem=this.RectScroll.Bar;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom)return{Type:3,Rect:rtItem};}if(this.RectScroll.Client){var rtItem=this.RectScroll.Client;if(x>=rtItem.Left&&x<=rtItem.Right&&y>=rtItem.Top&&y<=rtItem.Bottom){return{Type:4,Rect:rtItem,Pos:this.GetScrollPostionByPoint(x,y)};}}return null;};this.GetScrollPostionByPoint=function(x,y){var rtItem=this.RectScroll.Client;var value=rtItem.Bottom-rtItem.Top-this.ScrollBarHeight;var pos=parseInt(this.MaxPos*(y-rtItem.Top)/value);return pos;};}function ChartCellTooltip(){this.Canvas;//画布
13119
13123
  this.ChartBorder;//边框信息
13120
13124
  this.ChartFrame;//框架画法
@@ -13930,7 +13934,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13930
13934
  this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
13931
13935
  * 版本信息输出
13932
13936
  *
13933
- */var HQCHART_VERSION="1.1.14032";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13937
+ */var HQCHART_VERSION="1.1.14039";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();//把给外界调用的方法暴露出来
13934
13938
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13935
13939
  // BaseIndex:BaseIndex,
13936
13940
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14033",
3
+ "version": "1.1.14040",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -1136,13 +1136,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1136
1136
  {
1137
1137
  let indexInfo = scriptData.Get(item.Index);
1138
1138
  if (!indexInfo) continue;
1139
+ JSIndexScript.ModifyAttribute(indexInfo, item);
1139
1140
  indexInfo.ID=item.Index;
1140
- var args=indexInfo.Args;
1141
- if (item.Args) args=item.Args;
1142
- if (item.IsShortTitle) indexInfo.IsShortTitle=item.IsShortTitle;
1143
- if (item.TitleFont) indexInfo.TitleFont=item.TitleFont;
1144
- if (IFrameSplitOperator.IsBool(item.IsSync)) indexInfo.IsSync=item.IsSync;
1145
- chart.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, args,indexInfo); //脚本执行
1141
+ chart.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, indexInfo.Args,indexInfo); //脚本执行
1146
1142
  if (item.StringFormat>0) chart.WindowIndex[index].StringFormat=item.StringFormat;
1147
1143
  if (item.FloatPrecision>=0) chart.WindowIndex[index].FloatPrecision=item.FloatPrecision;
1148
1144
  }
@@ -3098,7 +3098,7 @@ function JSReportChartContainer(uielement)
3098
3098
  var scrollbar=chart.VScrollbar;
3099
3099
  if (!scrollbar) return;
3100
3100
 
3101
- if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
3101
+ scrollbar.SetOption(option);
3102
3102
  }
3103
3103
 
3104
3104
  this.SetSelectedTab=function(index, opiton)
@@ -6328,10 +6328,17 @@ function ChartReport()
6328
6328
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);
6329
6329
  if (!fieldName) return;
6330
6330
 
6331
- var text=data[fieldName];
6332
- if (!IFrameSplitOperator.IsString(text)) return;
6333
-
6334
- drawInfo.Text=text;
6331
+ var item=data[fieldName];
6332
+ if (IFrameSplitOperator.IsObject(item))
6333
+ {
6334
+ if (item.Text) drawInfo.Text=item.Text;
6335
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
6336
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
6337
+ }
6338
+ else if (IFrameSplitOperator.IsString(item))
6339
+ {
6340
+ drawInfo.Text=item;
6341
+ }
6335
6342
  }
6336
6343
 
6337
6344
  this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
@@ -8349,15 +8356,37 @@ function ChartVScrollbar()
8349
8356
  this.LastStatus={ Draw:false, };
8350
8357
  this.GlobalOption;
8351
8358
 
8359
+ this.Style=0; //0=滚动条+按钮 1=滚动条
8360
+
8352
8361
  this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
8353
8362
  this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
8354
8363
  this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
8355
8364
  this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
8356
8365
  this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
8357
- this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
8366
+ this.Margin={ Left:2, Right:2, Top:2, Bottom:2 };
8358
8367
  this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
8359
8368
 
8360
8369
  this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
8370
+
8371
+ //this.BarWithConfig.Size=2;
8372
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
8373
+
8374
+ this.SetOption=function(option)
8375
+ {
8376
+ if (!option) return;
8377
+
8378
+ if (IFrameSplitOperator.IsBool(option.Enable)) this.Enable=option.Enable;
8379
+ if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
8380
+ if (IFrameSplitOperator.IsNumber(option.BarWidth)) this.BarWithConfig.Size=option.BarWidth;
8381
+ if (option.Margin)
8382
+ {
8383
+ var item=option.Margin;
8384
+ if (IFrameSplitOperator.IsNumber(item.Top)) this.Margin.Top=item.Top;
8385
+ if (IFrameSplitOperator.IsNumber(item.Bottom)) this.Margin.Bottom=item.Bottom;
8386
+ if (IFrameSplitOperator.IsNumber(item.Left)) this.Margin.Left=item.Left;
8387
+ if (IFrameSplitOperator.IsNumber(item.Right)) this.Margin.Right=item.Right;
8388
+ }
8389
+ }
8361
8390
 
8362
8391
  this.ReloadResource=function(resource)
8363
8392
  {
@@ -8373,11 +8402,12 @@ function ChartVScrollbar()
8373
8402
  {
8374
8403
  var pixelRatio=GetDevicePixelRatio();
8375
8404
 
8376
- var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
8405
+ var width=this.BarWithConfig.Size*pixelRatio+this.Margin.Left+this.Margin.Right;
8377
8406
  this.ButtonSize=Math.min(25, width);
8378
8407
  }
8379
8408
 
8380
- this.DrawScrollbar=function(left, top, right, bottom)
8409
+ //不带上下按钮的滚动条样式
8410
+ this.DrawScrollbarStyle2=function(left, top, right, bottom)
8381
8411
  {
8382
8412
  this.LastStatus.Draw=false;
8383
8413
  this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
@@ -8396,11 +8426,61 @@ function ChartVScrollbar()
8396
8426
  this.MaxPos=dataCount;
8397
8427
  this.CurrentPos=xOffset;
8398
8428
 
8399
- var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
8429
+ var scrollTop=top+this.Margin.Top+2;
8430
+ var scrollBottom=bottom-this.Margin.Bottom-2;
8431
+ var centerHeight=scrollBottom-scrollTop;
8432
+ var value = centerHeight - this.ScrollBarHeight;
8433
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
8434
+ var y = scrollTop + 2 + yOffset;
8435
+
8436
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
8437
+ rtBar.Left=rtBar.Right-buttonSize;
8438
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
8439
+ if (rtBar.Bottom>scrollBottom-2)
8440
+ {
8441
+ rtBar.Bottom=scrollBottom-2;
8442
+ rtBar.Top=rtBar.Bottom-rtBar.Height;
8443
+ }
8444
+
8445
+ this.RectScroll.Bar=rtBar;
8446
+ this.RectScroll.Client={ Left:rtBar.Left, Right: rtBar.Right, Top:scrollTop, Bottom:scrollBottom };
8447
+
8448
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
8449
+ rtBG.Left=rtBG.Right-rtBG.Width;
8450
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
8451
+ this.Canvas.fillStyle=this.BGColor;
8452
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
8453
+
8454
+ this.Canvas.fillStyle=this.BarColor;
8455
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
8456
+
8457
+ this.LastStatus.Draw=true;
8458
+ }
8459
+
8460
+ this.DrawScrollbarStyle=function(left, top, right, bottom)
8461
+ {
8462
+ this.LastStatus.Draw=false;
8463
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
8464
+ if (!this.Enable) return;
8465
+
8466
+ var isShow=this.IsShowCallback();
8467
+ if (!isShow) return;
8468
+
8469
+ var pageInfo=this.Report.GetCurrentPageStatus();
8470
+ if (pageInfo.IsSinglePage) return;
8471
+
8472
+ var xOffset=pageInfo.Start;
8473
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
8474
+ var buttonSize=this.ButtonSize;
8475
+
8476
+ this.MaxPos=dataCount;
8477
+ this.CurrentPos=xOffset;
8478
+
8479
+ var rtTop={ Right:right-this.Margin.Right, Top:top+this.Margin.Top, Width:buttonSize, Height:buttonSize };
8400
8480
  rtTop.Left=rtTop.Right-buttonSize;
8401
8481
  rtTop.Bottom=rtTop.Top+buttonSize;
8402
8482
 
8403
- var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
8483
+ var rtBottom={ Right:right-this.Margin.Right, Bottom:bottom-this.Margin.Bottom, Width:buttonSize, Height:buttonSize };
8404
8484
  rtBottom.Left=rtBottom.Right-buttonSize;
8405
8485
  rtBottom.Top=rtBottom.Bottom-buttonSize;
8406
8486
 
@@ -8409,7 +8489,7 @@ function ChartVScrollbar()
8409
8489
  var yOffset = (value * this.CurrentPos) / this.MaxPos;
8410
8490
  var y = rtTop.Bottom + 2 + yOffset;
8411
8491
 
8412
- var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
8492
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
8413
8493
  rtBar.Left=rtBar.Right-buttonSize;
8414
8494
  rtBar.Bottom=rtBar.Top+rtBar.Height;
8415
8495
  if (rtBar.Bottom>rtBottom.Top-2)
@@ -8423,7 +8503,7 @@ function ChartVScrollbar()
8423
8503
  this.RectScroll.Bar=rtBar;
8424
8504
  this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
8425
8505
 
8426
- var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
8506
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
8427
8507
  rtBG.Left=rtBG.Right-rtBG.Width;
8428
8508
  rtBG.Height=rtBG.Bottom-rtBG.Top;
8429
8509
  this.Canvas.fillStyle=this.BGColor;
@@ -8443,6 +8523,14 @@ function ChartVScrollbar()
8443
8523
  this.LastStatus.Draw=true;
8444
8524
  }
8445
8525
 
8526
+ this.DrawScrollbar=function(left, top, right, bottom)
8527
+ {
8528
+ if (this.Style==1)
8529
+ this.DrawScrollbarStyle2(left, top, right, bottom);
8530
+ else
8531
+ this.DrawScrollbarStyle(left, top, right, bottom);
8532
+ }
8533
+
8446
8534
  this.OnMouseDown=function(x,y, e)
8447
8535
  {
8448
8536
  return this.PtInScroll(x,y);
@@ -5061,13 +5061,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5061
5061
  {
5062
5062
  let indexInfo = scriptData.Get(item.Index);
5063
5063
  if (!indexInfo) continue;
5064
+ JSIndexScript.ModifyAttribute(indexInfo, item);
5064
5065
  indexInfo.ID=item.Index;
5065
- var args=indexInfo.Args;
5066
- if (item.Args) args=item.Args;
5067
- if (item.IsShortTitle) indexInfo.IsShortTitle=item.IsShortTitle;
5068
- if (item.TitleFont) indexInfo.TitleFont=item.TitleFont;
5069
- if (IFrameSplitOperator.IsBool(item.IsSync)) indexInfo.IsSync=item.IsSync;
5070
- chart.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, args,indexInfo); //脚本执行
5066
+ chart.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, indexInfo.Args,indexInfo); //脚本执行
5071
5067
  if (item.StringFormat>0) chart.WindowIndex[index].StringFormat=item.StringFormat;
5072
5068
  if (item.FloatPrecision>=0) chart.WindowIndex[index].FloatPrecision=item.FloatPrecision;
5073
5069
  }
@@ -130276,7 +130272,7 @@ function JSReportChartContainer(uielement)
130276
130272
  var scrollbar=chart.VScrollbar;
130277
130273
  if (!scrollbar) return;
130278
130274
 
130279
- if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
130275
+ scrollbar.SetOption(option);
130280
130276
  }
130281
130277
 
130282
130278
  this.SetSelectedTab=function(index, opiton)
@@ -133506,10 +133502,17 @@ function ChartReport()
133506
133502
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);
133507
133503
  if (!fieldName) return;
133508
133504
 
133509
- var text=data[fieldName];
133510
- if (!IFrameSplitOperator.IsString(text)) return;
133511
-
133512
- drawInfo.Text=text;
133505
+ var item=data[fieldName];
133506
+ if (IFrameSplitOperator.IsObject(item))
133507
+ {
133508
+ if (item.Text) drawInfo.Text=item.Text;
133509
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
133510
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
133511
+ }
133512
+ else if (IFrameSplitOperator.IsString(item))
133513
+ {
133514
+ drawInfo.Text=item;
133515
+ }
133513
133516
  }
133514
133517
 
133515
133518
  this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
@@ -135527,15 +135530,37 @@ function ChartVScrollbar()
135527
135530
  this.LastStatus={ Draw:false, };
135528
135531
  this.GlobalOption;
135529
135532
 
135533
+ this.Style=0; //0=滚动条+按钮 1=滚动条
135534
+
135530
135535
  this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
135531
135536
  this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
135532
135537
  this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
135533
135538
  this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
135534
135539
  this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
135535
- this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
135540
+ this.Margin={ Left:2, Right:2, Top:2, Bottom:2 };
135536
135541
  this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
135537
135542
 
135538
135543
  this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
135544
+
135545
+ //this.BarWithConfig.Size=2;
135546
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
135547
+
135548
+ this.SetOption=function(option)
135549
+ {
135550
+ if (!option) return;
135551
+
135552
+ if (IFrameSplitOperator.IsBool(option.Enable)) this.Enable=option.Enable;
135553
+ if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
135554
+ if (IFrameSplitOperator.IsNumber(option.BarWidth)) this.BarWithConfig.Size=option.BarWidth;
135555
+ if (option.Margin)
135556
+ {
135557
+ var item=option.Margin;
135558
+ if (IFrameSplitOperator.IsNumber(item.Top)) this.Margin.Top=item.Top;
135559
+ if (IFrameSplitOperator.IsNumber(item.Bottom)) this.Margin.Bottom=item.Bottom;
135560
+ if (IFrameSplitOperator.IsNumber(item.Left)) this.Margin.Left=item.Left;
135561
+ if (IFrameSplitOperator.IsNumber(item.Right)) this.Margin.Right=item.Right;
135562
+ }
135563
+ }
135539
135564
 
135540
135565
  this.ReloadResource=function(resource)
135541
135566
  {
@@ -135551,11 +135576,62 @@ function ChartVScrollbar()
135551
135576
  {
135552
135577
  var pixelRatio=GetDevicePixelRatio();
135553
135578
 
135554
- var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
135579
+ var width=this.BarWithConfig.Size*pixelRatio+this.Margin.Left+this.Margin.Right;
135555
135580
  this.ButtonSize=Math.min(25, width);
135556
135581
  }
135557
135582
 
135558
- this.DrawScrollbar=function(left, top, right, bottom)
135583
+ //不带上下按钮的滚动条样式
135584
+ this.DrawScrollbarStyle2=function(left, top, right, bottom)
135585
+ {
135586
+ this.LastStatus.Draw=false;
135587
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
135588
+ if (!this.Enable) return;
135589
+
135590
+ var isShow=this.IsShowCallback();
135591
+ if (!isShow) return;
135592
+
135593
+ var pageInfo=this.Report.GetCurrentPageStatus();
135594
+ if (pageInfo.IsSinglePage) return;
135595
+
135596
+ var xOffset=pageInfo.Start;
135597
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
135598
+ var buttonSize=this.ButtonSize;
135599
+
135600
+ this.MaxPos=dataCount;
135601
+ this.CurrentPos=xOffset;
135602
+
135603
+ var scrollTop=top+this.Margin.Top+2;
135604
+ var scrollBottom=bottom-this.Margin.Bottom-2;
135605
+ var centerHeight=scrollBottom-scrollTop;
135606
+ var value = centerHeight - this.ScrollBarHeight;
135607
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
135608
+ var y = scrollTop + 2 + yOffset;
135609
+
135610
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135611
+ rtBar.Left=rtBar.Right-buttonSize;
135612
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
135613
+ if (rtBar.Bottom>scrollBottom-2)
135614
+ {
135615
+ rtBar.Bottom=scrollBottom-2;
135616
+ rtBar.Top=rtBar.Bottom-rtBar.Height;
135617
+ }
135618
+
135619
+ this.RectScroll.Bar=rtBar;
135620
+ this.RectScroll.Client={ Left:rtBar.Left, Right: rtBar.Right, Top:scrollTop, Bottom:scrollBottom };
135621
+
135622
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135623
+ rtBG.Left=rtBG.Right-rtBG.Width;
135624
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
135625
+ this.Canvas.fillStyle=this.BGColor;
135626
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
135627
+
135628
+ this.Canvas.fillStyle=this.BarColor;
135629
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
135630
+
135631
+ this.LastStatus.Draw=true;
135632
+ }
135633
+
135634
+ this.DrawScrollbarStyle=function(left, top, right, bottom)
135559
135635
  {
135560
135636
  this.LastStatus.Draw=false;
135561
135637
  this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
@@ -135574,11 +135650,11 @@ function ChartVScrollbar()
135574
135650
  this.MaxPos=dataCount;
135575
135651
  this.CurrentPos=xOffset;
135576
135652
 
135577
- var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
135653
+ var rtTop={ Right:right-this.Margin.Right, Top:top+this.Margin.Top, Width:buttonSize, Height:buttonSize };
135578
135654
  rtTop.Left=rtTop.Right-buttonSize;
135579
135655
  rtTop.Bottom=rtTop.Top+buttonSize;
135580
135656
 
135581
- var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
135657
+ var rtBottom={ Right:right-this.Margin.Right, Bottom:bottom-this.Margin.Bottom, Width:buttonSize, Height:buttonSize };
135582
135658
  rtBottom.Left=rtBottom.Right-buttonSize;
135583
135659
  rtBottom.Top=rtBottom.Bottom-buttonSize;
135584
135660
 
@@ -135587,7 +135663,7 @@ function ChartVScrollbar()
135587
135663
  var yOffset = (value * this.CurrentPos) / this.MaxPos;
135588
135664
  var y = rtTop.Bottom + 2 + yOffset;
135589
135665
 
135590
- var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135666
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135591
135667
  rtBar.Left=rtBar.Right-buttonSize;
135592
135668
  rtBar.Bottom=rtBar.Top+rtBar.Height;
135593
135669
  if (rtBar.Bottom>rtBottom.Top-2)
@@ -135601,7 +135677,7 @@ function ChartVScrollbar()
135601
135677
  this.RectScroll.Bar=rtBar;
135602
135678
  this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
135603
135679
 
135604
- var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
135680
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135605
135681
  rtBG.Left=rtBG.Right-rtBG.Width;
135606
135682
  rtBG.Height=rtBG.Bottom-rtBG.Top;
135607
135683
  this.Canvas.fillStyle=this.BGColor;
@@ -135621,6 +135697,14 @@ function ChartVScrollbar()
135621
135697
  this.LastStatus.Draw=true;
135622
135698
  }
135623
135699
 
135700
+ this.DrawScrollbar=function(left, top, right, bottom)
135701
+ {
135702
+ if (this.Style==1)
135703
+ this.DrawScrollbarStyle2(left, top, right, bottom);
135704
+ else
135705
+ this.DrawScrollbarStyle(left, top, right, bottom);
135706
+ }
135707
+
135624
135708
  this.OnMouseDown=function(x,y, e)
135625
135709
  {
135626
135710
  return this.PtInScroll(x,y);
@@ -139173,7 +139257,7 @@ function ScrollBarBGChart()
139173
139257
 
139174
139258
 
139175
139259
 
139176
- var HQCHART_VERSION="1.1.14032";
139260
+ var HQCHART_VERSION="1.1.14039";
139177
139261
 
139178
139262
  function PrintHQChartVersion()
139179
139263
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14032";
8
+ var HQCHART_VERSION="1.1.14039";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -5105,13 +5105,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5105
5105
  {
5106
5106
  let indexInfo = scriptData.Get(item.Index);
5107
5107
  if (!indexInfo) continue;
5108
+ JSIndexScript.ModifyAttribute(indexInfo, item);
5108
5109
  indexInfo.ID=item.Index;
5109
- var args=indexInfo.Args;
5110
- if (item.Args) args=item.Args;
5111
- if (item.IsShortTitle) indexInfo.IsShortTitle=item.IsShortTitle;
5112
- if (item.TitleFont) indexInfo.TitleFont=item.TitleFont;
5113
- if (IFrameSplitOperator.IsBool(item.IsSync)) indexInfo.IsSync=item.IsSync;
5114
- chart.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, args,indexInfo); //脚本执行
5110
+ chart.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, indexInfo.Args,indexInfo); //脚本执行
5115
5111
  if (item.StringFormat>0) chart.WindowIndex[index].StringFormat=item.StringFormat;
5116
5112
  if (item.FloatPrecision>=0) chart.WindowIndex[index].FloatPrecision=item.FloatPrecision;
5117
5113
  }
@@ -130320,7 +130316,7 @@ function JSReportChartContainer(uielement)
130320
130316
  var scrollbar=chart.VScrollbar;
130321
130317
  if (!scrollbar) return;
130322
130318
 
130323
- if (IFrameSplitOperator.IsBool(option.Enable)) scrollbar.Enable=option.Enable;
130319
+ scrollbar.SetOption(option);
130324
130320
  }
130325
130321
 
130326
130322
  this.SetSelectedTab=function(index, opiton)
@@ -133550,10 +133546,17 @@ function ChartReport()
133550
133546
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);
133551
133547
  if (!fieldName) return;
133552
133548
 
133553
- var text=data[fieldName];
133554
- if (!IFrameSplitOperator.IsString(text)) return;
133555
-
133556
- drawInfo.Text=text;
133549
+ var item=data[fieldName];
133550
+ if (IFrameSplitOperator.IsObject(item))
133551
+ {
133552
+ if (item.Text) drawInfo.Text=item.Text;
133553
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
133554
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
133555
+ }
133556
+ else if (IFrameSplitOperator.IsString(item))
133557
+ {
133558
+ drawInfo.Text=item;
133559
+ }
133557
133560
  }
133558
133561
 
133559
133562
  this.FormaTimeDrawInfo=function(column, stock, drawInfo, data)
@@ -135571,15 +135574,37 @@ function ChartVScrollbar()
135571
135574
  this.LastStatus={ Draw:false, };
135572
135575
  this.GlobalOption;
135573
135576
 
135577
+ this.Style=0; //0=滚动条+按钮 1=滚动条
135578
+
135574
135579
  this.ScrollBarHeight=g_JSChartResource.Report.VScrollbar.ScrollBarHeight;
135575
135580
  this.ButtonColor=g_JSChartResource.Report.VScrollbar.ButtonColor;
135576
135581
  this.BarColor=g_JSChartResource.Report.VScrollbar.BarColor;
135577
135582
  this.BorderColor=g_JSChartResource.Report.VScrollbar.BorderColor;
135578
135583
  this.BGColor=g_JSChartResource.Report.VScrollbar.BGColor;
135579
- this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
135584
+ this.Margin={ Left:2, Right:2, Top:2, Bottom:2 };
135580
135585
  this.BarWithConfig={ Size:g_JSChartResource.Report.VScrollbar.BarWidth.Size };
135581
135586
 
135582
135587
  this.RectScroll={ Top:null, Bottom:null, Bar:null, Client:null }; //滚动条区域
135588
+
135589
+ //this.BarWithConfig.Size=2;
135590
+ //this.Mergin={ Left:1, Right:1, Top:1, Bottom:1 };
135591
+
135592
+ this.SetOption=function(option)
135593
+ {
135594
+ if (!option) return;
135595
+
135596
+ if (IFrameSplitOperator.IsBool(option.Enable)) this.Enable=option.Enable;
135597
+ if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
135598
+ if (IFrameSplitOperator.IsNumber(option.BarWidth)) this.BarWithConfig.Size=option.BarWidth;
135599
+ if (option.Margin)
135600
+ {
135601
+ var item=option.Margin;
135602
+ if (IFrameSplitOperator.IsNumber(item.Top)) this.Margin.Top=item.Top;
135603
+ if (IFrameSplitOperator.IsNumber(item.Bottom)) this.Margin.Bottom=item.Bottom;
135604
+ if (IFrameSplitOperator.IsNumber(item.Left)) this.Margin.Left=item.Left;
135605
+ if (IFrameSplitOperator.IsNumber(item.Right)) this.Margin.Right=item.Right;
135606
+ }
135607
+ }
135583
135608
 
135584
135609
  this.ReloadResource=function(resource)
135585
135610
  {
@@ -135595,11 +135620,12 @@ function ChartVScrollbar()
135595
135620
  {
135596
135621
  var pixelRatio=GetDevicePixelRatio();
135597
135622
 
135598
- var width=this.BarWithConfig.Size*pixelRatio+this.Mergin.Left+this.Mergin.Right;
135623
+ var width=this.BarWithConfig.Size*pixelRatio+this.Margin.Left+this.Margin.Right;
135599
135624
  this.ButtonSize=Math.min(25, width);
135600
135625
  }
135601
135626
 
135602
- this.DrawScrollbar=function(left, top, right, bottom)
135627
+ //不带上下按钮的滚动条样式
135628
+ this.DrawScrollbarStyle2=function(left, top, right, bottom)
135603
135629
  {
135604
135630
  this.LastStatus.Draw=false;
135605
135631
  this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
@@ -135618,11 +135644,61 @@ function ChartVScrollbar()
135618
135644
  this.MaxPos=dataCount;
135619
135645
  this.CurrentPos=xOffset;
135620
135646
 
135621
- var rtTop={ Right:right-this.Mergin.Right, Top:top+this.Mergin.Top, Width:buttonSize, Height:buttonSize };
135647
+ var scrollTop=top+this.Margin.Top+2;
135648
+ var scrollBottom=bottom-this.Margin.Bottom-2;
135649
+ var centerHeight=scrollBottom-scrollTop;
135650
+ var value = centerHeight - this.ScrollBarHeight;
135651
+ var yOffset = (value * this.CurrentPos) / this.MaxPos;
135652
+ var y = scrollTop + 2 + yOffset;
135653
+
135654
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135655
+ rtBar.Left=rtBar.Right-buttonSize;
135656
+ rtBar.Bottom=rtBar.Top+rtBar.Height;
135657
+ if (rtBar.Bottom>scrollBottom-2)
135658
+ {
135659
+ rtBar.Bottom=scrollBottom-2;
135660
+ rtBar.Top=rtBar.Bottom-rtBar.Height;
135661
+ }
135662
+
135663
+ this.RectScroll.Bar=rtBar;
135664
+ this.RectScroll.Client={ Left:rtBar.Left, Right: rtBar.Right, Top:scrollTop, Bottom:scrollBottom };
135665
+
135666
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135667
+ rtBG.Left=rtBG.Right-rtBG.Width;
135668
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
135669
+ this.Canvas.fillStyle=this.BGColor;
135670
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
135671
+
135672
+ this.Canvas.fillStyle=this.BarColor;
135673
+ this.Canvas.fillRect(rtBar.Left,rtBar.Top,rtBar.Width,rtBar.Height);
135674
+
135675
+ this.LastStatus.Draw=true;
135676
+ }
135677
+
135678
+ this.DrawScrollbarStyle=function(left, top, right, bottom)
135679
+ {
135680
+ this.LastStatus.Draw=false;
135681
+ this.RectScroll={ Left:null, Right:null, Bar:null, Client:null };
135682
+ if (!this.Enable) return;
135683
+
135684
+ var isShow=this.IsShowCallback();
135685
+ if (!isShow) return;
135686
+
135687
+ var pageInfo=this.Report.GetCurrentPageStatus();
135688
+ if (pageInfo.IsSinglePage) return;
135689
+
135690
+ var xOffset=pageInfo.Start;
135691
+ var dataCount=pageInfo.DataCount-pageInfo.PageSize;
135692
+ var buttonSize=this.ButtonSize;
135693
+
135694
+ this.MaxPos=dataCount;
135695
+ this.CurrentPos=xOffset;
135696
+
135697
+ var rtTop={ Right:right-this.Margin.Right, Top:top+this.Margin.Top, Width:buttonSize, Height:buttonSize };
135622
135698
  rtTop.Left=rtTop.Right-buttonSize;
135623
135699
  rtTop.Bottom=rtTop.Top+buttonSize;
135624
135700
 
135625
- var rtBottom={ Right:right-this.Mergin.Right, Bottom:bottom-this.Mergin.Bottom, Width:buttonSize, Height:buttonSize };
135701
+ var rtBottom={ Right:right-this.Margin.Right, Bottom:bottom-this.Margin.Bottom, Width:buttonSize, Height:buttonSize };
135626
135702
  rtBottom.Left=rtBottom.Right-buttonSize;
135627
135703
  rtBottom.Top=rtBottom.Bottom-buttonSize;
135628
135704
 
@@ -135631,7 +135707,7 @@ function ChartVScrollbar()
135631
135707
  var yOffset = (value * this.CurrentPos) / this.MaxPos;
135632
135708
  var y = rtTop.Bottom + 2 + yOffset;
135633
135709
 
135634
- var rtBar = {Right:right-this.Mergin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135710
+ var rtBar = {Right:right-this.Margin.Right, Top:y, Width:buttonSize, Height: this.ScrollBarHeight };
135635
135711
  rtBar.Left=rtBar.Right-buttonSize;
135636
135712
  rtBar.Bottom=rtBar.Top+rtBar.Height;
135637
135713
  if (rtBar.Bottom>rtBottom.Top-2)
@@ -135645,7 +135721,7 @@ function ChartVScrollbar()
135645
135721
  this.RectScroll.Bar=rtBar;
135646
135722
  this.RectScroll.Client={ Left:rtTop.Left, Right: rtTop.Right, Top:rtTop.Bottom, Bottom:rtBottom.Top };
135647
135723
 
135648
- var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Mergin.Right+this.Mergin.Left };
135724
+ var rtBG={ Right:right, Top:top, Bottom:bottom, Width:buttonSize+this.Margin.Right+this.Margin.Left };
135649
135725
  rtBG.Left=rtBG.Right-rtBG.Width;
135650
135726
  rtBG.Height=rtBG.Bottom-rtBG.Top;
135651
135727
  this.Canvas.fillStyle=this.BGColor;
@@ -135665,6 +135741,14 @@ function ChartVScrollbar()
135665
135741
  this.LastStatus.Draw=true;
135666
135742
  }
135667
135743
 
135744
+ this.DrawScrollbar=function(left, top, right, bottom)
135745
+ {
135746
+ if (this.Style==1)
135747
+ this.DrawScrollbarStyle2(left, top, right, bottom);
135748
+ else
135749
+ this.DrawScrollbarStyle(left, top, right, bottom);
135750
+ }
135751
+
135668
135752
  this.OnMouseDown=function(x,y, e)
135669
135753
  {
135670
135754
  return this.PtInScroll(x,y);
@@ -145918,7 +146002,7 @@ function HQChartScriptWorker()
145918
146002
 
145919
146003
 
145920
146004
 
145921
- var HQCHART_VERSION="1.1.14032";
146005
+ var HQCHART_VERSION="1.1.14039";
145922
146006
 
145923
146007
  function PrintHQChartVersion()
145924
146008
  {