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
|
@@ -12859,6 +12859,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12859
12859
|
if (IFrameSplitOperator.IsBool(option.IsShowXLine)) subFrame.Frame.IsShowXLine=option.IsShowXLine;
|
|
12860
12860
|
if (IFrameSplitOperator.IsBool(option.IsShowYLine)) subFrame.Frame.IsShowYLine=option.IsShowYLine;
|
|
12861
12861
|
if (IFrameSplitOperator.IsBool(option.IsShowIndexTitle)) subFrame.Frame.IsShowIndexTitle=option.IsShowIndexTitle;
|
|
12862
|
+
if (IFrameSplitOperator.IsNumber(option.Height)) subFrame.Height=option.Height; //高度
|
|
12862
12863
|
|
|
12863
12864
|
|
|
12864
12865
|
if (IFrameSplitOperator.IsBool(option.IsShowLeftText))
|
|
@@ -39385,6 +39386,136 @@ function ChartDrawNumber()
|
|
|
39385
39386
|
}
|
|
39386
39387
|
}
|
|
39387
39388
|
|
|
39389
|
+
function ChartDrawLastBarText()
|
|
39390
|
+
{
|
|
39391
|
+
this.newMethod=IChartPainting; //派生
|
|
39392
|
+
this.newMethod();
|
|
39393
|
+
delete this.newMethod;
|
|
39394
|
+
|
|
39395
|
+
this.ClassName='ChartDrawLastBarText'; //类名
|
|
39396
|
+
this.LastBarItem=null;
|
|
39397
|
+
|
|
39398
|
+
this.TextSize=
|
|
39399
|
+
{
|
|
39400
|
+
Max: g_JSChartResource.DRAWICON.Text.MaxSize, Min:g_JSChartResource.DRAWICON.Text.MinSize, //字体的最大最小值
|
|
39401
|
+
Zoom:{ Type:g_JSChartResource.DRAWICON.Text.Zoom.Type , Value:g_JSChartResource.DRAWICON.Text.Zoom.Value }, //放大倍数
|
|
39402
|
+
FontName:g_JSChartResource.DRAWICON.Text.FontName,
|
|
39403
|
+
YOffset:g_JSChartResource.DRAWICON.Text.YOffset
|
|
39404
|
+
}
|
|
39405
|
+
|
|
39406
|
+
this.IconSize=
|
|
39407
|
+
{
|
|
39408
|
+
Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize, //图标的最大最小值
|
|
39409
|
+
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value }, //放大倍数
|
|
39410
|
+
YOffset:g_JSChartResource.DRAWICON.Icon.YOffset //Direction==2的向下偏移
|
|
39411
|
+
};
|
|
39412
|
+
|
|
39413
|
+
this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
|
|
39414
|
+
|
|
39415
|
+
this.ReloadResource=function(resource)
|
|
39416
|
+
{
|
|
39417
|
+
this.TextSize=
|
|
39418
|
+
{
|
|
39419
|
+
Max: g_JSChartResource.DRAWTEXT.MaxSize, Min:g_JSChartResource.DRAWTEXT.MinSize, //字体的最大最小值
|
|
39420
|
+
Zoom:{ Type:g_JSChartResource.DRAWTEXT.Zoom.Type , Value:g_JSChartResource.DRAWTEXT.Zoom.Value }, //放大倍数
|
|
39421
|
+
FontName:g_JSChartResource.DRAWTEXT.FontName,
|
|
39422
|
+
};
|
|
39423
|
+
|
|
39424
|
+
this.IconSize=
|
|
39425
|
+
{
|
|
39426
|
+
Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize, //图标的最大最小值
|
|
39427
|
+
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value }, //放大倍数
|
|
39428
|
+
};
|
|
39429
|
+
|
|
39430
|
+
this.IconFamily=g_JSChartResource.DRAWLASTICON.Family;
|
|
39431
|
+
}
|
|
39432
|
+
|
|
39433
|
+
this.Draw=function()
|
|
39434
|
+
{
|
|
39435
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
39436
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
39437
|
+
if (this.IsHideScriptIndex()) return;
|
|
39438
|
+
if (!this.LastBarItem) return;
|
|
39439
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
39440
|
+
|
|
39441
|
+
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
39442
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
39443
|
+
var offset=this.Data.DataOffset;
|
|
39444
|
+
var index=offset+xPointCount;
|
|
39445
|
+
if (index<this.Data.Data.length) return;
|
|
39446
|
+
var lastIndex=(this.Data.Data.length-1)-offset;
|
|
39447
|
+
var x=this.ChartFrame.GetXFromIndex(lastIndex);
|
|
39448
|
+
var item=this.LastBarItem;
|
|
39449
|
+
|
|
39450
|
+
if (item.Value=="Top") y=top;
|
|
39451
|
+
else if (item.Value=="Bottom") y=bottom;
|
|
39452
|
+
else y=this.ChartFrame.GetYFromData(item.Value, false);
|
|
39453
|
+
if (IFrameSplitOperator.IsNumber(item.YOffset)) y+=item.YOffset; //Y轴偏移
|
|
39454
|
+
if (IFrameSplitOperator.IsNumber(item.XOffset)) x+=item.XOffset;
|
|
39455
|
+
|
|
39456
|
+
this.Canvas.save();
|
|
39457
|
+
this.ClipClient(this.IsHScreen);
|
|
39458
|
+
|
|
39459
|
+
//文本
|
|
39460
|
+
if (item.Text) this.DrawLastText(item, x, y);
|
|
39461
|
+
else if (item.Icon) this.DrawLastIcon(item, x, y);
|
|
39462
|
+
|
|
39463
|
+
this.Canvas.restore();
|
|
39464
|
+
}
|
|
39465
|
+
|
|
39466
|
+
this.DrawLastText=function(item,x,y)
|
|
39467
|
+
{
|
|
39468
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
39469
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
39470
|
+
var font=this.GetDynamicFont(dataWidth,distanceWidth,this.TextSize.Max,this.TextSize.Min,this.TextSize.Zoom,this.TextSize.FontName);
|
|
39471
|
+
|
|
39472
|
+
var textBaseline='bottom';
|
|
39473
|
+
if (item.TextBaseline) textBaseline=item.TextBaseline;
|
|
39474
|
+
var textAlign="center";
|
|
39475
|
+
if (item.TextAlign) textAlign=item.TextAlign;
|
|
39476
|
+
|
|
39477
|
+
this.Canvas.font=font;
|
|
39478
|
+
this.Canvas.textBaseline=textBaseline;
|
|
39479
|
+
this.Canvas.textAlign=textAlign;
|
|
39480
|
+
this.Canvas.fillStyle = item.Color;
|
|
39481
|
+
this.Canvas.fillText(item.Text, x, y);
|
|
39482
|
+
}
|
|
39483
|
+
|
|
39484
|
+
this.DrawLastIcon=function(item,x,y)
|
|
39485
|
+
{
|
|
39486
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
39487
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
39488
|
+
var iconSize=this.GetDynamicIconSize(dataWidth,distanceWidth,this.IconSize.Max,this.IconSize.Min,this.IconSize.Zoom);
|
|
39489
|
+
var font=`${iconSize}px ${this.IconFamily}`;
|
|
39490
|
+
|
|
39491
|
+
var textBaseline='bottom';
|
|
39492
|
+
if (item.TextBaseline) textBaseline=item.TextBaseline;
|
|
39493
|
+
var textAlign="center";
|
|
39494
|
+
if (item.TextAlign) textAlign=item.TextAlign;
|
|
39495
|
+
|
|
39496
|
+
this.Canvas.font=font;
|
|
39497
|
+
this.Canvas.textBaseline=textBaseline;
|
|
39498
|
+
this.Canvas.textAlign=textAlign;
|
|
39499
|
+
this.Canvas.fillStyle = item.Color;
|
|
39500
|
+
this.Canvas.fillText(item.Icon.Symbol, x, y);
|
|
39501
|
+
}
|
|
39502
|
+
|
|
39503
|
+
this.GetMaxMin=function()
|
|
39504
|
+
{
|
|
39505
|
+
var range={ Min:null, Max:null };
|
|
39506
|
+
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return range;
|
|
39507
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
39508
|
+
var offset=this.Data.DataOffset;
|
|
39509
|
+
var index=offset+xPointCount;
|
|
39510
|
+
if (index<this.Data.Data.length) return range;
|
|
39511
|
+
if (!this.LastBarItem) return range;
|
|
39512
|
+
|
|
39513
|
+
if (IFrameSplitOperator.IsNumber(this.LastBarItem.Value)) range.Max=range.Min=this.LastBarItem.Value;
|
|
39514
|
+
|
|
39515
|
+
return range;
|
|
39516
|
+
}
|
|
39517
|
+
}
|
|
39518
|
+
|
|
39388
39519
|
//直线 水平直线 只有1个数据
|
|
39389
39520
|
function ChartStraightLine()
|
|
39390
39521
|
{
|
|
@@ -73614,6 +73745,11 @@ function JSChartResource()
|
|
|
73614
73745
|
Color:"rgb(255,165,0)"
|
|
73615
73746
|
}
|
|
73616
73747
|
|
|
73748
|
+
this.DRAWLASTICON=
|
|
73749
|
+
{
|
|
73750
|
+
Family:'iconfont',
|
|
73751
|
+
}
|
|
73752
|
+
|
|
73617
73753
|
this.POINTDOT=
|
|
73618
73754
|
{
|
|
73619
73755
|
Radius:2*GetDevicePixelRatio()
|
|
@@ -77215,6 +77351,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77215
77351
|
this.Canvas.rect(this.Frame.ChartBorder.GetLeft(),this.Frame.ChartBorder.GetTop(),this.Frame.ChartBorder.GetWidth(),this.Frame.ChartBorder.GetHeight());
|
|
77216
77352
|
isInClient=this.Canvas.isPointInPath(x,y);
|
|
77217
77353
|
|
|
77354
|
+
//PC触摸板双指缩放时deltaY数值在[-20,20]之间
|
|
77355
|
+
if (IFrameSplitOperator.IsNumber(e.deltaY) && Math.abs(e.deltaY)<90) return;
|
|
77356
|
+
|
|
77218
77357
|
var wheelValue=e.wheelDelta;
|
|
77219
77358
|
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
77220
77359
|
wheelValue=e.deltaY* -0.01;
|
|
@@ -110403,6 +110542,105 @@ function JSDraw(errorHandler,symbolData)
|
|
|
110403
110542
|
|
|
110404
110543
|
return result;
|
|
110405
110544
|
}
|
|
110545
|
+
|
|
110546
|
+
|
|
110547
|
+
///////////////////////////////////////////////////////////////////////////////////
|
|
110548
|
+
//DRAWLASTBARICON :在最后一根k线绘制图标。
|
|
110549
|
+
//用法:DRAWLASTBARICON(PRICE,ICON);
|
|
110550
|
+
//最后一根k线,在PRICE位置画图标ICON。
|
|
110551
|
+
//
|
|
110552
|
+
//注:
|
|
110553
|
+
//1、该函数可以指定位置PRICE标注图标ICON
|
|
110554
|
+
//2、ICON位置可以写成'ICON'的形式,也可以写为数字的形式,即DRAWLASTBARICON(PRICE,'ICO1');等价于DRAWLASTBARICON(PRICE,1);
|
|
110555
|
+
//3、不支持将该函数定义为变量,即不支持下面的写法:
|
|
110556
|
+
//A:DRAWLASTBARICON(PRICE,ICON);
|
|
110557
|
+
//4、该函数可以用ALIGN,VALIGN设置图标的对齐方式。
|
|
110558
|
+
//例1:
|
|
110559
|
+
//DRAWLASTBARICON(LOW,'ICO1');//在最后一根k线最低价上画出图标ICON1。
|
|
110560
|
+
//例2:
|
|
110561
|
+
//MA5:=MA(C,5);
|
|
110562
|
+
//DRAWLASTBARICON(MA5,2);//表示在最后一根k线对应的MA5数值位置上画出图标ICON2。
|
|
110563
|
+
|
|
110564
|
+
this.DRAWLASTBARICON=function(data, type)
|
|
110565
|
+
{
|
|
110566
|
+
if (IFrameSplitOperator.IsString(type)) //把ICO1=>1
|
|
110567
|
+
{
|
|
110568
|
+
var value=type.replace('ICO',"");
|
|
110569
|
+
type=parseInt(value);
|
|
110570
|
+
}
|
|
110571
|
+
|
|
110572
|
+
var icon=g_JSComplierResource.GetDrawIcon(type);
|
|
110573
|
+
if (!icon) g_JSComplierResource.GetDrawTextIcon(type);
|
|
110574
|
+
if (!icon) icon={ Symbol:'🚩'};
|
|
110575
|
+
|
|
110576
|
+
var drawItem={ Value:null, Icon:icon, IconType:type };
|
|
110577
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data)) drawItem.Value=data[data.length-1];
|
|
110578
|
+
else drawItem.Value=data;
|
|
110579
|
+
|
|
110580
|
+
var result={ DrawData:drawItem, DrawType:'DRAWLASTBARICON' };
|
|
110581
|
+
|
|
110582
|
+
return result;
|
|
110583
|
+
}
|
|
110584
|
+
|
|
110585
|
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
110586
|
+
//DRAWLASTBARTEXT:显在最后一根k线显示文字。
|
|
110587
|
+
//用法:DRAWLASTBARTEXT(PRICE,TEXT);
|
|
110588
|
+
//最后一根k线,在PRICE位置书写文字TEXT。
|
|
110589
|
+
//注:
|
|
110590
|
+
//1、显示的汉字用单引号标注
|
|
110591
|
+
//2、可以设置文字显示的对齐方式,字体大小以及文字的颜色,即支持下面的写法:
|
|
110592
|
+
//DRAWLASTBARTEXT(PRICE,TEXT),COLOR,ALIGN,VALIGN;
|
|
110593
|
+
//例1:
|
|
110594
|
+
//DRAWLASTBARTEXT(LOW,'注');//
|
|
110595
|
+
//最后一根k线,在最低价上写"注"字。
|
|
110596
|
+
//例2:
|
|
110597
|
+
//DRAWLASTBARTEXT(LOW,'低'),ALIGN0,FONTSIZE16,COLORRED;//在最后一根k线,在最低价写"低"字,文字左对齐,字体大小为16,文字颜色为红色。
|
|
110598
|
+
|
|
110599
|
+
this.DRAWLASTBARTEXT=function(data, text)
|
|
110600
|
+
{
|
|
110601
|
+
var drawItem={ Value:null, Text:text };
|
|
110602
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data)) drawItem.Value=data[data.length-1];
|
|
110603
|
+
else drawItem.Value=data;
|
|
110604
|
+
|
|
110605
|
+
var result={ DrawData:drawItem, DrawType:'DRAWLASTBARTEXT' };
|
|
110606
|
+
|
|
110607
|
+
return result;
|
|
110608
|
+
}
|
|
110609
|
+
|
|
110610
|
+
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
110611
|
+
//DRAWLASTBARNUMBER:在最后一根k线输出数值。
|
|
110612
|
+
//用法:DRAWLASTBARNUMBER(DATA,NUMBER,PRECISION,COLOR);
|
|
110613
|
+
//最后一根k线在DATA位置写数字NUMBER。PRECISION为精度(小数点后有几位数字)。COLOR为颜色。
|
|
110614
|
+
//注:
|
|
110615
|
+
//该函数支持在函数后设置文字的大小和文字对齐方式。即支持下面的写法:
|
|
110616
|
+
//DRAWLASTBARNUMBER(DATA,NUMBER,PRECISION,COLOR),ALIGN,VALIGN;
|
|
110617
|
+
//例1:
|
|
110618
|
+
//DRAWLASTBARNUMBER(HIGH,(CLOSE-OPEN)/OPEN*100,2,COLORRED);//最后一根k线在最高价位置红色显示涨幅数值(相对开盘价的百分比,精确2位小数)。
|
|
110619
|
+
//例2:
|
|
110620
|
+
//DRAWLASTBARNUMBER(L,REF(C,1),2,COLORRED),ALIGN0,VALIGN0;//表示最后一根k线的最低价处以红色显示昨收盘价数值(精确2位小数),标注文字居左,居上对齐。
|
|
110621
|
+
|
|
110622
|
+
this.DRAWLASTBARNUMBER=function(data,value,dec,color)
|
|
110623
|
+
{
|
|
110624
|
+
var drawItem={ Value:null, Text:null, Color:color };
|
|
110625
|
+
if (IFrameSplitOperator.IsNonEmptyArray(data)) drawItem.Value=data[data.length-1];
|
|
110626
|
+
else drawItem.Value=data;
|
|
110627
|
+
|
|
110628
|
+
var precision=2;
|
|
110629
|
+
if (IFrameSplitOperator.IsNumber(dec)) precision=parseInt(dec);
|
|
110630
|
+
if (IFrameSplitOperator.IsNumber(value))
|
|
110631
|
+
{
|
|
110632
|
+
drawItem.Text=value.toFixed(precision);
|
|
110633
|
+
}
|
|
110634
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(value))
|
|
110635
|
+
{
|
|
110636
|
+
var lastValue=value[value.length-1];
|
|
110637
|
+
if (IFrameSplitOperator.IsNumber(lastValue)) drawItem.Text=lastValue.toFixed(precision);
|
|
110638
|
+
}
|
|
110639
|
+
|
|
110640
|
+
var result={ DrawData:drawItem, DrawType:'DRAWLASTBARNUMBER' };
|
|
110641
|
+
|
|
110642
|
+
return result;
|
|
110643
|
+
}
|
|
110406
110644
|
}
|
|
110407
110645
|
|
|
110408
110646
|
|
|
@@ -110457,6 +110695,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
|
|
|
110457
110695
|
'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
|
|
110458
110696
|
"VERTLINE","HORLINE","TIPICON",
|
|
110459
110697
|
"BUY","SELL","SELLSHORT","BUYSHORT",
|
|
110698
|
+
"DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT",
|
|
110460
110699
|
]);
|
|
110461
110700
|
if (setFunctionName.has(name)) return true;
|
|
110462
110701
|
|
|
@@ -115739,6 +115978,7 @@ function JSExecute(ast,option)
|
|
|
115739
115978
|
["OFFERCANCELVOL", null], //累计总有效撤卖量,专业版等(资金流向功能)沪深京品种行情专用 累计总有效委卖量-累计总有效撤卖量=总卖+总成交量
|
|
115740
115979
|
["AVGOFFERPX", null], //专业版等(资金流向功能)沪深京品种行情专用:最新委卖均价
|
|
115741
115980
|
//["", null],
|
|
115981
|
+
|
|
115742
115982
|
]);
|
|
115743
115983
|
|
|
115744
115984
|
this.SymbolData=new JSSymbolData(this.AST,option,this);
|
|
@@ -117195,6 +117435,20 @@ function JSExecute(ast,option)
|
|
|
117195
117435
|
node.Draw=this.Draw.HORLINE(args[0],args[1],args[2],args[3]);
|
|
117196
117436
|
node.Out=node.Draw.DrawData.Data;
|
|
117197
117437
|
break;
|
|
117438
|
+
|
|
117439
|
+
case "DRAWLASTBARICON":
|
|
117440
|
+
node.Draw=this.Draw.DRAWLASTBARICON(args[0],args[1]);
|
|
117441
|
+
node.Out=[];
|
|
117442
|
+
break;
|
|
117443
|
+
case "DRAWLASTBARNUMBER":
|
|
117444
|
+
node.Draw=this.Draw.DRAWLASTBARNUMBER(args[0],args[1],args[2],args[3]);
|
|
117445
|
+
node.Out=[];
|
|
117446
|
+
break;
|
|
117447
|
+
case "DRAWLASTBARTEXT":
|
|
117448
|
+
node.Draw=this.Draw.DRAWLASTBARTEXT(args[0],args[1]);
|
|
117449
|
+
node.Out=[];
|
|
117450
|
+
break;
|
|
117451
|
+
|
|
117198
117452
|
case 'CODELIKE':
|
|
117199
117453
|
node.Out=this.SymbolData.CODELIKE(args[0]);
|
|
117200
117454
|
break;
|
|
@@ -117607,6 +117861,22 @@ function JSExplainer(ast,option)
|
|
|
117607
117861
|
["OFFERCANCELVOL", "累计总有效撤卖量"],
|
|
117608
117862
|
["AVGOFFERPX", "最新委卖均价"],
|
|
117609
117863
|
|
|
117864
|
+
['COLORBLACK','黑色'],
|
|
117865
|
+
['COLORBLUE','蓝色'],
|
|
117866
|
+
['COLORGREEN','绿色'],
|
|
117867
|
+
['COLORCYAN','青色'],
|
|
117868
|
+
['COLORRED','红色'],
|
|
117869
|
+
['COLORMAGENTA','洋红色'],
|
|
117870
|
+
['COLORBROWN','棕色'],
|
|
117871
|
+
['COLORLIGRAY','淡灰色'],
|
|
117872
|
+
['COLORGRAY','深灰色'],
|
|
117873
|
+
['COLORLIBLUE','淡蓝色'],
|
|
117874
|
+
['COLORLIGREEN','淡绿色'],
|
|
117875
|
+
['COLORLICYAN','淡青色'],
|
|
117876
|
+
['COLORLIRED','淡红色'],
|
|
117877
|
+
['COLORLIMAGENTA','淡洋红色'],
|
|
117878
|
+
['COLORWHITE','白色'],
|
|
117879
|
+
['COLORYELLOW','黄色']
|
|
117610
117880
|
]);
|
|
117611
117881
|
|
|
117612
117882
|
if (option)
|
|
@@ -118308,6 +118578,12 @@ function JSExplainer(ast,option)
|
|
|
118308
118578
|
case "BUYSHORT":
|
|
118309
118579
|
return "买入平仓";
|
|
118310
118580
|
|
|
118581
|
+
case "DRAWLASTBARNUMBER":
|
|
118582
|
+
return "在最后一根k线输出数值";
|
|
118583
|
+
case "DRAWLASTBARTEXT":
|
|
118584
|
+
return "在最后一根k线显示文字";
|
|
118585
|
+
case "DRAWLASTBARICON":
|
|
118586
|
+
return "在最后一根k线绘制图标";
|
|
118311
118587
|
case "YMOVE":
|
|
118312
118588
|
return;
|
|
118313
118589
|
case "BACKGROUND":
|
|
@@ -120479,6 +120755,49 @@ function ScriptIndex(name,script,args,option)
|
|
|
120479
120755
|
hqChart.ChartPaint.push(chart);
|
|
120480
120756
|
}
|
|
120481
120757
|
|
|
120758
|
+
this.CreateDrawLastBarText=function(hqChart,windowIndex,varItem,id)
|
|
120759
|
+
{
|
|
120760
|
+
var chart=new ChartDrawLastBarText();
|
|
120761
|
+
chart.Canvas=hqChart.Canvas;
|
|
120762
|
+
chart.Name=varItem.Name;
|
|
120763
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
120764
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
120765
|
+
|
|
120766
|
+
if (hqChart.ChartPaint[0].IsMinuteFrame())
|
|
120767
|
+
chart.Data=hqChart.SourceData;
|
|
120768
|
+
else
|
|
120769
|
+
chart.Data=hqChart.ChartPaint[0].Data;//绑定K线
|
|
120770
|
+
|
|
120771
|
+
var lastItem=varItem.Draw.DrawData;
|
|
120772
|
+
if (lastItem)
|
|
120773
|
+
{
|
|
120774
|
+
if (lastItem.Color) lastItem.Color=this.GetColor(lastItem.Color);
|
|
120775
|
+
else lastItem.Color=this.GetDefaultColor(id);
|
|
120776
|
+
if (varItem.Color) lastItem.Color=this.GetColor(varItem.Color);
|
|
120777
|
+
|
|
120778
|
+
if (varItem.DrawVAlign>=0)
|
|
120779
|
+
{
|
|
120780
|
+
if (varItem.DrawVAlign==0) lastItem.TextBaseline='top';
|
|
120781
|
+
else if (varItem.DrawVAlign==1) lastItem.TextBaseline='middle';
|
|
120782
|
+
else if (varItem.DrawVAlign==2) lastItem.TextBaseline='bottom';
|
|
120783
|
+
}
|
|
120784
|
+
|
|
120785
|
+
if (varItem.DrawAlign>=0)
|
|
120786
|
+
{
|
|
120787
|
+
if (varItem.DrawAlign==0) lastItem.TextAlign="left";
|
|
120788
|
+
else if (varItem.DrawAlign==1) lastItem.TextAlign="center";
|
|
120789
|
+
else if (varItem.DrawAlign==2) lastItem.TextAlign='right';
|
|
120790
|
+
}
|
|
120791
|
+
|
|
120792
|
+
if (IFrameSplitOperator.IsNumber(varItem.YOffset)) lastItem.YOffset=varItem.YOffset;
|
|
120793
|
+
if (IFrameSplitOperator.IsNumber(varItem.XOffset)) lastItem.XOffset=varItem.XOffset;
|
|
120794
|
+
if (varItem.DrawFontSize>0) lastItem.FontSize=varItem.DrawFontSize;
|
|
120795
|
+
}
|
|
120796
|
+
|
|
120797
|
+
chart.LastBarItem=lastItem;
|
|
120798
|
+
hqChart.ChartPaint.push(chart);
|
|
120799
|
+
}
|
|
120800
|
+
|
|
120482
120801
|
//创建通道
|
|
120483
120802
|
this.CreateChannel=function(hqChart,windowIndex,varItem,id)
|
|
120484
120803
|
{
|
|
@@ -121075,6 +121394,12 @@ function ScriptIndex(name,script,args,option)
|
|
|
121075
121394
|
this.CreateTradeIcon(hqChart,windowIndex,item,i);
|
|
121076
121395
|
break;
|
|
121077
121396
|
|
|
121397
|
+
case "DRAWLASTBARICON":
|
|
121398
|
+
case "DRAWLASTBARNUMBER":
|
|
121399
|
+
case "DRAWLASTBARTEXT":
|
|
121400
|
+
this.CreateDrawLastBarText(hqChart,windowIndex,item,i);
|
|
121401
|
+
break;
|
|
121402
|
+
|
|
121078
121403
|
case SCRIPT_CHART_NAME.OVERLAY_BARS:
|
|
121079
121404
|
this.CreateStackedBar(hqChart,windowIndex,item,i);
|
|
121080
121405
|
break;
|
|
@@ -145937,9 +146262,28 @@ function JSFloatTooltip()
|
|
|
145937
146262
|
|
|
145938
146263
|
var item=tooltipData.Data.Item;
|
|
145939
146264
|
var aryText=[];
|
|
146265
|
+
if (item && IFrameSplitOperator.IsObject(item.Text))
|
|
146266
|
+
{
|
|
146267
|
+
var tooltipData=item.Text;
|
|
146268
|
+
if (IFrameSplitOperator.IsNonEmptyArray(tooltipData.AryText))
|
|
146269
|
+
{
|
|
146270
|
+
for(var i=0;i<tooltipData.AryText.length;++i)
|
|
146271
|
+
{
|
|
146272
|
+
var tooltipItem=tooltipData.AryText[i];
|
|
146273
|
+
var textItem={ Title:tooltipItem.Title, Text:tooltipItem.Text, Color:this.ValueColor };
|
|
146274
|
+
if (tooltipItem.Color) textItem.Color=tooltipItem.Color;
|
|
146275
|
+
if (tooltipItem.Align=="Left") tooltipItem.ClassName=this.ValueAlign.Left;
|
|
145940
146276
|
|
|
145941
|
-
|
|
145942
|
-
|
|
146277
|
+
aryText.push(tooltipItem);
|
|
146278
|
+
}
|
|
146279
|
+
}
|
|
146280
|
+
}
|
|
146281
|
+
else
|
|
146282
|
+
{
|
|
146283
|
+
var rowItem={ Text:"", HTMLTitle:item.Text, Color:this.ValueColor, IsMergeCell:true };
|
|
146284
|
+
aryText.push(rowItem);
|
|
146285
|
+
}
|
|
146286
|
+
|
|
145943
146287
|
|
|
145944
146288
|
this.AryText=aryText;
|
|
145945
146289
|
this.UpdateTableDOM();
|
|
@@ -148618,7 +148962,7 @@ function HQChartScriptWorker()
|
|
|
148618
148962
|
|
|
148619
148963
|
|
|
148620
148964
|
|
|
148621
|
-
var HQCHART_VERSION="1.1.
|
|
148965
|
+
var HQCHART_VERSION="1.1.14127";
|
|
148622
148966
|
|
|
148623
148967
|
function PrintHQChartVersion()
|
|
148624
148968
|
{
|