hqchart 1.1.14121 → 1.1.14128
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 +70 -13
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +21 -2
- package/src/jscommon/umychart.complier.js +186 -0
- package/src/jscommon/umychart.js +139 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +326 -1
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +347 -3
|
@@ -12815,6 +12815,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12815
12815
|
if (IFrameSplitOperator.IsBool(option.IsShowXLine)) subFrame.Frame.IsShowXLine=option.IsShowXLine;
|
|
12816
12816
|
if (IFrameSplitOperator.IsBool(option.IsShowYLine)) subFrame.Frame.IsShowYLine=option.IsShowYLine;
|
|
12817
12817
|
if (IFrameSplitOperator.IsBool(option.IsShowIndexTitle)) subFrame.Frame.IsShowIndexTitle=option.IsShowIndexTitle;
|
|
12818
|
+
if (IFrameSplitOperator.IsNumber(option.Height)) subFrame.Height=option.Height; //高度
|
|
12818
12819
|
|
|
12819
12820
|
|
|
12820
12821
|
if (IFrameSplitOperator.IsBool(option.IsShowLeftText))
|
|
@@ -39341,6 +39342,136 @@ function ChartDrawNumber()
|
|
|
39341
39342
|
}
|
|
39342
39343
|
}
|
|
39343
39344
|
|
|
39345
|
+
function ChartDrawLastBarText()
|
|
39346
|
+
{
|
|
39347
|
+
this.newMethod=IChartPainting; //派生
|
|
39348
|
+
this.newMethod();
|
|
39349
|
+
delete this.newMethod;
|
|
39350
|
+
|
|
39351
|
+
this.ClassName='ChartDrawLastBarText'; //类名
|
|
39352
|
+
this.LastBarItem=null;
|
|
39353
|
+
|
|
39354
|
+
this.TextSize=
|
|
39355
|
+
{
|
|
39356
|
+
Max: g_JSChartResource.DRAWICON.Text.MaxSize, Min:g_JSChartResource.DRAWICON.Text.MinSize, //字体的最大最小值
|
|
39357
|
+
Zoom:{ Type:g_JSChartResource.DRAWICON.Text.Zoom.Type , Value:g_JSChartResource.DRAWICON.Text.Zoom.Value }, //放大倍数
|
|
39358
|
+
FontName:g_JSChartResource.DRAWICON.Text.FontName,
|
|
39359
|
+
YOffset:g_JSChartResource.DRAWICON.Text.YOffset
|
|
39360
|
+
}
|
|
39361
|
+
|
|
39362
|
+
this.IconSize=
|
|
39363
|
+
{
|
|
39364
|
+
Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize, //图标的最大最小值
|
|
39365
|
+
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value }, //放大倍数
|
|
39366
|
+
YOffset:g_JSChartResource.DRAWICON.Icon.YOffset //Direction==2的向下偏移
|
|
39367
|
+
};
|
|
39368
|
+
|
|
39369
|
+
this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
|
|
39370
|
+
|
|
39371
|
+
this.ReloadResource=function(resource)
|
|
39372
|
+
{
|
|
39373
|
+
this.TextSize=
|
|
39374
|
+
{
|
|
39375
|
+
Max: g_JSChartResource.DRAWTEXT.MaxSize, Min:g_JSChartResource.DRAWTEXT.MinSize, //字体的最大最小值
|
|
39376
|
+
Zoom:{ Type:g_JSChartResource.DRAWTEXT.Zoom.Type , Value:g_JSChartResource.DRAWTEXT.Zoom.Value }, //放大倍数
|
|
39377
|
+
FontName:g_JSChartResource.DRAWTEXT.FontName,
|
|
39378
|
+
};
|
|
39379
|
+
|
|
39380
|
+
this.IconSize=
|
|
39381
|
+
{
|
|
39382
|
+
Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize, //图标的最大最小值
|
|
39383
|
+
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value }, //放大倍数
|
|
39384
|
+
};
|
|
39385
|
+
|
|
39386
|
+
this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
|
|
39387
|
+
}
|
|
39388
|
+
|
|
39389
|
+
this.Draw=function()
|
|
39390
|
+
{
|
|
39391
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
39392
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
39393
|
+
if (this.IsHideScriptIndex()) return;
|
|
39394
|
+
if (!this.LastBarItem) return;
|
|
39395
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
39396
|
+
|
|
39397
|
+
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
39398
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
39399
|
+
var offset=this.Data.DataOffset;
|
|
39400
|
+
var index=offset+xPointCount;
|
|
39401
|
+
if (index<this.Data.Data.length) return;
|
|
39402
|
+
var lastIndex=(this.Data.Data.length-1)-offset;
|
|
39403
|
+
var x=this.ChartFrame.GetXFromIndex(lastIndex);
|
|
39404
|
+
var item=this.LastBarItem;
|
|
39405
|
+
|
|
39406
|
+
if (item.Value=="Top") y=top;
|
|
39407
|
+
else if (item.Value=="Bottom") y=bottom;
|
|
39408
|
+
else y=this.ChartFrame.GetYFromData(item.Value, false);
|
|
39409
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset; //Y轴偏移
|
|
39410
|
+
if (IFrameSplitOperator.IsNumber(item.XOffset)) x+=item.XOffset;
|
|
39411
|
+
|
|
39412
|
+
this.Canvas.save();
|
|
39413
|
+
this.ClipClient(this.IsHScreen);
|
|
39414
|
+
|
|
39415
|
+
//文本
|
|
39416
|
+
if (item.Text) this.DrawLastText(item, x, y);
|
|
39417
|
+
else if (item.Icon) this.DrawLastIcon(item, x, y);
|
|
39418
|
+
|
|
39419
|
+
this.Canvas.restore();
|
|
39420
|
+
}
|
|
39421
|
+
|
|
39422
|
+
this.DrawLastText=function(item,x,y)
|
|
39423
|
+
{
|
|
39424
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
39425
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
39426
|
+
var font=this.GetDynamicFont(dataWidth,distanceWidth,this.TextSize.Max,this.TextSize.Min,this.TextSize.Zoom,this.TextSize.FontName);
|
|
39427
|
+
|
|
39428
|
+
var textBaseline='bottom';
|
|
39429
|
+
if (item.TextBaseline) textBaseline=item.TextBaseline;
|
|
39430
|
+
var textAlign="center";
|
|
39431
|
+
if (item.TextAlign) textAlign=item.TextAlign;
|
|
39432
|
+
|
|
39433
|
+
this.Canvas.font=font;
|
|
39434
|
+
this.Canvas.textBaseline=textBaseline;
|
|
39435
|
+
this.Canvas.textAlign=textAlign;
|
|
39436
|
+
this.Canvas.fillStyle = item.Color;
|
|
39437
|
+
this.Canvas.fillText(item.Text, x, y);
|
|
39438
|
+
}
|
|
39439
|
+
|
|
39440
|
+
this.DrawLastIcon=function(item,x,y)
|
|
39441
|
+
{
|
|
39442
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
39443
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
39444
|
+
var iconSize=this.GetDynamicIconSize(dataWidth,distanceWidth,this.IconSize.Max,this.IconSize.Min,this.IconSize.Zoom);
|
|
39445
|
+
var font=`${iconSize}px ${this.IconFamily}`;
|
|
39446
|
+
|
|
39447
|
+
var textBaseline='bottom';
|
|
39448
|
+
if (item.TextBaseline) textBaseline=item.TextBaseline;
|
|
39449
|
+
var textAlign="center";
|
|
39450
|
+
if (item.TextAlign) textAlign=item.TextAlign;
|
|
39451
|
+
|
|
39452
|
+
this.Canvas.font=font;
|
|
39453
|
+
this.Canvas.textBaseline=textBaseline;
|
|
39454
|
+
this.Canvas.textAlign=textAlign;
|
|
39455
|
+
this.Canvas.fillStyle = item.Color;
|
|
39456
|
+
this.Canvas.fillText(item.Icon.Symbol, x, y);
|
|
39457
|
+
}
|
|
39458
|
+
|
|
39459
|
+
this.GetMaxMin=function()
|
|
39460
|
+
{
|
|
39461
|
+
var range={ Min:null, Max:null };
|
|
39462
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return range;
|
|
39463
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
39464
|
+
var offset=this.Data.DataOffset;
|
|
39465
|
+
var index=offset+xPointCount;
|
|
39466
|
+
if (index<this.Data.Data.length) return range;
|
|
39467
|
+
if (!this.LastBarItem) return range;
|
|
39468
|
+
|
|
39469
|
+
if (IFrameSplitOperator.IsNumber(this.LastBarItem.Value)) range.Max=range.Min=this.LastBarItem.Value;
|
|
39470
|
+
|
|
39471
|
+
return range;
|
|
39472
|
+
}
|
|
39473
|
+
}
|
|
39474
|
+
|
|
39344
39475
|
//直线 水平直线 只有1个数据
|
|
39345
39476
|
function ChartStraightLine()
|
|
39346
39477
|
{
|
|
@@ -73570,6 +73701,11 @@ function JSChartResource()
|
|
|
73570
73701
|
Color:"rgb(255,165,0)"
|
|
73571
73702
|
}
|
|
73572
73703
|
|
|
73704
|
+
this.DRAWLASTICON=
|
|
73705
|
+
{
|
|
73706
|
+
Family:'iconfont',
|
|
73707
|
+
}
|
|
73708
|
+
|
|
73573
73709
|
this.POINTDOT=
|
|
73574
73710
|
{
|
|
73575
73711
|
Radius:2*GetDevicePixelRatio()
|
|
@@ -77171,6 +77307,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77171
77307
|
this.Canvas.rect(this.Frame.ChartBorder.GetLeft(),this.Frame.ChartBorder.GetTop(),this.Frame.ChartBorder.GetWidth(),this.Frame.ChartBorder.GetHeight());
|
|
77172
77308
|
isInClient=this.Canvas.isPointInPath(x,y);
|
|
77173
77309
|
|
|
77310
|
+
//PC触摸板双指缩放时deltaY数值在[-20,20]之间
|
|
77311
|
+
if (IFrameSplitOperator.IsNumber(e.deltaY) && Math.abs(e.deltaY)<90) return;
|
|
77312
|
+
|
|
77174
77313
|
var wheelValue=e.wheelDelta;
|
|
77175
77314
|
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
77176
77315
|
wheelValue=e.deltaY* -0.01;
|
|
@@ -110359,6 +110498,105 @@ function JSDraw(errorHandler,symbolData)
|
|
|
110359
110498
|
|
|
110360
110499
|
return result;
|
|
110361
110500
|
}
|
|
110501
|
+
|
|
110502
|
+
|
|
110503
|
+
///////////////////////////////////////////////////////////////////////////////////
|
|
110504
|
+
//DRAWLASTBARICON :在最后一根k线绘制图标。
|
|
110505
|
+
//用法:DRAWLASTBARICON(PRICE,ICON);
|
|
110506
|
+
//最后一根k线,在PRICE位置画图标ICON。
|
|
110507
|
+
//
|
|
110508
|
+
//注:
|
|
110509
|
+
//1、该函数可以指定位置PRICE标注图标ICON
|
|
110510
|
+
//2、ICON位置可以写成'ICON'的形式,也可以写为数字的形式,即DRAWLASTBARICON(PRICE,'ICO1');等价于DRAWLASTBARICON(PRICE,1);
|
|
110511
|
+
//3、不支持将该函数定义为变量,即不支持下面的写法:
|
|
110512
|
+
//A:DRAWLASTBARICON(PRICE,ICON);
|
|
110513
|
+
//4、该函数可以用ALIGN,VALIGN设置图标的对齐方式。
|
|
110514
|
+
//例1:
|
|
110515
|
+
//DRAWLASTBARICON(LOW,'ICO1');//在最后一根k线最低价上画出图标ICON1。
|
|
110516
|
+
//例2:
|
|
110517
|
+
//MA5:=MA(C,5);
|
|
110518
|
+
//DRAWLASTBARICON(MA5,2);//表示在最后一根k线对应的MA5数值位置上画出图标ICON2。
|
|
110519
|
+
|
|
110520
|
+
this.DRAWLASTBARICON=function(data, type)
|
|
110521
|
+
{
|
|
110522
|
+
if (IFrameSplitOperator.IsString(type)) //把ICO1=>1
|
|
110523
|
+
{
|
|
110524
|
+
var value=type.replace('ICO',"");
|
|
110525
|
+
type=parseInt(value);
|
|
110526
|
+
}
|
|
110527
|
+
|
|
110528
|
+
var icon=g_JSComplierResource.GetDrawIcon(type);
|
|
110529
|
+
if (!icon) g_JSComplierResource.GetDrawTextIcon(type);
|
|
110530
|
+
if (!icon) icon={ Symbol:'🚩'};
|
|
110531
|
+
|
|
110532
|
+
var drawItem={ Value:null, Icon:icon, IconType:type };
|
|
110533
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data)) drawItem.Value=data[data.length-1];
|
|
110534
|
+
else drawItem.Value=data;
|
|
110535
|
+
|
|
110536
|
+
var result={ DrawData:drawItem, DrawType:'DRAWLASTBARICON' };
|
|
110537
|
+
|
|
110538
|
+
return result;
|
|
110539
|
+
}
|
|
110540
|
+
|
|
110541
|
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
110542
|
+
//DRAWLASTBARTEXT:显在最后一根k线显示文字。
|
|
110543
|
+
//用法:DRAWLASTBARTEXT(PRICE,TEXT);
|
|
110544
|
+
//最后一根k线,在PRICE位置书写文字TEXT。
|
|
110545
|
+
//注:
|
|
110546
|
+
//1、显示的汉字用单引号标注
|
|
110547
|
+
//2、可以设置文字显示的对齐方式,字体大小以及文字的颜色,即支持下面的写法:
|
|
110548
|
+
//DRAWLASTBARTEXT(PRICE,TEXT),COLOR,ALIGN,VALIGN;
|
|
110549
|
+
//例1:
|
|
110550
|
+
//DRAWLASTBARTEXT(LOW,'注');//
|
|
110551
|
+
//最后一根k线,在最低价上写"注"字。
|
|
110552
|
+
//例2:
|
|
110553
|
+
//DRAWLASTBARTEXT(LOW,'低'),ALIGN0,FONTSIZE16,COLORRED;//在最后一根k线,在最低价写"低"字,文字左对齐,字体大小为16,文字颜色为红色。
|
|
110554
|
+
|
|
110555
|
+
this.DRAWLASTBARTEXT=function(data, text)
|
|
110556
|
+
{
|
|
110557
|
+
var drawItem={ Value:null, Text:text };
|
|
110558
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data)) drawItem.Value=data[data.length-1];
|
|
110559
|
+
else drawItem.Value=data;
|
|
110560
|
+
|
|
110561
|
+
var result={ DrawData:drawItem, DrawType:'DRAWLASTBARTEXT' };
|
|
110562
|
+
|
|
110563
|
+
return result;
|
|
110564
|
+
}
|
|
110565
|
+
|
|
110566
|
+
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
110567
|
+
//DRAWLASTBARNUMBER:在最后一根k线输出数值。
|
|
110568
|
+
//用法:DRAWLASTBARNUMBER(DATA,NUMBER,PRECISION,COLOR);
|
|
110569
|
+
//最后一根k线在DATA位置写数字NUMBER。PRECISION为精度(小数点后有几位数字)。COLOR为颜色。
|
|
110570
|
+
//注:
|
|
110571
|
+
//该函数支持在函数后设置文字的大小和文字对齐方式。即支持下面的写法:
|
|
110572
|
+
//DRAWLASTBARNUMBER(DATA,NUMBER,PRECISION,COLOR),ALIGN,VALIGN;
|
|
110573
|
+
//例1:
|
|
110574
|
+
//DRAWLASTBARNUMBER(HIGH,(CLOSE-OPEN)/OPEN*100,2,COLORRED);//最后一根k线在最高价位置红色显示涨幅数值(相对开盘价的百分比,精确2位小数)。
|
|
110575
|
+
//例2:
|
|
110576
|
+
//DRAWLASTBARNUMBER(L,REF(C,1),2,COLORRED),ALIGN0,VALIGN0;//表示最后一根k线的最低价处以红色显示昨收盘价数值(精确2位小数),标注文字居左,居上对齐。
|
|
110577
|
+
|
|
110578
|
+
this.DRAWLASTBARNUMBER=function(data,value,dec,color)
|
|
110579
|
+
{
|
|
110580
|
+
var drawItem={ Value:null, Text:null, Color:color };
|
|
110581
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data)) drawItem.Value=data[data.length-1];
|
|
110582
|
+
else drawItem.Value=data;
|
|
110583
|
+
|
|
110584
|
+
var precision=2;
|
|
110585
|
+
if (IFrameSplitOperator.IsNumber(dec)) precision=parseInt(dec);
|
|
110586
|
+
if (IFrameSplitOperator.IsNumber(value))
|
|
110587
|
+
{
|
|
110588
|
+
drawItem.Text=value.toFixed(precision);
|
|
110589
|
+
}
|
|
110590
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(value))
|
|
110591
|
+
{
|
|
110592
|
+
var lastValue=value[value.length-1];
|
|
110593
|
+
if (IFrameSplitOperator.IsNumber(lastValue)) drawItem.Text=lastValue.toFixed(precision);
|
|
110594
|
+
}
|
|
110595
|
+
|
|
110596
|
+
var result={ DrawData:drawItem, DrawType:'DRAWLASTBARNUMBER' };
|
|
110597
|
+
|
|
110598
|
+
return result;
|
|
110599
|
+
}
|
|
110362
110600
|
}
|
|
110363
110601
|
|
|
110364
110602
|
|
|
@@ -110413,6 +110651,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
110413
110651
|
'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
|
|
110414
110652
|
"VERTLINE","HORLINE","TIPICON",
|
|
110415
110653
|
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
110654
|
+
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT",
|
|
110416
110655
|
]);
|
|
110417
110656
|
if (setFunctionName.has(name)) return true;
|
|
110418
110657
|
|
|
@@ -115695,6 +115934,7 @@ function JSExecute(ast,option)
|
|
|
115695
115934
|
["OFFERCANCELVOL", null], //累计总有效撤卖量,专业版等(资金流向功能)沪深京品种行情专用 累计总有效委卖量-累计总有效撤卖量=总卖+总成交量
|
|
115696
115935
|
["AVGOFFERPX", null], //专业版等(资金流向功能)沪深京品种行情专用:最新委卖均价
|
|
115697
115936
|
//["", null],
|
|
115937
|
+
|
|
115698
115938
|
]);
|
|
115699
115939
|
|
|
115700
115940
|
this.SymbolData=new JSSymbolData(this.AST,option,this);
|
|
@@ -117151,6 +117391,20 @@ function JSExecute(ast,option)
|
|
|
117151
117391
|
node.Draw=this.Draw.HORLINE(args[0],args[1],args[2],args[3]);
|
|
117152
117392
|
node.Out=node.Draw.DrawData.Data;
|
|
117153
117393
|
break;
|
|
117394
|
+
|
|
117395
|
+
case "DRAWLASTBARICON":
|
|
117396
|
+
node.Draw=this.Draw.DRAWLASTBARICON(args[0],args[1]);
|
|
117397
|
+
node.Out=[];
|
|
117398
|
+
break;
|
|
117399
|
+
case "DRAWLASTBARNUMBER":
|
|
117400
|
+
node.Draw=this.Draw.DRAWLASTBARNUMBER(args[0],args[1],args[2],args[3]);
|
|
117401
|
+
node.Out=[];
|
|
117402
|
+
break;
|
|
117403
|
+
case "DRAWLASTBARTEXT":
|
|
117404
|
+
node.Draw=this.Draw.DRAWLASTBARTEXT(args[0],args[1]);
|
|
117405
|
+
node.Out=[];
|
|
117406
|
+
break;
|
|
117407
|
+
|
|
117154
117408
|
case 'CODELIKE':
|
|
117155
117409
|
node.Out=this.SymbolData.CODELIKE(args[0]);
|
|
117156
117410
|
break;
|
|
@@ -117563,6 +117817,22 @@ function JSExplainer(ast,option)
|
|
|
117563
117817
|
["OFFERCANCELVOL", "累计总有效撤卖量"],
|
|
117564
117818
|
["AVGOFFERPX", "最新委卖均价"],
|
|
117565
117819
|
|
|
117820
|
+
['COLORBLACK','黑色'],
|
|
117821
|
+
['COLORBLUE','蓝色'],
|
|
117822
|
+
['COLORGREEN','绿色'],
|
|
117823
|
+
['COLORCYAN','青色'],
|
|
117824
|
+
['COLORRED','红色'],
|
|
117825
|
+
['COLORMAGENTA','洋红色'],
|
|
117826
|
+
['COLORBROWN','棕色'],
|
|
117827
|
+
['COLORLIGRAY','淡灰色'],
|
|
117828
|
+
['COLORGRAY','深灰色'],
|
|
117829
|
+
['COLORLIBLUE','淡蓝色'],
|
|
117830
|
+
['COLORLIGREEN','淡绿色'],
|
|
117831
|
+
['COLORLICYAN','淡青色'],
|
|
117832
|
+
['COLORLIRED','淡红色'],
|
|
117833
|
+
['COLORLIMAGENTA','淡洋红色'],
|
|
117834
|
+
['COLORWHITE','白色'],
|
|
117835
|
+
['COLORYELLOW','黄色']
|
|
117566
117836
|
]);
|
|
117567
117837
|
|
|
117568
117838
|
if (option)
|
|
@@ -118264,6 +118534,12 @@ function JSExplainer(ast,option)
|
|
|
118264
118534
|
case "BUYSHORT":
|
|
118265
118535
|
return "买入平仓";
|
|
118266
118536
|
|
|
118537
|
+
case "DRAWLASTBARNUMBER":
|
|
118538
|
+
return "在最后一根k线输出数值";
|
|
118539
|
+
case "DRAWLASTBARTEXT":
|
|
118540
|
+
return "在最后一根k线显示文字";
|
|
118541
|
+
case "DRAWLASTBARICON":
|
|
118542
|
+
return "在最后一根k线绘制图标";
|
|
118267
118543
|
case "YMOVE":
|
|
118268
118544
|
return;
|
|
118269
118545
|
case "BACKGROUND":
|
|
@@ -120435,6 +120711,49 @@ function ScriptIndex(name,script,args,option)
|
|
|
120435
120711
|
hqChart.ChartPaint.push(chart);
|
|
120436
120712
|
}
|
|
120437
120713
|
|
|
120714
|
+
this.CreateDrawLastBarText=function(hqChart,windowIndex,varItem,id)
|
|
120715
|
+
{
|
|
120716
|
+
var chart=new ChartDrawLastBarText();
|
|
120717
|
+
chart.Canvas=hqChart.Canvas;
|
|
120718
|
+
chart.Name=varItem.Name;
|
|
120719
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
120720
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
120721
|
+
|
|
120722
|
+
if (hqChart.ChartPaint[0].IsMinuteFrame())
|
|
120723
|
+
chart.Data=hqChart.SourceData;
|
|
120724
|
+
else
|
|
120725
|
+
chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
|
|
120726
|
+
|
|
120727
|
+
var lastItem=varItem.Draw.DrawData;
|
|
120728
|
+
if (lastItem)
|
|
120729
|
+
{
|
|
120730
|
+
if (lastItem.Color) lastItem.Color=this.GetColor(lastItem.Color);
|
|
120731
|
+
else lastItem.Color=this.GetDefaultColor(id);
|
|
120732
|
+
if (varItem.Color) lastItem.Color=this.GetColor(varItem.Color);
|
|
120733
|
+
|
|
120734
|
+
if (varItem.DrawVAlign>=0)
|
|
120735
|
+
{
|
|
120736
|
+
if (varItem.DrawVAlign==0) lastItem.TextBaseline='top';
|
|
120737
|
+
else if (varItem.DrawVAlign==1) lastItem.TextBaseline='middle';
|
|
120738
|
+
else if (varItem.DrawVAlign==2) lastItem.TextBaseline='bottom';
|
|
120739
|
+
}
|
|
120740
|
+
|
|
120741
|
+
if (varItem.DrawAlign>=0)
|
|
120742
|
+
{
|
|
120743
|
+
if (varItem.DrawAlign==0) lastItem.TextAlign="left";
|
|
120744
|
+
else if (varItem.DrawAlign==1) lastItem.TextAlign="center";
|
|
120745
|
+
else if (varItem.DrawAlign==2) lastItem.TextAlign='right';
|
|
120746
|
+
}
|
|
120747
|
+
|
|
120748
|
+
if (IFrameSplitOperator.IsNumber(varItem.YOffset)) lastItem.YOffset=varItem.YOffset;
|
|
120749
|
+
if (IFrameSplitOperator.IsNumber(varItem.XOffset)) lastItem.XOffset=varItem.XOffset;
|
|
120750
|
+
if (varItem.DrawFontSize>0) lastItem.FontSize=varItem.DrawFontSize;
|
|
120751
|
+
}
|
|
120752
|
+
|
|
120753
|
+
chart.LastBarItem=lastItem;
|
|
120754
|
+
hqChart.ChartPaint.push(chart);
|
|
120755
|
+
}
|
|
120756
|
+
|
|
120438
120757
|
//创建通道
|
|
120439
120758
|
this.CreateChannel=function(hqChart,windowIndex,varItem,id)
|
|
120440
120759
|
{
|
|
@@ -121031,6 +121350,12 @@ function ScriptIndex(name,script,args,option)
|
|
|
121031
121350
|
this.CreateTradeIcon(hqChart,windowIndex,item,i);
|
|
121032
121351
|
break;
|
|
121033
121352
|
|
|
121353
|
+
case "DRAWLASTBARICON":
|
|
121354
|
+
case "DRAWLASTBARNUMBER":
|
|
121355
|
+
case "DRAWLASTBARTEXT":
|
|
121356
|
+
this.CreateDrawLastBarText(hqChart,windowIndex,item,i);
|
|
121357
|
+
break;
|
|
121358
|
+
|
|
121034
121359
|
case SCRIPT_CHART_NAME.OVERLAY_BARS:
|
|
121035
121360
|
this.CreateStackedBar(hqChart,windowIndex,item,i);
|
|
121036
121361
|
break;
|
|
@@ -139368,7 +139693,7 @@ function ScrollBarBGChart()
|
|
|
139368
139693
|
|
|
139369
139694
|
|
|
139370
139695
|
|
|
139371
|
-
var HQCHART_VERSION="1.1.
|
|
139696
|
+
var HQCHART_VERSION="1.1.14127";
|
|
139372
139697
|
|
|
139373
139698
|
function PrintHQChartVersion()
|
|
139374
139699
|
{
|