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.
@@ -6924,6 +6924,8 @@ var JSCHART_EVENT_ID=
6924
6924
  ON_CLICK_CROSSCURSOR_BOTTOM:170, //十字光标底部文字点击
6925
6925
 
6926
6926
  ON_CLICK_CHART_CELL:171, //点击图形单元
6927
+
6928
+ GET_DEFAULT_INDEX_PARAM:172, //获取指标默认参数
6927
6929
  }
6928
6930
 
6929
6931
  var JSCHART_OPERATOR_ID=
@@ -57325,6 +57327,24 @@ IFrameSplitOperator.FormatDateTimeString=function(value,isShowDate,isShowTime)
57325
57327
  return result;
57326
57328
  }
57327
57329
 
57330
+ IFrameSplitOperator.FormatDateTimeStringV2=function(datetime, format, languageID)
57331
+ {
57332
+ if (!datetime) return null;
57333
+
57334
+ switch(format)
57335
+ {
57336
+ case "YYYY-MM-DD":
57337
+ return `${datetime.getFullYear()}-${IFrameSplitOperator.NumberToString(datetime.getMonth()+1)}-${IFrameSplitOperator.NumberToString(datetime.getDate())}`;
57338
+
57339
+ case "HH:MM:SS":
57340
+ return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}`;
57341
+ case "HH:MM":
57342
+ return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}`;
57343
+ default:
57344
+ return null;
57345
+ }
57346
+ }
57347
+
57328
57348
  //字段颜色格式化
57329
57349
  IFrameSplitOperator.FormatValueColor = function (value, value2)
57330
57350
  {
@@ -137782,10 +137802,12 @@ function JSReportChartContainer(uielement)
137782
137802
  this.ReadStockJsonData=function(stock, item)
137783
137803
  {
137784
137804
  //0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本 16=涨停价 17=跌停价
137785
- //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值
137786
- //30=全局扩展数据 31=当前板块扩展数据 36=日期字段
137787
-
137788
- //88=价格颜色类型
137805
+ //18=内盘 19=外盘 20=现量 21=涨幅% 22=涨跌 23=换手率% 24=振幅% 25=流通市值 26=总市值 27=扩展名字
137806
+ //30=全局扩展数据 31=当前板块扩展数据
137807
+ //32=收盘价线 33=K线 35=时间 36=日期字段 38=持仓量 39=结算价 40=昨结算价 41=开仓量 42=平仓量
137808
+ //43=1m涨速% 44=3m涨速% 45=5m涨速% 46=10m涨速% 47=15m涨速%
137809
+ //80=整行背景色
137810
+ //101-199=数值型 201-299=字符型 301-350=进度条 351-400=按钮 401-499=日期时间
137789
137811
 
137790
137812
  if (IFrameSplitOperator.IsString(item[1])) stock.Name=item[1];
137791
137813
  if (IFrameSplitOperator.IsNumber(item[2])) stock.YClose=item[2];
@@ -137882,6 +137904,8 @@ function JSReportChartContainer(uielement)
137882
137904
  if (IFrameSplitOperator.IsNumber(item[46])) stock.RSpeed10M=item[46];
137883
137905
  if (IFrameSplitOperator.IsNumber(item[47])) stock.RSpeed15M=item[47];
137884
137906
 
137907
+ if (item[80] || item[80]===null) stock.BGColor=item[80]; //整行背景色
137908
+
137885
137909
  //10个数值型 101-199
137886
137910
  if (IFrameSplitOperator.IsNumber(item[101])) stock.ReserveNumber1=item[101];
137887
137911
  if (IFrameSplitOperator.IsNumber(item[102])) stock.ReserveNumber2=item[102];
@@ -137895,16 +137919,16 @@ function JSReportChartContainer(uielement)
137895
137919
  if (IFrameSplitOperator.IsNumber(item[110])) stock.ReserveNumber10=item[110];
137896
137920
 
137897
137921
  //10个字符型 201-299
137898
- if (IFrameSplitOperator.IsString(item[201])) stock.ReserveString1=item[201];
137899
- if (IFrameSplitOperator.IsString(item[202])) stock.ReserveString2=item[202];
137900
- if (IFrameSplitOperator.IsString(item[203])) stock.ReserveString3=item[203];
137901
- if (IFrameSplitOperator.IsString(item[204])) stock.ReserveString4=item[204];
137902
- if (IFrameSplitOperator.IsString(item[205])) stock.ReserveString5=item[205];
137903
- if (IFrameSplitOperator.IsString(item[206])) stock.ReserveString6=item[206];
137904
- if (IFrameSplitOperator.IsString(item[207])) stock.ReserveString7=item[207];
137905
- if (IFrameSplitOperator.IsString(item[208])) stock.ReserveString8=item[208];
137906
- if (IFrameSplitOperator.IsString(item[209])) stock.ReserveString9=item[209];
137907
- if (IFrameSplitOperator.IsString(item[210])) stock.ReserveString10=item[210];
137922
+ if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) stock.ReserveString1=item[201];
137923
+ if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) stock.ReserveString2=item[202];
137924
+ if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) stock.ReserveString3=item[203];
137925
+ if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) stock.ReserveString4=item[204];
137926
+ if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) stock.ReserveString5=item[205];
137927
+ if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) stock.ReserveString6=item[206];
137928
+ if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) stock.ReserveString7=item[207];
137929
+ if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) stock.ReserveString8=item[208];
137930
+ if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) stock.ReserveString9=item[209];
137931
+ if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) stock.ReserveString10=item[210];
137908
137932
 
