hqchart 1.1.14962 → 1.1.14965
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
|
@@ -1190,7 +1190,7 @@ if(option.KLine.MaxRequestDataCount>0)chart.MaxRequestDataCount=option.KLine.Max
|
|
|
1190
1190
|
if(option.KLine.RightSpaceCount>0)chart.RightSpaceCount=option.KLine.RightSpaceCount;if(option.KLine.ZoomType>0)chart.ZoomType=option.KLine.ZoomType;if(option.KLine.DataWidth>=1)chart.KLineSize={DataWidth:option.KLine.DataWidth};if(IFrameSplitOperator.IsNumber(option.KLine.RightFormula))chart.RightFormula=option.KLine.RightFormula;}//自定义显示位置
|
|
1191
1191
|
if(option.CustomShow&&IFrameSplitOperator.IsPlusNumber(option.CustomShow.Date)){var item=option.CustomShow;chart.CustomShow={Date:item.Date};if(IFrameSplitOperator.IsNumber(item.Time))chart.CustomShow.Time=item.Time;if(IFrameSplitOperator.IsPlusNumber(item.PageSize))chart.CustomShow.PageSize=item.PageSize;}if(option.EnableFlowCapital){var item=option.EnableFlowCapital;if(item.BIT==true)chart.EnableFlowCapital.BIT=item.BIT;}if(IFrameSplitOperator.IsBool(option.EnableBorderDrag)){chart.EnableBorderDrag=option.EnableBorderDrag;}if(option.Page){if(option.Page.Day&&option.Page.Day.Enable==true)chart.Page.Day.Enable=true;if(option.Page.Minute&&option.Page.Minute.Enable==true)chart.Page.Minute.Enable=true;}if(option.DragDownload){if(option.DragDownload.Day&&option.DragDownload.Day.Enable==true)chart.DragDownload.Day.Enable=true;if(option.DragDownload.Minute&&option.DragDownload.Minute.Enable==true)chart.DragDownload.Minute.Enable=true;}if(option.ZoomDownload){if(option.ZoomDownload.Day&&IFrameSplitOperator.IsBool(option.ZoomDownload.Day.Enable))chart.ZoomDownload.Day.Enable=option.ZoomDownload.Day.Enable;if(option.ZoomDownload.Minute&&IFrameSplitOperator.IsBool(option.ZoomDownload.Minute.Enable))chart.ZoomDownload.Minute.Enable=option.ZoomDownload.Minute.Enable;}if(option.Language){var value=g_JSChartLocalization.GetLanguageID(option.Language);if(IFrameSplitOperator.IsNumber(value))chart.LanguageID=value;}if(option.SourceDatatLimit)chart.SetSourceDatatLimit(option.SourceDatatLimit);if(option.DrawPicture)//画图工具
|
|
1192
1192
|
{if(option.DrawPicture.StorageKey&&chart.ChartDrawStorage)chart.ChartDrawStorage.Load(option.DrawPicture.StorageKey);}if(option.DrawTool)//画图工具
|
|
1193
|
-
{if(option.DrawTool.StorageKey&&chart.ChartDrawStorage)chart.ChartDrawStorage.Load(option.DrawTool.StorageKey);}if(option.KeyboardMove){var item=option.KeyboardMove;if(IFrameSplitOperator.IsPlusNumber(item.Delay))chart.KeyboardMove.Delay=item.Delay;}if(IFrameSplitOperator.IsNumber(option.StepPixel))chart.StepPixel=option.StepPixel;if(option.ZoomStepPixel>0)chart.ZoomStepPixel=option.ZoomStepPixel;if(option.IsApiPeriod==true)chart.IsApiPeriod=option.IsApiPeriod;//图形选中
|
|
1193
|
+
{if(option.DrawTool.StorageKey&&chart.ChartDrawStorage)chart.ChartDrawStorage.Load(option.DrawTool.StorageKey);}if(option.KeyboardMove){var item=option.KeyboardMove;if(IFrameSplitOperator.IsPlusNumber(item.Delay))chart.KeyboardMove.Delay=item.Delay;if(IFrameSplitOperator.IsPlusNumber(item.PressTime))chart.KeyboardMove.PressTime=item.PressTime;}if(IFrameSplitOperator.IsNumber(option.StepPixel))chart.StepPixel=option.StepPixel;if(option.ZoomStepPixel>0)chart.ZoomStepPixel=option.ZoomStepPixel;if(option.IsApiPeriod==true)chart.IsApiPeriod=option.IsApiPeriod;//图形选中
|
|
1194
1194
|
if(option.SelectedChart){var item=option.SelectedChart;if(IFrameSplitOperator.IsBool(item.EnableSelected))chart.SelectedChart.EnableSelected=item.EnableSelected;if(IFrameSplitOperator.IsBool(item.EnableMoveOn))chart.SelectedChart.EnableMoveOn=item.EnableMoveOn;}if(option.PressKeyboardConfig)this.SetPressKeyboardConfig(chart,option.PressKeyboardConfig);if(!option.Windows||option.Windows.length<=0)return null;//K线扩展计算方法配置
|
|
1195
1195
|
if(IFrameSplitOperator.IsNonEmptyArray(option.KLineCalcOption)){for(var i=0;i<option.KLineCalcOption.length;++i){var item=option.KLineCalcOption[i];if(!item.ClassName||!item.Option)continue;chart.SetKLineCalcOption(item.ClassName,item.Option);}}if(option.FastSlide){var item=option.FastSlide;if(IFrameSplitOperator.IsNumber(item.MinDistance))chart.FastSlideConfig.MinDistance=item.MinDistance;if(IFrameSplitOperator.IsNumber(item.MinSpeed))chart.FastSlideConfig.MinSpeed=item.MinSpeed;if(IFrameSplitOperator.IsNumber(item.MaxTime))chart.FastSlideConfig.MaxTime=item.MaxTime;if(IFrameSplitOperator.IsBool(item.Enable))chart.FastSlideConfig.Enable=item.Enable;}if(chart.ClassName=="KLineChartContainer"){if(!option.DragSelectRect){option.DragSelectRect={Enable:true};//默认开启区间选中画布
|
|
1196
1196
|
}if(option.DragSelectRect){var zindex=10;var item=option.DragSelectRect;if(IFrameSplitOperator.IsNumber(item.ZIndex))zindex=item.ZIndex;if(item.Enable)this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey,{ZIndex:zindex});//创建独立的区间选择画布
|
|
@@ -1772,7 +1772,7 @@ this.PreventRightMenu={Timer:null,Enable:false,Delay:2000};//阻止右键菜单
|
|
|
1772
1772
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
1773
1773
|
this.AryHotKey=[];//热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
1774
1774
|
this.FastSlideConfig={MinDistance:500,MinSpeed:3,MaxTime:250,Enable:false};//快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
1775
|
-
this.KeyboardMove={Timer:null,Delay:100,Enable:false,Event:null};//键盘左右移动
|
|
1775
|
+
this.KeyboardMove={Timer:null,Delay:100,PressTime:500,Enable:false,Event:null};//键盘左右移动 PressTime=长按时间
|
|
1776
1776
|
this.MapEventListenerCache=new _map2.default();//addEventListener 监听事件 key=type:"keydown|keyup ....", value:{ Callback:, Option: }
|
|
1777
1777
|
this.AddEventListener=function(eventTarget,type,listener,option){if(!eventTarget||!type||!listener)return false;var callback=listener.bind(this);var item={Callback:callback,Option:option,Type:type,Element:eventTarget};eventTarget.addEventListener(type,callback,option);this.MapEventListenerCache.set(item.Type,item);return true;};this.RemoveEventListener=function(eventTarget,type){if(!eventTarget||!type)return false;if(!this.MapEventListenerCache.has(type))return false;var item=this.MapEventListenerCache.get(type);if(!item.Element||!item.Callback)return false;this.MapEventListenerCache.delete(item.Type);item.Element.removeEventListener(item.Type,item.Callback,item.Option);};//option={ KeyDown:, Wheel }
|
|
1778
1778
|
this.AddDefaultEventListener=function(option){var _this4=this;var bRegisterKeydown=true;var bRegisterWheel=true;if(option){if(IFrameSplitOperator.IsBool(option.KeyDown))bRegisterKeydown=option.KeyDown;if(IFrameSplitOperator.IsBool(option.Wheel))bRegisterWheel=option.Wheel;}if(bRegisterKeydown){this.AddEventListener(this.UIElement,"keydown",function(e){_this4.OnKeyDown(e);},true);this.AddEventListener(this.UIElement,"keyup",function(e){_this4.OnKeyUp(e);},true);}if(bRegisterWheel){this.AddEventListener(this.UIElement,"wheel",function(e){_this4.OnWheel(e);},true);}JSConsole.Chart.Log('[JSChartContainer::AddDefaultEventListener] [keydown,keyup]='+bRegisterKeydown+', [wheel]='+bRegisterWheel);};this.RemoveAllEventListener=function(){var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=(0,_getIterator3.default)(this.MapEventListenerCache),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var mapItem=_step2.value;var item=mapItem[1];if(!item.Element||!item.Callback)continue;item.Element.removeEventListener(item.Type,item.Callback,item.Option);}}catch(err){_didIteratorError2=true;_iteratorError2=err;}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return();}}finally{if(_didIteratorError2){throw _iteratorError2;}}}this.MapEventListenerCache.clear();};this.ClearGlobalOption=function(){if(!this.GlobalOption)return;this.GlobalOption.LatestPoint=null;this.GlobalOption.TradeStatus=null;};this.RestoreFocus=function(delay){var _this5=this;var value=1000;if(IFrameSplitOperator.IsNumber(delay))value=delay;this.ClearRestoreFocusTimer();this.RestoreFocusTimer=setTimeout(function(){_this5.SetFocus();},value);};this.ClearRestoreFocusTimer=function(){if(this.RestoreFocusTimer){clearTimeout(this.RestoreFocusTimer);this.RestoreFocusTimer=null;}};this.GetVolUnit=function()//成交量单位
|
|
@@ -2130,7 +2130,7 @@ case 35://END
|
|
|
2130
2130
|
case 36://HOME
|
|
2131
2131
|
if(this.OnCustomKeyDown)this.OnCustomKeyDown(keyID,e);break;default:return;}if(draw)this.DrawDynamicInfo();if(keyID==37||keyID==39)this.StartKeyboardMoveTimer(e);//不让滚动条滚动
|
|
2132
2132
|
if(e.preventDefault)e.preventDefault();else e.returnValue=false;};this.ClearKeyboardMoveTimer=function(){if(!this.KeyboardMove)return;this.KeyboardMove.Event=null;if(this.KeyboardMove.Timer){clearTimeout(this.KeyboardMove.Timer);this.KeyboardMove.Timer=null;JSConsole.Chart.Log('[JSChartContainer::ClearKeyboardMoveTimer] Stop');}this.KeyboardMove.Enable=false;};this.StartKeyboardMoveTimer=function(e){if(!this.KeyboardMove)return;if(this.KeyboardMove.Enable)return;//已启动
|
|
2133
|
-
this.KeyboardMove.Event=e;this.KeyboardMove.Enable=true;JSConsole.Chart.Log('[JSChartContainer::StartKeyboardMoveTimer] Start');this.AutoKeyboardMove();};this.AutoKeyboardMove=function(){var _this15=this;if(!this.KeyboardMove)return false;if(!this.KeyboardMove.Enable)return false;if(!this.KeyboardMove.Event)return false;this.KeyboardMove.Timer=setTimeout(function(){_this15.OnKeyboardMoveTimerProc();},
|
|
2133
|
+
this.KeyboardMove.Event=e;this.KeyboardMove.Enable=true;JSConsole.Chart.Log('[JSChartContainer::StartKeyboardMoveTimer] Start');this.AutoKeyboardMove({Delay:this.KeyboardMove.PressTime});};this.AutoKeyboardMove=function(option){var _this15=this;if(!this.KeyboardMove)return false;if(!this.KeyboardMove.Enable)return false;if(!this.KeyboardMove.Event)return false;var delay=this.KeyboardMove.Delay;if(option&&IFrameSplitOperator.IsNumber(option.Delay))delay=option.Delay;this.KeyboardMove.Timer=setTimeout(function(){_this15.OnKeyboardMoveTimerProc();},delay);};this.OnKeyboardMoveTimerProc=function(){if(!this.KeyboardMove)return false;if(!this.KeyboardMove.Enable)return false;if(!this.KeyboardMove.Event)return false;var e=this.KeyboardMove.Event;var keyID=e.keyCode?e.keyCode:e.which;var bStop=false;switch(keyID){case 37://left
|
|
2134
2134
|
if((e.ctrlKey||e.shiftKey)&&this.OnCustomKeyDown){if(this.OnCustomKeyDown(keyID,e))break;}//K线 如果超出K线数据了 调整到最后一个数据
|
|
2135
2135
|
if(this.FixCursorIndexValid&&this.FixCursorIndexValid()){this.UpdatePointByCursorIndex();this.DrawDynamicInfo();this.ShowTooltipByKeyDown();break;}if(this.CursorIndex<=0.99999){if(!this.DataMoveLeft()){//左移数据到头了 触发下载新数据
|
|
2136
2136
|
if(this.DragDownloadData)this.DragDownloadData();break;}this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXSplit();this.Draw();this.ShowTooltipByKeyDown();this.OnKLinePageChange("keydown");}else{--this.CursorIndex;this.UpdatePointByCursorIndex();this.DrawDynamicInfo();this.ShowTooltipByKeyDown();}break;case 39://right
|
|
@@ -6308,11 +6308,13 @@ this.NameButtonHeight=0;//指标名字按钮高度
|
|
|
6308
6308
|
this.UpDownArrowConfig={UpColor:g_JSChartResource.IndexTitle.UpDownArrow.UpColor,DownColor:g_JSChartResource.IndexTitle.UpDownArrow.DownColor,UnchangeColor:g_JSChartResource.IndexTitle.UpDownArrow.UnchangeColor};//K线标题颜色
|
|
6309
6309
|
this.UpColor=g_JSChartResource.UpTextColor;this.DownColor=g_JSChartResource.DownTextColor;this.UnchangeColor=g_JSChartResource.UnchagneTextColor;this.VolColor=g_JSChartResource.Title.VolColor;this.AmountColor=g_JSChartResource.Title.AmountColor;this.DateTimeColor=g_JSChartResource.Title.DateTimeColor;this.NameColor=g_JSChartResource.Title.NameColor;this.PositionColor=g_JSChartResource.Title.PositionColor;//持仓
|
|
6310
6310
|
//动态标题
|
|
6311
|
-
|
|
6311
|
+
//叠加指标动态标题
|
|
6312
6312
|
this.DynamicTitle={OutName:null,OutValue:null};this.OverlayDynamicTitle=new _map2.default();//key , value={ OutName, OutValue }
|
|
6313
6313
|
this.IsShowMainIndexTitle=true;//是否显示主图指标标题
|
|
6314
6314
|
this.MainTitlePaint=null;//主标题
|
|
6315
|
-
|
|
6315
|
+
//option={ DynamicTitle:true/false }
|
|
6316
|
+
this.Clear=function(option){this.Data=[];this.Title=null;if(option){if(option.DynamicTitle===true)this.DynamicTitle={OutName:null,OutValue:null};//主图胴动态标题
|
|
6317
|
+
}};//十字线是否显示
|
|
6316
6318
|
this.IsShowCorssLine=function(){if(!this.HQChart||!this.HQChart.ChartCorssCursor)return false;return this.HQChart.ChartCorssCursor.IsShowCorss;};this.ReloadResource=function(){this.Font=g_JSChartResource.TitleFont;this.TitleColor=g_JSChartResource.DefaultTextColor;this.SelectedColor=g_JSChartResource.IndexTitleSelectedColor;this.OverlayIndexType.BGColor=g_JSChartResource.OverlayIndexTitleBGColor;this.BGColor=g_JSChartResource.IndexTitleBGColor;this.BGBorderColor=g_JSChartResource.IndexTitleBorderColor;this.BGBorderMoveOnColor=g_JSChartResource.IndexTitleBorderMoveOnColor;this.UpColor=g_JSChartResource.UpTextColor;this.DownColor=g_JSChartResource.DownTextColor;this.UnchangeColor=g_JSChartResource.UnchagneTextColor;this.VolColor=g_JSChartResource.Title.VolColor;this.AmountColor=g_JSChartResource.Title.AmountColor;this.DateTimeColor=g_JSChartResource.Title.DateTimeColor;this.PositionColor=g_JSChartResource.Title.PositionColor;//持仓
|
|
6317
6319
|
};this.SetDynamicTitleData=function(outName,args,data){if(!data.OutName)data.OutName=new _map2.default();else data.OutName.clear();if(!data.OutValue)data.OutValue=new _map2.default();else data.OutValue.clear();var mapArgs=new _map2.default();for(var i in args){var item=args[i];mapArgs.set('{'+item.Name+'}',item);}for(var i in outName){var item=outName[i];if(item.DynamicName){var aryFond=item.DynamicName.match(/{\w*}/i);if(!aryFond||aryFond.length<=0){data.OutName.set(item.Name,item.DynamicName);}else{var dyName=item.DynamicName;var bFind=true;for(var j=0;j<aryFond.length;++j){var findItem=aryFond[j];if(mapArgs.has(findItem)){var value=mapArgs.get(findItem).Value;dyName=dyName.replace(findItem,value.toString());}else{bFind=false;break;}}if(bFind)data.OutName.set(item.Name,dyName);}}if(item.DynamicValue){data.OutValue.set(item.Name,item.DynamicValue);}}};this.SetDynamicTitle=function(outName,args,overlayID){if(IFrameSplitOperator.IsString(overlayID)){var dynamicTitle=null;if(this.OverlayDynamicTitle.has(overlayID)){dynamicTitle=this.OverlayDynamicTitle.get(overlayID);}else{dynamicTitle={OutName:null,OutValue:null};this.OverlayDynamicTitle.set(overlayID,dynamicTitle);}this.SetDynamicTitleData(outName,args,dynamicTitle);}else{this.SetDynamicTitleData(outName,args,this.DynamicTitle);}};this.GetDynamicOutName=function(key,overlayID){if(IFrameSplitOperator.IsString(overlayID)){if(!this.OverlayDynamicTitle.has(overlayID))return null;var dynamicTitle=this.OverlayDynamicTitle.get(overlayID);var outName=dynamicTitle.OutName;}else{var outName=this.DynamicTitle.OutName;}if(!outName||outName.size<=0)return null;if(!outName.has(key))return null;return outName.get(key);};this.GetDynamicOutValue=function(key,value){var outValue=this.DynamicTitle.OutValue;if(!outValue||outValue.size<=0)return null;if(!outValue.has(key))return null;var strFormat=outValue.get(key);strFormat=strFormat.replace('{Value}',value);return strFormat;};this.IsClickTitle=function(x,y)//是否点击了指标标题
|
|
6318
6320
|
{if(!this.TitleRect)return false;if(x>this.TitleRect.Left&&x<this.TitleRect.Left+this.TitleRect.Width&&y>this.TitleRect.Top&&y<this.TitleRect.Top+this.TitleRect.Height){return true;}return false;};this.FormatValue=function(value,item){if(item.StringFormat==STRING_FORMAT_TYPE.DEFAULT)return IFrameSplitOperator.FormatValueStringV2(value,item.FloatPrecision,2,this.LanguageID);else if(item.StringFormat==STRING_FORMAT_TYPE.THOUSANDS)return IFrameSplitOperator.FormatValueThousandsString(value,item.FloatPrecision);else if(item.StringFormat==STRING_FORMAT_TYPE.ORIGINAL)return value.toFixed(item.FloatPrecision).toString();else if(item.StringFormat==STRING_FORMAT_TYPE.INTEGER)return IFrameSplitOperator.FromatIntegerString(value,item.FloatPrecision,this.LanguageID);};this.FormatMultiReport=function(data,format){if(!IFrameSplitOperator.IsNonEmptyArray(data))return null;var text="";for(var i=0;i<data.length;++i){var item=data[i];var quarter=item.Quarter;var year=item.Year;var _value2=item.Value;if(text.length>0)text+=',';text+=year.toString();switch(quarter){case 1:text+='一季报 ';break;case 2:text+='半年报 ';break;case 3:text+='三季报 ';break;case 4:text+='年报 ';break;}text+=this.FormatValue(_value2,format);}return text;};this.FormatMultiDataLine=function(value,dataInfo){if(!value)return null;var text="";if(Array.isArray(value)){for(var i=0;i<value.length;++i){var item=value[i];if(item.Type==0)continue;if(!IFrameSplitOperator.IsNumber(item.Value))continue;var strValue=this.FormatValue(item.Value,dataInfo);if(text.length>0)text+=',';text+=strValue;}}else{if(value.Type!=0&&IFrameSplitOperator.IsNumber(value.Value)){text=this.FormatValue(value.Value,dataInfo);}}if(text.length<=0)return null;return text;};//多变量输出
|
|
@@ -8180,7 +8182,7 @@ subFrame.IsLocked=false;//解除上锁
|
|
|
8180
8182
|
subFrame.YSplitScale=null;//清空固定刻度
|
|
8181
8183
|
subFrame.YSplitOperator.SplitType=subFrame.YSplitOperator.DefaultSplitType;//还原Y坐标分割模式
|
|
8182
8184
|
this.ChartPaint=paint;//清空东条标题
|
|
8183
|
-
var titleIndex=windowIndex+1;this.TitlePaint[titleIndex]
|
|
8185
|
+
var titleIndex=windowIndex+1;var chartTitle=this.TitlePaint[titleIndex];if(chartTitle)chartTitle.Clear({DynamicTitle:true});};//显示隐藏主图K线
|
|
8184
8186
|
this.ShowKLine=function(isShow){if(this.ChartPaint.length<=0||!this.ChartPaint[0])return;this.ChartPaint[0].IsShow=isShow;};this.SetInstructionData=function(type,instructionData){if(this.ChartPaint.length<=0||!this.ChartPaint[0])return;var title=this.TitlePaint[1];if(type==2)//五彩K线
|
|
8185
8187
|
{this.ChartPaint[0].ColorData=instructionData.Data;if(title)title.ColorIndex={Name:instructionData.Name,Param:instructionData.Param};}else if(type==1)//专家指示
|
|
8186
8188
|
{this.ChartPaint[0].TradeData={Sell:instructionData.Sell,Buy:instructionData.Buy,Name:instructionData.Name,Param:instructionData.Param};if(title)title.TradeIndex={Name:instructionData.Name,Param:instructionData.Param};}};this.ChangeInstructionIndex=function(indexName,option){var scriptData=new JSIndexScript();var indexInfo=scriptData.Get(indexName);if(!indexInfo)return;if(indexInfo.InstructionType!=1&&indexInfo.InstructionType!=2)return;if(option){if(option.Args)indexInfo.Args=option.Args;}indexInfo.ID=indexName;this.ChangeInstructionScriptIndex(indexInfo);};this.ChangeInstructionScriptIndex=function(indexData){if(indexData.InstructionType==1)//交易系统
|
|
@@ -8217,7 +8219,7 @@ this.ChangeIndex=function(windowIndex,indexName,option){if(option&&option.API)//
|
|
|
8217
8219
|
return this.ChangeAPIIndex(windowIndex,option);var indexItem=JSIndexMap.Get(indexName);if(!indexItem){//查找系统指标
|
|
8218
8220
|
var scriptData=new JSIndexScript();var indexInfo=scriptData.Get(indexName);if(!indexInfo)return;if(indexInfo.IsMainIndex){windowIndex=0;//主图指标只能在主图显示
|
|
8219
8221
|
}else{if(windowIndex==0)windowIndex=1;//幅图指标,不能再主图显示
|
|
8220
|
-
}JSIndexScript.ModifyAttribute(indexInfo,option);return this.ChangeScriptIndex(windowIndex,indexInfo,option);}//主图指标
|
|
8222
|
+
}if(this.Frame.SubFrame.length<=windowIndex)return;JSIndexScript.ModifyAttribute(indexInfo,option);return this.ChangeScriptIndex(windowIndex,indexInfo,option);}//主图指标
|
|
8221
8223
|
if(indexItem.IsMainIndex){if(windowIndex>0)windowIndex=0;//主图指标只能在主图显示
|
|
8222
8224
|
}else{if(windowIndex==0)windowIndex=1;//幅图指标,不能再主图显示
|
|
8223
8225
|
}var paint=new Array();//踢出当前窗口的指标画法
|
|
@@ -8225,7 +8227,7 @@ for(var i in this.ChartPaint){var item=this.ChartPaint[i];if(i==0||item.ChartFra
|
|
|
8225
8227
|
this.Frame.SubFrame[windowIndex].Frame.IsLocked=false;//解除上锁
|
|
8226
8228
|
this.Frame.SubFrame[windowIndex].Frame.YSplitScale=null;//清空固定刻度
|
|
8227
8229
|
this.ChartPaint=paint;//清空东条标题
|
|
8228
|
-
var titleIndex=windowIndex+1;this.TitlePaint[titleIndex]
|
|
8230
|
+
var titleIndex=windowIndex+1;var chartTitle=this.TitlePaint[titleIndex];chartTitle.Clear({DynamicTitle:true});this.WindowIndex[windowIndex]=indexItem.Create(option);this.CreateWindowIndex(windowIndex);var bindData=this.ChartPaint[0].Data;this.BindIndexData(windowIndex,bindData);this.UpdataDataoffset();//更新数据偏移
|
|
8229
8231
|
this.UpdateFrameMaxMin();//调整坐标最大 最小值
|
|
8230
8232
|
this.Draw();};this.ChangePyScriptIndex=function(windowIndex,indexData){this.DeleteIndexPaint(windowIndex);this.WindowIndex[windowIndex]=new PyScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData);//脚本执行
|
|
8231
8233
|
var bindData=this.ChartPaint[0].Data;this.BindIndexData(windowIndex,bindData);//执行脚本
|
|
@@ -15239,7 +15241,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
15239
15241
|
this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
|
|
15240
15242
|
* 版本信息输出
|
|
15241
15243
|
*
|
|
15242
|
-
*/var HQCHART_VERSION="1.1.
|
|
15244
|
+
*/var HQCHART_VERSION="1.1.14964";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
15243
15245
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
15244
15246
|
// BaseIndex:BaseIndex,
|
|
15245
15247
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -429,6 +429,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
429
429
|
{
|
|
430
430
|
var item=option.KeyboardMove;
|
|
431
431
|
if (IFrameSplitOperator.IsPlusNumber(item.Delay)) chart.KeyboardMove.Delay=item.Delay;
|
|
432
|
+
if (IFrameSplitOperator.IsPlusNumber(item.PressTime)) chart.KeyboardMove.PressTime=item.PressTime;
|
|
432
433
|
}
|
|
433
434
|
|
|
434
435
|
if (IFrameSplitOperator.IsNumber(option.StepPixel)) chart.StepPixel=option.StepPixel;
|
|
@@ -3322,7 +3323,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3322
3323
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
3323
3324
|
|
|
3324
3325
|
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
3325
|
-
this.KeyboardMove={ Timer:null, Delay:100 , Enable:false, Event:null }; //键盘左右移动
|
|
3326
|
+
this.KeyboardMove={ Timer:null, Delay:100 , PressTime:500, Enable:false, Event:null }; //键盘左右移动 PressTime=长按时间
|
|
3326
3327
|
|
|
3327
3328
|
this.MapEventListenerCache=new Map(); //addEventListener 监听事件 key=type:"keydown|keyup ....", value:{ Callback:, Option: }
|
|
3328
3329
|
|
|
@@ -7865,19 +7866,22 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7865
7866
|
|
|
7866
7867
|
JSConsole.Chart.Log(`[JSChartContainer::StartKeyboardMoveTimer] Start` );
|
|
7867
7868
|
|
|
7868
|
-
this.AutoKeyboardMove();
|
|
7869
|
+
this.AutoKeyboardMove({ Delay:this.KeyboardMove.PressTime });
|
|
7869
7870
|
}
|
|
7870
7871
|
|
|
7871
|
-
this.AutoKeyboardMove=function()
|
|
7872
|
+
this.AutoKeyboardMove=function(option)
|
|
7872
7873
|
{
|
|
7873
7874
|
if (!this.KeyboardMove) return false;
|
|
7874
7875
|
if (!this.KeyboardMove.Enable) return false;
|
|
7875
7876
|
if (!this.KeyboardMove.Event) return false;
|
|
7876
7877
|
|
|
7878
|
+
var delay=this.KeyboardMove.Delay;
|
|
7879
|
+
if (option && IFrameSplitOperator.IsNumber(option.Delay)) delay=option.Delay;
|
|
7880
|
+
|
|
7877
7881
|
this.KeyboardMove.Timer=setTimeout(()=>
|
|
7878
7882
|
{
|
|
7879
7883
|
this.OnKeyboardMoveTimerProc();
|
|
7880
|
-
},
|
|
7884
|
+
},delay);
|
|
7881
7885
|
}
|
|
7882
7886
|
|
|
7883
7887
|
|
|
@@ -61766,13 +61770,24 @@ function DynamicChartTitlePainting()
|
|
|
61766
61770
|
|
|
61767
61771
|
|
|
61768
61772
|
//动态标题
|
|
61769
|
-
|
|
61773
|
+
//叠加指标动态标题
|
|
61770
61774
|
this.DynamicTitle={ OutName:null, OutValue:null };
|
|
61771
61775
|
this.OverlayDynamicTitle=new Map(); //key , value={ OutName, OutValue }
|
|
61772
61776
|
|
|
61773
61777
|
this.IsShowMainIndexTitle=true; //是否显示主图指标标题
|
|
61774
61778
|
this.MainTitlePaint=null; //主标题
|
|
61775
61779
|
|
|
61780
|
+
//option={ DynamicTitle:true/false }
|
|
61781
|
+
this.Clear=function(option)
|
|
61782
|
+
{
|
|
61783
|
+
this.Data=[];
|
|
61784
|
+
this.Title=null;
|
|
61785
|
+
if (option)
|
|
61786
|
+
{
|
|
61787
|
+
if (option.DynamicTitle===true) this.DynamicTitle={ OutName:null, OutValue:null }; //主图胴动态标题
|
|
61788
|
+
}
|
|
61789
|
+
}
|
|
61790
|
+
|
|
61776
61791
|
//十字线是否显示
|
|
61777
61792
|
this.IsShowCorssLine=function()
|
|
61778
61793
|
{
|
|
@@ -83937,8 +83952,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83937
83952
|
|
|
83938
83953
|
//清空东条标题
|
|
83939
83954
|
var titleIndex=windowIndex+1;
|
|
83940
|
-
this.TitlePaint[titleIndex]
|
|
83941
|
-
|
|
83955
|
+
var chartTitle=this.TitlePaint[titleIndex];
|
|
83956
|
+
if (chartTitle) chartTitle.Clear({ DynamicTitle:true });
|
|
83942
83957
|
}
|
|
83943
83958
|
|
|
83944
83959
|
//显示隐藏主图K线
|
|
@@ -84201,6 +84216,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
84201
84216
|
if (windowIndex == 0) windowIndex = 1; //幅图指标,不能再主图显示
|
|
84202
84217
|
}
|
|
84203
84218
|
|
|
84219
|
+
if (this.Frame.SubFrame.length<=windowIndex) return;
|
|
84220
|
+
|
|
84204
84221
|
JSIndexScript.ModifyAttribute(indexInfo, option);
|
|
84205
84222
|
return this.ChangeScriptIndex(windowIndex, indexInfo, option);
|
|
84206
84223
|
}
|
|
@@ -84233,8 +84250,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
84233
84250
|
|
|
84234
84251
|
//清空东条标题
|
|
84235
84252
|
var titleIndex=windowIndex+1;
|
|
84236
|
-
this.TitlePaint[titleIndex]
|
|
84237
|
-
|
|
84253
|
+
var chartTitle=this.TitlePaint[titleIndex];
|
|
84254
|
+
chartTitle.Clear({ DynamicTitle:true });
|
|
84238
84255
|
|
|
84239
84256
|
this.WindowIndex[windowIndex]=indexItem.Create(option);
|
|
84240
84257
|
this.CreateWindowIndex(windowIndex);
|
|
@@ -4525,6 +4525,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4525
4525
|
{
|
|
4526
4526
|
var item=option.KeyboardMove;
|
|
4527
4527
|
if (IFrameSplitOperator.IsPlusNumber(item.Delay)) chart.KeyboardMove.Delay=item.Delay;
|
|
4528
|
+
if (IFrameSplitOperator.IsPlusNumber(item.PressTime)) chart.KeyboardMove.PressTime=item.PressTime;
|
|
4528
4529
|
}
|
|
4529
4530
|
|
|
4530
4531
|
if (IFrameSplitOperator.IsNumber(option.StepPixel)) chart.StepPixel=option.StepPixel;
|
|
@@ -7418,7 +7419,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7418
7419
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7419
7420
|
|
|
7420
7421
|
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7421
|
-
this.KeyboardMove={ Timer:null, Delay:100 , Enable:false, Event:null }; //键盘左右移动
|
|
7422
|
+
this.KeyboardMove={ Timer:null, Delay:100 , PressTime:500, Enable:false, Event:null }; //键盘左右移动 PressTime=长按时间
|
|
7422
7423
|
|
|
7423
7424
|
this.MapEventListenerCache=new Map(); //addEventListener 监听事件 key=type:"keydown|keyup ....", value:{ Callback:, Option: }
|
|
7424
7425
|
|
|
@@ -11961,19 +11962,22 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11961
11962
|
|
|
11962
11963
|
JSConsole.Chart.Log(`[JSChartContainer::StartKeyboardMoveTimer] Start` );
|
|
11963
11964
|
|
|
11964
|
-
this.AutoKeyboardMove();
|
|
11965
|
+
this.AutoKeyboardMove({ Delay:this.KeyboardMove.PressTime });
|
|
11965
11966
|
}
|
|
11966
11967
|
|
|
11967
|
-
this.AutoKeyboardMove=function()
|
|
11968
|
+
this.AutoKeyboardMove=function(option)
|
|
11968
11969
|
{
|
|
11969
11970
|
if (!this.KeyboardMove) return false;
|
|
11970
11971
|
if (!this.KeyboardMove.Enable) return false;
|
|
11971
11972
|
if (!this.KeyboardMove.Event) return false;
|
|
11972
11973
|
|
|
11974
|
+
var delay=this.KeyboardMove.Delay;
|
|
11975
|
+
if (option && IFrameSplitOperator.IsNumber(option.Delay)) delay=option.Delay;
|
|
11976
|
+
|
|
11973
11977
|
this.KeyboardMove.Timer=setTimeout(()=>
|
|
11974
11978
|
{
|
|
11975
11979
|
this.OnKeyboardMoveTimerProc();
|
|
11976
|
-
},
|
|
11980
|
+
},delay);
|
|
11977
11981
|
}
|
|
11978
11982
|
|
|
11979
11983
|
|
|
@@ -65862,13 +65866,24 @@ function DynamicChartTitlePainting()
|
|
|
65862
65866
|
|
|
65863
65867
|
|
|
65864
65868
|
//动态标题
|
|
65865
|
-
|
|
65869
|
+
//叠加指标动态标题
|
|
65866
65870
|
this.DynamicTitle={ OutName:null, OutValue:null };
|
|
65867
65871
|
this.OverlayDynamicTitle=new Map(); //key , value={ OutName, OutValue }
|
|
65868
65872
|
|
|
65869
65873
|
this.IsShowMainIndexTitle=true; //是否显示主图指标标题
|
|
65870
65874
|
this.MainTitlePaint=null; //主标题
|
|
65871
65875
|
|
|
65876
|
+
//option={ DynamicTitle:true/false }
|
|
65877
|
+
this.Clear=function(option)
|
|
65878
|
+
{
|
|
65879
|
+
this.Data=[];
|
|
65880
|
+
this.Title=null;
|
|
65881
|
+
if (option)
|
|
65882
|
+
{
|
|
65883
|
+
if (option.DynamicTitle===true) this.DynamicTitle={ OutName:null, OutValue:null }; //主图胴动态标题
|
|
65884
|
+
}
|
|
65885
|
+
}
|
|
65886
|
+
|
|
65872
65887
|
//十字线是否显示
|
|
65873
65888
|
this.IsShowCorssLine=function()
|
|
65874
65889
|
{
|
|
@@ -88033,8 +88048,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88033
88048
|
|
|
88034
88049
|
//清空东条标题
|
|
88035
88050
|
var titleIndex=windowIndex+1;
|
|
88036
|
-
this.TitlePaint[titleIndex]
|
|
88037
|
-
|
|
88051
|
+
var chartTitle=this.TitlePaint[titleIndex];
|
|
88052
|
+
if (chartTitle) chartTitle.Clear({ DynamicTitle:true });
|
|
88038
88053
|
}
|
|
88039
88054
|
|
|
88040
88055
|
//显示隐藏主图K线
|
|
@@ -88297,6 +88312,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88297
88312
|
if (windowIndex == 0) windowIndex = 1; //幅图指标,不能再主图显示
|
|
88298
88313
|
}
|
|
88299
88314
|
|
|
88315
|
+
if (this.Frame.SubFrame.length<=windowIndex) return;
|
|
88316
|
+
|
|
88300
88317
|
JSIndexScript.ModifyAttribute(indexInfo, option);
|
|
88301
88318
|
return this.ChangeScriptIndex(windowIndex, indexInfo, option);
|
|
88302
88319
|
}
|
|
@@ -88329,8 +88346,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88329
88346
|
|
|
88330
88347
|
//清空东条标题
|
|
88331
88348
|
var titleIndex=windowIndex+1;
|
|
88332
|
-
this.TitlePaint[titleIndex]
|
|
88333
|
-
|
|
88349
|
+
var chartTitle=this.TitlePaint[titleIndex];
|
|
88350
|
+
chartTitle.Clear({ DynamicTitle:true });
|
|
88334
88351
|
|
|
88335
88352
|
this.WindowIndex[windowIndex]=indexItem.Create(option);
|
|
88336
88353
|
this.CreateWindowIndex(windowIndex);
|
|
@@ -151525,7 +151542,7 @@ function ScrollBarBGChart()
|
|
|
151525
151542
|
|
|
151526
151543
|
|
|
151527
151544
|
|
|
151528
|
-
var HQCHART_VERSION="1.1.
|
|
151545
|
+
var HQCHART_VERSION="1.1.14964";
|
|
151529
151546
|
|
|
151530
151547
|
function PrintHQChartVersion()
|
|
151531
151548
|
{
|
|
@@ -4569,6 +4569,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4569
4569
|
{
|
|
4570
4570
|
var item=option.KeyboardMove;
|
|
4571
4571
|
if (IFrameSplitOperator.IsPlusNumber(item.Delay)) chart.KeyboardMove.Delay=item.Delay;
|
|
4572
|
+
if (IFrameSplitOperator.IsPlusNumber(item.PressTime)) chart.KeyboardMove.PressTime=item.PressTime;
|
|
4572
4573
|
}
|
|
4573
4574
|
|
|
4574
4575
|
if (IFrameSplitOperator.IsNumber(option.StepPixel)) chart.StepPixel=option.StepPixel;
|
|
@@ -7462,7 +7463,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7462
7463
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7463
7464
|
|
|
7464
7465
|
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7465
|
-
this.KeyboardMove={ Timer:null, Delay:100 , Enable:false, Event:null }; //键盘左右移动
|
|
7466
|
+
this.KeyboardMove={ Timer:null, Delay:100 , PressTime:500, Enable:false, Event:null }; //键盘左右移动 PressTime=长按时间
|
|
7466
7467
|
|
|
7467
7468
|
this.MapEventListenerCache=new Map(); //addEventListener 监听事件 key=type:"keydown|keyup ....", value:{ Callback:, Option: }
|
|
7468
7469
|
|
|
@@ -12005,19 +12006,22 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12005
12006
|
|
|
12006
12007
|
JSConsole.Chart.Log(`[JSChartContainer::StartKeyboardMoveTimer] Start` );
|
|
12007
12008
|
|
|
12008
|
-
this.AutoKeyboardMove();
|
|
12009
|
+
this.AutoKeyboardMove({ Delay:this.KeyboardMove.PressTime });
|
|
12009
12010
|
}
|
|
12010
12011
|
|
|
12011
|
-
this.AutoKeyboardMove=function()
|
|
12012
|
+
this.AutoKeyboardMove=function(option)
|
|
12012
12013
|
{
|
|
12013
12014
|
if (!this.KeyboardMove) return false;
|
|
12014
12015
|
if (!this.KeyboardMove.Enable) return false;
|
|
12015
12016
|
if (!this.KeyboardMove.Event) return false;
|
|
12016
12017
|
|
|
12018
|
+
var delay=this.KeyboardMove.Delay;
|
|
12019
|
+
if (option && IFrameSplitOperator.IsNumber(option.Delay)) delay=option.Delay;
|
|
12020
|
+
|
|
12017
12021
|
this.KeyboardMove.Timer=setTimeout(()=>
|
|
12018
12022
|
{
|
|
12019
12023
|
this.OnKeyboardMoveTimerProc();
|
|
12020
|
-
},
|
|
12024
|
+
},delay);
|
|
12021
12025
|
}
|
|
12022
12026
|
|
|
12023
12027
|
|
|
@@ -65906,13 +65910,24 @@ function DynamicChartTitlePainting()
|
|
|
65906
65910
|
|
|
65907
65911
|
|
|
65908
65912
|
//动态标题
|
|
65909
|
-
|
|
65913
|
+
//叠加指标动态标题
|
|
65910
65914
|
this.DynamicTitle={ OutName:null, OutValue:null };
|
|
65911
65915
|
this.OverlayDynamicTitle=new Map(); //key , value={ OutName, OutValue }
|
|
65912
65916
|
|
|
65913
65917
|
this.IsShowMainIndexTitle=true; //是否显示主图指标标题
|
|
65914
65918
|
this.MainTitlePaint=null; //主标题
|
|
65915
65919
|
|
|
65920
|
+
//option={ DynamicTitle:true/false }
|
|
65921
|
+
this.Clear=function(option)
|
|
65922
|
+
{
|
|
65923
|
+
this.Data=[];
|
|
65924
|
+
this.Title=null;
|
|
65925
|
+
if (option)
|
|
65926
|
+
{
|
|
65927
|
+
if (option.DynamicTitle===true) this.DynamicTitle={ OutName:null, OutValue:null }; //主图胴动态标题
|
|
65928
|
+
}
|
|
65929
|
+
}
|
|
65930
|
+
|
|
65916
65931
|
//十字线是否显示
|
|
65917
65932
|
this.IsShowCorssLine=function()
|
|
65918
65933
|
{
|
|
@@ -88077,8 +88092,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88077
88092
|
|
|
88078
88093
|
//清空东条标题
|
|
88079
88094
|
var titleIndex=windowIndex+1;
|
|
88080
|
-
this.TitlePaint[titleIndex]
|
|
88081
|
-
|
|
88095
|
+
var chartTitle=this.TitlePaint[titleIndex];
|
|
88096
|
+
if (chartTitle) chartTitle.Clear({ DynamicTitle:true });
|
|
88082
88097
|
}
|
|
88083
88098
|
|
|
88084
88099
|
//显示隐藏主图K线
|
|
@@ -88341,6 +88356,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88341
88356
|
if (windowIndex == 0) windowIndex = 1; //幅图指标,不能再主图显示
|
|
88342
88357
|
}
|
|
88343
88358
|
|
|
88359
|
+
if (this.Frame.SubFrame.length<=windowIndex) return;
|
|
88360
|
+
|
|
88344
88361
|
JSIndexScript.ModifyAttribute(indexInfo, option);
|
|
88345
88362
|
return this.ChangeScriptIndex(windowIndex, indexInfo, option);
|
|
88346
88363
|
}
|
|
@@ -88373,8 +88390,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
88373
88390
|
|
|
88374
88391
|
//清空东条标题
|
|
88375
88392
|
var titleIndex=windowIndex+1;
|
|
88376
|
-
this.TitlePaint[titleIndex]
|
|
88377
|
-
|
|
88393
|
+
var chartTitle=this.TitlePaint[titleIndex];
|
|
88394
|
+
chartTitle.Clear({ DynamicTitle:true });
|
|
88378
88395
|
|
|
88379
88396
|
this.WindowIndex[windowIndex]=indexItem.Create(option);
|
|
88380
88397
|
this.CreateWindowIndex(windowIndex);
|
|
@@ -162901,7 +162918,7 @@ function HQChartScriptWorker()
|
|
|
162901
162918
|
|
|
162902
162919
|
|
|
162903
162920
|
|
|
162904
|
-
var HQCHART_VERSION="1.1.
|
|
162921
|
+
var HQCHART_VERSION="1.1.14964";
|
|
162905
162922
|
|
|
162906
162923
|
function PrintHQChartVersion()
|
|
162907
162924
|
{
|