hqchart 1.1.14853 → 1.1.14860
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 +50 -31
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +45 -1
- package/src/jscommon/umychart.PopMinuteChart.js +189 -9
- package/src/jscommon/umychart.complier.js +11 -1
- package/src/jscommon/umychart.js +107 -0
- package/src/jscommon/umychart.style.js +2 -2
- package/src/jscommon/umychart.testdata.js +45 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +121 -4
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +45 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +310 -13
|
@@ -4927,6 +4927,17 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4927
4927
|
|
|
4928
4928
|
this.AdjustTitleHeight(chart);
|
|
4929
4929
|
|
|
4930
|
+
if (option.LatestPointFlash)
|
|
4931
|
+
{
|
|
4932
|
+
var item=option.LatestPointFlash;
|
|
4933
|
+
if (item.Enable)
|
|
4934
|
+
{
|
|
4935
|
+
this.CreateExtraCanvasElement(JSChart.LatestPointFlashKey, { ZIndex:6 });
|
|
4936
|
+
chart.CreateExtendChart("LatestPointFlashPaint", item);
|
|
4937
|
+
chart.StartLatestPointFlash();
|
|
4938
|
+
}
|
|
4939
|
+
}
|
|
4940
|
+
|
|
4930
4941
|
return chart;
|
|
4931
4942
|
}
|
|
4932
4943
|
|
|
@@ -6944,6 +6955,8 @@ var JSCHART_EVENT_ID=
|
|
|
6944
6955
|
ON_CLICK_CHART_CELL:171, //点击图形单元
|
|
6945
6956
|
|
|
6946
6957
|
GET_DEFAULT_INDEX_PARAM:172, //获取指标默认参数
|
|
6958
|
+
|
|
6959
|
+
ON_RELOAD_RESOURCE:173,
|
|
6947
6960
|
}
|
|
6948
6961
|
|
|
6949
6962
|
var JSCHART_OPERATOR_ID=
|
|
@@ -13636,6 +13649,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13636
13649
|
this.ReloadChartCorssCursor(option,option.Resource);
|
|
13637
13650
|
this.ReloadChartDrawPictureResource(option.Resource);
|
|
13638
13651
|
|
|
13652
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_RELOAD_RESOURCE); //配色重新加载
|
|
13653
|
+
if (event && event.Callback)
|
|
13654
|
+
{
|
|
13655
|
+
var sendData={ Option:option };
|
|
13656
|
+
event.Callback(event, sendData, this);
|
|
13657
|
+
}
|
|
13658
|
+
|
|
13639
13659
|
if (option.Update && this.Update) this.Update( {UpdateCursorIndexType:2} ); //是否立即更新并重绘
|
|
13640
13660
|
else if (option.Draw==true || option.Redraw==true) this.Draw(); //是否立即重绘
|
|
13641
13661
|
|
|
@@ -31383,6 +31403,8 @@ function ChartKLine()
|
|
|
31383
31403
|
LeftMargin:g_JSChartResource.DaySummaryKLine.LeftMargin,
|
|
31384
31404
|
}
|
|
31385
31405
|
|
|
31406
|
+
this.LastPoint={ }; //最后一个点的信息 {X, Y, KItem:, Date:, Time: }
|
|
31407
|
+
|
|
31386
31408
|
this.AddToDaySummary=function(kItem)
|
|
31387
31409
|
{
|
|
31388
31410
|
if (!this.DaySummary.Enable) return false;
|
|
@@ -31886,6 +31908,8 @@ function ChartKLine()
|
|
|
31886
31908
|
if (i==this.Data.Data.length-1)
|
|
31887
31909
|
{
|
|
31888
31910
|
ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
|
|
31911
|
+
|
|
31912
|
+
this.LastPoint={ X:x, Y:yClose, KItem:data };
|
|
31889
31913
|
}
|
|
31890
31914
|
|
|
31891
31915
|
if (this.PriceGap.Enable )
|
|
@@ -32019,6 +32043,11 @@ function ChartKLine()
|
|
|
32019
32043
|
|
|
32020
32044
|
prePoint={ X:x, Y:yClose};
|
|
32021
32045
|
|
|
32046
|
+
if (i==this.Data.Data.length-1) //最后一个点
|
|
32047
|
+
{
|
|
32048
|
+
this.LastPoint={ X:x, Y:yClose, KItem:data };
|
|
32049
|
+
}
|
|
32050
|
+
|
|
32022
32051
|
if (this.PriceGap.Enable)
|
|
32023
32052
|
{
|
|
32024
32053
|
var yLow=this.GetYFromData(data.Low, false);
|
|
@@ -33982,8 +34011,29 @@ function ChartKLine()
|
|
|
33982
34011
|
this.Canvas.clip();
|
|
33983
34012
|
}
|
|
33984
34013
|
|
|
34014
|
+
this.ClearLastPoint=function()
|
|
34015
|
+
{
|
|
34016
|
+
this.LastPoint={ };
|
|
34017
|
+
if (this.ChartFrame.GlobalOption)
|
|
34018
|
+
{
|
|
34019
|
+
var item=this.ChartFrame.GlobalOption;
|
|
34020
|
+
item.LatestPoint=null;
|
|
34021
|
+
}
|
|
34022
|
+
}
|
|
34023
|
+
|
|
34024
|
+
this.UpdateGlobalLatestPoint=function()
|
|
34025
|
+
{
|
|
34026
|
+
if (this.Identify!="Main-KLine") return;
|
|
34027
|
+
if (!this.ChartFrame.GlobalOption) return;
|
|
34028
|
+
|
|
34029
|
+
var item=this.ChartFrame.GlobalOption;
|
|
34030
|
+
if (IFrameSplitOperator.IsNumber(this.LastPoint.X) && IFrameSplitOperator.IsNumber(this.LastPoint.Y))
|
|
34031
|
+
item.LatestPoint={ X:this.LastPoint.X, Y:this.LastPoint.Y };
|
|
34032
|
+
}
|
|
34033
|
+
|
|
33985
34034
|
this.Draw=function()
|
|
33986
34035
|
{
|
|
34036
|
+
this.ClearLastPoint();
|
|
33987
34037
|
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
33988
34038
|
if (this.IsShowIndexTitleOnly()) return;
|
|
33989
34039
|
if (this.IsHideScriptIndex()) return;
|
|
@@ -34040,6 +34090,7 @@ function ChartKLine()
|
|
|
34040
34090
|
this.Canvas.restore();
|
|
34041
34091
|
this.DrawPredictionLine();
|
|
34042
34092
|
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
34093
|
+
this.UpdateGlobalLatestPoint();
|
|
34043
34094
|
return;
|
|
34044
34095
|
}
|
|
34045
34096
|
else if (this.DrawType==2)
|
|
@@ -34111,6 +34162,8 @@ function ChartKLine()
|
|
|
34111
34162
|
|
|
34112
34163
|
this.Canvas.restore();
|
|
34113
34164
|
|
|
34165
|
+
this.UpdateGlobalLatestPoint();
|
|
34166
|
+
|
|
34114
34167
|
this.DrawPredictionLine();
|
|
34115
34168
|
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
34116
34169
|
|
|
@@ -56214,6 +56267,7 @@ function LatestPointFlashPaint()
|
|
|
56214
56267
|
this.BGColor=g_JSChartResource.LatestPointFlash.BGColor;
|
|
56215
56268
|
this.BGRadius=g_JSChartResource.LatestPointFlash.BGRadius;
|
|
56216
56269
|
this.DrawPriority=IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25;
|
|
56270
|
+
this.Style=1; //0=默认配置 1=图形保持一致
|
|
56217
56271
|
this.FlashCanvas;
|
|
56218
56272
|
|
|
56219
56273
|
this.SetOption=function(option)
|
|
@@ -56238,6 +56292,23 @@ function LatestPointFlashPaint()
|
|
|
56238
56292
|
this.BGRadius=g_JSChartResource.LatestPointFlash.BGRadius;
|
|
56239
56293
|
}
|
|
56240
56294
|
|
|
56295
|
+
this.GetChartColor=function()
|
|
56296
|
+
{
|
|
56297
|
+
var chart=this.HQChart.ChartPaint[0];
|
|
56298
|
+
if (!chart) return;
|
|
56299
|
+
|
|
56300
|
+
if (chart.ClassName=="ChartKLine")
|
|
56301
|
+
{
|
|
56302
|
+
this.PointColor=chart.CloseLineColor;
|
|
56303
|
+
this.BGColor=IChartDrawPicture.ColorToRGBA(chart.CloseLineColor, 0.6);
|
|
56304
|
+
}
|
|
56305
|
+
else if (chart.ClassName=="ChartMinutePriceLine")
|
|
56306
|
+
{
|
|
56307
|
+
this.PointColor=chart.Color;
|
|
56308
|
+
this.BGColor=IChartDrawPicture.ColorToRGBA(chart.Color, 0.6);
|
|
56309
|
+
}
|
|
56310
|
+
}
|
|
56311
|
+
|
|
56241
56312
|
this.Draw=function()
|
|
56242
56313
|
{
|
|
56243
56314
|
if (!this.FlashCanvas) return;
|
|
@@ -56256,6 +56327,8 @@ function LatestPointFlashPaint()
|
|
|
56256
56327
|
var point=this.HQChart.GlobalOption.LatestPoint;
|
|
56257
56328
|
if (!IFrameSplitOperator.IsNumber(point.X) || !IFrameSplitOperator.IsNumber(point.Y)) return;
|
|
56258
56329
|
|
|
56330
|
+
if (this.Style==1) this.GetChartColor();
|
|
56331
|
+
|
|
56259
56332
|
this.FlashCanvas.fillStyle=this.BGColor;
|
|
56260
56333
|
this.FlashCanvas.beginPath();
|
|
56261
56334
|
this.FlashCanvas.arc(point.X,point.Y,this.BGRadius,0,360,false);
|
|
@@ -79207,6 +79280,21 @@ function JSChartResource()
|
|
|
79207
79280
|
{
|
|
79208
79281
|
LineColor:"rgba(255,165,0,0.6)",
|
|
79209
79282
|
LineWidth:2,
|
|
79283
|
+
},
|
|
79284
|
+
|
|
79285
|
+
Title:
|
|
79286
|
+
{
|
|
79287
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
|
|
79288
|
+
},
|
|
79289
|
+
|
|
79290
|
+
CorssCursor:
|
|
79291
|
+
{
|
|
79292
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`
|
|
79293
|
+
},
|
|
79294
|
+
|
|
79295
|
+
Frame:
|
|
79296
|
+
{
|
|
79297
|
+
Font:`${12*GetDevicePixelRatio()}px 微软雅黑`, //刻度坐标
|
|
79210
79298
|
}
|
|
79211
79299
|
}
|
|
79212
79300
|
|
|
@@ -80889,6 +80977,18 @@ function JSChartResource()
|
|
|
80889
80977
|
if (item.Mark.LineColor) dest.Mark.LineColor=item.Mark.LineColor;
|
|
80890
80978
|
if (IFrameSplitOperator.IsNumber(item.Mark.LineWidth)) dest.Mark.LineWidth=item.Mark.LineWidth;
|
|
80891
80979
|
}
|
|
80980
|
+
if (item.Title)
|
|
80981
|
+
{
|
|
80982
|
+
if (item.Title.Font) dest.Title.Font=item.Title.Font;
|
|
80983
|
+
}
|
|
80984
|
+
if (item.CorssCursor)
|
|
80985
|
+
{
|
|
80986
|
+
if (item.CorssCursor.Font) dest.CorssCursor.Font=item.CorssCursor.Font;
|
|
80987
|
+
}
|
|
80988
|
+
if (item.Frame)
|
|
80989
|
+
{
|
|
80990
|
+
if (item.Frame.Font) dest.Frame.Font=item.Frame.Font;
|
|
80991
|
+
}
|
|
80892
80992
|
}
|
|
80893
80993
|
|
|
80894
80994
|
if (style.PopKLineChart)
|
|
@@ -86470,6 +86570,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86470
86570
|
|
|
86471
86571
|
if (!bFind) return;
|
|
86472
86572
|
}
|
|
86573
|
+
|
|
86574
|
+
if (data.LatestPointFlash) //最新数据闪烁
|
|
86575
|
+
{
|
|
86576
|
+
var item=data.LatestPointFlash;
|
|
86577
|
+
if (IFrameSplitOperator.IsNumber(item.FlashCount))
|
|
86578
|
+
this.SetLatestPointFlash(item.FlashCount)
|
|
86579
|
+
}
|
|
86473
86580
|
|
|
86474
86581
|
var bindData=new ChartData();
|
|
86475
86582
|
bindData.Data=this.SourceData.Data;
|
|
@@ -127307,7 +127414,7 @@ var SCRIPT_CHART_NAME=
|
|
|
127307
127414
|
CLIP_COLOR_STICK:"CLIP_COLOR_STICK", //上下柱子 裁剪
|
|
127308
127415
|
|
|
127309
127416
|
DRAW_KLINE:"DRAWKLINE",
|
|
127310
|
-
BASELINE_BAR:"BASELINE_BAR"
|
|
127417
|
+
BASELINE_BAR:"BASELINE_BAR",
|
|
127311
127418
|
}
|
|
127312
127419
|
|
|
127313
127420
|
|
|
@@ -132266,6 +132373,16 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
132266
132373
|
|
|
132267
132374
|
result.push(outVarItem);
|
|
132268
132375
|
}
|
|
132376
|
+
else if (draw.DrawType=="VERTLINE") //竖线
|
|
132377
|
+
{
|
|
132378
|
+
drawItem.Text=draw.Text;
|
|
132379
|
+
drawItem.Name=draw.Name;
|
|
132380
|
+
drawItem.DrawType=draw.DrawType;
|
|
132381
|
+
drawItem.DrawData={ Data:this.FittingArray(draw.DrawData.Data,date,time,hqChart) };
|
|
132382
|
+
outVarItem.Draw=drawItem;
|
|
132383
|
+
|
|
132384
|
+
result.push(outVarItem);
|
|
132385
|
+
}
|
|
132269
132386
|
else if (draw.DrawType=='STICKLINE') //柱子
|
|
132270
132387
|
{
|
|
132271
132388
|
drawItem.Name=draw.Name;
|
|
@@ -133867,7 +133984,7 @@ function GetBlackStyle()
|
|
|
133867
133984
|
MultiDayBorderPen:"rgba(236,236,236,0.5)",
|
|
133868
133985
|
FrameSplitPen: "rgba(236,236,236,0.13)", //分割线
|
|
133869
133986
|
FrameSplitTextColor: "rgb(220,220,220)", //刻度文字颜色
|
|
133870
|
-
FrameSplitTextFont:
|
|
133987
|
+
FrameSplitTextFont: 14*GetDevicePixelRatio() +"px 微软雅黑", //坐标刻度文字字体
|
|
133871
133988
|
FrameTitleBGColor: "rgb(0,0,0)", //标题栏背景色
|
|
133872
133989
|
OverlayIndexTitleBGColor:'rgba(0,0,0,0.7)', //叠加指标背景色
|
|
133873
133990
|
|
|
@@ -133903,7 +134020,7 @@ function GetBlackStyle()
|
|
|
133903
134020
|
|
|
133904
134021
|
CorssCursorBGColor: "rgb(43,54,69)", //十字光标背景
|
|
133905
134022
|
CorssCursorTextColor: "rgb(255,255,255)",
|
|
133906
|
-
CorssCursorTextFont:
|
|
134023
|
+
CorssCursorTextFont: 14*GetDevicePixelRatio() +"px 微软雅黑",
|
|
133907
134024
|
CorssCursorHPenColor: "rgb(130,130,130)", //十字光标线段颜色
|
|
133908
134025
|
CorssCursorVPenColor: "rgb(130,130,130)", //十字光标线段颜色
|
|
133909
134026
|
|
|
@@ -155127,6 +155244,10 @@ function JSPopMinuteChart()
|
|
|
155127
155244
|
this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
|
|
155128
155245
|
this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
|
|
155129
155246
|
|
|
155247
|
+
this.TitleFont=g_JSChartResource.PopMinuteChart.Title.Font; //指标标题字体
|
|
155248
|
+
this.CorssCursorFont=g_JSChartResource.PopMinuteChart.CorssCursor.Font; //十字光标
|
|
155249
|
+
this.FrameSplitTextFont=g_JSChartResource.PopMinuteChart.Frame.Font; //刻度文字
|
|
155250
|
+
|
|
155130
155251
|
this.Minute=
|
|
155131
155252
|
{
|
|
155132
155253
|
Option:JSPopMinuteChart.GetMinuteOption(),
|
|
@@ -155208,13 +155329,31 @@ function JSPopMinuteChart()
|
|
|
155208
155329
|
callback:(event, data, obj)=>{ this.OnKeyDown(event, data, obj); }
|
|
155209
155330
|
};
|
|
155210
155331
|
|
|
155332
|
+
var reloadResourceEvent=
|
|
155333
|
+
{
|
|
155334
|
+
event:JSCHART_EVENT_ID.ON_RELOAD_RESOURCE,
|
|
155335
|
+
callback:(event, data, obj)=>{ this.LoadChartResource(obj); }
|
|
155336
|
+
}
|
|
155337
|
+
|
|
155338
|
+
var splitXEvent=
|
|
155339
|
+
{
|
|
155340
|
+
event:JSCHART_EVENT_ID.ON_SPLIT_XCOORDINATE,
|
|
155341
|
+
callback:(event, data, obj)=>{ this.OnSplitXCoordinate(event, data, obj); }
|
|
155342
|
+
};
|
|
155343
|
+
|
|
155344
|
+
var splitYEvent=
|
|
155345
|
+
{
|
|
155346
|
+
event:JSCHART_EVENT_ID.ON_SPLIT_YCOORDINATE,
|
|
155347
|
+
callback:(event, data, obj)=>{ this.OnSplitYCoordinate(event, data, obj); }
|
|
155348
|
+
}
|
|
155349
|
+
|
|
155211
155350
|
if (Array.isArray(this.Minute.Option.EventCallback))
|
|
155212
155351
|
{
|
|
155213
|
-
this.Minute.Option.EventCallback.
|
|
155352
|
+
this.Minute.Option.EventCallback.unshift(keyDownEvent,reloadResourceEvent,splitYEvent,splitYEvent);
|
|
155214
155353
|
}
|
|
155215
155354
|
else
|
|
155216
155355
|
{
|
|
155217
|
-
this.Minute.Option.EventCallback=[keyDownEvent];
|
|
155356
|
+
this.Minute.Option.EventCallback=[keyDownEvent,reloadResourceEvent,splitXEvent,splitYEvent];
|
|
155218
155357
|
}
|
|
155219
155358
|
|
|
155220
155359
|
chart.SetOption(this.Minute.Option); //设置K线配置
|
|
@@ -155253,7 +155392,7 @@ function JSPopMinuteChart()
|
|
|
155253
155392
|
|
|
155254
155393
|
this.OnCreateHQChart=function(chart)
|
|
155255
155394
|
{
|
|
155256
|
-
|
|
155395
|
+
this.LoadChartResource(chart);
|
|
155257
155396
|
}
|
|
155258
155397
|
|
|
155259
155398
|
this.Destroy=function()
|
|
@@ -155374,6 +155513,10 @@ function JSPopMinuteChart()
|
|
|
155374
155513
|
this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
|
|
155375
155514
|
this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
|
|
155376
155515
|
|
|
155516
|
+
this.TitleFont=g_JSChartResource.PopMinuteChart.Title.Font;
|
|
155517
|
+
this.CorssCursorFont=g_JSChartResource.PopMinuteChart.CorssCursor.Font; //十字光标
|
|
155518
|
+
this.FrameSplitTextFont=g_JSChartResource.PopMinuteChart.Frame.Font
|
|
155519
|
+
|
|
155377
155520
|
if (!this.DivDialog) return;
|
|
155378
155521
|
|
|
155379
155522
|
this.UpdateStyle();
|
|
@@ -155381,6 +155524,35 @@ function JSPopMinuteChart()
|
|
|
155381
155524
|
if (this.Minute.JSChart) this.Minute.JSChart.ReloadResource(option);
|
|
155382
155525
|
}
|
|
155383
155526
|
|
|
155527
|
+
this.LoadChartResource=function(chart)
|
|
155528
|
+
{
|
|
155529
|
+
if (IFrameSplitOperator.IsNonEmptyArray(chart.TitlePaint))
|
|
155530
|
+
{
|
|
155531
|
+
for(var i=0;i<chart.TitlePaint.length;++i)
|
|
155532
|
+
{
|
|
155533
|
+
var item=chart.TitlePaint[i];
|
|
155534
|
+
if (!item) continue;
|
|
155535
|
+
|
|
155536
|
+
item.Font=this.TitleFont;
|
|
155537
|
+
}
|
|
155538
|
+
}
|
|
155539
|
+
|
|
155540
|
+
if (IFrameSplitOperator.IsNonEmptyArray(chart.WindowIndex))
|
|
155541
|
+
{
|
|
155542
|
+
for(var i=0;i<chart.WindowIndex.length;++i) //去掉指标里面的字体
|
|
155543
|
+
{
|
|
155544
|
+
var item=chart.WindowIndex[i];
|
|
155545
|
+
if (!item) continue;
|
|
155546
|
+
item.TitleFont=null;
|
|
155547
|
+
}
|
|
155548
|
+
}
|
|
155549
|
+
|
|
155550
|
+
if (chart.ChartCorssCursor)
|
|
155551
|
+
{
|
|
155552
|
+
chart.ChartCorssCursor.Font=this.CorssCursorFont;
|
|
155553
|
+
}
|
|
155554
|
+
}
|
|
155555
|
+
|
|
155384
155556
|
this.SetLanguage=function(language)
|
|
155385
155557
|
{
|
|
155386
155558
|
if (!this.DivDialog) return;
|
|
@@ -155507,6 +155679,34 @@ function JSPopMinuteChart()
|
|
|
155507
155679
|
finder.Chart.ClearData();
|
|
155508
155680
|
this.HQChart.Draw();
|
|
155509
155681
|
}
|
|
155682
|
+
|
|
155683
|
+
this.OnSplitXCoordinate=function(event, data, obj)
|
|
155684
|
+
{
|
|
155685
|
+
var frame=data.Frame;
|
|
155686
|
+
if (IFrameSplitOperator.IsNonEmptyArray(frame.VerticalInfo))
|
|
155687
|
+
{
|
|
155688
|
+
for(var i=0;i<frame.VerticalInfo.length;++i)
|
|
155689
|
+
{
|
|
155690
|
+
var item=frame.VerticalInfo[i];
|
|
155691
|
+
if (!item) continue;
|
|
155692
|
+
if (item.Font) item.Font=this.FrameSplitTextFont;
|
|
155693
|
+
}
|
|
155694
|
+
}
|
|
155695
|
+
}
|
|
155696
|
+
|
|
155697
|
+
this.OnSplitYCoordinate=function(event, data, obj)
|
|
155698
|
+
{
|
|
155699
|
+
var frame=data.Frame;
|
|
155700
|
+
if (IFrameSplitOperator.IsNonEmptyArray(frame.HorizontalInfo))
|
|
155701
|
+
{
|
|
155702
|
+
for(var i=0;i<frame.HorizontalInfo.length;++i)
|
|
155703
|
+
{
|
|
155704
|
+
var item=frame.HorizontalInfo[i];
|
|
155705
|
+
if (!item) continue;
|
|
155706
|
+
if (item.Font) item.Font=this.FrameSplitTextFont;
|
|
155707
|
+
}
|
|
155708
|
+
}
|
|
155709
|
+
}
|
|
155510
155710
|
}
|
|
155511
155711
|
|
|
155512
155712
|
|
|
@@ -155534,7 +155734,7 @@ JSPopMinuteChart.GetMinuteOption=function()
|
|
|
155534
155734
|
//BeforeOpen:{IsShow:true, Width:120, IsShowMultiDay:true, MulitiDayWidth:100, },
|
|
155535
155735
|
//AfterClose:{IsShow:true, Width:100, IsShowMultiDay:true, MulitiDayWidth:50, ShareVol:2 }, //ShareVol:0=盘后成交量独立坐标, 1==盘后成交量主图共用 2==盘后成交量盘前共用
|
|
155536
155736
|
|
|
155537
|
-
CorssCursorInfo:{ Left:
|
|
155737
|
+
CorssCursorInfo:{ Left:1, Right:1, Bottom:1 },
|
|
155538
155738
|
|
|
155539
155739
|
MinuteLine:
|
|
155540
155740
|
{
|
|
@@ -155562,8 +155762,8 @@ JSPopMinuteChart.GetMinuteOption=function()
|
|
|
155562
155762
|
{
|
|
155563
155763
|
Left:20, //左边间距
|
|
155564
155764
|
Right:20, //右边间距
|
|
155565
|
-
Top:
|
|
155566
|
-
Bottom:
|
|
155765
|
+
Top:20,
|
|
155766
|
+
Bottom:20,
|
|
155567
155767
|
|
|
155568
155768
|
AutoLeft:{ Blank:10, MinWidth:60 },
|
|
155569
155769
|
AutoRight:{ Blank:10, MinWidth:60 },
|
|
@@ -155594,6 +155794,11 @@ function JSTooltipMinuteChart()
|
|
|
155594
155794
|
|
|
155595
155795
|
this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
|
|
155596
155796
|
this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
|
|
155797
|
+
|
|
155798
|
+
this.TitleFont=g_JSChartResource.PopMinuteChart.Title.Font; //指标标题字体
|
|
155799
|
+
this.CorssCursorFont=g_JSChartResource.PopMinuteChart.CorssCursor.Font; //十字光标
|
|
155800
|
+
this.FrameSplitTextFont=g_JSChartResource.PopMinuteChart.Frame.Font; //刻度文字
|
|
155801
|
+
|
|
155597
155802
|
this.OnCreatedCallback;
|
|
155598
155803
|
|
|
155599
155804
|
this.Minute=
|
|
@@ -155641,6 +155846,35 @@ function JSTooltipMinuteChart()
|
|
|
155641
155846
|
if (this.HQChart) this.Minute.Option.Language=g_JSChartLocalization.GetLanguageName(this.HQChart.LanguageID);
|
|
155642
155847
|
this.Minute.Option.OnCreatedCallback=(chart)=>{ this.OnCreateHQChart(chart); }
|
|
155643
155848
|
this.Minute.Option.NetworkFilter=(data, callback)=>{ this.NetworkFilter(data, callback); }
|
|
155849
|
+
|
|
155850
|
+
|
|
155851
|
+
var reloadResourceEvent=
|
|
155852
|
+
{
|
|
155853
|
+
event:JSCHART_EVENT_ID.ON_RELOAD_RESOURCE,
|
|
155854
|
+
callback:(event, data, obj)=>{ this.LoadChartResource(obj); }
|
|
155855
|
+
}
|
|
155856
|
+
|
|
155857
|
+
var splitXEvent=
|
|
155858
|
+
{
|
|
155859
|
+
event:JSCHART_EVENT_ID.ON_SPLIT_XCOORDINATE,
|
|
155860
|
+
callback:(event, data, obj)=>{ this.OnSplitXCoordinate(event, data, obj); }
|
|
155861
|
+
};
|
|
155862
|
+
|
|
155863
|
+
var splitYEvent=
|
|
155864
|
+
{
|
|
155865
|
+
event:JSCHART_EVENT_ID.ON_SPLIT_YCOORDINATE,
|
|
155866
|
+
callback:(event, data, obj)=>{ this.OnSplitYCoordinate(event, data, obj); }
|
|
155867
|
+
}
|
|
155868
|
+
|
|
155869
|
+
if (Array.isArray(this.Minute.Option.EventCallback))
|
|
155870
|
+
{
|
|
155871
|
+
this.Minute.Option.EventCallback.unshift(reloadResourceEvent,splitYEvent,splitYEvent);
|
|
155872
|
+
}
|
|
155873
|
+
else
|
|
155874
|
+
{
|
|
155875
|
+
this.Minute.Option.EventCallback=[reloadResourceEvent,splitXEvent,splitYEvent];
|
|
155876
|
+
}
|
|
155877
|
+
|
|
155644
155878
|
chart.SetOption(this.Minute.Option); //设置K线配置
|
|
155645
155879
|
|
|
155646
155880
|
document.body.appendChild(divDom);
|
|
@@ -155681,6 +155915,8 @@ function JSTooltipMinuteChart()
|
|
|
155681
155915
|
|
|
155682
155916
|
this.OnCreateHQChart=function(chart)
|
|
155683
155917
|
{
|
|
155918
|
+
this.LoadChartResource(chart);
|
|
155919
|
+
|
|
155684
155920
|
if (this.OnCreatedCallback) this.OnCreatedCallback(chart);
|
|
155685
155921
|
}
|
|
155686
155922
|
|
|
@@ -155761,6 +155997,10 @@ function JSTooltipMinuteChart()
|
|
|
155761
155997
|
this.BGColor=g_JSChartResource.PopMinuteChart.BGColor;
|
|
155762
155998
|
this.BorderColor=g_JSChartResource.PopMinuteChart.BorderColor;
|
|
155763
155999
|
|
|
156000
|
+
this.TitleFont=g_JSChartResource.PopMinuteChart.Title.Font; //指标标题字体
|
|
156001
|
+
this.CorssCursorFont=g_JSChartResource.PopMinuteChart.CorssCursor.Font; //十字光标
|
|
156002
|
+
this.FrameSplitTextFont=g_JSChartResource.PopMinuteChart.Frame.Font; //刻度文字
|
|
156003
|
+
|
|
155764
156004
|
if (!this.DivDialog) return;
|
|
155765
156005
|
|
|
155766
156006
|
this.UpdateStyle();
|
|
@@ -155768,6 +156008,63 @@ function JSTooltipMinuteChart()
|
|
|
155768
156008
|
if (this.Minute.JSChart) this.Minute.JSChart.ReloadResource(option);
|
|
155769
156009
|
}
|
|
155770
156010
|
|
|
156011
|
+
this.LoadChartResource=function(chart)
|
|
156012
|
+
{
|
|
156013
|
+
if (IFrameSplitOperator.IsNonEmptyArray(chart.TitlePaint))
|
|
156014
|
+
{
|
|
156015
|
+
for(var i=0;i<chart.TitlePaint.length;++i)
|
|
156016
|
+
{
|
|
156017
|
+
var item=chart.TitlePaint[i];
|
|
156018
|
+
if (!item) continue;
|
|
156019
|
+
|
|
156020
|
+
item.Font=this.TitleFont;
|
|
156021
|
+
}
|
|
156022
|
+
}
|
|
156023
|
+
|
|
156024
|
+
if (IFrameSplitOperator.IsNonEmptyArray(chart.WindowIndex))
|
|
156025
|
+
{
|
|
156026
|
+
for(var i=0;i<chart.WindowIndex.length;++i) //去掉指标里面的字体
|
|
156027
|
+
{
|
|
156028
|
+
var item=chart.WindowIndex[i];
|
|
156029
|
+
if (!item) continue;
|
|
156030
|
+
item.TitleFont=null;
|
|
156031
|
+
}
|
|
156032
|
+
}
|
|
156033
|
+
|
|
156034
|
+
if (chart.ChartCorssCursor)
|
|
156035
|
+
{
|
|
156036
|
+
chart.ChartCorssCursor.Font=this.CorssCursorFont;
|
|
156037
|
+
}
|
|
156038
|
+
}
|
|
156039
|
+
|
|
156040
|
+
this.OnSplitXCoordinate=function(event, data, obj)
|
|
156041
|
+
{
|
|
156042
|
+
var frame=data.Frame;
|
|
156043
|
+
if (IFrameSplitOperator.IsNonEmptyArray(frame.VerticalInfo))
|
|
156044
|
+
{
|
|
156045
|
+
for(var i=0;i<frame.VerticalInfo.length;++i)
|
|
156046
|
+
{
|
|
156047
|
+
var item=frame.VerticalInfo[i];
|
|
156048
|
+
if (!item) continue;
|
|
156049
|
+
if (item.Font) item.Font=this.FrameSplitTextFont;
|
|
156050
|
+
}
|
|
156051
|
+
}
|
|
156052
|
+
}
|
|
156053
|
+
|
|
156054
|
+
this.OnSplitYCoordinate=function(event, data, obj)
|
|
156055
|
+
{
|
|
156056
|
+
var frame=data.Frame;
|
|
156057
|
+
if (IFrameSplitOperator.IsNonEmptyArray(frame.HorizontalInfo))
|
|
156058
|
+
{
|
|
156059
|
+
for(var i=0;i<frame.HorizontalInfo.length;++i)
|
|
156060
|
+
{
|
|
156061
|
+
var item=frame.HorizontalInfo[i];
|
|
156062
|
+
if (!item) continue;
|
|
156063
|
+
if (item.Font) item.Font=this.FrameSplitTextFont;
|
|
156064
|
+
}
|
|
156065
|
+
}
|
|
156066
|
+
}
|
|
156067
|
+
|
|
155771
156068
|
}
|
|
155772
156069
|
|
|
155773
156070
|
JSTooltipMinuteChart.GetMinuteOption=function()
|
|
@@ -155794,7 +156091,7 @@ JSTooltipMinuteChart.GetMinuteOption=function()
|
|
|
155794
156091
|
//BeforeOpen:{IsShow:true, Width:120, IsShowMultiDay:true, MulitiDayWidth:100, },
|
|
155795
156092
|
//AfterClose:{IsShow:true, Width:100, IsShowMultiDay:true, MulitiDayWidth:50, ShareVol:2 }, //ShareVol:0=盘后成交量独立坐标, 1==盘后成交量主图共用 2==盘后成交量盘前共用
|
|
155796
156093
|
|
|
155797
|
-
CorssCursorInfo:{ Left:
|
|
156094
|
+
CorssCursorInfo:{ Left:1, Right:1, Bottom:1 },
|
|
155798
156095
|
|
|
155799
156096
|
MinuteLine:
|
|
155800
156097
|
{
|
|
@@ -155824,8 +156121,8 @@ JSTooltipMinuteChart.GetMinuteOption=function()
|
|
|
155824
156121
|
{
|
|
155825
156122
|
Left:20, //左边间距
|
|
155826
156123
|
Right:120, //右边间距
|
|
155827
|
-
Top:
|
|
155828
|
-
Bottom:
|
|
156124
|
+
Top:20,
|
|
156125
|
+
Bottom:20,
|
|
155829
156126
|
|
|
155830
156127
|
AutoLeft:{ Blank:10, MinWidth:40 },
|
|
155831
156128
|
AutoRight:{ Blank:10, MinWidth:40 },
|
|
@@ -161237,7 +161534,7 @@ function HQChartScriptWorker()
|
|
|
161237
161534
|
|
|
161238
161535
|
|
|
161239
161536
|
|
|
161240
|
-
var HQCHART_VERSION="1.1.
|
|
161537
|
+
var HQCHART_VERSION="1.1.14859";
|
|
161241
161538
|
|
|
161242
161539
|
function PrintHQChartVersion()
|
|
161243
161540
|
{
|