137909
137933
  //10个进度条 301-350 { Value:, BGColor: }
137910
137934
  if (IFrameSplitOperator.IsNumber(item[301]) || IFrameSplitOperator.IsObject(item[301])) stock.ReserveProgressBar1=item[301];
@@ -137929,7 +137953,18 @@ function JSReportChartContainer(uielement)
137929
137953
  if (IFrameSplitOperator.IsObject(item[358])) stock.ReserveButton8=item[358];
137930
137954
  if (IFrameSplitOperator.IsObject(item[359])) stock.ReserveButton9=item[359];
137931
137955
  if (IFrameSplitOperator.IsObject(item[360])) stock.ReserveButton10=item[360];
137932
-
137956
+
137957
+ //10个日期时间类型 401-499 { Value:Date, BGColor }
137958
+ if (IFrameSplitOperator.IsObject(item[401])) stock.ReserveDateTime1=item[401];
137959
+ if (IFrameSplitOperator.IsObject(item[402])) stock.ReserveDateTime2=item[402];
137960
+ if (IFrameSplitOperator.IsObject(item[403])) stock.ReserveDateTime3=item[403];
137961
+ if (IFrameSplitOperator.IsObject(item[404])) stock.ReserveDateTime4=item[404];
137962
+ if (IFrameSplitOperator.IsObject(item[405])) stock.ReserveDateTime5=item[405];
137963
+ if (IFrameSplitOperator.IsObject(item[406])) stock.ReserveDateTime6=item[406];
137964
+ if (IFrameSplitOperator.IsObject(item[407])) stock.ReserveDateTime7=item[407];
137965
+ if (IFrameSplitOperator.IsObject(item[408])) stock.ReserveDateTime8=item[408];
137966
+ if (IFrameSplitOperator.IsObject(item[409])) stock.ReserveDateTime9=item[409];
137967
+ if (IFrameSplitOperator.IsObject(item[410])) stock.ReserveDateTime10=item[410];
137933
137968
  }
137934
137969
 
137935
137970
 
@@ -140776,6 +140811,18 @@ var REPORT_COLUMN_ID=
140776
140811
  RESERVE_BUTTON9_ID:459, //ReserveButton9:
