hqchart 1.1.12418 → 1.1.12425

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hqchart",
3
3
  "description": "stock chart",
4
4
  "author": "jones2000",
5
- "version": "1.1.12418",
5
+ "version": "1.1.12425",
6
6
  "main": "lib/main.js",
7
7
  "private": false,
8
8
  "license": "Apache License 2.0",
@@ -36,7 +36,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
36
36
  if (this.CanvasElement.style)
37
37
  {
38
38
  this.CanvasElement.style.outline='none';
39
- this.CanvasElement.style.position="absolute";
39
+ //this.CanvasElement.style.position="absolute"; //外部自己设置
40
40
  }
41
41
  if(divElement.hasChildNodes())
42
42
  {
@@ -253,6 +253,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
253
253
  if (option.Type==="历史K线图横屏") chart=new KLineChartHScreenContainer(this.CanvasElement);
254
254
  else chart=new KLineChartContainer(this.CanvasElement,this.OffscreenCanvasElement,this.CacheCanvasElement);
255
255
 
256
+ chart.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); }
257
+
256
258
  var extraElement=this.GetExtraCanvas(JSChart.CorssCursorCanvasKey);
257
259
  if (extraElement) chart.SetCorssCursorElement(extraElement);
258
260
 
@@ -755,6 +757,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
755
757
  if (option.Type==="分钟走势图横屏") chart=new MinuteChartHScreenContainer(this.CanvasElement);
756
758
  else chart=new MinuteChartContainer(this.CanvasElement, this.OffscreenCanvasElement, this.CacheCanvasElement);
757
759
 
760
+ chart.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); }
761
+
758
762
  if (option.EventCallback) this.SetEventCallback(chart, option.EventCallback);
759
763
  if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
760
764
 
@@ -2484,6 +2488,12 @@ var JSCHART_EVENT_ID=
2484
2488
  //绘图之前的事件
2485
2489
  ON_BEFORE_DRAW:111,
2486
2490
  ON_BEFORE_DRAW_DYNAMIC_INFO:112,
2491
+
2492
+ //自定义图形拖拽
2493
+ ON_CUSTOM_DRAG_MOUSE_DOWN:113,
2494
+ ON_CUSTOM_DRAG_DOC_MOUSE_MOVE:114,
2495
+ ON_CUSTOM_DRAG_DOC_MOUSE_UP:115,
2496
+ ON_CUSTOM_DRAG_MOUSE_MOVE:116,
2487
2497
  }
2488
2498
 
2489
2499
  var JSCHART_OPERATOR_ID=
@@ -2802,6 +2812,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
2802
2812
  this.DisplayLatestOption={ Timer:null, Enable: false, DelayTime:60*1000*3, LastPoint:null };
2803
2813
  this.DrawDynamicInfoOption={ Timer:null, Enable:false , DelayTime:10 };
2804
2814
 
2815
+ this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
2805
2816
 
2806
2817
  //obj={ Element:, Canvas: }
2807
2818
  this.SetCorssCursorElement=function(obj)
@@ -2972,6 +2983,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
2972
2983
  if (this.BorderDrag) return;
2973
2984
  if (this.YDrag) return;
2974
2985
  if (this.IndexChartDrag) return;
2986
+ if (this.CustomChartDrag) return;
2975
2987
  //if (this.RectSelectDrag) return;
2976
2988
 
