hqchart 1.1.14081 → 1.1.14084
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
|
@@ -13422,8 +13422,8 @@ case TREPORT_COLUMN_ID.BUY_VOL_ID://买量
|
|
|
13422
13422
|
case TREPORT_COLUMN_ID.POSITION_ID://持仓量
|
|
13423
13423
|
case TREPORT_COLUMN_ID.VOL_ID://成交量
|
|
13424
13424
|
case TREPORT_COLUMN_ID.AMOUNT_ID://成交金额
|
|
13425
|
-
var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(fieldName)drawInfo.Text=this.FormatVolString(data[fieldName]);break;case TREPORT_COLUMN_ID.INCREASE_ID:case TREPORT_COLUMN_ID.UPDOWN_ID:case TREPORT_COLUMN_ID.AMPLITUDE_ID:var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(fieldName){var value=data[fieldName];if(IFrameSplitOperator.IsNumber(value)){drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}else{this.GetNullDrawInfo(drawInfo);}}break;case TREPORT_COLUMN_ID.RESERVE_NUMBER1_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER2_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER3_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER4_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER5_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER6_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER7_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER8_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER9_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER10_ID:this.FormatReserveNumber(column,data,drawInfo);break;case TREPORT_COLUMN_ID.RESERVE_STRING1_ID:case TREPORT_COLUMN_ID.RESERVE_STRING2_ID:case TREPORT_COLUMN_ID.RESERVE_STRING3_ID:case TREPORT_COLUMN_ID.RESERVE_STRING4_ID:case TREPORT_COLUMN_ID.RESERVE_STRING5_ID:case TREPORT_COLUMN_ID.RESERVE_STRING6_ID:case TREPORT_COLUMN_ID.RESERVE_STRING7_ID:case TREPORT_COLUMN_ID.RESERVE_STRING8_ID:case TREPORT_COLUMN_ID.RESERVE_STRING9_ID:case TREPORT_COLUMN_ID.RESERVE_STRING10_ID:this.FormatReserveString(column,data,drawInfo);break;default:drawInfo.Text='-----';}this.GetMarkBorderData(drawInfo,exePriceData.ExePrice,column.Type,cellType);this.GetFlashBGData(drawInfo,exePriceData,column.Type,cellType);}this.DrawCell(drawInfo,exePriceData,column.Type,cellType);};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}//TODO: 不同类型的 格式化输出
|
|
13426
|
-
drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsObject(item)){if(item.Text)drawInfo.Text=item.Text;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}else if(IFrameSplitOperator.IsString(item)){drawInfo.Text=item;}};this.GetFlashBGData=function(drawInfo,exePriceData,columnType,cellType){if(!exePriceData.TData)return;var data=null;if(cellType==1)data=exePriceData.TData.LeftFlashBG;else if(cellType==2)data=exePriceData.TData.RightFlashBG;if(!data||!data.Data)return;if(data.Data.has(columnType)){var item=data.Data.get(columnType);drawInfo.FlashBGColor=item.Color;--item.Count;if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}};this.GetMarkBorderData=function(drawInfo,exePrice,columnType,cellType){if(!this.BorderData||!this.BorderData.MapData)return;if(!this.BorderData.MapData.has(columnType))return;var borderData=this.BorderData.MapData.get(columnType);if(!IFrameSplitOperator.IsNonEmptyArray(borderData.Data))return;if(cellType==1){var leftBorder=borderData.Data[1];if(!leftBorder)return;if(leftBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}else if(cellType==2){var rightBorder=borderData.Data[2];if(!rightBorder)return;if(rightBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}};this.GetNullDrawInfo=function(drawInfo){drawInfo.Text="--";drawInfo.TextColor=this.UnchangeColor;};this.GetPriceDrawInfo=function(price,stock,data,drawInfo){if(!IFrameSplitOperator.IsNumber(price)){this.GetNullDrawInfo(drawInfo);return;}drawInfo.Text=price.toFixed(data.Decimal);if(!IFrameSplitOperator.IsNumber(stock.YClose))drawInfo.TextColor=this.UnchangeColor;else drawInfo.TextColor=this.GetUpDownColor(price,stock.YClose);};//单独处理成交量显示
|
|
13425
|
+
var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(fieldName)drawInfo.Text=this.FormatVolString(data[fieldName]);break;case TREPORT_COLUMN_ID.INCREASE_ID:case TREPORT_COLUMN_ID.UPDOWN_ID:case TREPORT_COLUMN_ID.AMPLITUDE_ID:var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(fieldName){var value=data[fieldName];if(IFrameSplitOperator.IsNumber(value)){drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}else{this.GetNullDrawInfo(drawInfo);}}break;case TREPORT_COLUMN_ID.RESERVE_NUMBER1_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER2_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER3_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER4_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER5_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER6_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER7_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER8_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER9_ID:case TREPORT_COLUMN_ID.RESERVE_NUMBER10_ID:this.FormatReserveNumber(column,data,drawInfo);break;case TREPORT_COLUMN_ID.RESERVE_STRING1_ID:case TREPORT_COLUMN_ID.RESERVE_STRING2_ID:case TREPORT_COLUMN_ID.RESERVE_STRING3_ID:case TREPORT_COLUMN_ID.RESERVE_STRING4_ID:case TREPORT_COLUMN_ID.RESERVE_STRING5_ID:case TREPORT_COLUMN_ID.RESERVE_STRING6_ID:case TREPORT_COLUMN_ID.RESERVE_STRING7_ID:case TREPORT_COLUMN_ID.RESERVE_STRING8_ID:case TREPORT_COLUMN_ID.RESERVE_STRING9_ID:case TREPORT_COLUMN_ID.RESERVE_STRING10_ID:this.FormatReserveString(column,data,drawInfo);break;default:drawInfo.Text='-----';}this.GetMarkBorderData(drawInfo,exePriceData.ExePrice,column.Type,cellType);this.GetFlashBGData(drawInfo,exePriceData,column.Type,cellType);}this.DrawCell(drawInfo,exePriceData,column.Type,cellType);};this.FormatReserveNumber=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var value=data[fieldName];if(!IFrameSplitOperator.IsNumber(value))return;if(IFrameSplitOperator.IsNumber(column.ColorType)){if(column.ColorType==1){drawInfo.TextColor=this.GetUpDownColor(value,0);}else if(column.ColorType==2){drawInfo.TextColor=this.GetUpDownColorV2(value,0);}}//TODO: 不同类型的 格式化输出
|
|
13426
|
+
drawInfo.Text=value.toFixed(column.FloatPrecision);};this.FormatReserveString=function(column,data,drawInfo){if(column.DefaultText)drawInfo.Text=column.DefaultText;var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);if(!data||!fieldName)return;var item=data[fieldName];if(IFrameSplitOperator.IsObject(item)){if(item.Text)drawInfo.Text=item.Text;if(item.TextColor)drawInfo.TextColor=item.TextColor;if(item.BGColor)drawInfo.BGColor=item.BGColor;}else if(IFrameSplitOperator.IsString(item)){drawInfo.Text=item;}};this.GetFlashBGData=function(drawInfo,exePriceData,columnType,cellType){if(!exePriceData.TData)return;var data=null;if(cellType==1)data=exePriceData.TData.LeftFlashBG;else if(cellType==2)data=exePriceData.TData.RightFlashBG;if(!data||!data.Data)return;if(data.Data.has(columnType)){var item=data.Data.get(columnType);drawInfo.FlashBGColor=item.Color;--item.Count;if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}};this.GetMarkBorderData=function(drawInfo,exePrice,columnType,cellType){if(!this.BorderData||!this.BorderData.MapData)return;if(!this.BorderData.MapData.has(columnType))return;var borderData=this.BorderData.MapData.get(columnType);if(!IFrameSplitOperator.IsNonEmptyArray(borderData.Data))return;if(cellType==1){var leftBorder=borderData.Data[1];if(!leftBorder)return;if(leftBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}else if(cellType==2){var rightBorder=borderData.Data[2];if(!rightBorder)return;if(rightBorder.ExePrice==exePrice){drawInfo.BorderColor=this.MarkBorderConfig.MaxPositionColor;}}};this.GetNullDrawInfo=function(drawInfo){drawInfo.Text="--";drawInfo.TextColor=this.UnchangeColor;};this.GetPriceDrawInfo=function(price,stock,data,drawInfo){if(!IFrameSplitOperator.IsNumber(price)){this.GetNullDrawInfo(drawInfo);return;}drawInfo.Text=price.toFixed(data.Decimal);if(!IFrameSplitOperator.IsNumber(stock.YClose))drawInfo.TextColor=this.UnchangeColor;else drawInfo.TextColor=this.GetUpDownColor(price,stock.YClose);};//单独处理成交量显示
|
|
13427
13427
|
this.FormatVolString=function(value,languageID){if(!IFrameSplitOperator.IsNumber(value))return null;return IFrameSplitOperator.FormatVolString(value,languageID);};this.GetUpDownColor=function(price,price2){if(price>price2)return this.UpColor;else if(price<price2)return this.DownColor;else return this.UnchangeColor;};this.GetUpDownColorV2=function(price,price2){if(price>=price2)return this.UpColor;else return this.DownColor;};this.DrawCell=function(drawInfo){var rtText=drawInfo.RectText;var yCenter=rtText.Top+rtText.Height/2;if(drawInfo.BGColor)//背景
|
|
13428
13428
|
{var rtItem=drawInfo.Rect;this.Canvas.fillStyle=drawInfo.BGColor;this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);}if(drawInfo.FlashBGColor)//闪动背景
|
|
13429
13429
|
{var rtItem=drawInfo.Rect;this.Canvas.fillStyle=drawInfo.FlashBGColor;this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);}if(drawInfo.BorderColor)//边框
|
|
@@ -14061,7 +14061,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14061
14061
|
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);};}/********************************************************************************
|
|
14062
14062
|
* 版本信息输出
|
|
14063
14063
|
*
|
|
14064
|
-
*/var HQCHART_VERSION="1.1.
|
|
14064
|
+
*/var HQCHART_VERSION="1.1.14083";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();//把给外界调用的方法暴露出来
|
|
14065
14065
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14066
14066
|
// BaseIndex:BaseIndex,
|
|
14067
14067
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -2441,7 +2441,7 @@ function ChartTReport()
|
|
|
2441
2441
|
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
2442
2442
|
|
|
2443
2443
|
var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);
|
|
2444
|
-
if (!fieldName) return;
|
|
2444
|
+
if (!data || !fieldName) return;
|
|
2445
2445
|
|
|
2446
2446
|
var value=data[fieldName];
|
|
2447
2447
|
if (!IFrameSplitOperator.IsNumber(value)) return;
|
|
@@ -2467,7 +2467,7 @@ function ChartTReport()
|
|
|
2467
2467
|
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
2468
2468
|
|
|
2469
2469
|
var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);
|
|
2470
|
-
if (!fieldName) return;
|
|
2470
|
+
if (!data || !fieldName) return;
|
|
2471
2471
|
|
|
2472
2472
|
var item=data[fieldName];
|
|
2473
2473
|
if (IFrameSplitOperator.IsObject(item))
|
|
@@ -139275,7 +139275,7 @@ function ScrollBarBGChart()
|
|
|
139275
139275
|
|
|
139276
139276
|
|
|
139277
139277
|
|
|
139278
|
-
var HQCHART_VERSION="1.1.
|
|
139278
|
+
var HQCHART_VERSION="1.1.14083";
|
|
139279
139279
|
|
|
139280
139280
|
function PrintHQChartVersion()
|
|
139281
139281
|
{
|
|
@@ -138421,7 +138421,7 @@ function ChartTReport()
|
|
|
138421
138421
|
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
138422
138422
|
|
|
138423
138423
|
var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);
|
|
138424
|
-
if (!fieldName) return;
|
|
138424
|
+
if (!data || !fieldName) return;
|
|
138425
138425
|
|
|
138426
138426
|
var value=data[fieldName];
|
|
138427
138427
|
if (!IFrameSplitOperator.IsNumber(value)) return;
|
|
@@ -138447,7 +138447,7 @@ function ChartTReport()
|
|
|
138447
138447
|
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
138448
138448
|
|
|
138449
138449
|
var fieldName=MAP_TREPORT_COLUMN_FIELD.get(column.Type);
|
|
138450
|
-
if (!fieldName) return;
|
|
138450
|
+
if (!data || !fieldName) return;
|
|
138451
138451
|
|
|
138452
138452
|
var item=data[fieldName];
|
|
138453
138453
|
if (IFrameSplitOperator.IsObject(item))
|
|
@@ -147839,7 +147839,7 @@ function HQChartScriptWorker()
|
|
|
147839
147839
|
|
|
147840
147840
|
|
|
147841
147841
|
|
|
147842
|
-
var HQCHART_VERSION="1.1.
|
|
147842
|
+
var HQCHART_VERSION="1.1.14083";
|
|
147843
147843
|
|
|
147844
147844
|
function PrintHQChartVersion()
|
|
147845
147845
|
{
|