hqchart 1.1.15111 → 1.1.15121
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 +23 -16
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogSearchIndex.js +1 -5
- package/src/jscommon/umychart.NetworkFilterTest.js +125 -1
- package/src/jscommon/umychart.js +107 -64
- package/src/jscommon/umychart.testdata.js +125 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +109 -65
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +125 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +110 -70
package/src/jscommon/umychart.js
CHANGED
|
@@ -2626,6 +2626,14 @@ JSChart.RegisterChartFrameClass=function(name, option)
|
|
|
2626
2626
|
}
|
|
2627
2627
|
|
|
2628
2628
|
|
|
2629
|
+
//注册DOM对话框类
|
|
2630
|
+
//option:{ Create:创建类方法 }
|
|
2631
|
+
JSChart.RegisterDOMClass=function(name, option)
|
|
2632
|
+
{
|
|
2633
|
+
return g_JSDOMFactory.Add(name, option);
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
|
|
2629
2637
|
//一些公共函数
|
|
2630
2638
|
JSChart.ToFixedPoint=function(value)
|
|
2631
2639
|
{
|
|
@@ -12559,6 +12567,36 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12559
12567
|
this.UpdateWindowIndexV2(aryUpdate);
|
|
12560
12568
|
return true;
|
|
12561
12569
|
}
|
|
12570
|
+
|
|
12571
|
+
this.TryClickLock=function(x,y)
|
|
12572
|
+
{
|
|
12573
|
+
if (!this.Frame || !IFrameSplitOperator.IsNonEmptyArray(this.Frame.SubFrame)) return false;
|
|
12574
|
+
|
|
12575
|
+
for(var i=0;i<this.Frame.SubFrame.length; ++i)
|
|
12576
|
+
{
|
|
12577
|
+
var item=this.Frame.SubFrame[i];
|
|
12578
|
+
var chartLock=item.Frame.LockPaint;
|
|
12579
|
+
if (!chartLock || !chartLock.LockRect) continue;
|
|
12580
|
+
|
|
12581
|
+
var tooltip=new TooltipData();
|
|
12582
|
+
if (!chartLock.GetTooltipData(x,y,tooltip)) continue;
|
|
12583
|
+
|
|
12584
|
+
tooltip.HQChart=this;
|
|
12585
|
+
|
|
12586
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
|
|
12587
|
+
if (event && event.Callback)
|
|
12588
|
+
{
|
|
12589
|
+
var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
|
|
12590
|
+
event.Callback(event,sendData,this);
|
|
12591
|
+
}
|
|
12592
|
+
|
|
12593
|
+
|
|
12594
|
+
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
12595
|
+
return true;
|
|
12596
|
+
}
|
|
12597
|
+
|
|
12598
|
+
return false;
|
|
12599
|
+
}
|
|
12562
12600
|
}
|
|
12563
12601
|
|
|
12564
12602
|
function GetDevicePixelRatio()
|
|
@@ -16314,7 +16352,7 @@ function AverageWidthFrame()
|
|
|
16314
16352
|
|
|
16315
16353
|
if (this.ClassName=="MinuteFrame" || this.ClassName=="KLineFrame")
|
|
16316
16354
|
{
|
|
16317
|
-
this.DivFrameToolbar=new JSDivFrameToolbar();
|
|
16355
|
+
this.DivFrameToolbar=g_JSDOMFactory.Create('JSDivFrameToolbar');//new JSDivFrameToolbar();
|
|
16318
16356
|
this.DivFrameToolbar.HQChart=hqchart;
|
|
16319
16357
|
this.DivFrameToolbar.DivHQChart=divHQChart;
|
|
16320
16358
|
this.DivFrameToolbar.FrameID=frameID;
|
|
@@ -26859,9 +26897,20 @@ function IChartPainting()
|
|
|
26859
26897
|
var x=left+width/2;
|
|
26860
26898
|
var y=top+height/2;
|
|
26861
26899
|
|
|
26900
|
+
var bHScreen=this.ChartFrame.IsHScreen;
|
|
26901
|
+
if (bHScreen)
|
|
26902
|
+
{
|
|
26903
|
+
this.Canvas.save();
|
|
26904
|
+
this.Canvas.translate(x, y);
|
|
26905
|
+
this.Canvas.rotate(90 * Math.PI / 180);
|
|
26906
|
+
x=0,y=0;
|
|
26907
|
+
}
|
|
26908
|
+
|
|
26862
26909
|
this.Canvas.textAlign="center";
|
|
26863
26910
|
this.Canvas.textBaseline="middle";
|
|
26864
26911
|
this.Canvas.fillText(this.NotSupportMessage,x,y);
|
|
26912
|
+
|
|
26913
|
+
if (bHScreen) this.Canvas.restore();
|
|
26865
26914
|
}
|
|
26866
26915
|
|
|
26867
26916
|
this.GetTooltipData=function(x,y,tooltip)
|
|
@@ -47903,6 +47952,8 @@ function ChartLock()
|
|
|
47903
47952
|
this.IndexName; //指标名字
|
|
47904
47953
|
this.IndexID; //指标ID
|
|
47905
47954
|
|
|
47955
|
+
this.MinWidthText=" 付费指标 "
|
|
47956
|
+
|
|
47906
47957
|
this.SetData=function(aryData)
|
|
47907
47958
|
{
|
|
47908
47959
|
this.AryData=aryData;
|
|
@@ -48030,11 +48081,27 @@ function ChartLock()
|
|
|
48030
48081
|
}
|
|
48031
48082
|
}
|
|
48032
48083
|
|
|
48084
|
+
this.Canvas.font=this.Font;
|
|
48085
|
+
var minWidth=this.Canvas.measureText(this.MinWidthText).width;
|
|
48086
|
+
|
|
48087
|
+
var aryText=null;
|
|
48088
|
+
if (Array.isArray(this.Title)) aryText=this.Title;
|
|
48089
|
+
else aryText=[{Text:this.Title}];
|
|
48090
|
+
|
|
48091
|
+
var outSize={ };
|
|
48092
|
+
if (!this.CalculateTextSize(aryText, this.Font, outSize)) outSize=null;
|
|
48093
|
+
if (outSize && outSize.Width+8>minWidth) minWidth=outSize.Width+8; //确保文字可以显示
|
|
48094
|
+
|
|
48033
48095
|
if (bHScreen)
|
|
48034
48096
|
{
|
|
48035
48097
|
var rtBG={ Left:border.Left, Right:border.RightEx, Top:left, Bottom:border.Bottom };
|
|
48036
48098
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
48037
48099
|
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
48100
|
+
if (rtBG.Height<minWidth)
|
|
48101
|
+
{
|
|
48102
|
+
rtBG.Height=minWidth;
|
|
48103
|
+
rtBG.Top=rtBG.Bottom-rtBG.Height;
|
|
48104
|
+
}
|
|
48038
48105
|
this.LockRect=rtBG; //保存上锁区域
|
|
48039
48106
|
|
|
48040
48107
|
if (bDraw)
|
|
@@ -48049,6 +48116,11 @@ function ChartLock()
|
|
|
48049
48116
|
var rtBG={ Left:left, Right:border.RightEx, Top:border.TopTitle, Bottom:border.Bottom };
|
|
48050
48117
|
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
48051
48118
|
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
48119
|
+
if (rtBG.Width<minWidth)
|
|
48120
|
+
{
|
|
48121
|
+
rtBG.Width=minWidth;
|
|
48122
|
+
rtBG.Left=rtBG.Right-rtBG.Width;
|
|
48123
|
+
}
|
|
48052
48124
|
this.LockRect=rtBG; //保存上锁区域
|
|
48053
48125
|
|
|
48054
48126
|
if (bDraw)
|
|
@@ -48061,13 +48133,7 @@ function ChartLock()
|
|
|
48061
48133
|
}
|
|
48062
48134
|
|
|
48063
48135
|
if (!bDraw) return;
|
|
48064
|
-
|
|
48065
|
-
var aryText=null;
|
|
48066
|
-
if (Array.isArray(this.Title)) aryText=this.Title;
|
|
48067
|
-
else aryText=[{Text:this.Title}];
|
|
48068
|
-
|
|
48069
|
-
var outSize={ };
|
|
48070
|
-
if (!this.CalculateTextSize(aryText, this.Font, outSize)) return;
|
|
48136
|
+
if (!outSize) return;
|
|
48071
48137
|
|
|
48072
48138
|
this.Canvas.textAlign='left';
|
|
48073
48139
|
this.Canvas.textBaseline='bottom';
|
|
@@ -86722,32 +86788,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86722
86788
|
}
|
|
86723
86789
|
}
|
|
86724
86790
|
|
|
86725
|
-
this.TryClickLock=function(x,y)
|
|
86726
|
-
{
|
|
86727
|
-
for(var i=0;i<this.Frame.SubFrame.length; ++i)
|
|
86728
|
-
{
|
|
86729
|
-
var item=this.Frame.SubFrame[i];
|
|
86730
|
-
var chartLock=item.Frame.LockPaint;
|
|
86731
|
-
if (!chartLock || !chartLock.LockRect) continue;
|
|
86732
|
-
|
|
86733
|
-
var tooltip=new TooltipData();
|
|
86734
|
-
if (!chartLock.GetTooltipData(x,y,tooltip)) continue;
|
|
86735
|
-
|
|
86736
|
-
tooltip.HQChart=this;
|
|
86737
|
-
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
|
|
86738
|
-
if (event && event.Callback)
|
|
86739
|
-
{
|
|
86740
|
-
var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
|
|
86741
|
-
event.Callback(event,sendData,this);
|
|
86742
|
-
}
|
|
86743
|
-
|
|
86744
|
-
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
86745
|
-
return true;
|
|
86746
|
-
}
|
|
86747
|
-
|
|
86748
|
-
return false;
|
|
86749
|
-
}
|
|
86750
|
-
|
|
86751
86791
|
this.TryClickIndexTitle=function(x,y)
|
|
86752
86792
|
{
|
|
86753
86793
|
for(var i in this.TitlePaint)
|
|
@@ -96554,34 +96594,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
96554
96594
|
|
|
96555
96595
|
return false;
|
|
96556
96596
|
}
|
|
96557
|
-
|
|
96558
|
-
this.TryClickLock=function(x,y)
|
|
96559
|
-
{
|
|
96560
|
-
for(var i=0;i<this.Frame.SubFrame.length; ++i)
|
|
96561
|
-
{
|
|
96562
|
-
var item=this.Frame.SubFrame[i];
|
|
96563
|
-
var chartLock=item.Frame.LockPaint;
|
|
96564
|
-
if (!chartLock || !chartLock.LockRect) continue;
|
|
96565
|
-
|
|
96566
|
-
var tooltip=new TooltipData();
|
|
96567
|
-
if (!chartLock.GetTooltipData(x,y,tooltip)) continue;
|
|
96568
|
-
|
|
96569
|
-
tooltip.HQChart=this;
|
|
96570
|
-
|
|
96571
|
-
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_INDEX_LOCK);
|
|
96572
|
-
if (event && event.Callback)
|
|
96573
|
-
{
|
|
96574
|
-
var sendData={ FrameID:item.Frame.Identify, Data:tooltip };
|
|
96575
|
-
event.Callback(event,sendData,this);
|
|
96576
|
-
}
|
|
96577
|
-
|
|
96578
|
-
|
|
96579
|
-
if (tooltip.Data.Callback) tooltip.Data.Callback(tooltip);
|
|
96580
|
-
return true;
|
|
96581
|
-
}
|
|
96582
|
-
|
|
96583
|
-
return false;
|
|
96584
|
-
}
|
|
96585
96597
|
}
|
|
96586
96598
|
|
|
96587
96599
|
//盘前数据
|
|
@@ -98533,6 +98545,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
98533
98545
|
frame.RightSpaceCount=this.RightSpaceCount; //右边
|
|
98534
98546
|
frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
|
|
98535
98547
|
frame.GlobalOption=this.GlobalOption;
|
|
98548
|
+
frame.CreateLockPaint();
|
|
98536
98549
|
|
|
98537
98550
|
frame.HorizontalMax=20;
|
|
98538
98551
|
frame.HorizontalMin=10;
|
|
@@ -98721,6 +98734,7 @@ function MinuteChartHScreenContainer(uielement)
|
|
|
98721
98734
|
frame.XPointCount=243;
|
|
98722
98735
|
frame.HQChart=this;
|
|
98723
98736
|
frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
98737
|
+
frame.CreateLockPaint();
|
|
98724
98738
|
|
|
98725
98739
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
98726
98740
|
frame.HorizontalMax=DEFAULT_HORIZONTAL[0];
|
|
@@ -105496,8 +105510,6 @@ function JSDivFrameToolbar()
|
|
|
105496
105510
|
this.SetToolbar(aryButton); //重新设置按钮
|
|
105497
105511
|
}
|
|
105498
105512
|
|
|
105499
|
-
|
|
105500
|
-
|
|
105501
105513
|
this.Destroy=function()
|
|
105502
105514
|
{
|
|
105503
105515
|
if (this.DivToolbar)
|
|
@@ -105679,6 +105691,37 @@ JSDivFrameToolbar.GetDfaultButtons=function()
|
|
|
105679
105691
|
}
|
|
105680
105692
|
|
|
105681
105693
|
|
|
105694
|
+
|
|
105695
|
+
//DOM工厂类
|
|
105696
|
+
function JSDOMFactory()
|
|
105697
|
+
{
|
|
105698
|
+
//[key:name, { Create:function(divElement) { return new class(divElement); }} ]
|
|
105699
|
+
this.DataMap=new Map(
|
|
105700
|
+
[
|
|
105701
|
+
["JSDivFrameToolbar", { Create:function(option) { return new JSDivFrameToolbar(option); } }],
|
|
105702
|
+
]);
|
|
105703
|
+
|
|
105704
|
+
this.Create=function(name, option)
|
|
105705
|
+
{
|
|
105706
|
+
if (!this.DataMap.has(name))
|
|
105707
|
+
{
|
|
105708
|
+
JSConsole.Chart.Warn(`[JSDOMFactory::Create] can't find class=${name}.`);
|
|
105709
|
+
return null;
|
|
105710
|
+
}
|
|
105711
|
+
|
|
105712
|
+
var item=this.DataMap.get(name);
|
|
105713
|
+
return item.Create(option);
|
|
105714
|
+
}
|
|
105715
|
+
|
|
105716
|
+
this.Add=function(name, option)
|
|
105717
|
+
{
|
|
105718
|
+
this.DataMap.set(name, { Create:option.Create } );
|
|
105719
|
+
}
|
|
105720
|
+
}
|
|
105721
|
+
|
|
105722
|
+
var g_JSDOMFactory=new JSDOMFactory();
|
|
105723
|
+
|
|
105724
|
+
|
|
105682
105725
|
function JSToolbarTooltip()
|
|
105683
105726
|
{
|
|
105684
105727
|
this.DivTooltip=null;
|
|
@@ -351,7 +351,7 @@ HQData.Minute_RequestMinuteData=function(data, callback)
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
//盘中
|
|
354
|
-
stockItem.minute.length=50;
|
|
354
|
+
//stockItem.minute.length=50;
|
|
355
355
|
//测试用 这里可以修改数据
|
|
356
356
|
//var lastItem=srcStock.minute[srcStock.minute.length-1];
|
|
357
357
|
//lastItem.price+=Math.ceil(Math.random()*10)/1000*lastItem.price;
|
|
@@ -1967,6 +1967,9 @@ HQData.Report_RequestStockData=function(data, callback)
|
|
|
1967
1967
|
var testDate=new Date();
|
|
1968
1968
|
testDate.setHours(testDate.getHours() + i*2)
|
|
1969
1969
|
newItem[401]={ DateTime:testDate } ;
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
newItem[JSCHART_DATA_FIELD_ID.REPORT_EXTENDDATA]={ Value:"ddddd" };
|
|
1970
1973
|
|
|
1971
1974
|
|
|
1972
1975
|
item.Data=newItem;
|
|
@@ -2684,6 +2687,8 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
2684
2687
|
HQData.APIIndex_SCATTER_PLOT_V2(data, callback);
|
|
2685
2688
|
else if (request.Data.indexname=="API_KLINE_TABLE")
|
|
2686
2689
|
HQData.APIIndex_KLINE_TABLE(data, callback);
|
|
2690
|
+
else if (request.Data.indexname=="API_MINUTE_TABLE")
|
|
2691
|
+
HQData.APIIndex_MINUTE_TABLE(data, callback);
|
|
2687
2692
|
else if (request.Data.indexname=="API_DRAWSVG")
|
|
2688
2693
|
HQData.APIIndex_DRAWSVG(data, callback);
|
|
2689
2694
|
else if (request.Data.indexname=="API_BASELINE_BAR")
|
|
@@ -2691,6 +2696,9 @@ HQData.Report_APIIndex=function(data, callback)
|
|
|
2691
2696
|
else if (request.Data.indexname=="API_VERTLINE")
|
|
2692
2697
|
HQData.APIIndex_VERTLINE(data, callback);
|
|
2693
2698
|
|
|
2699
|
+
else if (request.Data.indexname=="API_ERRORMESSAGE")
|
|
2700
|
+
HQData.APIIndex_ErrorMessage(data, callback);
|
|
2701
|
+
|
|
2694
2702
|
|
|
2695
2703
|
//付费图形
|
|
2696
2704
|
else if (request.Data.indexname=="API_MARK_AREA_V2")
|
|
@@ -3886,6 +3894,114 @@ HQData.APIIndex_KLINE_TABLE=function(data, callback)
|
|
|
3886
3894
|
}
|
|
3887
3895
|
|
|
3888
3896
|
|
|
3897
|
+
HQData.APIIndex_MINUTE_TABLE=function(data, callback)
|
|
3898
|
+
{
|
|
3899
|
+
data.PreventDefault=true;
|
|
3900
|
+
var hqchart=data.HQChart;
|
|
3901
|
+
var kData=data.HQChart.GetKData(); //hqchart图形的分钟数据
|
|
3902
|
+
|
|
3903
|
+
var tableData=
|
|
3904
|
+
{
|
|
3905
|
+
name:'JS_CHART_MINUTETABLE_9DFC', type:1,
|
|
3906
|
+
Draw:
|
|
3907
|
+
{
|
|
3908
|
+
DrawType:'JS_CHART_MINUTETABLE_9DFC',
|
|
3909
|
+
DrawData:[ ] , //数据 [ [ { Text, Color: BGColor }, ...... ], [],]
|
|
3910
|
+
|
|
3911
|
+
Config:
|
|
3912
|
+
{
|
|
3913
|
+
//BGColor:"rgba(238,232,205,0.5)",
|
|
3914
|
+
//BorderColor:"rgb(220,220,220)",
|
|
3915
|
+
TextColor:"rgb(250,250,250)",
|
|
3916
|
+
ItemMergin:{ Left:1, Right:1, Top:0, Bottom:0, YOffset:0 },
|
|
3917
|
+
TextFont:{ Family:'微软雅黑' , FontMaxSize:14*GetDevicePixelRatio(), },
|
|
3918
|
+
Style:1,
|
|
3919
|
+
CellWidth:18*GetDevicePixelRatio(),
|
|
3920
|
+
CellHeight:14*GetDevicePixelRatio(),
|
|
3921
|
+
RowCount:2,
|
|
3922
|
+
LineColor:"rgb(5,105,225)",
|
|
3923
|
+
LineDash:[5*GetDevicePixelRatio(),5*GetDevicePixelRatio()],
|
|
3924
|
+
}
|
|
3925
|
+
},
|
|
3926
|
+
|
|
3927
|
+
};
|
|
3928
|
+
|
|
3929
|
+
for(var i=0;i<kData.Data.length;++i)
|
|
3930
|
+
{
|
|
3931
|
+
var kItem=kData.Data[i];
|
|
3932
|
+
|
|
3933
|
+
//一列数据
|
|
3934
|
+
var colItem={ Date:kItem.Date, Time:kItem.Time, Data:[ ] };
|
|
3935
|
+
|
|
3936
|
+
if (kItem.Time==1030 || kItem.Time==1035)
|
|
3937
|
+
{
|
|
3938
|
+
colItem.Data[0]=
|
|
3939
|
+
{
|
|
3940
|
+
Text:"多", Color:"rgb(250,250,250)", BGColor:'rgb(250,0,0)', TextAlign:"center",
|
|
3941
|
+
Tooltip:
|
|
3942
|
+
{
|
|
3943
|
+
AryText:
|
|
3944
|
+
[
|
|
3945
|
+
{Title:"日期", Text:`${kItem.Date} ${kItem.Time}`},
|
|
3946
|
+
{Title:"买入价", Text:`${kItem.Close.toFixed(2)}`, TextColor:"rgb(250,0,0)"},
|
|
3947
|
+
{Title:"数量", Text:`${HQData.GetRandomTestData(100,400).toFixed(0)}`,TextColor:"rgb(255,165,0)" },
|
|
3948
|
+
]
|
|
3949
|
+
}
|
|
3950
|
+
};
|
|
3951
|
+
}
|
|
3952
|
+
else if (kItem.Time==1033 || kItem.Time==1025)
|
|
3953
|
+
{
|
|
3954
|
+
colItem.Data[0]=
|
|
3955
|
+
{
|
|
3956
|
+
Text:"空", Color:"rgb(250,250,250)", BGColor:'rgb(0,128,0)', TextAlign:"center",
|
|
3957
|
+
Tooltip:
|
|
3958
|
+
{
|
|
3959
|
+
AryText:
|
|
3960
|
+
[
|
|
3961
|
+
{Title:"日期", Text:`${kItem.Date} ${kItem.Time}`},
|
|
3962
|
+
{Title:"买入价", Text:`${kItem.Close.toFixed(2)}`, TextColor:"rgb(250,0,0)"},
|
|
3963
|
+
{Title:"数量", Text:`${HQData.GetRandomTestData(100,400).toFixed(0)}`,TextColor:"rgb(255,165,0)" },
|
|
3964
|
+
]
|
|
3965
|
+
}
|
|
3966
|
+
};
|
|
3967
|
+
}
|
|
3968
|
+
else if (kItem.Time==1028 || kItem.Time==1032 || kItem.Time==1034 )
|
|
3969
|
+
{
|
|
3970
|
+
colItem.Data[1]=
|
|
3971
|
+
{
|
|
3972
|
+
Text:"平", Color:"rgb(250,250,250)", BGColor:'rgb(255,165,0)', TextAlign:"center",
|
|
3973
|
+
Tooltip:
|
|
3974
|
+
{
|
|
3975
|
+
AryText:
|
|
3976
|
+
[
|
|
3977
|
+
{Title:"日期", Text:`${kItem.Date} ${kItem.Time}`},
|
|
3978
|
+
{Title:"卖入价", Text:`${kItem.Close.toFixed(2)}`, TextColor:"rgb(34,139,34)"},
|
|
3979
|
+
{Title:"数量", Text:`${HQData.GetRandomTestData(100,400).toFixed(0)}`,TextColor:"rgb(255,165,0)" },
|
|
3980
|
+
]
|
|
3981
|
+
}
|
|
3982
|
+
};
|
|
3983
|
+
}
|
|
3984
|
+
else
|
|
3985
|
+
{
|
|
3986
|
+
continue;
|
|
3987
|
+
}
|
|
3988
|
+
|
|
3989
|
+
|
|
3990
|
+
tableData.Draw.DrawData.push(colItem);
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
var apiData=
|
|
3994
|
+
{
|
|
3995
|
+
code:0,
|
|
3996
|
+
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
3997
|
+
outdata: { date:kData.GetDate(), time:kData.GetTime(), outvar:[tableData] }
|
|
3998
|
+
};
|
|
3999
|
+
|
|
4000
|
+
console.log('[KLineChart::APIIndex_KLINE_TABLE2] apiData ', apiData);
|
|
4001
|
+
callback(apiData);
|
|
4002
|
+
}
|
|
4003
|
+
|
|
4004
|
+
|
|
3889
4005
|
HQData.APIIndex_DRAWSVG=function(data, callback)
|
|
3890
4006
|
{
|
|
3891
4007
|
data.PreventDefault=true;
|
|
@@ -4274,3 +4390,11 @@ HQData.API_CHART_AREA_TEXT=function(data, callback)
|
|
|
4274
4390
|
}
|
|
4275
4391
|
|
|
4276
4392
|
|
|
4393
|
+
HQData.APIIndex_ErrorMessage=function(data, callback)
|
|
4394
|
+
{
|
|
4395
|
+
var hqchartData={ outdata:{ date:null, time:null, outvar:[] } , code:0};
|
|
4396
|
+
hqchartData.error={ message:"错误提示信息" };
|
|
4397
|
+
callback(hqchartData);
|
|
4398
|
+
}
|
|
4399
|
+
|
|
4400
|
+
|