hqchart 1.1.11751 → 1.1.11754
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
CHANGED
|
@@ -6395,7 +6395,11 @@ if(this.Frame&&this.Frame.SubFrame){for(var i=0;i<this.Frame.SubFrame.length;++i
|
|
|
6395
6395
|
{var overlayItem=item.OverlayIndex[j];for(var k=0;k<overlayItem.ChartPaint.length;++k){var overlayChart=overlayItem.ChartPaint[k];if(overlayChart&&overlayChart.OnDestroy)overlayChart.OnDestroy();}overlayItem.ChartPaint=[];}}}}//清空叠加标题
|
|
6396
6396
|
for(var i=1;i<this.TitlePaint.length;++i){var item=this.TitlePaint[i];item.OverlayIndex=new _map2.default();}};this.ResetDayOffset=function(){if(this.PageInfo.Enable){this.DayOffset.Offset=this.PageInfo.Offset;this.DayOffset.ShowDayCount=this.PageInfo.ShowDayCount;}else{this.DayOffset.Offset=0;this.DayOffset.ShowDayCount=-1;}this.DayOffset.PageInfo=null;};//切换股票代码
|
|
6397
6397
|
this.ChangeSymbol=function(symbol,option){this.StopDisplayLatest();this.CancelAutoUpdate();this.AutoUpdateEvent(false,"MinuteChartContainer::ChangeSymbol");this.Symbol=symbol;this.ResetDayOffset();this.ClearIndexPaint();//清空指标
|
|
6398
|
-
this.ResetOverlaySymbolStatus();this.ReloadChartDrawPicture();if(option){if(IFrameSplitOperator.IsNumber(option.DayCount))this.DayCount=option.DayCount;
|
|
6398
|
+
this.ResetOverlaySymbolStatus();this.ReloadChartDrawPicture();if(option){if(IFrameSplitOperator.IsNumber(option.DayCount))this.DayCount=option.DayCount;if(IFrameSplitOperator.IsNonEmptyArray(option.Windows))//切换指标
|
|
6399
|
+
{var systemScript=new JSIndexScript();for(var i=0;i<option.Windows.length;++i){var index=2+i;if(index>=this.WindowIndex.length)break;//暂时不支持 动态增加/减少
|
|
6400
|
+
var item=option.Windows[index];if(!item)continue;if(item.Script){this.WindowIndex[index]=new ScriptIndex(item.Name,item.Script,item.Args,item);//脚本执行
|
|
6401
|
+
}else if(item.API){var apiItem=item.API;this.WindowIndex[index]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);}else{var indexID=item.Index;var indexInfo=systemScript.Get(indexID);if(indexInfo){var args=indexInfo.Args;if(item.Args)indexInfo.Args=item.Args;indexInfo.ID=indexID;this.WindowIndex[index]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo);//脚本执行
|
|
6402
|
+
}}}}}if(!symbol||this.DayCount<=0){this.DrawEmpty();}else{this.ChartSplashPaint.SetTitle(this.LoadDataSplashTitle);this.ChartSplashPaint.EnableSplash(true);//增加下载动画
|
|
6399
6403
|
this.Draw();this.RequestData();}};this.SetPageInfo=function(pageInfo){if(!pageInfo)return;if(IFrameSplitOperator.IsBool(pageInfo.Enable))this.PageInfo.Enable=pageInfo.Enable;if(IFrameSplitOperator.IsNumber(pageInfo.Offset))this.PageInfo.Offset=pageInfo.Offset;if(IFrameSplitOperator.IsNumber(pageInfo.ShowDayCount))this.PageInfo.ShowDayCount=pageInfo.ShowDayCount;};this.ChangeDayCount=function(count,option){if(count<0)return;this.StopDisplayLatest();this.CancelAutoUpdate();this.AutoUpdateEvent(false,"MinuteChartContainer::ChangeDayCount");this.DayCount=count;if(option&&option.PageInfo){this.SetPageInfo(option.PageInfo);this.ResetDayOffset();}if(this.DayCount>1){this.ChartDrawPicture=[];}else{this.ReloadChartDrawPicture();}this.ClearIndexPaint();//清空指标
|
|
6400
6404
|
this.ResetOverlaySymbolStatus();this.RequestData();};//叠加股票
|
|
6401
6405
|
this.OverlaySymbol=function(symbol,option){for(var i in this.OverlayChartPaint){var item=this.OverlayChartPaint[i];if(item.Symbol==symbol){console.warn('[MinuteChartContainer::OverlaySymbol] overlay symbol='+symbol+' exist.');return false;}}var paint=new ChartOverlayMinutePriceLine();paint.Canvas=this.Canvas;paint.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;paint.ChartFrame=this.Frame.SubFrame[0].Frame;paint.Name="Overlay-Minute";paint.Symbol=symbol;paint.Identify='Overlay-Minute-'+symbol;if(option&&option.Color)paint.Color=option.Color;//外部设置颜色
|
package/package.json
CHANGED
|
@@ -67613,6 +67613,41 @@ function MinuteChartContainer(uielement)
|
|
|
67613
67613
|
if (option)
|
|
67614
67614
|
{
|
|
67615
67615
|
if (IFrameSplitOperator.IsNumber(option.DayCount)) this.DayCount=option.DayCount;
|
|
67616
|
+
|
|
67617
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.Windows)) //切换指标
|
|
67618
|
+
{
|
|
67619
|
+
var systemScript = new JSIndexScript();
|
|
67620
|
+
for(var i=0; i<option.Windows.length; ++i)
|
|
67621
|
+
{
|
|
67622
|
+
var index=2+i;
|
|
67623
|
+
if (index>=this.WindowIndex.length) break; //暂时不支持 动态增加/减少
|
|
67624
|
+
|
|
67625
|
+
var item=option.Windows[index];
|
|
67626
|
+
if (!item) continue;
|
|
67627
|
+
|
|
67628
|
+
if (item.Script)
|
|
67629
|
+
{
|
|
67630
|
+
this.WindowIndex[index]=new ScriptIndex(item.Name,item.Script,item.Args,item); //脚本执行
|
|
67631
|
+
}
|
|
67632
|
+
else if (item.API)
|
|
67633
|
+
{
|
|
67634
|
+
var apiItem=item.API;
|
|
67635
|
+
this.WindowIndex[index]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);
|
|
67636
|
+
}
|
|
67637
|
+
else
|
|
67638
|
+
{
|
|
67639
|
+
var indexID=item.Index;
|
|
67640
|
+
var indexInfo = systemScript.Get(indexID);
|
|
67641
|
+
if (indexInfo)
|
|
67642
|
+
{
|
|
67643
|
+
var args=indexInfo.Args;
|
|
67644
|
+
if (item.Args) indexInfo.Args=item.Args;
|
|
67645
|
+
indexInfo.ID=indexID;
|
|
67646
|
+
this.WindowIndex[index]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
|
|
67647
|
+
}
|
|
67648
|
+
}
|
|
67649
|
+
}
|
|
67650
|
+
}
|
|
67616
67651
|
}
|
|
67617
67652
|
|
|
67618
67653
|
if (!symbol || this.DayCount<=0)
|
|
@@ -67657,6 +67657,41 @@ function MinuteChartContainer(uielement)
|
|
|
67657
67657
|
if (option)
|
|
67658
67658
|
{
|
|
67659
67659
|
if (IFrameSplitOperator.IsNumber(option.DayCount)) this.DayCount=option.DayCount;
|
|
67660
|
+
|
|
67661
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.Windows)) //切换指标
|
|
67662
|
+
{
|
|
67663
|
+
var systemScript = new JSIndexScript();
|
|
67664
|
+
for(var i=0; i<option.Windows.length; ++i)
|
|
67665
|
+
{
|
|
67666
|
+
var index=2+i;
|
|
67667
|
+
if (index>=this.WindowIndex.length) break; //暂时不支持 动态增加/减少
|
|
67668
|
+
|
|
67669
|
+
var item=option.Windows[index];
|
|
67670
|
+
if (!item) continue;
|
|
67671
|
+
|
|
67672
|
+
if (item.Script)
|
|
67673
|
+
{
|
|
67674
|
+
this.WindowIndex[index]=new ScriptIndex(item.Name,item.Script,item.Args,item); //脚本执行
|
|
67675
|
+
}
|
|
67676
|
+
else if (item.API)
|
|
67677
|
+
{
|
|
67678
|
+
var apiItem=item.API;
|
|
67679
|
+
this.WindowIndex[index]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);
|
|
67680
|
+
}
|
|
67681
|
+
else
|
|
67682
|
+
{
|
|
67683
|
+
var indexID=item.Index;
|
|
67684
|
+
var indexInfo = systemScript.Get(indexID);
|
|
67685
|
+
if (indexInfo)
|
|
67686
|
+
{
|
|
67687
|
+
var args=indexInfo.Args;
|
|
67688
|
+
if (item.Args) indexInfo.Args=item.Args;
|
|
67689
|
+
indexInfo.ID=indexID;
|
|
67690
|
+
this.WindowIndex[index]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
|
|
67691
|
+
}
|
|
67692
|
+
}
|
|
67693
|
+
}
|
|
67694
|
+
}
|
|
67660
67695
|
}
|
|
67661
67696
|
|
|
67662
67697
|
if (!symbol || this.DayCount<=0)
|