hqchart 1.1.14183 → 1.1.14193
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 +19 -108
- package/package.json +1 -1
- package/src/jscommon/umychart.js +43 -140
- package/src/jscommon/umychart.report.js +2 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +46 -142
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +46 -142
package/src/jscommon/umychart.js
CHANGED
|
@@ -587,9 +587,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
587
587
|
if(option.KLineTitle.IsShow == false) chart.TitlePaint[0].IsShow = false;
|
|
588
588
|
if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
|
|
589
589
|
|
|
590
|
-
if (item.ShowPostion) //显示位置高级配置
|
|
590
|
+
if (item.ShowPosition || item.ShowPostion) //显示位置高级配置
|
|
591
591
|
{
|
|
592
592
|
var subItem=item.ShowPostion;
|
|
593
|
+
if (item.ShowPosition) subItem=item.ShowPosition;
|
|
593
594
|
if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
|
|
594
595
|
if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
|
|
595
596
|
if (subItem.Margin)
|
|
@@ -1100,9 +1101,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1100
1101
|
if(IFrameSplitOperator.IsBool(item.IsAlwaysShowLastData)) chart.TitlePaint[0].IsAlwaysShowLastData=item.IsAlwaysShowLastData;
|
|
1101
1102
|
if(IFrameSplitOperator.IsNumber(item.ShowLastDataFormat)) chart.TitlePaint[0].ShowLastDataFormat=item.ShowLastDataFormat;
|
|
1102
1103
|
if (item.TimeFormat) chart.TitlePaint[0].TimeFormat=item.TimeFormat;
|
|
1103
|
-
if (item.ShowPostion) //显示位置高级配置
|
|
1104
|
+
if (item.ShowPostion || item.ShowPosition) //显示位置高级配置
|
|
1104
1105
|
{
|
|
1105
1106
|
var subItem=item.ShowPostion;
|
|
1107
|
+
if (item.ShowPosition) subItem=item.ShowPosition;
|
|
1106
1108
|
if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
|
|
1107
1109
|
if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
|
|
1108
1110
|
if (subItem.Margin)
|
|
@@ -2829,6 +2831,7 @@ var JSCHART_MENU_ID=
|
|
|
2829
2831
|
CMD_ENABLE_POP_MINUTE_CHART_ID:40, //双击弹分时图
|
|
2830
2832
|
|
|
2831
2833
|
CMD_CHANGE_INFO_POSITION_ID:41, //修改信息地雷位置
|
|
2834
|
+
CMD_CHIP_CHART_SETTING_ID:42, //筹码图设置
|
|
2832
2835
|
|
|
2833
2836
|
|
|
2834
2837
|
CMD_REPORT_CHANGE_BLOCK_ID:60, //报价列表 切换板块ID
|
|
@@ -9930,6 +9933,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9930
9933
|
case JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:
|
|
9931
9934
|
if (this.DeleteStockChipChart) this.DeleteStockChipChart();
|
|
9932
9935
|
break;
|
|
9936
|
+
case JSCHART_MENU_ID.CMD_CHIP_CHART_SETTING_ID:
|
|
9937
|
+
var stockChip=this.GetStockChipChart();
|
|
9938
|
+
if (!stockChip) return;
|
|
9939
|
+
if (param!=null)
|
|
9940
|
+
{
|
|
9941
|
+
stockChip.Chart.ShowType=param;
|
|
9942
|
+
this.SetSizeChange(true);
|
|
9943
|
+
this.Draw();
|
|
9944
|
+
}
|
|
9945
|
+
break;
|
|
9933
9946
|
case JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID:
|
|
9934
9947
|
if (IFrameSplitOperator.IsBool(srcParam))
|
|
9935
9948
|
this.EnableSelectRect=srcParam;
|
|
@@ -43843,7 +43856,7 @@ function StockChip()
|
|
|
43843
43856
|
this.ShowType=0; //0=所有筹码 1=周期前 2=周期内
|
|
43844
43857
|
this.IsDynamic=true;
|
|
43845
43858
|
this.ClientRect={};
|
|
43846
|
-
this.Font=g_JSChartResource.
|
|
43859
|
+
this.Font=g_JSChartResource.StockChip.Font;
|
|
43847
43860
|
this.InfoColor=g_JSChartResource.StockChip.InfoColor;
|
|
43848
43861
|
this.DayInfoColor=g_JSChartResource.StockChip.DayInfoColor;
|
|
43849
43862
|
this.LineHeight=16;
|
|
@@ -43882,7 +43895,7 @@ function StockChip()
|
|
|
43882
43895
|
this.ReloadResource=function(resource)
|
|
43883
43896
|
{
|
|
43884
43897
|
this.PenBorder=g_JSChartResource.FrameBorderPen;
|
|
43885
|
-
this.Font=g_JSChartResource.
|
|
43898
|
+
this.Font=g_JSChartResource.StockChip.Font;
|
|
43886
43899
|
this.InfoColor=g_JSChartResource.StockChip.InfoColor;
|
|
43887
43900
|
this.DayInfoColor=g_JSChartResource.StockChip.DayInfoColor;
|
|
43888
43901
|
|
|
@@ -54566,7 +54579,7 @@ function DynamicKLineTitlePainting()
|
|
|
54566
54579
|
this.IsShowSettingInfo=true; //是否显示设置信息(周期 复权)
|
|
54567
54580
|
this.IsShowDateTime=true; //是否显示日期
|
|
54568
54581
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
54569
|
-
this.ShowPositionConfig={ Margin:{ Bottom:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
|
|
54582
|
+
this.ShowPositionConfig={ Margin:{ Bottom:2, Left:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
|
|
54570
54583
|
this.OnDrawEvent;
|
|
54571
54584
|
this.OnMouseMoveEvent;
|
|
54572
54585
|
this.HQChart;
|
|
@@ -54814,7 +54827,7 @@ function DynamicKLineTitlePainting()
|
|
|
54814
54827
|
}
|
|
54815
54828
|
else
|
|
54816
54829
|
{
|
|
54817
|
-
var left=this.Frame.ChartBorder.
|
|
54830
|
+
var left=this.Frame.ChartBorder.Left;
|
|
54818
54831
|
if (this.ShowPositionConfig)
|
|
54819
54832
|
{
|
|
54820
54833
|
var item=this.ShowPositionConfig;
|
|
@@ -55530,43 +55543,29 @@ function DynamicMinuteTitlePainting()
|
|
|
55530
55543
|
var isHScreen=this.Frame.IsHScreen===true;
|
|
55531
55544
|
var border=this.Frame.GetBorder();
|
|
55532
55545
|
var pixelRatio=GetDevicePixelRatio();
|
|
55533
|
-
var left=
|
|
55534
|
-
var
|
|
55546
|
+
var left=this.GetLeft(isHScreen);
|
|
55547
|
+
var right=this.GetRight(isHScreen);
|
|
55548
|
+
var bottom=this.GetBottom(isHScreen);
|
|
55535
55549
|
var bDraw=true;
|
|
55536
55550
|
if (isHScreen)
|
|
55537
55551
|
{
|
|
55538
55552
|
if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
|
|
55539
|
-
var
|
|
55540
|
-
var
|
|
55541
|
-
var xText=border.ChartWidth;
|
|
55542
|
-
var yText=border.Top;
|
|
55553
|
+
var xText=bottom;
|
|
55554
|
+
var yText=left;
|
|
55543
55555
|
this.Canvas.translate(xText, yText);
|
|
55544
55556
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
55557
|
+
left=bottom=0;
|
|
55545
55558
|
}
|
|
55546
55559
|
else
|
|
55547
55560
|
{
|
|
55548
|
-
if (this.Frame.ChartBorder.Top<5) bDraw=false;
|
|
55561
|
+
if (this.Frame.ChartBorder.Top<5*pixelRatio) bDraw=false;
|
|
55549
55562
|
}
|
|
55550
55563
|
|
|
55551
55564
|
this.Canvas.textAlign="left";
|
|
55565
|
+
this.Canvas.textBaseline="bottom";
|
|
55552
55566
|
this.Canvas.font=this.Font;
|
|
55553
55567
|
|
|
55554
|
-
|
|
55555
|
-
{
|
|
55556
|
-
this.Canvas.textBaseline="top";
|
|
55557
|
-
bottom=2*pixelRatio;
|
|
55558
|
-
}
|
|
55559
|
-
else if (this.TitleBaseLine==2) //下
|
|
55560
|
-
{
|
|
55561
|
-
this.Canvas.textBaseline="bottom";
|
|
55562
|
-
var bottom=border.Top
|
|
55563
|
-
}
|
|
55564
|
-
else //中
|
|
55565
|
-
{
|
|
55566
|
-
this.Canvas.textBaseline="middle";
|
|
55567
|
-
}
|
|
55568
|
-
|
|
55569
|
-
var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
|
|
55568
|
+
var position = { Left: left, Bottom: bottom, MaxRight:right, IsHScreen: isHScreen };
|
|
55570
55569
|
var auctionData=this.GetCurrentAuctionData();
|
|
55571
55570
|
var titleData=this.FormatCallAuctionTitle(auctionData);
|
|
55572
55571
|
|
|
@@ -55703,48 +55702,33 @@ function DynamicMinuteTitlePainting()
|
|
|
55703
55702
|
if (!callAuctionItem) return;
|
|
55704
55703
|
|
|
55705
55704
|
var item=callAuctionItem.Data;
|
|
55706
|
-
var dataVersion=callAuctionItem.Ver;
|
|
55707
|
-
|
|
55708
55705
|
var isHScreen=this.Frame.IsHScreen===true;
|
|
55706
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
55709
55707
|
var border=this.Frame.GetBorder();
|
|
55708
|
+
var left=this.GetLeft(isHScreen);
|
|
55709
|
+
var right=this.GetRight(isHScreen);
|
|
55710
|
+
var bottom =this.GetBottom(isHScreen);
|
|
55710
55711
|
|
|
55711
|
-
var left=border.Left;
|
|
55712
|
-
var bottom=border.Top-this.Frame.ChartBorder.Top/2;
|
|
55713
|
-
//var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
|
|
55714
55712
|
var bDraw=true;
|
|
55715
55713
|
if (isHScreen)
|
|
55716
55714
|
{
|
|
55717
|
-
|
|
55718
|
-
var bottom
|
|
55719
|
-
var
|
|
55720
|
-
var yText=border.Top;
|
|
55715
|
+
if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
|
|
55716
|
+
var xText=bottom;
|
|
55717
|
+
var yText=left;
|
|
55721
55718
|
this.Canvas.translate(xText, yText);
|
|
55722
55719
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
55720
|
+
left=bottom=0; //旋转以后 位置调整0
|
|
55723
55721
|
}
|
|
55724
55722
|
else
|
|
55725
55723
|
{
|
|
55726
|
-
if (this.Frame.ChartBorder.Top<5) bDraw=false;
|
|
55724
|
+
if (this.Frame.ChartBorder.Top<5*pixelRatio) bDraw=false;
|
|
55727
55725
|
}
|
|
55728
55726
|
|
|
55729
55727
|
this.Canvas.textAlign="left";
|
|
55728
|
+
this.Canvas.textBaseline="bottom";
|
|
55730
55729
|
this.Canvas.font=this.Font;
|
|
55731
55730
|
|
|
55732
|
-
|
|
55733
|
-
{
|
|
55734
|
-
this.Canvas.textBaseline="top";
|
|
55735
|
-
bottom=2*GetDevicePixelRatio();
|
|
55736
|
-
}
|
|
55737
|
-
else if (this.TitleBaseLine==2) //下
|
|
55738
|
-
{
|
|
55739
|
-
this.Canvas.textBaseline="bottom";
|
|
55740
|
-
var bottom=border.Top
|
|
55741
|
-
}
|
|
55742
|
-
else //中
|
|
55743
|
-
{
|
|
55744
|
-
this.Canvas.textBaseline="middle";
|
|
55745
|
-
}
|
|
55746
|
-
|
|
55747
|
-
var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
|
|
55731
|
+
var position = { Left: left, Bottom: bottom, MaxRight:right, IsHScreen: isHScreen };
|
|
55748
55732
|
var titleData=this.FormatCallAuctionTitle(callAuctionItem);
|
|
55749
55733
|
|
|
55750
55734
|
if (bDraw && titleData && IFrameSplitOperator.IsNonEmptyArray(titleData.AryText))
|
|
@@ -55755,91 +55739,6 @@ function DynamicMinuteTitlePainting()
|
|
|
55755
55739
|
if (!this.DrawText(item.Text,item.Color,position)) break;
|
|
55756
55740
|
}
|
|
55757
55741
|
}
|
|
55758
|
-
|
|
55759
|
-
/*
|
|
55760
|
-
if(bDraw && this.IsShowName)
|
|
55761
|
-
{
|
|
55762
|
-
if (!this.DrawText(this.Name,this.NameColor,position)) return;
|
|
55763
|
-
}
|
|
55764
|
-
|
|
55765
|
-
var time=item.Time;
|
|
55766
|
-
var strTime;
|
|
55767
|
-
if (dataVersion==1.0) strTime=IFrameSplitOperator.FormatTimeString(time,"HH:MM");
|
|
55768
|
-
else strTime=IFrameSplitOperator.FormatTimeString(time,"HH:MM:SS");
|
|
55769
|
-
var strDate=IFrameSplitOperator.FormatDateString(item.Date);
|
|
55770
|
-
strTime=`${strDate} ${strTime}`;
|
|
55771
|
-
|
|
55772
|
-
if (bDraw && this.IsShowTime && strTime )
|
|
55773
|
-
{
|
|
55774
|
-
if (!this.DrawText(strTime,this.DateTimeColor,position)) return;
|
|
55775
|
-
}
|
|
55776
|
-
|
|
55777
|
-
//匹配价
|
|
55778
|
-
if (bDraw && item && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Price"))
|
|
55779
|
-
{
|
|
55780
|
-
var color=this.GetColor(item.Price,this.YClose);
|
|
55781
|
-
var filedName='MTitle-AC-Price';
|
|
55782
|
-
if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Close";
|
|
55783
|
-
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+item.Price.toFixed(defaultfloatPrecision);
|
|
55784
|
-
if (!this.DrawText(text,color,position)) return;
|
|
55785
|
-
}
|
|
55786
|
-
|
|
55787
|
-
//竞价涨幅
|
|
55788
|
-
if (bDraw && item && IFrameSplitOperator.IsPlusNumber(this.YClose) && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Increase"))
|
|
55789
|
-
{
|
|
55790
|
-
var value=(item.Price-this.YClose)/this.YClose*100;
|
|
55791
|
-
var color=this.GetColor(value,0);
|
|
55792
|
-
var filedName='MTitle-AC-Increase';
|
|
55793
|
-
if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Increase";
|
|
55794
|
-
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+value.toFixed(2)+"%";
|
|
55795
|
-
if (!this.DrawText(text,color,position)) return;
|
|
55796
|
-
}
|
|
55797
|
-
|
|
55798
|
-
if (dataVersion==3.0)
|
|
55799
|
-
{
|
|
55800
|
-
if (bDraw && item && IFrameSplitOperator.IsNumber(item.AvPrice) && this.CallAuctionShowTitle.has("MTitle-AC-AvPrice"))
|
|
55801
|
-
{
|
|
55802
|
-
var color=this.GetColor(item.Price,this.YClose);
|
|
55803
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
55804
|
-
if (!this.DrawText(text,color,position)) return;
|
|
55805
|
-
}
|
|
55806
|
-
}
|
|
55807
|
-
|
|
55808
|
-
//匹配量
|
|
55809
|
-
if (bDraw && IFrameSplitOperator.IsNumber(item.Vol[0]) && this.CallAuctionShowTitle.has("MTitle-AC-Vol"))
|
|
55810
|
-
{
|
|
55811
|
-
var filedName='MTitle-AC-Vol';
|
|
55812
|
-
if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Vol";
|
|
55813
|
-
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[0],2);
|
|
55814
|
-
if (!this.DrawText(text,this.VolColor,position)) return;
|
|
55815
|
-
}
|
|
55816
|
-
|
|
55817
|
-
//未匹配量
|
|
55818
|
-
if (bDraw && IFrameSplitOperator.IsNumber(item.Vol[1]) && this.CallAuctionShowTitle.has("MTitle-AC-NotMatchVol"))
|
|
55819
|
-
{
|
|
55820
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-NotMatchVol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[1],2);
|
|
55821
|
-
if (!this.DrawText(text,this.VolColor,position)) return;
|
|
55822
|
-
}
|
|
55823
|
-
|
|
55824
|
-
if (bDraw)
|
|
55825
|
-
{
|
|
55826
|
-
if (item.ExtendData && IFrameSplitOperator.IsNonEmptyArray(item.ExtendData.Amount))
|
|
55827
|
-
{
|
|
55828
|
-
var aryAmount=item.ExtendData.Amount;
|
|
55829
|
-
if (IFrameSplitOperator.IsNumber(aryAmount[0]) && this.CallAuctionShowTitle.has("MTitle-AC-Amount")) //匹配量金额
|
|
55830
|
-
{
|
|
55831
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-Amount',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(aryAmount[0],2);
|
|
55832
|
-
if (!this.DrawText(text,this.AmountColor,position)) return;
|
|
55833
|
-
}
|
|
55834
|
-
|
|
55835
|
-
if (IFrameSplitOperator.IsNumber(aryAmount[1]) && this.CallAuctionShowTitle.has("MTitle-AC-NotMatchAmount")) //未匹配量金额
|
|
55836
|
-
{
|
|
55837
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-NotMatchAmount',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(aryAmount[1],2);
|
|
55838
|
-
if (!this.DrawText(text,this.AmountColor,position)) return;
|
|
55839
|
-
}
|
|
55840
|
-
}
|
|
55841
|
-
}
|
|
55842
|
-
*/
|
|
55843
55742
|
}
|
|
55844
55743
|
|
|
55845
55744
|
this.DrawLastDataItem=function()
|
|
@@ -70317,6 +70216,7 @@ function JSChartResource()
|
|
|
70317
70216
|
{
|
|
70318
70217
|
InfoColor:'rgb(0,0,0)', //文字颜色
|
|
70319
70218
|
DayInfoColor:'rgb(255,255,255)', //周期颜色内文字颜色
|
|
70219
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
70320
70220
|
|
|
70321
70221
|
DefaultButton:
|
|
70322
70222
|
{
|
|
@@ -71263,6 +71163,7 @@ function JSChartResource()
|
|
|
71263
71163
|
var item=style.StockChip;
|
|
71264
71164
|
if (item.InfoColor) this.StockChip.InfoColor=item.InfoColor;
|
|
71265
71165
|
if (item.DayInfoColor) this.StockChip.DayInfoColor=item.DayInfoColor;
|
|
71166
|
+
if (item.Font) this.StockChip.Font=item.Font;
|
|
71266
71167
|
|
|
71267
71168
|
if (item.DefaultButton) T_SetButtonStyle(item.DefaultButton, this.StockChip.DefaultButton);
|
|
71268
71169
|
if (item.LongButton) T_SetButtonStyle(item.LongButton, this.StockChip.LongButton);
|
|
@@ -80773,6 +80674,8 @@ KLineChartContainer.JsonDataToRealtimeData=function(data, symbol)
|
|
|
80773
80674
|
if (IFrameSplitOperator.IsBool(stock.isvirtual)) item.IsVirtual=stock.isvirtual; //虚拟数据
|
|
80774
80675
|
if (IFrameSplitOperator.IsBool(stock.isnontrade)) item.IsNonTrade=stock.isnontrade; //虚拟数据
|
|
80775
80676
|
|
|
80677
|
+
if (IFrameSplitOperator.IsNumber(stock.flowCapital)) item.FlowCapital=stock.flowCapital; //流通股本
|
|
80678
|
+
|
|
80776
80679
|
return item;
|
|
80777
80680
|
}
|
|
80778
80681
|
|
|
@@ -4715,9 +4715,10 @@ function ChartReport()
|
|
|
4715
4715
|
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
|
|
4716
4716
|
if (IFrameSplitOperator.IsBool(item.EnableDragWidth)) colItem.EnableDragWidth=item.EnableDragWidth;
|
|
4717
4717
|
if (IFrameSplitOperator.IsBool(item.IsDrawCallback)) colItem.IsDrawCallback=item.IsDrawCallback;
|
|
4718
|
+
else colItem.IsDrawCallback=false;
|
|
4719
|
+
|
|
4718
4720
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
|
|
4719
4721
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
4720
|
-
else colItem.IsDrawCallback=false;
|
|
4721
4722
|
if (item.Icon) colItem.Icon=item.Icon;
|
|
4722
4723
|
if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
|
|
4723
4724
|
|
|
@@ -4512,9 +4512,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4512
4512
|
if(option.KLineTitle.IsShow == false) chart.TitlePaint[0].IsShow = false;
|
|
4513
4513
|
if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
|
|
4514
4514
|
|
|
4515
|
-
if (item.ShowPostion) //显示位置高级配置
|
|
4515
|
+
if (item.ShowPosition || item.ShowPostion) //显示位置高级配置
|
|
4516
4516
|
{
|
|
4517
4517
|
var subItem=item.ShowPostion;
|
|
4518
|
+
if (item.ShowPosition) subItem=item.ShowPosition;
|
|
4518
4519
|
if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
|
|
4519
4520
|
if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
|
|
4520
4521
|
if (subItem.Margin)
|
|
@@ -5025,9 +5026,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5025
5026
|
if(IFrameSplitOperator.IsBool(item.IsAlwaysShowLastData)) chart.TitlePaint[0].IsAlwaysShowLastData=item.IsAlwaysShowLastData;
|
|
5026
5027
|
if(IFrameSplitOperator.IsNumber(item.ShowLastDataFormat)) chart.TitlePaint[0].ShowLastDataFormat=item.ShowLastDataFormat;
|
|
5027
5028
|
if (item.TimeFormat) chart.TitlePaint[0].TimeFormat=item.TimeFormat;
|
|
5028
|
-
if (item.ShowPostion) //显示位置高级配置
|
|
5029
|
+
if (item.ShowPostion || item.ShowPosition) //显示位置高级配置
|
|
5029
5030
|
{
|
|
5030
5031
|
var subItem=item.ShowPostion;
|
|
5032
|
+
if (item.ShowPosition) subItem=item.ShowPosition;
|
|
5031
5033
|
if (!chartTitle.ShowPositionConfig) chartTitle.ShowPositionConfig={ Margin:{ } };
|
|
5032
5034
|
if (IFrameSplitOperator.IsNumber(subItem.Type)) chartTitle.ShowPositionConfig.Type=subItem.Type;
|
|
5033
5035
|
if (subItem.Margin)
|
|
@@ -6754,6 +6756,7 @@ var JSCHART_MENU_ID=
|
|
|
6754
6756
|
CMD_ENABLE_POP_MINUTE_CHART_ID:40, //双击弹分时图
|
|
6755
6757
|
|
|
6756
6758
|
CMD_CHANGE_INFO_POSITION_ID:41, //修改信息地雷位置
|
|
6759
|
+
CMD_CHIP_CHART_SETTING_ID:42, //筹码图设置
|
|
6757
6760
|
|
|
6758
6761
|
|
|
6759
6762
|
CMD_REPORT_CHANGE_BLOCK_ID:60, //报价列表 切换板块ID
|
|
@@ -13855,6 +13858,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13855
13858
|
case JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:
|
|
13856
13859
|
if (this.DeleteStockChipChart) this.DeleteStockChipChart();
|
|
13857
13860
|
break;
|
|
13861
|
+
case JSCHART_MENU_ID.CMD_CHIP_CHART_SETTING_ID:
|
|
13862
|
+
var stockChip=this.GetStockChipChart();
|
|
13863
|
+
if (!stockChip) return;
|
|
13864
|
+
if (param!=null)
|
|
13865
|
+
{
|
|
13866
|
+
stockChip.Chart.ShowType=param;
|
|
13867
|
+
this.SetSizeChange(true);
|
|
13868
|
+
this.Draw();
|
|
13869
|
+
}
|
|
13870
|
+
break;
|
|
13858
13871
|
case JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID:
|
|
13859
13872
|
if (IFrameSplitOperator.IsBool(srcParam))
|
|
13860
13873
|
this.EnableSelectRect=srcParam;
|
|
@@ -47768,7 +47781,7 @@ function StockChip()
|
|
|
47768
47781
|
this.ShowType=0; //0=所有筹码 1=周期前 2=周期内
|
|
47769
47782
|
this.IsDynamic=true;
|
|
47770
47783
|
this.ClientRect={};
|
|
47771
|
-
this.Font=g_JSChartResource.
|
|
47784
|
+
this.Font=g_JSChartResource.StockChip.Font;
|
|
47772
47785
|
this.InfoColor=g_JSChartResource.StockChip.InfoColor;
|
|
47773
47786
|
this.DayInfoColor=g_JSChartResource.StockChip.DayInfoColor;
|
|
47774
47787
|
this.LineHeight=16;
|
|
@@ -47807,7 +47820,7 @@ function StockChip()
|
|
|
47807
47820
|
this.ReloadResource=function(resource)
|
|
47808
47821
|
{
|
|
47809
47822
|
this.PenBorder=g_JSChartResource.FrameBorderPen;
|
|
47810
|
-
this.Font=g_JSChartResource.
|
|
47823
|
+
this.Font=g_JSChartResource.StockChip.Font;
|
|
47811
47824
|
this.InfoColor=g_JSChartResource.StockChip.InfoColor;
|
|
47812
47825
|
this.DayInfoColor=g_JSChartResource.StockChip.DayInfoColor;
|
|
47813
47826
|
|
|
@@ -58491,7 +58504,7 @@ function DynamicKLineTitlePainting()
|
|
|
58491
58504
|
this.IsShowSettingInfo=true; //是否显示设置信息(周期 复权)
|
|
58492
58505
|
this.IsShowDateTime=true; //是否显示日期
|
|
58493
58506
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
58494
|
-
this.ShowPositionConfig={ Margin:{ Bottom:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
|
|
58507
|
+
this.ShowPositionConfig={ Margin:{ Bottom:2, Left:2 } }; //显示位置高级配置 { Type:1 左对齐, Margin:{ Left, Right, Bottom } }
|
|
58495
58508
|
this.OnDrawEvent;
|
|
58496
58509
|
this.OnMouseMoveEvent;
|
|
58497
58510
|
this.HQChart;
|
|
@@ -58739,7 +58752,7 @@ function DynamicKLineTitlePainting()
|
|
|
58739
58752
|
}
|
|
58740
58753
|
else
|
|
58741
58754
|
{
|
|
58742
|
-
var left=this.Frame.ChartBorder.
|
|
58755
|
+
var left=this.Frame.ChartBorder.Left;
|
|
58743
58756
|
if (this.ShowPositionConfig)
|
|
58744
58757
|
{
|
|
58745
58758
|
var item=this.ShowPositionConfig;
|
|
@@ -59455,43 +59468,29 @@ function DynamicMinuteTitlePainting()
|
|
|
59455
59468
|
var isHScreen=this.Frame.IsHScreen===true;
|
|
59456
59469
|
var border=this.Frame.GetBorder();
|
|
59457
59470
|
var pixelRatio=GetDevicePixelRatio();
|
|
59458
|
-
var left=
|
|
59459
|
-
var
|
|
59471
|
+
var left=this.GetLeft(isHScreen);
|
|
59472
|
+
var right=this.GetRight(isHScreen);
|
|
59473
|
+
var bottom=this.GetBottom(isHScreen);
|
|
59460
59474
|
var bDraw=true;
|
|
59461
59475
|
if (isHScreen)
|
|
59462
59476
|
{
|
|
59463
59477
|
if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
|
|
59464
|
-
var
|
|
59465
|
-
var
|
|
59466
|
-
var xText=border.ChartWidth;
|
|
59467
|
-
var yText=border.Top;
|
|
59478
|
+
var xText=bottom;
|
|
59479
|
+
var yText=left;
|
|
59468
59480
|
this.Canvas.translate(xText, yText);
|
|
59469
59481
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
59482
|
+
left=bottom=0;
|
|
59470
59483
|
}
|
|
59471
59484
|
else
|
|
59472
59485
|
{
|
|
59473
|
-
if (this.Frame.ChartBorder.Top<5) bDraw=false;
|
|
59486
|
+
if (this.Frame.ChartBorder.Top<5*pixelRatio) bDraw=false;
|
|
59474
59487
|
}
|
|
59475
59488
|
|
|
59476
59489
|
this.Canvas.textAlign="left";
|
|
59490
|
+
this.Canvas.textBaseline="bottom";
|
|
59477
59491
|
this.Canvas.font=this.Font;
|
|
59478
59492
|
|
|
59479
|
-
|
|
59480
|
-
{
|
|
59481
|
-
this.Canvas.textBaseline="top";
|
|
59482
|
-
bottom=2*pixelRatio;
|
|
59483
|
-
}
|
|
59484
|
-
else if (this.TitleBaseLine==2) //下
|
|
59485
|
-
{
|
|
59486
|
-
this.Canvas.textBaseline="bottom";
|
|
59487
|
-
var bottom=border.Top
|
|
59488
|
-
}
|
|
59489
|
-
else //中
|
|
59490
|
-
{
|
|
59491
|
-
this.Canvas.textBaseline="middle";
|
|
59492
|
-
}
|
|
59493
|
-
|
|
59494
|
-
var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
|
|
59493
|
+
var position = { Left: left, Bottom: bottom, MaxRight:right, IsHScreen: isHScreen };
|
|
59495
59494
|
var auctionData=this.GetCurrentAuctionData();
|
|
59496
59495
|
var titleData=this.FormatCallAuctionTitle(auctionData);
|
|
59497
59496
|
|
|
@@ -59628,48 +59627,33 @@ function DynamicMinuteTitlePainting()
|
|
|
59628
59627
|
if (!callAuctionItem) return;
|
|
59629
59628
|
|
|
59630
59629
|
var item=callAuctionItem.Data;
|
|
59631
|
-
var dataVersion=callAuctionItem.Ver;
|
|
59632
|
-
|
|
59633
59630
|
var isHScreen=this.Frame.IsHScreen===true;
|
|
59631
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
59634
59632
|
var border=this.Frame.GetBorder();
|
|
59633
|
+
var left=this.GetLeft(isHScreen);
|
|
59634
|
+
var right=this.GetRight(isHScreen);
|
|
59635
|
+
var bottom =this.GetBottom(isHScreen);
|
|
59635
59636
|
|
|
59636
|
-
var left=border.Left;
|
|
59637
|
-
var bottom=border.Top-this.Frame.ChartBorder.Top/2;
|
|
59638
|
-
//var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
|
|
59639
59637
|
var bDraw=true;
|
|
59640
59638
|
if (isHScreen)
|
|
59641
59639
|
{
|
|
59642
|
-
|
|
59643
|
-
var bottom
|
|
59644
|
-
var
|
|
59645
|
-
var yText=border.Top;
|
|
59640
|
+
if (this.Frame.ChartBorder.Right<5*pixelRatio) return;
|
|
59641
|
+
var xText=bottom;
|
|
59642
|
+
var yText=left;
|
|
59646
59643
|
this.Canvas.translate(xText, yText);
|
|
59647
59644
|
this.Canvas.rotate(90 * Math.PI / 180);
|
|
59645
|
+
left=bottom=0; //旋转以后 位置调整0
|
|
59648
59646
|
}
|
|
59649
59647
|
else
|
|
59650
59648
|
{
|
|
59651
|
-
if (this.Frame.ChartBorder.Top<5) bDraw=false;
|
|
59649
|
+
if (this.Frame.ChartBorder.Top<5*pixelRatio) bDraw=false;
|
|
59652
59650
|
}
|
|
59653
59651
|
|
|
59654
59652
|
this.Canvas.textAlign="left";
|
|
59653
|
+
this.Canvas.textBaseline="bottom";
|
|
59655
59654
|
this.Canvas.font=this.Font;
|
|
59656
59655
|
|
|
59657
|
-
|
|
59658
|
-
{
|
|
59659
|
-
this.Canvas.textBaseline="top";
|
|
59660
|
-
bottom=2*GetDevicePixelRatio();
|
|
59661
|
-
}
|
|
59662
|
-
else if (this.TitleBaseLine==2) //下
|
|
59663
|
-
{
|
|
59664
|
-
this.Canvas.textBaseline="bottom";
|
|
59665
|
-
var bottom=border.Top
|
|
59666
|
-
}
|
|
59667
|
-
else //中
|
|
59668
|
-
{
|
|
59669
|
-
this.Canvas.textBaseline="middle";
|
|
59670
|
-
}
|
|
59671
|
-
|
|
59672
|
-
var position = { Left: left, Bottom: bottom, IsHScreen: isHScreen };
|
|
59656
|
+
var position = { Left: left, Bottom: bottom, MaxRight:right, IsHScreen: isHScreen };
|
|
59673
59657
|
var titleData=this.FormatCallAuctionTitle(callAuctionItem);
|
|
59674
59658
|
|
|
59675
59659
|
if (bDraw && titleData && IFrameSplitOperator.IsNonEmptyArray(titleData.AryText))
|
|
@@ -59680,91 +59664,6 @@ function DynamicMinuteTitlePainting()
|
|
|
59680
59664
|
if (!this.DrawText(item.Text,item.Color,position)) break;
|
|
59681
59665
|
}
|
|
59682
59666
|
}
|
|
59683
|
-
|
|
59684
|
-
/*
|
|
59685
|
-
if(bDraw && this.IsShowName)
|
|
59686
|
-
{
|
|
59687
|
-
if (!this.DrawText(this.Name,this.NameColor,position)) return;
|
|
59688
|
-
}
|
|
59689
|
-
|
|
59690
|
-
var time=item.Time;
|
|
59691
|
-
var strTime;
|
|
59692
|
-
if (dataVersion==1.0) strTime=IFrameSplitOperator.FormatTimeString(time,"HH:MM");
|
|
59693
|
-
else strTime=IFrameSplitOperator.FormatTimeString(time,"HH:MM:SS");
|
|
59694
|
-
var strDate=IFrameSplitOperator.FormatDateString(item.Date);
|
|
59695
|
-
strTime=`${strDate} ${strTime}`;
|
|
59696
|
-
|
|
59697
|
-
if (bDraw && this.IsShowTime && strTime )
|
|
59698
|
-
{
|
|
59699
|
-
if (!this.DrawText(strTime,this.DateTimeColor,position)) return;
|
|
59700
|
-
}
|
|
59701
|
-
|
|
59702
|
-
//匹配价
|
|
59703
|
-
if (bDraw && item && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Price"))
|
|
59704
|
-
{
|
|
59705
|
-
var color=this.GetColor(item.Price,this.YClose);
|
|
59706
|
-
var filedName='MTitle-AC-Price';
|
|
59707
|
-
if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Close";
|
|
59708
|
-
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+item.Price.toFixed(defaultfloatPrecision);
|
|
59709
|
-
if (!this.DrawText(text,color,position)) return;
|
|
59710
|
-
}
|
|
59711
|
-
|
|
59712
|
-
//竞价涨幅
|
|
59713
|
-
if (bDraw && item && IFrameSplitOperator.IsPlusNumber(this.YClose) && IFrameSplitOperator.IsNumber(item.Price) && this.CallAuctionShowTitle.has("MTitle-AC-Increase"))
|
|
59714
|
-
{
|
|
59715
|
-
var value=(item.Price-this.YClose)/this.YClose*100;
|
|
59716
|
-
var color=this.GetColor(value,0);
|
|
59717
|
-
var filedName='MTitle-AC-Increase';
|
|
59718
|
-
if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Increase";
|
|
59719
|
-
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+value.toFixed(2)+"%";
|
|
59720
|
-
if (!this.DrawText(text,color,position)) return;
|
|
59721
|
-
}
|
|
59722
|
-
|
|
59723
|
-
if (dataVersion==3.0)
|
|
59724
|
-
{
|
|
59725
|
-
if (bDraw && item && IFrameSplitOperator.IsNumber(item.AvPrice) && this.CallAuctionShowTitle.has("MTitle-AC-AvPrice"))
|
|
59726
|
-
{
|
|
59727
|
-
var color=this.GetColor(item.Price,this.YClose);
|
|
59728
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
59729
|
-
if (!this.DrawText(text,color,position)) return;
|
|
59730
|
-
}
|
|
59731
|
-
}
|
|
59732
|
-
|
|
59733
|
-
//匹配量
|
|
59734
|
-
if (bDraw && IFrameSplitOperator.IsNumber(item.Vol[0]) && this.CallAuctionShowTitle.has("MTitle-AC-Vol"))
|
|
59735
|
-
{
|
|
59736
|
-
var filedName='MTitle-AC-Vol';
|
|
59737
|
-
if (this.BeforeOpenData && this.BeforeOpenData.Ver==1.0) filedName="MTitle-Vol";
|
|
59738
|
-
var text=g_JSChartLocalization.GetText(filedName,this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[0],2);
|
|
59739
|
-
if (!this.DrawText(text,this.VolColor,position)) return;
|
|
59740
|
-
}
|
|
59741
|
-
|
|
59742
|
-
//未匹配量
|
|
59743
|
-
if (bDraw && IFrameSplitOperator.IsNumber(item.Vol[1]) && this.CallAuctionShowTitle.has("MTitle-AC-NotMatchVol"))
|
|
59744
|
-
{
|
|
59745
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-NotMatchVol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Vol[1],2);
|
|
59746
|
-
if (!this.DrawText(text,this.VolColor,position)) return;
|
|
59747
|
-
}
|
|
59748
|
-
|
|
59749
|
-
if (bDraw)
|
|
59750
|
-
{
|
|
59751
|
-
if (item.ExtendData && IFrameSplitOperator.IsNonEmptyArray(item.ExtendData.Amount))
|
|
59752
|
-
{
|
|
59753
|
-
var aryAmount=item.ExtendData.Amount;
|
|
59754
|
-
if (IFrameSplitOperator.IsNumber(aryAmount[0]) && this.CallAuctionShowTitle.has("MTitle-AC-Amount")) //匹配量金额
|
|
59755
|
-
{
|
|
59756
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-Amount',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(aryAmount[0],2);
|
|
59757
|
-
if (!this.DrawText(text,this.AmountColor,position)) return;
|
|
59758
|
-
}
|
|
59759
|
-
|
|
59760
|
-
if (IFrameSplitOperator.IsNumber(aryAmount[1]) && this.CallAuctionShowTitle.has("MTitle-AC-NotMatchAmount")) //未匹配量金额
|
|
59761
|
-
{
|
|
59762
|
-
var text=g_JSChartLocalization.GetText('MTitle-AC-NotMatchAmount',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(aryAmount[1],2);
|
|
59763
|
-
if (!this.DrawText(text,this.AmountColor,position)) return;
|
|
59764
|
-
}
|
|
59765
|
-
}
|
|
59766
|
-
}
|
|
59767
|
-
*/
|
|
59768
59667
|
}
|
|
59769
59668
|
|
|
59770
59669
|
this.DrawLastDataItem=function()
|
|
@@ -74242,6 +74141,7 @@ function JSChartResource()
|
|
|
74242
74141
|
{
|
|
74243
74142
|
InfoColor:'rgb(0,0,0)', //文字颜色
|
|
74244
74143
|
DayInfoColor:'rgb(255,255,255)', //周期颜色内文字颜色
|
|
74144
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
74245
74145
|
|
|
74246
74146
|
DefaultButton:
|
|
74247
74147
|
{
|
|
@@ -75188,6 +75088,7 @@ function JSChartResource()
|
|
|
75188
75088
|
var item=style.StockChip;
|
|
75189
75089
|
if (item.InfoColor) this.StockChip.InfoColor=item.InfoColor;
|
|
75190
75090
|
if (item.DayInfoColor) this.StockChip.DayInfoColor=item.DayInfoColor;
|
|
75091
|
+
if (item.Font) this.StockChip.Font=item.Font;
|
|
75191
75092
|
|
|
75192
75093
|
if (item.DefaultButton) T_SetButtonStyle(item.DefaultButton, this.StockChip.DefaultButton);
|
|
75193
75094
|
if (item.LongButton) T_SetButtonStyle(item.LongButton, this.StockChip.LongButton);
|
|
@@ -84698,6 +84599,8 @@ KLineChartContainer.JsonDataToRealtimeData=function(data, symbol)
|
|
|
84698
84599
|
if (IFrameSplitOperator.IsBool(stock.isvirtual)) item.IsVirtual=stock.isvirtual; //虚拟数据
|
|
84699
84600
|
if (IFrameSplitOperator.IsBool(stock.isnontrade)) item.IsNonTrade=stock.isnontrade; //虚拟数据
|
|
84700
84601
|
|
|
84602
|
+
if (IFrameSplitOperator.IsNumber(stock.flowCapital)) item.FlowCapital=stock.flowCapital; //流通股本
|
|
84603
|
+
|
|
84701
84604
|
return item;
|
|
84702
84605
|
}
|
|
84703
84606
|
|
|
@@ -132414,9 +132317,10 @@ function ChartReport()
|
|
|
132414
132317
|
if (IFrameSplitOperator.IsNumber(item.FixedWidth)) colItem.FixedWidth=item.FixedWidth;
|
|
132415
132318
|
if (IFrameSplitOperator.IsBool(item.EnableDragWidth)) colItem.EnableDragWidth=item.EnableDragWidth;
|
|
132416
132319
|
if (IFrameSplitOperator.IsBool(item.IsDrawCallback)) colItem.IsDrawCallback=item.IsDrawCallback;
|
|
132320
|
+
else colItem.IsDrawCallback=false;
|
|
132321
|
+
|
|
132417
132322
|
if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
|
|
132418
132323
|
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
132419
|
-
else colItem.IsDrawCallback=false;
|
|
132420
132324
|
if (item.Icon) colItem.Icon=item.Icon;
|
|
132421
132325
|
if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
|
|
132422
132326
|
|
|
@@ -140127,7 +140031,7 @@ function ScrollBarBGChart()
|
|
|
140127
140031
|
|
|
140128
140032
|
|
|
140129
140033
|
|
|
140130
|
-
var HQCHART_VERSION="1.1.
|
|
140034
|
+
var HQCHART_VERSION="1.1.14192";
|
|
140131
140035
|
|
|
140132
140036
|
function PrintHQChartVersion()
|
|
140133
140037
|
{
|