hqchart 1.1.14675 → 1.1.14683
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 +18 -15
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +25 -11
- package/src/jscommon/umychart.complier.js +41 -14
- package/src/jscommon/umychart.js +79 -51
- package/src/jscommon/umychart.testdata.js +25 -11
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +121 -66
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +25 -11
- package/src/jscommon/umychart.vue/umychart.vue.js +121 -66
|
@@ -39116,6 +39116,32 @@ function ChartIndexTitle()
|
|
|
39116
39116
|
delete this.newMethod;
|
|
39117
39117
|
|
|
39118
39118
|
this.ClassName='ChartIndexTitle'; //类名
|
|
39119
|
+
this.AryTitle=[]; //{ Date, Time, AryText:[ ] }
|
|
39120
|
+
this.MapCache=null; //key=date/date-time value={ Data:[] }
|
|
39121
|
+
|
|
39122
|
+
this.BuildCacheData=function()
|
|
39123
|
+
{
|
|
39124
|
+
var mapData=new Map();
|
|
39125
|
+
this.MapCache=mapData;
|
|
39126
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryTitle)) return;
|
|
39127
|
+
|
|
39128
|
+
for(var i=0;i<this.AryTitle.length;++i)
|
|
39129
|
+
{
|
|
39130
|
+
var item=this.AryTitle[i];
|
|
39131
|
+
var key=this.BuildKey(item);
|
|
39132
|
+
|
|
39133
|
+
mapData.set(key,{ Data:item });
|
|
39134
|
+
}
|
|
39135
|
+
}
|
|
39136
|
+
|
|
39137
|
+
this.GetItem=function(kItem)
|
|
39138
|
+
{
|
|
39139
|
+
if (!this.MapCache || this.MapCache.size<=0) return null;
|
|
39140
|
+
var key=this.BuildKey(kItem);
|
|
39141
|
+
if (!this.MapCache.has(key)) return null;
|
|
39142
|
+
|
|
39143
|
+
return this.MapCache.get(key);
|
|
39144
|
+
}
|
|
39119
39145
|
|
|
39120
39146
|
this.Draw=function()
|
|
39121
39147
|
{
|
|
@@ -60008,44 +60034,39 @@ function ChartCorssCursor()
|
|
|
60008
60034
|
var textSize={ Width:textWidth+4, Height:this.TextHeight, Text:[] };
|
|
60009
60035
|
var buttonData={Y:y, YValue:yValue, FrameID:yValueExtend.FrameID };
|
|
60010
60036
|
|
|
60011
|
-
|
|
60037
|
+
var margin=this.LeftConfig.Margin;
|
|
60038
|
+
var textOffset=this.LeftConfig.TextOffset;
|
|
60039
|
+
var rtBG=null;
|
|
60040
|
+
if (this.Frame.ChartBorder.Left>=30 && this.ShowTextMode.Left==1) //左边
|
|
60012
60041
|
{
|
|
60013
|
-
var margin
|
|
60014
|
-
|
|
60015
|
-
|
|
60016
|
-
|
|
60017
|
-
if (this.ShowTextMode.Left==1)
|
|
60018
|
-
{
|
|
60019
|
-
var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60020
|
-
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
60021
|
-
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60022
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60042
|
+
var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60043
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
60044
|
+
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60045
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60023
60046
|
|
|
60024
|
-
|
|
60025
|
-
{
|
|
60026
|
-
rtBG.Left=0;
|
|
60027
|
-
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60028
|
-
}
|
|
60029
|
-
}
|
|
60030
|
-
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
60047
|
+
if (rtBG.Left<0)
|
|
60031
60048
|
{
|
|
60032
|
-
|
|
60049
|
+
rtBG.Left=0;
|
|
60033
60050
|
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60034
|
-
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60035
|
-
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60036
|
-
}
|
|
60037
|
-
|
|
60038
|
-
if (rtBG)
|
|
60039
|
-
{
|
|
60040
|
-
this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
60041
|
-
this.Canvas.textAlign="left";
|
|
60042
|
-
this.Canvas.textBaseline="bottom";
|
|
60043
|
-
this.Canvas.fillStyle=this.TextColor;
|
|
60044
|
-
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
60045
60051
|
}
|
|
60052
|
+
|
|
60053
|
+
}
|
|
60054
|
+
else if (this.ShowTextMode.Left==2) //在框架内显示
|
|
60055
|
+
{
|
|
60056
|
+
var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
|
|
60057
|
+
rtBG.Right=rtBG.Left+rtBG.Width;
|
|
60058
|
+
rtBG.Top=rtBG.YCenter-rtBG.Height/2;
|
|
60059
|
+
rtBG.Bottom=rtBG.Top+rtBG.Height;
|
|
60046
60060
|
}
|
|
60047
60061
|
|
|
60048
|
-
|
|
60062
|
+
if (rtBG)
|
|
60063
|
+
{
|
|
60064
|
+
this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
|
|
60065
|
+
this.Canvas.textAlign="left";
|
|
60066
|
+
this.Canvas.textBaseline="bottom";
|
|
60067
|
+
this.Canvas.fillStyle=this.TextColor;
|
|
60068
|
+
this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
|
|
60069
|
+
}
|
|
60049
60070
|
|
|
60050
60071
|
var complexText=
|
|
60051
60072
|
{
|
|
@@ -60235,7 +60256,7 @@ function ChartCorssCursor()
|
|
|
60235
60256
|
this.Canvas.textBaseline="bottom";
|
|
60236
60257
|
this.Canvas.fillStyle=this.TextColor;
|
|
60237
60258
|
this.Canvas.fillText(text,rtBG.Left+textOffset.X,rtBG.Bottom+textOffset.Y,textWidth);
|
|
60238
|
-
|
|
60259
|
+
}
|
|
60239
60260
|
}
|
|
60240
60261
|
|
|
60241
60262
|
//子坐标Y轴
|
|
@@ -64210,33 +64231,40 @@ function DynamicChartTitlePainting()
|
|
|
64210
64231
|
return aryText;
|
|
64211
64232
|
}
|
|
64212
64233
|
|
|
64213
|
-
this.FormatIndexTitle=function(
|
|
64234
|
+
this.FormatIndexTitle=function(kItem, dataInfo)
|
|
64214
64235
|
{
|
|
64215
|
-
|
|
64236
|
+
var result=null;
|
|
64237
|
+
var aryText=[];
|
|
64238
|
+
if (dataInfo.Name)
|
|
64239
|
+
{
|
|
64240
|
+
aryText.push({ Text:dataInfo.Name, Color:dataInfo.Color});
|
|
64241
|
+
result={ Text:null, ArrayText:aryText };
|
|
64242
|
+
}
|
|
64216
64243
|
|
|
64217
|
-
if (
|
|
64244
|
+
if (!kItem) return result;
|
|
64245
|
+
if (!dataInfo.Chart) return result;
|
|
64246
|
+
|
|
64247
|
+
var titleItem=dataInfo.Chart.GetItem(kItem);
|
|
64248
|
+
if (!titleItem || !titleItem.Data) return result;
|
|
64249
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(titleItem.Data.AryText)) return result;
|
|
64218
64250
|
|
|
64219
|
-
if (
|
|
64251
|
+
if (!result) result={ Text:null, ArrayText:aryText };
|
|
64252
|
+
|
|
64253
|
+
for(var i=0;i<titleItem.Data.AryText.length;++i)
|
|
64220
64254
|
{
|
|
64221
|
-
var
|
|
64222
|
-
|
|
64223
|
-
{
|
|
64224
|
-
var item=value[i];
|
|
64225
|
-
if (!item) continue;
|
|
64226
|
-
|
|
64227
|
-
var textItem={ Name:null, Text:null };
|
|
64228
|
-
if (item.Name) textItem.Name=item.Name;
|
|
64229
|
-
if (item.Text) textItem.Text=item.Text;
|
|
64230
|
-
if (item.Color) textItem.Color=item.Color;
|
|
64231
|
-
if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
|
|
64255
|
+
var item=titleItem.Data.AryText[i];
|
|
64256
|
+
if (!item) continue;
|
|
64232
64257
|
|
|
64233
|
-
|
|
64234
|
-
|
|
64258
|
+
var textItem={ Name:null, Text:null };
|
|
64259
|
+
if (item.Name) textItem.Name=item.Name;
|
|
64260
|
+
if (item.Text) textItem.Text=item.Text;
|
|
64261
|
+
if (item.Color) textItem.Color=item.Color;
|
|
64262
|
+
if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
|
|
64235
64263
|
|
|
64236
|
-
|
|
64264
|
+
aryText.push(textItem);
|
|
64237
64265
|
}
|
|
64238
64266
|
|
|
64239
|
-
return
|
|
64267
|
+
return result;
|
|
64240
64268
|
}
|
|
64241
64269
|
|
|
64242
64270
|
this.GetColor=function(price,yClose)
|
|
@@ -125773,13 +125801,16 @@ function ScriptIndex(name,script,args,option)
|
|
|
125773
125801
|
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
125774
125802
|
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
125775
125803
|
chart.Identify=this.Guid;
|
|
125804
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
125776
125805
|
if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
|
|
125777
125806
|
else chart.Color=this.GetDefaultColor(id);
|
|
125778
|
-
chart.
|
|
125807
|
+
chart.AryTitle=varItem.Draw.DrawData.AryTitle;
|
|
125808
|
+
chart.BuildCacheData();
|
|
125779
125809
|
|
|
125780
125810
|
var titleIndex=windowIndex+1;
|
|
125781
125811
|
var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
|
|
125782
125812
|
titleData.DataType="ChartIndexTitle";
|
|
125813
|
+
titleData.Chart=chart;
|
|
125783
125814
|
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
125784
125815
|
|
|
125785
125816
|
this.SetChartIndexName(chart);
|
|
@@ -127597,6 +127628,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
127597
127628
|
case "DRAWSVG":
|
|
127598
127629
|
this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
|
|
127599
127630
|
break;
|
|
127631
|
+
case "DRAWTITLE":
|
|
127632
|
+
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
127633
|
+
break;
|
|
127600
127634
|
case "MULTI_HTMLDOM":
|
|
127601
127635
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
127602
127636
|
break;
|
|
@@ -127690,11 +127724,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
127690
127724
|
{
|
|
127691
127725
|
this.CreateArea(hqChart,windowIndex,item,i);
|
|
127692
127726
|
}
|
|
127693
|
-
|
|
127694
|
-
{
|
|
127695
|
-
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
127696
|
-
}
|
|
127697
|
-
|
|
127727
|
+
|
|
127698
127728
|
var titlePaint=hqChart.TitlePaint[windowIndex+1];
|
|
127699
127729
|
if (titlePaint && titlePaint.Data && i<titlePaint.Data.length) //设置标题数值 小数位数和格式
|
|
127700
127730
|
{
|
|
@@ -127971,6 +128001,9 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
127971
128001
|
case "DRAWSVG":
|
|
127972
128002
|
this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
|
|
127973
128003
|
break;
|
|
128004
|
+
case "DRAWTITLE":
|
|
128005
|
+
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
128006
|
+
break;
|
|
127974
128007
|
case "MULTI_HTMLDOM":
|
|
127975
128008
|
this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
|
|
127976
128009
|
break;
|
|
@@ -128044,11 +128077,6 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
128044
128077
|
{
|
|
128045
128078
|
this.CreateLine(hqChart,windowIndex,item,i, item.Type);
|
|
128046
128079
|
}
|
|
128047
|
-
else if (item.Type==10)
|
|
128048
|
-
{
|
|
128049
|
-
this.CreateTitle(hqChart,windowIndex,item,i);
|
|
128050
|
-
}
|
|
128051
|
-
|
|
128052
128080
|
|
|
128053
128081
|
|
|
128054
128082
|
var titleData=titleInfo.Data[i];
|
|
@@ -128633,22 +128661,25 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
128633
128661
|
{
|
|
128634
128662
|
var overlayIndex=this.OverlayIndex;
|
|
128635
128663
|
var frame=overlayIndex.Frame;
|
|
128636
|
-
|
|
128664
|
+
var chart=new ChartIndexTitle();
|
|
128637
128665
|
chart.Canvas=hqChart.Canvas;
|
|
128638
128666
|
|
|
128639
128667
|
chart.Name=varItem.Name;
|
|
128640
128668
|
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
128641
128669
|
chart.ChartFrame=frame.Frame;
|
|
128642
128670
|
chart.Identify=overlayIndex.Identify;
|
|
128643
|
-
|
|
128671
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
128672
|
+
|
|
128644
128673
|
if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
|
|
128645
128674
|
else chart.Color=this.GetDefaultColor(id);
|
|
128646
|
-
chart.
|
|
128675
|
+
chart.AryTitle=varItem.Draw.DrawData.AryTitle;
|
|
128676
|
+
chart.BuildCacheData();
|
|
128647
128677
|
|
|
128648
128678
|
var titleIndex=windowIndex+1;
|
|
128649
128679
|
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
128650
128680
|
var titleData=new DynamicTitleData(chart.Data,chart.Name,chart.Color);
|
|
128651
128681
|
titleData.DataType="ChartIndexTitle";
|
|
128682
|
+
titleData.Chart=chart;
|
|
128652
128683
|
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
|
|
128653
128684
|
|
|
128654
128685
|
this.SetChartIndexName(chart);
|
|
@@ -130264,6 +130295,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
130264
130295
|
|
|
130265
130296
|
result.push(outVarItem);
|
|
130266
130297
|
}
|
|
130298
|
+
else if (draw.DrawType=="DRAWTITLE")
|
|
130299
|
+
{
|
|
130300
|
+
drawItem.Name=draw.Name;
|
|
130301
|
+
drawItem.Type=draw.Type;
|
|
130302
|
+
|
|
130303
|
+
drawItem.DrawType=draw.DrawType;
|
|
130304
|
+
drawItem.DrawData=draw.DrawData;
|
|
130305
|
+
|
|
130306
|
+
outVarItem.Draw=drawItem;
|
|
130307
|
+
|
|
130308
|
+
result.push(outVarItem);
|
|
130309
|
+
}
|
|
130267
130310
|
else if (draw.DrawType=="MULTI_HTMLDOM") //外部自己创建dom
|
|
130268
130311
|
{
|
|
130269
130312
|
drawItem.Text=draw.Text;
|
|
@@ -130822,6 +130865,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
130822
130865
|
|
|
130823
130866
|
result.push(outVarItem);
|
|
130824
130867
|
}
|
|
130868
|
+
else if (draw.DrawType=="DRAWTITLE")
|
|
130869
|
+
{
|
|
130870
|
+
drawItem.Name=draw.Name;
|
|
130871
|
+
drawItem.Type=draw.Type;
|
|
130872
|
+
|
|
130873
|
+
drawItem.DrawType=draw.DrawType;
|
|
130874
|
+
drawItem.DrawData=draw.DrawData;
|
|
130875
|
+
|
|
130876
|
+
outVarItem.Draw=drawItem;
|
|
130877
|
+
|
|
130878
|
+
result.push(outVarItem);
|
|
130879
|
+
}
|
|
130825
130880
|
else
|
|
130826
130881
|
{
|
|
130827
130882
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -157940,7 +157995,7 @@ function HQChartScriptWorker()
|
|
|
157940
157995
|
|
|
157941
157996
|
|
|
157942
157997
|
|
|
157943
|
-
var HQCHART_VERSION="1.1.
|
|
157998
|
+
var HQCHART_VERSION="1.1.14682";
|
|
157944
157999
|
|
|
157945
158000
|
function PrintHQChartVersion()
|
|
157946
158001
|
{
|