hqchart 1.1.12396 → 1.1.12414
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 +24 -127
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +34 -1
- package/src/jscommon/umychart.js +162 -116
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +197 -118
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +197 -118
- package/src/jscommon/umychart.wechat/umychart.chartpaint.wechat.js +2 -2
- package/src/jscommon/umychart.wechat/umychart.complier.wechat.js +2 -1
- package/src/jscommon/umychart.wechat/umychart.index.wechat.js +29 -0
- package/src/jscommon/umychart.wechat/umychart.version.wechat.js +1 -1
- package/src/jscommon/umychart.wechat/umychart.wechat.3.0.js +30 -0
|
@@ -5064,6 +5064,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5064
5064
|
if(IFrameSplitOperator.IsBool(item.IsTitleShowLatestData)) chart.IsTitleShowLatestData=item.IsTitleShowLatestData;
|
|
5065
5065
|
if(IFrameSplitOperator.IsBool(item.IsAlwaysShowLastData)) chart.TitlePaint[0].IsAlwaysShowLastData=item.IsAlwaysShowLastData;
|
|
5066
5066
|
if(IFrameSplitOperator.IsNumber(item.ShowLastDataFormat)) chart.TitlePaint[0].ShowLastDataFormat=item.ShowLastDataFormat;
|
|
5067
|
+
if (IFrameSplitOperator.IsNumber(item.TitleBaseLine)) chart.TitlePaint[0].TitleBaseLine=item.TitleBaseLine;
|
|
5067
5068
|
if (item.TimeFormat) chart.TitlePaint[0].TimeFormat=item.TimeFormat;
|
|
5068
5069
|
}
|
|
5069
5070
|
|
|
@@ -24638,10 +24639,11 @@ function IChartPainting()
|
|
|
24638
24639
|
if (Array.isArray(color))
|
|
24639
24640
|
{
|
|
24640
24641
|
let gradient = this.Canvas.createLinearGradient(x0, y0, x1, y1);
|
|
24641
|
-
var offset=1/(color.length);
|
|
24642
|
-
for(var i
|
|
24642
|
+
var offset=1/(color.length-1);
|
|
24643
|
+
for(var i=0; i<color.length; ++i)
|
|
24643
24644
|
{
|
|
24644
|
-
|
|
24645
|
+
var value=i*offset;
|
|
24646
|
+
gradient.addColorStop(value, color[i]);
|
|
24645
24647
|
}
|
|
24646
24648
|
this.Canvas.fillStyle=gradient;
|
|
24647
24649
|
}
|
|
@@ -39088,12 +39090,20 @@ function ChartDrawSVG()
|
|
|
39088
39090
|
this.IsDestroy=false; //是否已销毁
|
|
39089
39091
|
this.EnableTooltip=true;
|
|
39090
39092
|
this.TooltipRect=[];
|
|
39093
|
+
this.ExcludeArea=null; //排除区域 { Left, Top, Width, Height, Type:0 }
|
|
39094
|
+
this.AutoPosition=null; //{ Direction:0, MaxYOffset:40 } //自动调整Y轴偏移,防止文字重叠
|
|
39095
|
+
|
|
39096
|
+
this.AryDrawRect=[]; //已经绘制的区域
|
|
39097
|
+
this.AutoYOffset=0;
|
|
39091
39098
|
|
|
39092
39099
|
//this.Data; 存K线数据
|
|
39093
39100
|
|
|
39094
39101
|
this.Draw=function()
|
|
39095
39102
|
{
|
|
39096
39103
|
this.TooltipRect=[];
|
|
39104
|
+
this.AryDrawRect=[];
|
|
39105
|
+
this.AutoYOffset=0;
|
|
39106
|
+
|
|
39097
39107
|
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
39098
39108
|
if (this.IsShowIndexTitleOnly()) return;
|
|
39099
39109
|
if (this.IsHideScriptIndex()) return;
|
|
@@ -39185,6 +39195,145 @@ function ChartDrawSVG()
|
|
|
39185
39195
|
this.Canvas.fillStyle = item.Data.Color;
|
|
39186
39196
|
this.Canvas.fillText(item.Data.Text, item.X, item.Y);
|
|
39187
39197
|
}
|
|
39198
|
+
|
|
39199
|
+
this.AryDrawRect.push( {Left:rtBorder.Left, Top:rtBorder.Top, Right:rtBorder.Right, Bottom:rtBorder.Bottom, Type:"Detail" } );
|
|
39200
|
+
}
|
|
39201
|
+
|
|
39202
|
+
this.GetDetailPosition=function(rtSVG, data)
|
|
39203
|
+
{
|
|
39204
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(data.Content)) return null;
|
|
39205
|
+
|
|
39206
|
+
var lefMargin=2;
|
|
39207
|
+
var rightMargin=2;
|
|
39208
|
+
var itemSpace=2;
|
|
39209
|
+
var rtBorder={ Left:rtSVG.Right, Right:rtSVG.Right, Bottom:rtSVG.Bottom };
|
|
39210
|
+
var rightBorder=0; //右边的边界 0=div的宽度 1=图形框架边框
|
|
39211
|
+
if (IFrameSplitOperator.IsNumber(data.ItemSpace)) itemSpace=data.ItemSpace;
|
|
39212
|
+
if (IFrameSplitOperator.IsNumber(data.YOffset)) rtBorder.Bottom+=data.YOffset;
|
|
39213
|
+
if (IFrameSplitOperator.IsNumber(data.XOffset)) rtBorder.Left+=data.XOffset;
|
|
39214
|
+
|
|
39215
|
+
if (IFrameSplitOperator.IsNumber(data.LeftMargin)) lefMargin=data.LeftMargin;
|
|
39216
|
+
if (IFrameSplitOperator.IsNumber(data.RightMargin)) rightMargin=data.RightMargin;
|
|
39217
|
+
|
|
39218
|
+
if (IFrameSplitOperator.IsNumber(data.RightBorder)) rightBorder=data.RightBorder;
|
|
39219
|
+
|
|
39220
|
+
if (data.Font) this.Canvas.font=data.Font;
|
|
39221
|
+
else this.Canvas.font=this.TextFont;
|
|
39222
|
+
|
|
39223
|
+
var textHeight=this.Canvas.measureText("擎").width+2;
|
|
39224
|
+
rtBorder.Height=textHeight+5;
|
|
39225
|
+
var yText=rtBorder.Bottom-(rtBorder.Height-textHeight)/2;
|
|
39226
|
+
var xText=rtBorder.Left+lefMargin;
|
|
39227
|
+
|
|
39228
|
+
var bFrist=true;
|
|
39229
|
+
for(var i=0;i<data.Content.length;++i)
|
|
39230
|
+
{
|
|
39231
|
+
if (!bFrist) xText+=itemSpace;
|
|
39232
|
+
|
|
39233
|
+
var item=data.Content[i];
|
|
39234
|
+
if (!item.Text) continue;
|
|
39235
|
+
|
|
39236
|
+
var textWidth=this.Canvas.measureText(item.Text).width+2;
|
|
39237
|
+
|
|
39238
|
+
xText+=textWidth;
|
|
39239
|
+
rtBorder.Right=xText;
|
|
39240
|
+
bFrist=false;
|
|
39241
|
+
}
|
|
39242
|
+
|
|
39243
|
+
rtBorder.Right+=rightMargin;
|
|
39244
|
+
rtBorder.Width=rtBorder.Right-rtBorder.Left;
|
|
39245
|
+
rtBorder.Top=rtBorder.Bottom-rtBorder.Height;
|
|
39246
|
+
|
|
39247
|
+
var right=this.ChartBorder.GetChartWidth()-1;
|
|
39248
|
+
if (rightBorder==1) right=this.ChartBorder.GetRight();
|
|
39249
|
+
if (rtBorder.Right>right) //右边显示不下,显示在左边
|
|
39250
|
+
{
|
|
39251
|
+
rtBorder.Right=rtSVG.Left;
|
|
39252
|
+
if (IFrameSplitOperator.IsNumber(data.XOffset)) rtBorder.Right-=data.XOffset;
|
|
39253
|
+
rtBorder.Left=rtBorder.Right-rtBorder.Width;
|
|
39254
|
+
}
|
|
39255
|
+
|
|
39256
|
+
return rtBorder;
|
|
39257
|
+
}
|
|
39258
|
+
|
|
39259
|
+
this.CalculateShowPosition=function(item, pt)
|
|
39260
|
+
{
|
|
39261
|
+
var x=pt.X, y=pt.Y;
|
|
39262
|
+
var svgItem=item.SVG;
|
|
39263
|
+
if (IFrameSplitOperator.IsNumber(svgItem.YOffset)) y+=svgItem.YOffset;
|
|
39264
|
+
var fontSVG=`${svgItem.Size}px ${this.Family}`;
|
|
39265
|
+
this.Canvas.font=fontSVG;
|
|
39266
|
+
var halfSize=svgItem.Size/2;
|
|
39267
|
+
var rtSVG={ Left:x-halfSize, Right:x+halfSize, Top:y-svgItem.Size, Bottom:y, Height:svgItem.Size, Width:svgItem.Size };
|
|
39268
|
+
|
|
39269
|
+
if (svgItem.VAlign===0) //top
|
|
39270
|
+
{
|
|
39271
|
+
rtSVG.Top=y;
|
|
39272
|
+
rtSVG.Bottom=rtSVG.Top+svgItem.Size;
|
|
39273
|
+
}
|
|
39274
|
+
else if (svgItem.VAlign===1) //middle
|
|
39275
|
+
{
|
|
39276
|
+
rtSVG.Top=y-svgItem.Size/2;
|
|
39277
|
+
rtSVG.Bottom=rtSVG.Top+svgItem.Size;
|
|
39278
|
+
}
|
|
39279
|
+
|
|
39280
|
+
if (rtSVG.Top<0)
|
|
39281
|
+
{
|
|
39282
|
+
rtSVG.Top=0;
|
|
39283
|
+
rtSVG.Bottom=svgItem.Size;
|
|
39284
|
+
y=rtSVG.Bottom;
|
|
39285
|
+
}
|
|
39286
|
+
|
|
39287
|
+
var rtContent=null;
|
|
39288
|
+
if (item.Detail)
|
|
39289
|
+
rtContent=this.GetDetailPosition(rtSVG,item.Detail);
|
|
39290
|
+
|
|
39291
|
+
|
|
39292
|
+
var yOffset=0, yMoveStep=-5;
|
|
39293
|
+
for(var i=0;i<20;++i)
|
|
39294
|
+
{
|
|
39295
|
+
if (rtSVG && !rtContent)
|
|
39296
|
+
{
|
|
39297
|
+
if (!this.IsRectOverlap(rtSVG))
|
|
39298
|
+
break;
|
|
39299
|
+
}
|
|
39300
|
+
else if (rtSVG && rtContent)
|
|
39301
|
+
{
|
|
39302
|
+
if (!this.IsRectOverlap(rtSVG) && !this.IsRectOverlap(rtContent))
|
|
39303
|
+
break;
|
|
39304
|
+
}
|
|
39305
|
+
|
|
39306
|
+
yOffset+=yMoveStep;
|
|
39307
|
+
|
|
39308
|
+
if (Math.abs(yOffset)>=this.AutoPosition.MaxYOffset) break;
|
|
39309
|
+
|
|
39310
|
+
rtSVG.Top+=yMoveStep;
|
|
39311
|
+
rtSVG.Bottom+=yMoveStep;
|
|
39312
|
+
if (rtContent)
|
|
39313
|
+
{
|
|
39314
|
+
rtContent.Top+=yMoveStep;
|
|
39315
|
+
rtContent.Bottom+=yMoveStep;
|
|
39316
|
+
}
|
|
39317
|
+
}
|
|
39318
|
+
|
|
39319
|
+
pt.X=x;
|
|
39320
|
+
pt.Y=y+yOffset;
|
|
39321
|
+
|
|
39322
|
+
}
|
|
39323
|
+
|
|
39324
|
+
this.IsRectOverlap=function(rect)
|
|
39325
|
+
{
|
|
39326
|
+
for(var i=0; i<this.AryDrawRect.length; ++i)
|
|
39327
|
+
{
|
|
39328
|
+
var item=this.AryDrawRect[i];
|
|
39329
|
+
if ( ((rect.Left>=item.Left && rect.Left<=item.Right) || (rect.Right>=item.Left && rect.Right<=item.Right)) &&
|
|
39330
|
+
((rect.Top>=item.Top && rect.Top<=item.Bottom) || (rect.Bottom>=item.Top && rect.Bottom<=item.Bottom)) )
|
|
39331
|
+
{
|
|
39332
|
+
return true;
|
|
39333
|
+
}
|
|
39334
|
+
}
|
|
39335
|
+
|
|
39336
|
+
return false;
|
|
39188
39337
|
}
|
|
39189
39338
|
|
|
39190
39339
|
this.DrawSVG=function()
|
|
@@ -39219,6 +39368,14 @@ function ChartDrawSVG()
|
|
|
39219
39368
|
else if (item.Value=="Bottom") y=bottom;
|
|
39220
39369
|
else y=this.ChartFrame.GetYFromData(item.Value);
|
|
39221
39370
|
if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset; //Y轴偏移
|
|
39371
|
+
|
|
39372
|
+
if (this.AutoPosition)
|
|
39373
|
+
{
|
|
39374
|
+
var pt={ X:x, Y:y };
|
|
39375
|
+
this.CalculateShowPosition(item, pt); //重新计算位置
|
|
39376
|
+
x=pt.X;
|
|
39377
|
+
y=pt.Y;
|
|
39378
|
+
}
|
|
39222
39379
|
|
|
39223
39380
|
|
|
39224
39381
|
var svgItem=item.SVG;
|
|
@@ -39253,6 +39410,8 @@ function ChartDrawSVG()
|
|
|
39253
39410
|
this.Canvas.fillStyle = svgItem.Color;
|
|
39254
39411
|
this.Canvas.fillText(svgItem.Symbol, x, y);
|
|
39255
39412
|
|
|
39413
|
+
this.AryDrawRect.push( {Left:rtSVG.Left, Top:rtSVG.Top, Right:rtSVG.Right, Bottom:rtSVG.Bottom, Type:"SVG" } );
|
|
39414
|
+
|
|
39256
39415
|
if (this.EnableTooltip) this.TooltipRect.push({ Rect:rtSVG,Index:i });
|
|
39257
39416
|
|
|
39258
39417
|
//文字
|
|
@@ -52066,119 +52225,6 @@ function DynamicMinuteTitlePainting()
|
|
|
52066
52225
|
}
|
|
52067
52226
|
}
|
|
52068
52227
|
|
|
52069
|
-
/*
|
|
52070
|
-
if(this.IsShowName)
|
|
52071
|
-
{
|
|
52072
|
-
if (!this.DrawText(this.Name,this.NameColor,position)) return;
|
|
52073
|
-
}
|
|
52074
|
-
|
|
52075
|
-
if (this.IsShowDate || this.IsShowTime)
|
|
52076
|
-
{
|
|
52077
|
-
var bShowUpdateTime=false; //是否显示了更新时间
|
|
52078
|
-
if (isLastOne && this.ShowLastDataFormat==1)
|
|
52079
|
-
{
|
|
52080
|
-
if (this.Data && this.Data.UpdateTime && IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Date) && IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Time))
|
|
52081
|
-
{
|
|
52082
|
-
var text=IFrameSplitOperator.FormatTimeString(this.Data.UpdateTime.Time, "HH:MM:SS");
|
|
52083
|
-
if (!this.DrawText(text,this.DateTimeColor,position)) return;
|
|
52084
|
-
bShowUpdateTime=true;
|
|
52085
|
-
}
|
|
52086
|
-
}
|
|
52087
|
-
|
|
52088
|
-
if (!bShowUpdateTime)
|
|
52089
|
-
{
|
|
52090
|
-
if (this.TimeFormat) //指定时间格式
|
|
52091
|
-
{
|
|
52092
|
-
var strDate=null, strTime=null, text=null;
|
|
52093
|
-
if (this.IsShowDate) strDate=IFrameSplitOperator.FormatDateString("YYYY-MM-DD", item.Date);
|
|
52094
|
-
if (this.IsShowTime) strTime=IFrameSplitOperator.FormatTimeString(item.Time,this.TimeFormat);
|
|
52095
|
-
if (strDate && strTime) text=`${strDate} ${strTime}`;
|
|
52096
|
-
else if (strDate) text=strDate;
|
|
52097
|
-
else if (strTime) text=strTime;
|
|
52098
|
-
if (text) if (!this.DrawText(text,this.DateTimeColor,position)) return;
|
|
52099
|
-
}
|
|
52100
|
-
else
|
|
52101
|
-
{
|
|
52102
|
-
var text=IFrameSplitOperator.FormatDateTimeString(item.DateTime,this.IsShowDate, this.IsShowTime);
|
|
52103
|
-
if (!this.DrawText(text,this.DateTimeColor,position)) return;
|
|
52104
|
-
}
|
|
52105
|
-
}
|
|
52106
|
-
}
|
|
52107
|
-
|
|
52108
|
-
var close=item.Close;
|
|
52109
|
-
var increase=item.Increase;
|
|
52110
|
-
var vol=item.Vol;
|
|
52111
|
-
var amount=item.Amount;
|
|
52112
|
-
if (item.Before) //读取盘前数据
|
|
52113
|
-
{
|
|
52114
|
-
close=item.Before.Close;
|
|
52115
|
-
increase=item.Before.Increase;
|
|
52116
|
-
vol=item.Before.Vol;
|
|
52117
|
-
amount=item.Before.Amount;
|
|
52118
|
-
}
|
|
52119
|
-
|
|
52120
|
-
if (close)
|
|
52121
|
-
{
|
|
52122
|
-
var color=this.GetColor(close,this.YClose);
|
|
52123
|
-
var text=g_JSChartLocalization.GetText('MTitle-Close',this.LanguageID)+close.toFixed(defaultfloatPrecision);
|
|
52124
|
-
if (!this.DrawText(text,color,position)) return;
|
|
52125
|
-
}
|
|
52126
|
-
|
|
52127
|
-
if (increase!=null)
|
|
52128
|
-
{
|
|
52129
|
-
var color=this.GetColor(increase,0);
|
|
52130
|
-
var text=g_JSChartLocalization.GetText('MTitle-Increase',this.LanguageID)+increase.toFixed(2)+'%';
|
|
52131
|
-
if (!this.DrawText(text,color,position)) return;
|
|
52132
|
-
}
|
|
52133
|
-
|
|
52134
|
-
var isShowAvPrice=true;
|
|
52135
|
-
var upperSymbol=this.Symbol.toUpperCase();
|
|
52136
|
-
if (MARKET_SUFFIX_NAME.IsET(upperSymbol) && !MARKET_SUFFIX_NAME.IsETShowAvPrice(upperSymbol)) isShowAvPrice=false;
|
|
52137
|
-
else if (MARKET_SUFFIX_NAME.IsShowAvPrice && !MARKET_SUFFIX_NAME.IsShowAvPrice(upperSymbol)) isShowAvPrice=false;
|
|
52138
|
-
|
|
52139
|
-
if (item.AvPrice && isShowAvPrice && this.IsShowAveragePrice)
|
|
52140
|
-
{
|
|
52141
|
-
var color=this.GetColor(item.AvPrice,this.YClose);
|
|
52142
|
-
var text=g_JSChartLocalization.GetText('MTitle-AvPrice',this.LanguageID)+item.AvPrice.toFixed(defaultfloatPrecision);
|
|
52143
|
-
if (!this.DrawText(text,color,position)) return;
|
|
52144
|
-
}
|
|
52145
|
-
|
|
52146
|
-
var text=g_JSChartLocalization.GetText('MTitle-Vol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(vol,2,this.LanguageID);
|
|
52147
|
-
if (!this.DrawText(text,this.VolColor,position)) return;
|
|
52148
|
-
|
|
52149
|
-
if (IFrameSplitOperator.IsNumber(amount))
|
|
52150
|
-
{
|
|
52151
|
-
var text=g_JSChartLocalization.GetText('MTitle-Amount',this.LanguageID)+IFrameSplitOperator.FormatValueString(amount,2,this.LanguageID);
|
|
52152
|
-
if (!this.DrawText(text,this.AmountColor,position)) return;
|
|
52153
|
-
}
|
|
52154
|
-
|
|
52155
|
-
if (IFrameSplitOperator.IsNumber(item.Position))
|
|
52156
|
-
{
|
|
52157
|
-
var text=g_JSChartLocalization.GetText('MTitle-Position',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(item.Position,2,this.LanguageID);
|
|
52158
|
-
if (!this.DrawText(text,this.VolColor,position)) return;
|
|
52159
|
-
}
|
|
52160
|
-
|
|
52161
|
-
if (isLastOne && this.ShowLastDataFormat==0) //显示数据最后的更新时间
|
|
52162
|
-
{
|
|
52163
|
-
if (this.Data && this.Data.UpdateTime && IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Date) && IFrameSplitOperator.IsNumber(this.Data.UpdateTime.Time))
|
|
52164
|
-
{
|
|
52165
|
-
var text=g_JSChartLocalization.GetText('MTitle-UpdateTime',this.LanguageID)+IFrameSplitOperator.FormatTimeString(this.Data.UpdateTime.Time, "HH:MM:SS");
|
|
52166
|
-
if (!this.DrawText(text,this.DateTimeColor,position)) return;
|
|
52167
|
-
}
|
|
52168
|
-
}
|
|
52169
|
-
|
|
52170
|
-
//叠加股票的名字
|
|
52171
|
-
for(var i in this.OverlayChartPaint)
|
|
52172
|
-
{
|
|
52173
|
-
var item=this.OverlayChartPaint[i];
|
|
52174
|
-
if (!item.Symbol || !item.Title) continue;
|
|
52175
|
-
|
|
52176
|
-
var name=item.Title;
|
|
52177
|
-
var clrText=item.Color;
|
|
52178
|
-
var text='['+name+']';
|
|
52179
|
-
if (!this.DrawText(text,clrText,position)) return;
|
|
52180
|
-
}
|
|
52181
|
-
*/
|
|
52182
52228
|
}
|
|
52183
52229
|
|
|
52184
52230
|
//盘前 盘后数据格式化
|
|
@@ -107991,7 +108037,7 @@ function JSExecute(ast,option)
|
|
|
107991
108037
|
["ISEQUAL",null], ["ISUP",null],["ISDOWN"], //ISUP=收阳 ISEQUAL=平盘 ISDOWN=收阴
|
|
107992
108038
|
|
|
107993
108039
|
//日期类
|
|
107994
|
-
['DATE',null],['YEAR',null],['MONTH',null],['PERIOD', null],['WEEK',null],["TIME",null],["DAY",null],["DATETIME",null],["TIME2",null],
|
|
108040
|
+
['DATE',null],['YEAR',null],['MONTH',null],['PERIOD', null],['WEEK',null],['WEEKDAY',null],["TIME",null],["DAY",null],["DATETIME",null],["TIME2",null],
|
|
107995
108041
|
["WEEKOFYEAR", null],["DAYSTOTODAY", null],
|
|
107996
108042
|
|
|
107997
108043
|
//大盘数据
|
|
@@ -108273,6 +108319,7 @@ function JSExecute(ast,option)
|
|
|
108273
108319
|
case 'MONTH':
|
|
108274
108320
|
return this.SymbolData.MONTH();
|
|
108275
108321
|
case 'WEEK':
|
|
108322
|
+
case "WEEKDAY":
|
|
108276
108323
|
return this.SymbolData.WEEK();
|
|
108277
108324
|
case "DAY":
|
|
108278
108325
|
return this.SymbolData.DAY();
|
|
@@ -113006,6 +113053,11 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
113006
113053
|
this.CreatePartLine(hqChart,windowIndex,item,i);
|
|
113007
113054
|
break;
|
|
113008
113055
|
|
|
113056
|
+
case "DRAWTEXTABS":
|
|
113057
|
+
case "DRAWTEXTREL":
|
|
113058
|
+
this.CreateDrawText(hqChart,windowIndex,item,i);
|
|
113059
|
+
break;
|
|
113060
|
+
|
|
113009
113061
|
case SCRIPT_CHART_NAME.OVERLAY_BARS:
|
|
113010
113062
|
this.CreateStackedBar(hqChart,windowIndex,item,i);
|
|
113011
113063
|
break;
|
|
@@ -113183,6 +113235,30 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
113183
113235
|
frame.ChartPaint.push(chart);
|
|
113184
113236
|
}
|
|
113185
113237
|
|
|
113238
|
+
this.CreateDrawText=function(hqChart,windowIndex,varItem,id)
|
|
113239
|
+
{
|
|
113240
|
+
var overlayIndex=this.OverlayIndex;
|
|
113241
|
+
var frame=overlayIndex.Frame;
|
|
113242
|
+
var chart=new ChartSingleText();
|
|
113243
|
+
chart.Canvas=hqChart.Canvas;
|
|
113244
|
+
chart.Name=varItem.Name;
|
|
113245
|
+
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
113246
|
+
chart.ChartFrame=frame.Frame;
|
|
113247
|
+
chart.Identify=overlayIndex.Identify;
|
|
113248
|
+
chart.ReloadResource();
|
|
113249
|
+
|
|
113250
|
+
if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
|
|
113251
|
+
else chart.Color=this.GetDefaultColor(id);
|
|
113252
|
+
|
|
113253
|
+
if (varItem.IsDrawAbove) chart.Direction=1;
|
|
113254
|
+
else chart.Direction=0;
|
|
113255
|
+
|
|
113256
|
+
chart.DrawData=varItem.Draw.DrawData;
|
|
113257
|
+
if (varItem.DrawFontSize>0) chart.TextFont=`${varItem.DrawFontSize*GetDevicePixelRatio()}px 微软雅黑`; //临时用下吧
|
|
113258
|
+
|
|
113259
|
+
frame.ChartPaint.push(chart);
|
|
113260
|
+
}
|
|
113261
|
+
|
|
113186
113262
|
//DRAWTEXT
|
|
113187
113263
|
this.CreateDrawTextV2=function(hqChart,windowIndex,varItem,id)
|
|
113188
113264
|
{
|
|
@@ -113834,6 +113910,7 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
113834
113910
|
chart.Family=varItem.Draw.DrawData.Family;
|
|
113835
113911
|
chart.TextFont=varItem.Draw.DrawData.TextFont;
|
|
113836
113912
|
chart.Texts= varItem.Draw.DrawData.Data;
|
|
113913
|
+
if (varItem.Draw.AutoPosition) chart.AutoPosition=varItem.Draw.AutoPosition;
|
|
113837
113914
|
|
|
113838
113915
|
this.ReloadChartResource(hqChart, windowIndex, chart);
|
|
113839
113916
|
|
|
@@ -114905,6 +114982,7 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
114905
114982
|
drawItem.Text=draw.Text;
|
|
114906
114983
|
drawItem.Name=draw.Name;
|
|
114907
114984
|
drawItem.DrawType=draw.DrawType;
|
|
114985
|
+
if (draw.AutoPosition) drawItem.AutoPosition=draw.AutoPosition;
|
|
114908
114986
|
drawItem.DrawData={ Data:this.FittingMultiText(draw.Data,date,time,hqChart), Family:draw.Family, TextFont:draw.TextFont, EnableTooltip:draw.EnableTooltip, IsDrawFirst:draw.IsDrawFirst };
|
|
114909
114987
|
this.GetKLineData(drawItem.DrawData.Data, hqChart);
|
|
114910
114988
|
outVarItem.Draw=drawItem;
|
|
@@ -115305,6 +115383,7 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
115305
115383
|
drawItem.Text=draw.Text;
|
|
115306
115384
|
drawItem.Name=draw.Name;
|
|
115307
115385
|
drawItem.DrawType=draw.DrawType;
|
|
115386
|
+
if (draw.AutoPosition) drawItem.AutoPosition=draw.AutoPosition;
|
|
115308
115387
|
drawItem.DrawData={ Data:this.FittingMultiText(draw.Data,date,time,hqChart), Family:draw.Family, TextFont:draw.TextFont ,EnableTooltip:draw.EnableTooltip,IsDrawFirst:draw.IsDrawFirst };
|
|
115309
115388
|
this.GetKLineData(drawItem.DrawData.Data, hqChart);
|
|
115310
115389
|
outVarItem.Draw=drawItem;
|
|
@@ -127432,7 +127511,7 @@ function ScrollBarBGChart()
|
|
|
127432
127511
|
|
|
127433
127512
|
|
|
127434
127513
|
|
|
127435
|
-
var HQCHART_VERSION="1.1.
|
|
127514
|
+
var HQCHART_VERSION="1.1.12413";
|
|
127436
127515
|
|
|
127437
127516
|
function PrintHQChartVersion()
|
|
127438
127517
|
{
|