2977
2989
  /*
@@ -3137,6 +3149,52 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3137
3149
  return false;
3138
3150
  }
3139
3151
 
3152
+ this.TryMouseMove_CustomChartDrag=function(sendData)
3153
+ {
3154
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_MOVE);
3155
+ if (!event || !event.Callback) return false;
3156
+
3157
+ return event.Callback(event, sendData, this);
3158
+ }
3159
+
3160
+ this.TryClick_CustomChartDrag=function(sendData)
3161
+ {
3162
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_DOWN);
3163
+ if (!event || !event.Callback) return false;
3164
+
3165
+ sendData.ChartDrag=null;
3166
+ sendData.Cusrsor=null;
3167
+
3168
+ event.Callback(event, sendData, this);
3169
+ this.CustomChartDrag=sendData.ChartDrag;
3170
+
3171
+ if (sendData.Cusrsor) this.UIElement.style.cursor=sendData.Cusrsor;
3172
+ }
3173
+
3174
+ this.TryDragMove_CustomChartDrag=function(sendData)
3175
+ {
3176
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_MOVE);
3177
+ if (!event || !event.Callback) return;
3178
+
3179
+ var e=sendData.e;
3180
+ var drag=sendData.Drag;
3181
+ if(Math.abs(drag.LastMove.Y-e.clientY)<2 && Math.abs(drag.LastMove.X-e.clientX)<2) return;
3182
+
3183
+ if (event.Callback(event, sendData, this))
3184
+ {
3185
+ drag.LastMove.X=e.clientX;
3186
+ drag.LastMove.Y=e.clientY;
3187
+ }
3188
+ }
3189
+
3190
+ this.TryMouseUp_CustomChartDrag=function(sendData)
3191
+ {
3192
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_UP);
3193
+ if (!event || !event.Callback) return;
3194
+
3195
+ event.Callback(event, sendData, this);
3196
+ }
3197
+
3140
3198
  this.UIOnMouseDown=function(e)
3141
3199
  {
3142
3200
  this.MoveOnChartDrawPicture=null;
@@ -3150,6 +3208,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3150
3208
  this.UpDownDrag=null;
3151
3209
  this.RectSelectDrag=null;
3152
3210
  this.IndexChartDrag=null;
3211
+ this.CustomChartDrag=null;
3153
3212
 
3154
3213
  var pixelTatio = GetDevicePixelRatio();
3155
3214
  var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
@@ -3240,6 +3299,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3240
3299
  }
3241
3300
  }
3242
3301
 
3302
+ var sendData={ X:x, Y:y, e:e };
3303
+ if (this.TryClick_CustomChartDrag(sendData))
3304
+ {
3305
+
3306
+ }
3307
+
3243
3308
  if(this.DragMode==0) return;
3244
3309
 
3245
3310
  var drag=
@@ -3264,7 +3329,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3264
3329
  {
3265
3330
 
3266
3331
  }
3267
- else if (this.YDrag || this.RectSelectDrag)
3332
+ else if (this.YDrag || this.RectSelectDrag || this.CustomChartDrag)
3268
3333
  {
3269
3334
 
3270
3335
  }
@@ -3490,6 +3555,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3490
3555
  drag.LastMove.X=e.clientX;
3491
3556
  drag.LastMove.Y=e.clientY;
3492
3557
  }
3558
+ else if (this.CustomChartDrag)
3559
+ {
3560
+ var pixelTatio = GetDevicePixelRatio();
3561
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
3562
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
3563
+ var sendData={X:x, Y:y, e:e, ChartDrag:this.CustomChartDrag, Drag:drag };
3564
+ this.TryDragMove_CustomChartDrag(sendData);
3565
+ }
3493
3566
  else if (this.CurrentChartDrawPicture)
3494
3567
  {
3495
3568
  var drawPicture=this.CurrentChartDrawPicture;
@@ -3719,6 +3792,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3719
3792
  if (!this.OnDragChart(this.IndexChartDrag)) this.DrawDynamicInfo();
3720
3793
  this.UIElement.style.cursor="default";
3721
3794
  }
3795
+ else if (this.CustomChartDrag)
3796
+ {
3797
+ var sendData={ e:e, ChartDrag:this.CustomChartDrag, Drag:this.MouseDrag };
3798
+ this.TryMouseUp_CustomChartDrag(sendData);
3799
+ }
3722
3800
  else if (isDragSelectRect) //区间选择拖动范围
3723
3801
  {
3724
3802
  if (this.OnDragSelectRectMouseUp) this.OnDragSelectRectMouseUp(e);
@@ -3811,6 +3889,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3811
3889
  this.UpDownDrag=null;
3812
3890
  this.RectSelectDrag=null;
3813
3891
  this.IndexChartDrag=null;
3892
+ this.CustomChartDrag=null;
3814
3893
  if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
3815
3894
  }
3816
3895
 
@@ -5707,6 +5786,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
5707
5786
  JSConsole.Chart.Log("[JSChartContainer::OnMouseMove] drag rect select ",item);
5708
5787
  }
5709
5788
  }
5789
+
5790
+
5791
+ var sendData={ MouseStatus:null, X:x, Y:y, FrameID:frameID, e:e };
5792
+ if (this.TryMouseMove_CustomChartDrag(sendData))
5793
+ {
5794
+ if (sendData.MouseStatus) mouseStatus=sendData.MouseStatus;
5795
+ }
5710
5796
 
5711
5797
  var bDrawPicture=false; //是否正在画图
5712
5798
  if (this.CurrentChartDrawPicture)
@@ -4116,7 +4116,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4116
4116
  if (this.CanvasElement.style)
4117
4117
  {
4118
4118
  this.CanvasElement.style.outline='none';
4119
- this.CanvasElement.style.position="absolute";
4119
+ //this.CanvasElement.style.position="absolute"; //外部自己设置
4120
4120
  }
4121
4121
  if(divElement.hasChildNodes())
4122
4122
  {
@@ -4333,6 +4333,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4333
4333
  if (option.Type==="历史K线图横屏") chart=new KLineChartHScreenContainer(this.CanvasElement);
4334
4334
  else chart=new KLineChartContainer(this.CanvasElement,this.OffscreenCanvasElement,this.CacheCanvasElement);
4335
4335
 
4336
+ chart.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); }
4337
+
4336
4338
  var extraElement=this.GetExtraCanvas(JSChart.CorssCursorCanvasKey);
4337
4339
  if (extraElement) chart.SetCorssCursorElement(extraElement);
4338
4340
 
@@ -4835,6 +4837,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4835
4837
  if (option.Type==="分钟走势图横屏") chart=new MinuteChartHScreenContainer(this.CanvasElement);
4836
4838
  else chart=new MinuteChartContainer(this.CanvasElement, this.OffscreenCanvasElement, this.CacheCanvasElement);
4837
4839
 
4840
+ chart.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); }
4841
+
4838
4842
  if (option.EventCallback) this.SetEventCallback(chart, option.EventCallback);
4839
4843
  if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
4840
4844
 
@@ -6564,6 +6568,12 @@ var JSCHART_EVENT_ID=
6564
6568
  //绘图之前的事件
6565
6569
  ON_BEFORE_DRAW:111,
6566
6570
  ON_BEFORE_DRAW_DYNAMIC_INFO:112,
6571
+
6572
+ //自定义图形拖拽
6573
+ ON_CUSTOM_DRAG_MOUSE_DOWN:113,
6574
+ ON_CUSTOM_DRAG_DOC_MOUSE_MOVE:114,
6575
+ ON_CUSTOM_DRAG_DOC_MOUSE_UP:115,
6576
+ ON_CUSTOM_DRAG_MOUSE_MOVE:116,
6567
6577
  }
6568
6578
 
6569
6579
  var JSCHART_OPERATOR_ID=
@@ -6882,6 +6892,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6882
6892
  this.DisplayLatestOption={ Timer:null, Enable: false, DelayTime:60*1000*3, LastPoint:null };
6883
6893
  this.DrawDynamicInfoOption={ Timer:null, Enable:false , DelayTime:10 };
6884
6894
 
6895
+ this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
6885
6896
 
6886
6897
  //obj={ Element:, Canvas: }
6887
6898
  this.SetCorssCursorElement=function(obj)
@@ -7052,6 +7063,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7052
7063
  if (this.BorderDrag) return;
7053
7064
  if (this.YDrag) return;
7054
7065
  if (this.IndexChartDrag) return;
7066
+ if (this.CustomChartDrag) return;
7055
7067
  //if (this.RectSelectDrag) return;
7056
7068
 
7057
7069
  /*
@@ -7217,6 +7229,52 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7217
7229
  return false;
7218
7230
  }
7219
7231
 
7232
+ this.TryMouseMove_CustomChartDrag=function(sendData)
7233
+ {
7234
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_MOVE);
7235
+ if (!event || !event.Callback) return false;
7236
+
7237
+ return event.Callback(event, sendData, this);
7238
+ }
7239
+
7240
+ this.TryClick_CustomChartDrag=function(sendData)
7241
+ {
7242
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_DOWN);
7243
+ if (!event || !event.Callback) return false;
7244
+
7245
+ sendData.ChartDrag=null;
7246
+ sendData.Cusrsor=null;
7247
+
7248
+ event.Callback(event, sendData, this);
7249
+ this.CustomChartDrag=sendData.ChartDrag;
7250
+
7251
+ if (sendData.Cusrsor) this.UIElement.style.cursor=sendData.Cusrsor;
7252
+ }
7253
+
7254
+ this.TryDragMove_CustomChartDrag=function(sendData)
7255
+ {
7256
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_MOVE);
7257
+ if (!event || !event.Callback) return;
7258
+
7259
+ var e=sendData.e;
7260
+ var drag=sendData.Drag;
7261
+ if(Math.abs(drag.LastMove.Y-e.clientY)<2 && Math.abs(drag.LastMove.X-e.clientX)<2) return;
7262
+
7263
+ if (event.Callback(event, sendData, this))
7264
+ {
7265
+ drag.LastMove.X=e.clientX;
7266
+ drag.LastMove.Y=e.clientY;
7267
+ }
7268
+ }
7269
+
7270
+ this.TryMouseUp_CustomChartDrag=function(sendData)
7271
+ {
7272
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_UP);
7273
+ if (!event || !event.Callback) return;
7274
+
7275
+ event.Callback(event, sendData, this);
7276
+ }
7277
+
7220
7278
  this.UIOnMouseDown=function(e)
7221
7279
  {
7222
7280
  this.MoveOnChartDrawPicture=null;
@@ -7230,6 +7288,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7230
7288
  this.UpDownDrag=null;
7231
7289
  this.RectSelectDrag=null;
7232
7290
  this.IndexChartDrag=null;
7291
+ this.CustomChartDrag=null;
7233
7292
 
7234
7293
  var pixelTatio = GetDevicePixelRatio();
7235
7294
  var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
@@ -7320,6 +7379,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7320
7379
  }
7321
7380
  }
7322
7381
 
7382
+ var sendData={ X:x, Y:y, e:e };
7383
+ if (this.TryClick_CustomChartDrag(sendData))
7384
+ {
7385
+
7386
+ }
7387
+
7323
7388
  if(this.DragMode==0) return;
7324
7389
 
7325
7390
  var drag=
@@ -7344,7 +7409,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7344
7409
  {
7345
7410
 
7346
7411
  }
7347
- else if (this.YDrag || this.RectSelectDrag)
7412
+ else if (this.YDrag || this.RectSelectDrag || this.CustomChartDrag)
7348
7413
  {
7349
7414
 
7350
7415
  }
@@ -7570,6 +7635,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7570
7635
  drag.LastMove.X=e.clientX;
7571
7636
  drag.LastMove.Y=e.clientY;
7572
7637
  }
7638
+ else if (this.CustomChartDrag)
7639
+ {
7640
+ var pixelTatio = GetDevicePixelRatio();
7641
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
7642
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
7643
+ var sendData={X:x, Y:y, e:e, ChartDrag:this.CustomChartDrag, Drag:drag };
7644
+ this.TryDragMove_CustomChartDrag(sendData);
7645
+ }
7573
7646
  else if (this.CurrentChartDrawPicture)
7574
7647
  {
7575
7648
  var drawPicture=this.CurrentChartDrawPicture;
@@ -7799,6 +7872,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7799
7872
  if (!this.OnDragChart(this.IndexChartDrag)) this.DrawDynamicInfo();
7800
7873
  this.UIElement.style.cursor="default";
7801
7874
  }
7875
+ else if (this.CustomChartDrag)
7876
+ {
7877
+ var sendData={ e:e, ChartDrag:this.CustomChartDrag, Drag:this.MouseDrag };
7878
+ this.TryMouseUp_CustomChartDrag(sendData);
7879
+ }
7802
7880
  else if (isDragSelectRect) //区间选择拖动范围
7803
7881
  {
7804
7882
  if (this.OnDragSelectRectMouseUp) this.OnDragSelectRectMouseUp(e);
@@ -7891,6 +7969,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7891
7969
  this.UpDownDrag=null;
7892
7970
  this.RectSelectDrag=null;
7893
7971
  this.IndexChartDrag=null;
7972
+ this.CustomChartDrag=null;
7894
7973
  if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
7895
7974
  }
7896
7975
 
@@ -9787,6 +9866,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9787
9866
  JSConsole.Chart.Log("[JSChartContainer::OnMouseMove] drag rect select ",item);
9788
9867
  }
9789
9868
  }
9869
+
9870
+
9871
+ var sendData={ MouseStatus:null, X:x, Y:y, FrameID:frameID, e:e };
9872
+ if (this.TryMouseMove_CustomChartDrag(sendData))
9873
+ {
9874
+ if (sendData.MouseStatus) mouseStatus=sendData.MouseStatus;
9875
+ }
9790
9876
 
9791
9877
  var bDrawPicture=false; //是否正在画图
9792
9878
  if (this.CurrentChartDrawPicture)
@@ -127519,7 +127605,7 @@ function ScrollBarBGChart()
127519
127605
 
127520
127606
 
127521
127607
 
127522
- var HQCHART_VERSION="1.1.12417";
127608
+ var HQCHART_VERSION="1.1.12424";
127523
127609
 
127524
127610
  function PrintHQChartVersion()
127525
127611
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12417";
8
+ var HQCHART_VERSION="1.1.12424";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -4160,7 +4160,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4160
4160
  if (this.CanvasElement.style)
4161
4161
  {
4162
4162
  this.CanvasElement.style.outline='none';
4163
- this.CanvasElement.style.position="absolute";
4163
+ //this.CanvasElement.style.position="absolute"; //外部自己设置
4164
4164
  }
4165
4165
  if(divElement.hasChildNodes())
4166
4166
  {
@@ -4377,6 +4377,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4377
4377
  if (option.Type==="历史K线图横屏") chart=new KLineChartHScreenContainer(this.CanvasElement);
4378
4378
  else chart=new KLineChartContainer(this.CanvasElement,this.OffscreenCanvasElement,this.CacheCanvasElement);
4379
4379
 
4380
+ chart.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); }
4381
+
4380
4382
  var extraElement=this.GetExtraCanvas(JSChart.CorssCursorCanvasKey);
4381
4383
  if (extraElement) chart.SetCorssCursorElement(extraElement);
4382
4384
 
@@ -4879,6 +4881,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4879
4881
  if (option.Type==="分钟走势图横屏") chart=new MinuteChartHScreenContainer(this.CanvasElement);
4880
4882
  else chart=new MinuteChartContainer(this.CanvasElement, this.OffscreenCanvasElement, this.CacheCanvasElement);
4881
4883
 
4884
+ chart.GetExtraCanvas=(name)=>{ return this.GetExtraCanvas(name); }
4885
+
4882
4886
  if (option.EventCallback) this.SetEventCallback(chart, option.EventCallback);
4883
4887
  if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
4884
4888
 
@@ -6608,6 +6612,12 @@ var JSCHART_EVENT_ID=
6608
6612
  //绘图之前的事件
6609
6613
  ON_BEFORE_DRAW:111,
6610
6614
  ON_BEFORE_DRAW_DYNAMIC_INFO:112,
6615
+
6616
+ //自定义图形拖拽
6617
+ ON_CUSTOM_DRAG_MOUSE_DOWN:113,
6618
+ ON_CUSTOM_DRAG_DOC_MOUSE_MOVE:114,
6619
+ ON_CUSTOM_DRAG_DOC_MOUSE_UP:115,
6620
+ ON_CUSTOM_DRAG_MOUSE_MOVE:116,
6611
6621
  }
6612
6622
 
6613
6623
  var JSCHART_OPERATOR_ID=
@@ -6926,6 +6936,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6926
6936
  this.DisplayLatestOption={ Timer:null, Enable: false, DelayTime:60*1000*3, LastPoint:null };
6927
6937
  this.DrawDynamicInfoOption={ Timer:null, Enable:false , DelayTime:10 };
6928
6938
 
6939
+ this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
6929
6940
 
6930
6941
  //obj={ Element:, Canvas: }
6931
6942
  this.SetCorssCursorElement=function(obj)
@@ -7096,6 +7107,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7096
7107
  if (this.BorderDrag) return;
7097
7108
  if (this.YDrag) return;
7098
7109
  if (this.IndexChartDrag) return;
7110
+ if (this.CustomChartDrag) return;
7099
7111
  //if (this.RectSelectDrag) return;
7100
7112
 
7101
7113
  /*
@@ -7261,6 +7273,52 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7261
7273
  return false;
7262
7274
  }
7263
7275
 
7276
+ this.TryMouseMove_CustomChartDrag=function(sendData)
7277
+ {
7278
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_MOVE);
7279
+ if (!event || !event.Callback) return false;
7280
+
7281
+ return event.Callback(event, sendData, this);
7282
+ }
7283
+
7284
+ this.TryClick_CustomChartDrag=function(sendData)
7285
+ {
7286
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_DOWN);
7287
+ if (!event || !event.Callback) return false;
7288
+
7289
+ sendData.ChartDrag=null;
7290
+ sendData.Cusrsor=null;
7291
+
7292
+ event.Callback(event, sendData, this);
7293
+ this.CustomChartDrag=sendData.ChartDrag;
7294
+
7295
+ if (sendData.Cusrsor) this.UIElement.style.cursor=sendData.Cusrsor;
7296
+ }
7297
+
7298
+ this.TryDragMove_CustomChartDrag=function(sendData)
7299
+ {
7300
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_MOVE);
7301
+ if (!event || !event.Callback) return;
7302
+
7303
+ var e=sendData.e;
7304
+ var drag=sendData.Drag;
7305
+ if(Math.abs(drag.LastMove.Y-e.clientY)<2 && Math.abs(drag.LastMove.X-e.clientX)<2) return;
7306
+
7307
+ if (event.Callback(event, sendData, this))
7308
+ {
7309
+ drag.LastMove.X=e.clientX;
7310
+ drag.LastMove.Y=e.clientY;
7311
+ }
7312
+ }
7313
+
7314
+ this.TryMouseUp_CustomChartDrag=function(sendData)
7315
+ {
7316
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_UP);
7317
+ if (!event || !event.Callback) return;
7318
+
7319
+ event.Callback(event, sendData, this);
7320
+ }
7321
+
7264
7322
  this.UIOnMouseDown=function(e)
7265
7323
  {
7266
7324
  this.MoveOnChartDrawPicture=null;
@@ -7274,6 +7332,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7274
7332
  this.UpDownDrag=null;
7275
7333
  this.RectSelectDrag=null;
7276
7334
  this.IndexChartDrag=null;
7335
+ this.CustomChartDrag=null;
7277
7336
 
7278
7337
  var pixelTatio = GetDevicePixelRatio();
7279
7338
  var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
@@ -7364,6 +7423,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7364
7423
  }
7365
7424
  }
7366
7425
 
7426
+ var sendData={ X:x, Y:y, e:e };
7427
+ if (this.TryClick_CustomChartDrag(sendData))
7428
+ {
7429
+
7430
+ }
7431
+
7367
7432
  if(this.DragMode==0) return;
7368
7433
 
7369
7434
  var drag=
@@ -7388,7 +7453,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7388
7453
  {
7389
7454
 
7390
7455
  }
7391
- else if (this.YDrag || this.RectSelectDrag)
7456
+ else if (this.YDrag || this.RectSelectDrag || this.CustomChartDrag)
7392
7457
  {
7393
7458
 
7394
7459
  }
@@ -7614,6 +7679,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7614
7679
  drag.LastMove.X=e.clientX;
7615
7680
  drag.LastMove.Y=e.clientY;
7616
7681
  }
7682
+ else if (this.CustomChartDrag)
7683
+ {
7684
+ var pixelTatio = GetDevicePixelRatio();
7685
+ var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
7686
+ var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
7687
+ var sendData={X:x, Y:y, e:e, ChartDrag:this.CustomChartDrag, Drag:drag };
7688
+ this.TryDragMove_CustomChartDrag(sendData);
7689
+ }
7617
7690
  else if (this.CurrentChartDrawPicture)
7618
7691
  {
7619
7692
  var drawPicture=this.CurrentChartDrawPicture;
@@ -7843,6 +7916,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7843
7916
  if (!this.OnDragChart(this.IndexChartDrag)) this.DrawDynamicInfo();
7844
7917
  this.UIElement.style.cursor="default";
7845
7918
  }
7919
+ else if (this.CustomChartDrag)
7920
+ {
7921
+ var sendData={ e:e, ChartDrag:this.CustomChartDrag, Drag:this.MouseDrag };
7922
+ this.TryMouseUp_CustomChartDrag(sendData);
7923
+ }
7846
7924
  else if (isDragSelectRect) //区间选择拖动范围
7847
7925
  {
7848
7926
  if (this.OnDragSelectRectMouseUp) this.OnDragSelectRectMouseUp(e);
@@ -7935,6 +8013,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7935
8013
  this.UpDownDrag=null;
7936
8014
  this.RectSelectDrag=null;
7937
8015
  this.IndexChartDrag=null;
8016
+ this.CustomChartDrag=null;
7938
8017
  if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
7939
8018
  }
7940
8019
 
@@ -9831,6 +9910,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9831
9910
  JSConsole.Chart.Log("[JSChartContainer::OnMouseMove] drag rect select ",item);
9832
9911
  }
9833
9912
  }
9913
+
9914
+
9915
+ var sendData={ MouseStatus:null, X:x, Y:y, FrameID:frameID, e:e };
9916
+ if (this.TryMouseMove_CustomChartDrag(sendData))
9917
+ {
9918
+ if (sendData.MouseStatus) mouseStatus=sendData.MouseStatus;
9919
+ }
9834
9920
 
9835
9921
  var bDrawPicture=false; //是否正在画图
9836
9922
  if (this.CurrentChartDrawPicture)
@@ -127563,7 +127649,7 @@ function ScrollBarBGChart()
127563
127649
 
127564
127650
 
127565
127651
 
127566
- var HQCHART_VERSION="1.1.12417";
127652
+ var HQCHART_VERSION="1.1.12424";
127567
127653
 
127568
127654
  function PrintHQChartVersion()
127569
127655
  {