hqchart 1.1.14798 → 1.1.14809

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.
@@ -875,7 +875,8 @@ function JSDialogModifyIndexParam()
875
875
 
876
876
  this.AryData=[];
877
877
  this.IndexData=null; //指标数据 { WindowsIndex:, Type:1=主图 2=叠加, Identify, IndexScript: }
878
- this.Arguments=[]; //参数备份
878
+ this.Arguments=[]; //默认参数
879
+ this.EnableRestoreParam=true; //是否允许“恢复默认"
879
880
 
880
881
  this.RestoreFocusDelay=800;
881
882
 
@@ -886,6 +887,7 @@ function JSDialogModifyIndexParam()
886
887
  {
887
888
  if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
888
889
  if (IFrameSplitOperator.IsNumber(option.MaxRowCount)) this.MaxRowCount=option.MaxRowCount;
890
+ if (IFrameSplitOperator.IsBool(option.EnableRestoreParam)) this.EnableRestoreParam=option.EnableRestoreParam;
889
891
  }
890
892
  }
891
893
 
@@ -926,7 +928,7 @@ function JSDialogModifyIndexParam()
926
928
 
927
929
  this.OnClickColseButton=function(e)
928
930
  {
929
- this.RestoreParam(); //还原参数
931
+ //this.RestoreParam(); //还原参数
930
932
  this.Close(e);
931
933
  }
932
934
 
@@ -957,7 +959,8 @@ function JSDialogModifyIndexParam()
957
959
  this.SetIndexData=function(data)
958
960
  {
959
961
  this.IndexData=data;
960
- this.BackupParam();
962
+ this.GetDefaultParam();
963
+ //this.BackupParam();
961
964
  }
962
965
 
963
966
  this.OnMouseDownTitle=function(e)
@@ -1035,31 +1038,6 @@ function JSDialogModifyIndexParam()
1035
1038
  table.className="UMyChart_ModifyIndexParam_Table";
1036
1039
  divTable.appendChild(table);
1037
1040
 
1038
- /*
1039
- var thead=document.createElement("thead");
1040
- table.appendChild(thead);
1041
-
1042
- var trDom=document.createElement("tr");
1043
- trDom.className='UMyChart_ModifyIndexParam_head_Tr';
1044
- thead.appendChild(trDom);
1045
-
1046
- var thDom=document.createElement("th");
1047
- thDom.className="UMyChart_ModifyIndexParam_Th";
1048
- thDom.innerText="变量";
1049
- trDom.appendChild(thDom);
1050
-
1051
- var thDom=document.createElement("th");
1052
- thDom.className="UMyChart_ModifyIndexParam_Th";
1053
- thDom.innerText="数值";
1054
- trDom.appendChild(thDom);
1055
-
1056
- var thDom=document.createElement("th");
1057
- thDom.className="UMyChart_ModifyIndexParam_Th";
1058
- thDom.innerText="说明";
1059
- trDom.appendChild(thDom);
1060
- */
1061
-
1062
-
1063
1041
  var tbody=document.createElement("tbody");
1064
1042
  tbody.className="UMyChart_ModifyIndexParam_Tbody";
1065
1043
  table.appendChild(tbody);
@@ -1076,17 +1054,29 @@ function JSDialogModifyIndexParam()
1076
1054
  divButton.className='UMyChart_ModifyIndexParam_Button_Div';
1077
1055
  divFrame.appendChild(divButton);
1078
1056
 
1079
- var btnRestore=document.createElement("button");
1080
- //btnRestore.className="UMyChart_ModifyIndexParam_button";
1081
- btnRestore.innerText="恢复默认";
1082
- btnRestore.addEventListener("mousedown", (e)=>{ this.OnClickRestoreButton(e); });
1083
- divButton.appendChild(btnRestore);
1057
+ if (this.EnableRestoreParam)
1058
+ {
1059
+ var btnRestore=document.createElement("button");
1060
+ //btnRestore.className="UMyChart_ModifyIndexParam_button";
1061
+ btnRestore.innerText="恢复默认";
1062
+ btnRestore.addEventListener("mousedown", (e)=>{ this.OnClickRestoreButton(e); });
1063
+ divButton.appendChild(btnRestore);
1064
+ }
1065
+
1084
1066
 
