hqchart 1.1.14508 → 1.1.14516

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.
@@ -2103,7 +2103,7 @@ HQData.APIIndex_DRAWBAND=function(data, callback)
2103
2103
  DrawType:"DRAWBAND",
2104
2104
  DrawData:[],
2105
2105
  Color:["rgb(220,20,60)","rgb(34,139,34)"]
2106
- }
2106
+ },
2107
2107
  };
2108
2108
 
2109
2109
  for(var i=0;i<kData.Data.length;++i)
@@ -2149,7 +2149,7 @@ HQData.APIIndex_MULTI_LINE=function(data, callback)
2149
2149
  }
2150
2150
  }, //绘制线段数组
2151
2151
 
2152
- IsShowTitle:false
2152
+ IsShowTitle:true,
2153
2153
  };
2154
2154
 
2155
2155
  var point3=
@@ -2238,7 +2238,9 @@ HQData.APIIndex_MULTI_SVGICON=function(data, callback)
2238
2238
  //{ Date:20190919, Value:15.3, Symbol:'\ue615', Color:'rgb(240,240,0)', Baseline:2 },
2239
2239
  //{ Date:20190909, Value:15.4, Symbol:'\ue615', Color:'rgb(240,100,30)'}
2240
2240
  ]
2241
- }
2241
+ },
2242
+
2243
+
2242
2244
  } //绘制图标数组
2243
2245
  };
2244
2246
 
@@ -2621,8 +2623,8 @@ HQData.APIIndex_MULTI_BAR=function(data, callback)
2621
2623
  {
2622
2624
  DrawType:'MULTI_BAR',
2623
2625
  DrawData:[]
2624
- }, //绘制柱子数组\
2625
- IsShowTitle:false,
2626
+ }, //绘制柱子数组
2627
+ IsShowTitle:true,
2626
2628
  };
2627
2629
 
2628
2630
  //第一组柱子
@@ -2914,7 +2916,9 @@ HQData.APIIndex_TITLE=function(data, callback)
2914
2916
  {
2915
2917
  code:0,
2916
2918
  stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
2917
- outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] }
2919
+ outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] },
2920
+
2921
+ //error: { message:"无权限查看指标“测试指标1”" }
2918
2922
  };
2919
2923
 
2920
2924
  console.log('[HQData.APIIndex_TITLE] apiData ', apiData);
@@ -7073,9 +7073,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7073
7073
  this.DialogModifyIndexParam; //指标参数修改
7074
7074
 
7075
7075
 
7076
- this.RestoreFocusTimer=null; //恢复焦点定时器
7077
- this.DocContextMenuTimer=null; //清空整体的框架
7078
-
7076
+ this.RestoreFocusTimer=null; //恢复焦点定时器
7077
+ this.PreventRightMenu={ Timer:null, Enable:false, Delay:2000 }; //阻止右键菜单
7078
+
7079
7079
  this.RestoreFocus=function(delay)
7080
7080
  {
7081
7081
  var value=1000;
@@ -7517,17 +7517,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7517
7517
 
7518
7518
  this.UIOnContextMenu=function(e)
7519
7519
  {
7520
+ if (e)
7521
+ {
7522
+ if (e.preventDefault) e.preventDefault();
7523
+ if (e.stopPropagation) e.stopPropagation();
7524
+ e.returnValue=false;
7525
+ }
7526
+
7520
7527
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
7521
7528
  if (!this.IsShowRightMenu) return;
7529
+ if (this.PreventRightMenu.Enable) return;
7522
7530
 
7523
7531
  var x = e.clientX-this.UIElement.getBoundingClientRect().left;
7524
7532
  var y = e.clientY-this.UIElement.getBoundingClientRect().top;
7525
7533
 
7526
7534
  if(typeof(this.OnRightMenu)=='function') this.OnRightMenu(x,y,e); //右键菜单事件
7527
-
7528
- if (e && e.preventDefault) e.preventDefault();
7529
- if (e && e.stopPropagation) e.stopPropagation();
7530
- e.returnValue=false;
7531
7535
  }
7532
7536
 
7533
7537
  this.UIOnDblClick=function(e)
@@ -8353,20 +8357,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8353
8357
  return true;
8354
8358
  }
