hqchart 1.1.13606 → 1.1.13623
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 +87 -82
- package/package.json +1 -1
- package/src/jscommon/umychart.js +176 -93
- package/src/jscommon/umychart.style.js +3 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +180 -95
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +180 -95
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;
|
|
@@ -2612,6 +2613,7 @@ var JSCHART_EVENT_ID=
|
|
|
2612
2613
|
ON_FORMAT_CALL_AUCTION_INDEX_TITLE:153, //集合竞价指标窗口标题内容
|
|
2613
2614
|
|
|
2614
2615
|
ON_FORMAT_KLINE_HIGH_LOW_TITLE:154, //K线最高最低价格式化内容
|
|
2616
|
+
ON_CUSTOM_CORSSCURSOR_POSITION:155, //自定义十字光标X轴的输出的位置
|
|
2615
2617
|
}
|
|
2616
2618
|
|
|
2617
2619
|
var JSCHART_OPERATOR_ID=
|
|
@@ -8396,6 +8398,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8396
8398
|
else windowItem.TitleHeight=frame.ChartBorder.TitleHeight;
|
|
8397
8399
|
|
|
8398
8400
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowTitleArrow)) frame.IsShowTitleArrow=windowItem.IsShowTitleArrow;
|
|
8401
|
+
if (IFrameSplitOperator.IsNumber(windowItem.TitleArrowType)) frame.TitleArrowType=windowItem.TitleArrowType;
|
|
8399
8402
|
if (IFrameSplitOperator.IsBool(windowItem.IsShowIndexName)) frame.IsShowIndexName=windowItem.IsShowIndexName;
|
|
8400
8403
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexParamSpace)) frame.IndexParamSpace=windowItem.IndexParamSpace;
|
|
8401
8404
|
if (IFrameSplitOperator.IsNumber(windowItem.IndexTitleSpace)) frame.IndexTitleSpace=windowItem.IndexTitleSpace;
|
|
@@ -8458,6 +8461,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8458
8461
|
if (IFrameSplitOperator.IsNumber(option.SplitCount)) subFrame.Frame.YSplitOperator.SplitCount=option.SplitCount;
|
|
8459
8462
|
if (IFrameSplitOperator.IsNumber(option.TitleHeight)) subFrame.Frame.ChartBorder.TitleHeight=option.TitleHeight;
|
|
8460
8463
|
if (IFrameSplitOperator.IsBool(option.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=option.IsShowTitleArrow;
|
|
8464
|
+
if (IFrameSplitOperator.IsNumber(option.TitleArrowType)) subFrame.Frame.TitleArrowType=option.TitleArrowType;
|
|
8461
8465
|
if (IFrameSplitOperator.IsBool(option.IsShowIndexName)) subFrame.Frame.IsShowIndexName=option.IsShowIndexName;
|
|
8462
8466
|
if (IFrameSplitOperator.IsBool(option.IsShowOverlayIndexName)) subFrame.Frame.IsShowOverlayIndexName=option.IsShowOverlayIndexName;
|
|
8463
8467
|
if (IFrameSplitOperator.IsNumber(option.IndexParamSpace)) subFrame.Frame.IndexParamSpace=option.IndexParamSpace;
|
|
@@ -10297,7 +10301,8 @@ function IChartFramePainting()
|
|
|
10297
10301
|
|
|
10298
10302
|
this.YSpecificMaxMin=null; //指定Y轴最大最小值
|
|
10299
10303
|
this.IsShowBorder = true; //是否显示边框
|
|
10300
|
-
this.IsShowTitleArrow=
|
|
10304
|
+
this.IsShowTitleArrow=g_JSChartResource.IndexTitle.EnableIndexArrow; //是否显示指标信息上涨下跌箭头
|
|
10305
|
+
this.TitleArrowType=g_JSChartResource.IndexTitle.ArrowType; //指标信息上涨下跌箭头类型 0=独立颜色 1=跟指标名字颜色一致
|
|
10301
10306
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
10302
10307
|
this.IsShowOverlayIndexName=true; //是否显示叠加指标名字
|
|
10303
10308
|
//this.OverlayIndexType= { Position:0, LineSpace:5 };
|
|
@@ -46430,6 +46435,22 @@ IFrameSplitOperator.IsNumber=function(value)
|
|
|
46430
46435
|
return typeof(value)=='number';
|
|
46431
46436
|
}
|
|
46432
46437
|
|
|
46438
|
+
//批量判断是否是数值类型
|
|
46439
|
+
IFrameSplitOperator.IsNumberV2=function(...aryValue)
|
|
46440
|
+
{
|
|
46441
|
+
if (!aryValue) return false;
|
|
46442
|
+
if (aryValue.length==0) return false;
|
|
46443
|
+
|
|
46444
|
+
for(const value of aryValue)
|
|
46445
|
+
{
|
|
46446
|
+
if (value==null) return false;
|
|
46447
|
+
if (isNaN(value)) return false;
|
|
46448
|
+
if (typeof(value)!='number') return false;
|
|
46449
|
+
}
|
|
46450
|
+
|
|
46451
|
+
return true;
|
|
46452
|
+
}
|
|
46453
|
+
|
|
46433
46454
|
//判断是否是正数
|
|
46434
46455
|
IFrameSplitOperator.IsPlusNumber=function(value)
|
|
46435
46456
|
{
|
|
@@ -49720,8 +49741,8 @@ function ChartCorssCursor()
|
|
|
49720
49741
|
}
|
|
49721
49742
|
}
|
|
49722
49743
|
|
|
49723
|
-
//X轴 Bottom
|
|
49724
|
-
if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==
|
|
49744
|
+
//X轴 Bottom==8 自定义
|
|
49745
|
+
if ((this.ShowTextMode.Bottom==1 || this.ShowTextMode.Bottom==2 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
|
|
49725
49746
|
{
|
|
49726
49747
|
var text=this.StringFormatX.Text;
|
|
49727
49748
|
this.Canvas.font=this.Font;
|
|
@@ -49730,49 +49751,53 @@ function ChartCorssCursor()
|
|
|
49730
49751
|
|
|
49731
49752
|
var yCenter=bottom+2+this.TextHeight/2;
|
|
49732
49753
|
var yTop=bottom+2;
|
|
49754
|
+
var bShowText=true;
|
|
49733
49755
|
if (this.ShowTextMode.Bottom==2)
|
|
49734
49756
|
{
|
|
49735
49757
|
yCenter=bottom-this.TextHeight/2-2;
|
|
49736
49758
|
yTop=bottom-this.TextHeight-2;
|
|
49737
49759
|
}
|
|
49738
|
-
else if (this.ShowTextMode.Bottom==
|
|
49760
|
+
else if (this.ShowTextMode.Bottom==8)
|
|
49739
49761
|
{
|
|
49740
|
-
var
|
|
49741
|
-
if (
|
|
49762
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
|
|
49763
|
+
if (event && event.Callback)
|
|
49742
49764
|
{
|
|
49743
|
-
var
|
|
49744
|
-
|
|
49745
|
-
|
|
49746
|
-
|
|
49747
|
-
|
|
49748
|
-
|
|
49765
|
+
var sendData={ YCenter:yCenter, YTop:yTop, Height:this.TextHeight, IsShowText:bShowText };
|
|
49766
|
+
event.Callback(event, sendData, this);
|
|
49767
|
+
|
|
49768
|
+
yCenter=sendData.YCenter;
|
|
49769
|
+
yTop=sendData.YTop;
|
|
49770
|
+
bShowText=sendData.IsShowText;
|
|
49749
49771
|
}
|
|
49750
49772
|
}
|
|
49751
49773
|
|
|
49752
49774
|
//JSConsole.Chart.Log('[ChartCorssCursor::Draw] ',yCenter);
|
|
49753
|
-
if (
|
|
49754
|
-
{
|
|
49755
|
-
this.DrawTextBGRect(x-1,yTop,textWidth,this.TextHeight);
|
|
49756
|
-
this.Canvas.textAlign="left";
|
|
49757
|
-
this.Canvas.textBaseline="middle";
|
|
49758
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
49759
|
-
this.Canvas.fillText(text,x+1,yCenter,textWidth);
|
|
49760
|
-
}
|
|
49761
|
-
else if (x+textWidth/2>=right)
|
|
49762
|
-
{
|
|
49763
|
-
this.DrawTextBGRect(right-textWidth,yTop,textWidth,this.TextHeight);
|
|
49764
|
-
this.Canvas.textAlign="right";
|
|
49765
|
-
this.Canvas.textBaseline="middle";
|
|
49766
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
49767
|
-
this.Canvas.fillText(text,right-2,yCenter,textWidth);
|
|
49768
|
-
}
|
|
49769
|
-
else
|
|
49775
|
+
if (bShowText)
|
|
49770
49776
|
{
|
|
49771
|
-
|
|
49772
|
-
|
|
49773
|
-
|
|
49774
|
-
|
|
49775
|
-
|
|
49777
|
+
if (x-textWidth/2<3) //左边位置不够了, 顶着左边画
|
|
49778
|
+
{
|
|
49779
|
+
this.DrawTextBGRect(x-1,yTop,textWidth,this.TextHeight);
|
|
49780
|
+
this.Canvas.textAlign="left";
|
|
49781
|
+
this.Canvas.textBaseline="middle";
|
|
49782
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
49783
|
+
this.Canvas.fillText(text,x+1,yCenter,textWidth);
|
|
49784
|
+
}
|
|
49785
|
+
else if (x+textWidth/2>=right)
|
|
49786
|
+
{
|
|
49787
|
+
this.DrawTextBGRect(right-textWidth,yTop,textWidth,this.TextHeight);
|
|
49788
|
+
this.Canvas.textAlign="right";
|
|
49789
|
+
this.Canvas.textBaseline="middle";
|
|
49790
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
49791
|
+
this.Canvas.fillText(text,right-2,yCenter,textWidth);
|
|
49792
|
+
}
|
|
49793
|
+
else
|
|
49794
|
+
{
|
|
49795
|
+
this.DrawTextBGRect(x-textWidth/2,yTop,textWidth,this.TextHeight);
|
|
49796
|
+
this.Canvas.textAlign="center";
|
|
49797
|
+
this.Canvas.textBaseline="middle";
|
|
49798
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
49799
|
+
this.Canvas.fillText(text,x,yCenter,textWidth);
|
|
49800
|
+
}
|
|
49776
49801
|
}
|
|
49777
49802
|
}
|
|
49778
49803
|
|
|
@@ -50276,7 +50301,7 @@ function ChartCorssCursor()
|
|
|
50276
50301
|
}
|
|
50277
50302
|
|
|
50278
50303
|
//X轴 Bottom=10 使用第1个指标框位置
|
|
50279
|
-
if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==
|
|
50304
|
+
if ((this.ShowTextMode.Bottom===1 || this.ShowTextMode.Bottom==8) && this.StringFormatX.Operator())
|
|
50280
50305
|
{
|
|
50281
50306
|
var text=this.StringFormatX.Text;
|
|
50282
50307
|
this.Canvas.font=this.Font;
|
|
@@ -50284,64 +50309,67 @@ function ChartCorssCursor()
|
|
|
50284
50309
|
this.Canvas.fillStyle=this.TextBGColor;
|
|
50285
50310
|
var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
|
|
50286
50311
|
var xText=left;
|
|
50287
|
-
|
|
50288
|
-
if (this.ShowTextMode.Bottom==
|
|
50312
|
+
var bShowText=true;
|
|
50313
|
+
if (this.ShowTextMode.Bottom==8)
|
|
50289
50314
|
{
|
|
50290
|
-
var
|
|
50291
|
-
if (
|
|
50315
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_CORSSCURSOR_POSITION);
|
|
50316
|
+
if (event && event.Callback)
|
|
50292
50317
|
{
|
|
50293
|
-
var
|
|
50294
|
-
|
|
50295
|
-
|
|
50296
|
-
|
|
50297
|
-
|
|
50318
|
+
var sendData={ XText:xText, Height:this.TextHeight, IsShowText:bShowText };
|
|
50319
|
+
event.Callback(event, sendData, this);
|
|
50320
|
+
|
|
50321
|
+
xText=sendData.XText;
|
|
50322
|
+
bShowText=sendData.IsShowText;
|
|
50298
50323
|
}
|
|
50299
50324
|
}
|
|
50300
50325
|
|
|
50301
|
-
if (
|
|
50326
|
+
if (bShowText)
|
|
50302
50327
|
{
|
|
50303
|
-
|
|
50304
|
-
|
|
50305
|
-
|
|
50306
|
-
|
|
50328
|
+
if (y-textWidth/2<3) //左边位置不够了, 顶着左边画
|
|
50329
|
+
{
|
|
50330
|
+
var yText=y;
|
|
50331
|
+
this.Canvas.save();
|
|
50332
|
+
this.Canvas.translate(xText, yText);
|
|
50333
|
+
this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
|
|
50307
50334
|
|
|
50308
|
-
|
|
50309
|
-
|
|
50310
|
-
|
|
50311
|
-
|
|
50312
|
-
|
|
50335
|
+
this.Canvas.fillRect(0,0,textWidth,this.TextHeight);
|
|
50336
|
+
this.Canvas.textAlign="left";
|
|
50337
|
+
this.Canvas.textBaseline="middle";
|
|
50338
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
50339
|
+
this.Canvas.fillText(text,2,this.TextHeight/2,textWidth);
|
|
50313
50340
|
|
|
50314
|
-
|
|
50315
|
-
|
|
50316
|
-
|
|
50317
|
-
|
|
50318
|
-
|
|
50319
|
-
|
|
50320
|
-
|
|
50321
|
-
|
|
50341
|
+
this.Canvas.restore();
|
|
50342
|
+
}
|
|
50343
|
+
else if (y+textWidth/2>=bottom)
|
|
50344
|
+
{
|
|
50345
|
+
var yText=y;
|
|
50346
|
+
this.Canvas.save();
|
|
50347
|
+
this.Canvas.translate(xText, yText);
|
|
50348
|
+
this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
|
|
50322
50349
|
|
|
50323
|
-
|
|
50324
|
-
|
|
50325
|
-
|
|
50326
|
-
|
|
50327
|
-
|
|
50350
|
+
this.Canvas.fillRect(-textWidth,0,textWidth,this.TextHeight);
|
|
50351
|
+
this.Canvas.textAlign="right";
|
|
50352
|
+
this.Canvas.textBaseline="middle";
|
|
50353
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
50354
|
+
this.Canvas.fillText(text,-2,this.TextHeight/2,textWidth);
|
|
50328
50355
|
|
|
50329
|
-
|
|
50330
|
-
|
|
50331
|
-
|
|
50332
|
-
|
|
50333
|
-
|
|
50334
|
-
|
|
50335
|
-
|
|
50336
|
-
|
|
50356
|
+
this.Canvas.restore();
|
|
50357
|
+
}
|
|
50358
|
+
else
|
|
50359
|
+
{
|
|
50360
|
+
var yText=y;
|
|
50361
|
+
this.Canvas.save();
|
|
50362
|
+
this.Canvas.translate(xText, yText);
|
|
50363
|
+
this.Canvas.rotate(90 * Math.PI / 180); //数据和框子旋转180度
|
|
50337
50364
|
|
|
50338
|
-
|
|
50339
|
-
|
|
50340
|
-
|
|
50341
|
-
|
|
50342
|
-
|
|
50365
|
+
this.Canvas.fillRect(-textWidth/2,0,textWidth,this.TextHeight);
|
|
50366
|
+
this.Canvas.textAlign="center";
|
|
50367
|
+
this.Canvas.textBaseline="middle";
|
|
50368
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
50369
|
+
this.Canvas.fillText(text,0,this.TextHeight/2,textWidth);
|
|
50343
50370
|
|
|
50344
|
-
|
|
50371
|
+
this.Canvas.restore();
|
|
50372
|
+
}
|
|
50345
50373
|
}
|
|
50346
50374
|
}
|
|
50347
50375
|
|
|
@@ -53310,9 +53338,11 @@ function DynamicChartTitlePainting()
|
|
|
53310
53338
|
this.ColorIndex; //五彩K线名字 {Name:'名字'}
|
|
53311
53339
|
this.IsShowColorIndexTitle=true;
|
|
53312
53340
|
this.IsShowUpDownArrow=true; //指标数据是否显示 上涨下跌箭头
|
|
53341
|
+
this.TitleArrowType=0; //指标数据上涨下跌箭头类型 0=独立颜色 1=跟指标颜色一致
|
|
53313
53342
|
this.IsShowIndexName=true; //是否显示指标名字
|
|
53314
53343
|
this.IsShowIndexTitle=true; //是否显示指标标题信息
|
|
53315
53344
|
this.IsShowNameArrow=false;
|
|
53345
|
+
this.NameArrowConfig=CloneData(g_JSChartResource.IndexTitle.NameArrow);
|
|
53316
53346
|
|
|
53317
53347
|
this.TradeIndex; //专家系统名字{Name:'名字', Param:'参数'}
|
|
53318
53348
|
this.IsShowTradeIndexTitle=true;
|
|
@@ -53781,6 +53811,7 @@ function DynamicChartTitlePainting()
|
|
|
53781
53811
|
this.IsDrawTitleBG=this.Frame.IsDrawTitleBG;
|
|
53782
53812
|
this.IsShowNameArrow=this.Frame.IsShowNameArrow;
|
|
53783
53813
|
this.IsShowUpDownArrow=this.Frame.IsShowTitleArrow;
|
|
53814
|
+
this.TitleArrowType=this.Frame.TitleArrowType;
|
|
53784
53815
|
this.IsShowIndexName=this.Frame.IsShowIndexName;
|
|
53785
53816
|
this.IsShowOverlayIndexName=this.Frame.IsShowOverlayIndexName;
|
|
53786
53817
|
this.OverlayIndexType.Position=this.Frame.OverlayIndexType.Position;
|
|
@@ -54065,6 +54096,8 @@ function DynamicChartTitlePainting()
|
|
|
54065
54096
|
if (preValue>value) arrowSuper={ Text:'↓', TextColor:this.UpDownArrowConfig.DownColor };
|
|
54066
54097
|
else if (preValue<value) arrowSuper={ Text:'↑', TextColor:this.UpDownArrowConfig.UpColor};
|
|
54067
54098
|
else arrowSuper={ Text:'→', TextColor:this.UpDownArrowConfig.UnchangeColor };
|
|
54099
|
+
|
|
54100
|
+
if (this.TitleArrowType==1) arrowSuper.TextColor=item.Color;
|
|
54068
54101
|
}
|
|
54069
54102
|
}
|
|
54070
54103
|
|
|
@@ -54572,10 +54605,16 @@ function DynamicChartTitlePainting()
|
|
|
54572
54605
|
if (this.IsDrawTitleBG)
|
|
54573
54606
|
{
|
|
54574
54607
|
var title=this.Title;
|
|
54575
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
54576
54608
|
var textWidth=this.Canvas.measureText(title).width;
|
|
54609
|
+
var arrowWidth=0;
|
|
54610
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54611
|
+
{
|
|
54612
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
54613
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
54614
|
+
}
|
|
54615
|
+
|
|
54577
54616
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
54578
|
-
var bgWidth=textWidth+4*pixelRatio;
|
|
54617
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio;
|
|
54579
54618
|
|
|
54580
54619
|
this.TitleRect=
|
|
54581
54620
|
{
|
|
@@ -54595,15 +54634,24 @@ function DynamicChartTitlePainting()
|
|
|
54595
54634
|
this.Canvas.strokeRect(ToFixedPoint(drawRect.Left),ToFixedPoint(drawRect.Top),ToFixedRect(drawRect.Width),ToFixedRect(drawRect.Height));
|
|
54596
54635
|
}
|
|
54597
54636
|
|
|
54637
|
+
var xText=left+2*pixelRatio;
|
|
54598
54638
|
this.Canvas.fillStyle=this.TitleColor;
|
|
54599
|
-
this.Canvas.fillText(title,
|
|
54639
|
+
this.Canvas.fillText(title,xText,bottom);
|
|
54640
|
+
xText+=textWidth;
|
|
54641
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54642
|
+
{
|
|
54643
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
54644
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
54645
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,bottom);
|
|
54646
|
+
}
|
|
54647
|
+
|
|
54600
54648
|
left+=bgWidth+2*pixelRatio;
|
|
54601
54649
|
left+=this.TitleSpace;
|
|
54602
54650
|
}
|
|
54603
54651
|
else
|
|
54604
54652
|
{
|
|
54605
54653
|
this.Canvas.fillStyle=this.TitleColor;
|
|
54606
|
-
this.Canvas.fillText(this.Title,left,bottom
|
|
54654
|
+
this.Canvas.fillText(this.Title,left,bottom);
|
|
54607
54655
|
left+=textWidth;
|
|
54608
54656
|
left+=this.TitleSpace;
|
|
54609
54657
|
}
|
|
@@ -54716,11 +54764,17 @@ function DynamicChartTitlePainting()
|
|
|
54716
54764
|
{
|
|
54717
54765
|
var pixelRatio=GetDevicePixelRatio();
|
|
54718
54766
|
var title=this.Title;
|
|
54719
|
-
if (this.IsShowNameArrow) title+='▼';
|
|
54720
54767
|
var textWidth=this.Canvas.measureText(title).width;
|
|
54768
|
+
var arrowWidth=0;
|
|
54769
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54770
|
+
{
|
|
54771
|
+
arrowWidth=this.Canvas.measureText(this.NameArrowConfig.Symbol).width;
|
|
54772
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) arrowWidth+=this.NameArrowConfig.Space;
|
|
54773
|
+
}
|
|
54774
|
+
|
|
54721
54775
|
var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;
|
|
54722
54776
|
var roundRadius=this.BorderRoundRadius*pixelRatio;
|
|
54723
|
-
var bgWidth=textWidth+4*pixelRatio+roundRadius*2;
|
|
54777
|
+
var bgWidth=textWidth+arrowWidth+4*pixelRatio+roundRadius*2;
|
|
54724
54778
|
|
|
54725
54779
|
rtButton.Top=rtButton.YCenter-bgHeight/2-1,
|
|
54726
54780
|
rtButton.Width=bgWidth;
|
|
@@ -54766,8 +54820,16 @@ function DynamicChartTitlePainting()
|
|
|
54766
54820
|
}
|
|
54767
54821
|
}
|
|
54768
54822
|
|
|
54823
|
+
var xText=rtButton.Left+roundRadius+2*pixelRatio;
|
|
54769
54824
|
this.Canvas.fillStyle=this.TitleColor;
|
|
54770
|
-
this.Canvas.fillText(title,
|
|
54825
|
+
this.Canvas.fillText(title,xText,rtButton.YCenter);
|
|
54826
|
+
xText+=textWidth;
|
|
54827
|
+
if (this.IsShowNameArrow && this.NameArrowConfig)
|
|
54828
|
+
{
|
|
54829
|
+
if (IFrameSplitOperator.IsNumber(this.NameArrowConfig.Space)) xText+=this.NameArrowConfig.Space;
|
|
54830
|
+
this.Canvas.fillStyle=this.NameArrowConfig.Color;
|
|
54831
|
+
this.Canvas.fillText(this.NameArrowConfig.Symbol,xText,rtButton.YCenter);
|
|
54832
|
+
}
|
|
54771
54833
|
}
|
|
54772
54834
|
|
|
54773
54835
|
//绘制按钮
|
|
@@ -66790,7 +66852,12 @@ function JSChartResource()
|
|
|
66790
66852
|
UpColor:"rgb(238,21,21)", //上涨
|
|
66791
66853
|
DownColor:"rgb(25,158,0)", //下跌
|
|
66792
66854
|
UnchangeColor:"rgb(0,0,0)" //不变
|
|
66793
|
-
}
|
|
66855
|
+
},
|
|
66856
|
+
|
|
66857
|
+
ArrowType:0,
|
|
66858
|
+
EnableIndexArrow:true, //指标数值是否带上涨下跌箭头
|
|
66859
|
+
|
|
66860
|
+
NameArrow:{ Color:"rgb(43,54,69)", Space:2, Symbol:'▼' },
|
|
66794
66861
|
}
|
|
66795
66862
|
|
|
66796
66863
|
this.Title={
|
|
@@ -68088,6 +68155,17 @@ function JSChartResource()
|
|
|
68088
68155
|
if (subItem.DownColor) this.IndexTitle.UpDownArrow.DownColor = subItem.DownColor;
|
|
68089
68156
|
if (subItem.UnchangeColor) this.IndexTitle.UpDownArrow.UnchangeColor = subItem.UnchangeColor;
|
|
68090
68157
|
}
|
|
68158
|
+
|
|
68159
|
+
if (IFrameSplitOperator.IsNumber(item.ArrowType)) this.IndexTitle.ArrowType=item.ArrowType;
|
|
68160
|
+
if (IFrameSplitOperator.IsBool(item.EnableIndexArrow)) this.IndexTitle.EnableIndexArrow=item.EnableIndexArrow;
|
|
68161
|
+
|
|
68162
|
+
if (item.NameArrow)
|
|
68163
|
+
{
|
|
68164
|
+
var subItem=item.NameArrow;
|
|
68165
|
+
if (subItem.Color) this.IndexTitle.NameArrow.Color = subItem.Color;
|
|
68166
|
+
if (subItem.Symbol) this.IndexTitle.NameArrow.Symbol = subItem.Symbol;
|
|
68167
|
+
if (IFrameSplitOperator.IsNumber(subItem.Space)) this.IndexTitle.NameArrow.Space = subItem.Space;
|
|
68168
|
+
}
|
|
68091
68169
|
}
|
|
68092
68170
|
|
|
68093
68171
|
if (style.Frame)
|
|
@@ -70863,6 +70941,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
70863
70941
|
this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
70864
70942
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
70865
70943
|
this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
|
|
70944
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
70866
70945
|
|
|
70867
70946
|
//创建等待提示
|
|
70868
70947
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -74059,7 +74138,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
74059
74138
|
|
|
74060
74139
|
if (IFrameSplitOperator.IsNumber(item.TitleHeight)) this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight=item.TitleHeight;
|
|
74061
74140
|
else item.TitleHeight=this.Frame.SubFrame[i].Frame.ChartBorder.TitleHeight;
|
|
74062
|
-
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow))
|
|
74141
|
+
if (IFrameSplitOperator.IsBool(item.IsShowTitleArrow)) subFrame.Frame.IsShowTitleArrow=item.IsShowTitleArrow;
|
|
74142
|
+
if (IFrameSplitOperator.IsNumber(item.TitleArrowType)) subFrame.Frame.TitleArrowType=item.TitleArrowType;
|
|
74063
74143
|
if (item.IsShowIndexName==false) this.Frame.SubFrame[i].Frame.IsShowIndexName=false;
|
|
74064
74144
|
if (item.IsShowOverlayIndexName==false) this.Frame.SubFrame[i].Frame.IsShowOverlayIndexName=false;
|
|
74065
74145
|
if (IFrameSplitOperator.IsNumber(item.IndexParamSpace)) this.Frame.SubFrame[i].Frame.IndexParamSpace=item.IndexParamSpace;
|
|
@@ -79469,6 +79549,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
79469
79549
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
79470
79550
|
this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
|
|
79471
79551
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
79552
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
79472
79553
|
|
|
79473
79554
|
|
|
79474
79555
|
//创建等待提示
|
|
@@ -85078,6 +85159,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
85078
85159
|
this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
|
|
85079
85160
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
85080
85161
|
this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;
|
|
85162
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
85081
85163
|
|
|
85082
85164
|
//创建等待提示
|
|
85083
85165
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -85223,6 +85305,7 @@ function MinuteChartHScreenContainer(uielement)
|
|
|
85223
85305
|
this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
|
|
85224
85306
|
this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
85225
85307
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
85308
|
+
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
85226
85309
|
|
|
85227
85310
|
//创建等待提示
|
|
85228
85311
|
this.ChartSplashPaint = new ChartSplashPaint();
|