hqchart 1.1.14834 → 1.1.14843
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 +21 -14
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +40 -0
- package/src/jscommon/umychart.complier.js +70 -1
- package/src/jscommon/umychart.deal.js +1 -1
- package/src/jscommon/umychart.js +212 -2
- package/src/jscommon/umychart.testdata.js +40 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +284 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +40 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +284 -5
|
@@ -45543,6 +45543,199 @@ function ChartMACD()
|
|
|
45543
45543
|
}
|
|
45544
45544
|
}
|
|
45545
45545
|
|
|
45546
|
+
//基准线上下柱子
|
|
45547
|
+
function ChartBaseLineBar()
|
|
45548
|
+
{
|
|
45549
|
+
this.newMethod=IChartPainting; //派生
|
|
45550
|
+
this.newMethod();
|
|
45551
|
+
delete this.newMethod;
|
|
45552
|
+
|
|
45553
|
+
this.ClassName="ChartBaseLineBar";
|
|
45554
|
+
this.UpColor=g_JSChartResource.ChartBaseLineBar.UpColor;
|
|
45555
|
+
this.DownColor=g_JSChartResource.ChartBaseLineBar.DownColor;
|
|
45556
|
+
this.LineWidth=1;
|
|
45557
|
+
this.IsDrawFirst=true;
|
|
45558
|
+
this.AryData=[]; //{ Date, Time, Up, Down }
|
|
45559
|
+
|
|
45560
|
+
this.MaxValue;
|
|
45561
|
+
this.YBaseLine;
|
|
45562
|
+
this.BarMaxHeight; //{ Up:, Down: }
|
|
45563
|
+
|
|
45564
|
+
this.Draw=function()
|
|
45565
|
+
{
|
|
45566
|
+
this.YBaseLine=null;
|
|
45567
|
+
this.BarMaxHeight=null;
|
|
45568
|
+
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
45569
|
+
if (this.IsShowIndexTitleOnly()) return;
|
|
45570
|
+
if (this.IsHideScriptIndex()) return;
|
|
45571
|
+
if (!this.HQChart) return;
|
|
45572
|
+
if(!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return;
|
|
45573
|
+
if (!IFrameSplitOperator.IsNumber(this.MaxValue)) return;
|
|
45574
|
+
this.CalculateBaseLine();
|
|
45575
|
+
|
|
45576
|
+
if (!IFrameSplitOperator.IsNumber(this.YBaseLine)) return;
|
|
45577
|
+
if (!IFrameSplitOperator.IsPlusNumber(this.BarMaxHeight)) return;
|
|
45578
|
+
|
|
45579
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
45580
|
+
var bMinute=this.IsMinuteFrame();
|
|
45581
|
+
var dataWidth=this.ChartFrame.DataWidth;
|
|
45582
|
+
var distanceWidth=this.ChartFrame.DistanceWidth;
|
|
45583
|
+
var xPointCount=this.ChartFrame.XPointCount;
|
|
45584
|
+
var border=this.ChartFrame.GetBorder();
|
|
45585
|
+
|
|
45586
|
+
if (bHScreen)
|
|
45587
|
+
{
|
|
45588
|
+
var chartright=border.BottomEx;
|
|
45589
|
+
var xOffset=border.TopEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
45590
|
+
}
|
|
45591
|
+
else
|
|
45592
|
+
{
|
|
45593
|
+
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
45594
|
+
var chartright=border.RightEx;
|
|
45595
|
+
}
|
|
45596
|
+
|
|
45597
|
+
var yCenter=this.YBaseLine;
|
|
45598
|
+
var aryUpBar=[], aryDownBar=[];
|
|
45599
|
+
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
45600
|
+
{
|
|
45601
|
+
var kItem=this.Data.Data[i];
|
|
45602
|
+
if (!kItem) continue;
|
|
45603
|
+
var key=this.BuildKey(kItem);
|
|
45604
|
+
if (!this.MapCache.has(key)) continue;
|
|
45605
|
+
|
|
45606
|
+
var item=this.MapCache.get(key);
|
|
45607
|
+
|
|
45608
|
+
if (bMinute)
|
|
45609
|
+
{
|
|
45610
|
+
var x=this.ChartFrame.GetXFromIndex(j);
|
|
45611
|
+
}
|
|
45612
|
+
else
|
|
45613
|
+
{
|
|
45614
|
+
var left=xOffset;
|
|
45615
|
+
var right=xOffset+dataWidth;
|
|
45616
|
+
if (right>chartright) break;
|
|
45617
|
+
var x=left+(right-left)/2;
|
|
45618
|
+
}
|
|
45619
|
+
|
|
45620
|
+
if (IFrameSplitOperator.IsNumber(item.Up))
|
|
45621
|
+
{
|
|
45622
|
+
var y=yCenter-(item.Up*this.BarMaxHeight/this.MaxValue);
|
|
45623
|
+
aryUpBar.push({ X:x, Y:y});
|
|
45624
|
+
}
|
|
45625
|
+
|
|
45626
|
+
if (IFrameSplitOperator.IsNumber(item.Down))
|
|
45627
|
+
{
|
|
45628
|
+
var y=yCenter+(Math.abs(item.Down)*this.BarMaxHeight/this.MaxValue);
|
|
45629
|
+
aryDownBar.push({X:x, Y:y});
|
|
45630
|
+
}
|
|
45631
|
+
}
|
|
45632
|
+
|
|
45633
|
+
this.DrawBars(aryUpBar, this.UpColor);
|
|
45634
|
+
this.DrawBars(aryDownBar,this.DownColor);
|
|
45635
|
+
}
|
|
45636
|
+
|
|
45637
|
+
this.CalculateBaseLine=function()
|
|
45638
|
+
{
|
|
45639
|
+
if (!this.HQChart) return;
|
|
45640
|
+
|
|
45641
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
45642
|
+
var bMinute=this.IsMinuteFrame();
|
|
45643
|
+
var border=this.ChartFrame.GetBorder();
|
|
45644
|
+
|
|
45645
|
+
if (bMinute)
|
|
45646
|
+
{
|
|
45647
|
+
var chart=this.HQChart.ChartPaint[0];
|
|
45648
|
+
if (!chart || !IFrameSplitOperator.IsNumber(chart.YClose)) return;
|
|
45649
|
+
|
|
45650
|
+
this.YBaseLine=this.ChartFrame.GetYFromData(chart.YClose);
|
|
45651
|
+
if (bHScreen)
|
|
45652
|
+
{
|
|
45653
|
+
this.BarMaxHeight=(border.RightEx-this.YBaseLine)/3;
|
|
45654
|
+
}
|
|
45655
|
+
else
|
|
45656
|
+
{
|
|
45657
|
+
this.BarMaxHeight=(this.YBaseLine-border.TopEx)/3;
|
|
45658
|
+
}
|
|
45659
|
+
}
|
|
45660
|
+
else
|
|
45661
|
+
{
|
|
45662
|
+
//TODO:K线
|
|
45663
|
+
}
|
|
45664
|
+
}
|
|
45665
|
+
|
|
45666
|
+
this.DrawBars=function(aryBar, barColor)
|
|
45667
|
+
{
|
|
45668
|
+
var bHScreen=(this.ChartFrame.IsHScreen===true);
|
|
45669
|
+
var yCenter=this.YBaseLine;
|
|
45670
|
+
this.Canvas.strokeStyle=barColor;
|
|
45671
|
+
this.Canvas.beginPath();
|
|
45672
|
+
var barCount=0;
|
|
45673
|
+
for (var i=0;i<aryBar.length;++i)
|
|
45674
|
+
{
|
|
45675
|
+
var item=aryBar[i];
|
|
45676
|
+
var x=ToFixedPoint(item.X)
|
|
45677
|
+
if (bHScreen)
|
|
45678
|
+
{
|
|
45679
|
+
this.Canvas.moveTo(yCenter,x);
|
|
45680
|
+
this.Canvas.lineTo(item.Y,x);
|
|
45681
|
+
}
|
|
45682
|
+
else
|
|
45683
|
+
{
|
|
45684
|
+
this.Canvas.moveTo(x,yCenter);
|
|
45685
|
+
this.Canvas.lineTo(x,item.Y);
|
|
45686
|
+
}
|
|
45687
|
+
++barCount;
|
|
45688
|
+
}
|
|
45689
|
+
if (barCount>0) this.Canvas.stroke();
|
|
45690
|
+
}
|
|
45691
|
+
|
|
45692
|
+
this.BuildCacheData=function()
|
|
45693
|
+
{
|
|
45694
|
+
this.MaxValue=null;
|
|
45695
|
+
var mapData=new Map();
|
|
45696
|
+
this.MapCache=mapData;
|
|
45697
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryData)) return;
|
|
45698
|
+
|
|
45699
|
+
var max=null, min=null;
|
|
45700
|
+
for(var i=0;i<this.AryData.length;++i)
|
|
45701
|
+
{
|
|
45702
|
+
var item=this.AryData[i];
|
|
45703
|
+
if (!item) continue;
|
|
45704
|
+
|
|
45705
|
+
var key=this.BuildKey(item);
|
|
45706
|
+
mapData.set(key,item);
|
|
45707
|
+
|
|
45708
|
+
if (IFrameSplitOperator.IsNumber(item.Up))
|
|
45709
|
+
{
|
|
45710
|
+
if (!max) max={ Value:item.Up };
|
|
45711
|
+
else if (max.Value<item.Up) max.Value=item.Up;
|
|
45712
|
+
|
|
45713
|
+
if (!min) min={ Value:item.Up };
|
|
45714
|
+
else if (min.Value>item.Up) min.Value=item.Up;
|
|
45715
|
+
}
|
|
45716
|
+
|
|
45717
|
+
if (IFrameSplitOperator.IsNumber(item.Down))
|
|
45718
|
+
{
|
|
45719
|
+
if (!max) max={ Value:item.Down };
|
|
45720
|
+
else if (max.Value<item.Down) max.Value=item.Down;
|
|
45721
|
+
|
|
45722
|
+
if (!min) min={ Value:item.Down };
|
|
45723
|
+
else if (min.Value>item.Down) min.Value=item.Down;
|
|
45724
|
+
}
|
|
45725
|
+
}
|
|
45726
|
+
|
|
45727
|
+
if (max && min)
|
|
45728
|
+
{
|
|
45729
|
+
this.MaxValue=Math.max(Math.abs(max.Value),Math.abs(min.Value));
|
|
45730
|
+
}
|
|
45731
|
+
}
|
|
45732
|
+
|
|
45733
|
+
this.GetMaxMin=function()
|
|
45734
|
+
{
|
|
45735
|
+
return {Min:null, Max:null};
|
|
45736
|
+
}
|
|
45737
|
+
}
|
|
45738
|
+
|
|
45546
45739
|
function ChartClipColorStick()
|
|
45547
45740
|
{
|
|
45548
45741
|
this.newMethod=IChartPainting; //派生
|
|
@@ -79630,6 +79823,12 @@ function JSChartResource()
|
|
|
79630
79823
|
],
|
|
79631
79824
|
}
|
|
79632
79825
|
|
|
79826
|
+
this.ChartBaseLineBar=
|
|
79827
|
+
{
|
|
79828
|
+
UpColor:"rgb(238,21,21)",
|
|
79829
|
+
DownColor:"rgb(25,158,0)"
|
|
79830
|
+
}
|
|
79831
|
+
|
|
79633
79832
|
//手机端tooltip
|
|
79634
79833
|
this.TooltipPaint = {
|
|
79635
79834
|
BGColor:'rgba(250,250,250,0.8)', //背景色
|
|
@@ -80982,6 +81181,8 @@ function JSChartResource()
|
|
|
80982
81181
|
if (style.ChartSimpleDoughnut) this.SetChartSimpleDoughnut(style.ChartSimpleDoughnut);
|
|
80983
81182
|
|
|
80984
81183
|
if (style.ChartSimpleRadar) this.SetChartSimpleRadar(style.ChartSimpleRadar);
|
|
81184
|
+
|
|
81185
|
+
if (style.ChartBaseLineBar) this.SetChartBaseLineBar(style.ChartBaseLineBar);
|
|
80985
81186
|
|
|
80986
81187
|
if (style.DRAWICON)
|
|
80987
81188
|
{
|
|
@@ -82139,6 +82340,14 @@ function JSChartResource()
|
|
|
82139
82340
|
if (IFrameSplitOperator.IsNonEmptyArray(style.AryArea)) dest.AryArea=style.AryArea.slice();
|
|
82140
82341
|
}
|
|
82141
82342
|
|
|
82343
|
+
this.SetChartBaseLineBar=function(style)
|
|
82344
|
+
{
|
|
82345
|
+
var dest=this.ChartBaseLineBar;
|
|
82346
|
+
|
|
82347
|
+
if (style.UpColor) dest.UpColor=style.UpColor;
|
|
82348
|
+
if (style.DownColor) dest.DownColor=style.DownColor;
|
|
82349
|
+
}
|
|
82350
|
+
|
|
82142
82351
|
this.SetIndexLock=function(style)
|
|
82143
82352
|
{
|
|
82144
82353
|
var item=style;
|
|
@@ -85302,7 +85511,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
85302
85511
|
else
|
|
85303
85512
|
{
|
|
85304
85513
|
self.AutoUpdateEvent(true,'KLineChartContainer::RequestHistoryData');
|
|
85305
|
-
self.AutoUpdate();
|
|
85514
|
+
self.AutoUpdate(500);
|
|
85306
85515
|
}
|
|
85307
85516
|
});
|
|
85308
85517
|
|
|
@@ -85622,7 +85831,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
85622
85831
|
else
|
|
85623
85832
|
{
|
|
85624
85833
|
self.AutoUpdateEvent(true,'KLineChartContainer::ReqeustHistoryMinuteData');
|
|
85625
|
-
self.AutoUpdate();
|
|
85834
|
+
self.AutoUpdate(500);
|
|
85626
85835
|
}
|
|
85627
85836
|
});
|
|
85628
85837
|
|
|
@@ -90118,6 +90327,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
90118
90327
|
}
|
|
90119
90328
|
|
|
90120
90329
|
var frequency=this.AutoUpdateFrequency;
|
|
90330
|
+
if (IFrameSplitOperator.IsPlusNumber(waitTime)) frequency=waitTime;
|
|
90121
90331
|
if (marketStatus==1) //盘前
|
|
90122
90332
|
{
|
|
90123
90333
|
this.AutoUpdateTimer=setTimeout(function()
|
|
@@ -126921,7 +127131,8 @@ var SCRIPT_CHART_NAME=
|
|
|
126921
127131
|
|
|
126922
127132
|
CLIP_COLOR_STICK:"CLIP_COLOR_STICK", //上下柱子 裁剪
|
|
126923
127133
|
|
|
126924
|
-
DRAW_KLINE:"DRAWKLINE"
|
|
127134
|
+
DRAW_KLINE:"DRAWKLINE",
|
|
127135
|
+
BASELINE_BAR:"BASELINE_BAR"
|
|
126925
127136
|
}
|
|
126926
127137
|
|
|
126927
127138
|
|
|
@@ -128984,6 +129195,31 @@ function ScriptIndex(name,script,args,option)
|
|
|
128984
129195
|
hqChart.ChartPaint.push(chart);
|
|
128985
129196
|
}
|
|
128986
129197
|
|
|
129198
|
+
this.CreateBaseLineBar=function(hqChart,windowIndex,varItem,id)
|
|
129199
|
+
{
|
|
129200
|
+
var chart=new ChartBaseLineBar();
|
|
129201
|
+
chart.Canvas=hqChart.Canvas;
|
|
129202
|
+
chart.Name=varItem.Name;
|
|
129203
|
+
chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
|
|
129204
|
+
chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
|
|
129205
|
+
chart.HQChart=hqChart;
|
|
129206
|
+
chart.Identify=this.Guid;
|
|
129207
|
+
|
|
129208
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
129209
|
+
chart.AryData=varItem.Draw.DrawData;
|
|
129210
|
+
|
|
129211
|
+
var config=varItem.Draw.Config;
|
|
129212
|
+
if (config)
|
|
129213
|
+
{
|
|
129214
|
+
if (config.UpColor) chart.UpColor=config.UpColor;
|
|
129215
|
+
if (config.DownColor) chart.DownColor=config.DownColor;
|
|
129216
|
+
}
|
|
129217
|
+
|
|
129218
|
+
chart.BuildCacheData();
|
|
129219
|
+
this.SetChartIndexName(chart);
|
|
129220
|
+
hqChart.ChartPaint.push(chart);
|
|
129221
|
+
}
|
|
129222
|
+
|
|
128987
129223
|
|
|
128988
129224
|
this.CreateClipColorStick=function(hqChart,windowIndex,varItem,id)
|
|
128989
129225
|
{
|
|
@@ -129356,6 +129592,9 @@ function ScriptIndex(name,script,args,option)
|
|
|
129356
129592
|
case SCRIPT_CHART_NAME.CLIP_COLOR_STICK:
|
|
129357
129593
|
this.CreateClipColorStick(hqChart,windowIndex,item,i);
|
|
129358
129594
|
break;
|
|
129595
|
+
case SCRIPT_CHART_NAME.BASELINE_BAR:
|
|
129596
|
+
this.CreateBaseLineBar(hqChart,windowIndex,item,i);
|
|
129597
|
+
break;
|
|
129359
129598
|
default:
|
|
129360
129599
|
{
|
|
129361
129600
|
var find=g_ScriptIndexChartFactory.Get(item.Draw.DrawType); //外部挂接
|
|
@@ -129709,6 +129948,9 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
129709
129948
|
case SCRIPT_CHART_NAME.OVERLAY_BARS:
|
|
129710
129949
|
this.CreateStackedBar(hqChart,windowIndex,item,i);
|
|
129711
129950
|
break;
|
|
129951
|
+
case SCRIPT_CHART_NAME.BASELINE_BAR:
|
|
129952
|
+
this.CreateBaseLineBar(hqChart,windowIndex,item,i);
|
|
129953
|
+
break;
|
|
129712
129954
|
case "DRAWCOLORKLINE":
|
|
129713
129955
|
this.CreateDrawColorKLine(hqChart,windowIndex,item,i);
|
|
129714
129956
|
break;
|
|
@@ -130521,6 +130763,32 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
130521
130763
|
frame.ChartPaint.push(chart);
|
|
130522
130764
|
}
|
|
130523
130765
|
|
|
130766
|
+
this.CreateBaseLineBar=function(hqChart,windowIndex,varItem,id)
|
|
130767
|
+
{
|
|
130768
|
+
var overlayIndex=this.OverlayIndex;
|
|
130769
|
+
var frame=overlayIndex.Frame;
|
|
130770
|
+
var chart=new ChartBaseLineBar();
|
|
130771
|
+
chart.Canvas=hqChart.Canvas;
|
|
130772
|
+
chart.Name=varItem.Name;
|
|
130773
|
+
chart.HQChart=hqChart;
|
|
130774
|
+
chart.ChartBorder=frame.Frame.ChartBorder;
|
|
130775
|
+
chart.ChartFrame=frame.Frame;
|
|
130776
|
+
chart.Identify=overlayIndex.Identify;
|
|
130777
|
+
|
|
130778
|
+
chart.Data=hqChart.GetKData(); //绑定K线
|
|
130779
|
+
chart.AryData=varItem.Draw.DrawData;
|
|
130780
|
+
|
|
130781
|
+
var config=varItem.Draw.Config;
|
|
130782
|
+
if (config)
|
|
130783
|
+
{
|
|
130784
|
+
if (config.UpColor) chart.UpColor=config.UpColor;
|
|
130785
|
+
if (config.DownColor) chart.DownColor=config.DownColor;
|
|
130786
|
+
}
|
|
130787
|
+
|
|
130788
|
+
chart.BuildCacheData();
|
|
130789
|
+
frame.ChartPaint.push(chart);
|
|
130790
|
+
}
|
|
130791
|
+
|
|
130524
130792
|
|
|
130525
130793
|
//创建通道
|
|
130526
130794
|
this.CreateChannel=function(hqChart,windowIndex,varItem,id)
|
|
@@ -132430,6 +132698,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
132430
132698
|
if (draw.Option) outVarItem.Option=draw.Option;
|
|
132431
132699
|
result.push(outVarItem);
|
|
132432
132700
|
}
|
|
132701
|
+
else if (draw.DrawType==SCRIPT_CHART_NAME.BASELINE_BAR)
|
|
132702
|
+
{
|
|
132703
|
+
drawItem.Name=draw.Name;
|
|
132704
|
+
drawItem.Type=draw.Type;
|
|
132705
|
+
drawItem.DrawType=draw.DrawType;
|
|
132706
|
+
drawItem.DrawData=draw.DrawData;
|
|
132707
|
+
drawItem.Config=draw.Config;
|
|
132708
|
+
|
|
132709
|
+
outVarItem.Draw=drawItem;
|
|
132710
|
+
result.push(outVarItem);
|
|
132711
|
+
}
|
|
132433
132712
|
else if (draw.DrawType=='MULTI_LINE')
|
|
132434
132713
|
{
|
|
132435
132714
|
drawItem.Text=draw.Text;
|
|
@@ -135399,7 +135678,7 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
135399
135678
|
|
|
135400
135679
|
if (item[11]) dealItem.Symbol=item[11]; //股票代码
|
|
135401
135680
|
if (item[12]) dealItem.Name=item[12]; //股票名称
|
|
135402
|
-
if (item[13]) dealItem.BGColor=item[13]; //整行颜色
|
|
135681
|
+
if (item[13] || item[13]===null) dealItem.BGColor=item[13]; //整行颜色
|
|
135403
135682
|
|
|
135404
135683
|
if (item[100]) dealItem.Guid=item[100];
|
|
135405
135684
|
|
|
@@ -149785,7 +150064,7 @@ function ScrollBarBGChart()
|
|
|
149785
150064
|
|
|
149786
150065
|
|
|
149787
150066
|
|
|
149788
|
-
var HQCHART_VERSION="1.1.
|
|
150067
|
+
var HQCHART_VERSION="1.1.14842";
|
|
149789
150068
|
|
|
149790
150069
|
function PrintHQChartVersion()
|
|
149791
150070
|
{
|
|
@@ -57687,6 +57687,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
57687
57687
|
HQData.APIIndex_KLINE_TABLE(data, callback);
|
|
57688
57688
|
else if (request.Data.indexname=="API_DRAWSVG")
|
|
57689
57689
|
HQData.APIIndex_DRAWSVG(data, callback);
|
|
57690
|
+
else if (request.Data.indexname=="API_BASELINE_BAR")
|
|
57691
|
+
HQData.APIIndex_BASELINE_BAR(data, callback);
|
|
57690
57692
|
}
|
|
57691
57693
|
|
|
57692
57694
|
|
|
@@ -59035,6 +59037,44 @@ HQData.RequestVolumeProfileData=function(data, callback)
|
|
|
59035
59037
|
}
|
|
59036
59038
|
|
|
59037
59039
|
|
|
59040
|
+
HQData.APIIndex_BASELINE_BAR=function(data, callback)
|
|
59041
|
+
{
|
|
59042
|
+
data.PreventDefault=true;
|
|
59043
|
+
var hqchart=data.HQChart;
|
|
59044
|
+
var kData=hqchart.GetKData();
|
|
59045
|
+
|
|
59046
|
+
var pointData=
|
|
59047
|
+
{
|
|
59048
|
+
name:"BASELINE_BAR", type:1,
|
|
59049
|
+
Draw:
|
|
59050
|
+
{
|
|
59051
|
+
Name:"BASELINE_BAR",
|
|
59052
|
+
DrawType:"BASELINE_BAR",
|
|
59053
|
+
DrawData:[],
|
|
59054
|
+
Config:{ },
|
|
59055
|
+
},
|
|
59056
|
+
};
|
|
59057
|
+
|
|
59058
|
+
for(var i=0;i<kData.Data.length;++i)
|
|
59059
|
+
{
|
|
59060
|
+
var kItem=kData.Data[i];
|
|
59061
|
+
|
|
59062
|
+
var item={ Date:kItem.Date, Time:kItem.Time, Up:kItem.Vol*0.2, Down:(kItem.Vol*0.35)*-1 };
|
|
59063
|
+
pointData.Draw.DrawData.push(item);
|
|
59064
|
+
}
|
|
59065
|
+
|
|
59066
|
+
var apiData=
|
|
59067
|
+
{
|
|
59068
|
+
code:0,
|
|
59069
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
59070
|
+
outdata: { date:kData.GetDate(), time:kData.GetTime(), outvar:[ pointData] },
|
|
59071
|
+
};
|
|
59072
|
+
|
|
59073
|
+
console.log('[HQData.APIIndex_BASELINE_BAR] apiData ', apiData);
|
|
59074
|
+
callback(apiData);
|
|
59075
|
+
}
|
|
59076
|
+
|
|
59077
|
+
|
|
59038
59078
|
|
|
59039
59079
|
|
|
59040
59080
|
/*暴露外部用的方法*/
|