hqchart 1.1.14274 → 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.
@@ -74558,9 +74558,9 @@ function JSChartResource()
74558
74558
  SortIcon:
74559
74559
  {
74560
74560
  Size:12, Family:"iconfont",
74561
- Arrow:[null, "\ue6b2", "\ue6b1"], //[0]=默认排序的图标背景色
74562
- Color:[null, "rgb(255,0,0)", "rgb(255,0,0)"],
74563
- Margin:{ Left:0, Bottom:2, Right:0,}
74561
+ Arrow:["\ue704", "\ue81b", "\uf0c9"], //[0]=默认排序的图标背景色
74562
+ Color:['rgb(169,169,169)', "rgb(51,51,51)", "rgb(51,51,51)"],
74563
+ Margin:{ Left:1*GetDevicePixelRatio(), Bottom:2, Right:0,}
74564
74564
  },
74565
74565
 
74566
74566
  Item:
@@ -75822,6 +75822,23 @@ function JSChartResource()
75822
75822
  }
75823
75823
  }
75824
75824
 
75825
+ if (item.SortIcon)
75826
+ {
75827
+ var sort=item.SortIcon;
75828
+ if (IFrameSplitOperator.IsNonEmptyArray(sort.Color)) this.Report.SortIcon.Color=sort.Color.slice();
75829
+ if (IFrameSplitOperator.IsNumber(sort.Size)) this.Report.SortIcon.Size=sort.Size;
75830
+ if (sort.Family) this.Report.SortIcon.Family=sort.Family;
75831
+ if (IFrameSplitOperator.IsNonEmptyArray(sort.Arrow)) this.Report.SortIcon.Arrow=sort.Arrow.slice();
75832
+ if (sort.Margin)
75833
+ {
75834
+ var margin=sort.Margin;
75835
+ if (IFrameSplitOperator.IsNumber(margin.Left)) this.Report.SortIcon.Margin.Left=margin.Left;
75836
+ if (IFrameSplitOperator.IsNumber(margin.Right)) this.Report.SortIcon.Margin.Right=margin.Right;
75837
+ if (IFrameSplitOperator.IsNumber(margin.Top)) this.Report.SortIcon.Margin.Top=margin.Top;
75838
+ if (IFrameSplitOperator.IsNumber(margin.Bottom)) this.Report.SortIcon.Margin.Bottom=margin.Bottom;
75839
+ }
75840
+ }
75841
+
75825
75842
  if (item.Item)
75826
75843
  {
75827
75844
  var row=item.Item;
@@ -124551,6 +124568,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
124551
124568
 
124552
124569
  result.push(outVarItem);
124553
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
+ }
124554
124584
  else
124555
124585
  {
124556
124586
  var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
@@ -126251,6 +126281,12 @@ function GetBlackStyle()
126251
126281
  //Mergin:{ Left:5, Right:5, Top:4, Bottom:2 },
126252
126282
  Font:{ Size:12, Name:"微软雅黑" }
126253
126283
  },
126284
+
126285
+ //排序图标
126286
+ SortIcon:
126287
+ {
126288
+ Color:['rgb(105,105,105)', "rgb(255,255,255)", "rgb(255,255,255)"],
126289
+ },
126254
126290
 
126255
126291
  Item:
126256
126292
  {
@@ -132368,6 +132404,8 @@ var REPORT_COLUMN_ID=
132368
132404
  CUSTOM_PROGRESS_ID:106, //进度条
132369
132405
  CUSTOM_LINK_ID:107, //链接
132370
132406
 
132407
+ MULTI_LINE_CONTAINER:108, //多行组合输出
132408
+
132371
132409
 
132372
132410
  //预留数值类型 10个
132373
132411
  RESERVE_NUMBER1_ID:201, //ReserveNumber1:
@@ -132929,6 +132967,10 @@ function ChartReport()
132929
132967
  {
132930
132968
  if (IFrameSplitOperator.IsNumber(item.FormatType)) colItem.FormatType=item.FormatType;
132931
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
+ }
132932
132974
 
132933
132975
  return colItem;
132934
132976
  }