8355
8359
 
8356
- this.ClearDocContextMenuTimer=function(delay)
8360
+ this.ClearPreventRightMenu=function(delay)
8357
8361
  {
8358
- var value=5000;
8362
+ var value=3000;
8359
8363
  if (IFrameSplitOperator.IsNumber(delay)) value=delay;
8360
8364
 
8361
- if (this.DocContextMenuTimer)
8365
+ if (this.PreventRightMenu.Timer)
8362
8366
  {
8363
- clearTimeout(this.DocContextMenuTimer);
8364
- this.DocContextMenuTimer = null;
8367
+ clearTimeout(this.PreventRightMenu.Timer);
8368
+ this.PreventRightMenu.Timer = null;
8365
8369
  }
8366
-
8367
- this.DocContextMenuTimer=setTimeout(()=>
8370
+
8371
+ this.PreventRightMenu.Timer=setTimeout(()=>
8368
8372
  {
8369
- document.oncontextmenu=null;
8373
+ this.PreventRightMenu.Enable=false;
8374
+ this.PreventRightMenu.Timer=null;
8370
8375
  }, value);
8371
8376
  }
8372
8377
 
@@ -8375,7 +8380,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8375
8380
  //清空事件
8376
8381
  document.onmousemove=null;
8377
8382
  document.onmouseup=null;
8378
-
8383
+
8379
8384
  var bRButtonSelectRect=this.IsEnableRSelectRect(e, "DocOnMouseUp"); //右键区间选择
8380
8385
  var bLButtonSelectRect=this.IsEnableLSelectRect(e, "DocOnMouseUp"); //左键区间选择
8381
8386
 
@@ -8482,7 +8487,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8482
8487
  this.CustomChartDrag=null;
8483
8488
  if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
8484
8489
 
8485
- this.ClearDocContextMenuTimer(5000);
8490
+ this.ClearPreventRightMenu(this.PreventRightMenu.Delay);
8486
8491
  }
8487
8492
 
8488
8493
  //区间选择完成
@@ -8495,6 +8500,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8495
8500
 
8496
8501
  var x=drag.LastMove.X-uielement.getBoundingClientRect().left;
8497
8502
  var y=drag.LastMove.Y-uielement.getBoundingClientRect().top;
8503
+ if (e && e.button==2) this.PreventRightMenu.Enable=true; //右键拖动 需要阻止菜单
8498
8504
 
8499
8505
  if (e) //往事件里面 写如我们的数据
8500
8506
  {
@@ -8524,7 +8530,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8524
8530
  }
8525
8531
 
8526
8532
  if (event && event.Callback)