1067
+ /*
1085
1068
  var btnOk=document.createElement("button");
1086
1069
  //btnOk.className="UMyChart_ModifyIndexParam_button";
1087
1070
  btnOk.innerText="确认";
1088
1071
  btnOk.addEventListener("mousedown", (e)=>{ this.OnClickOkButton(e); })
1089
1072
  divButton.appendChild(btnOk);
1073
+ */
1074
+
1075
+ var btnOk=document.createElement("button");
1076
+ //btnOk.className="UMyChart_ModifyIndexParam_button";
1077
+ btnOk.innerText="关闭";
1078
+ btnOk.addEventListener("mousedown", (e)=>{ this.Close(e); })
1079
+ divButton.appendChild(btnOk);
1090
1080
 
1091
1081
  document.body.appendChild(divDom);
1092
1082
 
@@ -1228,6 +1218,41 @@ function JSDialogModifyIndexParam()
1228
1218
  }
1229
1219
  }
1230
1220
 
1221
+ this.GetDefaultParam=function()
1222
+ {
1223
+ this.Arguments=[];
1224
+ if (!this.IndexData || !this.IndexData.IndexScript) return;
1225
+ var indexScript=this.IndexData.IndexScript;
1226
+
1227
+ var args=[];
1228
+ if (indexScript.ID)
1229
+ {
1230
+ var scriptData = new JSIndexScript();
1231
+ var indexInfo = scriptData.Get(indexScript.ID);
1232
+ if (indexInfo) args=indexInfo.Args;
1233
+ }
1234
+
1235
+ var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.GET_DEFAULT_INDEX_PARAM);
1236
+ if (event && event.Callback)
1237
+ {
1238
+ var sendData={ IndexData:this.IndexData, Args:args.slice(), PreventDefault:false };
1239
+ event.Callback(event, sendData, this);
1240
+
1241
+ if (sendData.PreventDefault) return;
1242
+
1243
+ args=sendData.Args;
1244
+ }
1245
+
1246
+ if (IFrameSplitOperator.IsNonEmptyArray(args))
1247
+ {
1248
+ for(var i=0;i<args.length;++i)
1249
+ {
1250
+ var item=args[i];
1251
+ this.Arguments.push({Name:item.Name, Value:item.Value, Index:i});
1252
+ }
1253
+ }
1254
+ }
1255
+
1231
1256
  this.OnParamMouseUp=function(e)
1232
1257
  {
1233
1258
  var input=e.target;
@@ -2784,6 +2784,8 @@ var JSCHART_EVENT_ID=
2784
2784
  ON_CLICK_CROSSCURSOR_BOTTOM:170, //十字光标底部文字点击
2785
2785
 
2786
2786
  ON_CLICK_CHART_CELL:171, //点击图形单元
2787
+
2788
+ GET_DEFAULT_INDEX_PARAM:172, //获取指标默认参数
2787
2789
  }
2788
2790
 
2789
2791
  var JSCHART_OPERATOR_ID=
@@ -53185,6 +53187,24 @@ IFrameSplitOperator.FormatDateTimeString=function(value,isShowDate,isShowTime)
53185
53187
  return result;
53186
53188
  }
53187
53189
 
53190
+ IFrameSplitOperator.FormatDateTimeStringV2=function(datetime, format, languageID)
53191
+ {
53192
+ if (!datetime) return null;
53193
+
53194
+ switch(format)
53195
+ {
53196
+ case "YYYY-MM-DD":
53197
+ return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
53198
+
53199
+ case "HH:MM:SS":
53200
+ return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}`;
53201
+ case "HH:MM":
53202
+ return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}`;
53203
+ default:
53204
+ return null;
53205
+ }
53206
+ }
53207
+
53188
53208
  //字段颜色格式化
53189
53209
  IFrameSplitOperator.FormatValueColor = function (value, value2)
