hqchart 1.1.12870 → 1.1.12875

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.
@@ -3392,7 +3392,7 @@ else this.Canvas.fillRect(ToFixedRect(y),ToFixedRect(left),ToFixedRect(yClose-y)
3392
3392
  }else{if(drawType==3)//空心柱
3393
3393
  {this.Canvas.beginPath();this.Canvas.rect(ToFixedPoint(left),ToFixedPoint(y),ToFixedRect(dataWidth),ToFixedRect(yOpen-y));this.Canvas.stroke();}else{this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(Math.min(y,yOpen)),ToFixedRect(dataWidth),ToFixedRect(Math.abs(yOpen-y)));}}}if(data.Open>data.Low)//下影线
3394
3394
  {this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(ToFixedPoint(drawType==3?Math.min(yClose,yOpen):y),ToFixedPoint(x));this.Canvas.lineTo(ToFixedPoint(yLow),ToFixedPoint(x));}else{this.Canvas.moveTo(ToFixedPoint(x),ToFixedPoint(drawType==3?Math.max(yClose,yOpen):y));this.Canvas.lineTo(ToFixedPoint(x),ToFixedPoint(yLow));}this.Canvas.stroke();}}else{this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(yHigh,ToFixedPoint(x));this.Canvas.lineTo(yLow,ToFixedPoint(x));}else{this.Canvas.moveTo(ToFixedPoint(x),yHigh);this.Canvas.lineTo(ToFixedPoint(x),yLow);}this.Canvas.strokeStyle=barColor;this.Canvas.stroke();}};//绘制自定义K线
3395
- this.DrawColorKBar=function(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen){if(Math.abs(yClose-y)<1)this.DrawColorKBar_Line(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen);else if(colorData.Border||colorData.Type===0)this.DrawColorKBar_Border(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen);else this.DrawColorKBar_NoBorder(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen);};//带边框柱子
3395
+ this.DrawColorKBar=function(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen){if(Math.abs(yClose-yOpen)<1)this.DrawColorKBar_Line(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen);else if(colorData.Border||colorData.Type===0)this.DrawColorKBar_Border(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen);else this.DrawColorKBar_NoBorder(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen);};//带边框柱子
3396
3396
  this.DrawColorKBar_Border=function(data,colorData,dataWidth,x,y,left,right,yLow,yHigh,yOpen,yClose,isHScreen){if(dataWidth>=4){if(dataWidth%2!=0)dataWidth-=1;var topPrice=Math.max(data.Close,data.Open);var bottomPrice=Math.min(data.Close,data.Open);if(isHScreen){var yBarTop=Math.max(yClose,yOpen);var yBarBottom=Math.min(yClose,yOpen);}else{var yBarTop=Math.min(yClose,yOpen);var yBarBottom=Math.max(yClose,yOpen);}var yBarHeight=Math.abs(yClose-yOpen);//上影线
3397
3397
  if(data.High>topPrice&&colorData.Line){this.Canvas.strokeStyle=colorData.Line.Color;this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(ToFixedPoint(yHigh),ToFixedPoint(x));this.Canvas.lineTo(ToFixedPoint(yBarTop),ToFixedPoint(x));}else{var xFixed=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xFixed),ToFixedPoint(yHigh));this.Canvas.lineTo(ToFixedPoint(xFixed),ToFixedPoint(yBarTop));}this.Canvas.stroke();}//下影线
3398
3398
  if(bottomPrice>data.Low&&colorData.Line){this.Canvas.strokeStyle=colorData.Line.Color;this.Canvas.beginPath();if(isHScreen){this.Canvas.moveTo(ToFixedPoint(yBarBottom),ToFixedPoint(x));this.Canvas.lineTo(ToFixedPoint(yLow),ToFixedPoint(x));}else{var xFixed=left+dataWidth/2;this.Canvas.moveTo(ToFixedPoint(xFixed),ToFixedPoint(yBarBottom));this.Canvas.lineTo(ToFixedPoint(xFixed),ToFixedPoint(yLow));}this.Canvas.stroke();}//中心柱子
@@ -13033,7 +13033,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13033
13033
  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);};}/********************************************************************************
13034
13034
  * 版本信息输出
13035
13035
  *
13036
- */var HQCHART_VERSION="1.1.12869";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();//把给外界调用的方法暴露出来
13036
+ */var HQCHART_VERSION="1.1.12874";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();//把给外界调用的方法暴露出来
13037
13037
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13038
13038
  // BaseIndex:BaseIndex,
13039
13039
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.12870",
3
+ "version": "1.1.12875",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -23540,7 +23540,7 @@ function ChartKLine()
23540
23540
  //绘制自定义K线
23541
23541
  this.DrawColorKBar=function(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen)
23542
23542
  {
23543
- if (Math.abs(yClose-y)<1)
23543
+ if (Math.abs(yClose-yOpen)<1)
23544
23544
  this.DrawColorKBar_Line(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen);
23545
23545
  else if (colorData.Border || colorData.Type===0)
23546
23546
  this.DrawColorKBar_Border(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen);
@@ -27707,7 +27707,7 @@ function ChartKLine()
27707
27707
  //绘制自定义K线
27708
27708
  this.DrawColorKBar=function(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen)
27709
27709
  {
27710
- if (Math.abs(yClose-y)<1)
27710
+ if (Math.abs(yClose-yOpen)<1)
27711
27711
  this.DrawColorKBar_Line(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen);
27712
27712
  else if (colorData.Border || colorData.Type===0)
27713
27713
  this.DrawColorKBar_Border(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen);
@@ -132046,7 +132046,7 @@ function ScrollBarBGChart()
132046
132046
 
132047
132047
 
132048
132048
 
132049
- var HQCHART_VERSION="1.1.12869";
132049
+ var HQCHART_VERSION="1.1.12874";
132050
132050
 
132051
132051
  function PrintHQChartVersion()
132052
132052
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12869";
8
+ var HQCHART_VERSION="1.1.12874";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -27751,7 +27751,7 @@ function ChartKLine()
27751
27751
  //绘制自定义K线
27752
27752
  this.DrawColorKBar=function(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen)
27753
27753
  {
27754
- if (Math.abs(yClose-y)<1)
27754
+ if (Math.abs(yClose-yOpen)<1)
27755
27755
  this.DrawColorKBar_Line(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen);
27756
27756
  else if (colorData.Border || colorData.Type===0)
27757
27757
  this.DrawColorKBar_Border(data, colorData, dataWidth, x, y, left, right, yLow, yHigh, yOpen, yClose, isHScreen);
@@ -132204,7 +132204,7 @@ function HQChartScriptWorker()
132204
132204
 
132205
132205
 
132206
132206
 
132207
- var HQCHART_VERSION="1.1.12869";
132207
+ var HQCHART_VERSION="1.1.12874";
132208
132208
 
132209
132209
  function PrintHQChartVersion()
132210
132210
  {