8527
-
8533
+ {
8528
8534
  var sendData=
8529
8535
  {
8530
8536
  X:x, Y:y, e:e,
@@ -8543,7 +8549,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8543
8549
 
8544
8550
  aryMenu=sendData.AryMenu;
8545
8551
  command=sendData.Command;
8546
-
8552
+ }
8547
8553
 
8548
8554
  if (aryMenu) //弹菜单
8549
8555
  {
@@ -8573,7 +8579,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8573
8579
 
8574
8580
  this.DocContextMenu=function(e)
8575
8581
  {
8576
- e.preventDefault();
8582
+ if (this.PreventRightMenu.Enable) e.preventDefault();
8577
8583
  }
8578
8584
 
8579
8585
  this.UIOnMounseOut=function(e)
@@ -14779,6 +14785,116 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14779
14785
 
14780
14786
  return true;
14781
14787
  }
14788
+
14789
+ this.OnMarkRectSelect=function(e)
14790
+ {
14791
+ var corssCursor=this.ChartCorssCursor; //十字光标
14792
+ if (!corssCursor || corssCursor.Status==0) return;
14793
+ if (!IFrameSplitOperator.IsNumber(corssCursor.CursorIndex)) return;
14794
+ if (!this.ChartPaint[0] || !this.ChartPaint[0].Data) return;
14795
+ var paint=this.GetRectSelectPaint();
14796
+ if (!paint) return;
14797
+
14798
+ var kData=this.GetKData();
14799
+ if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return;
14800
+
14801
+ var cursorIndex=corssCursor.CursorIndex;
14802
+ JSConsole.Chart.Log("[JSChartContainer::OnMarkRectSelect] dataIndex", cursorIndex);
14803
+ cursorIndex=parseInt(cursorIndex.toFixed(0));
14804
+ var index=cursorIndex+kData.DataOffset;
14805
+ if (index>=kData.Data.length) index=kData.Data.length-1;
14806
+ var item = kData.Data[index];
14807
+ JSConsole.Chart.Log("[KLineChartContainer::OnMarkRectSelect] item", item);
14808
+
14809
+ if (!this.SetRectSelectData(item, index)) return;
14810
+
14811
+ var pointCount=paint.GetPointCount();
14812
+ var pixelTatio = GetDevicePixelRatio();
14813
+ var x=corssCursor.LastPoint.X/pixelTatio;
14814
+ var y=corssCursor.LastPoint.Y/pixelTatio;
14815
+
14816
+ if (pointCount==1) //第1个位置
14817
+ {
14818
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT_FIRST);
14819
+ if (event && event.Callback)
14820
+ {
14821
+ var data=
14822
+ {
14823
+ X:x, Y:y, Item:item, Index:index,
14824
+ RectSelectPaint:paint, //区间选择背景
14825
+ e:e,
14826
+ };
14827
+ event.Callback(event,data,this);
14828
+ }
14829
+
14830
+ this.Draw();
14831
+ }
14832
+ else if (pointCount==2)
14833
+ {
14834
+ var selectData=paint.GetSelectRectData();
14835
+
14836
+ if (e)
14837
+ {
14838
+ var data=
14839
+ {
14840
+ Chart:this, X:x, Y:y,
14841
+ SelectData:selectData, //区间选择的数据
14842
+ RectSelectPaint:paint //区间选择背景
14843
+ };
14844
+ e.data=data
14845
+ }
14846
+
14847
+ var aryMenu=null,command=null;
14848
+ var bMinuteChart=this.IsMinuteContainer();
14849
+ if (bMinuteChart)
14850
+ {
14851
+ command={ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] };
14852
+ }
14853
+ else //K线默认
14854
+ {
14855
+ aryMenu=
14856
+ [
14857
+ { Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
14858
+ { Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
14859
+ ];
14860
+ }
14861
+
14862
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT);
14863
+ if (event && event.Callback)
14864
+ {
14865
+ var sendData=
14866
+ {
14867
+ X:x, Y:y,
14868
+ SelectData:selectData, //区间选择的数据
14869
+ RectSelectPaint:paint, //区间选择背景
14870
+ AryMenu:aryMenu,Command:command,
14871
+ e:e,
14872
+ PreventDefault:false,
14873
+ };
14874
+ if (bMinuteChart) sendData.Command=null; //分时图 调用事件 不做任何事
14875
+
14876
+ event.Callback(event,sendData,this);
14877
+ aryMenu=sendData.AryMenu;
14878
+ command=sendData.Command;
14879
+ if (sendData.PreventDefault)
14880
+ {
14881
+ this.Draw();
14882
+ return;
14883
+ }
14884
+ }
14885
+
14886
+ if (command)
14887
+ {
14888
+ this.ExecuteMenuCommand(command.ID, command.Args);
14889
+ }
14890
+ else if (aryMenu)
14891
+ {
14892
+ this.PopupSelectRectMenuV3(aryMenu, data, e);
14893
+ }
14894
+
14895
+ this.Draw();
14896
+ }
14897
+ }
14782
14898
  }
14783
14899
 
14784
14900
  function GetDevicePixelRatio()
