hqchart 1.1.15382 → 1.1.15428
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 +91 -43
- package/package.json +1 -1
- package/src/jscommon/umychart.StockInfo.js +1192 -0
- package/src/jscommon/umychart.TReport.js +11 -11
- package/src/jscommon/umychart.complier.js +101 -27
- package/src/jscommon/umychart.deal.js +71 -21
- package/src/jscommon/umychart.js +288 -12
- package/src/jscommon/umychart.report.js +84 -7
- package/src/jscommon/umychart.style.js +61 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +606 -68
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +617 -79
package/src/jscommon/umychart.js
CHANGED
|
@@ -8592,6 +8592,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8592
8592
|
return false;
|
|
8593
8593
|
}
|
|
8594
8594
|
|
|
8595
|
+
this.IsHScreenModel=function()
|
|
8596
|
+
{
|
|
8597
|
+
if (this.ClassName=="KLineChartHScreenContainer" || this.ClassName=="MinuteChartHScreenContainer") return true;
|
|
8598
|
+
|
|
8599
|
+
return false;
|
|
8600
|
+
}
|
|
8601
|
+
|
|
8595
8602
|
this.UpdatePointByCursorIndex=function(type) //type 1=根据十字光标更新 2=强制取消十字光标
|
|
8596
8603
|
{
|
|
8597
8604
|
if (type==1) //根据十字光标更新
|
|
@@ -8612,8 +8619,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8612
8619
|
pt.X=null;
|
|
8613
8620
|
}
|
|
8614
8621
|
}
|
|
8615
|
-
|
|
8616
|
-
this.
|
|
8622
|
+
|
|
8623
|
+
if (this.IsHScreenModel())
|
|
8624
|
+
{
|
|
8625
|
+
this.LastPoint.X=pt.Y;
|
|
8626
|
+
this.LastPoint.Y=pt.X;
|
|
8627
|
+
}
|
|
8628
|
+
else
|
|
8629
|
+
{
|
|
8630
|
+
this.LastPoint.X=pt.X;
|
|
8631
|
+
this.LastPoint.Y=pt.Y;
|
|
8632
|
+
}
|
|
8633
|
+
|
|
8617
8634
|
}
|
|
8618
8635
|
else if (type==2)
|
|
8619
8636
|
{
|
|
@@ -8633,8 +8650,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8633
8650
|
pt.Y=this.Frame.GetYFromData(close);
|
|
8634
8651
|
this.LastPoint.FrameID=0;
|
|
8635
8652
|
}
|
|
8636
|
-
|
|
8637
|
-
this.
|
|
8653
|
+
|
|
8654
|
+
if (this.IsHScreenModel())
|
|
8655
|
+
{
|
|
8656
|
+
this.LastPoint.X=pt.Y;
|
|
8657
|
+
this.LastPoint.Y=pt.X;
|
|
8658
|
+
}
|
|
8659
|
+
else
|
|
8660
|
+
{
|
|
8661
|
+
this.LastPoint.X=pt.X;
|
|
8662
|
+
this.LastPoint.Y=pt.Y;
|
|
8663
|
+
}
|
|
8664
|
+
|
|
8638
8665
|
}
|
|
8639
8666
|
}
|
|
8640
8667
|
|
|
@@ -28037,6 +28064,12 @@ function ChartKLine()
|
|
|
28037
28064
|
TextColor: g_JSChartResource.DaySummaryKLine.TextColor,
|
|
28038
28065
|
LeftMargin:g_JSChartResource.DaySummaryKLine.LeftMargin,
|
|
28039
28066
|
}
|
|
28067
|
+
|
|
28068
|
+
this.PriceGapStyple=
|
|
28069
|
+
{
|
|
28070
|
+
Line:{ Color:g_JSChartResource.PriceGapStyple.Line.Color },
|
|
28071
|
+
Text:{ Color:g_JSChartResource.PriceGapStyple.Text.Color, Font: g_JSChartResource.PriceGapStyple.Text.Font }
|
|
28072
|
+
};
|
|
28040
28073
|
|
|
28041
28074
|
}
|
|
28042
28075
|
|
|
@@ -56041,6 +56074,11 @@ IFrameSplitOperator.RemoveMarketSuffix=function(symbol)
|
|
|
56041
56074
|
return symbol;
|
|
56042
56075
|
}
|
|
56043
56076
|
|
|
56077
|
+
IFrameSplitOperator.IsNumberString=function(strValue)
|
|
56078
|
+
{
|
|
56079
|
+
return /^\d+$/.test(strValue);
|
|
56080
|
+
}
|
|
56081
|
+
|
|
56044
56082
|
function FrameSplitKLinePriceY()
|
|
56045
56083
|
{
|
|
56046
56084
|
this.newMethod=IFrameSplitOperator; //派生
|
|
@@ -79471,6 +79509,13 @@ function JSChartResource()
|
|
|
79471
79509
|
CloseColor:"rgb(30,144,255)",
|
|
79472
79510
|
YCloseColor:"rgba(105,105,105,0.5)", //昨收线
|
|
79473
79511
|
AreaColor:'rgba(0,191,255,0.2)',
|
|
79512
|
+
|
|
79513
|
+
UpColor:"rgb(255,0,0)",
|
|
79514
|
+
UpAreaColor:"rgba(255,0,0,0.5)",
|
|
79515
|
+
DownColor:"rgb(0,128,0)",
|
|
79516
|
+
DownAreaColor:"rgba(0,128,0,0.5)",
|
|
79517
|
+
UnchangeColor:'rgb(90,90,90)',
|
|
79518
|
+
UnchangeAreaColor:'rgba(90,90,90,0.5)',
|
|
79474
79519
|
},
|
|
79475
79520
|
|
|
79476
79521
|
KLine:
|
|
@@ -79704,6 +79749,70 @@ function JSChartResource()
|
|
|
79704
79749
|
}
|
|
79705
79750
|
}
|
|
79706
79751
|
|
|
79752
|
+
//买卖5档
|
|
79753
|
+
this.StockInfo=
|
|
79754
|
+
{
|
|
79755
|
+
Header:
|
|
79756
|
+
{
|
|
79757
|
+
Name:
|
|
79758
|
+
{
|
|
79759
|
+
Font:`${20*GetDevicePixelRatio()}px 微软雅黑`,
|
|
79760
|
+
Color:"rgb(90,90,90)",
|
|
79761
|
+
Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
|
|
79762
|
+
},
|
|
79763
|
+
|
|
79764
|
+
Symbol:
|
|
79765
|
+
{
|
|
79766
|
+
Font:`${18*GetDevicePixelRatio()}px 微软雅黑`,
|
|
79767
|
+
Color:"rgb(90,90,90)",
|
|
79768
|
+
Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
|
|
79769
|
+
},
|
|
79770
|
+
|
|
79771
|
+
AryCell:
|
|
79772
|
+
[
|
|
79773
|
+
{ Font:`bold ${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } },
|
|
79774
|
+
{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } },
|
|
79775
|
+
{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`,Color:"rgb(90,90,90)", Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } }
|
|
79776
|
+
],
|
|
79777
|
+
|
|
79778
|
+
TextColor:"rgb(100,100,10)",
|
|
79779
|
+
|
|
79780
|
+
BottomLine:{ Enable:true, Color:"rgb(192,192,192)"} , //底部分割线
|
|
79781
|
+
},
|
|
79782
|
+
|
|
79783
|
+
BuySell:
|
|
79784
|
+
{
|
|
79785
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
79786
|
+
TitleColor:"rgb(90,90,90)",
|
|
79787
|
+
VolColor:"rgb(90,90,90)",
|
|
79788
|
+
Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
79789
|
+
CellMargin:{ Top:5, Bottom:5, Left:5, Right:5, YOffset:0 },
|
|
79790
|
+
BottomLine:{ Enable:true, Color:"rgb(192,192,192)"}, //底部分割线
|
|
79791
|
+
TopLine:{ Enable:false, Color:"rgb(192,192,192)"}, //底部分割线
|
|
79792
|
+
|
|
79793
|
+
CenterLine:
|
|
79794
|
+
{
|
|
79795
|
+
BuyColor:"rgb(228, 164, 54)",SellColor:"rgb(61, 147, 219)", NoneColor:"rgb(90,90,90)",
|
|
79796
|
+
Width:2*GetDevicePixelRatio()
|
|
79797
|
+
}
|
|
79798
|
+
},
|
|
79799
|
+
|
|
79800
|
+
Table:
|
|
79801
|
+
{
|
|
79802
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
79803
|
+
TitleColor:"rgb(90,90,90)",
|
|
79804
|
+
TextColor:"rgb(90,90,90)",
|
|
79805
|
+
Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
79806
|
+
CellMargin:{ Top:5, Bottom:5, Left:5, Right:5, YOffset:0 },
|
|
79807
|
+
},
|
|
79808
|
+
|
|
79809
|
+
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
79810
|
+
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
79811
|
+
UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
|
|
79812
|
+
|
|
79813
|
+
BorderColor:"rgb(192,192,192)"
|
|
79814
|
+
}
|
|
79815
|
+
|
|
79707
79816
|
|
|
79708
79817
|
//自定义风格
|
|
79709
79818
|
this.SetStyle=function(style)
|
|
@@ -80672,7 +80781,129 @@ function JSChartResource()
|
|
|
80672
80781
|
if (style.KLineCountDownPaint) this.SetKLineCountDownPaint(style.KLineCountDownPaint);
|
|
80673
80782
|
|
|
80674
80783
|
if (style.SmallFloatTooltipV2) this.SetSmallFloatTooltipV2(style.SmallFloatTooltipV2);
|
|
80784
|
+
if (style.StockInfo) this.SetStockInfo(style.StockInfo);
|
|
80785
|
+
|
|
80786
|
+
}
|
|
80787
|
+
|
|
80788
|
+
this.SetStockInfo=function(style)
|
|
80789
|
+
{
|
|
80790
|
+
var dest=this.StockInfo;
|
|
80791
|
+
|
|
80792
|
+
if (style.BuySell)
|
|
80793
|
+
{
|
|
80794
|
+
var item=style.BuySell;
|
|
80795
|
+
if (item.Font) dest.BuySell.Font=item.Font;
|
|
80796
|
+
if (item.TitleColor) dest.BuySell.TitleColor=item.TitleColor;
|
|
80797
|
+
if (item.VolColor) dest.BuySell.VolColor=item.VolColor;
|
|
80798
|
+
CopyMarginConfig(dest.BuySell.Margin, item.Margin);
|
|
80799
|
+
if (item.CellMargin)
|
|
80800
|
+
{
|
|
80801
|
+
var subItem=item.CellMargin;
|
|
80802
|
+
CopyMarginConfig(dest.BuySell.CellMargin, subItem);
|
|
80803
|
+
if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.BuySell.CellMargin.YOffset=subItem.YOffset
|
|
80804
|
+
}
|
|
80805
|
+
|
|
80806
|
+
if (item.BottomLine)
|
|
80807
|
+
{
|
|
80808
|
+
var subItem=item.BottomLine;
|
|
80809
|
+
if (subItem.Color) dest.BuySell.BottomLine.Color=subItem.Color;
|
|
80810
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.BuySell.BottomLine.Enable=subItem.Enable;
|
|
80811
|
+
}
|
|
80812
|
+
|
|
80813
|
+
if (item.TopLine)
|
|
80814
|
+
{
|
|
80815
|
+
var subItem=item.TopLine;
|
|
80816
|
+
if (subItem.Color) dest.BuySell.TopLine.Color=subItem.Color;
|
|
80817
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.BuySell.TopLine.Enable=subItem.Enable;
|
|
80818
|
+
}
|
|
80819
|
+
|
|
80820
|
+
if (item.CenterLine)
|
|
80821
|
+
{
|
|
80822
|
+
var subItem=item.CenterLine;
|
|
80823
|
+
if (subItem.BuyColor) dest.BuySell.CenterLine.BuyColor=subItem.BuyColor;
|
|
80824
|
+
if (subItem.SellColor) dest.BuySell.CenterLine.SellColor=subItem.SellColor;
|
|
80825
|
+
if (subItem.NoneColor) dest.BuySell.CenterLine.NoneColor=subItem.NoneColor;
|
|
80826
|
+
if (IFrameSplitOperator.IsNumber(subItem.Width)) dest.BuySell.CenterLine.Width=subItem.Width;
|
|
80827
|
+
}
|
|
80828
|
+
|
|
80829
|
+
|
|
80830
|
+
}
|
|
80831
|
+
|
|
80832
|
+
if (style.Table)
|
|
80833
|
+
{
|
|
80834
|
+
var item=style.Table;
|
|
80835
|
+
if (item.Font) dest.Table.Font=item.Font;
|
|
80836
|
+
if (item.TitleColor) dest.Table.TitleColor=item.TitleColor;
|
|
80837
|
+
if (item.TextColor) dest.Table.TextColor=item.TextColor;
|
|
80838
|
+
CopyMarginConfig(dest.Table.Margin, item.Margin);
|
|
80839
|
+
if (item.CellMargin)
|
|
80840
|
+
{
|
|
80841
|
+
var subItem=item.CellMargin;
|
|
80842
|
+
CopyMarginConfig(dest.Table.CellMargin, subItem);
|
|
80843
|
+
if (IFrameSplitOperator.IsNumber(subItem.YOffset)) dest.Table.CellMargin.YOffset=subItem.YOffset
|
|
80844
|
+
}
|
|
80845
|
+
}
|
|
80846
|
+
|
|
80847
|
+
if (style.Header)
|
|
80848
|
+
{
|
|
80849
|
+
var item=style.Header;
|
|
80850
|
+
if (item.Font) dest.Header.Font=item.Font;
|
|
80851
|
+
if (item.TextColor) dest.Header.TextColor=item.TextColor;
|
|
80852
|
+
if (item.Name)
|
|
80853
|
+
{
|
|
80854
|
+
var subItem=item.Name;
|
|
80855
|
+
if (subItem.Font) dest.Header.Name.Font=subItem.Font;
|
|
80856
|
+
if (subItem.Color) dest.Header.Name.Color=subItem.Color;
|
|
80857
|
+
if (subItem.Margin)
|
|
80858
|
+
{
|
|
80859
|
+
var margin=subItem.Margin;
|
|
80860
|
+
CopyMarginConfig(dest.Header.Name.Margin, margin);
|
|
80861
|
+
if (IFrameSplitOperator.IsNumber(margin.YOffset)) dest.Header.Name.Margin.YOffset=margin.YOffset
|
|
80862
|
+
}
|
|
80863
|
+
}
|
|
80675
80864
|
|
|
80865
|
+
if (item.Symbol)
|
|
80866
|
+
{
|
|
80867
|
+
var subItem=item.Symbol;
|
|
80868
|
+
if (subItem.Font) dest.Header.Symbol.Font=subItem.Font;
|
|
80869
|
+
if (subItem.Color) dest.Header.Symbol.Color=subItem.Color;
|
|
80870
|
+
if (subItem.Margin)
|
|
80871
|
+
{
|
|
80872
|
+
var margin=subItem.Margin;
|
|
80873
|
+
CopyMarginConfig(dest.Header.Symbol.Margin, margin);
|
|
80874
|
+
if (IFrameSplitOperator.IsNumber(margin.YOffset)) dest.Header.Symbol.Margin.YOffset=margin.YOffset
|
|
80875
|
+
}
|
|
80876
|
+
}
|
|
80877
|
+
|
|
80878
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AryCell))
|
|
80879
|
+
{
|
|
80880
|
+
for(var i=0;i<item.AryCell.length;++i)
|
|
80881
|
+
{
|
|
80882
|
+
var subItem=item.AryCell[i];
|
|
80883
|
+
if (!dest.Header.AryCell[i]) dest.Header.AryCell[i]={ };
|
|
80884
|
+
var subDest=dest.Header.AryCell[i];
|
|
80885
|
+
if (subItem.Font) subDest.Font=subItem.Font;
|
|
80886
|
+
if (subItem.Margin)
|
|
80887
|
+
{
|
|
80888
|
+
var margin=subItem.Margin;
|
|
80889
|
+
CopyMarginConfig(subDest.Margin, margin);
|
|
80890
|
+
if (IFrameSplitOperator.IsNumber(margin.YOffset)) subDest.YOffset=margin.YOffset
|
|
80891
|
+
}
|
|
80892
|
+
}
|
|
80893
|
+
}
|
|
80894
|
+
|
|
80895
|
+
if (item.BottomLine)
|
|
80896
|
+
{
|
|
80897
|
+
var subItem=item.BottomLine;
|
|
80898
|
+
if (subItem.Color) dest.Header.BottomLine.Color=subItem.Color;
|
|
80899
|
+
if (IFrameSplitOperator.IsBool(subItem.Enable)) dest.Header.BottomLine.Enable=subItem.Enable;
|
|
80900
|
+
}
|
|
80901
|
+
}
|
|
80902
|
+
|
|
80903
|
+
if (style.UpTextColor) dest.UpTextColor=style.UpTextColor;
|
|
80904
|
+
if (style.DownTextColor) dest.DownTextColor=style.DownTextColor;
|
|
80905
|
+
if (style.UnchangeTextColor) dest.UnchangeTextColor=style.UnchangeTextColor;
|
|
80906
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
80676
80907
|
}
|
|
80677
80908
|
|
|
80678
80909
|
this.SetSmallFloatTooltipV2=function(style)
|
|
@@ -80869,6 +81100,13 @@ function JSChartResource()
|
|
|
80869
81100
|
if (closeLine.CloseColor) this.Report.CloseLine.CloseColor=closeLine.CloseColor;
|
|
80870
81101
|
if (closeLine.YCloseColor) this.Report.CloseLine.YCloseColor=closeLine.YCloseColor;
|
|
80871
81102
|
if (closeLine.AreaColor) this.Report.CloseLine.AreaColor=closeLine.AreaColor;
|
|
81103
|
+
|
|
81104
|
+
if (closeLine.UpColor) this.Report.CloseLine.UpColor=closeLine.UpColor;
|
|
81105
|
+
if (closeLine.UpAreaColor) this.Report.CloseLine.UpAreaColor=closeLine.UpAreaColor;
|
|
81106
|
+
if (closeLine.DownColor) this.Report.CloseLine.DownColor=closeLine.DownColor;
|
|
81107
|
+
if (closeLine.DownAreaColor) this.Report.CloseLine.DownAreaColor=closeLine.DownAreaColor;
|
|
81108
|
+
if (closeLine.UnchangeColor) this.Report.CloseLine.UnchangeColor=closeLine.UnchangeColor;
|
|
81109
|
+
if (closeLine.UnchangeAreaColor) this.Report.CloseLine.UnchangeAreaColor=closeLine.UnchangeAreaColor;
|
|
80872
81110
|
}
|
|
80873
81111
|
|
|
80874
81112
|
if (item.KLine)
|
|
@@ -87262,6 +87500,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
87262
87500
|
if (!option.Windows) return;
|
|
87263
87501
|
var count=option.Windows.length;
|
|
87264
87502
|
if (count<=0) return;
|
|
87503
|
+
|
|
87504
|
+
this.Frame.RestoreIndexWindows();
|
|
87505
|
+
|
|
87265
87506
|
var currentLength=this.Frame.SubFrame.length;
|
|
87266
87507
|
|
|
87267
87508
|
var period=null, right=null, symbol=null;
|
|
@@ -93617,21 +93858,31 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93617
93858
|
|
|
93618
93859
|
this.UpdatePointByCursorIndex=function()
|
|
93619
93860
|
{
|
|
93620
|
-
|
|
93861
|
+
var x=null, y=null;
|
|
93862
|
+
x=this.Frame.GetXFromIndex(this.CursorIndex);
|
|
93621
93863
|
|
|
93622
93864
|
var index=this.CursorIndex;
|
|
93623
93865
|
index=parseInt(index.toFixed(0));
|
|
93624
93866
|
var data=this.GetKData();
|
|
93625
|
-
if (data.DataOffset+index
|
|
93867
|
+
if (data.DataOffset+index<data.Data.length)
|
|
93626
93868
|
{
|
|
93627
|
-
|
|
93869
|
+
var item=data.Data[data.DataOffset+index];
|
|
93870
|
+
var close=null;
|
|
93871
|
+
if (item.Before) close=item.Before.Close;
|
|
93872
|
+
else close=item.Close;
|
|
93873
|
+
y=this.Frame.GetYFromData(close);
|
|
93628
93874
|
}
|
|
93629
|
-
var item=data.Data[data.DataOffset+index];
|
|
93630
|
-
var close=null;
|
|
93631
|
-
if (item.Before) close=item.Before.Close;
|
|
93632
|
-
else close=item.Close
|
|
93633
93875
|
|
|
93634
|
-
this.
|
|
93876
|
+
if (this.IsHScreenModel())
|
|
93877
|
+
{
|
|
93878
|
+
this.LastPoint.X=y;
|
|
93879
|
+
this.LastPoint.Y=x;
|
|
93880
|
+
}
|
|
93881
|
+
else
|
|
93882
|
+
{
|
|
93883
|
+
this.LastPoint.X=x;
|
|
93884
|
+
this.LastPoint.Y=y;
|
|
93885
|
+
}
|
|
93635
93886
|
this.LastPoint.FrameID=0;
|
|
93636
93887
|
}
|
|
93637
93888
|
|
|
@@ -94182,6 +94433,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
94182
94433
|
this.ChangeIndexTemplate=function(option) //切换指标模板 可以设置指标窗口个数 每个窗口的指标, 只能从第3个指标窗口开始设置,前面2个指标窗口固定无法设置
|
|
94183
94434
|
{
|
|
94184
94435
|
if (!Array.isArray(option.Windows)) return;
|
|
94436
|
+
this.Frame.RestoreIndexWindows();
|
|
94437
|
+
|
|
94185
94438
|
var count=option.Windows.length;
|
|
94186
94439
|
var currentLength=this.Frame.SubFrame.length;
|
|
94187
94440
|
var startWindowIndex=2;
|
|
@@ -102640,6 +102893,18 @@ var MARKET_SUFFIX_NAME=
|
|
|
102640
102893
|
return false;
|
|
102641
102894
|
},
|
|
102642
102895
|
|
|
102896
|
+
IsHKStock:function(symbol) //港股股票 全是数字
|
|
102897
|
+
{
|
|
102898
|
+
if (!symbol) return false;
|
|
102899
|
+
var upperSymbol=symbol.toUpperCase();
|
|
102900
|
+
if (!this.IsHK(upperSymbol)) return false;
|
|
102901
|
+
|
|
102902
|
+
var shortSymbol=this.GetShortSymbol(symbol);
|
|
102903
|
+
if (IFrameSplitOperator.IsNumberString(shortSymbol)) return true;
|
|
102904
|
+
|
|
102905
|
+
return false;
|
|
102906
|
+
},
|
|
102907
|
+
|
|
102643
102908
|
GetMarketStatus:function(symbol) //获取市场状态 0=闭市 1=盘前 2=盘中 3=盘后
|
|
102644
102909
|
{
|
|
102645
102910
|
if (!symbol) return 0;
|
|
@@ -102980,7 +103245,18 @@ var MARKET_SUFFIX_NAME=
|
|
|
102980
103245
|
if (MARKET_SUFFIX_NAME.IsBJ(upperSymbol)) return 100; //单位手=100股
|
|
102981
103246
|
|
|
102982
103247
|
return 1;
|
|
103248
|
+
},
|
|
103249
|
+
|
|
103250
|
+
//获取不带后缀的代码
|
|
103251
|
+
GetShortSymbol:function(symbol)
|
|
103252
|
+
{
|
|
103253
|
+
if (!IFrameSplitOperator.IsString(symbol)) return null;
|
|
103254
|
+
var pos=symbol.lastIndexOf(".");
|
|
103255
|
+
if (pos<=0) return symbol;
|
|
103256
|
+
|
|
103257
|
+
return symbol.slice(0,pos);
|
|
102983
103258
|
}
|
|
103259
|
+
|
|
102984
103260
|
}
|
|
102985
103261
|
|
|
102986
103262
|
|
|
@@ -5296,7 +5296,15 @@ function ChartReport()
|
|
|
5296
5296
|
{
|
|
5297
5297
|
CloseColor:g_JSChartResource.Report.CloseLine.CloseColor,
|
|
5298
5298
|
YCloseColor:g_JSChartResource.Report.CloseLine.YCloseColor,
|
|
5299
|
-
AreaColor:g_JSChartResource.Report.CloseLine.AreaColor
|
|
5299
|
+
AreaColor:g_JSChartResource.Report.CloseLine.AreaColor,
|
|
5300
|
+
|
|
5301
|
+
UpColor:g_JSChartResource.Report.CloseLine.UpColor,
|
|
5302
|
+
DownColor:g_JSChartResource.Report.CloseLine.DownColor,
|
|
5303
|
+
UnchangeColor:g_JSChartResource.Report.CloseLine.UnchangeColor,
|
|
5304
|
+
|
|
5305
|
+
UpAreaColor:g_JSChartResource.Report.CloseLine.UpAreaColor,
|
|
5306
|
+
DownAreaColor:g_JSChartResource.Report.CloseLine.DownAreaColor,
|
|
5307
|
+
UnchangeAreaColor:g_JSChartResource.Report.CloseLine.UnchangeAreaColor,
|
|
5300
5308
|
}
|
|
5301
5309
|
|
|
5302
5310
|
//K线配置
|
|
@@ -5607,6 +5615,7 @@ function ChartReport()
|
|
|
5607
5615
|
else if (item.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID)
|
|
5608
5616
|
{
|
|
5609
5617
|
if (IFrameSplitOperator.IsBool(item.IsDrawArea)) colItem.IsDrawArea=item.IsDrawArea;
|
|
5618
|
+
if (IFrameSplitOperator.IsNumber(item.LineColorType)) colItem.LineColorType=item.LineColorType;
|
|
5610
5619
|
}
|
|
5611
5620
|
else if(item.Type==REPORT_COLUMN_ID.TIME_ID)
|
|
5612
5621
|
{
|
|
@@ -5735,7 +5744,7 @@ function ChartReport()
|
|
|
5735
5744
|
{ Type:REPORT_COLUMN_ID.VOL_IN_ID, Title:"内盘", TextAlign:"right", TextColor:g_JSChartResource.Report.DownTextColor, Width:null, MaxText:"8888.8擎" },
|
|
5736
5745
|
{ Type:REPORT_COLUMN_ID.VOL_OUT_ID, Title:"外盘", TextAlign:"right", TextColor:g_JSChartResource.Report.UpTextColor, Width:null, MaxText:"8888.8擎" },
|
|
5737
5746
|
|
|
5738
|
-
{ Type:REPORT_COLUMN_ID.CLOSE_LINE_ID, Title:"走势", TextAlign:"center", TextColor:g_JSChartResource.Report.CloseLineColor, Width:null, MaxText:"88888.88888" },
|
|
5747
|
+
{ Type:REPORT_COLUMN_ID.CLOSE_LINE_ID, Title:"走势", TextAlign:"center", TextColor:g_JSChartResource.Report.CloseLineColor, Width:null, MaxText:"88888.88888", LineColorType:0 },
|
|
5739
5748
|
|
|
5740
5749
|
|
|
5741
5750
|
{ Type:REPORT_COLUMN_ID.BUY_VOL_ID, Title:"买量", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Vol, Width:null, MaxText:"8888.8擎" },
|
|
@@ -8774,8 +8783,7 @@ function ChartReport()
|
|
|
8774
8783
|
this.Canvas.setLineDash([]);
|
|
8775
8784
|
}
|
|
8776
8785
|
|
|
8777
|
-
|
|
8778
|
-
else this.Canvas.strokeStyle=this.CloseLineConfig.CloseColor;
|
|
8786
|
+
this.Canvas.strokeStyle=this.GetCloseLineColor(lineData, column);
|
|
8779
8787
|
|
|
8780
8788
|
var bFirstPoint=true;
|
|
8781
8789
|
var ptFirst={}; //第1个点
|
|
@@ -8813,8 +8821,7 @@ function ChartReport()
|
|
|
8813
8821
|
this.Canvas.lineTo(x,yCenter);
|
|
8814
8822
|
this.Canvas.lineTo(ptFirst.X,yCenter);
|
|
8815
8823
|
this.Canvas.closePath();
|
|
8816
|
-
var areaColor=this.
|
|
8817
|
-
if (lineData.AreaColor) areaColor=lineData.AreaColor;
|
|
8824
|
+
var areaColor=this.GetCloseAreaColor(lineData, column);
|
|
8818
8825
|
this.SetFillStyle(areaColor,left,top, left,bottom);
|
|
8819
8826
|
this.Canvas.fill();
|
|
8820
8827
|
}
|
|
@@ -8823,6 +8830,48 @@ function ChartReport()
|
|
|
8823
8830
|
this.Canvas.restore();
|
|
8824
8831
|
}
|
|
8825
8832
|
|
|
8833
|
+
this.GetCloseLineColor=function(lineData, column)
|
|
8834
|
+
{
|
|
8835
|
+
var color=this.CloseLineConfig.CloseColor;
|
|
8836
|
+
if (lineData.Color)
|
|
8837
|
+
{
|
|
8838
|
+
color=lineData.Color;
|
|
8839
|
+
}
|
|
8840
|
+
else if (column.LineColorType==1)
|
|
8841
|
+
{
|
|
8842
|
+
var color= this.CloseLineConfig.UnchangeColor;
|
|
8843
|
+
if (IFrameSplitOperator.IsNumber(lineData.YClose) && IFrameSplitOperator.IsNonEmptyArray(lineData.Data) && IFrameSplitOperator.IsNumber(lineData.Data[ lineData.Data.length -1 ]))
|
|
8844
|
+
{
|
|
8845
|
+
var lastValue=lineData.Data[ lineData.Data.length -1 ];
|
|
8846
|
+
if (lastValue>lineData.YClose) color=this.CloseLineConfig.UpColor;
|
|
8847
|
+
else if (lastValue<lineData.YClose) color=this.CloseLineConfig.DownColor;
|
|
8848
|
+
}
|
|
8849
|
+
}
|
|
8850
|
+
|
|
8851
|
+
return color;
|
|
8852
|
+
}
|
|
8853
|
+
|
|
8854
|
+
this.GetCloseAreaColor=function(lineData, column)
|
|
8855
|
+
{
|
|
8856
|
+
var color=this.CloseLineConfig.AreaColor;
|
|
8857
|
+
if (lineData.AreaColor)
|
|
8858
|
+
{
|
|
8859
|
+
color=lineData.AreaColor;
|
|
8860
|
+
}
|
|
8861
|
+
else if (column.LineColorType==1)
|
|
8862
|
+
{
|
|
8863
|
+
var color= this.CloseLineConfig.UnchangeAreaColor;
|
|
8864
|
+
if (IFrameSplitOperator.IsNumber(lineData.YClose) && IFrameSplitOperator.IsNonEmptyArray(lineData.Data) && IFrameSplitOperator.IsNumber(lineData.Data[ lineData.Data.length -1 ]))
|
|
8865
|
+
{
|
|
8866
|
+
var lastValue=lineData.Data[ lineData.Data.length -1 ];
|
|
8867
|
+
if (lastValue>lineData.YClose) color=this.CloseLineConfig.UpAreaColor;
|
|
8868
|
+
else if (lastValue<lineData.YClose) color=this.CloseLineConfig.DownAreaColor;
|
|
8869
|
+
}
|
|
8870
|
+
}
|
|
8871
|
+
|
|
8872
|
+
return color;
|
|
8873
|
+
}
|
|
8874
|
+
|
|
8826
8875
|
//klineData={ Data:[ open, high, low, close ] }
|
|
8827
8876
|
this.DrawKLine=function(klineData, column, rtItem, data)
|
|
8828
8877
|
{
|
|
@@ -8892,7 +8941,31 @@ function ChartReport()
|
|
|
8892
8941
|
var distanceWidth=this.KLineConfig.DistanceWidth;
|
|
8893
8942
|
var xOffset=left;
|
|
8894
8943
|
var x, xLeft, xRight;
|
|
8944
|
+
var drawCount=0;
|
|
8895
8945
|
for(var i=0;i<aryKLine.length;++i,xOffset+=(dataWidth+distanceWidth))
|
|
8946
|
+
{
|
|
8947
|
+
xLeft=xOffset;
|
|
8948
|
+
xRight=xOffset+dataWidth;
|
|
8949
|
+
x=xLeft+(xRight-xLeft)/2;
|
|
8950
|
+
if (xRight>right) break;
|
|
8951
|
+
drawCount++;
|
|
8952
|
+
}
|
|
8953
|
+
|
|
8954
|
+
var xOffset=left;
|
|
8955
|
+
var startIndex=0;
|
|
8956
|
+
if (aryKLine.length>drawCount)
|
|
8957
|
+
{
|
|
8958
|
+
high=null,low=null;
|
|
8959
|
+
startIndex=aryKLine.length-drawCount;
|
|
8960
|
+
for(var i=startIndex;i<aryKLine.length;++i)
|
|
8961
|
+
{
|
|
8962
|
+
var item=aryKLine[i];
|
|
8963
|
+
if (high==null || high<item.High) high=item.High;
|
|
8964
|
+
if (low==null || low>item.Low) low=item.Low;
|
|
8965
|
+
}
|
|
8966
|
+
}
|
|
8967
|
+
|
|
8968
|
+
for(var i=startIndex;i<aryKLine.length;++i,xOffset+=(dataWidth+distanceWidth))
|
|
8896
8969
|
{
|
|
8897
8970
|
var item=aryKLine[i];
|
|
8898
8971
|
xLeft=xOffset;
|
|
@@ -8980,7 +9053,11 @@ function ChartReport()
|
|
|
8980
9053
|
}
|
|
8981
9054
|
else
|
|
8982
9055
|
{
|
|
8983
|
-
|
|
9056
|
+
this.Canvas.beginPath();
|
|
9057
|
+
var xBar=x;
|
|
9058
|
+
this.Canvas.moveTo(ToFixedPoint(xBar),ToFixedPoint(yBarTop));
|
|
9059
|
+
this.Canvas.lineTo(ToFixedPoint(xBar),ToFixedPoint(yBarBottom));
|
|
9060
|
+
this.Canvas.stroke();
|
|
8984
9061
|
}
|
|
8985
9062
|
}
|
|
8986
9063
|
|
|
@@ -1005,6 +1005,67 @@ function GetBlackStyle()
|
|
|
1005
1005
|
BGColor: { Selected:"rgb(234,85,4)", Default:"rgb(25,25,25)", MoveOn:"rgb(59,59,59)" },
|
|
1006
1006
|
BorderColor:"rgb(60,60,60)",
|
|
1007
1007
|
}
|
|
1008
|
+
},
|
|
1009
|
+
|
|
1010
|
+
StockInfo:
|
|
1011
|
+
{
|
|
1012
|
+
Header:
|
|
1013
|
+
{
|
|
1014
|
+
Name:
|
|
1015
|
+
{
|
|
1016
|
+
//Font:`${20*GetDevicePixelRatio()}px 微软雅黑`,
|
|
1017
|
+
Color:"rgb(255,255,0)",
|
|
1018
|
+
//Margin:{ Left:5, Top:10, Bottom:5, Right:10, YOffset:0 },
|
|
1019
|
+
},
|
|
1020
|
+
|
|
1021
|
+
Symbol:
|
|
1022
|
+
{
|
|
1023
|
+
//Font:`${18*GetDevicePixelRatio()}px 微软雅黑`,
|
|
1024
|
+
Color:"rgb(250,250,250)",
|
|
1025
|
+
//Margin:{ Left:5, Top:10, Bottom:5, Right:5, YOffset:0 },
|
|
1026
|
+
},
|
|
1027
|
+
|
|
1028
|
+
AryCell:
|
|
1029
|
+
[
|
|
1030
|
+
//{ Font:`bold ${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
|
|
1031
|
+
//{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:15, YOffset:0 } },
|
|
1032
|
+
//{ Font:`${16*GetDevicePixelRatio()}px 微软雅黑`, Margin:{ Left:5, Top:5, Bottom:5, Right:5, YOffset:0 } }
|
|
1033
|
+
],
|
|
1034
|
+
|
|
1035
|
+
TextColor:"rgb(250,250,250)",
|
|
1036
|
+
|
|
1037
|
+
BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
|
|
1038
|
+
},
|
|
1039
|
+
|
|
1040
|
+
BuySell:
|
|
1041
|
+
{
|
|
1042
|
+
//Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
1043
|
+
TitleColor:"rgb(250,250,250)",
|
|
1044
|
+
VolColor:"rgb(250,250,250)",
|
|
1045
|
+
//Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
1046
|
+
//CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
|
|
1047
|
+
BottomLine:{ Enable:true, Color:"rgb(60,60,60)"} , //底部分割线
|
|
1048
|
+
TopLine:{ Enable:false, Color:"rgb(60,60,60)"} , //顶部分割线
|
|
1049
|
+
|
|
1050
|
+
CenterLine:
|
|
1051
|
+
{
|
|
1052
|
+
NoneColor:"rgb(60,60,60)",
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
|
|
1056
|
+
Table:
|
|
1057
|
+
{
|
|
1058
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑',
|
|
1059
|
+
TitleColor:"rgb(250,250,250)",
|
|
1060
|
+
TextColor:"rgb(250,250,250)",
|
|
1061
|
+
//Margin:{ Left:0, Top:0, Bottom:0, Right:0 },
|
|
1062
|
+
//CellMargin:{ Top:5, Bottom:5, YOffset:0, Left:5, Right:5, YOffset:-5 },
|
|
1063
|
+
},
|
|
1064
|
+
|
|
1065
|
+
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
1066
|
+
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
1067
|
+
UnchangeTextColor:"rgb(90,90,90)", //平盘文字颜色
|
|
1068
|
+
BorderColor:'rgb(38,38,41)', //边框线
|
|
1008
1069
|
}
|
|
1009
1070
|
|
|
1010
1071
|
};
|