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
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -692,7 +692,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
692
692
|
|
|
693
693
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
694
694
|
else item.TitleHeight=chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight;
|
|
695
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
695
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
696
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) frame.TitleArrowType=item.TitleArrowType;
|
|
696
697
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
697
698
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
698
699
|
if (IFrameSplitOperator.IsNumber(item.IndexParamSpace)) chart.Frame.SubFrame[i].Frame.IndexParamSpace=item.IndexParamSpace;
|
|
@@ -1161,7 +1162,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1161
1162
|
if (IFrameSplitOperator.IsBool(item.IsDrawTitleBG)) chart.Frame.SubFrame[index].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
1162
1163
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[index].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
1163
1164
|
|
|
1164
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
1165
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
1166
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) frame.TitleArrowType=item.TitleArrowType;
|
|
1165
1167
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[index].Frame.IsShowIndexName=false;
|
|
1166
1168
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[index].Frame.IsShowOverlayIndexName=false;
|
|
1167
1169
|
if (!IFrameSplitOperator.IsUndefined(item.HorizontalReserved)) frame.HorizontalReserved=item.HorizontalReserved;
|
|
@@ -1572,7 +1574,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1572
1574
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
1573
1575
|
|
|
1574
1576
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
1575
|
-
|
|
1576
1577
|
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) chart.Frame.SubFrame[i].Frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
1577
1578
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
1578
1579
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
@@ -8396,6 +8397,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8396
8397
|
else windowItem.TitleHeight=frame.ChartBorder.TitleHeight;
|
|
8397
8398
|
|
|
8398
8399
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowTitleArrow)) frame.IsShowTitleArrow=windowItem.IsShowTitleArrow;
|
|
8400
|
+
if (IFrameSplitOperator.IsNumber(windowItem.TitleArrowType)) frame.TitleArrowType=windowItem.TitleArrowType;
|
|
8399
8401
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowIndexName)) frame.IsShowIndexName=windowItem.IsShowIndexName;
|
|
8400
8402
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
|
|
8401
8403
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
|
|
@@ -8458,6 +8460,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8458
8460
|
if (IFrameSplitOperator.IsNumber(option.SplitCount)) subFrame.Frame.YSplitOperator.SplitCount=option.SplitCount;
|
|
8459
8461
|
if (IFrameSplitOperator.IsNumber(option.TitleHeight)) subFrame.Frame.ChartBorder.TitleHeight=option.TitleHeight;
|
|
8460
8462
|
if (IFrameSplitOperator.IsBool(option.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=option.IsShowTitleArrow;
|
|
8463
|
+
if (IFrameSplitOperator.IsNumber(option.TitleArrowType)) subFrame.Frame.TitleArrowType=option.TitleArrowType;
|
|
8461
8464
|
if (IFrameSplitOperator.IsBool(option.IsShowIndexName)) subFrame.Frame.IsShowIndexName=option.IsShowIndexName;
|
|
8462
8465
|
if (IFrameSplitOperator.IsBool(option.IsShowOverlayIndexName)) subFrame.Frame.IsShowOverlayIndexName=option.IsShowOverlayIndexName;
|
|
8463
8466
|
if (IFrameSplitOperator.IsNumber(option.IndexParamSpace)) subFrame.Frame.IndexParamSpace=option.IndexParamSpace;
|
|
@@ -10298,6 +10301,7 @@ function IChartFramePainting()
|
|
|
10298
10301
|
this.YSpecificMaxMin=null; //指定Y轴最大最小值
|
|
10299
10302
|
this.IsShowBorder = true; //是否显示边框
|
|
10300
10303
|
this.IsShowTitleArrow=true; //是否显示指标信息上涨下跌箭头
|
|
10304
|
+
this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
|
|
10301
10305
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
10302
10306
|
this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
|
|
10303
10307
|
//this.OverlayIndexType= { Position:0, LineSpace:5 };
|
|
@@ -46430,6 +46434,22 @@ IFrameSplitOperator.IsNumber=function(value)
|
|
|
46430
46434
|
return typeof(value)=='number';
|
|
46431
46435
|
}
|
|
46432
46436
|
|
|
46437
|
+
//批量判断是否是数值类型
|
|
46438
|
+
IFrameSplitOperator.IsNumberV2=function(...aryValue)
|
|
46439
|
+
{
|
|
46440
|
+
if (!aryValue) return false;
|
|
46441
|
+
if (aryValue.length==0) return false;
|
|
46442
|
+
|
|
46443
|
+
for(const value of aryValue)
|
|
46444
|
+
{
|
|
46445
|
+
if (value==null) return false;
|
|
46446
|
+
if (isNaN(value)) return false;
|
|
46447
|
+
if (typeof(value)!='number') return false;
|
|
46448
|
+
}
|
|
46449
|
+
|
|
46450
|
+
return true;
|
|
46451
|
+
}
|
|
46452
|
+
|
|
46433
46453
|
//判断是否是正数
|
|
46434
46454
|
IFrameSplitOperator.IsPlusNumber=function(value)
|
|
46435
46455
|
{
|
|
@@ -53310,9 +53330,11 @@ function DynamicChartTitlePainting()
|
|
|
53310
53330
|
this.ColorIndex; //五彩K线名字 {Name:'名字'}
|
|
53311
53331
|
this.IsShowColorIndexTitle=true;
|
|
53312
53332
|
this.IsShowUpDownArrow=true; //指标数据是否显示 上涨下跌箭头
|
|
53333
|
+
this.TitleArrowType=0; //指标数据上涨下跌箭头类型 0=独立颜色 1=跟指标颜色一致
|
|
53313
53334
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
53314
53335
|
this.IsShowIndexTitle=true; //是否显示指标标题信息
|
|
53315
53336
|
this.IsShowNameArrow=false;
|
|
53337
|
+
this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
|
|
53316
53338
|
|
|
53317
53339
|
this.TradeIndex; //专家系统名字{Name:'名字', Param:'参数'}
|
|
53318
53340
|
this.IsShowTradeIndexTitle=true;
|
|
@@ -53781,6 +53803,7 @@ function DynamicChartTitlePainting()
|
|
|
53781
53803
|
this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;
|
|
53782
53804
|
this.IsShowNameArrow=this.Frame.IsShowNameArrow;
|
|
53783
53805
|
this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;
|
|
53806
|
+
this.TitleArrowType=this.Frame.TitleArrowType;
|
|
53784
53807
|
this.IsShowIndexName=this.Frame.IsShowIndexName;
|
|
53785
53808
|
this.IsShowOverlayIndexName=this.Frame.IsShowOverlayIndexName;
|
|
53786
53809
|
this.OverlayIndexType.Position=this.Frame.OverlayIndexType.Position;
|
|
@@ -54065,6 +54088,8 @@ function DynamicChartTitlePainting()
|
|
|
54065
54088
|
if (preValue>value) arrowSuper={ Text:'↓', TextColor:this.UpDownArrowConfig.DownColor };
|
|
54066
54089
|
else if (preValue<value) arrowSuper={ Text:'↑', TextColor:this.UpDownArrowConfig.UpColor};
|
|
54067
54090
|
else arrowSuper={ Text:'→', TextColor:this.UpDownArrowConfig.UnchangeColor };
|
|
54091
|
+
|
|
54092
|
+
if (this.TitleArrowType==1) arrowSuper.TextColor=item.Color;
|
|
54068
54093
|
}
|
|
54069
54094
|
}
|
|
54070
54095
|
|
|
@@ -54572,10 +54597,16 @@ function DynamicChartTitlePainting()
|
|
|
54572
54597
|
if (this.IsDrawTitleBG)
|
|
54573
54598
|
{
|
|
54574
54599
|
var title=this.Title;
|
|
54575
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
54576
54600
|
var textWidth=this.Canvas.measureText(title).width;
|
|
54601
|
+
var arrowWidth=0;
|
|
54602
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54603
|
+
{
|
|
54604
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
54605
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
54606
|
+
}
|
|
54607
|
+
|
|
54577
54608
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
54578
|
-
var bgWidth=textWidth+4*pixelRatio;
|
|
54609
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio;
|
|
54579
54610
|
|
|
54580
54611
|
this.TitleRect=
|
|
54581
54612
|
{
|
|
@@ -54595,15 +54626,24 @@ function DynamicChartTitlePainting()
|
|
|
54595
54626
|
this.Canvas.strokeRect(ToFixedPoint(drawRect.Left),ToFixedPoint(drawRect.Top),ToFixedRect(drawRect.Width),ToFixedRect(drawRect.Height));
|
|
54596
54627
|
}
|
|
54597
54628
|
|
|
54629
|
+
var xText=left+2*pixelRatio;
|
|
54598
54630
|
this.Canvas.fillStyle=this.TitleColor;
|
|
54599
|
-
this.Canvas.fillText(title,
|
|
54631
|
+
this.Canvas.fillText(title,xText,bottom);
|
|
54632
|
+
xText+=textWidth;
|
|
54633
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54634
|
+
{
|
|
54635
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
54636
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
54637
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,bottom);
|
|
54638
|
+
}
|
|
54639
|
+
|
|
54600
54640
|
left+=bgWidth+2*pixelRatio;
|
|
54601
54641
|
left+=this.TitleSpace;
|
|
54602
54642
|
}
|
|
54603
54643
|
else
|
|
54604
54644
|
{
|
|
54605
54645
|
this.Canvas.fillStyle=this.TitleColor;
|
|
54606
|
-
this.Canvas.fillText(this.Title,left,bottom
|
|
54646
|
+
this.Canvas.fillText(this.Title,left,bottom);
|
|
54607
54647
|
left+=textWidth;
|
|
54608
54648
|
left+=this.TitleSpace;
|
|
54609
54649
|
}
|
|
@@ -54716,11 +54756,17 @@ function DynamicChartTitlePainting()
|
|
|
54716
54756
|
{
|
|
54717
54757
|
var pixelRatio=GetDevicePixelRatio();
|
|
54718
54758
|
var title=this.Title;
|
|
54719
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
54720
54759
|
var textWidth=this.Canvas.measureText(title).width;
|
|
54760
|
+
var arrowWidth=0;
|
|
54761
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54762
|
+
{
|
|
54763
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
54764
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
54765
|
+
}
|
|
54766
|
+
|
|
54721
54767
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
54722
54768
|
var roundRadius=this.BorderRoundRadius*pixelRatio;
|
|
54723
|
-
var bgWidth=textWidth+4*pixelRatio+roundRadius*2;
|
|
54769
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio+roundRadius*2;
|
|
54724
54770
|
|
|
54725
54771
|
rtButton.Top=rtButton.YCenter-bgHeight/2-1,
|
|
54726
54772
|
rtButton.Width=bgWidth;
|
|
@@ -54766,8 +54812,16 @@ function DynamicChartTitlePainting()
|
|
|
54766
54812
|
}
|
|
54767
54813
|
}
|
|
54768
54814
|
|
|
54815
|
+
var xText=rtButton.Left+roundRadius+2*pixelRatio;
|
|
54769
54816
|
this.Canvas.fillStyle=this.TitleColor;
|
|
54770
|
-
this.Canvas.fillText(title,
|
|
54817
|
+
this.Canvas.fillText(title,xText,rtButton.YCenter);
|
|
54818
|
+
xText+=textWidth;
|
|
54819
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54820
|
+
{
|
|
54821
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
54822
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
54823
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,rtButton.YCenter);
|
|
54824
|
+
}
|
|
54771
54825
|
}
|
|
54772
54826
|
|
|
54773
54827
|
//绘制按钮
|
|
@@ -66790,7 +66844,11 @@ function JSChartResource()
|
|
|
66790
66844
|
UpColor:"rgb(238,21,21)", //上涨
|
|
66791
66845
|
DownColor:"rgb(25,158,0)", //下跌
|
|
66792
66846
|
UnchangeColor:"rgb(0,0,0)" //不变
|
|
66793
|
-
}
|
|
66847
|
+
},
|
|
66848
|
+
|
|
66849
|
+
ArrowType:0,
|
|
66850
|
+
|
|
66851
|
+
NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
|
|
66794
66852
|
}
|
|
66795
66853
|
|
|
66796
66854
|
this.Title={
|
|
@@ -68088,6 +68146,16 @@ function JSChartResource()
|
|
|
68088
68146
|
if (subItem.DownColor) this.IndexTitle.UpDownArrow.DownColor = subItem.DownColor;
|
|
68089
68147
|
if (subItem.UnchangeColor) this.IndexTitle.UpDownArrow.UnchangeColor = subItem.UnchangeColor;
|
|
68090
68148
|
}
|
|
68149
|
+
|
|
68150
|
+
if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
|
|
68151
|
+
|
|
68152
|
+
if (item.NameArrow)
|
|
68153
|
+
{
|
|
68154
|
+
var subItem=item.NameArrow;
|
|
68155
|
+
if (subItem.Color) this.IndexTitle.NameArrow.Color = subItem.Color;
|
|
68156
|
+
if (subItem.Symbol) this.IndexTitle.NameArrow.Symbol = subItem.Symbol;
|
|
68157
|
+
if (IFrameSplitOperator.IsNumber(subItem.Space)) this.IndexTitle.NameArrow.Space = subItem.Space;
|
|
68158
|
+
}
|
|
68091
68159
|
}
|
|
68092
68160
|
|
|
68093
68161
|
if (style.Frame)
|
|
@@ -74059,7 +74127,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
74059
74127
|
|
|
74060
74128
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
74061
74129
|
else item.TitleHeight=this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight;
|
|
74062
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
74130
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
74131
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) subFrame.Frame.TitleArrowType=item.TitleArrowType;
|
|
74063
74132
|
if (item.IsShowIndexName==false) this.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
74064
74133
|
if (item.IsShowOverlayIndexName==false) this.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
74065
74134
|
if (IFrameSplitOperator.IsNumber(item.IndexParamSpace)) this.Frame.SubFrame[i].Frame.IndexParamSpace=item.IndexParamSpace;
|
|
@@ -4617,7 +4617,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4617
4617
|
|
|
4618
4618
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
4619
4619
|
else item.TitleHeight=chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight;
|
|
4620
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
4620
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
4621
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) frame.TitleArrowType=item.TitleArrowType;
|
|
4621
4622
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
4622
4623
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
4623
4624
|
if (IFrameSplitOperator.IsNumber(item.IndexParamSpace)) chart.Frame.SubFrame[i].Frame.IndexParamSpace=item.IndexParamSpace;
|
|
@@ -5086,7 +5087,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5086
5087
|
if (IFrameSplitOperator.IsBool(item.IsDrawTitleBG)) chart.Frame.SubFrame[index].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
5087
5088
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[index].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
5088
5089
|
|
|
5089
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
5090
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
5091
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) frame.TitleArrowType=item.TitleArrowType;
|
|
5090
5092
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[index].Frame.IsShowIndexName=false;
|
|
5091
5093
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[index].Frame.IsShowOverlayIndexName=false;
|
|
5092
5094
|
if (!IFrameSplitOperator.IsUndefined(item.HorizontalReserved)) frame.HorizontalReserved=item.HorizontalReserved;
|
|
@@ -5497,7 +5499,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5497
5499
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
5498
5500
|
|
|
5499
5501
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) chart.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
5500
|
-
|
|
5501
5502
|
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) chart.Frame.SubFrame[i].Frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
5502
5503
|
if (item.IsShowIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
5503
5504
|
if (item.IsShowOverlayIndexName==false) chart.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
@@ -12321,6 +12322,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12321
12322
|
else windowItem.TitleHeight=frame.ChartBorder.TitleHeight;
|
|
12322
12323
|
|
|
12323
12324
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowTitleArrow)) frame.IsShowTitleArrow=windowItem.IsShowTitleArrow;
|
|
12325
|
+
if (IFrameSplitOperator.IsNumber(windowItem.TitleArrowType)) frame.TitleArrowType=windowItem.TitleArrowType;
|
|
12324
12326
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowIndexName)) frame.IsShowIndexName=windowItem.IsShowIndexName;
|
|
12325
12327
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
|
|
12326
12328
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
|
|
@@ -12383,6 +12385,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12383
12385
|
if (IFrameSplitOperator.IsNumber(option.SplitCount)) subFrame.Frame.YSplitOperator.SplitCount=option.SplitCount;
|
|
12384
12386
|
if (IFrameSplitOperator.IsNumber(option.TitleHeight)) subFrame.Frame.ChartBorder.TitleHeight=option.TitleHeight;
|
|
12385
12387
|
if (IFrameSplitOperator.IsBool(option.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=option.IsShowTitleArrow;
|
|
12388
|
+
if (IFrameSplitOperator.IsNumber(option.TitleArrowType)) subFrame.Frame.TitleArrowType=option.TitleArrowType;
|
|
12386
12389
|
if (IFrameSplitOperator.IsBool(option.IsShowIndexName)) subFrame.Frame.IsShowIndexName=option.IsShowIndexName;
|
|
12387
12390
|
if (IFrameSplitOperator.IsBool(option.IsShowOverlayIndexName)) subFrame.Frame.IsShowOverlayIndexName=option.IsShowOverlayIndexName;
|
|
12388
12391
|
if (IFrameSplitOperator.IsNumber(option.IndexParamSpace)) subFrame.Frame.IndexParamSpace=option.IndexParamSpace;
|
|
@@ -14223,6 +14226,7 @@ function IChartFramePainting()
|
|
|
14223
14226
|
this.YSpecificMaxMin=null; //指定Y轴最大最小值
|
|
14224
14227
|
this.IsShowBorder = true; //是否显示边框
|
|
14225
14228
|
this.IsShowTitleArrow=true; //是否显示指标信息上涨下跌箭头
|
|
14229
|
+
this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
|
|
14226
14230
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
14227
14231
|
this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
|
|
14228
14232
|
//this.OverlayIndexType= { Position:0, LineSpace:5 };
|
|
@@ -50355,6 +50359,22 @@ IFrameSplitOperator.IsNumber=function(value)
|
|
|
50355
50359
|
return typeof(value)=='number';
|
|
50356
50360
|
}
|
|
50357
50361
|
|
|
50362
|
+
//批量判断是否是数值类型
|
|
50363
|
+
IFrameSplitOperator.IsNumberV2=function(...aryValue)
|
|
50364
|
+
{
|
|
50365
|
+
if (!aryValue) return false;
|
|
50366
|
+
if (aryValue.length==0) return false;
|
|
50367
|
+
|
|
50368
|
+
for(const value of aryValue)
|
|
50369
|
+
{
|
|
50370
|
+
if (value==null) return false;
|
|
50371
|
+
if (isNaN(value)) return false;
|
|
50372
|
+
if (typeof(value)!='number') return false;
|
|
50373
|
+
}
|
|
50374
|
+
|
|
50375
|
+
return true;
|
|
50376
|
+
}
|
|
50377
|
+
|
|
50358
50378
|
//判断是否是正数
|
|
50359
50379
|
IFrameSplitOperator.IsPlusNumber=function(value)
|
|
50360
50380
|
{
|
|
@@ -57235,9 +57255,11 @@ function DynamicChartTitlePainting()
|
|
|
57235
57255
|
this.ColorIndex; //五彩K线名字 {Name:'名字'}
|
|
57236
57256
|
this.IsShowColorIndexTitle=true;
|
|
57237
57257
|
this.IsShowUpDownArrow=true; //指标数据是否显示 上涨下跌箭头
|
|
57258
|
+
this.TitleArrowType=0; //指标数据上涨下跌箭头类型 0=独立颜色 1=跟指标颜色一致
|
|
57238
57259
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
57239
57260
|
this.IsShowIndexTitle=true; //是否显示指标标题信息
|
|
57240
57261
|
this.IsShowNameArrow=false;
|
|
57262
|
+
this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
|
|
57241
57263
|
|
|
57242
57264
|
this.TradeIndex; //专家系统名字{Name:'名字', Param:'参数'}
|
|
57243
57265
|
this.IsShowTradeIndexTitle=true;
|
|
@@ -57706,6 +57728,7 @@ function DynamicChartTitlePainting()
|
|
|
57706
57728
|
this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;
|
|
57707
57729
|
this.IsShowNameArrow=this.Frame.IsShowNameArrow;
|
|
57708
57730
|
this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;
|
|
57731
|
+
this.TitleArrowType=this.Frame.TitleArrowType;
|
|
57709
57732
|
this.IsShowIndexName=this.Frame.IsShowIndexName;
|
|
57710
57733
|
this.IsShowOverlayIndexName=this.Frame.IsShowOverlayIndexName;
|
|
57711
57734
|
this.OverlayIndexType.Position=this.Frame.OverlayIndexType.Position;
|
|
@@ -57990,6 +58013,8 @@ function DynamicChartTitlePainting()
|
|
|
57990
58013
|
if (preValue>value) arrowSuper={ Text:'↓', TextColor:this.UpDownArrowConfig.DownColor };
|
|
57991
58014
|
else if (preValue<value) arrowSuper={ Text:'↑', TextColor:this.UpDownArrowConfig.UpColor};
|
|
57992
58015
|
else arrowSuper={ Text:'→', TextColor:this.UpDownArrowConfig.UnchangeColor };
|
|
58016
|
+
|
|
58017
|
+
if (this.TitleArrowType==1) arrowSuper.TextColor=item.Color;
|
|
57993
58018
|
}
|
|
57994
58019
|
}
|
|
57995
58020
|
|
|
@@ -58497,10 +58522,16 @@ function DynamicChartTitlePainting()
|
|
|
58497
58522
|
if (this.IsDrawTitleBG)
|
|
58498
58523
|
{
|
|
58499
58524
|
var title=this.Title;
|
|
58500
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
58501
58525
|
var textWidth=this.Canvas.measureText(title).width;
|
|
58526
|
+
var arrowWidth=0;
|
|
58527
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58528
|
+
{
|
|
58529
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
58530
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
58531
|
+
}
|
|
58532
|
+
|
|
58502
58533
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
58503
|
-
var bgWidth=textWidth+4*pixelRatio;
|
|
58534
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio;
|
|
58504
58535
|
|
|
58505
58536
|
this.TitleRect=
|
|
58506
58537
|
{
|
|
@@ -58520,15 +58551,24 @@ function DynamicChartTitlePainting()
|
|
|
58520
58551
|
this.Canvas.strokeRect(ToFixedPoint(drawRect.Left),ToFixedPoint(drawRect.Top),ToFixedRect(drawRect.Width),ToFixedRect(drawRect.Height));
|
|
58521
58552
|
}
|
|
58522
58553
|
|
|
58554
|
+
var xText=left+2*pixelRatio;
|
|
58523
58555
|
this.Canvas.fillStyle=this.TitleColor;
|
|
58524
|
-
this.Canvas.fillText(title,
|
|
58556
|
+
this.Canvas.fillText(title,xText,bottom);
|
|
58557
|
+
xText+=textWidth;
|
|
58558
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58559
|
+
{
|
|
58560
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
58561
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
58562
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,bottom);
|
|
58563
|
+
}
|
|
58564
|
+
|
|
58525
58565
|
left+=bgWidth+2*pixelRatio;
|
|
58526
58566
|
left+=this.TitleSpace;
|
|
58527
58567
|
}
|
|
58528
58568
|
else
|
|
58529
58569
|
{
|
|
58530
58570
|
this.Canvas.fillStyle=this.TitleColor;
|
|
58531
|
-
this.Canvas.fillText(this.Title,left,bottom
|
|
58571
|
+
this.Canvas.fillText(this.Title,left,bottom);
|
|
58532
58572
|
left+=textWidth;
|
|
58533
58573
|
left+=this.TitleSpace;
|
|
58534
58574
|
}
|
|
@@ -58641,11 +58681,17 @@ function DynamicChartTitlePainting()
|
|
|
58641
58681
|
{
|
|
58642
58682
|
var pixelRatio=GetDevicePixelRatio();
|
|
58643
58683
|
var title=this.Title;
|
|
58644
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
58645
58684
|
var textWidth=this.Canvas.measureText(title).width;
|
|
58685
|
+
var arrowWidth=0;
|
|
58686
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58687
|
+
{
|
|
58688
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
58689
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
58690
|
+
}
|
|
58691
|
+
|
|
58646
58692
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
58647
58693
|
var roundRadius=this.BorderRoundRadius*pixelRatio;
|
|
58648
|
-
var bgWidth=textWidth+4*pixelRatio+roundRadius*2;
|
|
58694
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio+roundRadius*2;
|
|
58649
58695
|
|
|
58650
58696
|
rtButton.Top=rtButton.YCenter-bgHeight/2-1,
|
|
58651
58697
|
rtButton.Width=bgWidth;
|
|
@@ -58691,8 +58737,16 @@ function DynamicChartTitlePainting()
|
|
|
58691
58737
|
}
|
|
58692
58738
|
}
|
|
58693
58739
|
|
|
58740
|
+
var xText=rtButton.Left+roundRadius+2*pixelRatio;
|
|
58694
58741
|
this.Canvas.fillStyle=this.TitleColor;
|
|
58695
|
-
this.Canvas.fillText(title,
|
|
58742
|
+
this.Canvas.fillText(title,xText,rtButton.YCenter);
|
|
58743
|
+
xText+=textWidth;
|
|
58744
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
58745
|
+
{
|
|
58746
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
58747
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
58748
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,rtButton.YCenter);
|
|
58749
|
+
}
|
|
58696
58750
|
}
|
|
58697
58751
|
|
|
58698
58752
|
//绘制按钮
|
|
@@ -70715,7 +70769,11 @@ function JSChartResource()
|
|
|
70715
70769
|
UpColor:"rgb(238,21,21)", //上涨
|
|
70716
70770
|
DownColor:"rgb(25,158,0)", //下跌
|
|
70717
70771
|
UnchangeColor:"rgb(0,0,0)" //不变
|
|
70718
|
-
}
|
|
70772
|
+
},
|
|
70773
|
+
|
|
70774
|
+
ArrowType:0,
|
|
70775
|
+
|
|
70776
|
+
NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
|
|
70719
70777
|
}
|
|
70720
70778
|
|
|
70721
70779
|
this.Title={
|
|
@@ -72013,6 +72071,16 @@ function JSChartResource()
|
|
|
72013
72071
|
if (subItem.DownColor) this.IndexTitle.UpDownArrow.DownColor = subItem.DownColor;
|
|
72014
72072
|
if (subItem.UnchangeColor) this.IndexTitle.UpDownArrow.UnchangeColor = subItem.UnchangeColor;
|
|
72015
72073
|
}
|
|
72074
|
+
|
|
72075
|
+
if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
|
|
72076
|
+
|
|
72077
|
+
if (item.NameArrow)
|
|
72078
|
+
{
|
|
72079
|
+
var subItem=item.NameArrow;
|
|
72080
|
+
if (subItem.Color) this.IndexTitle.NameArrow.Color = subItem.Color;
|
|
72081
|
+
if (subItem.Symbol) this.IndexTitle.NameArrow.Symbol = subItem.Symbol;
|
|
72082
|
+
if (IFrameSplitOperator.IsNumber(subItem.Space)) this.IndexTitle.NameArrow.Space = subItem.Space;
|
|
72083
|
+
}
|
|
72016
72084
|
}
|
|
72017
72085
|
|
|
72018
72086
|
if (style.Frame)
|
|
@@ -77984,7 +78052,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77984
78052
|
|
|
77985
78053
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
77986
78054
|
else item.TitleHeight=this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight;
|
|
77987
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
78055
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
78056
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) subFrame.Frame.TitleArrowType=item.TitleArrowType;
|
|
77988
78057
|
if (item.IsShowIndexName==false) this.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
77989
78058
|
if (item.IsShowOverlayIndexName==false) this.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
77990
78059
|
if (IFrameSplitOperator.IsNumber(item.IndexParamSpace)) this.Frame.SubFrame[i].Frame.IndexParamSpace=item.IndexParamSpace;
|
|
@@ -123754,7 +123823,9 @@ function GetBlackStyle()
|
|
|
123754
123823
|
UpColor:"rgb(238,21,21)", //上涨
|
|
123755
123824
|
DownColor:"rgb(25,158,0)", //下跌
|
|
123756
123825
|
UnchangeColor:"rgb(190, 190 ,190)" //不变
|
|
123757
|
-
}
|
|
123826
|
+
},
|
|
123827
|
+
|
|
123828
|
+
NameArrow:{ Color:"rgb(190, 190 ,190)", Space:2, Symbol:'▼' },
|
|
123758
123829
|
},
|
|
123759
123830
|
|
|
123760
123831
|
Title:
|
|
@@ -137096,7 +137167,7 @@ function ScrollBarBGChart()
|
|
|
137096
137167
|
|
|
137097
137168
|
|
|
137098
137169
|
|
|
137099
|
-
var HQCHART_VERSION="1.1.
|
|
137170
|
+
var HQCHART_VERSION="1.1.13613";
|
|
137100
137171
|
|
|
137101
137172
|
function PrintHQChartVersion()
|
|
137102
137173
|
{
|