hqchart 1.1.14416 → 1.1.14425
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/lib/umychart.vue.js +20 -14
- package/package.json +1 -1
- package/src/jscommon/umychart.js +73 -41
- package/src/jscommon/umychart.testdata/DayMinute/im2503.cf.1day.minute.export.js +6 -0
- package/src/jscommon/umychart.testdata/DayMinute/im2503.cf.1day.minute.js +1348 -0
- package/src/jscommon/umychart.testdata/DayMinute/im2503.cf.1day.minute.json +1348 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +74 -42
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +74 -42
|
@@ -4246,6 +4246,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4246
4246
|
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
4247
4247
|
}
|
|
4248
4248
|
|
|
4249
|
+
if (option.EnableXDrag)
|
|
4250
|
+
{
|
|
4251
|
+
var item=option.EnableXDrag;
|
|
4252
|
+
if (IFrameSplitOperator.IsBool(item.Bottom)) chart.EnableXDrag.Bottom=item.Bottom;
|
|
4253
|
+
}
|
|
4254
|
+
|
|
4249
4255
|
if (option.KLineTooltip)
|
|
4250
4256
|
{
|
|
4251
4257
|
var item=option.KLineTooltip;
|
|
@@ -5810,6 +5816,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5810
5816
|
return [];
|
|
5811
5817
|
}
|
|
5812
5818
|
|
|
5819
|
+
//手动更新指标 aryIndex=[ {ID:主图指标ID, OverlayID:叠加指标ID }] ,option={ Draw:true/false }
|
|
5820
|
+
this.UpdateWindowIndexV2=function(aryIndex, option)
|
|
5821
|
+
{
|
|
5822
|
+
if (this.JSChartContainer && typeof(this.JSChartContainer.UpdateWindowIndexV2)=='function')
|
|
5823
|
+
return this.JSChartContainer.UpdateWindowIndexV2(aryIndex, option);
|
|
5824
|
+
}
|
|
5825
|
+
|
|
5813
5826
|
this.ChangeInstructionIndex=function(indexName, option)
|
|
5814
5827
|
{
|
|
5815
5828
|
if (this.JSChartContainer && typeof(this.JSChartContainer.ChangeInstructionIndex)=='function')
|
|
@@ -6981,7 +6994,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6981
6994
|
{
|
|
6982
6995
|
Left:false, Right:false, //是否可以拖拽缩放Y轴最大最小值
|
|
6983
6996
|
Wheel:false, WheelYMove:5 //是否可以滚轴缩放Y轴最大最小值
|
|
6984
|
-
};
|
|
6997
|
+
};
|
|
6998
|
+
|
|
6999
|
+
this.EnableXDrag={ Bottom:true }; //X轴拖动缩放
|
|
6985
7000
|
|
|
6986
7001
|
this.EnableZoomIndexWindow=false; //是否支持双击缩放附图窗口
|
|
6987
7002
|
this.EnableVerifyRecvData=false; //是否检测接收到的数据
|
|
@@ -7817,14 +7832,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7817
7832
|
|
|
7818
7833
|
var drag=
|
|
7819
7834
|
{
|
|
7820
|
-
|
|
7821
|
-
|
|
7835
|
+
Click:{},
|
|
7836
|
+
LastMove:{}, //最后移动的位置
|
|
7822
7837
|
CurrentMove:{}, //当前的移动
|
|
7838
|
+
IsInFrameBottom:false,
|
|
7823
7839
|
};
|
|
7824
7840
|
|
|
7841
|
+
|
|
7842
|
+
|
|
7825
7843
|
drag.Click.X=e.clientX;
|
|
7826
7844
|
drag.Click.Y=e.clientY;
|
|
7827
|
-
drag.Click.IsInFrameBottom=this.Frame.PtInFrameBottom(x,y); //是否点击在X轴上
|
|
7845
|
+
if (this.EnableXDrag.Bottom) drag.Click.IsInFrameBottom=this.Frame.PtInFrameBottom(x,y); //是否点击在X轴上
|
|
7828
7846
|
drag.LastMove.X=e.clientX;
|
|
7829
7847
|
drag.LastMove.Y=e.clientY;
|
|
7830
7848
|
|
|
@@ -10526,7 +10544,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10526
10544
|
}
|
|
10527
10545
|
}
|
|
10528
10546
|
|
|
10529
|
-
|
|
10547
|
+
//X轴拖动缩放
|
|
10548
|
+
if (this.ClassName=="KLineChartContainer" && this.EnableXDrag.Bottom && this.Frame.PtInFrameBottom(x,y))
|
|
10530
10549
|
{
|
|
10531
10550
|
mouseStatus={ Cursor:"ew-resize", Name:"FrameButtom"};
|
|
10532
10551
|
JSConsole.Chart.Log("[JSChartContainer::OnMouseMove] frame bottom ");
|
|
@@ -14498,69 +14517,82 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14498
14517
|
}
|
|
14499
14518
|
}
|
|
14500
14519
|
|
|
14501
|
-
|
|
14520
|
+
//手动更新指标 [ {ID:主图指标ID, OverlayID:叠加指标ID }]
|
|
14521
|
+
this.UpdateWindowIndexV2=function(aryIndex, option)
|
|
14502
14522
|
{
|
|
14523
|
+
if (!this.Frame || !this.Frame.SubFrame) return false;
|
|
14524
|
+
|
|
14525
|
+
var kData=this.GetKData();
|
|
14526
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false;
|
|
14527
|
+
|
|
14503
14528
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryIndex)) return false;
|
|
14504
14529
|
|
|
14505
|
-
var
|
|
14506
|
-
|
|
14530
|
+
var setMainIndex=new Set(); //主图指标
|
|
14531
|
+
var setOverlayIndex=new Set(); //附图指标
|
|
14532
|
+
|
|
14533
|
+
for(var i=0;aryIndex.length;++i)
|
|
14507
14534
|
{
|
|
14508
|
-
var item=
|
|
14535
|
+
var item=aryIndex[i];
|
|
14509
14536
|
if (!item) continue;
|
|
14510
|
-
if (!item.ID) continue;
|
|
14511
14537
|
|
|
14512
|
-
if (
|
|
14513
|
-
|
|
14514
|
-
aryID.push(i);
|
|
14515
|
-
}
|
|
14538
|
+
if (item.ID) setMainIndex.set(item.ID);
|
|
14539
|
+
if (item.OverlayID) setOverlayIndex.set(item.OverlayID);
|
|
14516
14540
|
}
|
|
14517
14541
|
|
|
14518
|
-
if (
|
|
14542
|
+
if (setMainIndex.size<=0 && setOverlayIndex.size<0) return false;
|
|
14519
14543
|
|
|
14544
|
+
//K线数据
|
|
14545
|
+
var bindData=new ChartData();
|
|
14546
|
+
if (kData) bindData.Data=kData.Data;
|
|
14520
14547
|
if (this.IsKLineContainer()) //K线
|
|
14521
14548
|
{
|
|
14522
|
-
var bindData=new ChartData();
|
|
14523
|
-
bindData.Data=this.SourceData.Data;
|
|
14524
14549
|
bindData.Period=this.Period;
|
|
14525
14550
|
bindData.Right=this.Right;
|
|
14551
|
+
}
|
|
14526
14552
|
|
|
14527
|
-
|
|
14553
|
+
//主图指标
|
|
14554
|
+
if (setMainIndex.size>0)
|
|
14555
|
+
{
|
|
14556
|
+
for(var i=0;i<this.WindowIndex.length;++i)
|
|
14528
14557
|
{
|
|
14558
|
+
var item=this.WindowIndex[i];
|
|
14559
|
+
if (!item) continue;
|
|
14529
14560
|
|
|
14561
|
+
if (setMainIndex.has(item.ID))
|
|
14562
|
+
{
|
|
14563
|
+
this.BindIndexData(i,bindData);
|
|
14564
|
+
}
|
|
14530
14565
|
}
|
|
14531
|
-
|
|
14566
|
+
}
|
|
14567
|
+
|
|
14568
|
+
//叠加指标
|
|
14569
|
+
if (setOverlayIndex.size>0)
|
|
14570
|
+
{
|
|
14571
|
+
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
14532
14572
|
{
|
|
14533
|
-
|
|
14573
|
+
var item=this.Frame.SubFrame[i];
|
|
14574
|
+
for(var j=0; j<item.OverlayIndex.length; ++j)
|
|
14534
14575
|
{
|
|
14535
|
-
var
|
|
14536
|
-
bindData.Data=rightData;
|
|
14537
|
-
}
|
|
14576
|
+
var overlayItem=item.OverlayIndex[j];
|
|
14538
14577
|
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14578
|
+
if (setOverlayIndex.has(overlayItem.Identify))
|
|
14579
|
+
{
|
|
14580
|
+
this.BindOverlayIndexData(overlayItem,i,hisData)
|
|
14581
|
+
}
|
|
14543
14582
|
}
|
|
14544
14583
|
}
|
|
14545
14584
|
}
|
|
14546
|
-
else if (this.IsMinuteContainer()) //分时图
|
|
14547
|
-
{
|
|
14548
|
-
var bindData=this.SourceData;
|
|
14549
|
-
}
|
|
14550
|
-
else
|
|
14551
|
-
{
|
|
14552
|
-
return;
|
|
14553
|
-
}
|
|
14554
14585
|
|
|
14555
|
-
|
|
14556
|
-
|
|
14586
|
+
var bDraw=true;
|
|
14587
|
+
if (option && option.Draw===false) bDraw=false;
|
|
14588
|
+
if (bDraw)
|
|
14557
14589
|
{
|
|
14558
|
-
this.
|
|
14590
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
14591
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
14592
|
+
this.Draw();
|
|
14559
14593
|
}
|
|
14560
14594
|
|
|
14561
|
-
|
|
14562
|
-
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
14563
|
-
this.Draw();
|
|
14595
|
+
return true;
|
|
14564
14596
|
}
|
|
14565
14597
|
|
|
14566
14598
|
this.GetKData=function()
|
|
@@ -143405,7 +143437,7 @@ function ScrollBarBGChart()
|
|
|
143405
143437
|
|
|
143406
143438
|
|
|
143407
143439
|
|
|
143408
|
-
var HQCHART_VERSION="1.1.
|
|
143440
|
+
var HQCHART_VERSION="1.1.14424";
|
|
143409
143441
|
|
|
143410
143442
|
function PrintHQChartVersion()
|
|
143411
143443
|
{
|
|
@@ -4290,6 +4290,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4290
4290
|
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
4291
4291
|
}
|
|
4292
4292
|
|
|
4293
|
+
if (option.EnableXDrag)
|
|
4294
|
+
{
|
|
4295
|
+
var item=option.EnableXDrag;
|
|
4296
|
+
if (IFrameSplitOperator.IsBool(item.Bottom)) chart.EnableXDrag.Bottom=item.Bottom;
|
|
4297
|
+
}
|
|
4298
|
+
|
|
4293
4299
|
if (option.KLineTooltip)
|
|
4294
4300
|
{
|
|
4295
4301
|
var item=option.KLineTooltip;
|
|
@@ -5854,6 +5860,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5854
5860
|
return [];
|
|
5855
5861
|
}
|
|
5856
5862
|
|
|
5863
|
+
//手动更新指标 aryIndex=[ {ID:主图指标ID, OverlayID:叠加指标ID }] ,option={ Draw:true/false }
|
|
5864
|
+
this.UpdateWindowIndexV2=function(aryIndex, option)
|
|
5865
|
+
{
|
|
5866
|
+
if (this.JSChartContainer && typeof(this.JSChartContainer.UpdateWindowIndexV2)=='function')
|
|
5867
|
+
return this.JSChartContainer.UpdateWindowIndexV2(aryIndex, option);
|
|
5868
|
+
}
|
|
5869
|
+
|
|
5857
5870
|
this.ChangeInstructionIndex=function(indexName, option)
|
|
5858
5871
|
{
|
|
5859
5872
|
if (this.JSChartContainer && typeof(this.JSChartContainer.ChangeInstructionIndex)=='function')
|
|
@@ -7025,7 +7038,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7025
7038
|
{
|
|
7026
7039
|
Left:false, Right:false, //是否可以拖拽缩放Y轴最大最小值
|
|
7027
7040
|
Wheel:false, WheelYMove:5 //是否可以滚轴缩放Y轴最大最小值
|
|
7028
|
-
};
|
|
7041
|
+
};
|
|
7042
|
+
|
|
7043
|
+
this.EnableXDrag={ Bottom:true }; //X轴拖动缩放
|
|
7029
7044
|
|
|
7030
7045
|
this.EnableZoomIndexWindow=false; //是否支持双击缩放附图窗口
|
|
7031
7046
|
this.EnableVerifyRecvData=false; //是否检测接收到的数据
|
|
@@ -7861,14 +7876,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7861
7876
|
|
|
7862
7877
|
var drag=
|
|
7863
7878
|
{
|
|
7864
|
-
|
|
7865
|
-
|
|
7879
|
+
Click:{},
|
|
7880
|
+
LastMove:{}, //最后移动的位置
|
|
7866
7881
|
CurrentMove:{}, //当前的移动
|
|
7882
|
+
IsInFrameBottom:false,
|
|
7867
7883
|
};
|
|
7868
7884
|
|
|
7885
|
+
|
|
7886
|
+
|
|
7869
7887
|
drag.Click.X=e.clientX;
|
|
7870
7888
|
drag.Click.Y=e.clientY;
|
|
7871
|
-
drag.Click.IsInFrameBottom=this.Frame.PtInFrameBottom(x,y); //是否点击在X轴上
|
|
7889
|
+
if (this.EnableXDrag.Bottom) drag.Click.IsInFrameBottom=this.Frame.PtInFrameBottom(x,y); //是否点击在X轴上
|
|
7872
7890
|
drag.LastMove.X=e.clientX;
|
|
7873
7891
|
drag.LastMove.Y=e.clientY;
|
|
7874
7892
|
|
|
@@ -10570,7 +10588,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10570
10588
|
}
|
|
10571
10589
|
}
|
|
10572
10590
|
|
|
10573
|
-
|
|
10591
|
+
//X轴拖动缩放
|
|
10592
|
+
if (this.ClassName=="KLineChartContainer" && this.EnableXDrag.Bottom && this.Frame.PtInFrameBottom(x,y))
|
|
10574
10593
|
{
|
|
10575
10594
|
mouseStatus={ Cursor:"ew-resize", Name:"FrameButtom"};
|
|
10576
10595
|
JSConsole.Chart.Log("[JSChartContainer::OnMouseMove] frame bottom ");
|
|
@@ -14542,69 +14561,82 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14542
14561
|
}
|
|
14543
14562
|
}
|
|
14544
14563
|
|
|
14545
|
-
|
|
14564
|
+
//手动更新指标 [ {ID:主图指标ID, OverlayID:叠加指标ID }]
|
|
14565
|
+
this.UpdateWindowIndexV2=function(aryIndex, option)
|
|
14546
14566
|
{
|
|
14567
|
+
if (!this.Frame || !this.Frame.SubFrame) return false;
|
|
14568
|
+
|
|
14569
|
+
var kData=this.GetKData();
|
|
14570
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false;
|
|
14571
|
+
|
|
14547
14572
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryIndex)) return false;
|
|
14548
14573
|
|
|
14549
|
-
var
|
|
14550
|
-
|
|
14574
|
+
var setMainIndex=new Set(); //主图指标
|
|
14575
|
+
var setOverlayIndex=new Set(); //附图指标
|
|
14576
|
+
|
|
14577
|
+
for(var i=0;aryIndex.length;++i)
|
|
14551
14578
|
{
|
|
14552
|
-
var item=
|
|
14579
|
+
var item=aryIndex[i];
|
|
14553
14580
|
if (!item) continue;
|
|
14554
|
-
if (!item.ID) continue;
|
|
14555
14581
|
|
|
14556
|
-
if (
|
|
14557
|
-
|
|
14558
|
-
aryID.push(i);
|
|
14559
|
-
}
|
|
14582
|
+
if (item.ID) setMainIndex.set(item.ID);
|
|
14583
|
+
if (item.OverlayID) setOverlayIndex.set(item.OverlayID);
|
|
14560
14584
|
}
|
|
14561
14585
|
|
|
14562
|
-
if (
|
|
14586
|
+
if (setMainIndex.size<=0 && setOverlayIndex.size<0) return false;
|
|
14563
14587
|
|
|
14588
|
+
//K线数据
|
|
14589
|
+
var bindData=new ChartData();
|
|
14590
|
+
if (kData) bindData.Data=kData.Data;
|
|
14564
14591
|
if (this.IsKLineContainer()) //K线
|
|
14565
14592
|
{
|
|
14566
|
-
var bindData=new ChartData();
|
|
14567
|
-
bindData.Data=this.SourceData.Data;
|
|
14568
14593
|
bindData.Period=this.Period;
|
|
14569
14594
|
bindData.Right=this.Right;
|
|
14595
|
+
}
|
|
14570
14596
|
|
|
14571
|
-
|
|
14597
|
+
//主图指标
|
|
14598
|
+
if (setMainIndex.size>0)
|
|
14599
|
+
{
|
|
14600
|
+
for(var i=0;i<this.WindowIndex.length;++i)
|
|
14572
14601
|
{
|
|
14602
|
+
var item=this.WindowIndex[i];
|
|
14603
|
+
if (!item) continue;
|
|
14573
14604
|
|
|
14605
|
+
if (setMainIndex.has(item.ID))
|
|
14606
|
+
{
|
|
14607
|
+
this.BindIndexData(i,bindData);
|
|
14608
|
+
}
|
|
14574
14609
|
}
|
|
14575
|
-
|
|
14610
|
+
}
|
|
14611
|
+
|
|
14612
|
+
//叠加指标
|
|
14613
|
+
if (setOverlayIndex.size>0)
|
|
14614
|
+
{
|
|
14615
|
+
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
14576
14616
|
{
|
|
14577
|
-
|
|
14617
|
+
var item=this.Frame.SubFrame[i];
|
|
14618
|
+
for(var j=0; j<item.OverlayIndex.length; ++j)
|
|
14578
14619
|
{
|
|
14579
|
-
var
|
|
14580
|
-
bindData.Data=rightData;
|
|
14581
|
-
}
|
|
14620
|
+
var overlayItem=item.OverlayIndex[j];
|
|
14582
14621
|
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
|
|
14622
|
+
if (setOverlayIndex.has(overlayItem.Identify))
|
|
14623
|
+
{
|
|
14624
|
+
this.BindOverlayIndexData(overlayItem,i,hisData)
|
|
14625
|
+
}
|
|
14587
14626
|
}
|
|
14588
14627
|
}
|
|
14589
14628
|
}
|
|
14590
|
-
else if (this.IsMinuteContainer()) //分时图
|
|
14591
|
-
{
|
|
14592
|
-
var bindData=this.SourceData;
|
|
14593
|
-
}
|
|
14594
|
-
else
|
|
14595
|
-
{
|
|
14596
|
-
return;
|
|
14597
|
-
}
|
|
14598
14629
|
|
|
14599
|
-
|
|
14600
|
-
|
|
14630
|
+
var bDraw=true;
|
|
14631
|
+
if (option && option.Draw===false) bDraw=false;
|
|
14632
|
+
if (bDraw)
|
|
14601
14633
|
{
|
|
14602
|
-
this.
|
|
14634
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
14635
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
14636
|
+
this.Draw();
|
|
14603
14637
|
}
|
|
14604
14638
|
|
|
14605
|
-
|
|
14606
|
-
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
14607
|
-
this.Draw();
|
|
14639
|
+
return true;
|
|
14608
14640
|
}
|
|
14609
14641
|
|
|
14610
14642
|
this.GetKData=function()
|
|
@@ -153200,7 +153232,7 @@ function HQChartScriptWorker()
|
|
|
153200
153232
|
|
|
153201
153233
|
|
|
153202
153234
|
|
|
153203
|
-
var HQCHART_VERSION="1.1.
|
|
153235
|
+
var HQCHART_VERSION="1.1.14424";
|
|
153204
153236
|
|
|
153205
153237
|
function PrintHQChartVersion()
|
|
153206
153238
|
{
|