53190
53210
  {
@@ -1628,10 +1628,12 @@ function JSReportChartContainer(uielement)
1628
1628
  this.ReadStockJsonData=function(stock, item)
1629
1629
  {
1630
1630
  //0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本 16=涨停价 17=跌停价
1631
- //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值
1632
- //30=全局扩展数据 31=当前板块扩展数据 36=日期字段
1633
-
1634
- //88=价格颜色类型
1631
+ //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值 27=扩展名字
1632
+ //30=全局扩展数据 31=当前板块扩展数据
1633
+ //32=收盘价线 33=K线 35=时间 36=日期字段 38=持仓量 39=结算价 40=昨结算价 41=开仓量 42=平仓量
1634
+ //43=1m涨速% 44=3m涨速% 45=5m涨速% 46=10m涨速% 47=15m涨速%
1635
+ //80=整行背景色
1636
+ //101-199=数值型 201-299=字符型 301-350=进度条 351-400=按钮 401-499=日期时间
1635
1637
 
1636
1638
  if (IFrameSplitOperator.IsString(item[1])) stock.Name=item[1];
1637
1639
  if (IFrameSplitOperator.IsNumber(item[2])) stock.YClose=item[2];
@@ -1728,6 +1730,8 @@ function JSReportChartContainer(uielement)
1728
1730
  if (IFrameSplitOperator.IsNumber(item[46])) stock.RSpeed10M=item[46];
1729
1731
  if (IFrameSplitOperator.IsNumber(item[47])) stock.RSpeed15M=item[47];
1730
1732
 
1733
+ if (item[80] || item[80]===null) stock.BGColor=item[80]; //整行背景色
1734
+
1731
1735
  //10个数值型 101-199
1732
1736
  if (IFrameSplitOperator.IsNumber(item[101])) stock.ReserveNumber1=item[101];
1733
1737
  if (IFrameSplitOperator.IsNumber(item[102])) stock.ReserveNumber2=item[102];
@@ -1741,16 +1745,16 @@ function JSReportChartContainer(uielement)
1741
1745
  if (IFrameSplitOperator.IsNumber(item[110])) stock.ReserveNumber10=item[110];
1742
1746
 
1743
1747
  //10个字符型 201-299
1744
- if (IFrameSplitOperator.IsString(item[201])) stock.ReserveString1=item[201];
1745
- if (IFrameSplitOperator.IsString(item[202])) stock.ReserveString2=item[202];
1746
- if (IFrameSplitOperator.IsString(item[203])) stock.ReserveString3=item[203];
1747
- if (IFrameSplitOperator.IsString(item[204])) stock.ReserveString4=item[204];
1748
- if (IFrameSplitOperator.IsString(item[205])) stock.ReserveString5=item[205];
1749
- if (IFrameSplitOperator.IsString(item[206])) stock.ReserveString6=item[206];
1750
- if (IFrameSplitOperator.IsString(item[207])) stock.ReserveString7=item[207];
1751
- if (IFrameSplitOperator.IsString(item[208])) stock.ReserveString8=item[208];
1752
- if (IFrameSplitOperator.IsString(item[209])) stock.ReserveString9=item[209];
1753
- if (IFrameSplitOperator.IsString(item[210])) stock.ReserveString10=item[210];
1748
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) stock.ReserveString1=item[201];
1749
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) stock.ReserveString2=item[202];
1750
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) stock.ReserveString3=item[203];
1751
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) stock.ReserveString4=item[204];
1752
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) stock.ReserveString5=item[205];
1753
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) stock.ReserveString6=item[206];
1754
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) stock.ReserveString7=item[207];
1755
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) stock.ReserveString8=item[208];
1756
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) stock.ReserveString9=item[209];
1757
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) stock.ReserveString10=item[210];
1754
1758
 
1755
1759
  //10个进度条 301-350 { Value:, BGColor: }
1756
1760
  if (IFrameSplitOperator.IsNumber(item[301]) || IFrameSplitOperator.IsObject(item[301])) stock.ReserveProgressBar1=item[301];
@@ -1775,7 +1779,18 @@ function JSReportChartContainer(uielement)
1775
1779
  if (IFrameSplitOperator.IsObject(item[358])) stock.ReserveButton8=item[358];
1776
1780
  if (IFrameSplitOperator.IsObject(item[359])) stock.ReserveButton9=item[359];
1777
1781
  if (IFrameSplitOperator.IsObject(item[360])) stock.ReserveButton10=item[360];