140777
140812
  RESERVE_BUTTON10_ID:460, //ReserveButton10:
140778
140813
 
140814
+
140815
+ //预留日期时间类型 10个 501-599
140816
+ RESERVE_DATETIME1_ID:501, //ReserveDateTime1;
140817
+ RESERVE_DATETIME2_ID:502,
140818
+ RESERVE_DATETIME3_ID:503,
140819
+ RESERVE_DATETIME4_ID:504,
140820
+ RESERVE_DATETIME5_ID:505,
140821
+ RESERVE_DATETIME6_ID:506,
140822
+ RESERVE_DATETIME7_ID:507,
140823
+ RESERVE_DATETIME8_ID:508,
140824
+ RESERVE_DATETIME9_ID:509,
140825
+ RESERVE_DATETIME10_ID:510,
140779
140826
  }
140780
140827
 
140781
140828
 
@@ -140872,6 +140919,17 @@ var MAP_COLUMN_FIELD=new Map([
140872
140919
  [REPORT_COLUMN_ID.RESERVE_BUTTON8_ID,"ReserveButton8"],
140873
140920
  [REPORT_COLUMN_ID.RESERVE_BUTTON9_ID,"ReserveButton9"],
140874
140921
  [REPORT_COLUMN_ID.RESERVE_BUTTON10_ID,"ReserveButton10"],
140922
+
140923
+ [REPORT_COLUMN_ID.RESERVE_DATETIME1_ID,"ReserveDateTime1"],
140924
+ [REPORT_COLUMN_ID.RESERVE_DATETIME2_ID,"ReserveDateTime2"],
140925
+ [REPORT_COLUMN_ID.RESERVE_DATETIME3_ID,"ReserveDateTime3"],
140926
+ [REPORT_COLUMN_ID.RESERVE_DATETIME4_ID,"ReserveDateTime4"],
140927
+ [REPORT_COLUMN_ID.RESERVE_DATETIME5_ID,"ReserveDateTime5"],
140928
+ [REPORT_COLUMN_ID.RESERVE_DATETIME6_ID,"ReserveDateTime6"],
140929
+ [REPORT_COLUMN_ID.RESERVE_DATETIME7_ID,"ReserveDateTime7"],
140930
+ [REPORT_COLUMN_ID.RESERVE_DATETIME8_ID,"ReserveDateTime8"],
140931
+ [REPORT_COLUMN_ID.RESERVE_DATETIME9_ID,"ReserveDateTime9"],
140932
+ [REPORT_COLUMN_ID.RESERVE_DATETIME10_ID,"ReserveDateTime10"],
140875
140933
  ]);
140876
140934
 
140877
140935
  function ChartReport()
@@ -141198,7 +141256,7 @@ function ChartReport()
141198
141256
  if (IFrameSplitOperator.IsBool(item.EnableFormatDrawInfoEvent)) colItem.EnableFormatDrawInfoEvent=item.EnableFormatDrawInfoEvent;
141199
141257
 
141200
141258
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
141201
- if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
141259
+ if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0) 3=(>YClose =YClose <YClose)
141202
141260
  if (item.Icon) colItem.Icon=item.Icon;
141203
141261
  if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.ChartTooltip={ Enable:item.EnableChartTooltip, Type:20 };
141204
141262
  if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type };
@@ -141267,6 +141325,11 @@ function ChartReport()
141267
141325
  else if (this.IsReserveNumber(item.Type))
141268
141326
  {
141269
141327
  if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
141328
+ if (item.StringFormat) colItem.StringFormat=item.StringFormat; //"{0}%" 输出增加固定字符
141329
+ }
141330
+ else if (this.IsReserveDateTime(item.Type))
141331
+ {
141332
+ if (item.DateTimeFormat) colItem.DateTimeFormat=item.DateTimeFormat; //日期格式化
141270
141333
  }
141271
141334
  else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
