hqchart 1.1.14276 → 1.1.14280
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.
- package/lib/umychart.vue.js +10 -7
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +39 -0
- package/src/jscommon/umychart.complier.js +13 -0
- package/src/jscommon/umychart.report.js +128 -0
- package/src/jscommon/umychart.testdata.js +39 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +142 -1
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +39 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +142 -1
package/lib/umychart.vue.js
CHANGED
|
@@ -11707,6 +11707,7 @@ if(item.isexdata==true)outVarItem.IsExData=true;if(item.BreakPoint)outVarItem.Br
|
|
|
11707
11707
|
drawItem.Color=draw.Color;drawItem.Radius=draw.Radius;outVarItem.Draw=drawItem;result.push(outVarItem);}else if(draw.DrawType==SCRIPT_CHART_NAME.KLINE_TABLE){drawItem.Name=draw.Name;drawItem.Type=draw.Type;drawItem.DrawType=draw.DrawType;drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);drawItem.RowCount=draw.RowCount;drawItem.RowName=draw.RowName;drawItem.IsShowRowName=draw.IsShowRowName;drawItem.BGColor=draw.BGColor;outVarItem.Draw=drawItem;result.push(outVarItem);}else if(draw.DrawType=='MULTI_TEXT'){drawItem.Text=draw.Text;drawItem.Name=draw.Name;drawItem.DrawType=draw.DrawType;drawItem.DrawData=this.FittingMultiText(draw.DrawData,date,time,hqChart);this.GetKLineData(drawItem.DrawData,hqChart);outVarItem.Draw=drawItem;result.push(outVarItem);}else if(draw.DrawType=='MULTI_SVGICON'){drawItem.Text=draw.Text;drawItem.Name=draw.Name;drawItem.DrawType=draw.DrawType;drawItem.DrawData={Icon:draw.DrawData.Icon,Family:draw.DrawData.Family};outVarItem.Draw=drawItem;result.push(outVarItem);}else if(draw.DrawType=='DRAWSVG'){drawItem.Text=draw.Text;drawItem.Name=draw.Name;drawItem.DrawType=draw.DrawType;if(draw.AutoPosition)drawItem.AutoPosition=draw.AutoPosition;drawItem.DrawData={Data:this.FittingMultiText(draw.Data,date,time,hqChart),Family:draw.Family,TextFont:draw.TextFont,EnableTooltip:draw.EnableTooltip,IsDrawFirst:draw.IsDrawFirst};this.GetKLineData(drawItem.DrawData.Data,hqChart);outVarItem.Draw=drawItem;result.push(outVarItem);}else if(draw.DrawType=="MULTI_HTMLDOM")//外部自己创建dom
|
|
11708
11708
|
{drawItem.Text=draw.Text;drawItem.Name=draw.Name;drawItem.DrawType=draw.DrawType;drawItem.Callback=draw.Callback;drawItem.DrawData=this.FittingMultiText(draw.DrawData,date,time,hqChart);this.GetKLineData(drawItem.DrawData,hqChart);outVarItem.Draw=drawItem;result.push(outVarItem);}else if(draw.DrawType=="COLOR_KLINE"){drawItem.Text=draw.Text;drawItem.Name=draw.Name;drawItem.DrawType=draw.DrawType;var klineOption=this.FittingMultiText(draw.DrawData.KLine,date,time,hqChart);var mapKLineOption=new _map2.default();for(var i in klineOption){var item=klineOption[i];mapKLineOption.set(item.Index,item);}drawItem.DrawData={KLine:mapKLineOption};if(draw.Color)outVarItem.Color=draw.Color;outVarItem.Draw=drawItem;result.push(outVarItem);}else if(draw.DrawType=="KLINE_BG"){drawItem.Name=draw.Name;drawItem.DrawType=draw.DrawType;drawItem.DrawData={};drawItem.DrawData.Color=draw.Color;drawItem.DrawData.Angle=draw.Angle;if(draw.Ver==2.0)drawItem.DrawData.Data=this.FittingKLineBG_V2(draw.DrawData,hqChart);else drawItem.DrawData.Data=this.FittingKLineBG(draw.DrawData,hqChart);outVarItem.Draw=drawItem;outVarItem.Name=draw.DrawType;result.push(outVarItem);}else if(draw.DrawType=='MULTI_POINT_LINE'){drawItem.Name=draw.Name;drawItem.DrawType=draw.DrawType;drawItem.DrawData={};drawItem.DrawData.Color=draw.Color;drawItem.DrawData.PointRadius=draw.PointRadius;drawItem.DrawData.PointColor=draw.PointColor;drawItem.DrawData.LineWidth=draw.LineWidth;drawItem.DrawData.Data=this.FittingMultiPointLine(draw.DrawData,hqChart);outVarItem.Draw=drawItem;//outVarItem.Name=draw.DrawType;
|
|
11709
11709
|
result.push(outVarItem);}else if(draw.DrawType=="PARTLINE"){drawItem.Name=draw.Name;drawItem.Type=draw.Type;drawItem.DrawType=draw.DrawType;drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);outVarItem.Draw=drawItem;if(draw.LineWidth)outVarItem.LineWidth=draw.LineWidth;result.push(outVarItem);}else if(draw.DrawType==SCRIPT_CHART_NAME.CLIP_COLOR_STICK){drawItem.Name=draw.Name;drawItem.Type=draw.Type;drawItem.DrawType=draw.DrawType;drawItem.DrawData=this.FittingArray(draw.Data,date,time,hqChart);outVarItem.Draw=drawItem;if(draw.LineWidth)outVarItem.LineWidth=draw.LineWidth;if(draw.UpColor)outVarItem.UpColor=draw.UpColor;if(draw.DownColor)outVarItem.DownColor=draw.DownColor;result.push(outVarItem);}else if(draw.DrawType=="DRAWCOLORKLINE"){drawItem.Name=draw.Name;drawItem.Type=draw.Type;drawItem.DrawType=draw.DrawType;drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);outVarItem.Draw=drawItem;if(draw.Color)drawItem.Color=draw.Color;if(IFrameSplitOperator.IsBool(draw.IsEmptyBar))drawItem.IsEmptyBar=draw.IsEmptyBar;result.push(outVarItem);}else if(draw.DrawType=="DRAWTEXTREL"||draw.DrawType=="DRAWTEXTABS"){drawItem.Name=draw.Name;drawItem.Type=draw.Type;drawItem.DrawType=draw.DrawType;drawItem.DrawData=draw.DrawData;//{ Point: { X: 5,Y: 5 }, Text: "注意(居中):前方高能!!!!!" }
|
|
11710
|
+
outVarItem.Draw=drawItem;if(draw.Font)outVarItem.Font=draw.Font;result.push(outVarItem);}else if(draw.DrawType=="DRAWTEXT_LINE"){drawItem.Name=draw.Name;drawItem.Type=draw.Type;drawItem.DrawType=draw.DrawType;drawItem.DrawData=draw.DrawData;//{ Price:, Text:{ Title:text, Color:textcolor }, Line:{ Type:linetype, Color:linecolor } };
|
|
11710
11711
|
outVarItem.Draw=drawItem;if(draw.Font)outVarItem.Font=draw.Font;result.push(outVarItem);}else{var find=g_ScriptIndexChartFactory.Get(draw.DrawType);//外部挂接
|
|
11711
11712
|
if(find&&find.KLineFittingCallback){if(find.KLineFittingCallback(item,outVarItem,{Date:date,Time:time,HQChart:hqChart},this))result.push(outVarItem);}}}}return result;};// h, high, low l. c, close
|
|
11712
11713
|
this.GetKLineData=function(data,hqChart){if(!data)return;if(!Array.isArray(data))return;if(this.HQDataType==HQ_DATA_TYPE.MINUTE_ID||this.HQDataType==HQ_DATA_TYPE.MULTIDAY_MINUTE_ID)var kData=hqChart.SourceData;//走势图分钟数据
|
|
@@ -12575,6 +12576,7 @@ CUSTOM_CHECKBOX_ID:104,//自定义checkbox
|
|
|
12575
12576
|
CUSTOM_BUTTON_ID:105,//自定义按钮
|
|
12576
12577
|
CUSTOM_PROGRESS_ID:106,//进度条
|
|
12577
12578
|
CUSTOM_LINK_ID:107,//链接
|
|
12579
|
+
MULTI_LINE_CONTAINER:108,//多行组合输出
|
|
12578
12580
|
//预留数值类型 10个
|
|
12579
12581
|
RESERVE_NUMBER1_ID:201,//ReserveNumber1:
|
|
12580
12582
|
RESERVE_NUMBER2_ID:202,RESERVE_NUMBER3_ID:203,RESERVE_NUMBER4_ID:204,RESERVE_NUMBER5_ID:205,RESERVE_NUMBER6_ID:206,RESERVE_NUMBER7_ID:207,RESERVE_NUMBER8_ID:208,RESERVE_NUMBER9_ID:209,RESERVE_NUMBER10_ID:210,//预留字符串类型 10个 301-399
|
|
@@ -12679,14 +12681,15 @@ if(IFrameSplitOperator.IsNumber(item.ValueType))colItem.FormatType=item.ValueTyp
|
|
|
12679
12681
|
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.CheckBox)colItem.CheckBox=CloneData(item.CheckBox);else colItem.CheckBox=this.CheckBoxConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))return null;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12680
12682
|
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.Button)colItem.Button=CloneData(item.Button);else colItem.Button=this.ButtonConfig;}else if(this.IsReserveButtonColumn(item.Type)){if(item.Button)colItem.Button=CloneData(item.Button);else colItem.Button=this.ButtonConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))return null;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12681
12683
|
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.ProgressBar)colItem.ProgressBar=CloneData(item.ProgressBar);else colItem.ProgressBar=this.ProgressBarConfig;}else if(this.IsReserveProgressBarColumn(item.Type)){if(item.ProgressBar)colItem.ProgressBar=CloneData(item.ProgressBar);else colItem.ProgressBar=this.ProgressBarConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){if(!IFrameSplitOperator.IsNumber(item.DataIndex)&&!IFrameSplitOperator.IsNumber(item.BlockIndex))return null;if(IFrameSplitOperator.IsNumber(item.DataIndex))colItem.DataIndex=item.DataIndex;//数据在扩展数据索引列
|
|
12682
|
-
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.Link)colItem.Link=CloneData(item.Link);else colItem.Link=this.LinkConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){}else if(item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){if(IFrameSplitOperator.IsBool(item.IsDrawArea))colItem.IsDrawArea=item.IsDrawArea;}else if(item.Type==REPORT_COLUMN_ID.TIME_ID){if(IFrameSplitOperator.IsNumber(item.ValueType))colItem.ValueType=item.ValueType;}else if(item.Type==REPORT_COLUMN_ID.DATE_ID){if(IFrameSplitOperator.IsNumber(item.FormatType))colItem.FormatType=item.FormatType;}return colItem;};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.CreateColumnItem(item);if(!colItem)continue;this.Column.push(colItem);}};this.SwapColumn=function(leftIndex,rightIndex){if(!IFrameSplitOperator.IsNumber(leftIndex)||!IFrameSplitOperator.IsNumber(rightIndex))return false;var count=this.Column.length;if(leftIndex<0||leftIndex>=count)return false;if(rightIndex<0||rightIndex>=count)return false;if(leftIndex==rightIndex)return;var tempItem=this.Column[leftIndex];this.Column[leftIndex]=this.Column[rightIndex];this.Column[rightIndex]=tempItem;return true;};this.DeleteColumn=function(index){if(!IFrameSplitOperator.IsNonEmptyArray(this.Column))return false;if(index<0||index>=this.Column.length)return false;this.Column.splice(index,1);return true;};this.ChangeColumn=function(index,newColumn){if(index<0||index>=this.Column.length)return false;var colItem=this.CreateColumnItem(newColumn);if(!colItem)return false;this.Column[index]=colItem;return true;};this.GetXScrollPos=function(){return this.Data.XOffset;};this.GetXScrollRange=function(){var maxOffset=this.Column.length-this.FixedColumn-3;if(maxOffset<0)return 0;return maxOffset;};this.GetYScrollRange=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return 0;var dataCount=this.GetAllRowCount();var maxOffset=dataCount-this.RowCount;return maxOffset;};this.GetDefaultColunm=function(id){var DEFAULT_COLUMN=[{Type:REPORT_COLUMN_ID.INDEX_ID,Title:"序号",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Index,MaxText:"8888"},{Type:REPORT_COLUMN_ID.SYMBOL_ID,Title:"代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Symbol,MaxText:"888888"},{Type:REPORT_COLUMN_ID.NAME_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.NAME_EX_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_ID,Title:"股票名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID,Title:"名称/代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.NameSymbolV2.Name.Color,MaxText:"擎擎擎擎*",MaxText2:"999999",Space:5,TextColor2:g_JSChartResource.Report.NameSymbolV2.Symbol.Color},{Type:REPORT_COLUMN_ID.INCREASE_ID,Title:"涨幅%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.PRICE_ID,Title:"现价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.UPDOWN_ID,Title:"涨跌",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.AMPLITUDE_ID,Title:"振幅%",TextAlign:"right",Width:null,MaxText:"888.88"},{Type:REPORT_COLUMN_ID.BUY_PRICE_ID,Title:"买价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.SELL_PRICE_ID,Title:"卖价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.AVERAGE_PRICE_ID,Title:"均价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.OPEN_ID,Title:"今开",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.HIGH_ID,Title:"最高",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.LOW_ID,Title:"最低",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.YCLOSE_ID,Title:"昨收",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.VOL_ID,Title:"总量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.AMOUNT_ID,Title:"总金额",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Amount,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.EXCHANGE_RATE_ID,Title:"换手%",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"88.88擎"},{Type:REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID,Title:"流通股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.TOTAL_SHARES_ID,Title:"总股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID,Title:"流通市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.MARKET_VALUE_ID,Title:"总市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_IN_ID,Title:"内盘",TextAlign:"right",TextColor:g_JSChartResource.Report.DownTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_OUT_ID,Title:"外盘",TextAlign:"right",TextColor:g_JSChartResource.Report.UpTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CLOSE_LINE_ID,Title:"走势",TextAlign:"center",TextColor:g_JSChartResource.Report.CloseLineColor,Width:null,MaxText:"88888.88888"},{Type:REPORT_COLUMN_ID.BUY_VOL_ID,Title:"买量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.SELL_VOL_ID,Title:"卖量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},//{ Type:REPORT_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12684
|
+
if(IFrameSplitOperator.IsNumber(item.BlockIndex))colItem.BlockIndex=item.BlockIndex;if(item.Link)colItem.Link=CloneData(item.Link);else colItem.Link=this.LinkConfig;}else if(item.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){}else if(item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){if(IFrameSplitOperator.IsBool(item.IsDrawArea))colItem.IsDrawArea=item.IsDrawArea;}else if(item.Type==REPORT_COLUMN_ID.TIME_ID){if(IFrameSplitOperator.IsNumber(item.ValueType))colItem.ValueType=item.ValueType;}else if(item.Type==REPORT_COLUMN_ID.DATE_ID){if(IFrameSplitOperator.IsNumber(item.FormatType))colItem.FormatType=item.FormatType;}else if(item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){if(IFrameSplitOperator.IsNonEmptyArray(item.AryField))colItem.AryField=item.AryField.slice();}return colItem;};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.CreateColumnItem(item);if(!colItem)continue;this.Column.push(colItem);}};this.SwapColumn=function(leftIndex,rightIndex){if(!IFrameSplitOperator.IsNumber(leftIndex)||!IFrameSplitOperator.IsNumber(rightIndex))return false;var count=this.Column.length;if(leftIndex<0||leftIndex>=count)return false;if(rightIndex<0||rightIndex>=count)return false;if(leftIndex==rightIndex)return;var tempItem=this.Column[leftIndex];this.Column[leftIndex]=this.Column[rightIndex];this.Column[rightIndex]=tempItem;return true;};this.DeleteColumn=function(index){if(!IFrameSplitOperator.IsNonEmptyArray(this.Column))return false;if(index<0||index>=this.Column.length)return false;this.Column.splice(index,1);return true;};this.ChangeColumn=function(index,newColumn){if(index<0||index>=this.Column.length)return false;var colItem=this.CreateColumnItem(newColumn);if(!colItem)return false;this.Column[index]=colItem;return true;};this.GetXScrollPos=function(){return this.Data.XOffset;};this.GetXScrollRange=function(){var maxOffset=this.Column.length-this.FixedColumn-3;if(maxOffset<0)return 0;return maxOffset;};this.GetYScrollRange=function(){if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return 0;var dataCount=this.GetAllRowCount();var maxOffset=dataCount-this.RowCount;return maxOffset;};this.GetDefaultColunm=function(id){var DEFAULT_COLUMN=[{Type:REPORT_COLUMN_ID.INDEX_ID,Title:"序号",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Index,MaxText:"8888"},{Type:REPORT_COLUMN_ID.SYMBOL_ID,Title:"代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Symbol,MaxText:"888888"},{Type:REPORT_COLUMN_ID.NAME_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.NAME_EX_ID,Title:"名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_ID,Title:"股票名称",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Name,MaxText:"擎擎擎擎0"},{Type:REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID,Title:"名称/代码",TextAlign:"left",Width:null,TextColor:g_JSChartResource.Report.NameSymbolV2.Name.Color,MaxText:"擎擎擎擎*",MaxText2:"999999",Space:5,TextColor2:g_JSChartResource.Report.NameSymbolV2.Symbol.Color},{Type:REPORT_COLUMN_ID.INCREASE_ID,Title:"涨幅%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.PRICE_ID,Title:"现价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.UPDOWN_ID,Title:"涨跌",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.AMPLITUDE_ID,Title:"振幅%",TextAlign:"right",Width:null,MaxText:"888.88"},{Type:REPORT_COLUMN_ID.BUY_PRICE_ID,Title:"买价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.SELL_PRICE_ID,Title:"卖价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.AVERAGE_PRICE_ID,Title:"均价",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.OPEN_ID,Title:"今开",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.HIGH_ID,Title:"最高",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.LOW_ID,Title:"最低",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.YCLOSE_ID,Title:"昨收",TextAlign:"right",Width:null,MaxText:"88888.88"},{Type:REPORT_COLUMN_ID.VOL_ID,Title:"总量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.AMOUNT_ID,Title:"总金额",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Amount,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.EXCHANGE_RATE_ID,Title:"换手%",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"88.88擎"},{Type:REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID,Title:"流通股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.TOTAL_SHARES_ID,Title:"总股本",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID,Title:"流通市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.MARKET_VALUE_ID,Title:"总市值",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_IN_ID,Title:"内盘",TextAlign:"right",TextColor:g_JSChartResource.Report.DownTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.VOL_OUT_ID,Title:"外盘",TextAlign:"right",TextColor:g_JSChartResource.Report.UpTextColor,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.CLOSE_LINE_ID,Title:"走势",TextAlign:"center",TextColor:g_JSChartResource.Report.CloseLineColor,Width:null,MaxText:"88888.88888"},{Type:REPORT_COLUMN_ID.BUY_VOL_ID,Title:"买量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},{Type:REPORT_COLUMN_ID.SELL_VOL_ID,Title:"卖量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888.8擎"},//{ Type:REPORT_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12683
12685
|
//{ Type:REPORT_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
12684
|
-
{Type:REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CUSTOM_ICON_ID,Title:" ",TextAlign:"left",FixedWidth:20,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.KLINE_ID,Title:"K线",TextAlign:"left",FixedWidth:50,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.TIME_ID,Title:"时间",TextAlign:"left",ValueType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"99:99:99.999"},{Type:REPORT_COLUMN_ID.DATE_ID,Title:"日期",TextAlign:"left",FormatType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID,Title:"",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID,Title:"进度条",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID,Title:"链接地址",TextAlign:"center",MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.FUTURES_POSITION_ID,Title:"持仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_ID,Title:"结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_YCLOSE_ID,Title:"昨结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID,Title:"开仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID,Title:"平仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.RISING_SPEED_1M_ID,Title:"涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_3M_ID,Title:"3分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_5M_ID,Title:"5分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID,Title:"10分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID,Title:"15分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"}
|
|
12686
|
+
{Type:REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID,Title:"自定义",TextAlign:"center",Width:null,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CUSTOM_ICON_ID,Title:" ",TextAlign:"left",FixedWidth:20,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.KLINE_ID,Title:"K线",TextAlign:"left",FixedWidth:50,TextColor:g_JSChartResource.Report.FieldColor.Text},{Type:REPORT_COLUMN_ID.TIME_ID,Title:"时间",TextAlign:"left",ValueType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"99:99:99.999"},{Type:REPORT_COLUMN_ID.DATE_ID,Title:"日期",TextAlign:"left",FormatType:0,TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999-99-99"},{Type:REPORT_COLUMN_ID.CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID,Title:"",TextAlign:"center",FixedWidth:20*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_BUTTON_ID,Title:"",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID,Title:"进度条",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.CUSTOM_LINK_ID,Title:"链接地址",TextAlign:"center",MaxText:"擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.FUTURES_POSITION_ID,Title:"持仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Vol,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_ID,Title:"结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_YCLOSE_ID,Title:"昨结算价",TextAlign:"right",Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID,Title:"开仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID,Title:"平仓量",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,Width:null,MaxText:"8888888"},{Type:REPORT_COLUMN_ID.RISING_SPEED_1M_ID,Title:"涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_3M_ID,Title:"3分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_5M_ID,Title:"5分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID,Title:"10分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},{Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID,Title:"15分涨速%",TextAlign:"right",Width:null,MaxText:"-888.88"},//组合多行字段
|
|
12687
|
+
{Type:REPORT_COLUMN_ID.MULTI_LINE_CONTAINER,Title:"涨幅",TextAlign:"right",MaxText:"1000.00%",AryField:[{Type:REPORT_COLUMN_ID.PRICE_ID},{Type:REPORT_COLUMN_ID.INCREASE_ID,DynamicFormat:"{Value}%"}]},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,Title:"数值1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,Title:"数值2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,Title:"数值3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,Title:"数值4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,Title:"数值5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,Title:"数值6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,Title:"数值7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,Title:"数值8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,Title:"数值9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_NUMBER10_ID,Title:"数值10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"9999.99",FloatPrecision:2},{Type:REPORT_COLUMN_ID.RESERVE_STRING1_ID,Title:"文字1",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING2_ID,Title:"文字2",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING3_ID,Title:"文字3",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING4_ID,Title:"文字4",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING5_ID,Title:"文字5",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING6_ID,Title:"文字6",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING7_ID,Title:"文字7",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING8_ID,Title:"文字8",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING9_ID,Title:"文字9",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_STRING10_ID,Title:"文字10",TextAlign:"right",TextColor:g_JSChartResource.Report.FieldColor.Text,MaxText:"擎擎擎擎擎擎"},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,Title:"进度条1",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,Title:"进度条2",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,Title:"进度条3",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,Title:"进度条4",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,Title:"进度条5",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,Title:"进度条6",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,Title:"进度条7",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,Title:"进度条8",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,Title:"进度条9",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID,Title:"进度条10",TextAlign:"center",FixedWidth:100*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,Title:"按钮1",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,Title:"按钮2",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,Title:"按钮3",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,Title:"按钮4",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,Title:"按钮5",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,Title:"按钮6",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,Title:"按钮7",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,Title:"按钮8",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,Title:"按钮9",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()},{Type:REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,Title:"按钮10",TextAlign:"center",FixedWidth:50*GetDevicePixelRatio()}];for(var i=0;i<DEFAULT_COLUMN.length;++i){var item=DEFAULT_COLUMN[i];if(item.Type==id)return item;}return null;};this.ClipClient=function(){this.Canvas.save();this.Canvas.beginPath();this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,this.RectClient.Right-this.RectClient.Left,this.RectClient.Bottom-this.RectClient.Top);//this.Canvas.stroke(); //调试用
|
|
12685
12688
|
this.Canvas.clip();};this.Draw=function(lastMouseStatus){this.ShowSymbol=[];this.TooltipRect=[];this.ButtonRect=[];this.DevicePixelRatio=GetDevicePixelRatio();this.LastMouseStatus=lastMouseStatus;if(this.GlobalOption)this.GlobalOption.FlashBGCount=0;if(this.SizeChange)this.CalculateSize();else this.UpdateCacheData();this.ClipClient();this.DrawHeader();this.DrawBody();this.Canvas.restore();if(this.Tab&&this.BottomToolbarHeight>0){var bottom=this.ChartBorder.GetBottom();this.Tab.DrawTab(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);this.Tab.DrawScrollbar(this.RectClient.Left,bottom-this.BottomToolbarHeight,this.RectClient.Right,bottom);}this.ClipClient();this.DrawBorder();this.Canvas.restore();this.DrawDragRow();if(this.VScrollbar){var bottom=this.ChartBorder.GetBottom();this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+this.HeaderHeight,this.RectClient.Right,bottom-this.BottomToolbarHeight-4);}this.LastMouseStatus=null;this.SizeChange=false;};//更新缓存变量
|
|
12686
12689
|
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 是否重新计算
|
|
12687
12690
|
{if(recalculate)this.CalculateSize();var size=this.RowCount;return size;};this.GetCurrentPageStatus=function()//{ Start:起始索引, End:结束索引(数据), PageSize:页面可以显示几条记录, IsEnd:是否是最后一页, IsSinglePage:是否只有一页数据}
|
|
12688
12691
|
{var result={Start:this.Data.YOffset,PageSize:this.RowCount,IsEnd:false,SelectedRow:this.SelectedRow,IsSinglePage:false,DataCount:0,MultiSelectModel:this.MultiSelectModel};if(this.MultiSelectModel==1){result.SelectedRow=-1;result.MultiSelectedRow=this.MultiSelectedRow.slice();result.MultiSelectedRow.sort(function(left,right){return left>right;});}if(IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)){result.End=this.Data.YOffset+this.RowCount-1;result.IsSinglePage=this.Data.Data.length<=this.RowCount;result.DataCount=this.Data.Data.length;if(result.End>=this.Data.Data.length-1)result.IsEnd=true;if(result.End>=this.Data.Data.length)result.End=this.Data.Data.length-1;}else{result.Start=0;result.End=0;result.IsEnd=true;result.IsSinglePage=true;}return result;};this.CalculateSize=function()//计算大小
|
|
12689
|
-
{if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}if(this.VScrollbar&&this.VScrollbar.Enable)this.VScrollbar.CalculateSize();this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.NameSymbolFont.Symbol=this.NameSymbolV2Config.Symbol.Size*pixelRatio+'px '+this.NameSymbolV2Config.Symbol.Name;this.NameSymbolFont.Name=this.ItemSymbolFontConfig.Name.Size*pixelRatio+'px '+this.NameSymbolV2Config.Name.Name;this.ItemFontHeight=this.GetFontHeight(this.ItemFont,"擎");this.RowHeight=this.ItemFontHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=1;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.SortFont=this.SortConfig.Size*pixelRatio+'px '+this.SortConfig.Family;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.ItemSymbolHeight=symboHeight;this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=2;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID)//单行显示
|
|
12692
|
+
{if(this.Tab&&this.Tab.IsShow){this.Tab.CalculateSize();this.BottomToolbarHeight=this.Tab.Height;}else{this.BottomToolbarHeight=0;}if(this.VScrollbar&&this.VScrollbar.Enable)this.VScrollbar.CalculateSize();this.UpdateCacheData();var pixelRatio=GetDevicePixelRatio();this.HeaderFont=this.HeaderFontConfig.Size*pixelRatio+'px '+this.HeaderFontConfig.Name;this.ItemFont=this.ItemFontConfig.Size*pixelRatio+'px '+this.ItemFontConfig.Name;this.ItemFixedFont=this.ItemFixedFontConfg.Size*pixelRatio+'px '+this.ItemFixedFontConfg.Name;this.ItemSymbolFont=this.ItemSymbolFontConfig.Size*pixelRatio+'px '+this.ItemSymbolFontConfig.Name;this.ItemNameFont=this.ItemNameFontConfg.Size*pixelRatio+'px '+this.ItemNameFontConfg.Name;this.NameSymbolFont.Symbol=this.NameSymbolV2Config.Symbol.Size*pixelRatio+'px '+this.NameSymbolV2Config.Symbol.Name;this.NameSymbolFont.Name=this.ItemSymbolFontConfig.Name.Size*pixelRatio+'px '+this.NameSymbolV2Config.Name.Name;this.ItemFontHeight=this.GetFontHeight(this.ItemFont,"擎");this.RowHeight=this.ItemFontHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=1;this.FixedRowHeight=this.GetFontHeight(this.ItemFixedFont,"擎")+this.ItemMergin.Top+this.ItemMergin.Bottom;this.SortFont=this.SortConfig.Size*pixelRatio+'px '+this.SortConfig.Family;this.Canvas.font=this.ItemFont;var itemWidth=0;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.Canvas.font=this.ItemNameFont;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.ItemNameHeight=nameHeight;this.Canvas.font=this.ItemSymbolFont;var symbolWidth=this.Canvas.measureText(item.MaxText).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.ItemSymbolHeight=symboHeight;this.Canvas.font=this.ItemFont;itemWidth=Math.max(nameWidth,symbolWidth);item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;var rowHeight=nameHeight+symboHeight+this.ItemMergin.Top+this.ItemMergin.Bottom;this.ItemTextLines=2;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;this.ItemTextLines=item.AryField.length;var rowHeight=this.ItemFontHeight*item.AryField.length+this.ItemMergin.Top+this.ItemMergin.Bottom;if(rowHeight>this.RowHeight)this.RowHeight=rowHeight;if(rowHeight>this.FixedRowHeight)this.FixedRowHeight=rowHeight;}else if(item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID)//单行显示
|
|
12690
12693
|
{this.Canvas.font==this.NameSymbolFont.Name;var nameWidth=this.Canvas.measureText(item.MaxText).width;var nameHeight=this.GetFontHeight(this.ItemNameFont,"擎");this.Canvas.font==this.NameSymbolFont.Symbol;var symbolWidth=this.Canvas.measureText(item.MaxText2).width;var symboHeight=this.GetFontHeight(this.ItemSymbolFont,"擎");this.ItemNameHeight=Math.abs(nameHeight,symboHeight);var space=2;if(IFrameSplitOperator.IsNumber(item.Space))space=item.Space;itemWidth=nameWidth+symbolWidth+space;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}else{if(IFrameSplitOperator.IsNumber(item.FixedWidth))itemWidth=item.FixedWidth;else itemWidth=this.Canvas.measureText(item.MaxText).width;item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;}if(item.Icon&&item.Icon.Symbol){item.Width+=item.Icon.Size;if(item.Icon.Margin){var margin=item.Icon.Margin;if(IFrameSplitOperator.IsNumber(margin.Left))item.Width+=margin.Left;if(IFrameSplitOperator.IsNumber(margin.Right))item.Width+=margin.Right;}}}this.Canvas.font=this.HeaderFont;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];if(!item.Title||item.Title.length<=0)continue;var text=item.Title;itemWidth=this.Canvas.measureText(text).width;if(item.Sort>0)itemWidth+this.SortConfig.Size*pixelRatio;itemWidth+=4+this.HeaderMergin.Left+this.HeaderMergin.Right;if(item.Width<itemWidth)item.Width=itemWidth;}this.HeaderFontHeight=this.GetFontHeight(this.HeaderFont,"擎");if(this.HeaderRowCount<=1)//单行
|
|
12691
12694
|
{this.HeaderHeight=this.HeaderFontHeight+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);}else{this.HeaderHeight=this.HeaderFontHeight*this.HeaderRowCount+(this.HeaderMergin.Top+this.HeaderMergin.Bottom);}if(!this.IsShowHeader)this.HeaderHeight=0;if(this.FixedRowCount<=0)this.FixedRowHeight=0;this.RowCount=parseInt((this.RectClient.Bottom-this.RectClient.Top-this.HeaderHeight-this.FixedRowHeight*this.FixedRowCount)/this.RowHeight);var subWidth=0;var reportWidth=this.RectClient.Right-this.RectClient.Left;for(var i=0;i<this.Column.length;++i){var item=this.Column[i];subWidth+=item.Width;}this.IsShowAllColumn=subWidth<reportWidth;};this.DrawHeaderItem=function(column,rtCell,index){if(column.HeaderBGColor)//背景色
|
|
12692
12695
|
{this.DrawItemBG({Rect:rtCell,BGColor:column.HeaderBGColor});}var textWidth=rtCell.Width-this.HeaderMergin.Left-this.HeaderMergin.Right;//AryText=[ { Text:标题, Sort:{Type:排序}, Icon:图标 }]
|
|
@@ -12714,14 +12717,14 @@ var textTop=top;this.Canvas.font=this.ItemFixedFont;for(var i=0;i<this.FixedRowC
|
|
|
12714
12717
|
var sendData={RowIndex:i,Symbol:symbol,Out:null,Selected:selectedSymbol,MultiSelectModel:this.MultiSelectModel};eventDrawBG.Callback(eventDrawBG,sendData,this);if(sendData.Out&&sendData.Out.BGColor){this.Canvas.fillStyle=sendData.Out.BGColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);}}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.GetSelectedSymbol=function(){if(this.MultiSelectModel==1){if(!IFrameSplitOperator.IsNonEmptyArray(this.MultiSelectedRow))return null;var aryData=[];for(var i=0;i<this.MultiSelectedRow.length;++i){var item=this.Data.Data[this.MultiSelectedRow[i]];if(!item)continue;aryData.push(item);}return aryData;}else{if(this.SelectedRow<0)return null;var index=this.SelectedRow;if(this.SelectedModel==0)//当前屏选中
|
|
12715
12718
|
index=this.Data.YOffset+this.SelectedRow;var symbol=this.Data.Data[index];return[symbol];}};this.DrawFixedSymbolRow=function(top,dataIndex){var left=this.RectClient.Left;var chartRight=this.RectClient.Right;if(!this.FixedRowData||!IFrameSplitOperator.IsNonEmptyArray(this.FixedRowData.Symbol))return;var symbol=this.FixedRowData.Symbol[dataIndex];if(!symbol)return;this.DrawRow(symbol,top,dataIndex,1);this.ShowSymbol.push({Index:dataIndex,Symbol:symbol,RowType:1});};this.DrawFixedRow=function(top,dataIndex){var left=this.RectClient.Left;var chartRight=this.RectClient.Right;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawFixedItem(dataIndex,i,item,left,top);left+=item.Width;if(left>=chartRight)break;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];this.DrawFixedItem(dataIndex,i,item,left,top);left+=item.Width;if(left>=chartRight)break;}};this.DrawFixedItem=function(dataIndex,colIndex,column,left,top){var x=left+this.ItemMergin.Left;var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var drawInfo={Text:null,TextColor:column.TextColor,TextAlign:column.TextAlign};if(this.GetFixedRowTextDrawInfo(dataIndex,colIndex,column,drawInfo)){this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth);return;}if(!this.FixedRowData||!IFrameSplitOperator.IsNonEmptyArray(this.FixedRowData.Data))return;var data=this.FixedRowData.Data;var rowData=data[dataIndex];if(!IFrameSplitOperator.IsNonEmptyArray(rowData))return;var itemData=rowData[colIndex];if(!itemData||!itemData.Text)return;drawInfo.Text=itemData.Text;if(itemData.Color)drawInfo.TextColor=itemData.Color;if(itemData.TextAlign)drawInfo.TextAlign=itemData.TextAlign;this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth);};this.DrawRow=function(symbol,top,dataIndex,rowType)//rowType 0=表格行 1=顶部固定行 2=拖拽行
|
|
12716
12719
|
{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);//小数位数
|
|
12717
|
-
for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,rowType,i);left+=item.Width;if(left>=chartRight)break;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,rowType,i);left+=item.Width;if(left>=chartRight)break;}};this.DrawItem=function(index,data,column,left,top,rowType,columnIndex){var itemWidth=column.Width;var x=left+this.ItemMergin.Left;var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var stock=data.Stock;var drawInfo={Text:null,TextColor:column.TextColor,TextAlign:column.TextAlign,Tooltip:null,Index:index,ColumnIndex:columnIndex};var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;if(column.FullColBGColor){this.DrawItemBG({Rect:rtItem,BGColor:column.FullColBGColor});}if(column.Type==REPORT_COLUMN_ID.INDEX_ID){if(rowType==1)return;//固定行序号空
|
|
12720
|
+
for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,rowType,i);left+=item.Width;if(left>=chartRight)break;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,rowType,i);left+=item.Width;if(left>=chartRight)break;}};this.BuildSubCellTextData=function(subItem,column,stock,drawInfo,data,option){switch(subItem.Type){case REPORT_COLUMN_ID.NAME_ID:if(stock&&stock.Name)drawInfo.Text=stock.Name;else drawInfo.Text=data.Name;break;case REPORT_COLUMN_ID.SYMBOL_ID:if(stock&&stock.Symbol)drawInfo.Text=stock.Symbol;else drawInfo.Text=data.Symbol;break;case REPORT_COLUMN_ID.PRICE_ID:case REPORT_COLUMN_ID.OPEN_ID:case REPORT_COLUMN_ID.HIGH_ID:case REPORT_COLUMN_ID.LOW_ID:case REPORT_COLUMN_ID.YCLOSE_ID:case REPORT_COLUMN_ID.BUY_PRICE_ID:case REPORT_COLUMN_ID.SELL_PRICE_ID:case REPORT_COLUMN_ID.AVERAGE_PRICE_ID:case REPORT_COLUMN_ID.FUTURES_CLOSE_ID:case REPORT_COLUMN_ID.FUTURES_YCLOSE_ID:var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName]))this.GetPriceDrawInfo(stock[fieldName],stock,data,drawInfo,option);break;case REPORT_COLUMN_ID.INCREASE_ID:case REPORT_COLUMN_ID.AMPLITUDE_ID:case REPORT_COLUMN_ID.UPDOWN_ID:case REPORT_COLUMN_ID.RISING_SPEED_1M_ID:case REPORT_COLUMN_ID.RISING_SPEED_3M_ID:case REPORT_COLUMN_ID.RISING_SPEED_5M_ID:case REPORT_COLUMN_ID.RISING_SPEED_10M_ID:case REPORT_COLUMN_ID.RISING_SPEED_15M_ID:var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];var text=value.toFixed(2);if(subItem.DynamicFormat)text=subItem.DynamicFormat.replace('{Value}',text);drawInfo.Text=text;drawInfo.TextColor=this.GetUpDownColor(value,0);}break;}};this.DrawSubCellText=function(drawInfo,column,rtText){if(!drawInfo.Text)return;var text=drawInfo.Text;var x=rtText.Left;if(drawInfo.TextAlign=='center'){x=rtText.Left+rtText.Width/2;this.Canvas.textAlign="center";}else if(drawInfo.TextAlign=='right'){x=rtText.Left+rtText.Width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var bClip=false;this.Canvas.textBaseline="bottom";this.Canvas.fillStyle=drawInfo.TextColor;this.Canvas.fillText(text,x,rtText.Bottom);if(bClip)this.Canvas.restore();};this.DrawItem=function(index,data,column,left,top,rowType,columnIndex){var itemWidth=column.Width;var x=left+this.ItemMergin.Left;var textWidth=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var stock=data.Stock;var drawInfo={Text:null,TextColor:column.TextColor,TextAlign:column.TextAlign,Tooltip:null,Index:index,ColumnIndex:columnIndex};var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;drawInfo.Rect=rtItem;if(column.FullColBGColor){this.DrawItemBG({Rect:rtItem,BGColor:column.FullColBGColor});}if(column.Type==REPORT_COLUMN_ID.INDEX_ID){if(rowType==1)return;//固定行序号空
|
|
12718
12721
|
drawInfo.Text=(index+1).toString();}else if(column.Type==REPORT_COLUMN_ID.SYMBOL_ID){if(stock&&stock.Symbol)drawInfo.Text=stock.Symbol;else drawInfo.Text=data.Symbol;this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SYMBOL_NAME_ID){this.DrawSymbolName(data,column,left,top,rowType);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID){this.DrawSymbolNameV2(data,column,left,top,rowType);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.NAME_ID){if(stock&&stock.Name){if(IFrameSplitOperator.IsString(stock.Name)){drawInfo.Text=this.TextEllipsis(stock.Name,textWidth,column.MaxText);drawInfo.TextColor=this.GetNameColor(column,data.Symbol,rowType);}}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.NAME_EX_ID){//复杂格式 { Text:, Symbol:{ Family:'iconfont', Size:, Data:[ { Text:'\ue631', Color:'#1c65db'}, ...] } ]}
|
|
12719
12722
|
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){//如果行情开盘价为涨停价或跌停价,则对内容加灰框
|
|
12720
12723
|
if(stock){this.DrawLimitPriceBorder(stock.Open,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Open,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.HIGH_ID){//如果行情最高价为涨停价,则对内容加灰框
|
|
12721
12724
|
if(stock){this.DrawLimitPriceBorder(stock.High,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.High,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.LOW_ID){//如果行情最低价为跌停价,则对内容加灰框
|
|
12722
12725
|
if(stock){this.DrawLimitPriceBorder(stock.Low,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Low,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.YCLOSE_ID){if(stock)this.GetPriceDrawInfo(stock.YClose,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.BuyPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.FUTURES_CLOSE_ID||column.Type==REPORT_COLUMN_ID.FUTURES_YCLOSE_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];this.GetPriceDrawInfo(value,stock,data,drawInfo);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.SellPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.AVERAGE_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.AvPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.EXCHANGE_RATE_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Exchange))drawInfo.Text=stock.Exchange.toFixed(2);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.BuyVol))drawInfo.Text=this.FormatVolString(stock.BuyVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.SellVol))drawInfo.Text=this.FormatVolString(stock.SellVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Vol))drawInfo.Text=this.FormatVolString(stock.Vol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_IN_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolIn))drawInfo.Text=this.FormatVolString(stock.VolIn);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_OUT_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolOut))drawInfo.Text=this.FormatVolString(stock.VolOut);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.TOTAL_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.TotalShares))drawInfo.Text=this.FormatVolString(stock.TotalShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.OutShares))drawInfo.Text=this.FormatVolString(stock.OutShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.AMOUNT_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName]))drawInfo.Text=this.FormatVolString(stock[fieldName]);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.INCREASE_ID||column.Type==REPORT_COLUMN_ID.AMPLITUDE_ID||column.Type==REPORT_COLUMN_ID.UPDOWN_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_1M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_3M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_5M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_10M_ID||column.Type==REPORT_COLUMN_ID.RISING_SPEED_15M_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.FUTURES_POSITION_ID||column.Type==REPORT_COLUMN_ID.FUTURES_OPEN_POSITION_ID||column.Type==REPORT_COLUMN_ID.FUTURES_CLOSE_POSITION_ID){//持仓量原始值输出
|
|
12723
|
-
var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;if(stock)this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID){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;drawInfo.Checked=false;drawInfo.Enable=true;drawInfo.CheckBox=this.CheckBoxConfig;drawInfo.Data=stock;if(stock&&IFrameSplitOperator.IsBool(stock.Checked))drawInfo.Checked=stock.Checked;}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){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;this.GetCustomCheckBoxDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){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;this.GetCustomButtonDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){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;this.GetCustomProgressBarDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.GetCustomLinkDrawInfo(data,column,drawInfo);}else if([REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type)){this.FormatReserveNumber(column,stock,drawInfo);}else if(this.IsReserveString(column.Type)){this.FormatReserveString(column,stock,drawInfo);}else if(this.IsReserveProgressBarColumn(column.Type)){this.FormatReserveProgressBar(column,stock,drawInfo);}else if(this.IsReserveButtonColumn(column.Type)){this.FormatReserveButton(column,stock,drawInfo);}//拖拽行颜色
|
|
12724
|
-
if(rowType==3)drawInfo.TextColor=this.DragRowTextColor;if(drawInfo.Symbol){this.DrawItemTextEx(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.DrawIconItem(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID||column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){this.DrawCheckbox(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID||this.IsReserveButtonColumn(column.Type)){this.DrawButton(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID||this.IsReserveProgressBarColumn(column.Type)){this.DrawProgressBar(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.DrawLinkText(drawInfo,x,top,textWidth);}else{if(data.FlashBG&&data.FlashBG.Data&&column.ID!=undefined){if(data.FlashBG.Data.has(column.ID)){var flashItem=data.FlashBG.Data.get(column.ID);var drawBG={Rect:drawInfo.Rect,BGColor:flashItem.Color};--flashItem.Count;this.DrawItemBG(drawBG);if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}}this.DrawItemBG(drawInfo);if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID||this.IsReserveString(column.Type))this.DrawCustomText(drawInfo,column,x,top,textWidth);else this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth,drawInfo.BGColor);}//tooltip提示
|
|
12726
|
+
var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;if(stock)this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID){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;drawInfo.Checked=false;drawInfo.Enable=true;drawInfo.CheckBox=this.CheckBoxConfig;drawInfo.Data=stock;if(stock&&IFrameSplitOperator.IsBool(stock.Checked))drawInfo.Checked=stock.Checked;}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){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;this.GetCustomCheckBoxDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID){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;this.GetCustomButtonDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID){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;this.GetCustomProgressBarDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.GetCustomLinkDrawInfo(data,column,drawInfo);}else if([REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type)){this.FormatReserveNumber(column,stock,drawInfo);}else if(this.IsReserveString(column.Type)){this.FormatReserveString(column,stock,drawInfo);}else if(this.IsReserveProgressBarColumn(column.Type)){this.FormatReserveProgressBar(column,stock,drawInfo);}else if(this.IsReserveButtonColumn(column.Type)){this.FormatReserveButton(column,stock,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){if(IFrameSplitOperator.IsNonEmptyArray(column.AryField)){var yBottom=rtItem.Bottom-this.ItemMergin.Bottom-(column.AryField.length-1)*this.ItemFontHeight;var rtText={Left:left+this.ItemMergin.Left,Width:textWidth,Height:this.ItemFontHeight,Bottom:yBottom};rtText.Right=rtText.Left+rtText.Width;rtText.Top=rtText.Bottom-rtText.Height;for(var k=0;k<column.AryField.length;++k){drawInfo.Text=null;var subItem=column.AryField[k];this.BuildSubCellTextData(subItem,column,stock,drawInfo,data);this.DrawSubCellText(drawInfo,column,rtText);rtText.Bottom+=this.ItemFontHeight;rtText.Top+=this.ItemFontHeight;}}}//拖拽行颜色
|
|
12727
|
+
if(rowType==3)drawInfo.TextColor=this.DragRowTextColor;if(drawInfo.Symbol){this.DrawItemTextEx(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.DrawIconItem(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CHECKBOX_ID||column.Type==REPORT_COLUMN_ID.CUSTOM_CHECKBOX_ID){this.DrawCheckbox(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_BUTTON_ID||this.IsReserveButtonColumn(column.Type)){this.DrawButton(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID||this.IsReserveProgressBarColumn(column.Type)){this.DrawProgressBar(drawInfo,left,top,itemWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID){this.DrawLinkText(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER){}else{if(data.FlashBG&&data.FlashBG.Data&&column.ID!=undefined){if(data.FlashBG.Data.has(column.ID)){var flashItem=data.FlashBG.Data.get(column.ID);var drawBG={Rect:drawInfo.Rect,BGColor:flashItem.Color};--flashItem.Count;this.DrawItemBG(drawBG);if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}}this.DrawItemBG(drawInfo);if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID||this.IsReserveString(column.Type))this.DrawCustomText(drawInfo,column,x,top,textWidth);else this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth,drawInfo.BGColor);}//tooltip提示
|
|
12725
12728
|
if(drawInfo.Tooltip){//Type:1=数据截断
|
|
12726
12729
|
var tooltipData={Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowType,Type:drawInfo.Tooltip.Type,Data:drawInfo.Tooltip.Data};this.TooltipRect.push(tooltipData);}else if(column.EnableChartTooltip){var tooltipData={Rect:rtItem,Stock:stock,Index:index,Column:column,RowType:rowType,Type:20};this.TooltipRect.push(tooltipData);}if(drawInfo.Botton){var buttonData={Stock:stock,Index:index,ColumnIndex:columnIndex,Column:column,Rect:drawInfo.Botton.Rect,Type:drawInfo.Botton.Type,Data:drawInfo.Data};this.ButtonRect.push(buttonData);}};this.IsReserveProgressBarColumn=function(value){var ARARY_TYPE=[REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR1_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR2_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR3_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR4_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR5_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR6_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR7_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR8_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR9_ID,REPORT_COLUMN_ID.RESERVE_PROGRESS_BAR10_ID];return ARARY_TYPE.includes(value);};this.IsReserveButtonColumn=function(value){var ARARY_TYPE=[REPORT_COLUMN_ID.RESERVE_BUTTON1_ID,REPORT_COLUMN_ID.RESERVE_BUTTON2_ID,REPORT_COLUMN_ID.RESERVE_BUTTON3_ID,REPORT_COLUMN_ID.RESERVE_BUTTON4_ID,REPORT_COLUMN_ID.RESERVE_BUTTON5_ID,REPORT_COLUMN_ID.RESERVE_BUTTON6_ID,REPORT_COLUMN_ID.RESERVE_BUTTON7_ID,REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,REPORT_COLUMN_ID.RESERVE_BUTTON10_ID];return ARARY_TYPE.includes(value);};this.IsReserveString=function(value){var ARARY_TYPE=[REPORT_COLUMN_ID.RESERVE_STRING1_ID,REPORT_COLUMN_ID.RESERVE_STRING2_ID,REPORT_COLUMN_ID.RESERVE_STRING3_ID,REPORT_COLUMN_ID.RESERVE_STRING4_ID,REPORT_COLUMN_ID.RESERVE_STRING5_ID,REPORT_COLUMN_ID.RESERVE_STRING6_ID,REPORT_COLUMN_ID.RESERVE_STRING7_ID,REPORT_COLUMN_ID.RESERVE_STRING8_ID,REPORT_COLUMN_ID.RESERVE_STRING9_ID,REPORT_COLUMN_ID.RESERVE_STRING10_ID];return ARARY_TYPE.includes(value);};this.DrawCustomText=function(drawInfo,column,left,top,cellWidth){if(!drawInfo.Text)return;var text=drawInfo.Text;var x=left;if(drawInfo.TextAlign=='center'){x=left+cellWidth/2;this.Canvas.textAlign="center";}else if(drawInfo.TextAlign=='right'){x=left+cellWidth-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textWidth=this.Canvas.measureText(text).width+1;var bClip=false;if(textWidth>=cellWidth)//长度超过单元格 裁剪
|
|
12727
12730
|
{if(column.FormatType==2){var count=text.length+5;text="";for(var i=0;i<count;++i){text+="#";}}else if(column.FormatType==1){text=this.TextEllipsis(text,cellWidth,column.MaxText);}this.Canvas.save();bClip=true;var rtCell={Left:left,Top:top+this.ItemMergin.Top,Width:cellWidth,Height:this.RowHeight};this.Canvas.beginPath();this.Canvas.rect(rtCell.Left,rtCell.Top,rtCell.Width,rtCell.Height);//this.Canvas.stroke(); //调试用
|
|
@@ -14021,7 +14024,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14021
14024
|
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);};}/********************************************************************************
|
|
14022
14025
|
* 版本信息输出
|
|
14023
14026
|
*
|
|
14024
|
-
*/var HQCHART_VERSION="1.1.
|
|
14027
|
+
*/var HQCHART_VERSION="1.1.14279";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();//把给外界调用的方法暴露出来
|
|
14025
14028
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14026
14029
|
// BaseIndex:BaseIndex,
|
|
14027
14030
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -57368,6 +57368,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
57368
57368
|
HQData.APIIndex_MULTI_LINE(data, callback);
|
|
57369
57369
|
else if (request.Data.indexname=="API-MULTI_SVGICON")
|
|
57370
57370
|
HQData.APIIndex_MULTI_SVGICON(data, callback);
|
|
57371
|
+
else if (request.Data.indexname=="API-DRAWTEXT_LINE")
|
|
57372
|
+
HQData.APIIndex_DRAWTEXT_LINE(data, callback);
|
|
57371
57373
|
}
|
|
57372
57374
|
|
|
57373
57375
|
|
|
@@ -57754,3 +57756,40 @@ HQData.APIIndex_MULTI_SVGICON=function(data, callback)
|
|
|
57754
57756
|
}
|
|
57755
57757
|
|
|
57756
57758
|
|
|
57759
|
+
HQData.APIIndex_DRAWTEXT_LINE=function(data, callback)
|
|
57760
|
+
{
|
|
57761
|
+
data.PreventDefault=true;
|
|
57762
|
+
var hqchart=data.HQChart;
|
|
57763
|
+
var kData=hqchart.GetKData();
|
|
57764
|
+
|
|
57765
|
+
var lastItem=kData.Data[kData.Data.length-1];
|
|
57766
|
+
var price=(lastItem.High+lastItem.Low)/2;
|
|
57767
|
+
|
|
57768
|
+
var lineData=
|
|
57769
|
+
{
|
|
57770
|
+
name:'DRAWTEXT_LINE', type:1,
|
|
57771
|
+
Draw:
|
|
57772
|
+
{
|
|
57773
|
+
DrawType:'DRAWTEXT_LINE',
|
|
57774
|
+
DrawData:
|
|
57775
|
+
{
|
|
57776
|
+
Price:price,
|
|
57777
|
+
Text:{ Title:`价格:${price.toFixed(2)}`, Color:"rgb(255, 165, 0)" },
|
|
57778
|
+
Line:{ Type:1, Color:"rgb(200,200,0)" }, //Type 0=不画 1=直线 2=虚线
|
|
57779
|
+
}
|
|
57780
|
+
}
|
|
57781
|
+
};
|
|
57782
|
+
|
|
57783
|
+
var apiData=
|
|
57784
|
+
{
|
|
57785
|
+
code:0,
|
|
57786
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
57787
|
+
outdata: { date:kData.GetDate() , outvar:[lineData] }
|
|
57788
|
+
};
|
|
57789
|
+
|
|
57790
|
+
|
|
57791
|
+
console.log('[HQData.APIIndex_DRAWTEXT_LINE] apiData ', apiData);
|
|
57792
|
+
callback(apiData);
|
|
57793
|
+
}
|
|
57794
|
+
|
|
57795
|
+
|
|
@@ -24775,6 +24775,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
24775
24775
|
|
|
24776
24776
|
result.push(outVarItem);
|
|
24777
24777
|
}
|
|
24778
|
+
else if (draw.DrawType=="DRAWTEXT_LINE")
|
|
24779
|
+
{
|
|
24780
|
+
drawItem.Name=draw.Name;
|
|
24781
|
+
drawItem.Type=draw.Type;
|
|
24782
|
+
|
|
24783
|
+
drawItem.DrawType=draw.DrawType;
|
|
24784
|
+
drawItem.DrawData=draw.DrawData; //{ Price:, Text:{ Title:text, Color:textcolor }, Line:{ Type:linetype, Color:linecolor } };
|
|
24785
|
+
|
|
24786
|
+
outVarItem.Draw=drawItem;
|
|
24787
|
+
if (draw.Font) outVarItem.Font=draw.Font;
|
|
24788
|
+
|
|
24789
|
+
result.push(outVarItem);
|
|
24790
|
+
}
|
|
24778
24791
|
else
|
|
24779
24792
|
{
|
|
24780
24793
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -4383,6 +4383,8 @@ var REPORT_COLUMN_ID=
|
|
|
4383
4383
|
CUSTOM_PROGRESS_ID:106, //进度条
|
|
4384
4384
|
CUSTOM_LINK_ID:107, //链接
|
|
4385
4385
|
|
|
4386
|
+
MULTI_LINE_CONTAINER:108, //多行组合输出
|
|
4387
|
+
|
|
4386
4388
|
|
|
4387
4389
|
//预留数值类型 10个
|
|
4388
4390
|
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
@@ -4944,6 +4946,10 @@ function ChartReport()
|
|
|
4944
4946
|
{
|
|
4945
4947
|
if (IFrameSplitOperator.IsNumber(item.FormatType)) colItem.FormatType=item.FormatType;
|
|
4946
4948
|
}
|
|
4949
|
+
else if (item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
4950
|
+
{
|
|
4951
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryField)) colItem.AryField=item.AryField.slice();
|
|
4952
|
+
}
|
|
4947
4953
|
|
|
4948
4954
|
return colItem;
|
|
4949
4955
|
}
|
|
@@ -5096,6 +5102,12 @@ function ChartReport()
|
|
|
5096
5102
|
{ Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID, Title:"10分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
5097
5103
|
{ Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID, Title:"15分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
5098
5104
|
|
|
5105
|
+
//组合多行字段
|
|
5106
|
+
{
|
|
5107
|
+
Type:REPORT_COLUMN_ID.MULTI_LINE_CONTAINER, Title:"涨幅",TextAlign:"right", MaxText:"1000.00%",
|
|
5108
|
+
AryField:[ { Type:REPORT_COLUMN_ID.PRICE_ID},{ Type:REPORT_COLUMN_ID.INCREASE_ID, DynamicFormat:"{Value}%"} ]
|
|
5109
|
+
},
|
|
5110
|
+
|
|
5099
5111
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
5100
5112
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
5101
5113
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
@@ -5307,6 +5319,17 @@ function ChartReport()
|
|
|
5307
5319
|
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
5308
5320
|
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
5309
5321
|
}
|
|
5322
|
+
else if (item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
5323
|
+
{
|
|
5324
|
+
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) itemWidth=item.FixedWidth;
|
|
5325
|
+
else itemWidth=this.Canvas.measureText(item.MaxText).width;
|
|
5326
|
+
|
|
5327
|
+
item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;
|
|
5328
|
+
this.ItemTextLines=item.AryField.length;
|
|
5329
|
+
var rowHeight=(this.ItemFontHeight*item.AryField.length)+this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
5330
|
+
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
5331
|
+
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
5332
|
+
}
|
|
5310
5333
|
else if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID) //单行显示
|
|
5311
5334
|
{
|
|
5312
5335
|
this.Canvas.font==this.NameSymbolFont.Name;
|
|
@@ -5900,6 +5923,87 @@ function ChartReport()
|
|
|
5900
5923
|
}
|
|
5901
5924
|
}
|
|
5902
5925
|
|
|
5926
|
+
this.BuildSubCellTextData=function(subItem, column, stock, drawInfo, data, option)
|
|
5927
|
+
{
|
|
5928
|
+
switch(subItem.Type)
|
|
5929
|
+
{
|
|
5930
|
+
case REPORT_COLUMN_ID.NAME_ID:
|
|
5931
|
+
if (stock && stock.Name) drawInfo.Text=stock.Name;
|
|
5932
|
+
else drawInfo.Text=data.Name;
|
|
5933
|
+
break;
|
|
5934
|
+
case REPORT_COLUMN_ID.SYMBOL_ID:
|
|
5935
|
+
if (stock && stock.Symbol) drawInfo.Text=stock.Symbol;
|
|
5936
|
+
else drawInfo.Text=data.Symbol;
|
|
5937
|
+
break;
|
|
5938
|
+
|
|
5939
|
+
case REPORT_COLUMN_ID.PRICE_ID:
|
|
5940
|
+
case REPORT_COLUMN_ID.OPEN_ID:
|
|
5941
|
+
case REPORT_COLUMN_ID.HIGH_ID:
|
|
5942
|
+
case REPORT_COLUMN_ID.LOW_ID:
|
|
5943
|
+
case REPORT_COLUMN_ID.YCLOSE_ID:
|
|
5944
|
+
case REPORT_COLUMN_ID.BUY_PRICE_ID:
|
|
5945
|
+
case REPORT_COLUMN_ID.SELL_PRICE_ID:
|
|
5946
|
+
case REPORT_COLUMN_ID.AVERAGE_PRICE_ID:
|
|
5947
|
+
case REPORT_COLUMN_ID.FUTURES_CLOSE_ID:
|
|
5948
|
+
case REPORT_COLUMN_ID.FUTURES_YCLOSE_ID:
|
|
5949
|
+
var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);
|
|
5950
|
+
if (stock && IFrameSplitOperator.IsNumber(stock[fieldName])) this.GetPriceDrawInfo(stock[fieldName], stock, data, drawInfo, option);
|
|
5951
|
+
break;
|
|
5952
|
+
|
|
5953
|
+
case REPORT_COLUMN_ID.INCREASE_ID:
|
|
5954
|
+
case REPORT_COLUMN_ID.AMPLITUDE_ID:
|
|
5955
|
+
case REPORT_COLUMN_ID.UPDOWN_ID:
|
|
5956
|
+
case REPORT_COLUMN_ID.RISING_SPEED_1M_ID:
|
|
5957
|
+
case REPORT_COLUMN_ID.RISING_SPEED_3M_ID:
|
|
5958
|
+
case REPORT_COLUMN_ID.RISING_SPEED_5M_ID:
|
|
5959
|
+
case REPORT_COLUMN_ID.RISING_SPEED_10M_ID:
|
|
5960
|
+
case REPORT_COLUMN_ID.RISING_SPEED_15M_ID:
|
|
5961
|
+
var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);
|
|
5962
|
+
if (stock && IFrameSplitOperator.IsNumber(stock[fieldName]))
|
|
5963
|
+
{
|
|
5964
|
+
var value=stock[fieldName];
|
|
5965
|
+
var text=value.toFixed(2);
|
|
5966
|
+
if (subItem.DynamicFormat)
|
|
5967
|
+
text=subItem.DynamicFormat.replace('{Value}',text);
|
|
5968
|
+
|
|
5969
|
+
drawInfo.Text=text
|
|
5970
|
+
drawInfo.TextColor=this.GetUpDownColor(value,0);
|
|
5971
|
+
}
|
|
5972
|
+
break;
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5975
|
+
|
|
5976
|
+
this.DrawSubCellText=function(drawInfo, column, rtText)
|
|
5977
|
+
{
|
|
5978
|
+
if (!drawInfo.Text) return;
|
|
5979
|
+
|
|
5980
|
+
var text=drawInfo.Text;
|
|
5981
|
+
var x=rtText.Left;
|
|
5982
|
+
if (drawInfo.TextAlign=='center')
|
|
5983
|
+
{
|
|
5984
|
+
x=rtText.Left+rtText.Width/2;
|
|
5985
|
+
this.Canvas.textAlign="center";
|
|
5986
|
+
}
|
|
5987
|
+
else if (drawInfo.TextAlign=='right')
|
|
5988
|
+
{
|
|
5989
|
+
x=rtText.Left+rtText.Width-2;
|
|
5990
|
+
this.Canvas.textAlign="right";
|
|
5991
|
+
}
|
|
5992
|
+
else
|
|
5993
|
+
{
|
|
5994
|
+
x+=2;
|
|
5995
|
+
this.Canvas.textAlign="left";
|
|
5996
|
+
}
|
|
5997
|
+
|
|
5998
|
+
var bClip=false;
|
|
5999
|
+
|
|
6000
|
+
this.Canvas.textBaseline="bottom";
|
|
6001
|
+
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
6002
|
+
this.Canvas.fillText(text,x,rtText.Bottom);
|
|
6003
|
+
|
|
6004
|
+
if (bClip) this.Canvas.restore();
|
|
6005
|
+
}
|
|
6006
|
+
|
|
5903
6007
|
this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
|
|
5904
6008
|
{
|
|
5905
6009
|
var itemWidth=column.Width;
|
|
@@ -6225,6 +6329,26 @@ function ChartReport()
|
|
|
6225
6329
|
{
|
|
6226
6330
|
this.FormatReserveButton(column, stock, drawInfo);
|
|
6227
6331
|
}
|
|
6332
|
+
else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
6333
|
+
{
|
|
6334
|
+
if (IFrameSplitOperator.IsNonEmptyArray(column.AryField))
|
|
6335
|
+
{
|
|
6336
|
+
var yBottom=rtItem.Bottom-this.ItemMergin.Bottom-(column.AryField.length-1)*this.ItemFontHeight;
|
|
6337
|
+
var rtText={ Left:left+this.ItemMergin.Left, Width:textWidth, Height:this.ItemFontHeight, Bottom:yBottom };
|
|
6338
|
+
rtText.Right=rtText.Left+rtText.Width;
|
|
6339
|
+
rtText.Top=rtText.Bottom-rtText.Height;
|
|
6340
|
+
for(var k=0;k<column.AryField.length;++k)
|
|
6341
|
+
{
|
|
6342
|
+
drawInfo.Text=null;
|
|
6343
|
+
var subItem=column.AryField[k];
|
|
6344
|
+
this.BuildSubCellTextData(subItem, column, stock, drawInfo, data);
|
|
6345
|
+
this.DrawSubCellText(drawInfo, column, rtText);
|
|
6346
|
+
|
|
6347
|
+
rtText.Bottom+=this.ItemFontHeight;
|
|
6348
|
+
rtText.Top+=this.ItemFontHeight;
|
|
6349
|
+
}
|
|
6350
|
+
}
|
|
6351
|
+
}
|
|
6228
6352
|
|
|
6229
6353
|
|
|
6230
6354
|
//拖拽行颜色
|
|
@@ -6254,6 +6378,10 @@ function ChartReport()
|
|
|
6254
6378
|
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
6255
6379
|
{
|
|
6256
6380
|
this.DrawLinkText(drawInfo, x, top, textWidth);
|
|
6381
|
+
}
|
|
6382
|
+
else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
6383
|
+
{
|
|
6384
|
+
|
|
6257
6385
|
}
|
|
6258
6386
|
else
|
|
6259
6387
|
{
|
|
@@ -1854,6 +1854,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
1854
1854
|
HQData.APIIndex_MULTI_LINE(data, callback);
|
|
1855
1855
|
else if (request.Data.indexname=="API-MULTI_SVGICON")
|
|
1856
1856
|
HQData.APIIndex_MULTI_SVGICON(data, callback);
|
|
1857
|
+
else if (request.Data.indexname=="API-DRAWTEXT_LINE")
|
|
1858
|
+
HQData.APIIndex_DRAWTEXT_LINE(data, callback);
|
|
1857
1859
|
}
|
|
1858
1860
|
|
|
1859
1861
|
|
|
@@ -2240,3 +2242,40 @@ HQData.APIIndex_MULTI_SVGICON=function(data, callback)
|
|
|
2240
2242
|
}
|
|
2241
2243
|
|
|
2242
2244
|
|
|
2245
|
+
HQData.APIIndex_DRAWTEXT_LINE=function(data, callback)
|
|
2246
|
+
{
|
|
2247
|
+
data.PreventDefault=true;
|
|
2248
|
+
var hqchart=data.HQChart;
|
|
2249
|
+
var kData=hqchart.GetKData();
|
|
2250
|
+
|
|
2251
|
+
var lastItem=kData.Data[kData.Data.length-1];
|
|
2252
|
+
var price=(lastItem.High+lastItem.Low)/2;
|
|
2253
|
+
|
|
2254
|
+
var lineData=
|
|
2255
|
+
{
|
|
2256
|
+
name:'DRAWTEXT_LINE', type:1,
|
|
2257
|
+
Draw:
|
|
2258
|
+
{
|
|
2259
|
+
DrawType:'DRAWTEXT_LINE',
|
|
2260
|
+
DrawData:
|
|
2261
|
+
{
|
|
2262
|
+
Price:price,
|
|
2263
|
+
Text:{ Title:`价格:${price.toFixed(2)}`, Color:"rgb(255, 165, 0)" },
|
|
2264
|
+
Line:{ Type:1, Color:"rgb(200,200,0)" }, //Type 0=不画 1=直线 2=虚线
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
|
|
2269
|
+
var apiData=
|
|
2270
|
+
{
|
|
2271
|
+
code:0,
|
|
2272
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
2273
|
+
outdata: { date:kData.GetDate() , outvar:[lineData] }
|
|
2274
|
+
};
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
console.log('[HQData.APIIndex_DRAWTEXT_LINE] apiData ', apiData);
|
|
2278
|
+
callback(apiData);
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
|
|
@@ -124568,6 +124568,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
124568
124568
|
|
|
124569
124569
|
result.push(outVarItem);
|
|
124570
124570
|
}
|
|
124571
|
+
else if (draw.DrawType=="DRAWTEXT_LINE")
|
|
124572
|
+
{
|
|
124573
|
+
drawItem.Name=draw.Name;
|
|
124574
|
+
drawItem.Type=draw.Type;
|
|
124575
|
+
|
|
124576
|
+
drawItem.DrawType=draw.DrawType;
|
|
124577
|
+
drawItem.DrawData=draw.DrawData; //{ Price:, Text:{ Title:text, Color:textcolor }, Line:{ Type:linetype, Color:linecolor } };
|
|
124578
|
+
|
|
124579
|
+
outVarItem.Draw=drawItem;
|
|
124580
|
+
if (draw.Font) outVarItem.Font=draw.Font;
|
|
124581
|
+
|
|
124582
|
+
result.push(outVarItem);
|
|
124583
|
+
}
|
|
124571
124584
|
else
|
|
124572
124585
|
{
|
|
124573
124586
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -132391,6 +132404,8 @@ var REPORT_COLUMN_ID=
|
|
|
132391
132404
|
CUSTOM_PROGRESS_ID:106, //进度条
|
|
132392
132405
|
CUSTOM_LINK_ID:107, //链接
|
|
132393
132406
|
|
|
132407
|
+
MULTI_LINE_CONTAINER:108, //多行组合输出
|
|
132408
|
+
|
|
132394
132409
|
|
|
132395
132410
|
//预留数值类型 10个
|
|
132396
132411
|
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
@@ -132952,6 +132967,10 @@ function ChartReport()
|
|
|
132952
132967
|
{
|
|
132953
132968
|
if (IFrameSplitOperator.IsNumber(item.FormatType)) colItem.FormatType=item.FormatType;
|
|
132954
132969
|
}
|
|
132970
|
+
else if (item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
132971
|
+
{
|
|
132972
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryField)) colItem.AryField=item.AryField.slice();
|
|
132973
|
+
}
|
|
132955
132974
|
|
|
132956
132975
|
return colItem;
|
|
132957
132976
|
}
|
|
@@ -133104,6 +133123,12 @@ function ChartReport()
|
|
|
133104
133123
|
{ Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID, Title:"10分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
133105
133124
|
{ Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID, Title:"15分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
133106
133125
|
|
|
133126
|
+
//组合多行字段
|
|
133127
|
+
{
|
|
133128
|
+
Type:REPORT_COLUMN_ID.MULTI_LINE_CONTAINER, Title:"涨幅",TextAlign:"right", MaxText:"1000.00%",
|
|
133129
|
+
AryField:[ { Type:REPORT_COLUMN_ID.PRICE_ID},{ Type:REPORT_COLUMN_ID.INCREASE_ID, DynamicFormat:"{Value}%"} ]
|
|
133130
|
+
},
|
|
133131
|
+
|
|
133107
133132
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
133108
133133
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
133109
133134
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
@@ -133315,6 +133340,17 @@ function ChartReport()
|
|
|
133315
133340
|
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
133316
133341
|
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
133317
133342
|
}
|
|
133343
|
+
else if (item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
133344
|
+
{
|
|
133345
|
+
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) itemWidth=item.FixedWidth;
|
|
133346
|
+
else itemWidth=this.Canvas.measureText(item.MaxText).width;
|
|
133347
|
+
|
|
133348
|
+
item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;
|
|
133349
|
+
this.ItemTextLines=item.AryField.length;
|
|
133350
|
+
var rowHeight=(this.ItemFontHeight*item.AryField.length)+this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
133351
|
+
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
133352
|
+
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
133353
|
+
}
|
|
133318
133354
|
else if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID) //单行显示
|
|
133319
133355
|
{
|
|
133320
133356
|
this.Canvas.font==this.NameSymbolFont.Name;
|
|
@@ -133908,6 +133944,87 @@ function ChartReport()
|
|
|
133908
133944
|
}
|
|
133909
133945
|
}
|
|
133910
133946
|
|
|
133947
|
+
this.BuildSubCellTextData=function(subItem, column, stock, drawInfo, data, option)
|
|
133948
|
+
{
|
|
133949
|
+
switch(subItem.Type)
|
|
133950
|
+
{
|
|
133951
|
+
case REPORT_COLUMN_ID.NAME_ID:
|
|
133952
|
+
if (stock && stock.Name) drawInfo.Text=stock.Name;
|
|
133953
|
+
else drawInfo.Text=data.Name;
|
|
133954
|
+
break;
|
|
133955
|
+
case REPORT_COLUMN_ID.SYMBOL_ID:
|
|
133956
|
+
if (stock && stock.Symbol) drawInfo.Text=stock.Symbol;
|
|
133957
|
+
else drawInfo.Text=data.Symbol;
|
|
133958
|
+
break;
|
|
133959
|
+
|
|
133960
|
+
case REPORT_COLUMN_ID.PRICE_ID:
|
|
133961
|
+
case REPORT_COLUMN_ID.OPEN_ID:
|
|
133962
|
+
case REPORT_COLUMN_ID.HIGH_ID:
|
|
133963
|
+
case REPORT_COLUMN_ID.LOW_ID:
|
|
133964
|
+
case REPORT_COLUMN_ID.YCLOSE_ID:
|
|
133965
|
+
case REPORT_COLUMN_ID.BUY_PRICE_ID:
|
|
133966
|
+
case REPORT_COLUMN_ID.SELL_PRICE_ID:
|
|
133967
|
+
case REPORT_COLUMN_ID.AVERAGE_PRICE_ID:
|
|
133968
|
+
case REPORT_COLUMN_ID.FUTURES_CLOSE_ID:
|
|
133969
|
+
case REPORT_COLUMN_ID.FUTURES_YCLOSE_ID:
|
|
133970
|
+
var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);
|
|
133971
|
+
if (stock && IFrameSplitOperator.IsNumber(stock[fieldName])) this.GetPriceDrawInfo(stock[fieldName], stock, data, drawInfo, option);
|
|
133972
|
+
break;
|
|
133973
|
+
|
|
133974
|
+
case REPORT_COLUMN_ID.INCREASE_ID:
|
|
133975
|
+
case REPORT_COLUMN_ID.AMPLITUDE_ID:
|
|
133976
|
+
case REPORT_COLUMN_ID.UPDOWN_ID:
|
|
133977
|
+
case REPORT_COLUMN_ID.RISING_SPEED_1M_ID:
|
|
133978
|
+
case REPORT_COLUMN_ID.RISING_SPEED_3M_ID:
|
|
133979
|
+
case REPORT_COLUMN_ID.RISING_SPEED_5M_ID:
|
|
133980
|
+
case REPORT_COLUMN_ID.RISING_SPEED_10M_ID:
|
|
133981
|
+
case REPORT_COLUMN_ID.RISING_SPEED_15M_ID:
|
|
133982
|
+
var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);
|
|
133983
|
+
if (stock && IFrameSplitOperator.IsNumber(stock[fieldName]))
|
|
133984
|
+
{
|
|
133985
|
+
var value=stock[fieldName];
|
|
133986
|
+
var text=value.toFixed(2);
|
|
133987
|
+
if (subItem.DynamicFormat)
|
|
133988
|
+
text=subItem.DynamicFormat.replace('{Value}',text);
|
|
133989
|
+
|
|
133990
|
+
drawInfo.Text=text
|
|
133991
|
+
drawInfo.TextColor=this.GetUpDownColor(value,0);
|
|
133992
|
+
}
|
|
133993
|
+
break;
|
|
133994
|
+
}
|
|
133995
|
+
}
|
|
133996
|
+
|
|
133997
|
+
this.DrawSubCellText=function(drawInfo, column, rtText)
|
|
133998
|
+
{
|
|
133999
|
+
if (!drawInfo.Text) return;
|
|
134000
|
+
|
|
134001
|
+
var text=drawInfo.Text;
|
|
134002
|
+
var x=rtText.Left;
|
|
134003
|
+
if (drawInfo.TextAlign=='center')
|
|
134004
|
+
{
|
|
134005
|
+
x=rtText.Left+rtText.Width/2;
|
|
134006
|
+
this.Canvas.textAlign="center";
|
|
134007
|
+
}
|
|
134008
|
+
else if (drawInfo.TextAlign=='right')
|
|
134009
|
+
{
|
|
134010
|
+
x=rtText.Left+rtText.Width-2;
|
|
134011
|
+
this.Canvas.textAlign="right";
|
|
134012
|
+
}
|
|
134013
|
+
else
|
|
134014
|
+
{
|
|
134015
|
+
x+=2;
|
|
134016
|
+
this.Canvas.textAlign="left";
|
|
134017
|
+
}
|
|
134018
|
+
|
|
134019
|
+
var bClip=false;
|
|
134020
|
+
|
|
134021
|
+
this.Canvas.textBaseline="bottom";
|
|
134022
|
+
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
134023
|
+
this.Canvas.fillText(text,x,rtText.Bottom);
|
|
134024
|
+
|
|
134025
|
+
if (bClip) this.Canvas.restore();
|
|
134026
|
+
}
|
|
134027
|
+
|
|
133911
134028
|
this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
|
|
133912
134029
|
{
|
|
133913
134030
|
var itemWidth=column.Width;
|
|
@@ -134233,6 +134350,26 @@ function ChartReport()
|
|
|
134233
134350
|
{
|
|
134234
134351
|
this.FormatReserveButton(column, stock, drawInfo);
|
|
134235
134352
|
}
|
|
134353
|
+
else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
134354
|
+
{
|
|
134355
|
+
if (IFrameSplitOperator.IsNonEmptyArray(column.AryField))
|
|
134356
|
+
{
|
|
134357
|
+
var yBottom=rtItem.Bottom-this.ItemMergin.Bottom-(column.AryField.length-1)*this.ItemFontHeight;
|
|
134358
|
+
var rtText={ Left:left+this.ItemMergin.Left, Width:textWidth, Height:this.ItemFontHeight, Bottom:yBottom };
|
|
134359
|
+
rtText.Right=rtText.Left+rtText.Width;
|
|
134360
|
+
rtText.Top=rtText.Bottom-rtText.Height;
|
|
134361
|
+
for(var k=0;k<column.AryField.length;++k)
|
|
134362
|
+
{
|
|
134363
|
+
drawInfo.Text=null;
|
|
134364
|
+
var subItem=column.AryField[k];
|
|
134365
|
+
this.BuildSubCellTextData(subItem, column, stock, drawInfo, data);
|
|
134366
|
+
this.DrawSubCellText(drawInfo, column, rtText);
|
|
134367
|
+
|
|
134368
|
+
rtText.Bottom+=this.ItemFontHeight;
|
|
134369
|
+
rtText.Top+=this.ItemFontHeight;
|
|
134370
|
+
}
|
|
134371
|
+
}
|
|
134372
|
+
}
|
|
134236
134373
|
|
|
134237
134374
|
|
|
134238
134375
|
//拖拽行颜色
|
|
@@ -134262,6 +134399,10 @@ function ChartReport()
|
|
|
134262
134399
|
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
134263
134400
|
{
|
|
134264
134401
|
this.DrawLinkText(drawInfo, x, top, textWidth);
|
|
134402
|
+
}
|
|
134403
|
+
else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
134404
|
+
{
|
|
134405
|
+
|
|
134265
134406
|
}
|
|
134266
134407
|
else
|
|
134267
134408
|
{
|
|
@@ -140579,7 +140720,7 @@ function ScrollBarBGChart()
|
|
|
140579
140720
|
|
|
140580
140721
|
|
|
140581
140722
|
|
|
140582
|
-
var HQCHART_VERSION="1.1.
|
|
140723
|
+
var HQCHART_VERSION="1.1.14279";
|
|
140583
140724
|
|
|
140584
140725
|
function PrintHQChartVersion()
|
|
140585
140726
|
{
|
|
@@ -57386,6 +57386,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
57386
57386
|
HQData.APIIndex_MULTI_LINE(data, callback);
|
|
57387
57387
|
else if (request.Data.indexname=="API-MULTI_SVGICON")
|
|
57388
57388
|
HQData.APIIndex_MULTI_SVGICON(data, callback);
|
|
57389
|
+
else if (request.Data.indexname=="API-DRAWTEXT_LINE")
|
|
57390
|
+
HQData.APIIndex_DRAWTEXT_LINE(data, callback);
|
|
57389
57391
|
}
|
|
57390
57392
|
|
|
57391
57393
|
|
|
@@ -57772,6 +57774,43 @@ HQData.APIIndex_MULTI_SVGICON=function(data, callback)
|
|
|
57772
57774
|
}
|
|
57773
57775
|
|
|
57774
57776
|
|
|
57777
|
+
HQData.APIIndex_DRAWTEXT_LINE=function(data, callback)
|
|
57778
|
+
{
|
|
57779
|
+
data.PreventDefault=true;
|
|
57780
|
+
var hqchart=data.HQChart;
|
|
57781
|
+
var kData=hqchart.GetKData();
|
|
57782
|
+
|
|
57783
|
+
var lastItem=kData.Data[kData.Data.length-1];
|
|
57784
|
+
var price=(lastItem.High+lastItem.Low)/2;
|
|
57785
|
+
|
|
57786
|
+
var lineData=
|
|
57787
|
+
{
|
|
57788
|
+
name:'DRAWTEXT_LINE', type:1,
|
|
57789
|
+
Draw:
|
|
57790
|
+
{
|
|
57791
|
+
DrawType:'DRAWTEXT_LINE',
|
|
57792
|
+
DrawData:
|
|
57793
|
+
{
|
|
57794
|
+
Price:price,
|
|
57795
|
+
Text:{ Title:`价格:${price.toFixed(2)}`, Color:"rgb(255, 165, 0)" },
|
|
57796
|
+
Line:{ Type:1, Color:"rgb(200,200,0)" }, //Type 0=不画 1=直线 2=虚线
|
|
57797
|
+
}
|
|
57798
|
+
}
|
|
57799
|
+
};
|
|
57800
|
+
|
|
57801
|
+
var apiData=
|
|
57802
|
+
{
|
|
57803
|
+
code:0,
|
|
57804
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
57805
|
+
outdata: { date:kData.GetDate() , outvar:[lineData] }
|
|
57806
|
+
};
|
|
57807
|
+
|
|
57808
|
+
|
|
57809
|
+
console.log('[HQData.APIIndex_DRAWTEXT_LINE] apiData ', apiData);
|
|
57810
|
+
callback(apiData);
|
|
57811
|
+
}
|
|
57812
|
+
|
|
57813
|
+
|
|
57775
57814
|
|
|
57776
57815
|
|
|
57777
57816
|
/*暴露外部用的方法*/
|
|
@@ -124612,6 +124612,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
124612
124612
|
|
|
124613
124613
|
result.push(outVarItem);
|
|
124614
124614
|
}
|
|
124615
|
+
else if (draw.DrawType=="DRAWTEXT_LINE")
|
|
124616
|
+
{
|
|
124617
|
+
drawItem.Name=draw.Name;
|
|
124618
|
+
drawItem.Type=draw.Type;
|
|
124619
|
+
|
|
124620
|
+
drawItem.DrawType=draw.DrawType;
|
|
124621
|
+
drawItem.DrawData=draw.DrawData; //{ Price:, Text:{ Title:text, Color:textcolor }, Line:{ Type:linetype, Color:linecolor } };
|
|
124622
|
+
|
|
124623
|
+
outVarItem.Draw=drawItem;
|
|
124624
|
+
if (draw.Font) outVarItem.Font=draw.Font;
|
|
124625
|
+
|
|
124626
|
+
result.push(outVarItem);
|
|
124627
|
+
}
|
|
124615
124628
|
else
|
|
124616
124629
|
{
|
|
124617
124630
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -132435,6 +132448,8 @@ var REPORT_COLUMN_ID=
|
|
|
132435
132448
|
CUSTOM_PROGRESS_ID:106, //进度条
|
|
132436
132449
|
CUSTOM_LINK_ID:107, //链接
|
|
132437
132450
|
|
|
132451
|
+
MULTI_LINE_CONTAINER:108, //多行组合输出
|
|
132452
|
+
|
|
132438
132453
|
|
|
132439
132454
|
//预留数值类型 10个
|
|
132440
132455
|
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
@@ -132996,6 +133011,10 @@ function ChartReport()
|
|
|
132996
133011
|
{
|
|
132997
133012
|
if (IFrameSplitOperator.IsNumber(item.FormatType)) colItem.FormatType=item.FormatType;
|
|
132998
133013
|
}
|
|
133014
|
+
else if (item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
133015
|
+
{
|
|
133016
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryField)) colItem.AryField=item.AryField.slice();
|
|
133017
|
+
}
|
|
132999
133018
|
|
|
133000
133019
|
return colItem;
|
|
133001
133020
|
}
|
|
@@ -133148,6 +133167,12 @@ function ChartReport()
|
|
|
133148
133167
|
{ Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID, Title:"10分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
133149
133168
|
{ Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID, Title:"15分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
|
|
133150
133169
|
|
|
133170
|
+
//组合多行字段
|
|
133171
|
+
{
|
|
133172
|
+
Type:REPORT_COLUMN_ID.MULTI_LINE_CONTAINER, Title:"涨幅",TextAlign:"right", MaxText:"1000.00%",
|
|
133173
|
+
AryField:[ { Type:REPORT_COLUMN_ID.PRICE_ID},{ Type:REPORT_COLUMN_ID.INCREASE_ID, DynamicFormat:"{Value}%"} ]
|
|
133174
|
+
},
|
|
133175
|
+
|
|
133151
133176
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
133152
133177
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
133153
133178
|
{ Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
@@ -133359,6 +133384,17 @@ function ChartReport()
|
|
|
133359
133384
|
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
133360
133385
|
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
133361
133386
|
}
|
|
133387
|
+
else if (item.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
133388
|
+
{
|
|
133389
|
+
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) itemWidth=item.FixedWidth;
|
|
133390
|
+
else itemWidth=this.Canvas.measureText(item.MaxText).width;
|
|
133391
|
+
|
|
133392
|
+
item.Width=itemWidth+4+this.ItemMergin.Left+this.ItemMergin.Right;
|
|
133393
|
+
this.ItemTextLines=item.AryField.length;
|
|
133394
|
+
var rowHeight=(this.ItemFontHeight*item.AryField.length)+this.ItemMergin.Top+ this.ItemMergin.Bottom;
|
|
133395
|
+
if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
|
|
133396
|
+
if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
|
|
133397
|
+
}
|
|
133362
133398
|
else if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID) //单行显示
|
|
133363
133399
|
{
|
|
133364
133400
|
this.Canvas.font==this.NameSymbolFont.Name;
|
|
@@ -133952,6 +133988,87 @@ function ChartReport()
|
|
|
133952
133988
|
}
|
|
133953
133989
|
}
|
|
133954
133990
|
|
|
133991
|
+
this.BuildSubCellTextData=function(subItem, column, stock, drawInfo, data, option)
|
|
133992
|
+
{
|
|
133993
|
+
switch(subItem.Type)
|
|
133994
|
+
{
|
|
133995
|
+
case REPORT_COLUMN_ID.NAME_ID:
|
|
133996
|
+
if (stock && stock.Name) drawInfo.Text=stock.Name;
|
|
133997
|
+
else drawInfo.Text=data.Name;
|
|
133998
|
+
break;
|
|
133999
|
+
case REPORT_COLUMN_ID.SYMBOL_ID:
|
|
134000
|
+
if (stock && stock.Symbol) drawInfo.Text=stock.Symbol;
|
|
134001
|
+
else drawInfo.Text=data.Symbol;
|
|
134002
|
+
break;
|
|
134003
|
+
|
|
134004
|
+
case REPORT_COLUMN_ID.PRICE_ID:
|
|
134005
|
+
case REPORT_COLUMN_ID.OPEN_ID:
|
|
134006
|
+
case REPORT_COLUMN_ID.HIGH_ID:
|
|
134007
|
+
case REPORT_COLUMN_ID.LOW_ID:
|
|
134008
|
+
case REPORT_COLUMN_ID.YCLOSE_ID:
|
|
134009
|
+
case REPORT_COLUMN_ID.BUY_PRICE_ID:
|
|
134010
|
+
case REPORT_COLUMN_ID.SELL_PRICE_ID:
|
|
134011
|
+
case REPORT_COLUMN_ID.AVERAGE_PRICE_ID:
|
|
134012
|
+
case REPORT_COLUMN_ID.FUTURES_CLOSE_ID:
|
|
134013
|
+
case REPORT_COLUMN_ID.FUTURES_YCLOSE_ID:
|
|
134014
|
+
var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);
|
|
134015
|
+
if (stock && IFrameSplitOperator.IsNumber(stock[fieldName])) this.GetPriceDrawInfo(stock[fieldName], stock, data, drawInfo, option);
|
|
134016
|
+
break;
|
|
134017
|
+
|
|
134018
|
+
case REPORT_COLUMN_ID.INCREASE_ID:
|
|
134019
|
+
case REPORT_COLUMN_ID.AMPLITUDE_ID:
|
|
134020
|
+
case REPORT_COLUMN_ID.UPDOWN_ID:
|
|
134021
|
+
case REPORT_COLUMN_ID.RISING_SPEED_1M_ID:
|
|
134022
|
+
case REPORT_COLUMN_ID.RISING_SPEED_3M_ID:
|
|
134023
|
+
case REPORT_COLUMN_ID.RISING_SPEED_5M_ID:
|
|
134024
|
+
case REPORT_COLUMN_ID.RISING_SPEED_10M_ID:
|
|
134025
|
+
case REPORT_COLUMN_ID.RISING_SPEED_15M_ID:
|
|
134026
|
+
var fieldName=MAP_COLUMN_FIELD.get(subItem.Type);
|
|
134027
|
+
if (stock && IFrameSplitOperator.IsNumber(stock[fieldName]))
|
|
134028
|
+
{
|
|
134029
|
+
var value=stock[fieldName];
|
|
134030
|
+
var text=value.toFixed(2);
|
|
134031
|
+
if (subItem.DynamicFormat)
|
|
134032
|
+
text=subItem.DynamicFormat.replace('{Value}',text);
|
|
134033
|
+
|
|
134034
|
+
drawInfo.Text=text
|
|
134035
|
+
drawInfo.TextColor=this.GetUpDownColor(value,0);
|
|
134036
|
+
}
|
|
134037
|
+
break;
|
|
134038
|
+
}
|
|
134039
|
+
}
|
|
134040
|
+
|
|
134041
|
+
this.DrawSubCellText=function(drawInfo, column, rtText)
|
|
134042
|
+
{
|
|
134043
|
+
if (!drawInfo.Text) return;
|
|
134044
|
+
|
|
134045
|
+
var text=drawInfo.Text;
|
|
134046
|
+
var x=rtText.Left;
|
|
134047
|
+
if (drawInfo.TextAlign=='center')
|
|
134048
|
+
{
|
|
134049
|
+
x=rtText.Left+rtText.Width/2;
|
|
134050
|
+
this.Canvas.textAlign="center";
|
|
134051
|
+
}
|
|
134052
|
+
else if (drawInfo.TextAlign=='right')
|
|
134053
|
+
{
|
|
134054
|
+
x=rtText.Left+rtText.Width-2;
|
|
134055
|
+
this.Canvas.textAlign="right";
|
|
134056
|
+
}
|
|
134057
|
+
else
|
|
134058
|
+
{
|
|
134059
|
+
x+=2;
|
|
134060
|
+
this.Canvas.textAlign="left";
|
|
134061
|
+
}
|
|
134062
|
+
|
|
134063
|
+
var bClip=false;
|
|
134064
|
+
|
|
134065
|
+
this.Canvas.textBaseline="bottom";
|
|
134066
|
+
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
134067
|
+
this.Canvas.fillText(text,x,rtText.Bottom);
|
|
134068
|
+
|
|
134069
|
+
if (bClip) this.Canvas.restore();
|
|
134070
|
+
}
|
|
134071
|
+
|
|
133955
134072
|
this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
|
|
133956
134073
|
{
|
|
133957
134074
|
var itemWidth=column.Width;
|
|
@@ -134277,6 +134394,26 @@ function ChartReport()
|
|
|
134277
134394
|
{
|
|
134278
134395
|
this.FormatReserveButton(column, stock, drawInfo);
|
|
134279
134396
|
}
|
|
134397
|
+
else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
134398
|
+
{
|
|
134399
|
+
if (IFrameSplitOperator.IsNonEmptyArray(column.AryField))
|
|
134400
|
+
{
|
|
134401
|
+
var yBottom=rtItem.Bottom-this.ItemMergin.Bottom-(column.AryField.length-1)*this.ItemFontHeight;
|
|
134402
|
+
var rtText={ Left:left+this.ItemMergin.Left, Width:textWidth, Height:this.ItemFontHeight, Bottom:yBottom };
|
|
134403
|
+
rtText.Right=rtText.Left+rtText.Width;
|
|
134404
|
+
rtText.Top=rtText.Bottom-rtText.Height;
|
|
134405
|
+
for(var k=0;k<column.AryField.length;++k)
|
|
134406
|
+
{
|
|
134407
|
+
drawInfo.Text=null;
|
|
134408
|
+
var subItem=column.AryField[k];
|
|
134409
|
+
this.BuildSubCellTextData(subItem, column, stock, drawInfo, data);
|
|
134410
|
+
this.DrawSubCellText(drawInfo, column, rtText);
|
|
134411
|
+
|
|
134412
|
+
rtText.Bottom+=this.ItemFontHeight;
|
|
134413
|
+
rtText.Top+=this.ItemFontHeight;
|
|
134414
|
+
}
|
|
134415
|
+
}
|
|
134416
|
+
}
|
|
134280
134417
|
|
|
134281
134418
|
|
|
134282
134419
|
//拖拽行颜色
|
|
@@ -134306,6 +134443,10 @@ function ChartReport()
|
|
|
134306
134443
|
else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
|
|
134307
134444
|
{
|
|
134308
134445
|
this.DrawLinkText(drawInfo, x, top, textWidth);
|
|
134446
|
+
}
|
|
134447
|
+
else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
|
|
134448
|
+
{
|
|
134449
|
+
|
|
134309
134450
|
}
|
|
134310
134451
|
else
|
|
134311
134452
|
{
|
|
@@ -150227,7 +150368,7 @@ function HQChartScriptWorker()
|
|
|
150227
150368
|
|
|
150228
150369
|
|
|
150229
150370
|
|
|
150230
|
-
var HQCHART_VERSION="1.1.
|
|
150371
|
+
var HQCHART_VERSION="1.1.14279";
|
|
150231
150372
|
|
|
150232
150373
|
function PrintHQChartVersion()
|
|
150233
150374
|
{
|