@@ -62076,8 +62192,10 @@ function DynamicChartTitlePainting()
62076
62192
 
62077
62193
  this.FormatMultiReport=function(data,format)
62078
62194
  {
62195
+ if (!IFrameSplitOperator.IsNonEmptyArray(data)) return null;
62196
+
62079
62197
  var text="";
62080
- for(var i in data)
62198
+ for(var i=0; i<data.length; ++i)
62081
62199
  {
62082
62200
  var item = data[i];
62083
62201
  let quarter=item.Quarter;
@@ -62109,8 +62227,10 @@ function DynamicChartTitlePainting()
62109
62227
  return text;
62110
62228
  }
62111
62229
 
62112
- this.FromatMultiDataLine=function(value, dataInfo)
62230
+ this.FormatMultiDataLine=function(value, dataInfo)
62113
62231
  {
62232
+ if (!value) return null;
62233
+
62114
62234
  var text="";
62115
62235
  if (Array.isArray(value))
62116
62236
  {
@@ -62138,7 +62258,7 @@ function DynamicChartTitlePainting()
62138
62258
  }
62139
62259
 
62140
62260
  //多变量输出
62141
- this.FromatStackedBarTitle=function(aryBar, dataInfo)
62261
+ this.FormatStackedBarTitle=function(aryBar, dataInfo)
62142
62262
  {
62143
62263
  if (!IFrameSplitOperator.IsNonEmptyArray(aryBar)) return null;
62144
62264
  if (!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Color)) return null;
@@ -62163,6 +62283,8 @@ function DynamicChartTitlePainting()
62163
62283
 
62164
62284
  this.FormatKLineTitle=function(item, dataInfo)
62165
62285
  {
62286
+ if (!item) return null;
62287
+
62166
62288
  var defaultfloatPrecision=GetfloatPrecision(dataInfo.Symbol);//价格小数位数
62167
62289
  var upperSymbol="";
62168
62290
  if (dataInfo.Symbol) upperSymbol=dataInfo.Symbol.toUpperCase();
@@ -62171,7 +62293,6 @@ function DynamicChartTitlePainting()
62171
62293
 
62172
62294
  var aryText=[];
62173
62295
 
62174
-
62175
62296
  if (IFrameSplitOperator.IsNumber(item.Date))
62176
62297
  {
62177
62298
  var text=IFrameSplitOperator.FormatDateString(item.Date);
@@ -62702,6 +62823,25 @@ function DynamicChartTitlePainting()
62702
62823
  if (dataIndex<0) return null;
62703
62824
  }
62704
62825
 
62826
+ var value=null;
62827
+ if (dataIndex>=0 && item.Data && IFrameSplitOperator.IsNonEmptyArray(item.Data.Data)) value=item.Data.Data[dataIndex];
62828
+
62829
+ if (this.GetEventCallback) //外部处理
62830
+ {
62831
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_OUT_TEXT);
62832
+ if (event)
62833
+ {
62834
+ var sendData=
62835
+ {
62836
+ Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
62837
+ DataIndex:dataIndex, Value:value, PreventDefault:false, Out:null
62838
+ };
62839
+ event.Callback(event,sendData,this);
62840
+ if (sendData.Out) return sendData.Out;
62841
+ if (sendData.PreventDefault) return sendData.Out;
62842
+ }
62843
+ }
62844
+
62705
62845
  if (item.DataType=="ChartMultiLine") //多线段数据
62706
62846
  {
62707
62847
  aryText=this.ForamtMultiLineTitle(dataIndex, item);
@@ -62720,46 +62860,19 @@ function DynamicChartTitlePainting()
62720
62860
  if (!aryText) return null;
62721
62861
  return { Text:null, ArrayText:aryText };
62722
62862
  }
62723
-
62724
-
62725
- value=item.Data.Data[dataIndex];
62726
-
62727
- if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
62728
- {
62729
- preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
62730
- if (!preVaildItem) return null;
62731
-
62732
- preText=this.FormatValue(preVaildItem.Item,item);
62733
- if (item.Name)
62734
- {
62735
- var dyValue=this.GetDynamicOutValue(item.Name, preText);
62736
- if (dyValue) preText=dyValue;
62737
- }
62738
-
62739
- valueText=`--(${preText})`;
62740
-
62741
- return { Text:valueText, ArrayText:aryText };
62742
- }
62743
-
62744
- if (value==null) return null;
62745
-
62746
- if (item.DataType=="HistoryData-Vol")
62747
- {
62748
- value=value.Vol;
62749
- valueText=this.FormatValue(value,item);
62750
- }
62751
62863
  else if (item.DataType=="MultiReport")
62752
62864
  {
62753
62865
  valueText=this.FormatMultiReport(value,item);
62866
+ if (!valueText) return null;
62754
62867
  }
62755
62868
  else if (item.DataType=="MULTI_POINT_LINE")
62756
62869
  {
62757
- valueText=this.FromatMultiDataLine(value, item);
62870
+ valueText=this.FormatMultiDataLine(value, item);
62758
62871
  if (!valueText) return null;
62759
62872
  }
62760
62873
  else if (item.DataType=="ChartStackedBar")
62761
62874
  {
62762
- aryText=this.FromatStackedBarTitle(value, item);
62875
+ aryText=this.FormatStackedBarTitle(value, item);
62763
62876
  if (!aryText) return null;
62764
62877
  return { Text:null, ArrayText:aryText };
62765
62878
  }
@@ -62774,36 +62887,37 @@ function DynamicChartTitlePainting()
62774
62887
  var outTitle=this.FormatIndexTitle(value, item);
62775
62888
  return outTitle;
62776
62889
  }
62890
+ else if (item.DataType=="ChartBand")
62891
+ {
62892
+ return null;
62893
+ }
62777
62894
  else if (g_ScriptIndexChartFactory.Has(item.DataType)) //外部挂接
62778
62895
  {
62779
62896
  var find=g_ScriptIndexChartFactory.Get(item.DataType);
62780
62897
  if (find && find.FormatTitleCallback)
62781
62898
  return find.FormatTitleCallback(value, item, dataIndex);
62782
62899
  }
62783
- else
62900
+ else if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
62784
62901
  {
62785
- if (this.GetEventCallback)
62902
+ preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
62903
+ if (!preVaildItem) return null;
62904
+
62905
+ preText=this.FormatValue(preVaildItem.Item,item);
62906
+ if (item.Name)
62786
62907
  {
62787
- var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_OUT_TEXT);
62788
- if (event)
62789
- {
62790
- var data=
62791
- {
62792
- Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
62793
- DataIndex:dataIndex, Value:value,
62794
- Out:null
62795
- };
62796
- event.Callback(event,data,this);
62797
- if (data.Out) return data.Out;
62798
- }
62908
+ var dyValue=this.GetDynamicOutValue(item.Name, preText);
62909
+ if (dyValue) preText=dyValue;
62799
62910
  }
62800
-
62801
- if (item.DataType=="ChartBand") //默认不输出
62802
- return null;
62803
-
62911
+
62912
+ valueText=`--(${preText})`;
62913
+
62914
+ return { Text:valueText, ArrayText:aryText };
62915
+ }
62916
+ else
62917
+ {
62918
+ if (value==null) return null;
62804
62919
 
62805
62920
  var arrowSuper=null; //独立颜色
62806
-
62807
62921
  if (this.IsShowUpDownArrow)
62808
62922
  {
62809
62923
  var preValue=null;
@@ -63140,18 +63254,14 @@ function DynamicChartTitlePainting()
63140
63254
  value=item.Data.Data[dataIndex];
63141
63255
  if (value==null) continue;
63142
63256
 
63143
- if (item.DataType=="HistoryData-Vol")
63144
- {
63145
- value=value.Vol;
63146
- valueText=this.FormatValue(value,item);
63147
- }
63148
- else if (item.DataType=="MultiReport")
63257
+ if (item.DataType=="MultiReport")
63149
63258
  {
63150
63259
  valueText=this.FormatMultiReport(value,item);
63260
+ if (!valueText) continue;
63151
63261
  }
63152
63262
  else if (item.DataType=="ChartStackedBar")
63153
63263
  {
63154
- aryText=this.FromatStackedBarTitle(value, item);
63264
+ aryText=this.FormatStackedBarTitle(value, item);
63155
63265
  if (!aryText) continue;
63156
63266
  }
63157
63267
  else if (item.DataType=="ChartMultiPoint")
@@ -81144,48 +81254,50 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
81144
81254
  var corssCursor=this.ChartCorssCursor; //十字光标
81145
81255
  var x=corssCursor.LastPoint.X/pixelTatio;
81146
81256
  var y=corssCursor.LastPoint.Y/pixelTatio;
81147
- var isShowMenu=true;
81257
+
81258
+ if (e)
81259
+ {
81260
+ var data=
81261
+ {
81262
+ Chart:this,X:x,Y:y,
81263
+ SelectData:selectData, //区间选择的数据
81264
+ RectSelectPaint:paint //区间选择背景
81265
+ };
81266
+ e.data=data;
81267
+ }
81268
+
81269
+ var aryMenu=
81270
+ [
81271
+ { Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
81272
+ { Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
81273
+ ];
81148
81274
 
81149
81275
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT_MOUSEUP);
81150
81276
  if (event)
81151
81277
  {
81152
- var data=
81278
+ var sendData=
81153
81279
  {
81154
81280
  X:x,
81155
81281
  Y:y,
81156
81282
  SelectData:selectData, //区间选择的数据
81157
81283
  RectSelectPaint:paint, //区间选择背景
81158
- IsShowMenu:false,
81284
+ AryMenu:null,
81285
+ PreventDefault:false,
81159
81286
  };
81160
- event.Callback(event,data,this);
81161
- isShowMenu=data.IsShowMenu;
81287
+ event.Callback(event,sendData,this);
81288
+
81289
+ if (sendData.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
81290
+
81291
+ aryMenu=sendData.AryMenu;
81162
81292
  }
81163
81293
 
81164
81294
  if (this.IsShowSelectRectDialog()) //区间统计
81165
81295
  {
81166
- var data=
81167
- {
81168
- Chart:this,X:x,Y:y,
81169
- SelectData:selectData, //区间选择的数据
81170
- RectSelectPaint:paint //区间选择背景
81171
- };
81172
- e.data=data;
81173
-
81174
81296
  this.DrawSelectRectDialog(e);
81175
81297
  }
81176
- else if (isShowMenu)
81298
+ else if (aryMenu)
81177
81299
  {
81178
- var data=
81179
- {
81180
- Chart:this,
81181
- X:x,
81182
- Y:y,
81183
- SelectData:selectData, //区间选择的数据
81184
- RectSelectPaint:paint //区间选择背景
81185
- };
81186
- e.data=data;
81187
-
81188
- this.PopupSelectRectMenuV2(data, e);
81300
+ this.PopupSelectRectMenuV3(aryMenu, data, e);
81189
81301
  }
81190
81302
  }
81191
81303
 
@@ -81242,6 +81354,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
81242
81354
  this.UpdatePointByCursorIndex(); //更新十字光标位子
81243
81355
  }
81244
81356
 
81357
+ /*
81245
81358
  this.OnMarkRectSelect=function(e)
81246
81359
  {
81247
81360
  var corssCursor=this.ChartCorssCursor; //十字光标
@@ -81323,6 +81436,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
81323
81436
 
81324
81437
  this.Draw();
81325
81438
  }
81439
+ */
81326
81440
 
81327
81441
  //创建指定窗口指标
81328
81442
  this.CreateWindowIndex=function(windowIndex)
@@ -89469,6 +89583,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89469
89583
  else e.returnValue = false;
89470
89584
  }
89471
89585
 
89586
+ /*
89472
89587
  this.OnMarkRectSelect=function(e)
89473
89588
  {
89474
89589
  var corssCursor=this.ChartCorssCursor; //十字光标
@@ -89544,6 +89659,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89544
89659
 
89545
89660
  this.Draw();
89546
89661
  }
89662
+ */
89547
89663
 
89548
89664
  //注册鼠标右键事件
89549
89665
  this.OnRightMenu=function(x,y,e)
@@ -136643,6 +136759,10 @@ function ChartReport()
136643
136759
  if (item.Button) colItem.Button=CloneData(item.Button);
136644
136760
  else colItem.Button=this.ButtonConfig;
136645
136761
  }