141272
141335
  {
@@ -141511,6 +141574,18 @@ function ChartReport()
141511
141574
  { Type:REPORT_COLUMN_ID.RESERVE_BUTTON8_ID, Title:"按钮8", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
141512
141575
  { Type:REPORT_COLUMN_ID.RESERVE_BUTTON9_ID, Title:"按钮9", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
141513
141576
  { Type:REPORT_COLUMN_ID.RESERVE_BUTTON10_ID, Title:"按钮10", TextAlign:"center", FixedWidth:50*GetDevicePixelRatio() },
141577
+
141578
+
141579
+ { 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" },
141580
+ { 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" },
141581
+ { 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" },
141582
+ { 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" },
141583
+ { 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" },
141584
+ { 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" },
141585
+ { 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" },
141586
+ { 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" },
141587
+ { 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" },
141588
+ { 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" },
141514
141589
 
141515
141590
  ];
141516
141591
 
@@ -142155,6 +142230,9 @@ function ChartReport()
142155
142230
  for(var i=this.Data.YOffset, j=0; i<dataCount && j<this.RowCount ;++i, ++j)
142156
142231
  {
142157
142232
  var symbol=this.Data.Data[i];
142233
+ var rtRowBG={ Left:left, Top:textTop, Width:rowWidth, Height:this.RowHeight };
142234
+ rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;
142235
+ rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;
142158
142236
 
142159
142237
  var bFillRow=false;
142160
142238
  if (this.MultiSelectModel==1)
@@ -142199,23 +142277,10 @@ function ChartReport()
142199
142277
  bFillRow=false;
142200
142278
  }
142201
142279
 
142202
- if (eventDrawBG && eventDrawBG.Callback)
142203
- {
142204
- //Out:{ BGColor: }
142205
- var sendData={ RowIndex:i, Symbol:symbol, Out:null, Selected:selectedSymbol, MultiSelectModel:this.MultiSelectModel };
142206
- eventDrawBG.Callback(eventDrawBG,sendData,this);
142207
- if (sendData.Out && sendData.Out.BGColor)
142208
- {
142209
- this.Canvas.fillStyle=sendData.Out.BGColor;
142210
- this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);
142211
- }
142212
- }
142280
+ this.DrawFullRowBGColor(symbol, eventDrawBG, i, rtRowBG, { Selected:selectedSymbol } );
142213
142281
 
142214
142282
  if (bFillRow)
142215
142283
  {
142216
- var rtRowBG={ Left:left, Top:textTop, Width:rowWidth, Height:this.RowHeight };
142217
- rtRowBG.Right=rtRowBG.Left+rtRowBG.Width;
142218
- rtRowBG.Bottom=rtRowBG.Top+rtRowBG.Height;
142219
142284
  this.AryFullSelectedRow.push(rtRowBG);
142220
142285
 
142221
142286
  if (this.SelectedStyle===1)
@@ -142231,8 +142296,35 @@ function ChartReport()
142231
142296
 
142232
142297
  textTop+=this.RowHeight;
142233
142298
  }
142299
+ }
142234
142300
 
142235
-
142301
+ //绘制整行背景色
142302
+ this.DrawFullRowBGColor=function(symbol, event, index, rtBG, option)
142303
+ {
142304
+ var data= { Symbol:symbol , Stock:null };
142305
+ if (this.GetStockDataCallback) data.Stock=this.GetStockDataCallback(symbol);
142306
+ if (data.Stock && data.Stock.BGColor)
142307
+ {
142308
+ this.Canvas.fillStyle=data.Stock.BGColor;
142309
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
142310
+ }
142311
+
142312
+ if (event && event.Callback)
142313
+ {
142314
+ //Out:{ BGColor: }
142315
+ var sendData={ RowIndex:index, Symbol:symbol, Out:null, MultiSelectModel:this.MultiSelectModel };
142316
+ if (option)
142317
+ {
142318
+ if (option.Selected) sendData.Selected=option.Selected;
142319
+ }
142320
+
142321
+ event.Callback(event,sendData,this);
142322
+ if (sendData.Out && sendData.Out.BGColor)
142323
+ {
142324
+ this.Canvas.fillStyle=sendData.Out.BGColor;
142325
+ this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
142326
+ }
142327
+ }
142236
142328
  }
142237
142329
 
142238
142330
  this.DrawSelectedRow=function()
@@ -142788,6 +142880,11 @@ function ChartReport()
142788
142880
  this.FormatReserveString(column, stock, drawInfo);
142789
142881
  this.FormatDrawInfoEvent(stock, data, column, drawInfo);
142790
142882
  }
142883
+ else if (this.IsReserveDateTime(column.Type))
142884
+ {
142885
+ this.FormatReserveDateTime(column, stock, drawInfo);
142886
+ this.FormatDrawInfoEvent(stock, data, column, drawInfo);
142887
+ }
142791
142888
  else if (this.IsReserveProgressBarColumn(column.Type))
142792
142889
  {
142793
142890
  this.FormatReserveProgressBar(column, stock, drawInfo);
@@ -142957,6 +143054,18 @@ function ChartReport()
142957
143054
  return ARARY_TYPE.includes(value);
142958
143055
  }
142959
143056
 
143057
+ this.IsReserveDateTime=function(value)
143058
+ {
143059
+ var ARARY_TYPE=
143060
+ [
143061
+ REPORT_COLUMN_ID.RESERVE_DATETIME1_ID,REPORT_COLUMN_ID.RESERVE_DATETIME2_ID,REPORT_COLUMN_ID.RESERVE_DATETIME3_ID,REPORT_COLUMN_ID.RESERVE_DATETIME4_ID,
143062
+ REPORT_COLUMN_ID.RESERVE_DATETIME5_ID,REPORT_COLUMN_ID.RESERVE_DATETIME6_ID,REPORT_COLUMN_ID.RESERVE_DATETIME7_ID,REPORT_COLUMN_ID.RESERVE_DATETIME8_ID,
143063
+ REPORT_COLUMN_ID.RESERVE_DATETIME9_ID,REPORT_COLUMN_ID.RESERVE_DATETIME10_ID
143064
+ ];
143065
+
143066
+ return ARARY_TYPE.includes(value);
143067
+ }
143068
+
142960
143069
 
142961
143070
 
142962
143071
  this.DrawCustomText=function(drawInfo, column, left, top, cellWidth)
@@ -143335,6 +143444,10 @@ function ChartReport()
143335
143444
  {
143336
143445
  drawInfo.TextColor=this.GetUpDownColorV2(value,0);
143337
143446
  }
143447
+ else if (column.ColorType==3)
143448
+ {
143449
+ drawInfo.TextColor=this.GetUpDownColor(value,data.YClose);
143450
+ }
143338
143451
  }
143339
143452
 
143340
143453
  var text=value.toFixed(column.FloatPrecision);
@@ -143356,6 +143469,11 @@ function ChartReport()
143356
143469
  break;
143357
143470
  }
143358
143471
  }
143472
+
143473
+ if (column.StringFormat && text)
143474
+ {
143475
+ text=column.StringFormat.replace("{0}", text);
143476
+ }
143359
143477
 
143360
143478
  drawInfo.Text=text;
143361
143479
  }
@@ -143380,6 +143498,21 @@ function ChartReport()
143380
143498
  }
143381
143499
  }
143382
143500
 
143501
+ this.FormatReserveDateTime=function(column, data, drawInfo)
143502
+ {
143503
+ if (column.DefaultText) drawInfo.Text=column.DefaultText;
143504
+
143505
+ var fieldName=MAP_COLUMN_FIELD.get(column.Type);
143506
+ if (!data || !fieldName) return;
143507
+
143508
+ var item=data[fieldName];
143509
+ if (!IFrameSplitOperator.IsObject(item)) return;
143510
+
143511
+ if (item.DateTime) drawInfo.Text=IFrameSplitOperator.FormatDateTimeStringV2(item.DateTime,column.DateTimeFormat);
143512
+ if (item.TextColor) drawInfo.TextColor=item.TextColor;
143513
+ if (item.BGColor) drawInfo.BGColor=item.BGColor;
143514
+ }
143515
+
143383
143516
  this.FormatReserveProgressBar=function(column, data, drawInfo)
143384
143517
  {
143385
143518
  var fieldName=MAP_COLUMN_FIELD.get(column.Type);
@@ -159643,7 +159776,8 @@ function JSDialogModifyIndexParam()
159643
159776
 
159644
159777
  this.AryData=[];
159645
159778
  this.IndexData=null; //指标数据 { WindowsIndex:, Type:1=主图 2=叠加, Identify, IndexScript: }
159646
- this.Arguments=[]; //参数备份
159779
+ this.Arguments=[]; //默认参数
159780
+ this.EnableRestoreParam=true; //是否允许“恢复默认"
159647
159781
 
159648
159782
  this.RestoreFocusDelay=800;
159649
159783
 
@@ -159654,6 +159788,7 @@ function JSDialogModifyIndexParam()
159654
159788
  {
159655
159789
  if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
159656
159790
  if (IFrameSplitOperator.IsNumber(option.MaxRowCount)) this.MaxRowCount=option.MaxRowCount;
159791
+ if (IFrameSplitOperator.IsBool(option.EnableRestoreParam)) this.EnableRestoreParam=option.EnableRestoreParam;
159657
159792
  }
159658
159793
  }
159659
159794
 
@@ -159694,7 +159829,7 @@ function JSDialogModifyIndexParam()
159694
159829
 
159695
159830
  this.OnClickColseButton=function(e)
159696
159831
  {
159697
- this.RestoreParam(); //还原参数
159832
+ //this.RestoreParam(); //还原参数
159698
159833
  this.Close(e);
159699
159834
  }
159700
159835
 
@@ -159725,7 +159860,8 @@ function JSDialogModifyIndexParam()
159725
159860
  this.SetIndexData=function(data)
159726
159861
  {
159727
159862
  this.IndexData=data;
159728
- this.BackupParam();
159863
+ this.GetDefaultParam();
159864
+ //this.BackupParam();
159729
159865
  }
159730
159866
 
159731
159867
  this.OnMouseDownTitle=function(e)
@@ -159803,31 +159939,6 @@ function JSDialogModifyIndexParam()
159803
159939
  table.className="UMyChart_ModifyIndexParam_Table";
159804
159940
  divTable.appendChild(table);
159805
159941
 
159806
- /*
159807
- var thead=document.createElement("thead");
159808
- table.appendChild(thead);
159809
-
159810
- var trDom=document.createElement("tr");
159811
- trDom.className='UMyChart_ModifyIndexParam_head_Tr';
159812
- thead.appendChild(trDom);
159813
-
159814
- var thDom=document.createElement("th");
159815
- thDom.className="UMyChart_ModifyIndexParam_Th";
159816
- thDom.innerText="变量";
159817
- trDom.appendChild(thDom);
159818
-
159819
- var thDom=document.createElement("th");
159820
- thDom.className="UMyChart_ModifyIndexParam_Th";
159821
- thDom.innerText="数值";
159822
- trDom.appendChild(thDom);
159823
-
159824
- var thDom=document.createElement("th");
159825
- thDom.className="UMyChart_ModifyIndexParam_Th";
159826
- thDom.innerText="说明";
159827
- trDom.appendChild(thDom);
159828
- */
159829
-
159830
-
159831
159942
  var tbody=document.createElement("tbody");
159832
159943
  tbody.className="UMyChart_ModifyIndexParam_Tbody";
159833
159944
  table.appendChild(tbody);
@@ -159844,17 +159955,29 @@ function JSDialogModifyIndexParam()
159844
159955
  divButton.className='UMyChart_ModifyIndexParam_Button_Div';
159845
159956
  divFrame.appendChild(divButton);
159846
159957
 
159847
- var btnRestore=document.createElement("button");
159848
- //btnRestore.className="UMyChart_ModifyIndexParam_button";
159849
- btnRestore.innerText="恢复默认";
159850
- btnRestore.addEventListener("mousedown", (e)=>{ this.OnClickRestoreButton(e); });
159851
- divButton.appendChild(btnRestore);
159958
+ if (this.EnableRestoreParam)
159959
+ {
159960
+ var btnRestore=document.createElement("button");
159961
+ //btnRestore.className="UMyChart_ModifyIndexParam_button";
159962
+ btnRestore.innerText="恢复默认";
159963
+ btnRestore.addEventListener("mousedown", (e)=>{ this.OnClickRestoreButton(e); });
159964
+ divButton.appendChild(btnRestore);
159965
+ }
159966
+
159852
159967
 
159968
+ /*
159853
159969
  var btnOk=document.createElement("button");
159854
159970
  //btnOk.className="UMyChart_ModifyIndexParam_button";
159855
159971
  btnOk.innerText="确认";
159856
159972
  btnOk.addEventListener("mousedown", (e)=>{ this.OnClickOkButton(e); })
159857
159973
  divButton.appendChild(btnOk);
159974
+ */
159975
+
159976
+ var btnOk=document.createElement("button");
159977
+ //btnOk.className="UMyChart_ModifyIndexParam_button";
159978
+ btnOk.innerText="关闭";
159979
+ btnOk.addEventListener("mousedown", (e)=>{ this.Close(e); })
159980
+ divButton.appendChild(btnOk);
159858
159981
 
159859
159982
  document.body.appendChild(divDom);
159860
159983
 
@@ -159996,6 +160119,41 @@ function JSDialogModifyIndexParam()
159996
160119
  }
159997
160120
  }
159998
160121
 
160122
+ this.GetDefaultParam=function()
160123
+ {
160124
+ this.Arguments=[];
160125
+ if (!this.IndexData || !this.IndexData.IndexScript) return;
160126
+ var indexScript=this.IndexData.IndexScript;
160127
+
160128
+ var args=[];
160129
+ if (indexScript.ID)
160130
+ {
160131
+ var scriptData = new JSIndexScript();
160132
+ var indexInfo = scriptData.Get(indexScript.ID);
160133
+ if (indexInfo) args=indexInfo.Args;
160134
+ }
160135
+
160136
+ var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.GET_DEFAULT_INDEX_PARAM);
160137
+ if (event && event.Callback)
160138
+ {
160139
+ var sendData={ IndexData:this.IndexData, Args:args.slice(), PreventDefault:false };
160140
+ event.Callback(event, sendData, this);
160141
+
160142
+ if (sendData.PreventDefault) return;
160143
+
160144
+ args=sendData.Args;
160145
+ }
160146
+
160147
+ if (IFrameSplitOperator.IsNonEmptyArray(args))
160148
+ {
160149
+ for(var i=0;i<args.length;++i)
160150
+ {
160151
+ var item=args[i];
160152
+ this.Arguments.push({Name:item.Name, Value:item.Value, Index:i});
160153
+ }
160154
+ }
160155
+ }
160156
+
159999
160157
  this.OnParamMouseUp=function(e)
160000
160158
  {
160001
160159
  var input=e.target;
@@ -160162,7 +160320,7 @@ function HQChartScriptWorker()
160162
160320
 
160163
160321
 
160164
160322
 
160165
- var HQCHART_VERSION="1.1.14797";
160323
+ var HQCHART_VERSION="1.1.14807";
160166
160324
 
160167
160325
  function PrintHQChartVersion()
160168
160326
  {