1778
-
1782
+
1783
+ //10个日期时间类型 401-499 { Value:Date, BGColor }
1784
+ if (IFrameSplitOperator.IsObject(item[401])) stock.ReserveDateTime1=item[401];
1785
+ if (IFrameSplitOperator.IsObject(item[402])) stock.ReserveDateTime2=item[402];
1786
+ if (IFrameSplitOperator.IsObject(item[403])) stock.ReserveDateTime3=item[403];
1787
+ if (IFrameSplitOperator.IsObject(item[404])) stock.ReserveDateTime4=item[404];
1788
+ if (IFrameSplitOperator.IsObject(item[405])) stock.ReserveDateTime5=item[405];
1789
+ if (IFrameSplitOperator.IsObject(item[406])) stock.ReserveDateTime6=item[406];
1790
+ if (IFrameSplitOperator.IsObject(item[407])) stock.ReserveDateTime7=item[407];
1791
+ if (IFrameSplitOperator.IsObject(item[408])) stock.ReserveDateTime8=item[408];
1792
+ if (IFrameSplitOperator.IsObject(item[409])) stock.ReserveDateTime9=item[409];
1793
+ if (IFrameSplitOperator.IsObject(item[410])) stock.ReserveDateTime10=item[410];
1779
1794
  }
1780
1795
 
1781
1796
 
@@ -4622,6 +4637,18 @@ var REPORT_COLUMN_ID=
4622
4637
  RESERVE_BUTTON9_ID:459, //ReserveButton9:
4623
4638
  RESERVE_BUTTON10_ID:460, //ReserveButton10:
4624
4639
 
4640
+
4641
+ //预留日期时间类型 10个 501-599
4642
+ RESERVE_DATETIME1_ID:501, //ReserveDateTime1;
4643
+ RESERVE_DATETIME2_ID:502,
4644
+ RESERVE_DATETIME3_ID:503,
4645
+ RESERVE_DATETIME4_ID:504,
4646
+ RESERVE_DATETIME5_ID:505,
4647
+ RESERVE_DATETIME6_ID:506,
4648
+ RESERVE_DATETIME7_ID:507,
4649
+ RESERVE_DATETIME8_ID:508,
4650
+ RESERVE_DATETIME9_ID:509,
4651
+ RESERVE_DATETIME10_ID:510,
4625
4652
  }
4626
4653
 
4627
4654
 
@@ -4718,6 +4745,17 @@ var MAP_COLUMN_FIELD=new Map([
4718
4745
  [REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,"ReserveButton8"],
4719
4746
  [REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,"ReserveButton9"],
4720
4747
  [REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,"ReserveButton10"],
4748
+
4749
+ [REPORT_COLUMN_ID.RESERVE_DATETIME1_ID,"ReserveDateTime1"],
4750
+ [REPORT_COLUMN_ID.RESERVE_DATETIME2_ID,"ReserveDateTime2"],
4751
+ [REPORT_COLUMN_ID.RESERVE_DATETIME3_ID,"ReserveDateTime3"],
4752
+ [REPORT_COLUMN_ID.RESERVE_DATETIME4_ID,"ReserveDateTime4"],
4753
+ [REPORT_COLUMN_ID.RESERVE_DATETIME5_ID,"ReserveDateTime5"],
4754
+ [REPORT_COLUMN_ID.RESERVE_DATETIME6_ID,"ReserveDateTime6"],
4755
+ [REPORT_COLUMN_ID.RESERVE_DATETIME7_ID,"ReserveDateTime7"],
4756
+ [REPORT_COLUMN_ID.RESERVE_DATETIME8_ID,"ReserveDateTime8"],
4757
+ [REPORT_COLUMN_ID.RESERVE_DATETIME9_ID,"ReserveDateTime9"],
4758
+ [REPORT_COLUMN_ID.RESERVE_DATETIME10_ID,"ReserveDateTime10"],
4721
4759
  ]);
4722
4760
 
4723
4761
  function ChartReport()
@@ -5044,7 +5082,7 @@ function ChartReport()
5044
5082
  if (IFrameSplitOperator.IsBool(item.EnableFormatDrawInfoEvent)) colItem.EnableFormatDrawInfoEvent=item.EnableFormatDrawInfoEvent;
5045
5083
 
5046
5084
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
5047
- if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
5085
+ if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0) 3=(>YClose =YClose <YClose)
5048
5086
  if (item.Icon) colItem.Icon=item.Icon;
5049
5087
  if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.ChartTooltip={ Enable:item.EnableChartTooltip, Type:20 };
5050
5088
  if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type };