@@ -133081,6 +133123,12 @@ function ChartReport()
133081
133123
  { Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID, Title:"10分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
133082
133124
  { Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID, Title:"15分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
133083
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
+
133084
133132
  { Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
133085
133133
  { Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
133086
133134
  { Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
@@ -133292,6 +133340,17 @@ function ChartReport()
133292
133340
  if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
133293
133341
  if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
133294
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
+ }
133295
133354
  else if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID) //单行显示
133296
133355
  {
133297
133356
  this.Canvas.font==this.NameSymbolFont.Name;
@@ -133409,7 +133468,7 @@ function ChartReport()
133409
133468
  //排序
133410
133469
  var bDrawSortBG=this.IsDrawSortBGIcon();
133411
133470
  if (this.SortInfo && this.SortInfo.Field==index && this.SortInfo.Sort>0) lastItem.Sort={ Type:this.SortInfo.Sort };
133412
- else if (column.Sort>0 && bDrawSortBG) lastItem.Sort={ Type:0 };
133471
+ else if (column.Sort>0 && bDrawSortBG && IFrameSplitOperator.IsNonEmptyArray(column.SortType) && column.SortType.length>=2) lastItem.Sort={ Type:0 };
133413
133472
 
133414
133473
  //图标
133415
133474
  if (column.Icon) lastItem.Icon=column.Icon;
@@ -133424,9 +133483,7 @@ function ChartReport()
133424
133483
 
133425
133484
  var pixelRatio=GetDevicePixelRatio();
133426
133485
  var cellWidth=drawInfo.Rect.Width;
133427
-
133428
- if (drawInfo.AryText.length>1)
133429
- var nnnn=10;
133486
+ var bDrawSortBG=this.IsDrawSortBGIcon();
133430
133487
 
133431
133488
  var y=drawInfo.YText;
133432
133489
  for(var i=0;i<drawInfo.AryText.length;++i)
@@ -133480,11 +133537,21 @@ function ChartReport()
133480
133537
 
133481
133538
  if (sortWidth>1) //排序
133482
133539
  {
133540
+ this.Canvas.font=this.SortFont;
133541
+ var xSort=x;
133542
+ if (this.SortConfig.Margin && IFrameSplitOperator.IsNumber(this.SortConfig.Margin.Left)) xSort+=this.SortConfig.Margin.Left;
133543
+ if (item.Sort.Type!=0 && bDrawSortBG) //背景
133544
+ {
133545
+ var sortText=this.SortConfig.Arrow[0];
133546
+ var sortColor=this.SortConfig.Color[0];
133547
+ this.Canvas.fillStyle=sortColor;
133548
+ this.Canvas.fillText(sortText,xSort,y-this.SortConfig.Margin.Bottom);
133549
+ }
133550
+
133483
133551
  var sortText=this.SortConfig.Arrow[item.Sort.Type];
133484
133552
  var sortColor=this.SortConfig.Color[item.Sort.Type];
133485
- this.Canvas.font=this.SortFont;
133486
133553
  this.Canvas.fillStyle=sortColor;
133487
- this.Canvas.fillText(sortText,x,y-this.SortConfig.Margin.Bottom);
133554
+ this.Canvas.fillText(sortText,xSort,y-this.SortConfig.Margin.Bottom);
133488
133555
  x+=sortWidth;
133489
133556
  }
133490
133557
 
@@ -133877,6 +133944,87 @@ function ChartReport()
133877
133944
  }
133878
133945
  }
133879
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
+
133880
134028
  this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
133881
134029
  {
133882
134030
  var itemWidth=column.Width;
@@ -134202,6 +134350,26 @@ function ChartReport()
134202
134350
  {
134203
134351
  this.FormatReserveButton(column, stock, drawInfo);
134204
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
+ }
134205
134373
 
134206
134374
 
134207
134375
  //拖拽行颜色
@@ -134231,6 +134399,10 @@ function ChartReport()
134231
134399
  else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
134232
134400
  {
134233
134401
  this.DrawLinkText(drawInfo, x, top, textWidth);
134402
+ }
134403
+ else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
134404
+ {
134405
+
134234
134406
  }
134235
134407
  else
134236
134408
  {
@@ -140548,7 +140720,7 @@ function ScrollBarBGChart()
140548
140720
 
140549
140721
 
140550
140722
 
140551
- var HQCHART_VERSION="1.1.14273";
140723
+ var HQCHART_VERSION="1.1.14279";
140552
140724
 
140553
140725
  function PrintHQChartVersion()
140554
140726
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14273";
8
+ var HQCHART_VERSION="1.1.14279";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -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
  /*暴露外部用的方法*/
@@ -74602,9 +74602,9 @@ function JSChartResource()
74602
74602
  SortIcon:
74603
74603
  {
74604
74604
  Size:12, Family:"iconfont",
74605
- Arrow:[null, "\ue6b2", "\ue6b1"], //[0]=默认排序的图标背景色
74606
- Color:[null, "rgb(255,0,0)", "rgb(255,0,0)"],
74607
- Margin:{ Left:0, Bottom:2, Right:0,}
74605
+ Arrow:["\ue704", "\ue81b", "\uf0c9"], //[0]=默认排序的图标背景色
74606
+ Color:['rgb(169,169,169)', "rgb(51,51,51)", "rgb(51,51,51)"],
74607
+ Margin:{ Left:1*GetDevicePixelRatio(), Bottom:2, Right:0,}
74608
74608
  },
74609
74609
 
74610
74610
  Item:
@@ -75866,6 +75866,23 @@ function JSChartResource()
75866
75866
  }
75867
75867
  }
75868
75868
 
75869
+ if (item.SortIcon)
75870
+ {
75871
+ var sort=item.SortIcon;
75872
+ if (IFrameSplitOperator.IsNonEmptyArray(sort.Color)) this.Report.SortIcon.Color=sort.Color.slice();
75873
+ if (IFrameSplitOperator.IsNumber(sort.Size)) this.Report.SortIcon.Size=sort.Size;
75874
+ if (sort.Family) this.Report.SortIcon.Family=sort.Family;
75875
+ if (IFrameSplitOperator.IsNonEmptyArray(sort.Arrow)) this.Report.SortIcon.Arrow=sort.Arrow.slice();
75876
+ if (sort.Margin)
75877
+ {
75878
+ var margin=sort.Margin;
75879
+ if (IFrameSplitOperator.IsNumber(margin.Left)) this.Report.SortIcon.Margin.Left=margin.Left;
75880
+ if (IFrameSplitOperator.IsNumber(margin.Right)) this.Report.SortIcon.Margin.Right=margin.Right;
75881
+ if (IFrameSplitOperator.IsNumber(margin.Top)) this.Report.SortIcon.Margin.Top=margin.Top;
75882
+ if (IFrameSplitOperator.IsNumber(margin.Bottom)) this.Report.SortIcon.Margin.Bottom=margin.Bottom;
75883
+ }
75884
+ }
75885
+
75869
75886
  if (item.Item)
75870
75887
  {
75871
75888
  var row=item.Item;
@@ -124595,6 +124612,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
124595
124612
 
124596
124613
  result.push(outVarItem);
124597
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
+ }
124598
124628
  else
124599
124629
  {
124600
124630
  var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
@@ -126295,6 +126325,12 @@ function GetBlackStyle()
126295
126325
  //Mergin:{ Left:5, Right:5, Top:4, Bottom:2 },
126296
126326
  Font:{ Size:12, Name:"微软雅黑" }
126297
126327
  },
126328
+
126329
+ //排序图标
126330
+ SortIcon:
126331
+ {
126332
+ Color:['rgb(105,105,105)', "rgb(255,255,255)", "rgb(255,255,255)"],
126333
+ },
126298
126334
 
126299
126335
  Item:
126300
126336
  {
@@ -132412,6 +132448,8 @@ var REPORT_COLUMN_ID=
132412
132448
  CUSTOM_PROGRESS_ID:106, //进度条
132413
132449
  CUSTOM_LINK_ID:107, //链接
132414
132450
 
132451
+ MULTI_LINE_CONTAINER:108, //多行组合输出
132452
+
132415
132453
 
132416
132454
  //预留数值类型 10个
132417
132455
  RESERVE_NUMBER1_ID:201, //ReserveNumber1:
@@ -132973,6 +133011,10 @@ function ChartReport()
132973
133011
  {
132974
133012
  if (IFrameSplitOperator.IsNumber(item.FormatType)) colItem.FormatType=item.FormatType;
132975
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
+ }
132976
133018
 
132977
133019
  return colItem;
132978
133020
  }
@@ -133125,6 +133167,12 @@ function ChartReport()
133125
133167
  { Type:REPORT_COLUMN_ID.RISING_SPEED_10M_ID, Title:"10分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
133126
133168
  { Type:REPORT_COLUMN_ID.RISING_SPEED_15M_ID, Title:"15分涨速%", TextAlign:"right", Width:null, MaxText:"-888.88" },
133127
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
+
133128
133176
  { Type:REPORT_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
133129
133177
  { Type:REPORT_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
133130
133178
  { Type:REPORT_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
@@ -133336,6 +133384,17 @@ function ChartReport()
133336
133384
  if (rowHeight>this.RowHeight) this.RowHeight=rowHeight;
133337
133385
  if (rowHeight>this.FixedRowHeight) this.FixedRowHeight=rowHeight;
133338
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
+ }
133339
133398
  else if (item.Type==REPORT_COLUMN_ID.SYMBOL_NAME_V2_ID) //单行显示
133340
133399
  {
133341
133400
  this.Canvas.font==this.NameSymbolFont.Name;
@@ -133453,7 +133512,7 @@ function ChartReport()
133453
133512
  //排序
133454
133513
  var bDrawSortBG=this.IsDrawSortBGIcon();
133455
133514
  if (this.SortInfo && this.SortInfo.Field==index && this.SortInfo.Sort>0) lastItem.Sort={ Type:this.SortInfo.Sort };
133456
- else if (column.Sort>0 && bDrawSortBG) lastItem.Sort={ Type:0 };
133515
+ else if (column.Sort>0 && bDrawSortBG && IFrameSplitOperator.IsNonEmptyArray(column.SortType) && column.SortType.length>=2) lastItem.Sort={ Type:0 };
133457
133516
 
133458
133517
  //图标
133459
133518
  if (column.Icon) lastItem.Icon=column.Icon;
@@ -133468,9 +133527,7 @@ function ChartReport()
133468
133527
 
133469
133528
  var pixelRatio=GetDevicePixelRatio();
133470
133529
  var cellWidth=drawInfo.Rect.Width;
133471
-
133472
- if (drawInfo.AryText.length>1)
133473
- var nnnn=10;
133530
+ var bDrawSortBG=this.IsDrawSortBGIcon();
133474
133531
 
133475
133532
  var y=drawInfo.YText;
133476
133533
  for(var i=0;i<drawInfo.AryText.length;++i)
@@ -133524,11 +133581,21 @@ function ChartReport()
133524
133581
 
133525
133582
  if (sortWidth>1) //排序
133526
133583
  {
133584
+ this.Canvas.font=this.SortFont;
133585
+ var xSort=x;
133586
+ if (this.SortConfig.Margin && IFrameSplitOperator.IsNumber(this.SortConfig.Margin.Left)) xSort+=this.SortConfig.Margin.Left;
133587
+ if (item.Sort.Type!=0 && bDrawSortBG) //背景
133588
+ {
133589
+ var sortText=this.SortConfig.Arrow[0];
133590
+ var sortColor=this.SortConfig.Color[0];
133591
+ this.Canvas.fillStyle=sortColor;
133592
+ this.Canvas.fillText(sortText,xSort,y-this.SortConfig.Margin.Bottom);
133593
+ }
133594
+
133527
133595
  var sortText=this.SortConfig.Arrow[item.Sort.Type];
133528
133596
  var sortColor=this.SortConfig.Color[item.Sort.Type];
133529
- this.Canvas.font=this.SortFont;
133530
133597
  this.Canvas.fillStyle=sortColor;
133531
- this.Canvas.fillText(sortText,x,y-this.SortConfig.Margin.Bottom);
133598
+ this.Canvas.fillText(sortText,xSort,y-this.SortConfig.Margin.Bottom);
133532
133599
  x+=sortWidth;
133533
133600
  }
133534
133601
 
@@ -133921,6 +133988,87 @@ function ChartReport()
133921
133988
  }
133922
133989
  }
133923
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
+
133924
134072
  this.DrawItem=function(index, data, column, left, top, rowType, columnIndex)
133925
134073
  {
133926
134074
  var itemWidth=column.Width;
@@ -134246,6 +134394,26 @@ function ChartReport()
134246
134394
  {
134247
134395
  this.FormatReserveButton(column, stock, drawInfo);
134248
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
+ }
134249
134417
 
134250
134418
 
134251
134419
  //拖拽行颜色
@@ -134275,6 +134443,10 @@ function ChartReport()
134275
134443
  else if (column.Type==REPORT_COLUMN_ID.CUSTOM_LINK_ID)
134276
134444
  {
134277
134445
  this.DrawLinkText(drawInfo, x, top, textWidth);
134446
+ }
134447
+ else if (column.Type==REPORT_COLUMN_ID.MULTI_LINE_CONTAINER)
134448
+ {
134449
+
134278
134450
  }
134279
134451
  else
134280
134452
  {
@@ -150196,7 +150368,7 @@ function HQChartScriptWorker()
150196
150368
 
150197
150369
 
150198
150370
 
150199
- var HQCHART_VERSION="1.1.14273";
150371
+ var HQCHART_VERSION="1.1.14279";
150200
150372
 
150201
150373
  function PrintHQChartVersion()
150202
150374
  {