hqchart 1.1.13989 → 1.1.13994
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 +11 -7
- package/package.json +1 -1
- package/src/jscommon/umychart.js +43 -2
- package/src/jscommon/umychart.report.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +45 -4
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +45 -4
package/lib/umychart.vue.js
CHANGED
|
@@ -2421,11 +2421,13 @@ if(i==0)this.DrawLine(right,textLeft+exLine.Width,y,item.LineColor,lineType,item
|
|
|
2421
2421
|
this.AddHorizontalLabel(textLeft,bgTop,itemText.Width,textHeight,item,i);yText+=textHeight+1*pixelTatio;rtText.Bottom=yText;}}}if(mapTextRect&&IFrameSplitOperator.IsNumber(rtText.Left)&&IFrameSplitOperator.IsNumber(rtText.Bottom)){mapTextRect.set(3,{Rect:rtText,Item:item});}if(item.Type==3||item.Type==4){if(item.Title){var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
|
|
2422
2422
|
var width=this.Canvas.measureText(item.Title).width+2*pixelTatio;if(this.IsHScreen){var bgTop=bottom-width;var textLeft=y-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,width);this.DrawHScreenText({X:y,Y:bgTop},{Text:item.Title,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});}else{var bgTop=y-textHeight/2-1*pixelTatio;var textLeft=right-width-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Title,textLeft+1*pixelTatio,y);}}}}}};this.AddHorizontalLabel=function(left,top,width,height,item,lineID){var rtLabel={Left:left,Top:top,Width:width,Height:height};rtLabel.Right=rtLabel.Left+rtLabel.Width;rtLabel.Bottom=rtLabel.Top+rtLabel.Height;var lableItem={Rect:rtLabel,Item:item,ID:item.ClickData.ID,Args:item.ClickData.Args,LineID:lineID};this.HorizontalLabel.push(lableItem);};this.DrawCustomAreaItem=function(item)//自定义Y轴区域
|
|
2423
2423
|
{if(!item.AreaData)return;if(this.IsHScreen)return;//暂时不支持横屏
|
|
2424
|
-
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右] }
|
|
2424
|
+
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右], Width:[左, 右] }
|
|
2425
2425
|
if(!IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Value)||item.AreaData.Value.length!=2)return;var max=Math.max(item.AreaData.Value[0],item.AreaData.Value[1]);var min=Math.min(item.AreaData.Value[0],item.AreaData.Value[1]);if(min>=this.HorizontalMax)return;if(max<=this.HorizontalMin)return;if(max>this.HorizontalMax)max=this.HorizontalMax;if(min<this.HorizontalMin)min=this.HorizontalMin;var border=this.GetBorder();var left=border.Left;var right=border.Right;var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var yTop=this.GetYFromData(max);var yBottom=this.GetYFromData(min);if(item.AreaData.Position.includes(0)&&borderLeft>10)//左
|
|
2426
|
-
{var rtBG={Left:0,Right:left-1,Top:yTop,Bottom:yBottom};rtBG.Height=rtBG.Bottom-rtBG.Top;rtBG.Width=rtBG.Right-rtBG.Left;
|
|
2426
|
+
{var rtBG={Left:0,Right:left-1,Top:yTop,Bottom:yBottom};rtBG.Height=rtBG.Bottom-rtBG.Top;rtBG.Width=rtBG.Right-rtBG.Left;if(IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width))//指定宽度
|
|
2427
|
+
{var bgWidth=item.AreaData.Width[0];if(IFrameSplitOperator.IsNumber(bgWidth)){if(rtBG.Width>bgWidth){rtBG.Width=bgWidth;rtBG.Left=rtBG.Right-rtBG.Width;}}}this.Canvas.fillStyle=item.AreaData.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.DrawCustomAreaText(rtBG,item,0);}if(item.AreaData.Position.includes(1)&&borderRight>10)//右
|
|
2427
2428
|
{var rtBG={Left:right+1,Top:yTop,Bottom:yBottom};rtBG.Height=rtBG.Bottom-rtBG.Top;if(this.YRightTextInfo&&IFrameSplitOperator.IsNumber(this.YRightTextInfo.MainTextWidth))//右侧自动调整 可以获取宽度
|
|
2428
|
-
{rtBG.Width=this.YRightTextInfo.MainTextWidth-1;rtBG.Right=rtBG.Left+rtBG.Width;}else{rtBG.Right=border.ChartWidth;rtBG.Width=rtBG.Right-rtBG.Left;}
|
|
2429
|
+
{rtBG.Width=this.YRightTextInfo.MainTextWidth-1;rtBG.Right=rtBG.Left+rtBG.Width;}else{rtBG.Right=border.ChartWidth;rtBG.Width=rtBG.Right-rtBG.Left;}if(IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width))//指定宽度
|
|
2430
|
+
{var bgWidth=item.AreaData.Width[1];if(IFrameSplitOperator.IsNumber(bgWidth)){if(rtBG.Width>bgWidth){rtBG.Width=bgWidth;rtBG.Right=rtBG.Left+rtBG.Width;}}}this.Canvas.fillStyle=item.AreaData.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);this.DrawCustomAreaText(rtBG,item,1);}};this.DrawCustomAreaText=function(rtBG,item,position)//position 0=左 1=右
|
|
2429
2431
|
{if(item.Font!=null)this.Canvas.font=item.Font;var fontHeight=this.GetFontHeight();if(rtBG.Height<fontHeight)return;var pixelTatio=GetDevicePixelRatio();var text,xText;if(position==0){if(!item.Message[0])return;this.Canvas.textAlign="right";text=item.Message[0];xText=rtBG.Right-2*pixelTatio;}else if(position==1){if(!item.Message[1])return;this.Canvas.textAlign="left";text=item.Message[1];xText=rtBG.Left+2*pixelTatio;}var yText=rtBG.Top+rtBG.Height/2;this.Canvas.textBaseline="middle";this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(text,xText,yText);};this.SendDrawCountDownEvent=function(sendData){if(!this.GetEventCallback)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_COUNTDOWN);if(!event||!event.Callback)return false;event.Callback(event,sendData,this);return true;};this.DrawDotLine=function(left,right,y,color,option){var pixelTatio=GetDevicePixelRatio();this.Canvas.save();this.Canvas.strokeStyle=color;if(option&&IFrameSplitOperator.IsPlusNumber(option.LineWidth))this.Canvas.lineWidth=option.LineWidth*pixelTatio;if(option.LineDash)this.Canvas.setLineDash(option.LineDash);else this.Canvas.setLineDash([5*pixelTatio,5*pixelTatio]);//虚线
|
|
2430
2432
|
this.Canvas.beginPath();if(this.IsHScreen){this.Canvas.moveTo(ToFixedPoint(y),left);this.Canvas.lineTo(ToFixedPoint(y),right);}else{this.Canvas.moveTo(left,ToFixedPoint(y));this.Canvas.lineTo(right,ToFixedPoint(y));}this.Canvas.stroke();this.Canvas.restore();};this.DrawLine=function(left,right,y,color,lineType,option){if(lineType==-1)return;if(lineType==0){var pixelRatio=GetDevicePixelRatio();this.Canvas.strokeStyle=color;var bChangeLineWidth=false;if(option&&IFrameSplitOperator.IsPlusNumber(option.LineWidth)){this.Canvas.lineWidth=option.LineWidth*pixelRatio;bChangeLineWidth=true;}this.Canvas.beginPath();if(this.IsHScreen){this.Canvas.moveTo(ToFixedPoint(y),left);this.Canvas.lineTo(ToFixedPoint(y),right);}else{this.Canvas.moveTo(left,ToFixedPoint(y));this.Canvas.lineTo(right,ToFixedPoint(y));}this.Canvas.stroke();if(bChangeLineWidth){this.Canvas.lineWidth=pixelRatio;}}else if(lineType==2)//绘制短线
|
|
2431
2433
|
{var lineWidth=10*GetDevicePixelRatio();this.Canvas.strokeStyle=color;this.Canvas.beginPath();if(this.IsHScreen){this.Canvas.moveTo(ToFixedPoint(y),left);this.Canvas.lineTo(ToFixedPoint(y),left+lineWidth);}else{this.Canvas.moveTo(left,ToFixedPoint(y));this.Canvas.lineTo(left+lineWidth,ToFixedPoint(y));}this.Canvas.stroke();}else{this.DrawDotLine(left,right,y,color,option);}};this.DrawHScreenText=function(center,data){this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillStyle=data.Color;this.Canvas.save();this.Canvas.translate(center.X,center.Y);this.Canvas.rotate(90*Math.PI/180);this.Canvas.fillText(data.Text,data.XOffset,data.YOffset);this.Canvas.restore();};this.RGBToStruct=function(rgb){if(/^(rgb|RGB)/.test(rgb)){var aColor=rgb.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");var result={};if(aColor.length!=3)return null;result.R=Number(aColor[0]);result.G=Number(aColor[1]);result.B=Number(aColor[2]);return result;}return null;};this.GetMulitTextMaxWidth=function(aryData){var width=null;for(var i=0;i<aryData.length;++i){var item=aryData[i];var text=item.Text;if(!text)continue;var value=this.Canvas.measureText(text).width;if(width==null)width=value;else if(width<value)width=value;}return width;};this.GetScaleTextWidth=function(){var border=this.ChartBorder.GetBorder();var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
@@ -2457,8 +2459,10 @@ this.AfterCloseVerticalInfo=[];//收盘集合竞价X轴
|
|
|
2457
2459
|
this.NightDayConfig=CloneData(g_JSChartResource.Minute.NightDay);this.MinuteFrame_ReloadResource=this.ReloadResource;this.ReloadResource=function(resource){this.MinuteFrame_ReloadResource(resource);//集合竞价配色修改
|
|
2458
2460
|
this.BeforeBGColor=g_JSChartResource.Minute.Before.BGColor;this.AfterBGColor=g_JSChartResource.Minute.After.BGColor;this.MultiDayBorderPen=g_JSChartResource.MultiDayBorderPen;};this.DrawFrame=function(){if(!this.IsMinSize){this.SplitXYCoordinate();this.DrawBeforeDataBG();this.YInsideOffset=0;if(this.BeforeDrawXYCallback)this.BeforeDrawXYCallback(this);this.DrawNightDayBG();//绘制夜盘 日盘背景
|
|
2459
2461
|
this.DrawCustomBG();//绘制自定义背景色
|
|
2460
|
-
this.DrawTitleBG();this.
|
|
2461
|
-
this.
|
|
2462
|
+
this.DrawTitleBG();this.DrawCustomHorizontalArea();//Y轴背景区域 在刻度前面绘制
|
|
2463
|
+
this.DrawHorizontal();this.DrawVertical();}if(this.SizeChange==true||this.ReDrawToolbar==true){this.DrawToolbar();//大小变动才画工具条
|
|
2464
|
+
this.ReDrawToolbar=false;}};//Y轴面积背景
|
|
2465
|
+
this.DrawCustomHorizontalArea=function(){if(this.IsMinSize)return;if(this.ChartBorder.IsShowTitleOnly)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.CustomHorizontalInfo))return;for(var i=0;i<this.CustomHorizontalInfo.length;++i){var item=this.CustomHorizontalInfo[i];if(item.Type==5)this.DrawCustomAreaItem(item);}};//画边框
|
|
2462
2466
|
this.SuperDrawBorder=this.DrawBorder;this.DrawBorder=function(){if(!this.IsShowBorder)return;if(this.IsMinSize)return;this.SuperDrawBorder();if(this.Identify==1)//走势图和成交量中间用粗线分割开
|
|
2463
2467
|
{var border=this.ChartBorder.GetBorder();var left=ToFixedPoint(border.Left);var top=ToFixedPoint(border.Top);var right=ToFixedPoint(border.Right);this.Canvas.strokeStyle=this.PenBorder;this.Canvas.beginPath();this.Canvas.moveTo(left,top);this.Canvas.lineTo(right,top);this.Canvas.save();this.Canvas.lineWidth=2*GetDevicePixelRatio();this.Canvas.stroke();this.Canvas.restore();}};this.DrawVolTitle=function(symbol){if(!MARKET_SUFFIX_NAME.IsShowMinuteVolTitle(symbol))return;if(this.Identify==1)//显示"成交量"
|
|
2464
2468
|
{var pixelRatio=GetDevicePixelRatio();var left=this.ChartBorder.GetLeft()+2*pixelRatio+this.YInsideOffset;var top=this.ChartBorder.GetTopEx()+2*pixelRatio;this.Canvas.textAlign='left';this.Canvas.textBaseline='top';if(g_JSChartResource.Minute.VolBarColor||g_JSChartResource.Minute.VolTitleColor){if(g_JSChartResource.Minute.VolBarColor)this.Canvas.fillStyle=g_JSChartResource.Minute.VolBarColor;else this.Canvas.fillStyle=g_JSChartResource.Minute.VolTitleColor;var languageID=this.YSplitOperator.LanguageID;var text=g_JSChartLocalization.GetText('MVol-Vol',languageID);this.Canvas.fillText(text,left,top);left+=this.Canvas.measureText(text).width;left+=6*GetDevicePixelRatio();}if(this.IsShowPositionTitle){text=g_JSChartLocalization.GetText('MVol-Position',languageID);this.Canvas.fillStyle=g_JSChartResource.Minute.PositionColor;this.Canvas.fillText(text,left,top);}}};this.DrawToolbar=function(){if(this.ToolbarButtonStyle==1)return;if(g_JSChartResource.IsDOMFrameToolbar===true)return;if(typeof _jquery2.default=="undefined")return;if(this.Identify<2)return;if(!this.ChartBorder.UIElement)return;var divToolbar=document.getElementById(this.ToolbarID);if(divToolbar&&this.SizeChange==false&&this.ReDrawToolbar==false)return;if(!divToolbar){divToolbar=document.createElement("div");divToolbar.className='klineframe-toolbar';divToolbar.id=this.ToolbarID;divToolbar.oncontextmenu=function(){return false;};//屏蔽右键系统菜单
|
|
@@ -12658,7 +12662,7 @@ this.DelayUpdateStockData=function(){var _this55=this;if(this.DelayUpdateTimer!=
|
|
|
12658
12662
|
return;}if(this.SortInfo&&this.SortInfo.Field>=0&&this.SortInfo.Sort>0){var column=chart.Column[this.SortInfo.Field];if(column.Sort==2){this.RequestStockSortData(column,this.SortInfo.Field,this.SortInfo.Sort);//远程排序
|
|
12659
12663
|
return;}}var arySymbol=chart.ShowSymbol;if(!IFrameSplitOperator.IsNonEmptyArray(arySymbol))return;this.RequestStockData(arySymbol);};//下载股票数据
|
|
12660
12664
|
this.RequestStockData=function(arySymbol){var self=this;if(this.NetworkFilter){var obj={Name:'JSDealChartContainer::RequestStockData',//类名::函数名
|
|
12661
|
-
Explain:'报价列表股票数据',Request:{Data:{stocks:arySymbol}},Self:this,PreventDefault:false};this.NetworkFilter(obj,function(data){self.RecvStockData(data);self.AutoUpdate();});if(obj.PreventDefault==true)return;}//throw { Name:'JSReportChartContainer::RequestStockData', Error:'(报价列表股票数据)不提供内置测试数据' };
|
|
12665
|
+
Explain:'报价列表股票数据',Request:{Data:{stocks:arySymbol},symbol:this.Symbol,name:this.Name},Self:this,PreventDefault:false};this.NetworkFilter(obj,function(data){self.RecvStockData(data);self.AutoUpdate();});if(obj.PreventDefault==true)return;}//throw { Name:'JSReportChartContainer::RequestStockData', Error:'(报价列表股票数据)不提供内置测试数据' };
|
|
12662
12666
|
};this.RecvStockData=function(data){var _this56=this;var setUpdateSymbol=new _set2.default();//更新的股票列表
|
|
12663
12667
|
if(IFrameSplitOperator.IsNonEmptyArray(data.data)){//0=证券代码 1=股票名称 2=昨收 3=开 4=高 5=低 6=收 7=成交量 8=成交金额, 9=买价 10=买量 11=卖价 12=卖量 13=均价 14=流通股 15=总股本
|
|
12664
12668
|
for(var i=0;i<data.data.length;++i){var item=data.data[i];var symbol=item[0];if(!symbol)continue;var stock=null;if(this.MapStockData.has(symbol)){stock=this.MapStockData.get(symbol);}else{stock=new HQReportItem();stock.OriginalSymbol=symbol;stock.Symbol=this.GetSymbolNoSuffix(symbol);this.MapStockData.set(symbol,stock);}this.ReadStockJsonData(stock,item);if(!setUpdateSymbol.has(symbol))setUpdateSymbol.add(symbol);}}var chart=this.ChartPaint[0];if(!chart)return;var bUpdate=false;//实时本地数据排序
|
|
@@ -13873,7 +13877,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13873
13877
|
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);};}/********************************************************************************
|
|
13874
13878
|
* 版本信息输出
|
|
13875
13879
|
*
|
|
13876
|
-
*/var HQCHART_VERSION="1.1.
|
|
13880
|
+
*/var HQCHART_VERSION="1.1.13993";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();//把给外界调用的方法暴露出来
|
|
13877
13881
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13878
13882
|
// BaseIndex:BaseIndex,
|
|
13879
13883
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -13297,7 +13297,7 @@ function AverageWidthFrame()
|
|
|
13297
13297
|
if (!item.AreaData) return;
|
|
13298
13298
|
if (this.IsHScreen) return; //暂时不支持横屏
|
|
13299
13299
|
|
|
13300
|
-
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右] }
|
|
13300
|
+
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右], Width:[左, 右] }
|
|
13301
13301
|
if (!IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Value) || item.AreaData.Value.length!=2) return;
|
|
13302
13302
|
|
|
13303
13303
|
var max=Math.max(item.AreaData.Value[0],item.AreaData.Value[1]);
|
|
@@ -13322,6 +13322,18 @@ function AverageWidthFrame()
|
|
|
13322
13322
|
var rtBG={ Left:0, Right:left-1, Top:yTop, Bottom:yBottom };
|
|
13323
13323
|
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
13324
13324
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
13325
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width)) //指定宽度
|
|
13326
|
+
{
|
|
13327
|
+
var bgWidth=item.AreaData.Width[0];
|
|
13328
|
+
if (IFrameSplitOperator.IsNumber(bgWidth))
|
|
13329
|
+
{
|
|
13330
|
+
if (rtBG.Width>bgWidth)
|
|
13331
|
+
{
|
|
13332
|
+
rtBG.Width=bgWidth;
|
|
13333
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
13334
|
+
}
|
|
13335
|
+
}
|
|
13336
|
+
}
|
|
13325
13337
|
this.Canvas.fillStyle=item.AreaData.BGColor;
|
|
13326
13338
|
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
13327
13339
|
this.DrawCustomAreaText(rtBG, item, 0);
|
|
@@ -13342,6 +13354,19 @@ function AverageWidthFrame()
|
|
|
13342
13354
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
13343
13355
|
}
|
|
13344
13356
|
|
|
13357
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width)) //指定宽度
|
|
13358
|
+
{
|
|
13359
|
+
var bgWidth=item.AreaData.Width[1];
|
|
13360
|
+
if (IFrameSplitOperator.IsNumber(bgWidth))
|
|
13361
|
+
{
|
|
13362
|
+
if (rtBG.Width>bgWidth)
|
|
13363
|
+
{
|
|
13364
|
+
rtBG.Width=bgWidth;
|
|
13365
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
13366
|
+
}
|
|
13367
|
+
}
|
|
13368
|
+
}
|
|
13369
|
+
|
|
13345
13370
|
this.Canvas.fillStyle=item.AreaData.BGColor;
|
|
13346
13371
|
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
13347
13372
|
this.DrawCustomAreaText(rtBG, item, 1);
|
|
@@ -13742,8 +13767,10 @@ function MinuteFrame()
|
|
|
13742
13767
|
|
|
13743
13768
|
this.DrawNightDayBG(); //绘制夜盘 日盘背景
|
|
13744
13769
|
this.DrawCustomBG(); //绘制自定义背景色
|
|
13745
|
-
|
|
13770
|
+
|
|
13746
13771
|
this.DrawTitleBG();
|
|
13772
|
+
this.DrawCustomHorizontalArea(); //Y轴背景区域 在刻度前面绘制
|
|
13773
|
+
|
|
13747
13774
|
this.DrawHorizontal();
|
|
13748
13775
|
this.DrawVertical();
|
|
13749
13776
|
}
|
|
@@ -13755,6 +13782,20 @@ function MinuteFrame()
|
|
|
13755
13782
|
}
|
|
13756
13783
|
}
|
|
13757
13784
|
|
|
13785
|
+
//Y轴面积背景
|
|
13786
|
+
this.DrawCustomHorizontalArea=function()
|
|
13787
|
+
{
|
|
13788
|
+
if (this.IsMinSize) return;
|
|
13789
|
+
if (this.ChartBorder.IsShowTitleOnly) return;
|
|
13790
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.CustomHorizontalInfo)) return;
|
|
13791
|
+
|
|
13792
|
+
for(var i=0;i<this.CustomHorizontalInfo.length;++i)
|
|
13793
|
+
{
|
|
13794
|
+
var item=this.CustomHorizontalInfo[i];
|
|
13795
|
+
if (item.Type==5) this.DrawCustomAreaItem(item);
|
|
13796
|
+
}
|
|
13797
|
+
}
|
|
13798
|
+
|
|
13758
13799
|
//画边框
|
|
13759
13800
|
this.SuperDrawBorder=this.DrawBorder;
|
|
13760
13801
|
this.DrawBorder=function()
|
|
@@ -1311,7 +1311,7 @@ function JSReportChartContainer(uielement)
|
|
|
1311
1311
|
{
|
|
1312
1312
|
Name:'JSDealChartContainer::RequestStockData', //类名::函数名
|
|
1313
1313
|
Explain:'报价列表股票数据',
|
|
1314
|
-
Request:{ Data: { stocks: arySymbol } },
|
|
1314
|
+
Request:{ Data: { stocks: arySymbol } , symbol:this.Symbol, name:this.Name },
|
|
1315
1315
|
Self:this,
|
|
1316
1316
|
PreventDefault:false
|
|
1317
1317
|
};
|
|
@@ -17222,7 +17222,7 @@ function AverageWidthFrame()
|
|
|
17222
17222
|
if (!item.AreaData) return;
|
|
17223
17223
|
if (this.IsHScreen) return; //暂时不支持横屏
|
|
17224
17224
|
|
|
17225
|
-
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右] }
|
|
17225
|
+
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右], Width:[左, 右] }
|
|
17226
17226
|
if (!IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Value) || item.AreaData.Value.length!=2) return;
|
|
17227
17227
|
|
|
17228
17228
|
var max=Math.max(item.AreaData.Value[0],item.AreaData.Value[1]);
|
|
@@ -17247,6 +17247,18 @@ function AverageWidthFrame()
|
|
|
17247
17247
|
var rtBG={ Left:0, Right:left-1, Top:yTop, Bottom:yBottom };
|
|
17248
17248
|
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
17249
17249
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
17250
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width)) //指定宽度
|
|
17251
|
+
{
|
|
17252
|
+
var bgWidth=item.AreaData.Width[0];
|
|
17253
|
+
if (IFrameSplitOperator.IsNumber(bgWidth))
|
|
17254
|
+
{
|
|
17255
|
+
if (rtBG.Width>bgWidth)
|
|
17256
|
+
{
|
|
17257
|
+
rtBG.Width=bgWidth;
|
|
17258
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
17259
|
+
}
|
|
17260
|
+
}
|
|
17261
|
+
}
|
|
17250
17262
|
this.Canvas.fillStyle=item.AreaData.BGColor;
|
|
17251
17263
|
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
17252
17264
|
this.DrawCustomAreaText(rtBG, item, 0);
|
|
@@ -17267,6 +17279,19 @@ function AverageWidthFrame()
|
|
|
17267
17279
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
17268
17280
|
}
|
|
17269
17281
|
|
|
17282
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width)) //指定宽度
|
|
17283
|
+
{
|
|
17284
|
+
var bgWidth=item.AreaData.Width[1];
|
|
17285
|
+
if (IFrameSplitOperator.IsNumber(bgWidth))
|
|
17286
|
+
{
|
|
17287
|
+
if (rtBG.Width>bgWidth)
|
|
17288
|
+
{
|
|
17289
|
+
rtBG.Width=bgWidth;
|
|
17290
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
17291
|
+
}
|
|
17292
|
+
}
|
|
17293
|
+
}
|
|
17294
|
+
|
|
17270
17295
|
this.Canvas.fillStyle=item.AreaData.BGColor;
|
|
17271
17296
|
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
17272
17297
|
this.DrawCustomAreaText(rtBG, item, 1);
|
|
@@ -17667,8 +17692,10 @@ function MinuteFrame()
|
|
|
17667
17692
|
|
|
17668
17693
|
this.DrawNightDayBG(); //绘制夜盘 日盘背景
|
|
17669
17694
|
this.DrawCustomBG(); //绘制自定义背景色
|
|
17670
|
-
|
|
17695
|
+
|
|
17671
17696
|
this.DrawTitleBG();
|
|
17697
|
+
this.DrawCustomHorizontalArea(); //Y轴背景区域 在刻度前面绘制
|
|
17698
|
+
|
|
17672
17699
|
this.DrawHorizontal();
|
|
17673
17700
|
this.DrawVertical();
|
|
17674
17701
|
}
|
|
@@ -17680,6 +17707,20 @@ function MinuteFrame()
|
|
|
17680
17707
|
}
|
|
17681
17708
|
}
|
|
17682
17709
|
|
|
17710
|
+
//Y轴面积背景
|
|
17711
|
+
this.DrawCustomHorizontalArea=function()
|
|
17712
|
+
{
|
|
17713
|
+
if (this.IsMinSize) return;
|
|
17714
|
+
if (this.ChartBorder.IsShowTitleOnly) return;
|
|
17715
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.CustomHorizontalInfo)) return;
|
|
17716
|
+
|
|
17717
|
+
for(var i=0;i<this.CustomHorizontalInfo.length;++i)
|
|
17718
|
+
{
|
|
17719
|
+
var item=this.CustomHorizontalInfo[i];
|
|
17720
|
+
if (item.Type==5) this.DrawCustomAreaItem(item);
|
|
17721
|
+
}
|
|
17722
|
+
}
|
|
17723
|
+
|
|
17683
17724
|
//画边框
|
|
17684
17725
|
this.SuperDrawBorder=this.DrawBorder;
|
|
17685
17726
|
this.DrawBorder=function()
|
|
@@ -128243,7 +128284,7 @@ function JSReportChartContainer(uielement)
|
|
|
128243
128284
|
{
|
|
128244
128285
|
Name:'JSDealChartContainer::RequestStockData', //类名::函数名
|
|
128245
128286
|
Explain:'报价列表股票数据',
|
|
128246
|
-
Request:{ Data: { stocks: arySymbol } },
|
|
128287
|
+
Request:{ Data: { stocks: arySymbol } , symbol:this.Symbol, name:this.Name },
|
|
128247
128288
|
Self:this,
|
|
128248
128289
|
PreventDefault:false
|
|
128249
128290
|
};
|
|
@@ -138761,7 +138802,7 @@ function ScrollBarBGChart()
|
|
|
138761
138802
|
|
|
138762
138803
|
|
|
138763
138804
|
|
|
138764
|
-
var HQCHART_VERSION="1.1.
|
|
138805
|
+
var HQCHART_VERSION="1.1.13993";
|
|
138765
138806
|
|
|
138766
138807
|
function PrintHQChartVersion()
|
|
138767
138808
|
{
|
|
@@ -17266,7 +17266,7 @@ function AverageWidthFrame()
|
|
|
17266
17266
|
if (!item.AreaData) return;
|
|
17267
17267
|
if (this.IsHScreen) return; //暂时不支持横屏
|
|
17268
17268
|
|
|
17269
|
-
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右] }
|
|
17269
|
+
//item.AreaData; //区域: { Value[], BGColor:, Position:[0=左, 1=右], Width:[左, 右] }
|
|
17270
17270
|
if (!IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Value) || item.AreaData.Value.length!=2) return;
|
|
17271
17271
|
|
|
17272
17272
|
var max=Math.max(item.AreaData.Value[0],item.AreaData.Value[1]);
|
|
@@ -17291,6 +17291,18 @@ function AverageWidthFrame()
|
|
|
17291
17291
|
var rtBG={ Left:0, Right:left-1, Top:yTop, Bottom:yBottom };
|
|
17292
17292
|
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
17293
17293
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
17294
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width)) //指定宽度
|
|
17295
|
+
{
|
|
17296
|
+
var bgWidth=item.AreaData.Width[0];
|
|
17297
|
+
if (IFrameSplitOperator.IsNumber(bgWidth))
|
|
17298
|
+
{
|
|
17299
|
+
if (rtBG.Width>bgWidth)
|
|
17300
|
+
{
|
|
17301
|
+
rtBG.Width=bgWidth;
|
|
17302
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
17303
|
+
}
|
|
17304
|
+
}
|
|
17305
|
+
}
|
|
17294
17306
|
this.Canvas.fillStyle=item.AreaData.BGColor;
|
|
17295
17307
|
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
17296
17308
|
this.DrawCustomAreaText(rtBG, item, 0);
|
|
@@ -17311,6 +17323,19 @@ function AverageWidthFrame()
|
|
|
17311
17323
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
17312
17324
|
}
|
|
17313
17325
|
|
|
17326
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.AreaData.Width)) //指定宽度
|
|
17327
|
+
{
|
|
17328
|
+
var bgWidth=item.AreaData.Width[1];
|
|
17329
|
+
if (IFrameSplitOperator.IsNumber(bgWidth))
|
|
17330
|
+
{
|
|
17331
|
+
if (rtBG.Width>bgWidth)
|
|
17332
|
+
{
|
|
17333
|
+
rtBG.Width=bgWidth;
|
|
17334
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
17335
|
+
}
|
|
17336
|
+
}
|
|
17337
|
+
}
|
|
17338
|
+
|
|
17314
17339
|
this.Canvas.fillStyle=item.AreaData.BGColor;
|
|
17315
17340
|
this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
17316
17341
|
this.DrawCustomAreaText(rtBG, item, 1);
|
|
@@ -17711,8 +17736,10 @@ function MinuteFrame()
|
|
|
17711
17736
|
|
|
17712
17737
|
this.DrawNightDayBG(); //绘制夜盘 日盘背景
|
|
17713
17738
|
this.DrawCustomBG(); //绘制自定义背景色
|
|
17714
|
-
|
|
17739
|
+
|
|
17715
17740
|
this.DrawTitleBG();
|
|
17741
|
+
this.DrawCustomHorizontalArea(); //Y轴背景区域 在刻度前面绘制
|
|
17742
|
+
|
|
17716
17743
|
this.DrawHorizontal();
|
|
17717
17744
|
this.DrawVertical();
|
|
17718
17745
|
}
|
|
@@ -17724,6 +17751,20 @@ function MinuteFrame()
|
|
|
17724
17751
|
}
|
|
17725
17752
|
}
|
|
17726
17753
|
|
|
17754
|
+
//Y轴面积背景
|
|
17755
|
+
this.DrawCustomHorizontalArea=function()
|
|
17756
|
+
{
|
|
17757
|
+
if (this.IsMinSize) return;
|
|
17758
|
+
if (this.ChartBorder.IsShowTitleOnly) return;
|
|
17759
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.CustomHorizontalInfo)) return;
|
|
17760
|
+
|
|
17761
|
+
for(var i=0;i<this.CustomHorizontalInfo.length;++i)
|
|
17762
|
+
{
|
|
17763
|
+
var item=this.CustomHorizontalInfo[i];
|
|
17764
|
+
if (item.Type==5) this.DrawCustomAreaItem(item);
|
|
17765
|
+
}
|
|
17766
|
+
}
|
|
17767
|
+
|
|
17727
17768
|
//画边框
|
|
17728
17769
|
this.SuperDrawBorder=this.DrawBorder;
|
|
17729
17770
|
this.DrawBorder=function()
|
|
@@ -128287,7 +128328,7 @@ function JSReportChartContainer(uielement)
|
|
|
128287
128328
|
{
|
|
128288
128329
|
Name:'JSDealChartContainer::RequestStockData', //类名::函数名
|
|
128289
128330
|
Explain:'报价列表股票数据',
|
|
128290
|
-
Request:{ Data: { stocks: arySymbol } },
|
|
128331
|
+
Request:{ Data: { stocks: arySymbol } , symbol:this.Symbol, name:this.Name },
|
|
128291
128332
|
Self:this,
|
|
128292
128333
|
PreventDefault:false
|
|
128293
128334
|
};
|
|
@@ -145143,7 +145184,7 @@ function HQChartScriptWorker()
|
|
|
145143
145184
|
|
|
145144
145185
|
|
|
145145
145186
|
|
|
145146
|
-
var HQCHART_VERSION="1.1.
|
|
145187
|
+
var HQCHART_VERSION="1.1.13993";
|
|
145147
145188
|
|
|
145148
145189
|
function PrintHQChartVersion()
|
|
145149
145190
|
{
|