136762
+ else if (this.IsReserveNumber(item.Type))
136763
+ {
136764
+ if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
136765
+ }
136646
136766
  else if (item.Type==REPORT_COLUMN_ID.CUSTOM_PROGRESS_ID)
136647
136767
  {
136648
136768
  if (!IFrameSplitOperator.IsNumber(item.DataIndex) && !IFrameSplitOperator.IsNumber(item.BlockIndex)) return null;
@@ -138045,9 +138165,7 @@ function ChartReport()
138045
138165
  {
138046
138166
  this.GetCustomLinkDrawInfo(data, column, drawInfo);
138047
138167
  }
138048
- else if ([REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,
138049
- REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
138050
- REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type))
138168
+ else if (this.IsReserveNumber(column.Type))
138051
138169
  {
138052
138170
  this.FormatReserveNumber(column, stock, drawInfo);
138053
138171
  }
@@ -138186,6 +138304,18 @@ function ChartReport()
138186
138304
  return ARARY_TYPE.includes(value);
138187
138305
  }
138188
138306
 
138307
+ this.IsReserveNumber=function(value)
138308
+ {
138309
+ var ARARY_TYPE=
138310
+ [
138311
+ REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,
138312
+ REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
138313
+ REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID
138314
+ ];
138315
+
138316
+ return ARARY_TYPE.includes(value);
138317
+ }
138318
+
138189
138319
  this.IsReserveString=function(value)
