hqchart 1.1.12503 → 1.1.12513
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.stock.vue.js +2 -2
- package/lib/umychart.vue.js +121 -31
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +60 -1
- package/src/jscommon/umychart.js +277 -50
- package/src/jscommon/umychart.stock.js +2 -2
- package/src/jscommon/umychart.testdata/300439.sz.5day.minute.js +12172 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +338 -52
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.stock.vue.js +2 -2
- package/src/jscommon/umychart.vue/umychart.vue.js +338 -52
- package/src/jscommon/umychart.wechat/umychart.complier.wechat.js +3 -2
- package/src/jscommon/umychart.wechat/umychart.data.wechat.js +1 -0
- package/src/jscommon/umychart.wechat/umychart.index.wechat.js +6 -0
- package/src/jscommon/umychart.wechat/umychart.version.wechat.js +1 -1
package/src/jscommon/umychart.js
CHANGED
|
@@ -6290,6 +6290,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6290
6290
|
return false;
|
|
6291
6291
|
}
|
|
6292
6292
|
|
|
6293
|
+
this.IsMinuteContainer=function()
|
|
6294
|
+
{
|
|
6295
|
+
if (this.ClassName=="MinuteChartContainer" || this.ClassName=="MinuteChartHScreenContainer") return true;
|
|
6296
|
+
|
|
6297
|
+
return false;
|
|
6298
|
+
}
|
|
6299
|
+
|
|
6293
6300
|
this.UpdatePointByCursorIndex=function(type) //type 1=根据十字光标更新 2=强制取消十字光标
|
|
6294
6301
|
{
|
|
6295
6302
|
var pt={X:null, Y:null};
|
|
@@ -20865,9 +20872,12 @@ function IChartPainting()
|
|
|
20865
20872
|
}
|
|
20866
20873
|
else if (valueType==3)
|
|
20867
20874
|
{
|
|
20868
|
-
var
|
|
20869
|
-
|
|
20870
|
-
|
|
20875
|
+
var minItem=this.Data.Data[i];
|
|
20876
|
+
var mainItem=this.MainData.Data[i];
|
|
20877
|
+
if (!minItem || !IFrameSplitOperator.IsNumber(minItem.Close) || !IFrameSplitOperator.IsNumber(minItem.YClose)) continue;
|
|
20878
|
+
if (!mainItem || !IFrameSplitOperator.IsNumber(mainItem.Close) || !IFrameSplitOperator.IsNumber(mainItem.YClose)) continue;
|
|
20879
|
+
var price=minItem.Close;
|
|
20880
|
+
var value=price/minItem.YClose*mainItem.YClose;
|
|
20871
20881
|
}
|
|
20872
20882
|
else if (valueType==4)
|
|
20873
20883
|
{
|
|
@@ -20987,9 +20997,12 @@ function IChartPainting()
|
|
|
20987
20997
|
}
|
|
20988
20998
|
else if (valueType==3)
|
|
20989
20999
|
{
|
|
20990
|
-
var
|
|
20991
|
-
|
|
20992
|
-
|
|
21000
|
+
var minItem=this.Data.Data[i];
|
|
21001
|
+
var mainItem=this.MainData.Data[i];
|
|
21002
|
+
if (!minItem || !IFrameSplitOperator.IsNumber(minItem.Close) || !IFrameSplitOperator.IsNumber(minItem.YClose)) continue;
|
|
21003
|
+
if (!mainItem || !IFrameSplitOperator.IsNumber(mainItem.Close) || !IFrameSplitOperator.IsNumber(mainItem.YClose)) continue;
|
|
21004
|
+
var price=minItem.Close;
|
|
21005
|
+
var value=price/minItem.YClose*mainItem.YClose;
|
|
20993
21006
|
}
|
|
20994
21007
|
else
|
|
20995
21008
|
{
|
|
@@ -31639,19 +31652,16 @@ function ChartOverlayMinutePriceLine()
|
|
|
31639
31652
|
|
|
31640
31653
|
this.Color="rgb(65,105,225)";
|
|
31641
31654
|
this.MainData; //主图数据
|
|
31642
|
-
this.MainYClose; //主图股票的前收盘价
|
|
31643
31655
|
this.SourceData; //原始数据
|
|
31644
31656
|
|
|
31645
31657
|
this.ClassName="ChartOverlayMinutePriceLine";
|
|
31646
31658
|
this.Title;
|
|
31647
31659
|
this.Symbol; //叠加的股票代码
|
|
31648
|
-
this.YClose; //叠加的股票前收盘
|
|
31649
31660
|
this.Status=OVERLAY_STATUS_ID.STATUS_NONE_ID;
|
|
31650
31661
|
|
|
31651
31662
|
this.OverlayType=0; //叠加方式 0=百分比叠加 1=绝对叠加
|
|
31652
31663
|
this.IsCalcuateMaxMin=true; //是否参与计算Y轴的最大最小值
|
|
31653
31664
|
|
|
31654
|
-
|
|
31655
31665
|
this.SetOption=function(option)
|
|
31656
31666
|
{
|
|
31657
31667
|
if (option)
|
|
@@ -31663,19 +31673,21 @@ function ChartOverlayMinutePriceLine()
|
|
|
31663
31673
|
|
|
31664
31674
|
this.PtInChart=function(x,y)
|
|
31665
31675
|
{
|
|
31666
|
-
var option={ MinuteOverlayPrice:true,
|
|
31676
|
+
var option={ MinuteOverlayPrice:true, OverlayType:this.OverlayType };
|
|
31667
31677
|
return this.PtInLine(x, y, option);
|
|
31668
31678
|
}
|
|
31669
31679
|
|
|
31670
31680
|
this.DrawSelectedStatus=function()
|
|
31671
31681
|
{
|
|
31672
|
-
var option={ MinuteOverlayPrice:true,
|
|
31682
|
+
var option={ MinuteOverlayPrice:true, OverlayType:this.OverlayType };
|
|
31673
31683
|
this.DrawLinePoint(option);
|
|
31674
31684
|
}
|
|
31675
31685
|
|
|
31676
31686
|
this.Draw=function()
|
|
31677
31687
|
{
|
|
31678
31688
|
if (!this.Data) return;
|
|
31689
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
31690
|
+
|
|
31679
31691
|
if (this.NotSupportMessage)
|
|
31680
31692
|
{
|
|
31681
31693
|
this.DrawNotSupportmessage();
|
|
@@ -31696,37 +31708,53 @@ function ChartOverlayMinutePriceLine()
|
|
|
31696
31708
|
var bFirstPoint=true;
|
|
31697
31709
|
var drawCount=0;
|
|
31698
31710
|
var xOffset=0, showValue=0;
|
|
31711
|
+
var yClose=null, mainYClose=null;
|
|
31712
|
+
var pointCount=0;
|
|
31699
31713
|
for(var i=this.Data.DataOffset+xOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
31700
31714
|
{
|
|
31701
|
-
var
|
|
31702
|
-
if (
|
|
31715
|
+
var item=this.Data.Data[i];
|
|
31716
|
+
if (item && IFrameSplitOperator.IsNumber(item.Close))
|
|
31717
|
+
{
|
|
31718
|
+
if (bFirstPoint) //百分比使用每天的昨收计算
|
|
31719
|
+
{
|
|
31720
|
+
yClose=item.YClose;
|
|
31721
|
+
var minItem=this.MainData.Data[i];
|
|
31722
|
+
mainYClose=minItem.YClose;
|
|
31723
|
+
}
|
|
31703
31724
|
|
|
31704
|
-
|
|
31705
|
-
|
|
31725
|
+
var value=item.Close;
|
|
31726
|
+
showValue=value; //绝对叠加
|
|
31706
31727
|
|
|
31707
|
-
|
|
31708
|
-
|
|
31728
|
+
if (this.OverlayType==0)
|
|
31729
|
+
showValue=value/yClose*mainYClose; //百分比
|
|
31709
31730
|
|
|
31710
|
-
|
|
31711
|
-
|
|
31712
|
-
|
|
31713
|
-
|
|
31714
|
-
|
|
31715
|
-
|
|
31716
|
-
|
|
31717
|
-
|
|
31718
|
-
|
|
31719
|
-
|
|
31720
|
-
|
|
31721
|
-
else
|
|
31731
|
+
var x=this.ChartFrame.GetXFromIndex(j);
|
|
31732
|
+
var y=this.ChartFrame.GetYFromData(showValue, false);
|
|
31733
|
+
|
|
31734
|
+
if (bFirstPoint)
|
|
31735
|
+
{
|
|
31736
|
+
this.Canvas.strokeStyle=this.Color;
|
|
31737
|
+
this.Canvas.beginPath();
|
|
31738
|
+
if (isHScreen) this.Canvas.moveTo(y,x);
|
|
31739
|
+
else this.Canvas.moveTo(x,y);
|
|
31740
|
+
bFirstPoint=false;
|
|
31741
|
+
}
|
|
31742
|
+
else
|
|
31743
|
+
{
|
|
31744
|
+
if (isHScreen) this.Canvas.lineTo(y,x);
|
|
31745
|
+
else this.Canvas.lineTo(x,y);
|
|
31746
|
+
}
|
|
31747
|
+
|
|
31748
|
+
++drawCount;
|
|
31722
31749
|
}
|
|
31723
31750
|
|
|
31724
|
-
++
|
|
31751
|
+
++pointCount;
|
|
31725
31752
|
|
|
31726
|
-
if (
|
|
31753
|
+
if (pointCount>=minuteCount) //上一天的数据和这天地数据线段要断开
|
|
31727
31754
|
{
|
|
31728
31755
|
bFirstPoint=true;
|
|
31729
|
-
|
|
31756
|
+
pointCount=0;
|
|
31757
|
+
if (drawCount>0) this.Canvas.stroke();
|
|
31730
31758
|
drawCount=0;
|
|
31731
31759
|
}
|
|
31732
31760
|
}
|
|
@@ -31739,24 +31767,46 @@ function ChartOverlayMinutePriceLine()
|
|
|
31739
31767
|
this.GetMaxMin=function()
|
|
31740
31768
|
{
|
|
31741
31769
|
var xPointCount=this.ChartFrame.XPointCount;
|
|
31742
|
-
var range={};
|
|
31770
|
+
var range={ Min:null, Max:null };
|
|
31743
31771
|
if (!this.IsCalcuateMaxMin) return range;
|
|
31744
|
-
if (this.YClose==null) return range;
|
|
31745
31772
|
|
|
31746
|
-
|
|
31747
|
-
|
|
31773
|
+
var minuteCount=this.ChartFrame.MinuteCount;
|
|
31774
|
+
var yClose=null, mainYClose=null;
|
|
31775
|
+
var bFirstPoint=true;
|
|
31776
|
+
var pointCount=0;
|
|
31748
31777
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
31749
31778
|
{
|
|
31750
|
-
var
|
|
31751
|
-
if (
|
|
31779
|
+
var item=this.Data.Data[i];
|
|
31780
|
+
if (!item || !IFrameSplitOperator.IsNumber(item.Close))
|
|
31781
|
+
{
|
|
31782
|
+
++pointCount;
|
|
31783
|
+
continue;
|
|
31784
|
+
}
|
|
31752
31785
|
|
|
31753
|
-
if (
|
|
31786
|
+
if (bFirstPoint)
|
|
31787
|
+
{
|
|
31788
|
+
yClose=item.YClose;
|
|
31789
|
+
var minItem=this.MainData.Data[i];
|
|
31790
|
+
mainYClose=minItem.YClose;
|
|
31791
|
+
bFirstPoint=false;
|
|
31792
|
+
}
|
|
31793
|
+
|
|
31794
|
+
var value=item.Close;
|
|
31795
|
+
if (this.OverlayType==0) value=value/yClose*mainYClose;
|
|
31754
31796
|
|
|
31755
31797
|
if (range.Max==null) range.Max=value;
|
|
31756
31798
|
if (range.Min==null) range.Min=value;
|
|
31757
31799
|
|
|
31758
31800
|
if (range.Max<value) range.Max=value;
|
|
31759
31801
|
if (range.Min>value) range.Min=value;
|
|
31802
|
+
|
|
31803
|
+
++pointCount;
|
|
31804
|
+
|
|
31805
|
+
if (pointCount>=minuteCount)
|
|
31806
|
+
{
|
|
31807
|
+
bFirstPoint=true;
|
|
31808
|
+
pointCount=0;
|
|
31809
|
+
}
|
|
31760
31810
|
}
|
|
31761
31811
|
|
|
31762
31812
|
//JSConsole.Chart.Log(`[ChartOverlayMinutePriceLine::GetMaxMin] max=${range.Max} min=${range.Min}`);
|
|
@@ -47135,7 +47185,16 @@ function HistoryDataStringFormat()
|
|
|
47135
47185
|
|
|
47136
47186
|
this.Width=157;
|
|
47137
47187
|
if (this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID) this.Width=180;
|
|
47188
|
+
var titleData=this.GetFormatTitle(data);
|
|
47189
|
+
if (!titleData) return false;
|
|
47190
|
+
var outData=this.GenerateTitleHtml(titleData);
|
|
47191
|
+
if (!outData) return false;
|
|
47192
|
+
|
|
47193
|
+
this.Text=outData.Html;
|
|
47194
|
+
this.Height=outData.LineCount*this.LineHeight;
|
|
47195
|
+
return true;
|
|
47138
47196
|
|
|
47197
|
+
/*
|
|
47139
47198
|
var date=new Date(parseInt(data.Date/10000),(data.Date/100%100-1),data.Date%100);
|
|
47140
47199
|
var strDate=IFrameSplitOperator.FormatDateString(data.Date);
|
|
47141
47200
|
var title2=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],this.LanguageID);
|
|
@@ -47225,6 +47284,178 @@ function HistoryDataStringFormat()
|
|
|
47225
47284
|
|
|
47226
47285
|
this.Height=this.LineCount*this.LineHeight;
|
|
47227
47286
|
return true;
|
|
47287
|
+
*/
|
|
47288
|
+
}
|
|
47289
|
+
|
|
47290
|
+
this.GenerateTitleHtml=function(data)
|
|
47291
|
+
{
|
|
47292
|
+
var lineCount=0;
|
|
47293
|
+
var strHtml="", text;
|
|
47294
|
+
if (data.Name)
|
|
47295
|
+
{
|
|
47296
|
+
text=`<span style='color:rgb(0,0,0);font:微软雅黑;font-size:12px;text-align:center;display: block;'>${data.Name}</span>`;
|
|
47297
|
+
strHtml+=text;
|
|
47298
|
+
++lineCount;
|
|
47299
|
+
}
|
|
47300
|
+
|
|
47301
|
+
if (data.Title)
|
|
47302
|
+
{
|
|
47303
|
+
text=`<span class='tooltip-title'>${data.Title}</span>`;
|
|
47304
|
+
strHtml+=text;
|
|
47305
|
+
++lineCount;
|
|
47306
|
+
}
|
|
47307
|
+
|
|
47308
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data.AryText))
|
|
47309
|
+
{
|
|
47310
|
+
for(var i=0;i<data.AryText.length;++i)
|
|
47311
|
+
{
|
|
47312
|
+
var item=data.AryText[i];
|
|
47313
|
+
if (i>0) strHtml+='<br/>';
|
|
47314
|
+
var text=`<span class='tooltip-con'>${item.Title}</span><span class='tooltip-num' style='color:${item.Color};'>${item.Text}</span>`;
|
|
47315
|
+
strHtml+=text;
|
|
47316
|
+
++lineCount;
|
|
47317
|
+
}
|
|
47318
|
+
}
|
|
47319
|
+
|
|
47320
|
+
return { Html:strHtml, LineCount:lineCount };
|
|
47321
|
+
}
|
|
47322
|
+
|
|
47323
|
+
this.GetFormatTitle=function(data)
|
|
47324
|
+
{
|
|
47325
|
+
if (!data) return null;
|
|
47326
|
+
|
|
47327
|
+
var upperSymbol=this.Symbol.toUpperCase();
|
|
47328
|
+
var defaultfloatPrecision=GetfloatPrecision(this.Symbol);//价格小数位数
|
|
47329
|
+
var date=new Date(parseInt(data.Date/10000),(data.Date/100%100-1),data.Date%100);
|
|
47330
|
+
var strDate=IFrameSplitOperator.FormatDateString(data.Date);
|
|
47331
|
+
|
|
47332
|
+
var title2=g_JSChartLocalization.GetText(WEEK_NAME[date.getDay()],this.LanguageID);
|
|
47333
|
+
var isTickPeriod=ChartData.IsTickPeriod(this.Value.ChartPaint.Data.Period);
|
|
47334
|
+
if (ChartData.IsMinutePeriod(this.Value.ChartPaint.Data.Period,true)) // 分钟周期
|
|
47335
|
+
{
|
|
47336
|
+
title2=IFrameSplitOperator.FormatTimeString(data.Time);
|
|
47337
|
+
}
|
|
47338
|
+
else if (ChartData.IsSecondPeriod(this.Value.ChartPaint.Data.Period) || isTickPeriod)
|
|
47339
|
+
{
|
|
47340
|
+
title2=IFrameSplitOperator.FormatTimeString(data.Time,'HH:MM:SS');
|
|
47341
|
+
}
|
|
47342
|
+
|
|
47343
|
+
var result={ AryText:null, Title:`${strDate}  ${title2}`, Name:null };
|
|
47344
|
+
if (isTickPeriod)
|
|
47345
|
+
{
|
|
47346
|
+
var aryText=
|
|
47347
|
+
[
|
|
47348
|
+
{
|
|
47349
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Price',this.LanguageID),
|
|
47350
|
+
Text:IFrameSplitOperator.IsNumber(data.Open)? data.Open.toFixed(defaultfloatPrecision):'--',
|
|
47351
|
+
Color:this.GetColor(data.Open,data.YClose)
|
|
47352
|
+
},
|
|
47353
|
+
];
|
|
47354
|
+
|
|
47355
|
+
if (IFrameSplitOperator.IsNumber(data.YClose))
|
|
47356
|
+
{
|
|
47357
|
+
var increase=(data.Close-data.YClose)/data.YClose*100;
|
|
47358
|
+
var item=
|
|
47359
|
+
{
|
|
47360
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Increase',this.LanguageID),
|
|
47361
|
+
Text:`${increase.toFixed(2)}%`,
|
|
47362
|
+
Color:this.GetColor(increase,0)
|
|
47363
|
+
}
|
|
47364
|
+
aryText.push(item);
|
|
47365
|
+
}
|
|
47366
|
+
|
|
47367
|
+
result.AryText=aryText;
|
|
47368
|
+
}
|
|
47369
|
+
else if (data.IsNonTrade)
|
|
47370
|
+
{
|
|
47371
|
+
|
|
47372
|
+
}
|
|
47373
|
+
else
|
|
47374
|
+
{
|
|
47375
|
+
var vol=data.Vol;
|
|
47376
|
+
if (upperSymbol && MARKET_SUFFIX_NAME.IsSHSZ(upperSymbol)) vol/=100; //A股统一转成手
|
|
47377
|
+
var eventUnchangeKLine=null; //定制平盘K线颜色事件
|
|
47378
|
+
if (this.GetEventCallback) eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_TITLE_COLOR);
|
|
47379
|
+
|
|
47380
|
+
var aryText=
|
|
47381
|
+
[
|
|
47382
|
+
{
|
|
47383
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Open',this.LanguageID),
|
|
47384
|
+
Text:IFrameSplitOperator.IsNumber(data.Open)? data.Open.toFixed(defaultfloatPrecision):'--',
|
|
47385
|
+
Color:this.GetPriceColor("DivTooltip-Open",data.Open,data.YClose,data,eventUnchangeKLine),
|
|
47386
|
+
},
|
|
47387
|
+
{
|
|
47388
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-High',this.LanguageID),
|
|
47389
|
+
Text:IFrameSplitOperator.IsNumber(data.High)? data.High.toFixed(defaultfloatPrecision):'--',
|
|
47390
|
+
Color:this.GetPriceColor("DivTooltip-High",data.High,data.YClose,data,eventUnchangeKLine)
|
|
47391
|
+
},
|
|
47392
|
+
{
|
|
47393
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Low',this.LanguageID),
|
|
47394
|
+
Text:IFrameSplitOperator.IsNumber(data.Low)? data.Low.toFixed(defaultfloatPrecision):'--',
|
|
47395
|
+
Color:this.GetPriceColor('DivTooltip-Low',data.Low,data.YClose,data,eventUnchangeKLine)
|
|
47396
|
+
},
|
|
47397
|
+
{
|
|
47398
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Close',this.LanguageID),
|
|
47399
|
+
Text:IFrameSplitOperator.IsNumber(data.Close)? data.Close.toFixed(defaultfloatPrecision):'--',
|
|
47400
|
+
Color:this.GetPriceColor('DivTooltip-Close',data.Close,data.YClose,data,eventUnchangeKLine)
|
|
47401
|
+
},
|
|
47402
|
+
{
|
|
47403
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Vol',this.LanguageID),
|
|
47404
|
+
Text:IFrameSplitOperator.IsNumber(vol)? IFrameSplitOperator.FormatValueString(vol,2,this.LanguageID):'--',
|
|
47405
|
+
Color:this.VolColor
|
|
47406
|
+
},
|
|
47407
|
+
{
|
|
47408
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Amount',this.LanguageID),
|
|
47409
|
+
Text:IFrameSplitOperator.IsNumber(data.Amount)? IFrameSplitOperator.FormatValueString(data.Amount,2,this.LanguageID):'--',
|
|
47410
|
+
Color:this.AmountColor
|
|
47411
|
+
}
|
|
47412
|
+
];
|
|
47413
|
+
|
|
47414
|
+
if (IFrameSplitOperator.IsNumber(data.YClose))
|
|
47415
|
+
{
|
|
47416
|
+
var increase=(data.Close-data.YClose)/data.YClose*100;
|
|
47417
|
+
var item=
|
|
47418
|
+
{
|
|
47419
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Increase',this.LanguageID),
|
|
47420
|
+
Text:`${increase.toFixed(2)}%`,
|
|
47421
|
+
Color:this.GetColor(increase,0)
|
|
47422
|
+
}
|
|
47423
|
+
aryText.push(item);
|
|
47424
|
+
}
|
|
47425
|
+
|
|
47426
|
+
if(MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol) && data.FlowCapital>0) //换手率
|
|
47427
|
+
{
|
|
47428
|
+
var value=data.Vol/data.FlowCapital*100;
|
|
47429
|
+
var item=
|
|
47430
|
+
{
|
|
47431
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Exchange',this.LanguageID),
|
|
47432
|
+
Text:`${value.toFixed(2)}%`,
|
|
47433
|
+
Color:this.TurnoverRateColor
|
|
47434
|
+
}
|
|
47435
|
+
aryText.push(item);
|
|
47436
|
+
}
|
|
47437
|
+
|
|
47438
|
+
if (MARKET_SUFFIX_NAME.IsFutures(upperSymbol) && IFrameSplitOperator.IsNumber(data.Position))
|
|
47439
|
+
{
|
|
47440
|
+
var item=
|
|
47441
|
+
{
|
|
47442
|
+
Title:g_JSChartLocalization.GetText('DivTooltip-Position',this.LanguageID),
|
|
47443
|
+
Text:`${data.Position}`,
|
|
47444
|
+
Color:this.PositionColor
|
|
47445
|
+
}
|
|
47446
|
+
}
|
|
47447
|
+
|
|
47448
|
+
//叠加股票
|
|
47449
|
+
if (this.Value.ChartPaint.Name=="Overlay-KLine")
|
|
47450
|
+
{
|
|
47451
|
+
result.Name=this.Value.ChartPaint.Title;
|
|
47452
|
+
}
|
|
47453
|
+
|
|
47454
|
+
result.AryText=aryText;
|
|
47455
|
+
}
|
|
47456
|
+
|
|
47457
|
+
|
|
47458
|
+
return result;
|
|
47228
47459
|
}
|
|
47229
47460
|
|
|
47230
47461
|
this.GetColor=function(price,yclse)
|
|
@@ -72703,7 +72934,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
72703
72934
|
//叠加股票
|
|
72704
72935
|
this.OverlaySymbol=function(symbol,option)
|
|
72705
72936
|
{
|
|
72706
|
-
for(var i
|
|
72937
|
+
for(var i=0; i<this.OverlayChartPaint.length; ++i)
|
|
72707
72938
|
{
|
|
72708
72939
|
var item=this.OverlayChartPaint[i];
|
|
72709
72940
|
if (item.Symbol==symbol)
|
|
@@ -72723,11 +72954,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
72723
72954
|
if (option && option.Color) paint.Color=option.Color; //外部设置颜色
|
|
72724
72955
|
else paint.Color=g_JSChartResource.OverlaySymbol.Color[g_JSChartResource.OverlaySymbol.Random%g_JSChartResource.OverlaySymbol.Color.length];
|
|
72725
72956
|
++g_JSChartResource.OverlaySymbol.Random;
|
|
72726
|
-
|
|
72727
|
-
{
|
|
72728
|
-
paint.MainData=this.ChartPaint[0].Data;
|
|
72729
|
-
paint.MainYClose=this.ChartPaint[0].YClose;
|
|
72730
|
-
}
|
|
72957
|
+
paint.MainData=this.SourceData; //绑定主图数据
|
|
72731
72958
|
|
|
72732
72959
|
if (paint.SetOption) paint.SetOption(option);
|
|
72733
72960
|
|
|
@@ -73695,7 +73922,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
73695
73922
|
for(var i=0; i<this.OverlayChartPaint.length; ++i)
|
|
73696
73923
|
{
|
|
73697
73924
|
let item=this.OverlayChartPaint[i];
|
|
73698
|
-
if (!item.MainData
|
|
73925
|
+
if (!item.MainData) continue;
|
|
73699
73926
|
if (item.Status!=OVERLAY_STATUS_ID.STATUS_NONE_ID) continue;
|
|
73700
73927
|
var symbol=item.Symbol;
|
|
73701
73928
|
if (!symbol) continue;
|
|
@@ -73756,7 +73983,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
73756
73983
|
for(var j=0; j<this.OverlayChartPaint.length; ++j)
|
|
73757
73984
|
{
|
|
73758
73985
|
var item=this.OverlayChartPaint[j];
|
|
73759
|
-
if (!item.MainData
|
|
73986
|
+
if (!item.MainData) continue;
|
|
73760
73987
|
if (overlayData.symbol==item.Symbol)
|
|
73761
73988
|
{
|
|
73762
73989
|
this.RecvOverlayMinuteData(overlayData, item, { Redraw:false });
|
|
@@ -73917,6 +74144,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
73917
74144
|
{
|
|
73918
74145
|
var empytData=new ChartData();
|
|
73919
74146
|
empytData.Date=item.Date;
|
|
74147
|
+
empytData.Data.length=item.Data.length;
|
|
73920
74148
|
overlayDayData.push(empytData);
|
|
73921
74149
|
}
|
|
73922
74150
|
}
|
|
@@ -74150,11 +74378,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
74150
74378
|
this.ExtendChartPaint[0].Name=this.Name;
|
|
74151
74379
|
}
|
|
74152
74380
|
|
|
74153
|
-
for(var i
|
|
74381
|
+
for(var i=0; i<this.OverlayChartPaint.length; ++i)
|
|
74154
74382
|
{
|
|
74155
74383
|
var item=this.OverlayChartPaint[i];
|
|
74156
|
-
item.MainData=
|
|
74157
|
-
item.MainYClose=yClose;
|
|
74384
|
+
item.MainData=minuteData; //绑定主图数据
|
|
74158
74385
|
}
|
|
74159
74386
|
}
|
|
74160
74387
|
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
function JSStockResource()
|
|
19
19
|
{
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
this.Domain = "http://127.0.0.1:8886"; //API域名
|
|
21
|
+
this.CacheDomain = "http://127.0.0.1:8886"; //缓存域名
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
var g_JSStockResource = new JSStockResource();
|