hqchart 1.1.13781 → 1.1.13791
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
|
@@ -1327,7 +1327,8 @@ this.JSChartContainer.Draw();}};this.CreateResizeListener=function(){var _this4=
|
|
|
1327
1327
|
this.CreateToolbar=function(option){};//创建设置div窗口
|
|
1328
1328
|
this.CreateSettingDiv=function(option){};this.Focus=function(){if(this.CanvasElement)this.CanvasElement.focus();};//切换股票代码接口
|
|
1329
1329
|
this.ChangeSymbol=function(symbol,option){if(this.JSChartContainer)this.JSChartContainer.ChangeSymbol(symbol,option);};//K线切换指标
|
|
1330
|
-
this.ChangeIndex=function(windowIndex,indexName,option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeIndex=='function')this.JSChartContainer.ChangeIndex(windowIndex,indexName,option);}
|
|
1330
|
+
this.ChangeIndex=function(windowIndex,indexName,option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeIndex=='function')this.JSChartContainer.ChangeIndex(windowIndex,indexName,option);};//切换一个窗口指标,包含叠加指标,以及这个窗口的属性
|
|
1331
|
+
this.ChangeIndexWindow=function(windowIndex,option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeIndexWindow=='function')this.JSChartContainer.ChangeIndexWindow(windowIndex,option);};this.AddIndexWindow=function(indexName,option){if(this.JSChartContainer&&typeof this.JSChartContainer.AddIndexWindow=='function')this.JSChartContainer.AddIndexWindow(indexName,option);};this.AddScriptIndexWindow=function(indexInfo,option){if(this.JSChartContainer&&typeof this.JSChartContainer.AddScriptIndexWindow=='function')this.JSChartContainer.AddScriptIndexWindow(indexInfo,option);};this.AddAPIIndexWindow=function(indexData,option){if(this.JSChartContainer&&typeof this.JSChartContainer.AddAPIIndexWindow=='function')this.JSChartContainer.AddAPIIndexWindow(indexData,option);};this.RemoveIndexWindow=function(id){if(this.JSChartContainer&&typeof this.JSChartContainer.RemoveIndexWindow=='function')this.JSChartContainer.RemoveIndexWindow(id);};this.ChangeScriptIndex=function(windowIndex,indexData,option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeScriptIndex=='function')this.JSChartContainer.ChangeScriptIndex(windowIndex,indexData,option);};this.ChangePyScriptIndex=function(windowIndex,indexData)//切换py指标
|
|
1331
1332
|
{if(this.JSChartContainer&&typeof this.JSChartContainer.ChangePyScriptIndex=='function')this.JSChartContainer.ChangePyScriptIndex(windowIndex,indexData);};this.GetIndexInfo=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.GetIndexInfo=='function')return this.JSChartContainer.GetIndexInfo();else return[];};this.ChangeInstructionIndex=function(indexName,option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeInstructionIndex=='function')this.JSChartContainer.ChangeInstructionIndex(indexName,option);};this.ChangeInstructionScriptIndex=function(indexData){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeInstructionIndex=='function')this.JSChartContainer.ChangeInstructionScriptIndex(indexData);};this.CancelInstructionIndex=function(){if(this.JSChartContainer&&typeof this.JSChartContainer.CancelInstructionIndex=='function')this.JSChartContainer.CancelInstructionIndex();};//K线周期切换
|
|
1332
1333
|
this.ChangePeriod=function(period,option){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangePeriod=='function')this.JSChartContainer.ChangePeriod(period,option);};//K线复权切换
|
|
1333
1334
|
this.ChangeRight=function(right){if(this.JSChartContainer&&typeof this.JSChartContainer.ChangeRight=='function')this.JSChartContainer.ChangeRight(right);};//叠加股票
|
|
@@ -1915,7 +1916,7 @@ this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.To
|
|
|
1915
1916
|
{var left=x;var top=y;var format=g_DivTooltipDataForamt.Create('ScatterPlotDataStringFormat');format.Value=toolTip;format.Symbol=this.Symbol;format.Period=this.Period;format.LanguageID=this.LanguageID;if(!format.Operator())return;var width=format.Width;this.Tooltip.className='jchart-charscatterplot-tooltip';//OX指标数据
|
|
1916
1917
|
this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.Tooltip.style.top=top+xMove+"px";this.Tooltip.style.width=width+"px";this.Tooltip.style.height=null;this.Tooltip.innerHTML=format.Text;;this.Tooltip.style.display="block";}else if(toolTip.Type==7)//ChartDrawSVG
|
|
1917
1918
|
{var left=x;var top=y;var format=g_DivTooltipDataForamt.Create('ChartDrawSVGDataStringFormat');format.Value=toolTip;format.Symbol=this.Symbol;format.Period=this.Period;format.LanguageID=this.LanguageID;if(!format.Operator())return;var width=format.Width;this.Tooltip.className='jchart-chartdrawsvg-tooltip';//ChartDrawSVG指标数据
|
|
1918
|
-
this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.Tooltip.style.top=top+xMove+"px";this.Tooltip.style.width=width+"px";this.Tooltip.style.height=null;this.Tooltip.innerHTML=format.Text;this.Tooltip.style.display="block";}};this.UpdateDOMTooltip=function(toolTipType,data){var _this12=this;if(!this.TooltipCache.IsShow)return;if(this.TooltipCache.Type!=toolTipType)return;if(!this.TooltipCache.Data)return;if(this.TooltipCache.Type===0){if(!data||!IFrameSplitOperator.IsNonEmptyArray(data.Data))return;var lastItem=data.Data[data.Data.length-1];if(lastItem.Date!=this.TooltipCache.Data.Date)return;if(IFrameSplitOperator.IsNumber(lastItem.Time)&&lastItem.Time!=this.TooltipCache.Data.Time)return;var klinePaint=this.ChartPaint[0];var format=g_DivTooltipDataForamt.Create('HistoryDataStringFormat');format.Value={Data:lastItem,ChartPaint:klinePaint,Type:this.TooltipCache.Type};format.Symbol=this.Symbol;format.LanguageID=this.LanguageID;format.GetEventCallback=function(id){return _this12.GetEventCallback(id);};if(!format.Operator())return;if(format.Text==this.TooltipCache.InnerHTML)return;this.Tooltip.innerHTML=format.Text;this.TooltipCache.InnerHTML=format.Text;}};this.HideTooltip=function(){this.TooltipCache.IsShow=false;this.TooltipCache.Type=null;this.TooltipCache.InnerHTML=null;this.TooltipCache.Data=null;if(this.Tooltip.style.display!="none")this.Tooltip.style.display="none";};this.UpdateSelectRect=function(start,end){if(!this.ChartPaint[0].Data)return;var paint=this.GetRectSelectPaint();if(!paint)return;var data=this.ChartPaint[0].Data;var startItem=data.Data[start];var endItem=data.Data[end];JSConsole.Chart.Log('[JSChartContainer::UpdateSelectRect]',startItem,endItem);paint.SetPoint(startItem,{Index:0,DataIndex:start});paint.SetPoint(endItem,{Index:1,DataIndex:end});this.Draw();};this.HideSelectRect=function(){this.ClearDragSelectRect();};this.ResetFrameXYSplit=function(){if(typeof this.Frame.ResetXYSplit=='function')this.Frame.ResetXYSplit();};this.ResetFrameXSplit=function(){if(typeof this.Frame.ResetXSplit=='function')this.Frame.ResetXSplit();};this.ResetFrameYCustomSplit=function(){if(typeof this.Frame.ResetYCustomSplit=='function')this.Frame.ResetYCustomSplit();};this.UpdateFrameMaxMinV2=function(){var mapFrame=new _map2.default();//key=frameid, value:{ ChartPaint:[] }
|
|
1919
|
+
this.Tooltip.style.position="absolute";this.Tooltip.style.left=left+"px";this.Tooltip.style.top=top+xMove+"px";this.Tooltip.style.width=width+"px";this.Tooltip.style.height=null;this.Tooltip.innerHTML=format.Text;this.Tooltip.style.display="block";}};this.UpdateDOMTooltip=function(toolTipType,data){var _this12=this;if(!this.TooltipCache.IsShow)return;if(this.TooltipCache.Type!=toolTipType)return;if(!this.TooltipCache.Data)return;if(this.TooltipCache.Type===0){if(!data||!IFrameSplitOperator.IsNonEmptyArray(data.Data))return;var lastItem=data.Data[data.Data.length-1];if(lastItem.Date!=this.TooltipCache.Data.Date)return;if(IFrameSplitOperator.IsNumber(lastItem.Time)&&lastItem.Time!=this.TooltipCache.Data.Time)return;var klinePaint=this.ChartPaint[0];var format=g_DivTooltipDataForamt.Create('HistoryDataStringFormat');format.Value={Data:lastItem,ChartPaint:klinePaint,Type:this.TooltipCache.Type};format.Symbol=this.Symbol;format.LanguageID=this.LanguageID;format.GetEventCallback=function(id){return _this12.GetEventCallback(id);};if(!format.Operator())return;if(format.Text==this.TooltipCache.InnerHTML)return;this.Tooltip.innerHTML=format.Text;this.TooltipCache.InnerHTML=format.Text;}};this.HideTooltip=function(){this.TooltipCache.IsShow=false;this.TooltipCache.Type=null;this.TooltipCache.InnerHTML=null;this.TooltipCache.Data=null;if(this.Tooltip.style.display!="none")this.Tooltip.style.display="none";};this.UpdateSelectRect=function(start,end){if(!this.ChartPaint[0].Data)return;var paint=this.GetRectSelectPaint();if(!paint)return;var data=this.ChartPaint[0].Data;var startItem=data.Data[start];var endItem=data.Data[end];JSConsole.Chart.Log('[JSChartContainer::UpdateSelectRect]',startItem,endItem);paint.SetPoint(startItem,{Index:0,DataIndex:start});paint.SetPoint(endItem,{Index:1,DataIndex:end});this.Draw();};this.HideSelectRect=function(){this.ClearDragSelectRect();};this.ResetFrameXYSplit=function(){if(typeof this.Frame.ResetXYSplit=='function')this.Frame.ResetXYSplit();};this.ResetFrameXSplit=function(){if(typeof this.Frame.ResetXSplit=='function')this.Frame.ResetXSplit();};this.ResetFrameYCustomSplit=function(windowIndex){if(typeof this.Frame.ResetYCustomSplit=='function')this.Frame.ResetYCustomSplit(windowIndex);};this.UpdateFrameMaxMinV2=function(){var mapFrame=new _map2.default();//key=frameid, value:{ ChartPaint:[] }
|
|
1919
1920
|
for(var i=0;i<this.Frame.SubFrame.length;++i){var subItem=this.Frame.SubFrame[i];if(!subItem||!subItem.Frame)continue;var frame=subItem.Frame;//自定义刻度每次都调用
|
|
1920
1921
|
frame.YCustomSplit=true;var key=frame.Identify;var item={ID:key,Frame:frame,ChartPaint:[],Max:null,Min:null,OverlayFrame:[],//共享坐标
|
|
1921
1922
|
SingleOverlay:[],//独立坐标
|
|
@@ -2107,7 +2108,22 @@ if(event&&event.Callback){var data={PreventDefault:false,CommandID:cmdID,Args:ar
|
|
|
2107
2108
|
this.CreateChartPaintExtend=function(chart,windowIndex){if(windowIndex<0)return false;var subFrame=this.Frame.SubFrame[windowIndex];if(!subFrame||!subFrame.Frame)return false;var frame=subFrame.Frame;chart.Canvas=this.Canvas;chart.ChartBorder=frame.ChartBorder;chart.ChartFrame=frame;this.ChartPaintEx.push(chart);return true;};//删除指标窗口扩展图形 option={ ChartID:图形ID, WindowIndex:窗口 }
|
|
2108
2109
|
this.DeleteChartPaintExtend=function(option,bCallDestroy){if(!option)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.ChartPaintEx))return;if(IFrameSplitOperator.IsNumber(option.WindowIndex)){var windowIndex=option.WindowIndex;if(!this.Frame.SubFrame[windowIndex])return;var subFrame=this.Frame.SubFrame[windowIndex].Frame;if(!subFrame)return;var paint=[];//踢出当前窗口的指标画法
|
|
2109
2110
|
var deleteCount=0;for(var i=0;i<this.ChartPaintEx.length;++i){var item=this.ChartPaintEx[i];var bFind=item.ChartFrame.Guid==subFrame.Guid||item.ChartFrame==subFrame;if(!bFind){paint.push(item);}else{++deleteCount;if(bCallDestroy===true){if(item&&item.OnDestroy)item.OnDestroy();//图形销毁
|
|
2110
|
-
}}}if(deleteCount>0)this.ChartPaintEx=paint;}};this.ClearCurrnetDrawPicture=function(){this.CurrentChartDrawPicture=null;};this.CreateDragSelectRect=function(option){var chart=g_ExtendChartPaintFactory.Create("RectDragPaint",option);if(!chart)return null;if(option&&option.Enable===true)chart.Enable=true;chart.ChartBorder=this.Frame.ChartBorder;chart.ChartFrame=this.Frame;chart.HQChart=this;chart.SetOption(option);this.ChartDragSelectRect=chart;};this.ClearDragSelectRect=function(){if(!this.ChartDragSelectRect)return;this.ChartDragSelectRect.ClearPoint();};this.ShowDragSelectRect=function(ptStart,ptEnd){if(!this.ChartDragSelectRect)return;this.ChartDragSelectRect.SetFirstPoint(ptStart.X,ptStart.Y);this.ChartDragSelectRect.SetSecondPoint(ptEnd.X,ptEnd.Y);this.ChartDragSelectRect.Draw();}
|
|
2111
|
+
}}}if(deleteCount>0)this.ChartPaintEx=paint;}};this.ClearCurrnetDrawPicture=function(){this.CurrentChartDrawPicture=null;};this.CreateDragSelectRect=function(option){var chart=g_ExtendChartPaintFactory.Create("RectDragPaint",option);if(!chart)return null;if(option&&option.Enable===true)chart.Enable=true;chart.ChartBorder=this.Frame.ChartBorder;chart.ChartFrame=this.Frame;chart.HQChart=this;chart.SetOption(option);this.ChartDragSelectRect=chart;};this.ClearDragSelectRect=function(){if(!this.ChartDragSelectRect)return;this.ChartDragSelectRect.ClearPoint();};this.ShowDragSelectRect=function(ptStart,ptEnd){if(!this.ChartDragSelectRect)return;this.ChartDragSelectRect.SetFirstPoint(ptStart.X,ptStart.Y);this.ChartDragSelectRect.SetSecondPoint(ptEnd.X,ptEnd.Y);this.ChartDragSelectRect.Draw();};//切换窗口指标 option={ Window:{}, OverlayIndex:[], Frame:{ }}
|
|
2112
|
+
this.ChangeIndexWindow=function(windowIndex,option){JSConsole.Chart.Log('[KLineChartContainer::ChangeIndexWindow] windowIndex, option',windowIndex,option);if(windowIndex<0||windowIndex>=this.Frame.SubFrame.length)return false;if(!option)return false;var frame=this.Frame.SubFrame[windowIndex];this.DeleteIndexPaint(windowIndex);//删除主指标
|
|
2113
|
+
this.DeleteWindowsOverlayIndex(windowIndex);//清空叠加指标
|
|
2114
|
+
//清空标题栏
|
|
2115
|
+
var titleIndex=windowIndex+1;this.TitlePaint[titleIndex].Data=[];this.TitlePaint[titleIndex].Title=null;if(option.Window)//主指标
|
|
2116
|
+
{var item=option.Window;if(item.Script)//自定义指标脚本
|
|
2117
|
+
{this.WindowIndex[windowIndex]=new ScriptIndex(item.Name,item.Script,item.Args,item);//脚本执行
|
|
2118
|
+
}else if(item.API)//后台指标
|
|
2119
|
+
{var apiItem=item.API;this.WindowIndex[windowIndex]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);}else{var indexID=item.Index;var indexItem=JSIndexMap.Get(indexID);if(indexItem){this.WindowIndex[windowIndex]=indexItem.Create();this.CreateWindowIndex(windowIndex);}else{var systemScript=new JSIndexScript();var indexInfo=systemScript.Get(indexID);if(indexInfo){JSIndexScript.ModifyAttribute(indexInfo,item);this.WindowIndex[windowIndex]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo);//脚本执行
|
|
2120
|
+
}}}this.SetSubFrameAttribute(frame,item,option.Frame);}//叠加指标
|
|
2121
|
+
var aryOverlayIndex=[];if(IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex)){for(var i=0;i<option.OverlayIndex.length;++i){var item=option.OverlayIndex[i];if(item.Index)item.IndexName=item.Index;item.WindowIndex=windowIndex;if(item.Windows>=0)item.WindowIndex=item.Windows;var overlay=this.CreateOverlayWindowsIndex(item);if(!overlay)continue;aryOverlayIndex.push({WindowsIndex:item.WindowIndex,Overlay:overlay});}}//刷新指标
|
|
2122
|
+
var bindData=this.ChartPaint[0].Data;this.BindIndexData(windowIndex,bindData);//请求主指标
|
|
2123
|
+
for(var i=0;i<aryOverlayIndex.length;++i)//请求叠加指标
|
|
2124
|
+
{var item=aryOverlayIndex[i];this.BindOverlayIndexData(item.Overlay,item.WindowsIndex,bindData);}this.UpdataDataoffset();//更新数据偏移
|
|
2125
|
+
this.ResetFrameXYSplit();this.UpdateFrameMaxMin();//调整坐标最大 最小值
|
|
2126
|
+
this.Draw();};}function GetDevicePixelRatio(){if(typeof window=='undefined')return 1;return window.devicePixelRatio||1;}function GetFontHeight(context,font,word){if(!context)return null;if(font)context.font=font;var text='擎';if(IFrameSplitOperator.IsString(word))text=word;var fontInfo=context.measureText(text);var textHeight=fontInfo.fontBoundingBoxAscent+fontInfo.fontBoundingBoxDescent;if(!IFrameSplitOperator.IsNumber(textHeight))textHeight=fontInfo.width+2*GetDevicePixelRatio();return textHeight;}function IsPhoneWeb(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v<Agents.length;v++){if(userAgentInfo.indexOf(Agents[v])>0)return true;}return false;}function OnKeyDown(e)//键盘事件
|
|
2111
2127
|
{if(this.JSChartContainer&&this.JSChartContainer.OnKeyDown)this.JSChartContainer.OnKeyDown(e);}function OnWheel(e)//上下滚动事件
|
|
2112
2128
|
{if(this.JSChartContainer&&this.JSChartContainer.OnWheel)this.JSChartContainer.OnWheel(e);}function ToFixed(number,precision){var b=1;if(isNaN(number))return number;if(number<0)b=-1;var multiplier=Math.pow(10,precision);var value=Math.round(Math.abs(number)*multiplier)/multiplier*b;if(/^(\d+(?:\.\d+)?)(e)([\-]?\d+)$/.test(value))var s=value.toFixed2(precision);else var s=value.toString();var rs=s.indexOf('.');if(rs<0&&precision>0){rs=s.length;s+='.';}while(s.length<=rs+precision){s+='0';}return s;}Number.prototype.toFixed2=Number.prototype.toFixed;//备份下老的
|
|
2113
2129
|
Number.prototype.toFixed=function(precision){return ToFixed(this,precision);};function Guid(){function S4(){return((1+Math.random())*0x10000|0).toString(16).substring(1);}return"guid"+(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());}function GetScrollPosition(){var scrollPos={};var scrollTop=0;var scrollLeft=0;if(document.documentElement&&(document.documentElement.scrollTop||document.documentElement.scrollLeft)){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft;}else if(document.body){scrollTop=document.body.scrollTop;scrollLeft=document.body.scrollLeft;}scrollPos.Top=scrollTop;scrollPos.Left=scrollLeft;return scrollPos;}//修正线段有毛刺
|
|
@@ -3935,7 +3951,8 @@ this.Width=0;//柱子宽度 0=1 3,50=k线宽度 101=K线宽度+间距宽度
|
|
|
3935
3951
|
this.SetEmptyBar=function()//设置空心柱子
|
|
3936
3952
|
{if(this.BarType!=1&&this.BarType!=-1)return false;this.Canvas.lineWidth=GetDevicePixelRatio();this.Canvas.strokeStyle=this.Color;var emptyBGColor=g_JSChartResource.EmptyBarBGColor;if(emptyBGColor)this.Canvas.fillStyle=emptyBGColor;if(this.BarType==-1)//虚线
|
|
3937
3953
|
{this.Canvas.setLineDash(this.LineDotted);//虚线
|
|
3938
|
-
}return true;};this.IsEmptyBar=function(){return this.BarType==1||this.BarType==-1;};this.Draw=function(){if(!this.IsShow||this.ChartFrame.IsMinSize||!this.IsVisible)return;if(this.IsShowIndexTitleOnly())return;if(this.IsHideScriptIndex())return;if(this.NotSupportMessage){this.DrawNotSupportmessage();return;}if(!this.Data||!this.Data.Data)return;var isHScreen=this.ChartFrame.IsHScreen===true;var dataWidth=this.ChartFrame.DataWidth;var distanceWidth=this.ChartFrame.DistanceWidth;var chartright=this.ChartBorder.GetRight();var zoomIndex=this.ChartFrame.ZoomIndex;if(isHScreen)chartright=this.ChartBorder.GetBottom();var xPointCount=this.ChartFrame.XPointCount;var xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;if(isHScreen)xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;var isMinute=this.IsMinuteFrame();this.Canvas.save();var bFillBar=false;var bFillKLine=false;var emptyBGColor=g_JSChartResource.EmptyBarBGColor;if(isMinute){if(this.Width>1)this.Canvas.lineWidth=2*GetDevicePixelRatio();else this.Canvas.lineWidth=GetDevicePixelRatio();this.Canvas.strokeStyle=this.Color;}else if(this.Width==0)
|
|
3954
|
+
}return true;};this.IsEmptyBar=function(){return this.BarType==1||this.BarType==-1;};this.Draw=function(){if(!this.IsShow||this.ChartFrame.IsMinSize||!this.IsVisible)return;if(this.IsShowIndexTitleOnly())return;if(this.IsHideScriptIndex())return;if(this.NotSupportMessage){this.DrawNotSupportmessage();return;}if(!this.Data||!this.Data.Data)return;var isHScreen=this.ChartFrame.IsHScreen===true;var dataWidth=this.ChartFrame.DataWidth;var distanceWidth=this.ChartFrame.DistanceWidth;var chartright=this.ChartBorder.GetRight();var zoomIndex=this.ChartFrame.ZoomIndex;if(isHScreen)chartright=this.ChartBorder.GetBottom();var xPointCount=this.ChartFrame.XPointCount;var xOffset=this.ChartBorder.GetLeft()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;if(isHScreen)xOffset=this.ChartBorder.GetTop()+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;var isMinute=this.IsMinuteFrame();this.Canvas.save();var bFillBar=false;var bFillKLine=false;var emptyBGColor=g_JSChartResource.EmptyBarBGColor;if(isMinute){if(this.Width>1)this.Canvas.lineWidth=2*GetDevicePixelRatio();else this.Canvas.lineWidth=GetDevicePixelRatio();this.Canvas.strokeStyle=this.Color;}else if(this.Width==0)//宽度时0,使用宽度1
|
|
3955
|
+
{this.SetEmptyBar();this.Canvas.lineWidth=GetDevicePixelRatio();this.Canvas.strokeStyle=this.Color;}else if(this.Width==3||this.Width==50)//3和50 K线宽度
|
|
3939
3956
|
{if(dataWidth>=4){bFillKLine=true;this.SetEmptyBar();if(!this.IsEmptyBar())this.Canvas.fillStyle=this.Color;this.Canvas.strokeStyle=this.Color;}else//太细了 画竖线
|
|
3940
3957
|
{this.Canvas.lineWidth=GetDevicePixelRatio();this.Canvas.strokeStyle=this.Color;}}else if(this.Width==101){var lineWidth=dataWidth+distanceWidth+1*GetDevicePixelRatio();this.Canvas.lineWidth=lineWidth;this.Canvas.strokeStyle=this.Color;}else if(this.Width<=3){var minWidth=2*GetDevicePixelRatio();var barWidth=dataWidth*(this.Width/3);if(barWidth<minWidth)barWidth=minWidth;this.SetEmptyBar();if(!this.IsEmptyBar())this.Canvas.fillStyle=this.Color;bFillBar=true;}else{var barWidth=this.Width*GetDevicePixelRatio()+dataWidth;this.SetEmptyBar();if(!this.IsEmptyBar())this.Canvas.fillStyle=this.Color;bFillBar=true;}for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length&&j<xPointCount;++i,++j,xOffset+=dataWidth+distanceWidth){var value=this.Data.Data[i];if(value==null)continue;var price=value.Value;var price2=value.Value2;if(price2==null)price2=0;if(isMinute){var x=this.ChartFrame.GetXFromIndex(j);}else{var left=xOffset;var right=xOffset+dataWidth;var x=left+(right-left)/2;}var y=this.ChartFrame.GetYFromData(price);var y2=this.ChartFrame.GetYFromData(price2);if(x>chartright)break;if(bFillBar){if(isHScreen){var left=x-barWidth/2;var width=barWidth;if(this.IsEmptyBar())//空心
|
|
3941
3958
|
{this.Canvas.beginPath();this.Canvas.rect(ToFixedPoint(Math.min(y,y2)),ToFixedPoint(left),ToFixedRect(Math.abs(y-y2)),ToFixedRect(width));this.Canvas.stroke();}else{this.Canvas.fillRect(ToFixedRect(Math.min(y,y2)),ToFixedRect(left),ToFixedRect(Math.abs(y-y2)),ToFixedRect(width));}}else{var left=x-barWidth/2;var width=barWidth;if(left+width>chartright)width=chartright-left;//不要超过右边框子
|
|
@@ -9443,7 +9460,7 @@ function FuturesTimeData(){this.TIME_SPLIT=[//ID=0 9:00-10:15,10:31-11:30,13:31-
|
|
|
9443
9460
|
[MARKET_SUFFIX_NAME.DCE+'-JD',{Time:0,Decimal:0,Name:"鸡蛋"}],[MARKET_SUFFIX_NAME.DCE+'-FB',{Time:0,Decimal:2,Name:"纤板"}],[MARKET_SUFFIX_NAME.DCE+'-BB',{Time:0,Decimal:2,Name:"胶板"}],[MARKET_SUFFIX_NAME.DCE+'-PP',{Time:6,Decimal:0,Name:"丙烯"}],[MARKET_SUFFIX_NAME.DCE+'-JM',{Time:6,Decimal:1,Name:'焦煤'}],[MARKET_SUFFIX_NAME.DCE+'-EG',{Time:6,Decimal:0,Name:'乙二醇'}],[MARKET_SUFFIX_NAME.DCE+'-EB',{Time:6,Decimal:0,Name:'苯乙烯'}],[MARKET_SUFFIX_NAME.DCE+'-CS',{Time:6,Decimal:0,Name:'淀粉'}],[MARKET_SUFFIX_NAME.DCE+'-PG',{Time:6,Decimal:0,Name:'液化气'}],[MARKET_SUFFIX_NAME.DCE+'-RR',{Time:6,Decimal:0,Name:'梗米'}],[MARKET_SUFFIX_NAME.DCE+'-LH',{Time:0,Decimal:0,Name:'生猪'}],//上期所
|
|
9444
9461
|
[MARKET_SUFFIX_NAME.SHFE+'-CU',{Time:4,Decimal:0,Name:"铜"}],[MARKET_SUFFIX_NAME.SHFE+'-AL',{Time:4,Decimal:0,Name:"铝"}],[MARKET_SUFFIX_NAME.SHFE+'-NI',{Time:4,Decimal:0,Name:"镍"}],[MARKET_SUFFIX_NAME.SHFE+'-SN',{Time:4,Decimal:0,Name:'沪锡'}],[MARKET_SUFFIX_NAME.SHFE+'-ZN',{Time:4,Decimal:0,Name:"沪锌"}],[MARKET_SUFFIX_NAME.SHFE+'-PB',{Time:4,Decimal:0,Name:'沪铅'}],[MARKET_SUFFIX_NAME.SHFE+'-RU',{Time:6,Decimal:0,Name:"天然橡胶"}],[MARKET_SUFFIX_NAME.SHFE+'-FU',{Time:6,Decimal:0,Name:"燃料油"}],[MARKET_SUFFIX_NAME.SHFE+'-RB',{Time:6,Decimal:0,Name:"螺纹钢"}],[MARKET_SUFFIX_NAME.SHFE+'-BU',{Time:6,Decimal:0,Name:'石油沥青'}],[MARKET_SUFFIX_NAME.SHFE+'-HC',{Time:6,Decimal:0,Name:"热轧卷板"}],[MARKET_SUFFIX_NAME.SHFE+'-SP',{Time:6,Decimal:0,Name:"纸浆"}],[MARKET_SUFFIX_NAME.SHFE+'-WR',{Time:0,Decimal:0,Name:"线材"}],[MARKET_SUFFIX_NAME.SHFE+'-AG',{Time:5,Decimal:0,Name:"白银"}],[MARKET_SUFFIX_NAME.SHFE+'-AU',{Time:5,Decimal:2,Name:"黄金"}],[MARKET_SUFFIX_NAME.SHFE+'-SS',{Time:4,Decimal:0,Name:'不锈钢'}],[MARKET_SUFFIX_NAME.SHFE+'-AO',{Time:4,Decimal:0,Name:'氧化铝'}],[MARKET_SUFFIX_NAME.SHFE+'-BR',{Time:6,Decimal:0,Name:'合成橡胶'}],//上期所-能源
|
|
9445
9462
|
[MARKET_SUFFIX_NAME.SHFE+'-NR',{Time:6,Decimal:1,Name:'20号胶'}],[MARKET_SUFFIX_NAME.SHFE+'-SC',{Time:5,Decimal:1,Name:'原油'}],[MARKET_SUFFIX_NAME.SHFE+'-LU',{Time:6,Decimal:0,Name:'低硫燃油'}],[MARKET_SUFFIX_NAME.SHFE+'-BC',{Time:4,Decimal:0,Name:'国际铜'}],[MARKET_SUFFIX_NAME.SHFE+'-EC',{Time:0,Decimal:0,Name:'集运指数'}],//郑州期货交易所
|
|
9446
|
-
[MARKET_SUFFIX_NAME.CZCE+'-CF',{Time:6,Decimal:0,Name:"棉花"}],[MARKET_SUFFIX_NAME.CZCE+'-SR',{Time:6,Decimal:0,Name:"白糖"}],[MARKET_SUFFIX_NAME.CZCE+'-MA',{Time:6,Decimal:0,Name:"甲醇"}],[MARKET_SUFFIX_NAME.CZCE+'-ZC',{Time:6,Decimal:1,Name:'动力煤'}],[MARKET_SUFFIX_NAME.CZCE+'-TA',{Time:6,Decimal:0,Name:"精对苯二甲酸(PTA)"}],[MARKET_SUFFIX_NAME.CZCE+'-RM',{Time:6,Decimal:0,Name:'菜籽粕'}],[MARKET_SUFFIX_NAME.CZCE+'-OI',{Time:6,Decimal:0,Name:"菜籽油"}],[MARKET_SUFFIX_NAME.CZCE+'-ME',{Time:3,Decimal:0,Name:"甲醇(老)"}],[MARKET_SUFFIX_NAME.CZCE+'-FG',{Time:6,Decimal:0,Name:'平板玻璃'}],[MARKET_SUFFIX_NAME.CZCE+'-WS',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-WT',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-GN',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-RO',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-RS',{Time:0,Decimal:0,Name:"菜籽"}],[MARKET_SUFFIX_NAME.CZCE+'-ER',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-RI',{Time:0,Decimal:0,Name:"早籼稻"}],[MARKET_SUFFIX_NAME.CZCE+'-WH',{Time:0,Decimal:0,Name:"强麦"}],[MARKET_SUFFIX_NAME.CZCE+'-AP',{Time:0,Decimal:0,Name:"苹果"}],[MARKET_SUFFIX_NAME.CZCE+'-PM',{Time:0,Decimal:0,Name:"普麦"}],[MARKET_SUFFIX_NAME.CZCE+'-QM',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-TC',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-JR',{Time:0,Decimal:0,Name:"粳稻"}],[MARKET_SUFFIX_NAME.CZCE+'-LR',{Time:0,Decimal:0,Name:"晚籼稻"}],[MARKET_SUFFIX_NAME.CZCE+'-SF',{Time:0,Decimal:0,Name:"硅铁"}],[MARKET_SUFFIX_NAME.CZCE+'-SM',{Time:0,Decimal:0,Name:"锰硅"}],[MARKET_SUFFIX_NAME.CZCE+'-CJ',{Time:0,Decimal:2,Name:"红枣"}],[MARKET_SUFFIX_NAME.CZCE+'-CY',{Time:6,Decimal:0,Name:"棉纱"}],[MARKET_SUFFIX_NAME.CZCE+'-UR',{Time:0,Decimal:0,Name:"尿素"}],[MARKET_SUFFIX_NAME.CZCE+'-SA',{Time:6,Decimal:0,Name:"纯碱"}],[MARKET_SUFFIX_NAME.CZCE+'-PF',{Time:6,Decimal:0,Name:"短纤"}],[MARKET_SUFFIX_NAME.CZCE+'-PK',{Time:0,Decimal:0,Name:"花生"}],//中期所
|
|
9463
|
+
[MARKET_SUFFIX_NAME.CZCE+'-CF',{Time:6,Decimal:0,Name:"棉花"}],[MARKET_SUFFIX_NAME.CZCE+'-SR',{Time:6,Decimal:0,Name:"白糖"}],[MARKET_SUFFIX_NAME.CZCE+'-MA',{Time:6,Decimal:0,Name:"甲醇"}],[MARKET_SUFFIX_NAME.CZCE+'-ZC',{Time:6,Decimal:1,Name:'动力煤'}],[MARKET_SUFFIX_NAME.CZCE+'-TA',{Time:6,Decimal:0,Name:"精对苯二甲酸(PTA)"}],[MARKET_SUFFIX_NAME.CZCE+'-RM',{Time:6,Decimal:0,Name:'菜籽粕'}],[MARKET_SUFFIX_NAME.CZCE+'-OI',{Time:6,Decimal:0,Name:"菜籽油"}],[MARKET_SUFFIX_NAME.CZCE+'-ME',{Time:3,Decimal:0,Name:"甲醇(老)"}],[MARKET_SUFFIX_NAME.CZCE+'-FG',{Time:6,Decimal:0,Name:'平板玻璃'}],[MARKET_SUFFIX_NAME.CZCE+'-WS',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-WT',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-GN',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-RO',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-RS',{Time:0,Decimal:0,Name:"菜籽"}],[MARKET_SUFFIX_NAME.CZCE+'-ER',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-RI',{Time:0,Decimal:0,Name:"早籼稻"}],[MARKET_SUFFIX_NAME.CZCE+'-WH',{Time:0,Decimal:0,Name:"强麦"}],[MARKET_SUFFIX_NAME.CZCE+'-AP',{Time:0,Decimal:0,Name:"苹果"}],[MARKET_SUFFIX_NAME.CZCE+'-PM',{Time:0,Decimal:0,Name:"普麦"}],[MARKET_SUFFIX_NAME.CZCE+'-QM',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-TC',{Time:0,Decimal:0}],[MARKET_SUFFIX_NAME.CZCE+'-JR',{Time:0,Decimal:0,Name:"粳稻"}],[MARKET_SUFFIX_NAME.CZCE+'-LR',{Time:0,Decimal:0,Name:"晚籼稻"}],[MARKET_SUFFIX_NAME.CZCE+'-SF',{Time:0,Decimal:0,Name:"硅铁"}],[MARKET_SUFFIX_NAME.CZCE+'-SM',{Time:0,Decimal:0,Name:"锰硅"}],[MARKET_SUFFIX_NAME.CZCE+'-CJ',{Time:0,Decimal:2,Name:"红枣"}],[MARKET_SUFFIX_NAME.CZCE+'-CY',{Time:6,Decimal:0,Name:"棉纱"}],[MARKET_SUFFIX_NAME.CZCE+'-UR',{Time:0,Decimal:0,Name:"尿素"}],[MARKET_SUFFIX_NAME.CZCE+'-SA',{Time:6,Decimal:0,Name:"纯碱"}],[MARKET_SUFFIX_NAME.CZCE+'-PF',{Time:6,Decimal:0,Name:"短纤"}],[MARKET_SUFFIX_NAME.CZCE+'-PK',{Time:0,Decimal:0,Name:"花生"}],[MARKET_SUFFIX_NAME.CZCE+'-PR',{Time:6,Decimal:0,Name:"瓶片"}],//中期所
|
|
9447
9464
|
[MARKET_SUFFIX_NAME.CFFEX+'-TF',{Time:1,Decimal:3,Name:"二债"}],[MARKET_SUFFIX_NAME.CFFEX+'-TS',{Time:1,Decimal:3,Name:"五债"}],[MARKET_SUFFIX_NAME.CFFEX+'-IH',{Time:2,Decimal:1,Name:'上证股指期货'}],[MARKET_SUFFIX_NAME.CFFEX+'-IC',{Time:2,Decimal:1,Name:'中证股指期货'}],[MARKET_SUFFIX_NAME.CFFEX+'-IF',{Time:2,Decimal:1,Name:'沪深股指期货'}],[MARKET_SUFFIX_NAME.CFFEX+'-IM',{Time:2,Decimal:1,Name:'中证1000股指期货'}],[MARKET_SUFFIX_NAME.CFFEX+'-IO',{Time:2,Decimal:1,Name:'沪深300股指期权'}],[MARKET_SUFFIX_NAME.CFFEX+'-MO',{Time:2,Decimal:1,Name:'中证1000股指期权'}],[MARKET_SUFFIX_NAME.CFFEX+'-HO',{Time:2,Decimal:1,Name:'上证50股指期权'}],//广州期货交易所
|
|
9448
9465
|
[MARKET_SUFFIX_NAME.GZFE+'-SI',{Time:0,Decimal:2,Name:"工业硅"}],[MARKET_SUFFIX_NAME.GZFE+'-LC',{Time:0,Decimal:2,Name:"碳酸锂"}]]);this.MAP_ONEWORD=new _map2.default([//大连商品交易所
|
|
9449
9466
|
[MARKET_SUFFIX_NAME.DCE+'-C',{Time:6,Decimal:0,Name:"玉米"}],[MARKET_SUFFIX_NAME.DCE+'-L',{Time:6,Decimal:0,Name:"乙烯"}],[MARKET_SUFFIX_NAME.DCE+'-V',{Time:6,Decimal:0,Name:"PVC"}],[MARKET_SUFFIX_NAME.DCE+'-A',{Time:6,Decimal:0,Name:"豆一"}],[MARKET_SUFFIX_NAME.DCE+'-B',{Time:6,Decimal:0,Name:"豆二"}],[MARKET_SUFFIX_NAME.DCE+'-M',{Time:6,Decimal:0,Name:"豆粕"}],[MARKET_SUFFIX_NAME.DCE+'-Y',{Time:6,Decimal:0,Name:"豆油"}],[MARKET_SUFFIX_NAME.DCE+'-P',{Time:6,Decimal:0,Name:"棕榈"}],[MARKET_SUFFIX_NAME.DCE+'-J',{Time:6,Decimal:1,Name:'焦炭'}],[MARKET_SUFFIX_NAME.DCE+'-I',{Time:6,Decimal:1,Name:"铁矿"}],//中期所
|
|
@@ -13771,7 +13788,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13771
13788
|
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);};}/********************************************************************************
|
|
13772
13789
|
* 版本信息输出
|
|
13773
13790
|
*
|
|
13774
|
-
*/var HQCHART_VERSION="1.1.
|
|
13791
|
+
*/var HQCHART_VERSION="1.1.13790";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();//把给外界调用的方法暴露出来
|
|
13775
13792
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13776
13793
|
// BaseIndex:BaseIndex,
|
|
13777
13794
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -1789,6 +1789,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1789
1789
|
this.JSChartContainer.ChangeIndex(windowIndex,indexName,option);
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
1792
|
+
//切换一个窗口指标,包含叠加指标,以及这个窗口的属性
|
|
1793
|
+
this.ChangeIndexWindow=function(windowIndex, option)
|
|
1794
|
+
{
|
|
1795
|
+
if (this.JSChartContainer && typeof(this.JSChartContainer.ChangeIndexWindow)=='function')
|
|
1796
|
+
this.JSChartContainer.ChangeIndexWindow(windowIndex, option);
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1792
1799
|
this.AddIndexWindow=function(indexName,option)
|
|
1793
1800
|
{
|
|
1794
1801
|
if (this.JSChartContainer && typeof(this.JSChartContainer.AddIndexWindow)=='function')
|
|
@@ -7096,10 +7103,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7096
7103
|
this.Frame.ResetXSplit();
|
|
7097
7104
|
}
|
|
7098
7105
|
|
|
7099
|
-
this.ResetFrameYCustomSplit=function()
|
|
7106
|
+
this.ResetFrameYCustomSplit=function(windowIndex)
|
|
7100
7107
|
{
|
|
7101
7108
|
if (typeof(this.Frame.ResetYCustomSplit)=='function')
|
|
7102
|
-
this.Frame.ResetYCustomSplit();
|
|
7109
|
+
this.Frame.ResetYCustomSplit(windowIndex);
|
|
7103
7110
|
}
|
|
7104
7111
|
|
|
7105
7112
|
this.UpdateFrameMaxMinV2=function()
|
|
@@ -9796,6 +9803,92 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9796
9803
|
this.ChartDragSelectRect.SetSecondPoint(ptEnd.X, ptEnd.Y);
|
|
9797
9804
|
this.ChartDragSelectRect.Draw();
|
|
9798
9805
|
}
|
|
9806
|
+
|
|
9807
|
+
//切换窗口指标 option={ Window:{}, OverlayIndex:[], Frame:{ }}
|
|
9808
|
+
this.ChangeIndexWindow=function(windowIndex, option)
|
|
9809
|
+
{
|
|
9810
|
+
JSConsole.Chart.Log('[KLineChartContainer::ChangeIndexWindow] windowIndex, option', windowIndex, option);
|
|
9811
|
+
if (windowIndex<0 || windowIndex>=this.Frame.SubFrame.length) return false;
|
|
9812
|
+
if (!option) return false;
|
|
9813
|
+
|
|
9814
|
+
var frame=this.Frame.SubFrame[windowIndex];
|
|
9815
|
+
this.DeleteIndexPaint(windowIndex); //删除主指标
|
|
9816
|
+
this.DeleteWindowsOverlayIndex(windowIndex); //清空叠加指标
|
|
9817
|
+
//清空标题栏
|
|
9818
|
+
var titleIndex=windowIndex+1;
|
|
9819
|
+
this.TitlePaint[titleIndex].Data=[];
|
|
9820
|
+
this.TitlePaint[titleIndex].Title=null;
|
|
9821
|
+
|
|
9822
|
+
if (option.Window) //主指标
|
|
9823
|
+
{
|
|
9824
|
+
var item=option.Window;
|
|
9825
|
+
|
|
9826
|
+
if (item.Script) //自定义指标脚本
|
|
9827
|
+
{
|
|
9828
|
+
this.WindowIndex[windowIndex]=new ScriptIndex(item.Name,item.Script,item.Args,item); //脚本执行
|
|
9829
|
+
}
|
|
9830
|
+
else if (item.API) //后台指标
|
|
9831
|
+
{
|
|
9832
|
+
var apiItem=item.API;
|
|
9833
|
+
this.WindowIndex[windowIndex]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);
|
|
9834
|
+
}
|
|
9835
|
+
else
|
|
9836
|
+
{
|
|
9837
|
+
var indexID=item.Index;
|
|
9838
|
+
var indexItem=JSIndexMap.Get(indexID);
|
|
9839
|
+
if (indexItem)
|
|
9840
|
+
{
|
|
9841
|
+
this.WindowIndex[windowIndex]=indexItem.Create();
|
|
9842
|
+
this.CreateWindowIndex(windowIndex);
|
|
9843
|
+
}
|
|
9844
|
+
else
|
|
9845
|
+
{
|
|
9846
|
+
var systemScript = new JSIndexScript();
|
|
9847
|
+
var indexInfo = systemScript.Get(indexID);
|
|
9848
|
+
if (indexInfo)
|
|
9849
|
+
{
|
|
9850
|
+
JSIndexScript.ModifyAttribute(indexInfo,item);
|
|
9851
|
+
this.WindowIndex[windowIndex]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
|
|
9852
|
+
}
|
|
9853
|
+
}
|
|
9854
|
+
}
|
|
9855
|
+
|
|
9856
|
+
this.SetSubFrameAttribute(frame, item, option.Frame);
|
|
9857
|
+
}
|
|
9858
|
+
|
|
9859
|
+
//叠加指标
|
|
9860
|
+
var aryOverlayIndex=[];
|
|
9861
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
9862
|
+
{
|
|
9863
|
+
for(var i=0;i<option.OverlayIndex.length;++i)
|
|
9864
|
+
{
|
|
9865
|
+
var item=option.OverlayIndex[i];
|
|
9866
|
+
if (item.Index) item.IndexName=item.Index;
|
|
9867
|
+
item.WindowIndex=windowIndex;
|
|
9868
|
+
if (item.Windows>=0) item.WindowIndex=item.Windows;
|
|
9869
|
+
|
|
9870
|
+
var overlay=this.CreateOverlayWindowsIndex(item);
|
|
9871
|
+
if (!overlay) continue;
|
|
9872
|
+
|
|
9873
|
+
aryOverlayIndex.push({ WindowsIndex:item.WindowIndex, Overlay:overlay });
|
|
9874
|
+
}
|
|
9875
|
+
}
|
|
9876
|
+
|
|
9877
|
+
//刷新指标
|
|
9878
|
+
var bindData=this.ChartPaint[0].Data;
|
|
9879
|
+
this.BindIndexData(windowIndex,bindData); //请求主指标
|
|
9880
|
+
|
|
9881
|
+
for(var i=0;i<aryOverlayIndex.length;++i) //请求叠加指标
|
|
9882
|
+
{
|
|
9883
|
+
var item=aryOverlayIndex[i];
|
|
9884
|
+
this.BindOverlayIndexData(item.Overlay,item.WindowsIndex,bindData);
|
|
9885
|
+
}
|
|
9886
|
+
|
|
9887
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
9888
|
+
this.ResetFrameXYSplit();
|
|
9889
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
9890
|
+
this.Draw();
|
|
9891
|
+
}
|
|
9799
9892
|
}
|
|
9800
9893
|
|
|
9801
9894
|
function GetDevicePixelRatio()
|
|
@@ -33297,9 +33390,11 @@ function ChartStickLine()
|
|
|
33297
33390
|
else this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
33298
33391
|
this.Canvas.strokeStyle=this.Color;
|
|
33299
33392
|
}
|
|
33300
|
-
else if(this.Width==0)
|
|
33393
|
+
else if(this.Width==0) //宽度时0,使用宽度1
|
|
33301
33394
|
{
|
|
33302
33395
|
this.SetEmptyBar();
|
|
33396
|
+
this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
33397
|
+
this.Canvas.strokeStyle=this.Color;
|
|
33303
33398
|
}
|
|
33304
33399
|
else if (this.Width==3 || this.Width==50) //3和50 K线宽度
|
|
33305
33400
|
{
|
|
@@ -93095,6 +93190,7 @@ function FuturesTimeData()
|
|
|
93095
93190
|
[MARKET_SUFFIX_NAME.CZCE + '-SA', {Time:6,Decimal:0, Name:"纯碱"}],
|
|
93096
93191
|
[MARKET_SUFFIX_NAME.CZCE + '-PF', {Time:6,Decimal:0, Name:"短纤"}],
|
|
93097
93192
|
[MARKET_SUFFIX_NAME.CZCE + '-PK', {Time:0,Decimal:0, Name:"花生"}],
|
|
93193
|
+
[MARKET_SUFFIX_NAME.CZCE + '-PR', {Time:6,Decimal:0, Name:"瓶片"}],
|
|
93098
93194
|
|
|
93099
93195
|
|
|
93100
93196
|
//中期所
|
|
@@ -5714,6 +5714,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5714
5714
|
this.JSChartContainer.ChangeIndex(windowIndex,indexName,option);
|
|
5715
5715
|
}
|
|
5716
5716
|
|
|
5717
|
+
//切换一个窗口指标,包含叠加指标,以及这个窗口的属性
|
|
5718
|
+
this.ChangeIndexWindow=function(windowIndex, option)
|
|
5719
|
+
{
|
|
5720
|
+
if (this.JSChartContainer && typeof(this.JSChartContainer.ChangeIndexWindow)=='function')
|
|
5721
|
+
this.JSChartContainer.ChangeIndexWindow(windowIndex, option);
|
|
5722
|
+
}
|
|
5723
|
+
|
|
5717
5724
|
this.AddIndexWindow=function(indexName,option)
|
|
5718
5725
|
{
|
|
5719
5726
|
if (this.JSChartContainer && typeof(this.JSChartContainer.AddIndexWindow)=='function')
|
|
@@ -11021,10 +11028,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11021
11028
|
this.Frame.ResetXSplit();
|
|
11022
11029
|
}
|
|
11023
11030
|
|
|
11024
|
-
this.ResetFrameYCustomSplit=function()
|
|
11031
|
+
this.ResetFrameYCustomSplit=function(windowIndex)
|
|
11025
11032
|
{
|
|
11026
11033
|
if (typeof(this.Frame.ResetYCustomSplit)=='function')
|
|
11027
|
-
this.Frame.ResetYCustomSplit();
|
|
11034
|
+
this.Frame.ResetYCustomSplit(windowIndex);
|
|
11028
11035
|
}
|
|
11029
11036
|
|
|
11030
11037
|
this.UpdateFrameMaxMinV2=function()
|
|
@@ -13721,6 +13728,92 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13721
13728
|
this.ChartDragSelectRect.SetSecondPoint(ptEnd.X, ptEnd.Y);
|
|
13722
13729
|
this.ChartDragSelectRect.Draw();
|
|
13723
13730
|
}
|
|
13731
|
+
|
|
13732
|
+
//切换窗口指标 option={ Window:{}, OverlayIndex:[], Frame:{ }}
|
|
13733
|
+
this.ChangeIndexWindow=function(windowIndex, option)
|
|
13734
|
+
{
|
|
13735
|
+
JSConsole.Chart.Log('[KLineChartContainer::ChangeIndexWindow] windowIndex, option', windowIndex, option);
|
|
13736
|
+
if (windowIndex<0 || windowIndex>=this.Frame.SubFrame.length) return false;
|
|
13737
|
+
if (!option) return false;
|
|
13738
|
+
|
|
13739
|
+
var frame=this.Frame.SubFrame[windowIndex];
|
|
13740
|
+
this.DeleteIndexPaint(windowIndex); //删除主指标
|
|
13741
|
+
this.DeleteWindowsOverlayIndex(windowIndex); //清空叠加指标
|
|
13742
|
+
//清空标题栏
|
|
13743
|
+
var titleIndex=windowIndex+1;
|
|
13744
|
+
this.TitlePaint[titleIndex].Data=[];
|
|
13745
|
+
this.TitlePaint[titleIndex].Title=null;
|
|
13746
|
+
|
|
13747
|
+
if (option.Window) //主指标
|
|
13748
|
+
{
|
|
13749
|
+
var item=option.Window;
|
|
13750
|
+
|
|
13751
|
+
if (item.Script) //自定义指标脚本
|
|
13752
|
+
{
|
|
13753
|
+
this.WindowIndex[windowIndex]=new ScriptIndex(item.Name,item.Script,item.Args,item); //脚本执行
|
|
13754
|
+
}
|
|
13755
|
+
else if (item.API) //后台指标
|
|
13756
|
+
{
|
|
13757
|
+
var apiItem=item.API;
|
|
13758
|
+
this.WindowIndex[windowIndex]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);
|
|
13759
|
+
}
|
|
13760
|
+
else
|
|
13761
|
+
{
|
|
13762
|
+
var indexID=item.Index;
|
|
13763
|
+
var indexItem=JSIndexMap.Get(indexID);
|
|
13764
|
+
if (indexItem)
|
|
13765
|
+
{
|
|
13766
|
+
this.WindowIndex[windowIndex]=indexItem.Create();
|
|
13767
|
+
this.CreateWindowIndex(windowIndex);
|
|
13768
|
+
}
|
|
13769
|
+
else
|
|
13770
|
+
{
|
|
13771
|
+
var systemScript = new JSIndexScript();
|
|
13772
|
+
var indexInfo = systemScript.Get(indexID);
|
|
13773
|
+
if (indexInfo)
|
|
13774
|
+
{
|
|
13775
|
+
JSIndexScript.ModifyAttribute(indexInfo,item);
|
|
13776
|
+
this.WindowIndex[windowIndex]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
|
|
13777
|
+
}
|
|
13778
|
+
}
|
|
13779
|
+
}
|
|
13780
|
+
|
|
13781
|
+
this.SetSubFrameAttribute(frame, item, option.Frame);
|
|
13782
|
+
}
|
|
13783
|
+
|
|
13784
|
+
//叠加指标
|
|
13785
|
+
var aryOverlayIndex=[];
|
|
13786
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
13787
|
+
{
|
|
13788
|
+
for(var i=0;i<option.OverlayIndex.length;++i)
|
|
13789
|
+
{
|
|
13790
|
+
var item=option.OverlayIndex[i];
|
|
13791
|
+
if (item.Index) item.IndexName=item.Index;
|
|
13792
|
+
item.WindowIndex=windowIndex;
|
|
13793
|
+
if (item.Windows>=0) item.WindowIndex=item.Windows;
|
|
13794
|
+
|
|
13795
|
+
var overlay=this.CreateOverlayWindowsIndex(item);
|
|
13796
|
+
if (!overlay) continue;
|
|
13797
|
+
|
|
13798
|
+
aryOverlayIndex.push({ WindowsIndex:item.WindowIndex, Overlay:overlay });
|
|
13799
|
+
}
|
|
13800
|
+
}
|
|
13801
|
+
|
|
13802
|
+
//刷新指标
|
|
13803
|
+
var bindData=this.ChartPaint[0].Data;
|
|
13804
|
+
this.BindIndexData(windowIndex,bindData); //请求主指标
|
|
13805
|
+
|
|
13806
|
+
for(var i=0;i<aryOverlayIndex.length;++i) //请求叠加指标
|
|
13807
|
+
{
|
|
13808
|
+
var item=aryOverlayIndex[i];
|
|
13809
|
+
this.BindOverlayIndexData(item.Overlay,item.WindowsIndex,bindData);
|
|
13810
|
+
}
|
|
13811
|
+
|
|
13812
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
13813
|
+
this.ResetFrameXYSplit();
|
|
13814
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
13815
|
+
this.Draw();
|
|
13816
|
+
}
|
|
13724
13817
|
}
|
|
13725
13818
|
|
|
13726
13819
|
function GetDevicePixelRatio()
|
|
@@ -37222,9 +37315,11 @@ function ChartStickLine()
|
|
|
37222
37315
|
else this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
37223
37316
|
this.Canvas.strokeStyle=this.Color;
|
|
37224
37317
|
}
|
|
37225
|
-
else if(this.Width==0)
|
|
37318
|
+
else if(this.Width==0) //宽度时0,使用宽度1
|
|
37226
37319
|
{
|
|
37227
37320
|
this.SetEmptyBar();
|
|
37321
|
+
this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
37322
|
+
this.Canvas.strokeStyle=this.Color;
|
|
37228
37323
|
}
|
|
37229
37324
|
else if (this.Width==3 || this.Width==50) //3和50 K线宽度
|
|
37230
37325
|
{
|
|
@@ -97020,6 +97115,7 @@ function FuturesTimeData()
|
|
|
97020
97115
|
[MARKET_SUFFIX_NAME.CZCE + '-SA', {Time:6,Decimal:0, Name:"纯碱"}],
|
|
97021
97116
|
[MARKET_SUFFIX_NAME.CZCE + '-PF', {Time:6,Decimal:0, Name:"短纤"}],
|
|
97022
97117
|
[MARKET_SUFFIX_NAME.CZCE + '-PK', {Time:0,Decimal:0, Name:"花生"}],
|
|
97118
|
+
[MARKET_SUFFIX_NAME.CZCE + '-PR', {Time:6,Decimal:0, Name:"瓶片"}],
|
|
97023
97119
|
|
|
97024
97120
|
|
|
97025
97121
|
//中期所
|
|
@@ -138704,7 +138800,7 @@ function ScrollBarBGChart()
|
|
|
138704
138800
|
|
|
138705
138801
|
|
|
138706
138802
|
|
|
138707
|
-
var HQCHART_VERSION="1.1.
|
|
138803
|
+
var HQCHART_VERSION="1.1.13790";
|
|
138708
138804
|
|
|
138709
138805
|
function PrintHQChartVersion()
|
|
138710
138806
|
{
|
|
@@ -5758,6 +5758,13 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5758
5758
|
this.JSChartContainer.ChangeIndex(windowIndex,indexName,option);
|
|
5759
5759
|
}
|
|
5760
5760
|
|
|
5761
|
+
//切换一个窗口指标,包含叠加指标,以及这个窗口的属性
|
|
5762
|
+
this.ChangeIndexWindow=function(windowIndex, option)
|
|
5763
|
+
{
|
|
5764
|
+
if (this.JSChartContainer && typeof(this.JSChartContainer.ChangeIndexWindow)=='function')
|
|
5765
|
+
this.JSChartContainer.ChangeIndexWindow(windowIndex, option);
|
|
5766
|
+
}
|
|
5767
|
+
|
|
5761
5768
|
this.AddIndexWindow=function(indexName,option)
|
|
5762
5769
|
{
|
|
5763
5770
|
if (this.JSChartContainer && typeof(this.JSChartContainer.AddIndexWindow)=='function')
|
|
@@ -11065,10 +11072,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11065
11072
|
this.Frame.ResetXSplit();
|
|
11066
11073
|
}
|
|
11067
11074
|
|
|
11068
|
-
this.ResetFrameYCustomSplit=function()
|
|
11075
|
+
this.ResetFrameYCustomSplit=function(windowIndex)
|
|
11069
11076
|
{
|
|
11070
11077
|
if (typeof(this.Frame.ResetYCustomSplit)=='function')
|
|
11071
|
-
this.Frame.ResetYCustomSplit();
|
|
11078
|
+
this.Frame.ResetYCustomSplit(windowIndex);
|
|
11072
11079
|
}
|
|
11073
11080
|
|
|
11074
11081
|
this.UpdateFrameMaxMinV2=function()
|
|
@@ -13765,6 +13772,92 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13765
13772
|
this.ChartDragSelectRect.SetSecondPoint(ptEnd.X, ptEnd.Y);
|
|
13766
13773
|
this.ChartDragSelectRect.Draw();
|
|
13767
13774
|
}
|
|
13775
|
+
|
|
13776
|
+
//切换窗口指标 option={ Window:{}, OverlayIndex:[], Frame:{ }}
|
|
13777
|
+
this.ChangeIndexWindow=function(windowIndex, option)
|
|
13778
|
+
{
|
|
13779
|
+
JSConsole.Chart.Log('[KLineChartContainer::ChangeIndexWindow] windowIndex, option', windowIndex, option);
|
|
13780
|
+
if (windowIndex<0 || windowIndex>=this.Frame.SubFrame.length) return false;
|
|
13781
|
+
if (!option) return false;
|
|
13782
|
+
|
|
13783
|
+
var frame=this.Frame.SubFrame[windowIndex];
|
|
13784
|
+
this.DeleteIndexPaint(windowIndex); //删除主指标
|
|
13785
|
+
this.DeleteWindowsOverlayIndex(windowIndex); //清空叠加指标
|
|
13786
|
+
//清空标题栏
|
|
13787
|
+
var titleIndex=windowIndex+1;
|
|
13788
|
+
this.TitlePaint[titleIndex].Data=[];
|
|
13789
|
+
this.TitlePaint[titleIndex].Title=null;
|
|
13790
|
+
|
|
13791
|
+
if (option.Window) //主指标
|
|
13792
|
+
{
|
|
13793
|
+
var item=option.Window;
|
|
13794
|
+
|
|
13795
|
+
if (item.Script) //自定义指标脚本
|
|
13796
|
+
{
|
|
13797
|
+
this.WindowIndex[windowIndex]=new ScriptIndex(item.Name,item.Script,item.Args,item); //脚本执行
|
|
13798
|
+
}
|
|
13799
|
+
else if (item.API) //后台指标
|
|
13800
|
+
{
|
|
13801
|
+
var apiItem=item.API;
|
|
13802
|
+
this.WindowIndex[windowIndex]=new APIScriptIndex(apiItem.Name,apiItem.Script,apiItem.Args,item);
|
|
13803
|
+
}
|
|
13804
|
+
else
|
|
13805
|
+
{
|
|
13806
|
+
var indexID=item.Index;
|
|
13807
|
+
var indexItem=JSIndexMap.Get(indexID);
|
|
13808
|
+
if (indexItem)
|
|
13809
|
+
{
|
|
13810
|
+
this.WindowIndex[windowIndex]=indexItem.Create();
|
|
13811
|
+
this.CreateWindowIndex(windowIndex);
|
|
13812
|
+
}
|
|
13813
|
+
else
|
|
13814
|
+
{
|
|
13815
|
+
var systemScript = new JSIndexScript();
|
|
13816
|
+
var indexInfo = systemScript.Get(indexID);
|
|
13817
|
+
if (indexInfo)
|
|
13818
|
+
{
|
|
13819
|
+
JSIndexScript.ModifyAttribute(indexInfo,item);
|
|
13820
|
+
this.WindowIndex[windowIndex]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
|
|
13821
|
+
}
|
|
13822
|
+
}
|
|
13823
|
+
}
|
|
13824
|
+
|
|
13825
|
+
this.SetSubFrameAttribute(frame, item, option.Frame);
|
|
13826
|
+
}
|
|
13827
|
+
|
|
13828
|
+
//叠加指标
|
|
13829
|
+
var aryOverlayIndex=[];
|
|
13830
|
+
if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
|
|
13831
|
+
{
|
|
13832
|
+
for(var i=0;i<option.OverlayIndex.length;++i)
|
|
13833
|
+
{
|
|
13834
|
+
var item=option.OverlayIndex[i];
|
|
13835
|
+
if (item.Index) item.IndexName=item.Index;
|
|
13836
|
+
item.WindowIndex=windowIndex;
|
|
13837
|
+
if (item.Windows>=0) item.WindowIndex=item.Windows;
|
|
13838
|
+
|
|
13839
|
+
var overlay=this.CreateOverlayWindowsIndex(item);
|
|
13840
|
+
if (!overlay) continue;
|
|
13841
|
+
|
|
13842
|
+
aryOverlayIndex.push({ WindowsIndex:item.WindowIndex, Overlay:overlay });
|
|
13843
|
+
}
|
|
13844
|
+
}
|
|
13845
|
+
|
|
13846
|
+
//刷新指标
|
|
13847
|
+
var bindData=this.ChartPaint[0].Data;
|
|
13848
|
+
this.BindIndexData(windowIndex,bindData); //请求主指标
|
|
13849
|
+
|
|
13850
|
+
for(var i=0;i<aryOverlayIndex.length;++i) //请求叠加指标
|
|
13851
|
+
{
|
|
13852
|
+
var item=aryOverlayIndex[i];
|
|
13853
|
+
this.BindOverlayIndexData(item.Overlay,item.WindowsIndex,bindData);
|
|
13854
|
+
}
|
|
13855
|
+
|
|
13856
|
+
this.UpdataDataoffset(); //更新数据偏移
|
|
13857
|
+
this.ResetFrameXYSplit();
|
|
13858
|
+
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
13859
|
+
this.Draw();
|
|
13860
|
+
}
|
|
13768
13861
|
}
|
|
13769
13862
|
|
|
13770
13863
|
function GetDevicePixelRatio()
|
|
@@ -37266,9 +37359,11 @@ function ChartStickLine()
|
|
|
37266
37359
|
else this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
37267
37360
|
this.Canvas.strokeStyle=this.Color;
|
|
37268
37361
|
}
|
|
37269
|
-
else if(this.Width==0)
|
|
37362
|
+
else if(this.Width==0) //宽度时0,使用宽度1
|
|
37270
37363
|
{
|
|
37271
37364
|
this.SetEmptyBar();
|
|
37365
|
+
this.Canvas.lineWidth=GetDevicePixelRatio();
|
|
37366
|
+
this.Canvas.strokeStyle=this.Color;
|
|
37272
37367
|
}
|
|
37273
37368
|
else if (this.Width==3 || this.Width==50) //3和50 K线宽度
|
|
37274
37369
|
{
|
|
@@ -97064,6 +97159,7 @@ function FuturesTimeData()
|
|
|
97064
97159
|
[MARKET_SUFFIX_NAME.CZCE + '-SA', {Time:6,Decimal:0, Name:"纯碱"}],
|
|
97065
97160
|
[MARKET_SUFFIX_NAME.CZCE + '-PF', {Time:6,Decimal:0, Name:"短纤"}],
|
|
97066
97161
|
[MARKET_SUFFIX_NAME.CZCE + '-PK', {Time:0,Decimal:0, Name:"花生"}],
|
|
97162
|
+
[MARKET_SUFFIX_NAME.CZCE + '-PR', {Time:6,Decimal:0, Name:"瓶片"}],
|
|
97067
97163
|
|
|
97068
97164
|
|
|
97069
97165
|
//中期所
|
|
@@ -143260,7 +143356,7 @@ function HQChartScriptWorker()
|
|
|
143260
143356
|
|
|
143261
143357
|
|
|
143262
143358
|
|
|
143263
|
-
var HQCHART_VERSION="1.1.
|
|
143359
|
+
var HQCHART_VERSION="1.1.13790";
|
|
143264
143360
|
|
|
143265
143361
|
function PrintHQChartVersion()
|
|
143266
143362
|
{
|