hqchart 1.1.12723 → 1.1.12725
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
|
@@ -1346,10 +1346,10 @@ this.CacheCanvasElement=null;if(bCacheCanvas)this.CacheCanvasElement=document.cr
|
|
|
1346
1346
|
this.ModifyIndexDialog=new ModifyIndexDialog(divElement);this.ChangeIndexDialog=new ChangeIndexDialog(divElement);this.MinuteDialog=new MinuteDialog(divElement);//额外的画布
|
|
1347
1347
|
this.MapExtraCanvasElement=new _map2.default();//key=画布名字, value={ Element:, Canvas:}
|
|
1348
1348
|
this.CreateExtraCanvasElement=function(name,option){if(this.MapExtraCanvasElement.has(name))return this.MapExtraCanvasElement.get(name);var element=document.createElement("canvas");element.className='jschart-drawing-extra';element.id=Guid();if(name==JSChart.CorssCursorCanvasKey)element.setAttribute("tabindex",5);else element.setAttribute("tabindex",1);if(element.style){element.style.outline='none';element.style.position="absolute";element.style.left='0px';element.style.top='0px';element.style["pointer-events"]="none";}if(option){if(IFrameSplitOperator.IsNumber(option.TabIndex))element.setAttribute("tabindex",option.TabIndex);if(IFrameSplitOperator.IsNumber(option.ZIndex))element.style["z-index"]=option.ZIndex;}divElement.appendChild(element);var item={Element:element,Canvas:null};this.MapExtraCanvasElement.set(name,item);};this.GetExtraCanvas=function(name){if(!this.MapExtraCanvasElement.has(name))return null;var item=this.MapExtraCanvasElement.get(name);if(!item.Element)return null;if(!item.Canvas)item.Canvas=item.Element.getContext("2d");return item;};this.OnSize=function(option)//{ Type:1 新版本OnSize Redraw:是否重绘, XYSplit:是否重新计算分割线 }
|
|
1349
|
-
{//画布大小通过div获取
|
|
1350
|
-
var height=parseInt(this.DivElement.style.height.replace("px",""));if(this.ToolElement){//TODO调整工具条大小
|
|
1349
|
+
{//画布大小通过div获取 如果有style里的大小 使用style里的
|
|
1350
|
+
if(this.DivElement.style.height&&this.DivElement.style.width){var height=parseInt(this.DivElement.style.height.replace("px",""));var width=parseInt(this.DivElement.style.width.replace("px",""));}else{var height=this.DivElement.offsetHeight;var width=this.DivElement.offsetWidth;}if(this.ToolElement){//TODO调整工具条大小
|
|
1351
1351
|
height-=this.ToolElement.style.height.replace("px","");//减去工具条的高度
|
|
1352
|
-
}this.CanvasElement.height=height;this.CanvasElement.width=
|
|
1352
|
+
}this.CanvasElement.height=height;this.CanvasElement.width=width;this.CanvasElement.style.width=this.CanvasElement.width+'px';this.CanvasElement.style.height=this.CanvasElement.height+'px';var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
1353
1353
|
this.CanvasElement.height*=pixelTatio;this.CanvasElement.width*=pixelTatio;if(this.OffscreenCanvasElement){this.OffscreenCanvasElement.height=this.CanvasElement.height;this.OffscreenCanvasElement.width=this.CanvasElement.width;}if(this.CacheCanvasElement){this.CacheCanvasElement.height=this.CanvasElement.height;this.CacheCanvasElement.width=this.CanvasElement.width;}var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=(0,_getIterator3.default)(this.MapExtraCanvasElement),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var mapItem=_step.value;var item=mapItem[1];var element=item.Element;if(!element)continue;element.height=this.CanvasElement.height;element.width=this.CanvasElement.width;element.style.width=this.CanvasElement.style.width;element.style.height=this.CanvasElement.style.height;}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}JSConsole.Chart.Log('[JSChart::OnSize] devicePixelRatio='+window.devicePixelRatio+', height='+this.CanvasElement.height+', width='+this.CanvasElement.width);if(option&&option.Redraw==false)return;if(this.JSChartContainer){if(option&&option.XYSplit===true)this.JSChartContainer.ResetFrameXYSplit();if(this.JSChartContainer.OnSize&&option&&option.Type==1){this.JSChartContainer.OnSize();}else{if(this.JSChartContainer.Frame)this.JSChartContainer.Frame.SetSizeChage(true);this.JSChartContainer.Draw();}}};//手机屏需要调整 间距
|
|
1354
1354
|
this.AdjustChartBorder=function(chart){var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
1355
1355
|
chart.Frame.ChartBorder.Left*=pixelTatio;chart.Frame.ChartBorder.Right*=pixelTatio;chart.Frame.ChartBorder.Top*=pixelTatio;chart.Frame.ChartBorder.Bottom*=pixelTatio;if(chart.Frame.AutoLeftBorder){var item=chart.Frame.AutoLeftBorder;if(IFrameSplitOperator.IsNumber(item.MinWidth))item.MinWidth*=pixelTatio;if(IFrameSplitOperator.IsNumber(item.Blank))item.Blank*=pixelTatio;}if(chart.Frame.AutoRightBorder){var item=chart.Frame.AutoRightBorder;if(IFrameSplitOperator.IsNumber(item.MinWidth))item.MinWidth*=pixelTatio;if(IFrameSplitOperator.IsNumber(item.Blank))item.Blank*=pixelTatio;}};this.AdjustTitleHeight=function(chart){var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
@@ -12895,7 +12895,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
12895
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);};}/********************************************************************************
|
|
12896
12896
|
* 版本信息输出
|
|
12897
12897
|
*
|
|
12898
|
-
*/var HQCHART_VERSION="1.1.
|
|
12898
|
+
*/var HQCHART_VERSION="1.1.12724";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();//把给外界调用的方法暴露出来
|
|
12899
12899
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
12900
12900
|
// BaseIndex:BaseIndex,
|
|
12901
12901
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -4251,8 +4251,18 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4251
4251
|
|
|
4252
4252
|
this.OnSize=function(option) //{ Type:1 新版本OnSize Redraw:是否重绘, XYSplit:是否重新计算分割线 }
|
|
4253
4253
|
{
|
|
4254
|
-
//画布大小通过div获取
|
|
4255
|
-
|
|
4254
|
+
//画布大小通过div获取 如果有style里的大小 使用style里的
|
|
4255
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
4256
|
+
{
|
|
4257
|
+
var height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
4258
|
+
var width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
4259
|
+
}
|
|
4260
|
+
else
|
|
4261
|
+
{
|
|
4262
|
+
var height=this.DivElement.offsetHeight;
|
|
4263
|
+
var width=this.DivElement.offsetWidth;
|
|
4264
|
+
}
|
|
4265
|
+
|
|
4256
4266
|
if (this.ToolElement)
|
|
4257
4267
|
{
|
|
4258
4268
|
//TODO调整工具条大小
|
|
@@ -4260,7 +4270,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4260
4270
|
}
|
|
4261
4271
|
|
|
4262
4272
|
this.CanvasElement.height=height;
|
|
4263
|
-
this.CanvasElement.width=
|
|
4273
|
+
this.CanvasElement.width=width;
|
|
4264
4274
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
4265
4275
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
4266
4276
|
|
|
@@ -130959,7 +130969,7 @@ function ScrollBarBGChart()
|
|
|
130959
130969
|
|
|
130960
130970
|
|
|
130961
130971
|
|
|
130962
|
-
var HQCHART_VERSION="1.1.
|
|
130972
|
+
var HQCHART_VERSION="1.1.12724";
|
|
130963
130973
|
|
|
130964
130974
|
function PrintHQChartVersion()
|
|
130965
130975
|
{
|
|
@@ -4295,8 +4295,18 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4295
4295
|
|
|
4296
4296
|
this.OnSize=function(option) //{ Type:1 新版本OnSize Redraw:是否重绘, XYSplit:是否重新计算分割线 }
|
|
4297
4297
|
{
|
|
4298
|
-
//画布大小通过div获取
|
|
4299
|
-
|
|
4298
|
+
//画布大小通过div获取 如果有style里的大小 使用style里的
|
|
4299
|
+
if (this.DivElement.style.height && this.DivElement.style.width)
|
|
4300
|
+
{
|
|
4301
|
+
var height=parseInt(this.DivElement.style.height.replace("px",""));
|
|
4302
|
+
var width=parseInt(this.DivElement.style.width.replace("px",""));
|
|
4303
|
+
}
|
|
4304
|
+
else
|
|
4305
|
+
{
|
|
4306
|
+
var height=this.DivElement.offsetHeight;
|
|
4307
|
+
var width=this.DivElement.offsetWidth;
|
|
4308
|
+
}
|
|
4309
|
+
|
|
4300
4310
|
if (this.ToolElement)
|
|
4301
4311
|
{
|
|
4302
4312
|
//TODO调整工具条大小
|
|
@@ -4304,7 +4314,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4304
4314
|
}
|
|
4305
4315
|
|
|
4306
4316
|
this.CanvasElement.height=height;
|
|
4307
|
-
this.CanvasElement.width=
|
|
4317
|
+
this.CanvasElement.width=width;
|
|
4308
4318
|
this.CanvasElement.style.width=this.CanvasElement.width+'px';
|
|
4309
4319
|
this.CanvasElement.style.height=this.CanvasElement.height+'px';
|
|
4310
4320
|
|
|
@@ -131117,7 +131127,7 @@ function HQChartScriptWorker()
|
|
|
131117
131127
|
|
|
131118
131128
|
|
|
131119
131129
|
|
|
131120
|
-
var HQCHART_VERSION="1.1.
|
|
131130
|
+
var HQCHART_VERSION="1.1.12724";
|
|
131121
131131
|
|
|
131122
131132
|
function PrintHQChartVersion()
|
|
131123
131133
|
{
|