hqchart 1.1.13900 → 1.1.13909
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.NetworkFilterTest.vue.js +1 -1
- package/lib/umychart.vue.js +18 -7
- package/package.json +1 -1
- package/src/jscommon/umychart.js +54 -5
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +55 -6
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +18 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +55 -6
package/lib/umychart.vue.js
CHANGED
|
@@ -2170,8 +2170,10 @@ this.ExtendData;//扩展属性
|
|
|
2170
2170
|
//百分比 { PriceColor:, PercentageColor:, SplitColor:, Font: }
|
|
2171
2171
|
//自定义刻度 { Custom:{ Position: 1=强制内部 }}
|
|
2172
2172
|
this.AreaData;//区域: { Start:, End:, BGColor:, Position:[0=左, 1=右] }
|
|
2173
|
-
//不在当前屏范围
|
|
2173
|
+
//不在当前屏范围 (可定义刻度使用)
|
|
2174
2174
|
//this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
|
|
2175
|
+
//Y轴文字偏移
|
|
2176
|
+
//this.YOffset=[{ Offset:5}, { Offset:10}] //目前只对框子外的刻度文字生效
|
|
2175
2177
|
}//边框信息
|
|
2176
2178
|
function ChartBorder(){this.UIElement;//四周间距
|
|
2177
2179
|
this.Left=50;this.Right=80;this.Top=50;this.Bottom=50;this.TitleHeight=24;//标题高度
|
|
@@ -2332,15 +2334,17 @@ this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right
|
|
|
2332
2334
|
{}else if(item.LineType==8||item.LineType==9)//集合竞价不画线
|
|
2333
2335
|
{}else if(item.LineType>0){if(g_JSChartResource.FrameYLineDash){this.Canvas.save();this.Canvas.setLineDash(g_JSChartResource.FrameYLineDash);//虚线
|
|
2334
2336
|
this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();this.Canvas.setLineDash([]);this.Canvas.restore();}else{this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(right,yFixed);this.Canvas.stroke();}}if(bChangeLineWidth){this.Canvas.lineWidth=pixelRatio;}}var yText=y;if(y>=bottom-2){this.Canvas.textBaseline='bottom';textBaseline=2;}else if(y<=top+2){this.Canvas.textBaseline='top';yText+=this.YTextTopOffset;textBaseline=0;}else{this.Canvas.textBaseline="middle";textBaseline=1;}//左边 坐标信息 间距小于10 不画坐标
|
|
2335
|
-
this.Canvas.strokeStyle=item.TextColor;this.Canvas.fillStyle=item.TextColor;if(item.Message[0]!=null&&isDrawLeft){
|
|
2336
|
-
if(item.Message[
|
|
2337
|
+
this.Canvas.strokeStyle=item.TextColor;this.Canvas.fillStyle=item.TextColor;if(item.Message[0]!=null&&isDrawLeft){var yOffset=0;if(IFrameSplitOperator.IsNonEmptyArray(item.YOffset))//文字Y轴偏移
|
|
2338
|
+
{var offsetItem=item.YOffset[0];if(offsetItem&&IFrameSplitOperator.IsNumber(offsetItem.Offset))yOffset=offsetItem.Offset;}if(Array.isArray(item.Message[0])){if(this.MultiTextFormat==3){var obj={Data:item.Message[0],X:left,Y:yText,TextBaseLine:textBaseline,IsLeft:true,Item:item,TextPadding:this.YTextPadding[0]};this.DrawMultiLineText(obj);}}else{if(item.Font!=null)this.Canvas.font=item.Font;var xText=left;if(leftExtendLine&&leftExtendLine.Width>1){var lineLength=leftExtendLine.Width;if(leftExtendLine.Color)this.Canvas.strokeStyle=leftExtendLine.Color;else this.Canvas.strokeStyle=item.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(xText,yFixed);this.Canvas.lineTo(xText-lineLength,yFixed);this.Canvas.stroke();xText-=lineLength;}rtLeft=this.GetTextTopBottom(textBaseline,yText);if(!rtPreLeft||rtLeft&&!this.IsTextTopBottomOverlap(rtLeft,rtPreLeft)){if(leftExtendText&&leftExtendText.Align===1){this.Canvas.textAlign="left";this.Canvas.fillText(item.Message[0],this.YTextPadding[0],yText+yOffset);}else{this.Canvas.textAlign="right";this.Canvas.fillText(item.Message[0],xText-this.YTextPadding[0],yText+yOffset);rtPreLeft=rtLeft;}}}}//右边 坐标信息 间距小于10 不画坐标
|
|
2339
|
+
if(item.Message[1]!=null&&isDrawRight){var yOffset=0;if(IFrameSplitOperator.IsNonEmptyArray(item.YOffset))//文字Y轴偏移
|
|
2340
|
+
{var offsetItem=item.YOffset[1];if(offsetItem&&IFrameSplitOperator.IsNumber(offsetItem.Offset))yOffset=offsetItem.Offset;}if(item.Font!=null)this.Canvas.font=item.Font;var xText=right;if(item.LineType==3){var lineLength=this.ShortYLineLength*GetDevicePixelRatio();this.Canvas.beginPath();this.Canvas.moveTo(xText,yFixed);this.Canvas.lineTo(xText+lineLength,yFixed);this.Canvas.stroke();xText+=lineLength;}//右侧延长线
|
|
2337
2341
|
if(rightExtendLine&&rightExtendLine.Width>1){var lineLength=rightExtendLine.Width;if(rightExtendLine.Color)this.Canvas.strokeStyle=rightExtendLine.Color;else this.Canvas.strokeStyle=item.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(xText,yFixed);this.Canvas.lineTo(xText+lineLength,yFixed);this.Canvas.stroke();xText+=lineLength+2;}this.Canvas.textAlign="left";if(Array.isArray(item.Message[1])){if(this.MultiTextFormat==1)//显示1行 格式:价格/百分比
|
|
2338
2342
|
{if(item.ExtendData){if(item.ExtendData.Font)this.Canvas.font=item.ExtendData.Font;}var textData={Text:[{Text:item.Message[1][0],Width:this.Canvas.measureText(item.Message[1][0]).width},{Text:item.Message[1][1],Width:this.Canvas.measureText(item.Message[1][1]).width}],X:xText+2,Y:yText,TextBaseline:this.Canvas.textBaseline,Item:item};aryMultiText.push(textData);}else if(this.MultiTextFormat==2)//显示2行
|
|
2339
2343
|
{this.Canvas.fillText(item.Message[1][0],xText+this.YTextPadding[1],yText);var lineHeight=this.Canvas.measureText('M').width;if(itemHeight>lineHeight*2)this.Canvas.fillText(item.Message[1][1],xText+this.YTextPadding[1],yText+lineHeight);}else if(this.MultiTextFormat==3){var obj={Data:item.Message[1],X:xText,Y:yText,TextBaseLine:textBaseline,IsLeft:false,Item:item,TextPadding:this.YTextPadding[1]};this.DrawMultiLineText(obj);}else//显示第1行
|
|
2340
2344
|
{var text=item.Message[1][0];if(item.TextColor2)this.Canvas.fillStyle=item.TextColor2;if(rightExtendText&&rightExtendText.Align===2&&this.YRightTextInfo)//右对齐
|
|
2341
2345
|
{this.Canvas.textAlign="right";var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];this.Canvas.fillText(text,xRight,yText);}else{this.Canvas.fillText(text,xText+this.YTextPadding[1],yText);}}}else{//计算显示的区域
|
|
2342
2346
|
rtRight=this.GetTextTopBottom(textBaseline,yText);if(!rtPreRight||rtRight&&!this.IsTextTopBottomOverlap(rtRight,rtPreRight)){if(item.TextColor2)this.Canvas.fillStyle=item.TextColor2;if(rightExtendText&&rightExtendText.Align===2&&this.YRightTextInfo)//右对齐
|
|
2343
|
-
{this.Canvas.textAlign="right";var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];this.Canvas.fillText(item.Message[1],xRight,yText);}else{this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText);}rtPreRight=rtRight;}}}yPrev=y;}if(IFrameSplitOperator.IsNonEmptyArray(aryMultiText)&&this.MultiTextFormat==1)this.DrawHorizontalMuText(aryMultiText);if(isDrawRight&&this.IsDrawRightBorder&&this.YRightTextInfo){var xRight=this.YRightTextInfo.MainTextWidth+right;xLine=ToFixedPoint(xRight);this.Canvas.strokeStyle=this.PenBorder;this.Canvas.beginPath();this.Canvas.moveTo(xLine,top);this.Canvas.lineTo(xLine,bottom);this.Canvas.stroke();if(IFrameSplitOperator.IsNonEmptyArray(this.YRightTextInfo.AryOverlayWidth)){this.Canvas.beginPath();for(var i=0;i<this.YRightTextInfo.AryOverlayWidth.length;++i){var width=this.YRightTextInfo.AryOverlayWidth[i];xRight+=width;xLine=ToFixedPoint(xRight);this.Canvas.moveTo(xLine,top);this.Canvas.lineTo(xLine,bottom);}this.Canvas.stroke();}}};//多行文字刻度输出 obj={ Data:, X:, Y:, TextBaseLine:, IsLeft:, Item:刻度数据 }
|
|
2347
|
+
{this.Canvas.textAlign="right";var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];this.Canvas.fillText(item.Message[1],xRight,yText+yOffset);}else{this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText+yOffset);}rtPreRight=rtRight;}}}yPrev=y;}if(IFrameSplitOperator.IsNonEmptyArray(aryMultiText)&&this.MultiTextFormat==1)this.DrawHorizontalMuText(aryMultiText);if(isDrawRight&&this.IsDrawRightBorder&&this.YRightTextInfo){var xRight=this.YRightTextInfo.MainTextWidth+right;xLine=ToFixedPoint(xRight);this.Canvas.strokeStyle=this.PenBorder;this.Canvas.beginPath();this.Canvas.moveTo(xLine,top);this.Canvas.lineTo(xLine,bottom);this.Canvas.stroke();if(IFrameSplitOperator.IsNonEmptyArray(this.YRightTextInfo.AryOverlayWidth)){this.Canvas.beginPath();for(var i=0;i<this.YRightTextInfo.AryOverlayWidth.length;++i){var width=this.YRightTextInfo.AryOverlayWidth[i];xRight+=width;xLine=ToFixedPoint(xRight);this.Canvas.moveTo(xLine,top);this.Canvas.lineTo(xLine,bottom);}this.Canvas.stroke();}}};//多行文字刻度输出 obj={ Data:, X:, Y:, TextBaseLine:, IsLeft:, Item:刻度数据 }
|
|
2344
2348
|
this.DrawMultiLineText=function(obj){var lineSpacing=2;var lineHeight=this.Canvas.measureText('擎').width;var lineCount=obj.Data.length;var textHeight=lineHeight*lineCount+lineSpacing*(lineCount-1);var yText=obj.Y;if(obj.Item.Font!=null)this.Canvas.font=obj.Item.Font;if(obj.IsLeft){this.Canvas.textAlign="right";var xText=obj.X-obj.TextPadding;}else{this.Canvas.textAlign="left";var xText=obj.X+obj.TextPadding;}var textBaseline=this.Canvas.textBaseline;//备份下原来的对齐方式
|
|
2345
2349
|
this.Canvas.textBaseline='top';if(obj.TextBaseLine==1)//middle
|
|
2346
2350
|
{yText-=textHeight/2;}else if(obj.TextBaseLine==0)//top
|
|
@@ -2430,7 +2434,8 @@ this.LastCalculateStatus={Width:0,XPointCount:0};//最后一次计算宽度的
|
|
|
2430
2434
|
this.BeforeCloseIcon=CloneData(g_JSChartResource.Minute.Before.CloseIcon);this.IsShowCloseButton=true,//是否关闭集合竞价按钮
|
|
2431
2435
|
this.BeforeOpenVerticalInfo=[];//盘前集合竞价X轴
|
|
2432
2436
|
this.AfterCloseVerticalInfo=[];//收盘集合竞价X轴
|
|
2433
|
-
this.NightDayConfig=CloneData(g_JSChartResource.Minute.NightDay);this.
|
|
2437
|
+
this.NightDayConfig=CloneData(g_JSChartResource.Minute.NightDay);this.MinuteFrame_ReloadResource=this.ReloadResource;this.ReloadResource=function(resource){this.MinuteFrame_ReloadResource(resource);//集合竞价配色修改
|
|
2438
|
+
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();//绘制夜盘 日盘背景
|
|
2434
2439
|
this.DrawCustomBG();//绘制自定义背景色
|
|
2435
2440
|
this.DrawTitleBG();this.DrawHorizontal();this.DrawVertical();}if(this.SizeChange==true||this.ReDrawToolbar==true){this.DrawToolbar();//大小变动才画工具条
|
|
2436
2441
|
this.ReDrawToolbar=false;}};//画边框
|
|
@@ -4718,7 +4723,13 @@ this.AmountColor=g_JSChartResource.PCTooltipPaint.AmountColor;//成交金额
|
|
|
4718
4723
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;this.TitlePaint;this.UpColor=g_JSChartResource.UpTextColor;this.DownColor=g_JSChartResource.DownTextColor;this.UnchagneColor=g_JSChartResource.UnchagneTextColor;this.YClose;this.Mergin={Left:2,Top:3,Bottom:2,Right:2};this.LineHeight=15;//行高
|
|
4719
4724
|
this.FixedWidth;//固定宽度
|
|
4720
4725
|
this.Font=g_JSChartResource.PCTooltipPaint.TitleFont;this.HQChart;//设置参数接口
|
|
4721
|
-
this.SetOption=function(option){if(option.BGColor)this.BGColor=option.BGColor;if(option.LanguageID>0)this.LanguageID=option.LanguageID;if(IFrameSplitOperator.IsNumber(option.FixedWidth))this.FixedWidth=option.FixedWidth;};this.
|
|
4726
|
+
this.SetOption=function(option){if(option.BGColor)this.BGColor=option.BGColor;if(option.LanguageID>0)this.LanguageID=option.LanguageID;if(IFrameSplitOperator.IsNumber(option.FixedWidth))this.FixedWidth=option.FixedWidth;};this.ReloadResource=function(resource){this.BorderColor=g_JSChartResource.PCTooltipPaint.BorderColor;//边框颜色
|
|
4727
|
+
this.BGColor=g_JSChartResource.PCTooltipPaint.BGColor;//背景色
|
|
4728
|
+
this.TitleColor=g_JSChartResource.PCTooltipPaint.TitleColor;//标题颜色
|
|
4729
|
+
this.DateTimeColor=g_JSChartResource.PCTooltipPaint.DateTimeColor;//日期时间颜色
|
|
4730
|
+
this.VolColor=g_JSChartResource.PCTooltipPaint.VolColor;//标题成交量
|
|
4731
|
+
this.AmountColor=g_JSChartResource.PCTooltipPaint.AmountColor;//成交金额
|
|
4732
|
+
this.UpColor=g_JSChartResource.UpTextColor;this.DownColor=g_JSChartResource.DownTextColor;this.UnchagneColor=g_JSChartResource.UnchagneTextColor;this.Font=g_JSChartResource.PCTooltipPaint.TitleFont;};this.IsEnableDraw=function(){if(!this.HQChart||!this.HQChart.TitlePaint||!this.HQChart.TitlePaint[0])return false;var pt=this.HQChart.LastPoint;if(!pt)return false;return this.HQChart.IsMouseOnClient(pt.X,pt.Y);};this.Draw=function(){if(!this.IsEnableDraw())return;this.TitlePaint=this.HQChart.TitlePaint[0];if(!this.TitlePaint)return;var pointInfo=this.TitlePaint.PointInfo;var drawData;//{ Type:0=连续交易 1=集合竞价, Data:数据 }
|
|
4722
4733
|
if(pointInfo&&(pointInfo.ClientPos==2||pointInfo.ClientPos==3||pointInfo.ClientPos>=200&&pointInfo.ClientPos<=299||pointInfo.ClientPos>=300&&pointInfo.ClientPos<=399)){var auctionData=this.TitlePaint.GetCurrentAuctionData();if(!auctionData)return;drawData={Type:1,Data:auctionData};}else{var minuteData=this.TitlePaint.GetCurrentKLineData();if(!minuteData)return;drawData={Type:0,Data:minuteData};}this.YClose=this.TitlePaint.YClose;var aryText=this.GetForamtTitle(drawData);if(!IFrameSplitOperator.IsNonEmptyArray(aryText))return;this.Canvas.font=this.Font;this.Canvas.textBaseline='top';this.LineHeight=GetFontHeight(this.Canvas,null,"擎");var border=this.ChartBorder.GetBorder();var height=this.LineHeight*aryText.length*2;var rtBorder={Left:1,Top:1,Right:border.Left};rtBorder.Bottom=rtBorder.Top+height;rtBorder.Width=rtBorder.Right-rtBorder.Left;rtBorder.Height=rtBorder.Bottom-rtBorder.Top;rtBorder.Height+=this.Mergin.Top+this.Mergin.Bottom;rtBorder.Bottom=rtBorder.Top+rtBorder.Height;if(IFrameSplitOperator.IsNumber(this.FixedWidth))rtBorder.Width=this.FixedWidth;this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtBorder.Left,rtBorder.Top,rtBorder.Width,rtBorder.Height);this.Canvas.strokeStyle=this.BorderColor;this.Canvas.strokeRect(ToFixedPoint(rtBorder.Left),ToFixedPoint(rtBorder.Top),ToFixedRect(rtBorder.Width),ToFixedRect(rtBorder.Height));var right=rtBorder.Left+rtBorder.Width-this.Mergin.Right;var left=this.Mergin.Left+rtBorder.Left;var top=this.Mergin.Top+rtBorder.Top;var rtItem={Left:left,Top:top,Right:right};rtItem.Width=rtItem.Right-rtItem.Left;for(var i=0;i<aryText.length;++i){var item=aryText[i];this.DrawText(item,rtItem);}};this.DrawText=function(item,rtItem){this.Canvas.fillStyle=item.TitleColor;this.Canvas.textAlign='left';this.Canvas.fillText(item.Title,rtItem.Left,rtItem.Top);rtItem.Top+=this.LineHeight;rtItem.Bottom=rtItem.Top+this.LineHeight;this.Canvas.textAlign='right';this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Text,rtItem.Right,rtItem.Top);rtItem.Top+=this.LineHeight;rtItem.Bottom=rtItem.Top+this.LineHeight;};//{ Title:, Text:, Color: }
|
|
4723
4734
|
this.GetForamtTitle=function(drawData){if(!drawData||!drawData.Data)return null;var aryText=[];var isFutures=false;var upperSymbol;if(this.HQChart.Symbol)upperSymbol=this.HQChart.Symbol.toUpperCase();var defaultfloatPrecision=GetfloatPrecision(upperSymbol);//价格小数位数
|
|
4724
4735
|
if(upperSymbol)isFutures=MARKET_SUFFIX_NAME.IsFutures(upperSymbol);//国内期货, 纽约期货交易所
|
|
@@ -13752,7 +13763,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13752
13763
|
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);};}/********************************************************************************
|
|
13753
13764
|
* 版本信息输出
|
|
13754
13765
|
*
|
|
13755
|
-
*/var HQCHART_VERSION="1.1.
|
|
13766
|
+
*/var HQCHART_VERSION="1.1.13907";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();//把给外界调用的方法暴露出来
|
|
13756
13767
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13757
13768
|
// BaseIndex:BaseIndex,
|
|
13758
13769
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -10229,8 +10229,10 @@ function CoordinateInfo()
|
|
|
10229
10229
|
//自定义刻度 { Custom:{ Position: 1=强制内部 }}
|
|
10230
10230
|
this.AreaData; //区域: { Start:, End:, BGColor:, Position:[0=左, 1=右] }
|
|
10231
10231
|
|
|
10232
|
-
//不在当前屏范围
|
|
10232
|
+
//不在当前屏范围 (可定义刻度使用)
|
|
10233
10233
|
//this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
|
|
10234
|
+
//Y轴文字偏移
|
|
10235
|
+
//this.YOffset=[{ Offset:5}, { Offset:10}] //目前只对框子外的刻度文字生效
|
|
10234
10236
|
}
|
|
10235
10237
|
|
|
10236
10238
|
|
|
@@ -11462,6 +11464,14 @@ function AverageWidthFrame()
|
|
|
11462
11464
|
|
|
11463
11465
|
if (item.Message[0]!=null && isDrawLeft)
|
|
11464
11466
|
{
|
|
11467
|
+
var yOffset=0;
|
|
11468
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
|
|
11469
|
+
{
|
|
11470
|
+
var offsetItem=item.YOffset[0];
|
|
11471
|
+
if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
|
|
11472
|
+
yOffset=offsetItem.Offset;
|
|
11473
|
+
}
|
|
11474
|
+
|
|
11465
11475
|
if (Array.isArray(item.Message[0]))
|
|
11466
11476
|
{
|
|
11467
11477
|
if (this.MultiTextFormat==3)
|
|
@@ -11494,12 +11504,12 @@ function AverageWidthFrame()
|
|
|
11494
11504
|
if (leftExtendText && leftExtendText.Align===1)
|
|
11495
11505
|
{
|
|
11496
11506
|
this.Canvas.textAlign="left";
|
|
11497
|
-
this.Canvas.fillText(item.Message[0],this.YTextPadding[0],yText);
|
|
11507
|
+
this.Canvas.fillText(item.Message[0],this.YTextPadding[0],yText+yOffset);
|
|
11498
11508
|
}
|
|
11499
11509
|
else
|
|
11500
11510
|
{
|
|
11501
11511
|
this.Canvas.textAlign="right";
|
|
11502
|
-
this.Canvas.fillText(item.Message[0],xText-this.YTextPadding[0],yText);
|
|
11512
|
+
this.Canvas.fillText(item.Message[0],xText-this.YTextPadding[0],yText+yOffset);
|
|
11503
11513
|
rtPreLeft=rtLeft;
|
|
11504
11514
|
}
|
|
11505
11515
|
}
|
|
@@ -11509,6 +11519,15 @@ function AverageWidthFrame()
|
|
|
11509
11519
|
//右边 坐标信息 间距小于10 不画坐标
|
|
11510
11520
|
if (item.Message[1]!=null && isDrawRight)
|
|
11511
11521
|
{
|
|
11522
|
+
var yOffset=0;
|
|
11523
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
|
|
11524
|
+
{
|
|
11525
|
+
var offsetItem=item.YOffset[1];
|
|
11526
|
+
if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
|
|
11527
|
+
yOffset=offsetItem.Offset;
|
|
11528
|
+
}
|
|
11529
|
+
|
|
11530
|
+
|
|
11512
11531
|
if (item.Font!=null) this.Canvas.font=item.Font;
|
|
11513
11532
|
|
|
11514
11533
|
var xText=right;
|
|
@@ -11601,11 +11620,11 @@ function AverageWidthFrame()
|
|
|
11601
11620
|
{
|
|
11602
11621
|
this.Canvas.textAlign="right";
|
|
11603
11622
|
var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];
|
|
11604
|
-
this.Canvas.fillText(item.Message[1],xRight,yText);
|
|
11623
|
+
this.Canvas.fillText(item.Message[1],xRight,yText+yOffset);
|
|
11605
11624
|
}
|
|
11606
11625
|
else
|
|
11607
11626
|
{
|
|
11608
|
-
this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText);
|
|
11627
|
+
this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText+yOffset);
|
|
11609
11628
|
}
|
|
11610
11629
|
|
|
11611
11630
|
rtPreRight=rtRight;
|
|
@@ -13476,6 +13495,20 @@ function MinuteFrame()
|
|
|
13476
13495
|
|
|
13477
13496
|
this.NightDayConfig=CloneData(g_JSChartResource.Minute.NightDay);
|
|
13478
13497
|
|
|
13498
|
+
|
|
13499
|
+
this.MinuteFrame_ReloadResource=this.ReloadResource;
|
|
13500
|
+
|
|
13501
|
+
|
|
13502
|
+
this.ReloadResource=function(resource)
|
|
13503
|
+
{
|
|
13504
|
+
this.MinuteFrame_ReloadResource(resource);
|
|
13505
|
+
|
|
13506
|
+
//集合竞价配色修改
|
|
13507
|
+
this.BeforeBGColor=g_JSChartResource.Minute.Before.BGColor;
|
|
13508
|
+
this.AfterBGColor=g_JSChartResource.Minute.After.BGColor;
|
|
13509
|
+
this.MultiDayBorderPen=g_JSChartResource.MultiDayBorderPen;
|
|
13510
|
+
}
|
|
13511
|
+
|
|
13479
13512
|
this.DrawFrame=function()
|
|
13480
13513
|
{
|
|
13481
13514
|
if (!this.IsMinSize)
|
|
@@ -42964,6 +42997,22 @@ function MinuteLeftTooltipPaint()
|
|
|
42964
42997
|
if (IFrameSplitOperator.IsNumber(option.FixedWidth)) this.FixedWidth=option.FixedWidth;
|
|
42965
42998
|
}
|
|
42966
42999
|
|
|
43000
|
+
this.ReloadResource=function(resource)
|
|
43001
|
+
{
|
|
43002
|
+
this.BorderColor=g_JSChartResource.PCTooltipPaint.BorderColor; //边框颜色
|
|
43003
|
+
this.BGColor=g_JSChartResource.PCTooltipPaint.BGColor; //背景色
|
|
43004
|
+
this.TitleColor=g_JSChartResource.PCTooltipPaint.TitleColor; //标题颜色
|
|
43005
|
+
this.DateTimeColor=g_JSChartResource.PCTooltipPaint.DateTimeColor; //日期时间颜色
|
|
43006
|
+
this.VolColor=g_JSChartResource.PCTooltipPaint.VolColor; //标题成交量
|
|
43007
|
+
this.AmountColor=g_JSChartResource.PCTooltipPaint.AmountColor; //成交金额
|
|
43008
|
+
|
|
43009
|
+
this.UpColor=g_JSChartResource.UpTextColor;
|
|
43010
|
+
this.DownColor=g_JSChartResource.DownTextColor;
|
|
43011
|
+
this.UnchagneColor=g_JSChartResource.UnchagneTextColor;
|
|
43012
|
+
|
|
43013
|
+
this.Font=g_JSChartResource.PCTooltipPaint.TitleFont;
|
|
43014
|
+
}
|
|
43015
|
+
|
|
42967
43016
|
this.IsEnableDraw=function()
|
|
42968
43017
|
{
|
|
42969
43018
|
if (!this.HQChart || !this.HQChart.TitlePaint || !this.HQChart.TitlePaint[0]) return false;
|
|
@@ -14154,8 +14154,10 @@ function CoordinateInfo()
|
|
|
14154
14154
|
//自定义刻度 { Custom:{ Position: 1=强制内部 }}
|
|
14155
14155
|
this.AreaData; //区域: { Start:, End:, BGColor:, Position:[0=左, 1=右] }
|
|
14156
14156
|
|
|
14157
|
-
//不在当前屏范围
|
|
14157
|
+
//不在当前屏范围 (可定义刻度使用)
|
|
14158
14158
|
//this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
|
|
14159
|
+
//Y轴文字偏移
|
|
14160
|
+
//this.YOffset=[{ Offset:5}, { Offset:10}] //目前只对框子外的刻度文字生效
|
|
14159
14161
|
}
|
|
14160
14162
|
|
|
14161
14163
|
|
|
@@ -15387,6 +15389,14 @@ function AverageWidthFrame()
|
|
|
15387
15389
|
|
|
15388
15390
|
if (item.Message[0]!=null && isDrawLeft)
|
|
15389
15391
|
{
|
|
15392
|
+
var yOffset=0;
|
|
15393
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
|
|
15394
|
+
{
|
|
15395
|
+
var offsetItem=item.YOffset[0];
|
|
15396
|
+
if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
|
|
15397
|
+
yOffset=offsetItem.Offset;
|
|
15398
|
+
}
|
|
15399
|
+
|
|
15390
15400
|
if (Array.isArray(item.Message[0]))
|
|
15391
15401
|
{
|
|
15392
15402
|
if (this.MultiTextFormat==3)
|
|
@@ -15419,12 +15429,12 @@ function AverageWidthFrame()
|
|
|
15419
15429
|
if (leftExtendText && leftExtendText.Align===1)
|
|
15420
15430
|
{
|
|
15421
15431
|
this.Canvas.textAlign="left";
|
|
15422
|
-
this.Canvas.fillText(item.Message[0],this.YTextPadding[0],yText);
|
|
15432
|
+
this.Canvas.fillText(item.Message[0],this.YTextPadding[0],yText+yOffset);
|
|
15423
15433
|
}
|
|
15424
15434
|
else
|
|
15425
15435
|
{
|
|
15426
15436
|
this.Canvas.textAlign="right";
|
|
15427
|
-
this.Canvas.fillText(item.Message[0],xText-this.YTextPadding[0],yText);
|
|
15437
|
+
this.Canvas.fillText(item.Message[0],xText-this.YTextPadding[0],yText+yOffset);
|
|
15428
15438
|
rtPreLeft=rtLeft;
|
|
15429
15439
|
}
|
|
15430
15440
|
}
|
|
@@ -15434,6 +15444,15 @@ function AverageWidthFrame()
|
|
|
15434
15444
|
//右边 坐标信息 间距小于10 不画坐标
|
|
15435
15445
|
if (item.Message[1]!=null && isDrawRight)
|
|
15436
15446
|
{
|
|
15447
|
+
var yOffset=0;
|
|
15448
|
+
if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
|
|
15449
|
+
{
|
|
15450
|
+
var offsetItem=item.YOffset[1];
|
|
15451
|
+
if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
|
|
15452
|
+
yOffset=offsetItem.Offset;
|
|
15453
|
+
}
|
|
15454
|
+
|
|
15455
|
+
|
|
15437
15456
|
if (item.Font!=null) this.Canvas.font=item.Font;
|
|
15438
15457
|
|
|
15439
15458
|
var xText=right;
|
|
@@ -15526,11 +15545,11 @@ function AverageWidthFrame()
|
|
|
15526
15545
|
{
|
|
15527
15546
|
this.Canvas.textAlign="right";
|
|
15528
15547
|
var xRight=this.YRightTextInfo.MainTextWidth+right-this.YTextPadding[1];
|
|
15529
|
-
this.Canvas.fillText(item.Message[1],xRight,yText);
|
|
15548
|
+
this.Canvas.fillText(item.Message[1],xRight,yText+yOffset);
|
|
15530
15549
|
}
|
|
15531
15550
|
else
|
|
15532
15551
|
{
|
|
15533
|
-
this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText);
|
|
15552
|
+
this.Canvas.fillText(item.Message[1],xText+this.YTextPadding[1],yText+yOffset);
|
|
15534
15553
|
}
|
|
15535
15554
|
|
|
15536
15555
|
rtPreRight=rtRight;
|
|
@@ -17401,6 +17420,20 @@ function MinuteFrame()
|
|
|
17401
17420
|
|
|
17402
17421
|
this.NightDayConfig=CloneData(g_JSChartResource.Minute.NightDay);
|
|
17403
17422
|
|
|
17423
|
+
|
|
17424
|
+
this.MinuteFrame_ReloadResource=this.ReloadResource;
|
|
17425
|
+
|
|
17426
|
+
|
|
17427
|
+
this.ReloadResource=function(resource)
|
|
17428
|
+
{
|
|
17429
|
+
this.MinuteFrame_ReloadResource(resource);
|
|
17430
|
+
|
|
17431
|
+
//集合竞价配色修改
|
|
17432
|
+
this.BeforeBGColor=g_JSChartResource.Minute.Before.BGColor;
|
|
17433
|
+
this.AfterBGColor=g_JSChartResource.Minute.After.BGColor;
|
|
17434
|
+
this.MultiDayBorderPen=g_JSChartResource.MultiDayBorderPen;
|
|
17435
|
+
}
|
|
17436
|
+
|
|
17404
17437
|
this.DrawFrame=function()
|
|
17405
17438
|
{
|
|
17406
17439
|
if (!this.IsMinSize)
|
|
@@ -46889,6 +46922,22 @@ function MinuteLeftTooltipPaint()
|
|
|
46889
46922
|
if (IFrameSplitOperator.IsNumber(option.FixedWidth)) this.FixedWidth=option.FixedWidth;
|
|
46890
46923
|
}
|
|
46891
46924
|
|
|
46925
|
+
this.ReloadResource=function(resource)
|
|
46926
|
+
{
|
|
46927
|
+
this.BorderColor=g_JSChartResource.PCTooltipPaint.BorderColor; //边框颜色
|
|
46928
|
+
this.BGColor=g_JSChartResource.PCTooltipPaint.BGColor; //背景色
|
|
46929
|
+
this.TitleColor=g_JSChartResource.PCTooltipPaint.TitleColor; //标题颜色
|
|
46930
|
+
this.DateTimeColor=g_JSChartResource.PCTooltipPaint.DateTimeColor; //日期时间颜色
|
|
46931
|
+
this.VolColor=g_JSChartResource.PCTooltipPaint.VolColor; //标题成交量
|
|
46932
|
+
this.AmountColor=g_JSChartResource.PCTooltipPaint.AmountColor; //成交金额
|
|
46933
|
+
|
|
46934
|
+
this.UpColor=g_JSChartResource.UpTextColor;
|
|
46935
|
+
this.DownColor=g_JSChartResource.DownTextColor;
|
|
46936
|
+
this.UnchagneColor=g_JSChartResource.UnchagneTextColor;
|
|
46937
|
+
|
|
46938
|
+
this.Font=g_JSChartResource.PCTooltipPaint.TitleFont;
|
|
46939
|
+
}
|
|
46940
|
+
|
|
46892
46941
|
this.IsEnableDraw=function()
|
|
46893
46942
|
{
|
|
46894
46943
|
if (!this.HQChart || !this.HQChart.TitlePaint || !this.HQChart.TitlePaint[0]) return false;
|
|
@@ -138458,7 +138507,7 @@ function ScrollBarBGChart()
|
|
|
138458
138507
|
|
|
138459
138508
|
|
|
138460
138509
|
|
|
138461
|
-
var HQCHART_VERSION="1.1.
|
|
138510
|
+
var HQCHART_VERSION="1.1.13907";
|
|
138462
138511
|
|
|
138463
138512
|
function PrintHQChartVersion()
|
|
138464
138513
|
{
|