hqchart 1.1.15273 → 1.1.15299
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 +86 -73
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +48 -0
- package/src/jscommon/umychart.complier.js +76 -16
- package/src/jscommon/umychart.js +121 -31
- package/src/jscommon/umychart.resource/js/codemirror/javascript.js +1 -1
- package/src/jscommon/umychart.testdata.js +48 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +198 -48
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +48 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +198 -48
package/package.json
CHANGED
|
@@ -58274,6 +58274,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
58274
58274
|
HQData.APIIndex_BASELINE_BAR(data, callback);
|
|
58275
58275
|
else if (request.Data.indexname=="API_VERTLINE")
|
|
58276
58276
|
HQData.APIIndex_VERTLINE(data, callback);
|
|
58277
|
+
else if (request.Data.indexname=="API_DRAWTEXT_FIX")
|
|
58278
|
+
HQData.APIIndex_DRAWTEXT_FIX(data, callback);
|
|
58277
58279
|
|
|
58278
58280
|
else if (request.Data.indexname=="API_ERRORMESSAGE")
|
|
58279
58281
|
HQData.APIIndex_ErrorMessage(data, callback);
|
|
@@ -59969,6 +59971,52 @@ HQData.API_CHART_AREA_TEXT=function(data, callback)
|
|
|
59969
59971
|
}
|
|
59970
59972
|
|
|
59971
59973
|
|
|
59974
|
+
HQData.APIIndex_DRAWTEXT_FIX=function(data, callback)
|
|
59975
|
+
{
|
|
59976
|
+
data.PreventDefault=true;
|
|
59977
|
+
var hqchart=data.HQChart;
|
|
59978
|
+
var kData=hqchart.GetKData();
|
|
59979
|
+
|
|
59980
|
+
var textData=
|
|
59981
|
+
{
|
|
59982
|
+
name:'DRAWTEXT_FIX', type:1,
|
|
59983
|
+
Draw:
|
|
59984
|
+
{
|
|
59985
|
+
DrawType:'DRAWTEXT_FIX',
|
|
59986
|
+
DrawData: { Value:[], Text:[] },
|
|
59987
|
+
Position:{ X:0.5, Y:0.2, Type:1 }
|
|
59988
|
+
},
|
|
59989
|
+
Color:"rgb(30,144,255)",
|
|
59990
|
+
Font:`italic bold 2.2em "Fira Sans", sans-serif`,
|
|
59991
|
+
};
|
|
59992
|
+
|
|
59993
|
+
for(var i=0;i<kData.Data.length;++i)
|
|
59994
|
+
{
|
|
59995
|
+
var kItem=kData.Data[i];
|
|
59996
|
+
|
|
59997
|
+
if (i%50==1)
|
|
59998
|
+
{
|
|
59999
|
+
textData.Draw.DrawData.Value[i]=1;
|
|
60000
|
+
textData.Draw.DrawData.Text[i]=`${kItem.Date}-${i}`;
|
|
60001
|
+
}
|
|
60002
|
+
else
|
|
60003
|
+
{
|
|
60004
|
+
textData.Draw.DrawData.Value[i]=0;
|
|
60005
|
+
}
|
|
60006
|
+
}
|
|
60007
|
+
|
|
60008
|
+
var apiData=
|
|
60009
|
+
{
|
|
60010
|
+
code:0,
|
|
60011
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
60012
|
+
outdata: { date:kData.GetDate(), time:kData.GetTime(), outvar:[textData] }
|
|
60013
|
+
};
|
|
60014
|
+
|
|
60015
|
+
console.log('[HQData.APIIndex_PARTLINE] apiData ', apiData);
|
|
60016
|
+
callback(apiData);
|
|
60017
|
+
}
|
|
60018
|
+
|
|
60019
|
+
|
|
59972
60020
|
HQData.APIIndex_ErrorMessage=function(data, callback)
|
|
59973
60021
|
{
|
|
59974
60022
|
data.PreventDefault=true;
|
|
@@ -9841,6 +9841,17 @@ function JSDraw(errorHandler,symbolData)
|
|
|
9841
9841
|
let bSecondPont=false;
|
|
9842
9842
|
let lineCache={Start:{ },End:{ }, List:new Array()};
|
|
9843
9843
|
|
|
9844
|
+
function CopyLineData(aryDest, arySrc)
|
|
9845
|
+
{
|
|
9846
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySrc)) return;
|
|
9847
|
+
|
|
9848
|
+
for(var j=0; j<arySrc.length; ++j)
|
|
9849
|
+
{
|
|
9850
|
+
var item=arySrc[j];
|
|
9851
|
+
aryDest[item.ID]=item.Value;
|
|
9852
|
+
}
|
|
9853
|
+
}
|
|
9854
|
+
|
|
9844
9855
|
for(let i=0;i<count;++i)
|
|
9845
9856
|
{
|
|
9846
9857
|
drawData[i]=null;
|
|
@@ -9867,6 +9878,16 @@ function JSDraw(errorHandler,symbolData)
|
|
|
9867
9878
|
{
|
|
9868
9879
|
bSecondPont=true;
|
|
9869
9880
|
lineCache.End={ID:i, Value:data2[i]}; //第2个点
|
|
9881
|
+
|
|
9882
|
+
if (condition[i])
|
|
9883
|
+
{
|
|
9884
|
+
var lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
|
|
9885
|
+
CopyLineData(drawData,lineData);
|
|
9886
|
+
|
|
9887
|
+
bFirstPoint=true;
|
|
9888
|
+
bSecondPont=false;
|
|
9889
|
+
lineCache.Start={ID:i, Value:data[i]}; //第1个点
|
|
9890
|
+
}
|
|
9870
9891
|
}
|
|
9871
9892
|
}
|
|
9872
9893
|
else if (bFirstPoint==true && bSecondPont==true)
|
|
@@ -9878,13 +9899,8 @@ function JSDraw(errorHandler,symbolData)
|
|
|
9878
9899
|
}
|
|
9879
9900
|
else if (condition[i]) //条件1满足
|
|
9880
9901
|
{
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
for(let j in lineData)
|
|
9884
|
-
{
|
|
9885
|
-
let item=lineData[j];
|
|
9886
|
-
drawData[item.ID]=item.Value;
|
|
9887
|
-
}
|
|
9902
|
+
var lineData=this.CalculateDrawLine(lineCache); //计算2个点的线上 其他点的数值
|
|
9903
|
+
CopyLineData(drawData,lineData);
|
|
9888
9904
|
|
|
9889
9905
|
if (expand==1) this.CalculateDrawDataExtendLine(drawData, lineCache.Start.ID-2);//右延长线
|
|
9890
9906
|
|
|
@@ -9901,12 +9917,9 @@ function JSDraw(errorHandler,symbolData)
|
|
|
9901
9917
|
//最后一组线
|
|
9902
9918
|
if (bFirstPoint==true && bSecondPont==true)
|
|
9903
9919
|
{
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
let item=lineData[j];
|
|
9908
|
-
drawData[item.ID]=item.Value;
|
|
9909
|
-
}
|
|
9920
|
+
var lineData=this.CalculateDrawLine(lineCache);
|
|
9921
|
+
CopyLineData(drawData,lineData);
|
|
9922
|
+
|
|
9910
9923
|
}
|
|
9911
9924
|
}
|
|
9912
9925
|
|
|
@@ -10423,7 +10436,13 @@ function JSDraw(errorHandler,symbolData)
|
|
|
10423
10436
|
{
|
|
10424
10437
|
if (!numberData) return null;
|
|
10425
10438
|
|
|
10426
|
-
if (numberData.DataType==1)
|
|
10439
|
+
if (numberData.DataType==1)
|
|
10440
|
+
{
|
|
10441
|
+
var value=numberData.SingleValue;
|
|
10442
|
+
if (IFrameSplitOperator.IsNumber(value)) return value.toFixed(decimal);
|
|
10443
|
+
else if (value) return value.toString();
|
|
10444
|
+
else return null;
|
|
10445
|
+
}
|
|
10427
10446
|
|
|
10428
10447
|
if (!IFrameSplitOperator.IsNonEmptyArray(numberData.ArrayValue)) return null;
|
|
10429
10448
|
|
|
@@ -10809,6 +10828,12 @@ function JSDraw(errorHandler,symbolData)
|
|
|
10809
10828
|
return rgba;
|
|
10810
10829
|
}
|
|
10811
10830
|
|
|
10831
|
+
//设置字体
|
|
10832
|
+
this.CSSFONT=function(strFont)
|
|
10833
|
+
{
|
|
10834
|
+
return strFont;
|
|
10835
|
+
}
|
|
10836
|
+
|
|
10812
10837
|
this.UPCOLOR=function(color)
|
|
10813
10838
|
{
|
|
10814
10839
|
return color;
|
|
@@ -17854,6 +17879,7 @@ function JSExecute(ast,option)
|
|
|
17854
17879
|
let xOffset=null, yOffset=null;
|
|
17855
17880
|
var klineType=null;
|
|
17856
17881
|
var lineDash=null;
|
|
17882
|
+
var font=null;
|
|
17857
17883
|
for(let j=0; j<item.Expression.Expression.length; ++j)
|
|
17858
17884
|
{
|
|
17859
17885
|
let itemExpression=item.Expression.Expression[j];
|
|
@@ -17970,6 +17996,10 @@ function JSExecute(ast,option)
|
|
|
17970
17996
|
{
|
|
17971
17997
|
downColor=itemExpression.Out;
|
|
17972
17998
|
}
|
|
17999
|
+
else if (itemExpression.Callee.Name=="CSSFONT")
|
|
18000
|
+
{
|
|
18001
|
+
font=itemExpression.Out;
|
|
18002
|
+
}
|
|
17973
18003
|
else if (itemExpression.Callee.Name=="STICKTYPE")
|
|
17974
18004
|
{
|
|
17975
18005
|
stickType=itemExpression.Out;
|
|
@@ -18172,6 +18202,7 @@ function JSExecute(ast,option)
|
|
|
18172
18202
|
if (drawAlign>=0) outVar.DrawAlign=drawAlign;
|
|
18173
18203
|
if (drawVAlign>=0) outVar.DrawVAlign=drawVAlign;
|
|
18174
18204
|
if (fontSize>0) outVar.DrawFontSize=fontSize;
|
|
18205
|
+
if (font) outVar.Font=font;
|
|
18175
18206
|
if (bgConfig) outVar.Background=bgConfig;
|
|
18176
18207
|
if (vLineConfig) outVar.VerticalLine=vLineConfig;
|
|
18177
18208
|
if (IFrameSplitOperator.IsNumber(xOffset)) outVar.XOffset=xOffset;
|
|
@@ -18672,6 +18703,9 @@ function JSExecute(ast,option)
|
|
|
18672
18703
|
case "DOWNCOLOR":
|
|
18673
18704
|
node.Out=this.Draw.DOWNCOLOR(args[0]);
|
|
18674
18705
|
break;
|
|
18706
|
+
case "CSSFONT":
|
|
18707
|
+
node.Out=this.Draw.CSSFONT(args[0]);
|
|
18708
|
+
break;
|
|
18675
18709
|
case "STICKTYPE": //柱子类型
|
|
18676
18710
|
node.Out=this.Draw.STICKTYPE(args[0]);
|
|
18677
18711
|
break;
|
|
@@ -21386,6 +21420,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
21386
21420
|
}
|
|
21387
21421
|
|
|
21388
21422
|
if (varItem.DrawFontSize>0) chartText.FixedFontSize=varItem.DrawFontSize;
|
|
21423
|
+
if (varItem.Font) chartText.Font=varItem.Font;
|
|
21389
21424
|
if (varItem.Background) chartText.TextBG=varItem.Background;
|
|
21390
21425
|
if (varItem.VerticalLine) chartText.VerticalLine=varItem.VerticalLine;
|
|
21391
21426
|
|
|
@@ -21541,6 +21576,12 @@ function ScriptIndex(name,script,args,option)
|
|
|
21541
21576
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
21542
21577
|
if (!isNaN(width) && width>0) line.LineWidth=width;
|
|
21543
21578
|
}
|
|
21579
|
+
|
|
21580
|
+
if (varItem.IsDotLine)
|
|
21581
|
+
{
|
|
21582
|
+
line.IsDotLine=true; //虚线
|
|
21583
|
+
line.LineDash=g_JSChartResource.DOTLINE.LineDash.slice();
|
|
21584
|
+
}
|
|
21544
21585
|
|
|
21545
21586
|
let titleIndex=windowIndex+1;
|
|
21546
21587
|
line.Data.Data=varItem.Draw.DrawData;
|
|
@@ -23775,6 +23816,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
23775
23816
|
}
|
|
23776
23817
|
|
|
23777
23818
|
if (varItem.DrawFontSize>0) chartText.FixedFontSize=varItem.DrawFontSize;
|
|
23819
|
+
if (varItem.Font) chartText.Font=varItem.Font;
|
|
23778
23820
|
if (varItem.Background) chartText.TextBG=varItem.Background;
|
|
23779
23821
|
if (varItem.VerticalLine) chartText.VerticalLine=varItem.VerticalLine;
|
|
23780
23822
|
if (IFrameSplitOperator.IsNumber(varItem.XOffset)) chartText.ShowOffset.X=varItem.XOffset;
|
|
@@ -23973,6 +24015,12 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
23973
24015
|
let width=parseInt(varItem.LineWidth.replace("LINETHICK",""));
|
|
23974
24016
|
if (!isNaN(width) && width>0) chart.LineWidth=width;
|
|
23975
24017
|
}
|
|
24018
|
+
|
|
24019
|
+
if (varItem.IsDotLine)
|
|
24020
|
+
{
|
|
24021
|
+
chart.IsDotLine=true; //虚线
|
|
24022
|
+
chart.LineDash=g_JSChartResource.DOTLINE.LineDash.slice();
|
|
24023
|
+
}
|
|
23976
24024
|
|
|
23977
24025
|
let titleIndex=windowIndex+1;
|
|
23978
24026
|
chart.Data.Data=varItem.Draw.DrawData;
|
|
@@ -25770,14 +25818,14 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
25770
25818
|
var indexData=[];
|
|
25771
25819
|
var outVarItem={Name:item.name,Type:item.type};
|
|
25772
25820
|
if (item.color) outVarItem.Color=item.color;
|
|
25821
|
+
else if (item.Color) outVarItem.Color=item.Color;
|
|
25773
25822
|
if (IFrameSplitOperator.IsBool(item.IsShowTitle)) outVarItem.IsShowTitle = item.IsShowTitle; //是否显示指标标题
|
|
25774
25823
|
if (IFrameSplitOperator.IsNumber(item.DrawVAlign)) outVarItem.DrawVAlign = item.DrawVAlign;
|
|
25775
25824
|
if (IFrameSplitOperator.IsNumber(item.DrawAlign)) outVarItem.DrawAlign = item.DrawAlign;
|
|
25825
|
+
if (item.Font) outVarItem.Font=item.Font;
|
|
25776
25826
|
if (item.data)
|
|
25777
25827
|
{
|
|
25778
25828
|
outVarItem.Data=this.FittingArray(item.data,date,time,hqChart);
|
|
25779
|
-
|
|
25780
|
-
if (item.color) outVarItem.Color=item.color;
|
|
25781
25829
|
if (item.linewidth) outVarItem.LineWidth=item.linewidth;
|
|
25782
25830
|
if (IFrameSplitOperator.IsBool(item.isshow)) outVarItem.IsShow = item.isshow; //是否绘制线段
|
|
25783
25831
|
if (item.isexdata==true) outVarItem.IsExData = true;
|
|
@@ -25817,6 +25865,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
25817
25865
|
|
|
25818
25866
|
result.push(outVarItem);
|
|
25819
25867
|
}
|
|
25868
|
+
else if (draw.DrawType=="DRAWTEXT_FIX")
|
|
25869
|
+
{
|
|
25870
|
+
drawItem.Text=draw.Text;
|
|
25871
|
+
drawItem.Name=draw.Name;
|
|
25872
|
+
drawItem.DrawType=draw.DrawType;
|
|
25873
|
+
drawItem.DrawData={ Value:null, Text:null };
|
|
25874
|
+
drawItem.DrawData.Value=this.FittingArray(draw.DrawData.Value,date,time,hqChart);
|
|
25875
|
+
drawItem.DrawData.Text=this.FittingArray(draw.DrawData.Text,date,time,hqChart);
|
|
25876
|
+
drawItem.Position=draw.Position;
|
|
25877
|
+
outVarItem.Draw=drawItem;
|
|
25878
|
+
result.push(outVarItem);
|
|
25879
|
+
}
|
|
25820
25880
|
else if (draw.DrawType=="VERTLINE") //竖线
|
|
25821
25881
|
{
|
|
25822
25882
|
drawItem.Text=draw.Text;
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -3138,6 +3138,7 @@ var JSCHART_MENU_ID=
|
|
|
3138
3138
|
CMD_CORSS_X_TEXTALIGN_ID:61, //十字光标 底部文字对齐方式
|
|
3139
3139
|
|
|
3140
3140
|
CMD_CHANGE_YRIGHT_TEXT_FORMAT:62, //分时图主图 右侧刻度格式
|
|
3141
|
+
CMD_ENABLE_ZOOM_Y_ID:63, //放大缩小Y坐标 { FrameID:, Enable: , Range:{ Max:, Min: }}
|
|
3141
3142
|
|
|
3142
3143
|
|
|
3143
3144
|
CMD_REPORT_CHANGE_BLOCK_ID:100, //报价列表 切换板块ID
|
|
@@ -11940,6 +11941,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11940
11941
|
this.ResetFrameXYSplit();
|
|
11941
11942
|
this.Draw();
|
|
11942
11943
|
break;
|
|
11944
|
+
case JSCHART_MENU_ID.CMD_ENABLE_ZOOM_Y_ID:
|
|
11945
|
+
if (!srcParam) return false;
|
|
11946
|
+
if (this.EnableZoomYCoordinate) this.EnableZoomYCoordinate(srcParam);
|
|
11947
|
+
break;
|
|
11943
11948
|
}
|
|
11944
11949
|
}
|
|
11945
11950
|
|
|
@@ -30618,12 +30623,13 @@ function ChartKLine()
|
|
|
30618
30623
|
if (this.TradeIcon) this.DrawTradeIcon()
|
|
30619
30624
|
else this.DrawTrade();
|
|
30620
30625
|
|
|
30626
|
+
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
30627
|
+
|
|
30621
30628
|
this.Canvas.restore();
|
|
30622
30629
|
|
|
30623
30630
|
this.UpdateGlobalLatestPoint();
|
|
30624
30631
|
|
|
30625
30632
|
this.DrawPredictionLine();
|
|
30626
|
-
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
30627
30633
|
|
|
30628
30634
|
if (this.IsShowMaxMinPrice) //标注最大值最小值
|
|
30629
30635
|
{
|
|
@@ -40066,7 +40072,8 @@ function ChartDrawText()
|
|
|
40066
40072
|
|
|
40067
40073
|
this.ClassName='ChartDrawText'; //类名
|
|
40068
40074
|
this.Color="rgb(255,193,37)"; //线段颜色
|
|
40069
|
-
this.
|
|
40075
|
+
this.Font; //固定字体
|
|
40076
|
+
this.TextFont="14px 微软雅黑"; //输出使用的字体
|
|
40070
40077
|
this.TextBaseline="middle";
|
|
40071
40078
|
this.TextAlign='left';
|
|
40072
40079
|
this.Text
|
|
@@ -40141,8 +40148,9 @@ function ChartDrawText()
|
|
|
40141
40148
|
var isArrayText=Array.isArray(this.Text);
|
|
40142
40149
|
var drawTextInfo={ Text:{ Color:this.Color, Align:this.TextAlign, Baseline:this.TextBaseline }, Font:{ } };
|
|
40143
40150
|
|
|
40144
|
-
|
|
40145
|
-
|
|
40151
|
+
if (this.Font)
|
|
40152
|
+
this.TextFont=this.Font;
|
|
40153
|
+
else if (this.FixedFontSize>0) //固定字体大小模式
|
|
40146
40154
|
this.TextFont=`${this.FixedFontSize}px ${this.TextSize.FontName}`;
|
|
40147
40155
|
else //动态字体大小
|
|
40148
40156
|
this.TextFont=this.GetDynamicFont(dataWidth,distanceWidth,this.TextSize.Max,this.TextSize.Min,this.TextSize.Zoom,this.TextSize.FontName);
|
|
@@ -48992,6 +49000,7 @@ function KLineTooltipPaint()
|
|
|
48992
49000
|
this.ExtendLineWidth=2;
|
|
48993
49001
|
|
|
48994
49002
|
this.Font=[g_JSChartResource.TooltipPaint.TitleFont];
|
|
49003
|
+
|
|
48995
49004
|
|
|
48996
49005
|
this.HQChart;
|
|
48997
49006
|
this.KLineTitlePaint;
|
|
@@ -49111,6 +49120,8 @@ function KLineTooltipPaint()
|
|
|
49111
49120
|
lineWidth+=textWidth;
|
|
49112
49121
|
}
|
|
49113
49122
|
|
|
49123
|
+
if (IFrameSplitOperator.IsNumber(item.Space)) lineWidth+=item.Space;
|
|
49124
|
+
|
|
49114
49125
|
if (maxLineWidth<lineWidth) maxLineWidth=lineWidth;
|
|
49115
49126
|
|
|
49116
49127
|
height+=this.LineHeight;
|
|
@@ -49302,20 +49313,33 @@ function KLineTooltipPaint()
|
|
|
49302
49313
|
{
|
|
49303
49314
|
var item=titleData.AryText[i];
|
|
49304
49315
|
|
|
49316
|
+
var titleWidth=0;
|
|
49305
49317
|
if (item.Title)
|
|
49306
49318
|
{
|
|
49307
49319
|
this.Canvas.textAlign="left";
|
|
49308
49320
|
this.Canvas.fillStyle=item.TitleColor;
|
|
49309
49321
|
this.Canvas.fillText(item.Title,left,top);
|
|
49322
|
+
var titleWidth=this.Canvas.measureText(item.Title).width+2;
|
|
49310
49323
|
}
|
|
49311
49324
|
|
|
49312
49325
|
if (item.Text)
|
|
49313
49326
|
{
|
|
49314
|
-
|
|
49315
|
-
|
|
49316
|
-
|
|
49327
|
+
if (item.TextAlign==1) //1=左对齐 0=右对齐
|
|
49328
|
+
{
|
|
49329
|
+
var yText=left+titleWidth+2;
|
|
49330
|
+
if (IFrameSplitOperator.IsNumber(item.Space)) yText+=item.Space; //标题和数据内容间距
|
|
49331
|
+
this.Canvas.textAlign="left";
|
|
49332
|
+
this.Canvas.fillStyle=item.Color;
|
|
49333
|
+
this.Canvas.fillText(item.Text,yText,top);
|
|
49334
|
+
}
|
|
49335
|
+
else
|
|
49336
|
+
{
|
|
49337
|
+
this.Canvas.textAlign="right";
|
|
49338
|
+
this.Canvas.fillStyle=item.Color;
|
|
49339
|
+
this.Canvas.fillText(item.Text,right,top);
|
|
49340
|
+
}
|
|
49317
49341
|
}
|
|
49318
|
-
|
|
49342
|
+
|
|
49319
49343
|
top+=this.LineHeight+this.LineSpace;
|
|
49320
49344
|
}
|
|
49321
49345
|
|
|
@@ -53483,6 +53507,8 @@ function LatestPointFlashPaint()
|
|
|
53483
53507
|
this.ClassName='LatestPointFlashPaint';
|
|
53484
53508
|
this.HQChart;
|
|
53485
53509
|
|
|
53510
|
+
this.FlashType=0; //0=数据更新了闪烁, 1=一直显示
|
|
53511
|
+
//闪烁
|
|
53486
53512
|
this.Status=0;
|
|
53487
53513
|
this.UpdateTime=new Date();
|
|
53488
53514
|
this.FlashCount=0; //闪烁次数
|
|
@@ -53507,6 +53533,7 @@ function LatestPointFlashPaint()
|
|
|
53507
53533
|
if (option)
|
|
53508
53534
|
{
|
|
53509
53535
|
if (IFrameSplitOperator.IsNumber(option.Frequency)) this.Frequency=option.Frequency;
|
|
53536
|
+
if (IFrameSplitOperator.IsNumber(option.FlashType)) this.FlashType=option.FlashType;
|
|
53510
53537
|
}
|
|
53511
53538
|
}
|
|
53512
53539
|
|
|
@@ -53541,18 +53568,32 @@ function LatestPointFlashPaint()
|
|
|
53541
53568
|
if (!this.HQChart) return;
|
|
53542
53569
|
this.HQChart.ClearCanvas(this.FlashCanvas);
|
|
53543
53570
|
|
|
53544
|
-
if (this.
|
|
53545
|
-
|
|
53571
|
+
if (this.FlashType===1)
|
|
53572
|
+
{
|
|
53573
|
+
|
|
53574
|
+
}
|
|
53575
|
+
else
|
|
53546
53576
|
{
|
|
53547
|
-
|
|
53548
|
-
|
|
53577
|
+
if (this.FlashCount<=0) return;
|
|
53578
|
+
if (this.IsStatusChange())
|
|
53579
|
+
{
|
|
53580
|
+
this.Status=(this.Status+1)%2;
|
|
53581
|
+
--this.FlashCount;
|
|
53582
|
+
}
|
|
53583
|
+
if (this.Status==0) return;
|
|
53549
53584
|
}
|
|
53585
|
+
|
|
53586
|
+
|
|
53550
53587
|
|
|
53551
|
-
if (this.Status==0) return;
|
|
53552
53588
|
if (!this.HQChart.GlobalOption || !this.HQChart.GlobalOption.LatestPoint) return;
|
|
53553
53589
|
var point=this.HQChart.GlobalOption.LatestPoint;
|
|
53554
53590
|
if (!IFrameSplitOperator.IsNumber(point.X) || !IFrameSplitOperator.IsNumber(point.Y)) return;
|
|
53555
53591
|
|
|
53592
|
+
this.DrawPoint(point);
|
|
53593
|
+
}
|
|
53594
|
+
|
|
53595
|
+
this.DrawPoint=function(point)
|
|
53596
|
+
{
|
|
53556
53597
|
if (this.Style==1) this.GetChartColor();
|
|
53557
53598
|
|
|
53558
53599
|
this.FlashCanvas.fillStyle=this.BGColor;
|
|
@@ -58060,7 +58101,7 @@ function FrameSplitMinuteX()
|
|
|
58060
58101
|
width=width/GetDevicePixelRatio();
|
|
58061
58102
|
|
|
58062
58103
|
const minuteCoordinate = g_MinuteCoordinateData;
|
|
58063
|
-
var xcoordinateData = minuteCoordinate.GetCoordinateData(this.Symbol,width);
|
|
58104
|
+
var xcoordinateData = minuteCoordinate.GetCoordinateData(this.Symbol, width, this.Frame.GlobalOption);
|
|
58064
58105
|
var minuteCount=xcoordinateData.Count;
|
|
58065
58106
|
var minuteMiddleCount=xcoordinateData.MiddleCount>0? xcoordinateData.MiddleCount: parseInt(minuteCount/2);
|
|
58066
58107
|
var xcoordinate = xcoordinateData.Data;
|
|
@@ -60726,7 +60767,8 @@ function HQMinuteTimeStringFormat()
|
|
|
60726
60767
|
this.MultiDayBeforeOpenData; //多日分时图 盘前数据
|
|
60727
60768
|
this.MultiDayAfterCloseData; //多日分时图 收盘数据
|
|
60728
60769
|
|
|
60729
|
-
this.GetEventCallback
|
|
60770
|
+
this.GetEventCallback;
|
|
60771
|
+
this.HQChart;
|
|
60730
60772
|
|
|
60731
60773
|
this.GetBeforeOpen=function()
|
|
60732
60774
|
{
|
|
@@ -60824,7 +60866,9 @@ function HQMinuteTimeStringFormat()
|
|
|
60824
60866
|
if (this.Frame && this.Frame.MinuteCount) showIndex=index%this.Frame.MinuteCount;
|
|
60825
60867
|
|
|
60826
60868
|
var timeStringData=g_MinuteTimeStringData;
|
|
60827
|
-
var
|
|
60869
|
+
var globalOption=null;
|
|
60870
|
+
if (this.HQChart) globalOption=this.HQChart.GlobalOption;
|
|
60871
|
+
var timeData=timeStringData.GetTimeData(this.Symbol, globalOption);
|
|
60828
60872
|
if (!timeData) return false;
|
|
60829
60873
|
|
|
60830
60874
|
if (showIndex<0) showIndex=0;
|
|
@@ -78686,7 +78730,7 @@ function JSChartResource()
|
|
|
78686
78730
|
//虚线配置
|
|
78687
78731
|
this.DOTLINE=
|
|
78688
78732
|
{
|
|
78689
|
-
LineDash:[
|
|
78733
|
+
LineDash:[2*GetDevicePixelRatio(),2*GetDevicePixelRatio()] //虚线配置
|
|
78690
78734
|
}
|
|
78691
78735
|
|
|
78692
78736
|
this.DRAWSL=
|
|
@@ -88207,12 +88251,19 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88207
88251
|
var bDaySummary=klineChart.DaySummary.Enable;
|
|
88208
88252
|
var infoPosition=klineChart.InfoPosition;
|
|
88209
88253
|
var coordinateType=null, yCoordinateType=null; //坐标类型
|
|
88254
|
+
var bZoomYCoordinate=false;
|
|
88210
88255
|
var mainFrame=null;
|
|
88211
88256
|
if (this.Frame.SubFrame[0] && this.Frame.SubFrame[0].Frame) mainFrame=this.Frame.SubFrame[0].Frame;
|
|
88212
88257
|
if (mainFrame)
|
|
88213
88258
|
{
|
|
88214
88259
|
coordinateType=mainFrame.CoordinateType;
|
|
88215
|
-
if (mainFrame.YSplitOperator)
|
|
88260
|
+
if (mainFrame.YSplitOperator)
|
|
88261
|
+
{
|
|
88262
|
+
yCoordinateType=mainFrame.YSplitOperator.CoordinateType;
|
|
88263
|
+
if (mainFrame.YSplitOperator.FixedYMaxMin && mainFrame.YSplitOperator.EnableZoomUpDown)
|
|
88264
|
+
bZoomYCoordinate=true;
|
|
88265
|
+
}
|
|
88266
|
+
|
|
88216
88267
|
}
|
|
88217
88268
|
|
|
88218
88269
|
var aryKLineInfo=[]; //信息地雷
|
|
@@ -88474,6 +88525,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88474
88525
|
|
|
88475
88526
|
{ Name:"显示走完剩余时间", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_KLINE_DAY_SUMMARY_ID, Args:[!bDaySummary]}, Checked:bDaySummary},
|
|
88476
88527
|
|
|
88528
|
+
{ Name:"拖动Y轴", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_ZOOM_Y_ID, Args:[{FrameID:0, Enable:!bZoomYCoordinate }, ]}, Checked:bZoomYCoordinate},
|
|
88529
|
+
|
|
88477
88530
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
88478
88531
|
{
|
|
88479
88532
|
Name:"鼠标形状",
|
|
@@ -90347,6 +90400,41 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
90347
90400
|
|
|
90348
90401
|
return false;
|
|
90349
90402
|
}
|
|
90403
|
+
|
|
90404
|
+
//option={ FrameID:, Enable: }
|
|
90405
|
+
this.EnableZoomYCoordinate=function(option)
|
|
90406
|
+
{
|
|
90407
|
+
if (!option) return false;
|
|
90408
|
+
if (!IFrameSplitOperator.IsNumber(option.FrameID)) return false;
|
|
90409
|
+
if (!IFrameSplitOperator.IsBool(option.Enable)) return false;
|
|
90410
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Frame.SubFrame)) return false;
|
|
90411
|
+
if (option.FrameID<0 || option.FrameID>this.Frame.SubFrame.length) return false;
|
|
90412
|
+
|
|
90413
|
+
var item=this.Frame.SubFrame[option.FrameID];
|
|
90414
|
+
if (!item || !item.Frame || !item.Frame.YSplitOperator) return false;
|
|
90415
|
+
|
|
90416
|
+
var frame=item.Frame;
|
|
90417
|
+
var splitOper=frame.YSplitOperator;
|
|
90418
|
+
|
|
90419
|
+
if (option.Enable)
|
|
90420
|
+
{
|
|
90421
|
+
var max=frame.HorizontalMax, min=frame.HorizontalMin;
|
|
90422
|
+
if (!IFrameSplitOperator.IsNumber(max) || !IFrameSplitOperator.IsNumber(min)) return false;
|
|
90423
|
+
|
|
90424
|
+
splitOper.FixedYMaxMin={ Max:max, Min:min };
|
|
90425
|
+
splitOper.EnableZoomUpDown=true;
|
|
90426
|
+
frame.XYSplit=true;
|
|
90427
|
+
this.ChartDragSelectRect.EnableLButton=false;
|
|
90428
|
+
}
|
|
90429
|
+
else
|
|
90430
|
+
{
|
|
90431
|
+
splitOper.FixedYMaxMin=null
|
|
90432
|
+
splitOper.EnableZoomUpDown=false;
|
|
90433
|
+
frame.XYSplit=true;
|
|
90434
|
+
}
|
|
90435
|
+
|
|
90436
|
+
this.Draw();
|
|
90437
|
+
}
|
|
90350
90438
|
}
|
|
90351
90439
|
|
|
90352
90440
|
//API 返回数据 转化为array[]
|
|
@@ -93099,7 +93187,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
93099
93187
|
this.ChartCorssCursor.PtInClient=(x,y)=>{ return this.PtInClient(x,y); }
|
|
93100
93188
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
93101
93189
|
this.ChartCorssCursor.StringFormatX=g_DivTooltipDataForamt.Create("CorssCursor_Minute_XStringFormat");
|
|
93102
|
-
this.ChartCorssCursor.StringFormatX.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
93190
|
+
this.ChartCorssCursor.StringFormatX.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
|
|
93191
|
+
this.ChartCorssCursor.StringFormatX.HQChart=this;
|
|
93103
93192
|
this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
|
|
93104
93193
|
this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
93105
93194
|
this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;
|
|
@@ -99121,6 +99210,7 @@ function MinuteChartHScreenContainer(uielement)
|
|
|
99121
99210
|
this.ChartCorssCursor.Canvas=this.Canvas;
|
|
99122
99211
|
this.ChartCorssCursor.StringFormatX=g_DivTooltipDataForamt.Create("CorssCursor_Minute_XStringFormat");
|
|
99123
99212
|
this.ChartCorssCursor.StringFormatX.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
99213
|
+
this.ChartCorssCursor.StringFormatX.HQChart=this;
|
|
99124
99214
|
this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");
|
|
99125
99215
|
this.ChartCorssCursor.StringFormatY.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
99126
99216
|
this.ChartCorssCursor.StringFormatY.HQChart=this;
|
|
@@ -102757,7 +102847,7 @@ function MinuteTimeStringData()
|
|
|
102757
102847
|
return data;
|
|
102758
102848
|
}
|
|
102759
102849
|
|
|
102760
|
-
this.GetTimeData = function (symbol)
|
|
102850
|
+
this.GetTimeData = function (symbol, option)
|
|
102761
102851
|
{
|
|
102762
102852
|
if (!symbol) return this.SHSZ;
|
|
102763
102853
|
|
|
@@ -102773,7 +102863,7 @@ function MinuteTimeStringData()
|
|
|
102773
102863
|
if (MARKET_SUFFIX_NAME.IsUSA(upperSymbol)) return this.GetUSA(upperSymbol);
|
|
102774
102864
|
if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) || MARKET_SUFFIX_NAME.IsGZFE(upperSymbol))
|
|
102775
102865
|
{
|
|
102776
|
-
var splitData = g_FuturesTimeData.GetSplitData(upperSymbol);
|
|
102866
|
+
var splitData = g_FuturesTimeData.GetSplitData(upperSymbol, option);
|
|
102777
102867
|
if (!splitData) return null;
|
|
102778
102868
|
return this.GetFutures(splitData);
|
|
102779
102869
|
}
|
|
@@ -103238,8 +103328,8 @@ function MinuteCoordinateData()
|
|
|
103238
103328
|
}
|
|
103239
103329
|
|
|
103240
103330
|
|
|
103241
|
-
|
|
103242
|
-
this.GetCoordinateData = function (symbol, width)
|
|
103331
|
+
// option=GlobalOption
|
|
103332
|
+
this.GetCoordinateData = function (symbol, width, option)
|
|
103243
103333
|
{
|
|
103244
103334
|
var data = null;
|
|
103245
103335
|
if (!symbol)
|
|
@@ -103264,7 +103354,7 @@ function MinuteCoordinateData()
|
|
|
103264
103354
|
else if (MARKET_SUFFIX_NAME.IsJP(upperSymbol))
|
|
103265
103355
|
data=this.GetJPData(upperSymbol,width);
|
|
103266
103356
|
else if (MARKET_SUFFIX_NAME.IsCFFEX(upperSymbol) || MARKET_SUFFIX_NAME.IsCZCE(upperSymbol) || MARKET_SUFFIX_NAME.IsDCE(upperSymbol) || MARKET_SUFFIX_NAME.IsSHFE(upperSymbol) || MARKET_SUFFIX_NAME.IsGZFE(upperSymbol))
|
|
103267
|
-
return this.GetChinatFuturesData(upperSymbol,width);
|
|
103357
|
+
return this.GetChinatFuturesData(upperSymbol, width, option);
|
|
103268
103358
|
else if (MARKET_SUFFIX_NAME.IsUSA(upperSymbol))
|
|
103269
103359
|
data = this.GetUSAData(upperSymbol,width);
|
|
103270
103360
|
else if (MARKET_SUFFIX_NAME.IsFTSE(upperSymbol))
|
|
@@ -103346,9 +103436,9 @@ function MinuteCoordinateData()
|
|
|
103346
103436
|
return result;
|
|
103347
103437
|
}
|
|
103348
103438
|
|
|
103349
|
-
this.GetFuturesData = function (upperSymbol,width,timeData)
|
|
103439
|
+
this.GetFuturesData = function (upperSymbol,width,timeData, option)
|
|
103350
103440
|
{
|
|
103351
|
-
var splitData = timeData.GetSplitData(upperSymbol);
|
|
103441
|
+
var splitData = timeData.GetSplitData(upperSymbol, option);
|
|
103352
103442
|
if (!splitData) return null;
|
|
103353
103443
|
var stringData = g_MinuteTimeStringData.GetFutures(splitData);
|
|
103354
103444
|
if (!stringData) return null;
|
|
@@ -103387,9 +103477,9 @@ function MinuteCoordinateData()
|
|
|
103387
103477
|
return result;
|
|
103388
103478
|
}
|
|
103389
103479
|
|
|
103390
|
-
this.GetChinatFuturesData=function(upperSymbol,width)
|
|
103480
|
+
this.GetChinatFuturesData=function(upperSymbol, width, option)
|
|
103391
103481
|
{
|
|
103392
|
-
return this.GetFuturesData(upperSymbol,width, g_FuturesTimeData);
|
|
103482
|
+
return this.GetFuturesData(upperSymbol,width, g_FuturesTimeData, option);
|
|
103393
103483
|
}
|
|
103394
103484
|
|
|
103395
103485
|
this.GetNYMEXData=function(upperSymbol,width)
|
|
@@ -104195,7 +104285,7 @@ function FuturesTimeData()
|
|
|
104195
104285
|
}
|
|
104196
104286
|
}
|
|
104197
104287
|
|
|
104198
|
-
this.GetData=function(upperSymbol)
|
|
104288
|
+
this.GetData=function(upperSymbol, option)
|
|
104199
104289
|
{
|
|
104200
104290
|
var oneWord = upperSymbol.charAt(0);
|
|
104201
104291
|
var twoWords = upperSymbol.substr(0,2);
|
|
@@ -104240,9 +104330,9 @@ function FuturesTimeData()
|
|
|
104240
104330
|
return null;
|
|
104241
104331
|
}
|
|
104242
104332
|
|
|
104243
|
-
this.GetSplitData = function (upperSymbol)
|
|
104333
|
+
this.GetSplitData = function (upperSymbol, option)
|
|
104244
104334
|
{
|
|
104245
|
-
var data=this.GetData(upperSymbol);
|
|
104335
|
+
var data=this.GetData(upperSymbol, option);
|
|
104246
104336
|
if (!data) return null;
|
|
104247
104337
|
|
|
104248
104338
|
return this.TIME_SPLIT[data.Time];
|
|
@@ -110,7 +110,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
|
110
110
|
'DRAWTEXT':FUNCTION_NAME,'STICKLINE':FUNCTION_NAME,'DRAWBAND':FUNCTION_NAME,'DRAWKLINE':FUNCTION_NAME,
|
|
111
111
|
'PLOYLINE':FUNCTION_NAME,'POLYLINE':FUNCTION_NAME,'DRAWNUMBER':FUNCTION_NAME,'DRAWICON':FUNCTION_NAME,'SUPERDRAWTEXT':FUNCTION_NAME,
|
|
112
112
|
"DRAWTEXTREL":FUNCTION_NAME,"DRAWTEXTABS":FUNCTION_NAME,"DRAWGBK":FUNCTION_NAME,"FILLRGN":FUNCTION_NAME,"FLOATRGN":FUNCTION_NAME,
|
|
113
|
-
"HORLINE":FUNCTION_NAME,
|
|
113
|
+
"HORLINE":FUNCTION_NAME,"DRAWNUMBER_FIX":FUNCTION_NAME,"DRAWTEXT_FIX":FUNCTION_NAME,
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
//个股行情数据
|