@@ -5113,6 +5151,11 @@ function ChartReport()
5113
5151
  else if (this.IsReserveNumber(item.Type))
5114
5152
  {
5115
5153
  if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
5154
+ if (item.StringFormat) colItem.StringFormat=item.StringFormat; //"{0}%" 输出增加固定字符
5155
+ }
5156
+ else if (this.IsReserveDateTime(item.Type))
5157
+ {
5158
+ if (item.DateTimeFormat) colItem.DateTimeFormat=item.DateTimeFormat; //日期格式化
5116
5159
  }
5117
5160
  else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
5118
5161
  {
@@ -5357,6 +5400,18 @@ function ChartReport()
5357
5400
  { Type:REPORT_COLUMN_ID.RESERVE_BUTTON8_ID, Title:"按钮8", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
5358
5401
  { Type:REPORT_COLUMN_ID.RESERVE_BUTTON9_ID, Title:"按钮9", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
5359
5402
  { Type:REPORT_COLUMN_ID.RESERVE_BUTTON10_ID, Title:"按钮10", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
5403
+
5404
+
5405
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME1_ID, Title:"日期1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5406
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME2_ID, Title:"日期2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5407
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME3_ID, Title:"日期3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5408
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME4_ID, Title:"日期4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5409
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME5_ID, Title:"日期5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5410
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME6_ID, Title:"日期6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5411
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME7_ID, Title:"日期7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5412
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME8_ID, Title:"日期8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5413
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME9_ID, Title:"日期9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5414
+ { Type:REPORT_COLUMN_ID.RESERVE_DATETIME10_ID, Title:"日期10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999-99-99", DateTimeFormat:"YYYY-MM-DD" },
5360
5415
 
5361
5416
  ];
5362
5417
 
@@ -6001,6 +6056,9 @@ function ChartReport()
6001
6056
  for(var i=this.Data.YOffset, j=0; i<dataCount && j<this.RowCount ;++i, ++j)
6002
6057
  {
6003
6058
  var symbol=this.Data.Data[i];
6059
+ var rtRowBG={ Left:left, Top:textTop, Width:rowWidth, Height:this.RowHeight };
6060
+ rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;
6061
+ rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;
6004
6062
 
6005
6063
  var bFillRow=false;
6006
6064
  if (this.MultiSelectModel==1)
@@ -6045,23 +6103,10 @@ function ChartReport()
6045
6103
  bFillRow=false;
6046
6104
  }
6047
6105
 
6048
- if (eventDrawBG && eventDrawBG.Callback)
6049
- {
6050
- //Out:{ BGColor: }
6051
- var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
6052
- eventDrawBG.Callback(eventDrawBG,sendData,this);
6053
- if (sendData.Out && sendData.Out.BGColor)
6054
- {
6055
- this.Canvas.fillStyle=sendData.Out.BGColor;
6056
- this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);
6057
- }
6058
- }
6106
+ this.DrawFullRowBGColor(symbol, eventDrawBG, i, rtRowBG, { Selected:selectedSymbol } );
6059
6107
 
6060
6108
  if (bFillRow)
6061
6109
  {
6062
- var rtRowBG={ Left:left, Top:textTop, Width:rowWidth, Height:this.RowHeight };
6063
- rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;
6064
- rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;
6065
6110
  this.AryFullSelectedRow.push(rtRowBG);
6066
6111
 
6067
6112
  if (this.SelectedStyle===1)
@@ -6077,8 +6122,35 @@ function ChartReport()
6077
6122
 
6078
6123
  textTop+=this.RowHeight;
6079
6124
  }
6125
+ }
6080
6126
 
6081
-
6127
+ //绘制整行背景色
6128
+ this.DrawFullRowBGColor=function(symbol, event, index, rtBG, option)
6129
+ {
6130
+ var data= { Symbol:symbol , Stock:null };
6131
+ if (this.GetStockDataCallback) data.Stock=this.GetStockDataCallback(symbol);
6132
+ if (data.Stock && data.Stock.BGColor)
6133
+ {
6134
+ this.Canvas.fillStyle=data.Stock.BGColor;
6135
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
6136
+ }
6137
+
6138
+ if (event && event.Callback)
6139
+ {
6140
+ //Out:{ BGColor: }
6141
+ var sendData={ RowIndex:index, Symbol:symbol, Out:null, MultiSelectModel:this.MultiSelectModel };
6142
+ if (option)
6143
+ {
6144
+ if (option.Selected) sendData.Selected=option.Selected;
6145
+ }
6146
+
6147
+ event.Callback(event,sendData,this);
6148
+ if (sendData.Out && sendData.Out.BGColor)
6149
+ {
6150
+ this.Canvas.fillStyle=sendData.Out.BGColor;
6151
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
6152
+ }
6153
+ }
6082
6154
  }
6083
6155
 
6084
6156
  this.DrawSelectedRow=function()
@@ -6634,6 +6706,11 @@ function ChartReport()
6634
6706
  this.FormatReserveString(column, stock, drawInfo);
6635
6707
  this.FormatDrawInfoEvent(stock, data, column, drawInfo);
6636
6708
  }
