hqchart 1.1.12780 → 1.1.12782
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
|
@@ -4309,7 +4309,7 @@ if(IFrameSplitOperator.IsNumber(data.ItemSpace))itemSpace=data.ItemSpace;if(IFra
|
|
|
4309
4309
|
var svgItem=item.SVG;if(IFrameSplitOperator.IsNumber(svgItem.YOffset))y+=svgItem.YOffset;if(this.AutoPosition){var pt={X:x,Y:y};this.CalculateShowPosition(item,pt);//重新计算位置
|
|
4310
4310
|
x=pt.X;y=pt.Y;}var fontSVG=svgItem.Size+'px '+this.Family;this.Canvas.font=fontSVG;var halfSize=svgItem.Size/2;var textBaseline='bottom';var rtSVG={Left:x-halfSize,Right:x+halfSize,Top:y-svgItem.Size,Bottom:y,Height:svgItem.Size,Width:svgItem.Size};if(svgItem.VAlign===0){textBaseline="top";rtSVG.Top=y;rtSVG.Bottom=rtSVG.Top+svgItem.Size;}else if(svgItem.VAlign===1){textBaseline='middle';rtSVG.Top=y-svgItem.Size/2;rtSVG.Bottom=rtSVG.Top+svgItem.Size;}if(rtSVG.Top<0){rtSVG.Top=0;rtSVG.Bottom=svgItem.Size;y=rtSVG.Bottom;}this.Canvas.textBaseline=textBaseline;this.Canvas.textAlign='center';this.Canvas.fillStyle=svgItem.Color;this.Canvas.fillText(svgItem.Symbol,x,y);this.AryDrawRect.push({Left:rtSVG.Left,Top:rtSVG.Top,Right:rtSVG.Right,Bottom:rtSVG.Bottom,Type:"SVG",Data:item});if(this.EnableTooltip)this.TooltipRect.push({Rect:rtSVG,Index:i});//文字
|
|
4311
4311
|
if(item.Text&&item.Text.Content&&this.TextFont){var textItem=item.Text;this.Canvas.font=this.TextFont;this.Canvas.fillStyle=textItem.Color;var yText=y;if(IFrameSplitOperator.IsNumber(textItem.YOffset))yText+=textItem.YOffset;this.Canvas.fillText(textItem.Content,x,yText);}if(item.Detail){this.DrawDetail(rtSVG,item.Detail,item);}//连线
|
|
4312
|
-
if(item.Line){var lineItem=item.Line;var price;var kItem=this.Data.Data[item.Index];switch(lineItem.Value){case"C":price=kItem.Close;break;case"H":price=kItem.High;break;case"L":price=kItem.Low;break;}if(!IFrameSplitOperator.IsNumber(price))continue;
|
|
4312
|
+
if(item.Line){var lineItem=item.Line;var price=null,yPrice=null;var kItem=this.Data.Data[item.Index];if(lineItem.Value=="Bottom"){yPrice=bottom;}else if(lineItem.Value=="Top"){yPrice=top;}else{switch(lineItem.Value){case"C":price=kItem.Close;break;case"H":price=kItem.High;break;case"L":price=kItem.Low;break;}if(!IFrameSplitOperator.IsNumber(price))continue;yPrice=this.ChartFrame.GetYFromData(price);}if(yPrice>=rtSVG.Top&&yPrice<=rtSVG.Bottom)continue;var yText;if(yPrice<rtSVG.Top){yText=rtSVG.Top;if(IFrameSplitOperator.IsNumber(lineItem.SVGBlank)){//yPrice+=lineItem.Blank;
|
|
4313
4313
|
yText-=lineItem.SVGBlank;}}else{yText=rtSVG.Bottom;if(IFrameSplitOperator.IsNumber(lineItem.SVGBlank)){//yPrice-=lineItem.Blank;
|
|
4314
4314
|
yText+=lineItem.SVGBlank;}}if(lineItem.Dash)this.Canvas.setLineDash(lineItem.Dash);//虚线
|
|
4315
4315
|
var lineWidth=1*pixelRatio;if(lineItem.Width>0)lineWidth=lineItem.Width*pixelRatio;this.Canvas.lineWidth=lineWidth;//线宽
|
|
@@ -12928,7 +12928,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
12928
12928
|
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);};}/********************************************************************************
|
|
12929
12929
|
* 版本信息输出
|
|
12930
12930
|
*
|
|
12931
|
-
*/var HQCHART_VERSION="1.1.
|
|
12931
|
+
*/var HQCHART_VERSION="1.1.12781";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();//把给外界调用的方法暴露出来
|
|
12932
12932
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
12933
12933
|
// BaseIndex:BaseIndex,
|
|
12934
12934
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -36692,24 +36692,36 @@ function ChartDrawSVG()
|
|
|
36692
36692
|
if (item.Line)
|
|
36693
36693
|
{
|
|
36694
36694
|
var lineItem=item.Line;
|
|
36695
|
-
var price;
|
|
36695
|
+
var price=null, yPrice=null;
|
|
36696
36696
|
var kItem=this.Data.Data[item.Index];
|
|
36697
|
-
|
|
36697
|
+
if (lineItem.Value=="Bottom")
|
|
36698
36698
|
{
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36704
|
-
|
|
36705
|
-
|
|
36706
|
-
|
|
36707
|
-
|
|
36699
|
+
yPrice=bottom;
|
|
36700
|
+
}
|
|
36701
|
+
else if (lineItem.Value=="Top")
|
|
36702
|
+
{
|
|
36703
|
+
yPrice=top;
|
|
36704
|
+
}
|
|
36705
|
+
else
|
|
36706
|
+
{
|
|
36707
|
+
switch(lineItem.Value)
|
|
36708
|
+
{
|
|
36709
|
+
case "C":
|
|
36710
|
+
price=kItem.Close;
|
|
36711
|
+
break;
|
|
36712
|
+
case "H":
|
|
36713
|
+
price=kItem.High;
|
|
36714
|
+
break;
|
|
36715
|
+
case "L":
|
|
36716
|
+
price=kItem.Low;
|
|
36717
|
+
break;
|
|
36718
|
+
}
|
|
36719
|
+
|
|
36720
|
+
if (!IFrameSplitOperator.IsNumber(price)) continue;
|
|
36721
|
+
|
|
36722
|
+
yPrice=this.ChartFrame.GetYFromData(price);
|
|
36708
36723
|
}
|
|
36709
|
-
|
|
36710
|
-
if (!IFrameSplitOperator.IsNumber(price)) continue;
|
|
36711
36724
|
|
|
36712
|
-
var yPrice=this.ChartFrame.GetYFromData(price);
|
|
36713
36725
|
if (yPrice>=rtSVG.Top && yPrice<=rtSVG.Bottom) continue;
|
|
36714
36726
|
|
|
36715
36727
|
var yText;
|
|
@@ -40836,24 +40836,36 @@ function ChartDrawSVG()
|
|
|
40836
40836
|
if (item.Line)
|
|
40837
40837
|
{
|
|
40838
40838
|
var lineItem=item.Line;
|
|
40839
|
-
var price;
|
|
40839
|
+
var price=null, yPrice=null;
|
|
40840
40840
|
var kItem=this.Data.Data[item.Index];
|
|
40841
|
-
|
|
40841
|
+
if (lineItem.Value=="Bottom")
|
|
40842
40842
|
{
|
|
40843
|
-
|
|
40844
|
-
|
|
40845
|
-
|
|
40846
|
-
|
|
40847
|
-
|
|
40848
|
-
|
|
40849
|
-
|
|
40850
|
-
|
|
40851
|
-
|
|
40843
|
+
yPrice=bottom;
|
|
40844
|
+
}
|
|
40845
|
+
else if (lineItem.Value=="Top")
|
|
40846
|
+
{
|
|
40847
|
+
yPrice=top;
|
|
40848
|
+
}
|
|
40849
|
+
else
|
|
40850
|
+
{
|
|
40851
|
+
switch(lineItem.Value)
|
|
40852
|
+
{
|
|
40853
|
+
case "C":
|
|
40854
|
+
price=kItem.Close;
|
|
40855
|
+
break;
|
|
40856
|
+
case "H":
|
|
40857
|
+
price=kItem.High;
|
|
40858
|
+
break;
|
|
40859
|
+
case "L":
|
|
40860
|
+
price=kItem.Low;
|
|
40861
|
+
break;
|
|
40862
|
+
}
|
|
40863
|
+
|
|
40864
|
+
if (!IFrameSplitOperator.IsNumber(price)) continue;
|
|
40865
|
+
|
|
40866
|
+
yPrice=this.ChartFrame.GetYFromData(price);
|
|
40852
40867
|
}
|
|
40853
|
-
|
|
40854
|
-
if (!IFrameSplitOperator.IsNumber(price)) continue;
|
|
40855
40868
|
|
|
40856
|
-
var yPrice=this.ChartFrame.GetYFromData(price);
|
|
40857
40869
|
if (yPrice>=rtSVG.Top && yPrice<=rtSVG.Bottom) continue;
|
|
40858
40870
|
|
|
40859
40871
|
var yText;
|
|
@@ -131387,7 +131399,7 @@ function ScrollBarBGChart()
|
|
|
131387
131399
|
|
|
131388
131400
|
|
|
131389
131401
|
|
|
131390
|
-
var HQCHART_VERSION="1.1.
|
|
131402
|
+
var HQCHART_VERSION="1.1.12781";
|
|
131391
131403
|
|
|
131392
131404
|
function PrintHQChartVersion()
|
|
131393
131405
|
{
|
|
@@ -40880,24 +40880,36 @@ function ChartDrawSVG()
|
|
|
40880
40880
|
if (item.Line)
|
|
40881
40881
|
{
|
|
40882
40882
|
var lineItem=item.Line;
|
|
40883
|
-
var price;
|
|
40883
|
+
var price=null, yPrice=null;
|
|
40884
40884
|
var kItem=this.Data.Data[item.Index];
|
|
40885
|
-
|
|
40885
|
+
if (lineItem.Value=="Bottom")
|
|
40886
40886
|
{
|
|
40887
|
-
|
|
40888
|
-
|
|
40889
|
-
|
|
40890
|
-
|
|
40891
|
-
|
|
40892
|
-
|
|
40893
|
-
|
|
40894
|
-
|
|
40895
|
-
|
|
40887
|
+
yPrice=bottom;
|
|
40888
|
+
}
|
|
40889
|
+
else if (lineItem.Value=="Top")
|
|
40890
|
+
{
|
|
40891
|
+
yPrice=top;
|
|
40892
|
+
}
|
|
40893
|
+
else
|
|
40894
|
+
{
|
|
40895
|
+
switch(lineItem.Value)
|
|
40896
|
+
{
|
|
40897
|
+
case "C":
|
|
40898
|
+
price=kItem.Close;
|
|
40899
|
+
break;
|
|
40900
|
+
case "H":
|
|
40901
|
+
price=kItem.High;
|
|
40902
|
+
break;
|
|
40903
|
+
case "L":
|
|
40904
|
+
price=kItem.Low;
|
|
40905
|
+
break;
|
|
40906
|
+
}
|
|
40907
|
+
|
|
40908
|
+
if (!IFrameSplitOperator.IsNumber(price)) continue;
|
|
40909
|
+
|
|
40910
|
+
yPrice=this.ChartFrame.GetYFromData(price);
|
|
40896
40911
|
}
|
|
40897
|
-
|
|
40898
|
-
if (!IFrameSplitOperator.IsNumber(price)) continue;
|
|
40899
40912
|
|
|
40900
|
-
var yPrice=this.ChartFrame.GetYFromData(price);
|
|
40901
40913
|
if (yPrice>=rtSVG.Top && yPrice<=rtSVG.Bottom) continue;
|
|
40902
40914
|
|
|
40903
40915
|
var yText;
|
|
@@ -131545,7 +131557,7 @@ function HQChartScriptWorker()
|
|
|
131545
131557
|
|
|
131546
131558
|
|
|
131547
131559
|
|
|
131548
|
-
var HQCHART_VERSION="1.1.
|
|
131560
|
+
var HQCHART_VERSION="1.1.12781";
|
|
131549
131561
|
|
|
131550
131562
|
function PrintHQChartVersion()
|
|
131551
131563
|
{
|