hqchart 1.1.14412 → 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 +28 -23
- package/package.json +1 -1
- package/src/jscommon/umychart.js +97 -64
- package/src/jscommon/umychart.style.js +3 -3
- 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 +101 -68
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +101 -68
|
@@ -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()
|
|
@@ -15637,7 +15669,7 @@ function AverageWidthFrame()
|
|
|
15637
15669
|
this.IsShowYLine=true;
|
|
15638
15670
|
this.YInsideOffset=0;
|
|
15639
15671
|
this.YTextBaseline=0; //0=居中 1=上部 (目前就支持内部刻度)
|
|
15640
|
-
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行
|
|
15672
|
+
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行 3=多行输出(json格式)
|
|
15641
15673
|
this.RightTextMaxWidth=0;
|
|
15642
15674
|
|
|
15643
15675
|
this.ShortYLineLength=5;
|
|
@@ -54769,7 +54801,7 @@ function FrameSplitKLinePriceY()
|
|
|
54769
54801
|
this.EnableZoomUpDown=false; //上下左右拖拽
|
|
54770
54802
|
this.LastMaxMin; //当前显示的最高最低范围
|
|
54771
54803
|
|
|
54772
|
-
this.PercentageTextFormat=0; //0=显示第1行 1=显示2行 2
|
|
54804
|
+
this.PercentageTextFormat=0; //0=显示第1行 1=单行格式: 价格/百分比, 2=显示2行 3=2行显示(json格式)
|
|
54773
54805
|
|
|
54774
54806
|
this.IsEnableDragY=function()
|
|
54775
54807
|
{
|
|
@@ -55001,17 +55033,7 @@ function FrameSplitKLinePriceY()
|
|
|
55001
55033
|
var price=(value+1)*firstOpenPrice;
|
|
55002
55034
|
var item=new CoordinateInfo();
|
|
55003
55035
|
item.Value=price;
|
|
55004
|
-
|
|
55005
|
-
|
|
55006
|
-
if (this.IsShowRightText)
|
|
55007
|
-
{
|
|
55008
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55009
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55010
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55011
|
-
text+='%';
|
|
55012
|
-
item.Message[1]=[text,strPrice];
|
|
55013
|
-
item.ExtendData=textColor;
|
|
55014
|
-
}
|
|
55036
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55015
55037
|
aryHorizontal.push(item);
|
|
55016
55038
|
}
|
|
55017
55039
|
|
|
@@ -55022,16 +55044,7 @@ function FrameSplitKLinePriceY()
|
|
|
55022
55044
|
|
|
55023
55045
|
var item=new CoordinateInfo();
|
|
55024
55046
|
item.Value=price;
|
|
55025
|
-
|
|
55026
|
-
if (this.IsShowRightText)
|
|
55027
|
-
{
|
|
55028
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55029
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55030
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55031
|
-
text+='%';
|
|
55032
|
-
item.Message[1]=[text,strPrice];
|
|
55033
|
-
item.ExtendData=textColor;
|
|
55034
|
-
}
|
|
55047
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55035
55048
|
aryHorizontal.push(item);
|
|
55036
55049
|
}
|
|
55037
55050
|
|
|
@@ -55047,6 +55060,26 @@ function FrameSplitKLinePriceY()
|
|
|
55047
55060
|
return true;
|
|
55048
55061
|
}
|
|
55049
55062
|
|
|
55063
|
+
this.FormatPercentageItem=function(item, percentage, floatPrecision, textColor)
|
|
55064
|
+
{
|
|
55065
|
+
var price=item.Value;
|
|
55066
|
+
var strPrice=price.toFixed(floatPrecision);
|
|
55067
|
+
if (this.IsShowLeftText) item.Message[0]=strPrice; //左边价格坐标
|
|
55068
|
+
|
|
55069
|
+
if (this.IsShowRightText) //右侧 价格/百分比
|
|
55070
|
+
{
|
|
55071
|
+
var strPrcentage=`${IFrameSplitOperator.RemoveZero(percentage.toFixed(2))}%`; //右边百分比
|
|
55072
|
+
if (this.PercentageTextFormat==1)
|
|
55073
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:"/", Color:textColor.PercentageColor}, {Text:strPrcentage, Color:textColor.SplitColor}];
|
|
55074
|
+
else if (this.PercentageTextFormat==3)
|
|
55075
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:strPrcentage, Color:textColor.PercentageColor}];
|
|
55076
|
+
else if (this.PercentageTextFormat==2)
|
|
55077
|
+
item.Message[1]=[strPrcentage, strPrice];
|
|
55078
|
+
else
|
|
55079
|
+
item.Message[1]=strPrcentage;
|
|
55080
|
+
}
|
|
55081
|
+
}
|
|
55082
|
+
|
|
55050
55083
|
//等比坐标 当前屏最后第2根K线的收盘加为基准, 上下涨幅10%分割
|
|
55051
55084
|
this.SplitIncrease=function(splitData,floatPrecision)
|
|
55052
55085
|
{
|
|
@@ -128455,9 +128488,9 @@ function GetBlackStyle()
|
|
|
128455
128488
|
|
|
128456
128489
|
PercentageText: //百分比坐标文字颜色
|
|
128457
128490
|
{
|
|
128458
|
-
PriceColor:'rgb(
|
|
128459
|
-
PercentageColor:"rgb(
|
|
128460
|
-
SplitColor:"rgb(
|
|
128491
|
+
PriceColor:'rgb(220,220,220)',
|
|
128492
|
+
PercentageColor:"rgb(220,220,220)",
|
|
128493
|
+
SplitColor:"rgb(220,220,220)",
|
|
128461
128494
|
Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
128462
128495
|
}
|
|
128463
128496
|
},
|
|
@@ -143404,7 +143437,7 @@ function ScrollBarBGChart()
|
|
|
143404
143437
|
|
|
143405
143438
|
|
|
143406
143439
|
|
|
143407
|
-
var HQCHART_VERSION="1.1.
|
|
143440
|
+
var HQCHART_VERSION="1.1.14424";
|
|
143408
143441
|
|
|
143409
143442
|
function PrintHQChartVersion()
|
|
143410
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()
|
|
@@ -15681,7 +15713,7 @@ function AverageWidthFrame()
|
|
|
15681
15713
|
this.IsShowYLine=true;
|
|
15682
15714
|
this.YInsideOffset=0;
|
|
15683
15715
|
this.YTextBaseline=0; //0=居中 1=上部 (目前就支持内部刻度)
|
|
15684
|
-
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行
|
|
15716
|
+
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行 3=多行输出(json格式)
|
|
15685
15717
|
this.RightTextMaxWidth=0;
|
|
15686
15718
|
|
|
15687
15719
|
this.ShortYLineLength=5;
|
|
@@ -54813,7 +54845,7 @@ function FrameSplitKLinePriceY()
|
|
|
54813
54845
|
this.EnableZoomUpDown=false; //上下左右拖拽
|
|
54814
54846
|
this.LastMaxMin; //当前显示的最高最低范围
|
|
54815
54847
|
|
|
54816
|
-
this.PercentageTextFormat=0; //0=显示第1行 1=显示2行 2
|
|
54848
|
+
this.PercentageTextFormat=0; //0=显示第1行 1=单行格式: 价格/百分比, 2=显示2行 3=2行显示(json格式)
|
|
54817
54849
|
|
|
54818
54850
|
this.IsEnableDragY=function()
|
|
54819
54851
|
{
|
|
@@ -55045,17 +55077,7 @@ function FrameSplitKLinePriceY()
|
|
|
55045
55077
|
var price=(value+1)*firstOpenPrice;
|
|
55046
55078
|
var item=new CoordinateInfo();
|
|
55047
55079
|
item.Value=price;
|
|
55048
|
-
|
|
55049
|
-
|
|
55050
|
-
if (this.IsShowRightText)
|
|
55051
|
-
{
|
|
55052
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55053
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55054
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55055
|
-
text+='%';
|
|
55056
|
-
item.Message[1]=[text,strPrice];
|
|
55057
|
-
item.ExtendData=textColor;
|
|
55058
|
-
}
|
|
55080
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55059
55081
|
aryHorizontal.push(item);
|
|
55060
55082
|
}
|
|
55061
55083
|
|
|
@@ -55066,16 +55088,7 @@ function FrameSplitKLinePriceY()
|
|
|
55066
55088
|
|
|
55067
55089
|
var item=new CoordinateInfo();
|
|
55068
55090
|
item.Value=price;
|
|
55069
|
-
|
|
55070
|
-
if (this.IsShowRightText)
|
|
55071
|
-
{
|
|
55072
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55073
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55074
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55075
|
-
text+='%';
|
|
55076
|
-
item.Message[1]=[text,strPrice];
|
|
55077
|
-
item.ExtendData=textColor;
|
|
55078
|
-
}
|
|
55091
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55079
55092
|
aryHorizontal.push(item);
|
|
55080
55093
|
}
|
|
55081
55094
|
|
|
@@ -55091,6 +55104,26 @@ function FrameSplitKLinePriceY()
|
|
|
55091
55104
|
return true;
|
|
55092
55105
|
}
|
|
55093
55106
|
|
|
55107
|
+
this.FormatPercentageItem=function(item, percentage, floatPrecision, textColor)
|
|
55108
|
+
{
|
|
55109
|
+
var price=item.Value;
|
|
55110
|
+
var strPrice=price.toFixed(floatPrecision);
|
|
55111
|
+
if (this.IsShowLeftText) item.Message[0]=strPrice; //左边价格坐标
|
|
55112
|
+
|
|
55113
|
+
if (this.IsShowRightText) //右侧 价格/百分比
|
|
55114
|
+
{
|
|
55115
|
+
var strPrcentage=`${IFrameSplitOperator.RemoveZero(percentage.toFixed(2))}%`; //右边百分比
|
|
55116
|
+
if (this.PercentageTextFormat==1)
|
|
55117
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:"/", Color:textColor.PercentageColor}, {Text:strPrcentage, Color:textColor.SplitColor}];
|
|
55118
|
+
else if (this.PercentageTextFormat==3)
|
|
55119
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:strPrcentage, Color:textColor.PercentageColor}];
|
|
55120
|
+
else if (this.PercentageTextFormat==2)
|
|
55121
|
+
item.Message[1]=[strPrcentage, strPrice];
|
|
55122
|
+
else
|
|
55123
|
+
item.Message[1]=strPrcentage;
|
|
55124
|
+
}
|
|
55125
|
+
}
|
|
55126
|
+
|
|
55094
55127
|
//等比坐标 当前屏最后第2根K线的收盘加为基准, 上下涨幅10%分割
|
|
55095
55128
|
this.SplitIncrease=function(splitData,floatPrecision)
|
|
55096
55129
|
{
|
|
@@ -128499,9 +128532,9 @@ function GetBlackStyle()
|
|
|
128499
128532
|
|
|
128500
128533
|
PercentageText: //百分比坐标文字颜色
|
|
128501
128534
|
{
|
|
128502
|
-
PriceColor:'rgb(
|
|
128503
|
-
PercentageColor:"rgb(
|
|
128504
|
-
SplitColor:"rgb(
|
|
128535
|
+
PriceColor:'rgb(220,220,220)',
|
|
128536
|
+
PercentageColor:"rgb(220,220,220)",
|
|
128537
|
+
SplitColor:"rgb(220,220,220)",
|
|
128505
128538
|
Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
128506
128539
|
}
|
|
128507
128540
|
},
|
|
@@ -153199,7 +153232,7 @@ function HQChartScriptWorker()
|
|
|
153199
153232
|
|
|
153200
153233
|
|
|
153201
153234
|
|
|
153202
|
-
var HQCHART_VERSION="1.1.
|
|
153235
|
+
var HQCHART_VERSION="1.1.14424";
|
|
153203
153236
|
|
|
153204
153237
|
function PrintHQChartVersion()
|
|
153205
153238
|
{
|