6709
+ else if (this.IsReserveDateTime(column.Type))
6710
+ {
6711
+ this.FormatReserveDateTime(column, stock, drawInfo);
6712
+ this.FormatDrawInfoEvent(stock, data, column, drawInfo);
6713
+ }
6637
6714
  else if (this.IsReserveProgressBarColumn(column.Type))
6638
6715
  {
6639
6716
  this.FormatReserveProgressBar(column, stock, drawInfo);
@@ -6803,6 +6880,18 @@ function ChartReport()
6803
6880
  return ARARY_TYPE.includes(value);
6804
6881
  }
6805
6882
 
6883
+ this.IsReserveDateTime=function(value)
6884
+ {
6885
+ var ARARY_TYPE=
6886
+ [
6887
+ REPORT_COLUMN_ID.RESERVE_DATETIME1_ID,REPORT_COLUMN_ID.RESERVE_DATETIME2_ID,REPORT_COLUMN_ID.RESERVE_DATETIME3_ID,REPORT_COLUMN_ID.RESERVE_DATETIME4_ID,
6888
+ REPORT_COLUMN_ID.RESERVE_DATETIME5_ID,REPORT_COLUMN_ID.RESERVE_DATETIME6_ID,REPORT_COLUMN_ID.RESERVE_DATETIME7_ID,REPORT_COLUMN_ID.RESERVE_DATETIME8_ID,
6889
+ REPORT_COLUMN_ID.RESERVE_DATETIME9_ID,REPORT_COLUMN_ID.RESERVE_DATETIME10_ID
6890
+ ];
6891
+
6892
+ return ARARY_TYPE.includes(value);
6893
+ }
6894
+
6806
6895
 
6807
6896
 
6808
6897
  this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
@@ -7181,6 +7270,10 @@ function ChartReport()
7181
7270
  {
7182
7271
  drawInfo.TextColor=this.GetUpDownColorV2(value,0);
7183
7272
  }
7273
+ else if (column.ColorType==3)
7274
+ {
7275
+ drawInfo.TextColor=this.GetUpDownColor(value,data.YClose);
7276
+ }
7184
7277
  }
7185
7278
 
7186
7279
  var text=value.toFixed(column.FloatPrecision);
@@ -7202,6 +7295,11 @@ function ChartReport()
7202
7295
  break;
7203
7296
  }
7204
7297
  }
7298
+
7299
+ if (column.StringFormat && text)
7300
+ {
7301
+ text=column.StringFormat.replace("{0}", text);
7302
+ }
7205
7303
 
7206
7304
  drawInfo.Text=text;
7207
7305
  }
@@ -7226,6 +7324,21 @@ function ChartReport()
7226
7324
  }
7227
7325
  }
7228
7326
 
7327
+ this.FormatReserveDateTime=function(column, data, drawInfo)
7328
+ {
7329
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
7330
+
7331
+ var fieldName=MAP_COLUMN_FIELD.get(column.Type);
7332
+ if (!data || !fieldName) return;
7333
+
7334
+ var item=data[fieldName];
7335
+ if (!IFrameSplitOperator.IsObject(item)) return;
7336
+
7337
+ if (item.DateTime) drawInfo.Text=IFrameSplitOperator.FormatDateTimeStringV2(item.DateTime,column.DateTimeFormat);
7338
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
7339
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
7340
+ }
7341
+
7229
7342
  this.FormatReserveProgressBar=function(column, data, drawInfo)
7230
7343
  {
7231
7344
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);