hqchart 1.1.12720 → 1.1.12723

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.
@@ -4083,7 +4083,9 @@ var drawCount=0;var pointCount=0;this.Canvas.save();if(IFrameSplitOperator.IsPlu
4083
4083
  {if(isHScreen){this.Canvas.lineTo(left,x);this.Canvas.lineTo(left,ptFirst.X);this.SetFillStyle(this.AreaColor,this.ChartBorder.GetRightEx(),bottom,this.ChartBorder.GetLeftEx(),bottom);}else{this.Canvas.lineTo(x,bottom);this.Canvas.lineTo(ptFirst.X,bottom);this.SetFillStyle(this.AreaColor,left,this.ChartBorder.GetTopEx(),left,bottom);}this.Canvas.fill();}pointCount=0;drawCount=0;}}if(drawCount>0){if(drawCount==1)//如果线段只有1个点 线段无法画出来 直接画点
4084
4084
  {this.Canvas.beginPath();if(isHScreen)this.Canvas.arc(ptFirst.Y,ptFirst.X,1,0,360,false);else this.Canvas.arc(ptFirst.X,ptFirst.Y,1,0,360,false);this.Canvas.closePath();this.Canvas.fillStyle=this.Color;this.Canvas.fill();}else{this.Canvas.stroke();if(this.IsDrawArea)//画面积
4085
4085
  {if(isHScreen){this.Canvas.lineTo(left,x);this.Canvas.lineTo(left,ptFirst.X);this.SetFillStyle(this.AreaColor,this.ChartBorder.GetRightEx(),bottom,this.ChartBorder.GetLeftEx(),bottom);}else{this.Canvas.lineTo(x,bottom);this.Canvas.lineTo(ptFirst.X,bottom);this.SetFillStyle(this.AreaColor,left,this.ChartBorder.GetTopEx(),left,bottom);}this.Canvas.fill();}}}this.Canvas.restore();this.DrawColorLine();this.DrawAfterClose();//收盘集合竞价
4086
- this.DrawMultiDayAfterClose();if(this.GetEventCallback){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_MINUTE_LAST_POINT);if(event){var data={LastPoint:{X:this.LastPoint.X,Y:this.LastPoint.Y},Price:this.LastPoint.Price,Data:this.LastPoint.Data};event.Callback(event,data,this);}}};//画领先指标
4086
+ this.DrawMultiDayAfterClose();if(this.GetEventCallback){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_MINUTE_LAST_POINT);if(event){var pixelRatio=GetDevicePixelRatio();var data={InterLastPoint:{X:this.LastPoint.X,Y:this.LastPoint.Y},//内部点 给画布用
4087
+ LastPoint:{X:this.LastPoint.X/pixelRatio,Y:this.LastPoint.Y/pixelRatio},//外部点 给DOM用
4088
+ Price:this.LastPoint.Price,Data:this.LastPoint.Data,PixelRatio:pixelRatio};event.Callback(event,data,this);}}};//画领先指标
4087
4089
  this.DrawLead=function(){if(!this.LeadData)return;var isHScreen=this.ChartFrame.IsHScreen===true;//if (isHScreen) return;
4088
4090
  //var dataWidth=this.ChartFrame.DataWidth;
4089
4091
  //var distanceWidth=this.ChartFrame.DistanceWidth;
@@ -12893,7 +12895,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
12893
12895
  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);};}/********************************************************************************
12894
12896
  * 版本信息输出
12895
12897
  *
12896
- */var HQCHART_VERSION="1.1.12718";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();//把给外界调用的方法暴露出来
12898
+ */var HQCHART_VERSION="1.1.12722";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();//把给外界调用的方法暴露出来
12897
12899
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
12898
12900
  // BaseIndex:BaseIndex,
12899
12901
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.12720",
3
+ "version": "1.1.12723",
4
4
  "description": "stock chart",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -36082,7 +36082,14 @@ function ChartMinutePriceLine()
36082
36082
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_MINUTE_LAST_POINT);
36083
36083
  if (event)
36084
36084
  {
36085
- var data={ LastPoint:{X:this.LastPoint.X, Y:this.LastPoint.Y}, Price:this.LastPoint.Price, Data:this.LastPoint.Data };
36085
+ var pixelRatio=GetDevicePixelRatio();
36086
+ var data=
36087
+ {
36088
+ InterLastPoint:{X:this.LastPoint.X, Y:this.LastPoint.Y}, //内部点 给画布用
36089
+ LastPoint:{X:this.LastPoint.X/pixelRatio, Y:this.LastPoint.Y/pixelRatio}, //外部点 给DOM用
36090
+ Price:this.LastPoint.Price, Data:this.LastPoint.Data,
36091
+ PixelRatio:pixelRatio,
36092
+ };
36086
36093
  event.Callback(event,data,this);
36087
36094
  }
36088
36095
  }
@@ -130952,7 +130959,7 @@ function ScrollBarBGChart()
130952
130959
 
130953
130960
 
130954
130961
 
130955
- var HQCHART_VERSION="1.1.12718";
130962
+ var HQCHART_VERSION="1.1.12722";
130956
130963
 
130957
130964
  function PrintHQChartVersion()
130958
130965
  {
@@ -36126,7 +36126,14 @@ function ChartMinutePriceLine()
36126
36126
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_MINUTE_LAST_POINT);
36127
36127
  if (event)
36128
36128
  {
36129
- var data={ LastPoint:{X:this.LastPoint.X, Y:this.LastPoint.Y}, Price:this.LastPoint.Price, Data:this.LastPoint.Data };
36129
+ var pixelRatio=GetDevicePixelRatio();
36130
+ var data=
36131
+ {
36132
+ InterLastPoint:{X:this.LastPoint.X, Y:this.LastPoint.Y}, //内部点 给画布用
36133
+ LastPoint:{X:this.LastPoint.X/pixelRatio, Y:this.LastPoint.Y/pixelRatio}, //外部点 给DOM用
36134
+ Price:this.LastPoint.Price, Data:this.LastPoint.Data,
36135
+ PixelRatio:pixelRatio,
36136
+ };
36130
36137
  event.Callback(event,data,this);
36131
36138
  }
36132
36139
  }
@@ -131110,7 +131117,7 @@ function HQChartScriptWorker()
131110
131117
 
131111
131118
 
131112
131119
 
131113
- var HQCHART_VERSION="1.1.12718";
131120
+ var HQCHART_VERSION="1.1.12722";
131114
131121
 
131115
131122
  function PrintHQChartVersion()
131116
131123
  {