hqchart 1.1.13606 → 1.1.13614
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 +71 -68
- package/package.json +1 -1
- package/src/jscommon/umychart.js +81 -12
- package/src/jscommon/umychart.style.js +3 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +85 -14
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +85 -14
|
@@ -4661,7 +4661,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4661
4661
|
|
|
4662
4662
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
4663
4663
|
else item.TitleHeight=chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight;
|
|
4664
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
4664
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
4665
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) frame.TitleArrowType=item.TitleArrowType;
|
|
4665
4666
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
4666
4667
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
4667
4668
|
if (IFrameSplitOperator.IsNumber(item.IndexParamSpace)) chart.Frame.SubFrame[i].Frame.IndexParamSpace=item.IndexParamSpace;
|
|
@@ -5130,7 +5131,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5130
5131
|
if (IFrameSplitOperator.IsBool(item.IsDrawTitleBG)) chart.Frame.SubFrame[index].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
5131
5132
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[index].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
5132
5133
|
|
|
5133
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
5134
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
5135
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) frame.TitleArrowType=item.TitleArrowType;
|
|
5134
5136
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[index].Frame.IsShowIndexName=false;
|
|
5135
5137
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[index].Frame.IsShowOverlayIndexName=false;
|
|
5136
5138
|
if (!IFrameSplitOperator.IsUndefined(item.HorizontalReserved)) frame.HorizontalReserved=item.HorizontalReserved;
|
|
@@ -5541,7 +5543,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5541
5543
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
5542
5544
|
|
|
5543
5545
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
5544
|
-
|
|
5545
5546
|
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) chart.Frame.SubFrame[i].Frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
5546
5547
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
5547
5548
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
@@ -12365,6 +12366,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12365
12366
|
else windowItem.TitleHeight=frame.ChartBorder.TitleHeight;
|
|
12366
12367
|
|
|
12367
12368
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowTitleArrow)) frame.IsShowTitleArrow=windowItem.IsShowTitleArrow;
|
|
12369
|
+
if (IFrameSplitOperator.IsNumber(windowItem.TitleArrowType)) frame.TitleArrowType=windowItem.TitleArrowType;
|
|
12368
12370
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowIndexName)) frame.IsShowIndexName=windowItem.IsShowIndexName;
|
|
12369
12371
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
|
|
12370
12372
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
|
|
@@ -12427,6 +12429,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12427
12429
|
if (IFrameSplitOperator.IsNumber(option.SplitCount)) subFrame.Frame.YSplitOperator.SplitCount=option.SplitCount;
|
|
12428
12430
|
if (IFrameSplitOperator.IsNumber(option.TitleHeight)) subFrame.Frame.ChartBorder.TitleHeight=option.TitleHeight;
|
|
12429
12431
|
if (IFrameSplitOperator.IsBool(option.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=option.IsShowTitleArrow;
|
|
12432
|
+
if (IFrameSplitOperator.IsNumber(option.TitleArrowType)) subFrame.Frame.TitleArrowType=option.TitleArrowType;
|
|
12430
12433
|
if (IFrameSplitOperator.IsBool(option.IsShowIndexName)) subFrame.Frame.IsShowIndexName=option.IsShowIndexName;
|
|
12431
12434
|
if (IFrameSplitOperator.IsBool(option.IsShowOverlayIndexName)) subFrame.Frame.IsShowOverlayIndexName=option.IsShowOverlayIndexName;
|
|
12432
12435
|
if (IFrameSplitOperator.IsNumber(option.IndexParamSpace)) subFrame.Frame.IndexParamSpace=option.IndexParamSpace;
|
|
@@ -14267,6 +14270,7 @@ function IChartFramePainting()
|
|
|
14267
14270
|
this.YSpecificMaxMin=null; //指定Y轴最大最小值
|
|
14268
14271
|
this.IsShowBorder = true; //是否显示边框
|
|
14269
14272
|
this.IsShowTitleArrow=true; //是否显示指标信息上涨下跌箭头
|
|
14273
|
+
this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
|
|
14270
14274
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
14271
14275
|
this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
|
|
14272
14276
|
//this.OverlayIndexType= { Position:0, LineSpace:5 };
|
|
@@ -50399,6 +50403,22 @@ IFrameSplitOperator.IsNumber=function(value)
|
|
|
50399
50403
|
return typeof(value)=='number';
|
|
50400
50404
|
}
|
|
50401
50405
|
|
|
50406
|
+
//批量判断是否是数值类型
|
|
50407
|
+
IFrameSplitOperator.IsNumberV2=function(...aryValue)
|
|
50408
|
+
{
|
|
50409
|
+
if (!aryValue) return false;
|
|
50410
|
+
if (aryValue.length==0) return false;
|
|
50411
|
+
|
|
50412
|
+
for(const value of aryValue)
|
|
50413
|
+
{
|
|
50414
|
+
if (value==null) return false;
|
|
50415
|
+
if (isNaN(value)) return false;
|
|
50416
|
+
if (typeof(value)!='number') return false;
|
|
50417
|
+
}
|
|
50418
|
+
|
|
50419
|
+
return true;
|
|
50420
|
+
}
|
|
50421
|
+
|
|
50402
50422
|
//判断是否是正数
|
|
50403
50423
|
IFrameSplitOperator.IsPlusNumber=function(value)
|
|
50404
50424
|
{
|
|
@@ -57279,9 +57299,11 @@ function DynamicChartTitlePainting()
|
|
|
57279
57299
|
this.ColorIndex; //五彩K线名字 {Name:'名字'}
|
|
57280
57300
|
this.IsShowColorIndexTitle=true;
|
|
57281
57301
|
this.IsShowUpDownArrow=true; //指标数据是否显示 上涨下跌箭头
|
|
57302
|
+
this.TitleArrowType=0; //指标数据上涨下跌箭头类型 0=独立颜色 1=跟指标颜色一致
|
|
57282
57303
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
57283
57304
|
this.IsShowIndexTitle=true; //是否显示指标标题信息
|
|
57284
57305
|
this.IsShowNameArrow=false;
|
|
57306
|
+
this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
|
|
57285
57307
|
|
|
57286
57308
|
this.TradeIndex; //专家系统名字{Name:'名字', Param:'参数'}
|
|
57287
57309
|
this.IsShowTradeIndexTitle=true;
|
|
@@ -57750,6 +57772,7 @@ function DynamicChartTitlePainting()
|
|
|
57750
57772
|
this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;
|
|
57751
57773
|
this.IsShowNameArrow=this.Frame.IsShowNameArrow;
|
|
57752
57774
|
this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;
|
|
57775
|
+
this.TitleArrowType=this.Frame.TitleArrowType;
|
|
57753
57776
|
this.IsShowIndexName=this.Frame.IsShowIndexName;
|
|
57754
57777
|
this.IsShowOverlayIndexName=this.Frame.IsShowOverlayIndexName;
|
|
57755
57778
|
this.OverlayIndexType.Position=this.Frame.OverlayIndexType.Position;
|
|
@@ -58034,6 +58057,8 @@ function DynamicChartTitlePainting()
|
|
|
58034
58057
|
if (preValue>value) arrowSuper={ Text:'↓', TextColor:this.UpDownArrowConfig.DownColor };
|
|
58035
58058
|
else if (preValue<value) arrowSuper={ Text:'↑', TextColor:this.UpDownArrowConfig.UpColor};
|
|
58036
58059
|
else arrowSuper={ Text:'→', TextColor:this.UpDownArrowConfig.UnchangeColor };
|
|
58060
|
+
|
|
58061
|
+
if (this.TitleArrowType==1) arrowSuper.TextColor=item.Color;
|
|
58037
58062
|
}
|
|
58038
58063
|
}
|
|
58039
58064
|
|
|
@@ -58541,10 +58566,16 @@ function DynamicChartTitlePainting()
|
|
|
58541
58566
|
if (this.IsDrawTitleBG)
|
|
58542
58567
|
{
|
|
58543
58568
|
var title=this.Title;
|
|
58544
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
58545
58569
|
var textWidth=this.Canvas.measureText(title).width;
|
|
58570
|
+
var arrowWidth=0;
|
|
58571
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58572
|
+
{
|
|
58573
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
58574
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
58575
|
+
}
|
|
58576
|
+
|
|
58546
58577
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
58547
|
-
var bgWidth=textWidth+4*pixelRatio;
|
|
58578
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio;
|
|
58548
58579
|
|
|
58549
58580
|
this.TitleRect=
|
|
58550
58581
|
{
|
|
@@ -58564,15 +58595,24 @@ function DynamicChartTitlePainting()
|
|
|
58564
58595
|
this.Canvas.strokeRect(ToFixedPoint(drawRect.Left),ToFixedPoint(drawRect.Top),ToFixedRect(drawRect.Width),ToFixedRect(drawRect.Height));
|
|
58565
58596
|
}
|
|
58566
58597
|
|
|
58598
|
+
var xText=left+2*pixelRatio;
|
|
58567
58599
|
this.Canvas.fillStyle=this.TitleColor;
|
|
58568
|
-
this.Canvas.fillText(title,
|
|
58600
|
+
this.Canvas.fillText(title,xText,bottom);
|
|
58601
|
+
xText+=textWidth;
|
|
58602
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58603
|
+
{
|
|
58604
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
58605
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
58606
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,bottom);
|
|
58607
|
+
}
|
|
58608
|
+
|
|
58569
58609
|
left+=bgWidth+2*pixelRatio;
|
|
58570
58610
|
left+=this.TitleSpace;
|
|
58571
58611
|
}
|
|
58572
58612
|
else
|
|
58573
58613
|
{
|
|
58574
58614
|
this.Canvas.fillStyle=this.TitleColor;
|
|
58575
|
-
this.Canvas.fillText(this.Title,left,bottom
|
|
58615
|
+
this.Canvas.fillText(this.Title,left,bottom);
|
|
58576
58616
|
left+=textWidth;
|
|
58577
58617
|
left+=this.TitleSpace;
|
|
58578
58618
|
}
|
|
@@ -58685,11 +58725,17 @@ function DynamicChartTitlePainting()
|
|
|
58685
58725
|
{
|
|
58686
58726
|
var pixelRatio=GetDevicePixelRatio();
|
|
58687
58727
|
var title=this.Title;
|
|
58688
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
58689
58728
|
var textWidth=this.Canvas.measureText(title).width;
|
|
58729
|
+
var arrowWidth=0;
|
|
58730
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58731
|
+
{
|
|
58732
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
58733
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
58734
|
+
}
|
|
58735
|
+
|
|
58690
58736
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
58691
58737
|
var roundRadius=this.BorderRoundRadius*pixelRatio;
|
|
58692
|
-
var bgWidth=textWidth+4*pixelRatio+roundRadius*2;
|
|
58738
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio+roundRadius*2;
|
|
58693
58739
|
|
|
58694
58740
|
rtButton.Top=rtButton.YCenter-bgHeight/2-1,
|
|
58695
58741
|
rtButton.Width=bgWidth;
|
|
@@ -58735,8 +58781,16 @@ function DynamicChartTitlePainting()
|
|
|
58735
58781
|
}
|
|
58736
58782
|
}
|
|
58737
58783
|
|
|
58784
|
+
var xText=rtButton.Left+roundRadius+2*pixelRatio;
|
|
58738
58785
|
this.Canvas.fillStyle=this.TitleColor;
|
|
58739
|
-
this.Canvas.fillText(title,
|
|
58786
|
+
this.Canvas.fillText(title,xText,rtButton.YCenter);
|
|
58787
|
+
xText+=textWidth;
|
|
58788
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58789
|
+
{
|
|
58790
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
58791
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
58792
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,rtButton.YCenter);
|
|
58793
|
+
}
|
|
58740
58794
|
}
|
|
58741
58795
|
|
|
58742
58796
|
//绘制按钮
|
|
@@ -70759,7 +70813,11 @@ function JSChartResource()
|
|
|
70759
70813
|
UpColor:"rgb(238,21,21)", //上涨
|
|
70760
70814
|
DownColor:"rgb(25,158,0)", //下跌
|
|
70761
70815
|
UnchangeColor:"rgb(0,0,0)" //不变
|
|
70762
|
-
}
|
|
70816
|
+
},
|
|
70817
|
+
|
|
70818
|
+
ArrowType:0,
|
|
70819
|
+
|
|
70820
|
+
NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
|
|
70763
70821
|
}
|
|
70764
70822
|
|
|
70765
70823
|
this.Title={
|
|
@@ -72057,6 +72115,16 @@ function JSChartResource()
|
|
|
72057
72115
|
if (subItem.DownColor) this.IndexTitle.UpDownArrow.DownColor = subItem.DownColor;
|
|
72058
72116
|
if (subItem.UnchangeColor) this.IndexTitle.UpDownArrow.UnchangeColor = subItem.UnchangeColor;
|
|
72059
72117
|
}
|
|
72118
|
+
|
|
72119
|
+
if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
|
|
72120
|
+
|
|
72121
|
+
if (item.NameArrow)
|
|
72122
|
+
{
|
|
72123
|
+
var subItem=item.NameArrow;
|
|
72124
|
+
if (subItem.Color) this.IndexTitle.NameArrow.Color = subItem.Color;
|
|
72125
|
+
if (subItem.Symbol) this.IndexTitle.NameArrow.Symbol = subItem.Symbol;
|
|
72126
|
+
if (IFrameSplitOperator.IsNumber(subItem.Space)) this.IndexTitle.NameArrow.Space = subItem.Space;
|
|
72127
|
+
}
|
|
72060
72128
|
}
|
|
72061
72129
|
|
|
72062
72130
|
if (style.Frame)
|
|
@@ -78028,7 +78096,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
78028
78096
|
|
|
78029
78097
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
78030
78098
|
else item.TitleHeight=this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight;
|
|
78031
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
78099
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
78100
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) subFrame.Frame.TitleArrowType=item.TitleArrowType;
|
|
78032
78101
|
if (item.IsShowIndexName==false) this.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
78033
78102
|
if (item.IsShowOverlayIndexName==false) this.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
78034
78103
|
if (IFrameSplitOperator.IsNumber(item.IndexParamSpace)) this.Frame.SubFrame[i].Frame.IndexParamSpace=item.IndexParamSpace;
|
|
@@ -123798,7 +123867,9 @@ function GetBlackStyle()
|
|
|
123798
123867
|
UpColor:"rgb(238,21,21)", //上涨
|
|
123799
123868
|
DownColor:"rgb(25,158,0)", //下跌
|
|
123800
123869
|
UnchangeColor:"rgb(190, 190 ,190)" //不变
|
|
123801
|
-
}
|
|
123870
|
+
},
|
|
123871
|
+
|
|
123872
|
+
NameArrow:{ Color:"rgb(190, 190 ,190)", Space:2, Symbol:'▼' },
|
|
123802
123873
|
},
|
|
123803
123874
|
|
|
123804
123875
|
Title:
|
|
@@ -141054,7 +141125,7 @@ function HQChartScriptWorker()
|
|
|
141054
141125
|
|
|
141055
141126
|
|
|
141056
141127
|
|
|
141057
|
-
var HQCHART_VERSION="1.1.
|
|
141128
|
+
var HQCHART_VERSION="1.1.13613";
|
|
141058
141129
|
|
|
141059
141130
|
function PrintHQChartVersion()
|
|
141060
141131
|
{
|