138190
138320
  {
138191
138321
  var ARARY_TYPE=
@@ -138596,8 +138726,27 @@ function ChartReport()
138596
138726
  }
138597
138727
  }
138598
138728
 
138599
- //TODO: 不同类型的 格式化输出
138600
- drawInfo.Text=value.toFixed(column.FloatPrecision);
138729
+ var text=value.toFixed(column.FloatPrecision);
138730
+ if (column.Format && IFrameSplitOperator.IsNumber(column.Format.Type))
138731
+ {
138732
+ var format=column.Format;
138733
+ switch(format.Type)
138734
+ {
138735
+ case 1: //原始数据
138736
+ text=value.toFixed(column.FloatPrecision);
138737
+ break;
138738
+ case 2: //千分位分割
138739
+ text=IFrameSplitOperator.FormatValueThousandsString(value, column.FloatPrecision);
138740
+ break;
138741
+ case 3:
138742
+ var exfloatPrecision=1;
138743
+ if (IFrameSplitOperator.IsNumber(format.ExFloatPrecision)) exfloatPrecision=format.ExFloatPrecision;
138744
+ text=IFrameSplitOperator.FormatValueStringV2(value, column.FloatPrecision,exfloatPrecision);
138745
+ break;
138746
+ }
138747
+ }
138748
+
138749
+ drawInfo.Text=text;
138601
138750
  }
138602
138751
 
138603
138752
  this.FormatReserveString=function(column, data, drawInfo)
@@ -144433,7 +144582,7 @@ function ScrollBarBGChart()
144433
144582
 
144434
144583
 
144435
144584
 
144436
- var HQCHART_VERSION="1.1.14507";
144585
+ var HQCHART_VERSION="1.1.14515";
144437
144586
 
144438
144587
  function PrintHQChartVersion()
144439
144588
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14507";
8
+ var HQCHART_VERSION="1.1.14515";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {