hqchart 1.1.13132 → 1.1.13135

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.
@@ -3465,7 +3465,8 @@ this.PtMin={X:null,Y:null,Value:null,Align:'left'};//清空最小
3465
3465
  this.DrawKRange={Start:null,End:null};this.AryPriceGapCache=[];this.ChartFrame.ChartKLine={Max:null,Min:null};//保存K线上 显示最大最小值坐标
3466
3466
  this.DrawHeatMap();if(!this.IsShow)return;if(this.ChartFrame.IsMinSize&&this.Name=="Self Kline")return;if(ChartData.IsTickPeriod(this.Period))//分笔图
3467
3467
  {this.Canvas.save();if(this.DrawType==1){this.ClipClient(this.ChartFrame.IsHScreen);this.DrawCloseLine();}else if(this.DrawType==4){this.ClipClient(this.ChartFrame.IsHScreen);this.DrawCloseArea();}else{this.ClipTickClient(this.ChartFrame.IsHScreen);this.DrawTick();}this.Canvas.restore();return;}this.Canvas.save();this.ClipClient(this.ChartFrame.IsHScreen);if(this.DrawType==1){this.DrawCloseLine();this.Canvas.restore();if(this.PriceGap.Enable)this.DrawPriceGap();return;}else if(this.DrawType==2){this.DrawAKLine();}else if(this.DrawType==4){this.DrawCloseArea();}else if(this.DrawType==5){this.DrawOrderFlow();}else if(this.DrawType==7){this.DrawOrderFlow_Style2();}else if(this.DrawType==8){this.DrawOrderFlow_Style3();}else if(this.DrawType==9){this.DrawKBar();}else if(this.DrawType==10){this.DrawRenkoCandle();}else if(this.DrawType==12){this.DrawLineBreak();}else if(this.DrawType==13){this.DrawHighLow();}else if(this.DrawType==14){if(this.FFKChart&&this.FFKChart.Draw){this.FFKChart.Draw(this);}}else if(this.DrawType==15){this.DrawHLCArea();}else if(this.DrawType==17){this.DrawOrderFlow_Style4();}else{this.DrawKBar();}if(this.TradeIcon)this.DrawTradeIcon();else this.DrawTrade();this.Canvas.restore();if(this.PriceGap.Enable)this.DrawPriceGap();if(this.IsShowMaxMinPrice)//标注最大值最小值
3468
- {if(this.ChartFrame.IsHScreen===true)this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);else this.DrawMaxMinPrice(this.PtMax,this.PtMin);}};this.DrawMaxMinPrice=function(ptMax,ptMin){if(ptMax.X==null||ptMax.Y==null||ptMax.Value==null)return;if(ptMin.X==null||ptMin.Y==null||ptMin.Value==null)return;var leftArrow=g_JSChartResource.KLine.MaxMin.LeftArrow;var rightArrow=g_JSChartResource.KLine.MaxMin.RightArrow;var highYOffset=g_JSChartResource.KLine.MaxMin.HighYOffset;var lowYOffset=g_JSChartResource.KLine.MaxMin.LowYOffset;var defaultfloatPrecision=GetfloatPrecision(this.Symbol);this.Canvas.font=this.TextFont;this.Canvas.fillStyle=this.TextColor;var top=this.ChartBorder.GetTopEx();var bottom=this.ChartBorder.GetBottomEx();var ptTop=ptMax;if(this.ChartFrame.CoordinateType==1)//反转坐标
3468
+ {if(this.ChartFrame.IsHScreen===true)this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);else this.DrawMaxMinPrice(this.PtMax,this.PtMin);}if(this.DrawType==14)//自定义图形 标注最大最小值
3469
+ {if(this.FFKChart&&this.FFKChart.DrawMaxMinPrice){this.FFKChart.DrawMaxMinPrice();}}};this.DrawMaxMinPrice=function(ptMax,ptMin){if(ptMax.X==null||ptMax.Y==null||ptMax.Value==null)return;if(ptMin.X==null||ptMin.Y==null||ptMin.Value==null)return;var leftArrow=g_JSChartResource.KLine.MaxMin.LeftArrow;var rightArrow=g_JSChartResource.KLine.MaxMin.RightArrow;var highYOffset=g_JSChartResource.KLine.MaxMin.HighYOffset;var lowYOffset=g_JSChartResource.KLine.MaxMin.LowYOffset;var defaultfloatPrecision=GetfloatPrecision(this.Symbol);this.Canvas.font=this.TextFont;this.Canvas.fillStyle=this.TextColor;var top=this.ChartBorder.GetTopEx();var bottom=this.ChartBorder.GetBottomEx();var ptTop=ptMax;if(this.ChartFrame.CoordinateType==1)//反转坐标
3469
3470
  {if(ptMax.Y<ptMin.Y)ptTop=ptMin;this.Canvas.textBaseline='top';}else{if(ptMax.Y>ptMin.Y)ptTop=ptMin;this.Canvas.textBaseline='bottom';}this.Canvas.textAlign=ptTop.Align;var left=ptTop.Align=='left'?ptTop.X:ptTop.X;if(IFrameSplitOperator.IsNumber(highYOffset))ptTop.Y+=highYOffset;var text=ptTop.Value.toFixed(defaultfloatPrecision);if(ptTop.Align=='left')text=leftArrow+text;else text=text+rightArrow;if(ptTop.Y>top-2){this.Canvas.fillText(text,left,ptTop.Y);this.ChartFrame.ChartKLine.Max={X:left,Y:ptTop.Y,Text:{BaseLine:'bottom'}};}var ptBottom=ptMin;if(this.ChartFrame.CoordinateType==1){if(ptMin.Y>ptMax.Y)ptBottom=ptMax;this.Canvas.textBaseline='bottom';}else{if(ptMax.Y>ptMin.Y)ptTop=ptMin;this.Canvas.textBaseline='top';}this.Canvas.textAlign=ptBottom.Align;var left=ptBottom.Align=='left'?ptBottom.X:ptBottom.X;if(IFrameSplitOperator.IsNumber(lowYOffset))ptBottom.Y+=lowYOffset;var text=ptMin.Value.toFixed(defaultfloatPrecision);if(ptBottom.Align=='left')text=leftArrow+text;else text=text+rightArrow;if(ptBottom.Y<bottom+1){this.Canvas.fillText(text,left,ptBottom.Y);this.ChartFrame.ChartKLine.Min={X:left,Y:ptBottom.Y,Text:{BaseLine:'top'}};}};this.HScreenDrawMaxMinPrice=function(ptMax,ptMin)//横屏模式下显示最大最小值
3470
3471
  {if(ptMax.X==null||ptMax.Y==null||ptMax.Value==null)return;if(ptMin.X==null||ptMin.Y==null||ptMin.Value==null)return;var leftArrow=g_JSChartResource.KLine.MaxMin.LeftArrow;var rightArrow=g_JSChartResource.KLine.MaxMin.RightArrow;var highYOffset=g_JSChartResource.KLine.MaxMin.HighYOffset;var lowYOffset=g_JSChartResource.KLine.MaxMin.LowYOffset;var defaultfloatPrecision=GetfloatPrecision(this.Symbol);var xText=ptMax.Y;var yText=ptMax.X;if(IFrameSplitOperator.IsNumber(highYOffset))xText+=highYOffset;this.Canvas.save();this.Canvas.translate(xText,yText);this.Canvas.rotate(90*Math.PI/180);this.Canvas.font=this.TextFont;this.Canvas.fillStyle=this.TextColor;this.Canvas.textAlign=ptMax.Align;this.Canvas.textBaseline='bottom';var text=ptMax.Value.toFixed(defaultfloatPrecision);if(ptMax.Align=='left')text=leftArrow+text;else text=text+rightArrow;this.Canvas.fillText(text,0,0);this.Canvas.restore();var xText=ptMin.Y;var yText=ptMin.X;if(IFrameSplitOperator.IsNumber(lowYOffset))xText+=lowYOffset;this.Canvas.save();this.Canvas.translate(xText,yText);this.Canvas.rotate(90*Math.PI/180);this.Canvas.font=this.TextFont;this.Canvas.fillStyle=this.TextColor;this.Canvas.textAlign=ptMin.Align;this.Canvas.textBaseline='top';var text=ptMin.Value.toFixed(defaultfloatPrecision);if(ptMin.Align=='left')text=leftArrow+text;else text=text+rightArrow;this.Canvas.fillText(text,0,0);this.Canvas.restore();};//画某一天的信息地雷
3471
3472
  this.DrawInfo=function(item){if(!this.InfoData||this.InfoData.size<=0)return;var isHScreen=this.ChartFrame.IsHScreen===true;var dataWidth=this.ChartFrame.DataWidth;var distanceWidth=this.ChartFrame.DistanceWidth;var bottom=this.ChartBorder.GetBottom();var top=this.ChartBorder.GetTop();var key=''+item.DayData.Date;if(this.Data.DataType==1)key=item.DayData.Date+'-'+item.DayData.Time;if(!this.InfoData.has(key))return;var infoData=this.InfoData.get(key);if(!infoData||infoData.Data.length<=0)return;this.Canvas.restore();this.Canvas.save();this.ClipWindow(isHScreen);var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
@@ -13043,7 +13044,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13043
13044
  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);};}/********************************************************************************
13044
13045
  * 版本信息输出
13045
13046
  *
13046
- */var HQCHART_VERSION="1.1.13131";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13047
+ */var HQCHART_VERSION="1.1.13134";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
13047
13048
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13048
13049
  // BaseIndex:BaseIndex,
13049
13050
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13132",
3
+ "version": "1.1.13135",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -25173,6 +25173,14 @@ function ChartKLine()
25173
25173
  if (this.ChartFrame.IsHScreen===true) this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);
25174
25174
  else this.DrawMaxMinPrice(this.PtMax,this.PtMin);
25175
25175
  }
25176
+
25177
+ if (this.DrawType==14) //自定义图形 标注最大最小值
25178
+ {
25179
+ if (this.FFKChart && this.FFKChart.DrawMaxMinPrice)
25180
+ {
25181
+ this.FFKChart.DrawMaxMinPrice();
25182
+ }
25183
+ }
25176
25184
  }
25177
25185
 
25178
25186
  this.DrawMaxMinPrice=function(ptMax,ptMin)
@@ -29065,6 +29065,14 @@ function ChartKLine()
29065
29065
  if (this.ChartFrame.IsHScreen===true) this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);
29066
29066
  else this.DrawMaxMinPrice(this.PtMax,this.PtMin);
29067
29067
  }
29068
+
29069
+ if (this.DrawType==14) //自定义图形 标注最大最小值
29070
+ {
29071
+ if (this.FFKChart && this.FFKChart.DrawMaxMinPrice)
29072
+ {
29073
+ this.FFKChart.DrawMaxMinPrice();
29074
+ }
29075
+ }
29068
29076
  }
29069
29077
 
29070
29078
  this.DrawMaxMinPrice=function(ptMax,ptMin)
@@ -131580,7 +131588,7 @@ function ScrollBarBGChart()
131580
131588
 
131581
131589
 
131582
131590
 
131583
- var HQCHART_VERSION="1.1.13131";
131591
+ var HQCHART_VERSION="1.1.13134";
131584
131592
 
131585
131593
  function PrintHQChartVersion()
131586
131594
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13131";
8
+ var HQCHART_VERSION="1.1.13134";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -29109,6 +29109,14 @@ function ChartKLine()
29109
29109
  if (this.ChartFrame.IsHScreen===true) this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);
29110
29110
  else this.DrawMaxMinPrice(this.PtMax,this.PtMin);
29111
29111
  }
29112
+
29113
+ if (this.DrawType==14) //自定义图形 标注最大最小值
29114
+ {
29115
+ if (this.FFKChart && this.FFKChart.DrawMaxMinPrice)
29116
+ {
29117
+ this.FFKChart.DrawMaxMinPrice();
29118
+ }
29119
+ }
29112
29120
  }
29113
29121
 
29114
29122
  this.DrawMaxMinPrice=function(ptMax,ptMin)
@@ -134144,7 +134152,7 @@ function HQChartScriptWorker()
134144
134152
 
134145
134153
 
134146
134154
 
134147
- var HQCHART_VERSION="1.1.13131";
134155
+ var HQCHART_VERSION="1.1.13134";
134148
134156
 
134149
134157
  function PrintHQChartVersion()
134150
134158
  {