hqchart 1.1.14508 → 1.1.14514
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 +387 -235
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +10 -6
- package/src/jscommon/umychart.js +221 -105
- package/src/jscommon/umychart.report.js +13 -3
- package/src/jscommon/umychart.testdata.js +10 -6
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +235 -109
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +10 -6
- package/src/jscommon/umychart.vue/umychart.vue.js +235 -109
package/package.json
CHANGED
|
@@ -57617,7 +57617,7 @@ HQData.APIIndex_DRAWBAND=function(data, callback)
|
|
|
57617
57617
|
DrawType:"DRAWBAND",
|
|
57618
57618
|
DrawData:[],
|
|
57619
57619
|
Color:["rgb(220,20,60)","rgb(34,139,34)"]
|
|
57620
|
-
}
|
|
57620
|
+
},
|
|
57621
57621
|
};
|
|
57622
57622
|
|
|
57623
57623
|
for(var i=0;i<kData.Data.length;++i)
|
|
@@ -57663,7 +57663,7 @@ HQData.APIIndex_MULTI_LINE=function(data, callback)
|
|
|
57663
57663
|
}
|
|
57664
57664
|
}, //绘制线段数组
|
|
57665
57665
|
|
|
57666
|
-
IsShowTitle:
|
|
57666
|
+
IsShowTitle:true,
|
|
57667
57667
|
};
|
|
57668
57668
|
|
|
57669
57669
|
var point3=
|
|
@@ -57752,7 +57752,9 @@ HQData.APIIndex_MULTI_SVGICON=function(data, callback)
|
|
|
57752
57752
|
//{ Date:20190919, Value:15.3, Symbol:'\ue615', Color:'rgb(240,240,0)', Baseline:2 },
|
|
57753
57753
|
//{ Date:20190909, Value:15.4, Symbol:'\ue615', Color:'rgb(240,100,30)'}
|
|
57754
57754
|
]
|
|
57755
|
-
}
|
|
57755
|
+
},
|
|
57756
|
+
|
|
57757
|
+
|
|
57756
57758
|
} //绘制图标数组
|
|
57757
57759
|
};
|
|
57758
57760
|
|
|
@@ -58135,8 +58137,8 @@ HQData.APIIndex_MULTI_BAR=function(data, callback)
|
|
|
58135
58137
|
{
|
|
58136
58138
|
DrawType:'MULTI_BAR',
|
|
58137
58139
|
DrawData:[]
|
|
58138
|
-
},
|
|
58139
|
-
IsShowTitle:
|
|
58140
|
+
}, //绘制柱子数组
|
|
58141
|
+
IsShowTitle:true,
|
|
58140
58142
|
};
|
|
58141
58143
|
|
|
58142
58144
|
//第一组柱子
|
|
@@ -58428,7 +58430,9 @@ HQData.APIIndex_TITLE=function(data, callback)
|
|
|
58428
58430
|
{
|
|
58429
58431
|
code:0,
|
|
58430
58432
|
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
58431
|
-
outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] }
|
|
58433
|
+
outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] },
|
|
58434
|
+
|
|
58435
|
+
//error: { message:"无权限查看指标“测试指标1”" }
|
|
58432
58436
|
};
|
|
58433
58437
|
|
|
58434
58438
|
console.log('[HQData.APIIndex_TITLE] apiData ', apiData);
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -3148,9 +3148,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3148
3148
|
this.DialogModifyIndexParam; //指标参数修改
|
|
3149
3149
|
|
|
3150
3150
|
|
|
3151
|
-
this.RestoreFocusTimer=null;
|
|
3152
|
-
this.
|
|
3153
|
-
|
|
3151
|
+
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
3152
|
+
this.PreventRightMenu={ Timer:null, Enable:false, Delay:2000 }; //阻止右键菜单
|
|
3153
|
+
|
|
3154
3154
|
this.RestoreFocus=function(delay)
|
|
3155
3155
|
{
|
|
3156
3156
|
var value=1000;
|
|
@@ -3592,17 +3592,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3592
3592
|
|
|
3593
3593
|
this.UIOnContextMenu=function(e)
|
|
3594
3594
|
{
|
|
3595
|
+
if (e)
|
|
3596
|
+
{
|
|
3597
|
+
if (e.preventDefault) e.preventDefault();
|
|
3598
|
+
if (e.stopPropagation) e.stopPropagation();
|
|
3599
|
+
e.returnValue=false;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3595
3602
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
3596
3603
|
if (!this.IsShowRightMenu) return;
|
|
3604
|
+
if (this.PreventRightMenu.Enable) return;
|
|
3597
3605
|
|
|
3598
3606
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
3599
3607
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
3600
3608
|
|
|
3601
3609
|
if(typeof(this.OnRightMenu)=='function') this.OnRightMenu(x,y,e); //右键菜单事件
|
|
3602
|
-
|
|
3603
|
-
if (e && e.preventDefault) e.preventDefault();
|
|
3604
|
-
if (e && e.stopPropagation) e.stopPropagation();
|
|
3605
|
-
e.returnValue=false;
|
|
3606
3610
|
}
|
|
3607
3611
|
|
|
3608
3612
|
this.UIOnDblClick=function(e)
|
|
@@ -4428,20 +4432,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4428
4432
|
return true;
|
|
4429
4433
|
}
|
|
4430
4434
|
|
|
4431
|
-
this.
|
|
4435
|
+
this.ClearPreventRightMenu=function(delay)
|
|
4432
4436
|
{
|
|
4433
|
-
var value=
|
|
4437
|
+
var value=3000;
|
|
4434
4438
|
if (IFrameSplitOperator.IsNumber(delay)) value=delay;
|
|
4435
4439
|
|
|
4436
|
-
if (this.
|
|
4440
|
+
if (this.PreventRightMenu.Timer)
|
|
4437
4441
|
{
|
|
4438
|
-
clearTimeout(this.
|
|
4439
|
-
this.
|
|
4442
|
+
clearTimeout(this.PreventRightMenu.Timer);
|
|
4443
|
+
this.PreventRightMenu.Timer = null;
|
|
4440
4444
|
}
|
|
4441
|
-
|
|
4442
|
-
this.
|
|
4445
|
+
|
|
4446
|
+
this.PreventRightMenu.Timer=setTimeout(()=>
|
|
4443
4447
|
{
|
|
4444
|
-
|
|
4448
|
+
this.PreventRightMenu.Enable=false;
|
|
4449
|
+
this.PreventRightMenu.Timer=null;
|
|
4445
4450
|
}, value);
|
|
4446
4451
|
}
|
|
4447
4452
|
|
|
@@ -4450,7 +4455,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4450
4455
|
//清空事件
|
|
4451
4456
|
document.onmousemove=null;
|
|
4452
4457
|
document.onmouseup=null;
|
|
4453
|
-
|
|
4458
|
+
|
|
4454
4459
|
var bRButtonSelectRect=this.IsEnableRSelectRect(e, "DocOnMouseUp"); //右键区间选择
|
|
4455
4460
|
var bLButtonSelectRect=this.IsEnableLSelectRect(e, "DocOnMouseUp"); //左键区间选择
|
|
4456
4461
|
|
|
@@ -4557,7 +4562,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4557
4562
|
this.CustomChartDrag=null;
|
|
4558
4563
|
if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
|
|
4559
4564
|
|
|
4560
|
-
this.
|
|
4565
|
+
this.ClearPreventRightMenu(this.PreventRightMenu.Delay);
|
|
4561
4566
|
}
|
|
4562
4567
|
|
|
4563
4568
|
//区间选择完成
|
|
@@ -4570,6 +4575,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4570
4575
|
|
|
4571
4576
|
var x=drag.LastMove.X-uielement.getBoundingClientRect().left;
|
|
4572
4577
|
var y=drag.LastMove.Y-uielement.getBoundingClientRect().top;
|
|
4578
|
+
if (e && e.button==2) this.PreventRightMenu.Enable=true; //右键拖动 需要阻止菜单
|
|
4573
4579
|
|
|
4574
4580
|
if (e) //往事件里面 写如我们的数据
|
|
4575
4581
|
{
|
|
@@ -4599,7 +4605,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4599
4605
|
}
|
|
4600
4606
|
|
|
4601
4607
|
if (event && event.Callback)
|
|
4602
|
-
|
|
4608
|
+
{
|
|
4603
4609
|
var sendData=
|
|
4604
4610
|
{
|
|
4605
4611
|
X:x, Y:y, e:e,
|
|
@@ -4618,7 +4624,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4618
4624
|
|
|
4619
4625
|
aryMenu=sendData.AryMenu;
|
|
4620
4626
|
command=sendData.Command;
|
|
4621
|
-
|
|
4627
|
+
}
|
|
4622
4628
|
|
|
4623
4629
|
if (aryMenu) //弹菜单
|
|
4624
4630
|
{
|
|
@@ -4648,7 +4654,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4648
4654
|
|
|
4649
4655
|
this.DocContextMenu=function(e)
|
|
4650
4656
|
{
|
|
4651
|
-
e.preventDefault();
|
|
4657
|
+
if (this.PreventRightMenu.Enable) e.preventDefault();
|
|
4652
4658
|
}
|
|
4653
4659
|
|
|
4654
4660
|
this.UIOnMounseOut=function(e)
|
|
@@ -10854,6 +10860,116 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10854
10860
|
|
|
10855
10861
|
return true;
|
|
10856
10862
|
}
|
|
10863
|
+
|
|
10864
|
+
this.OnMarkRectSelect=function(e)
|
|
10865
|
+
{
|
|
10866
|
+
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
10867
|
+
if (!corssCursor || corssCursor.Status==0) return;
|
|
10868
|
+
if (!IFrameSplitOperator.IsNumber(corssCursor.CursorIndex)) return;
|
|
10869
|
+
if (!this.ChartPaint[0] || !this.ChartPaint[0].Data) return;
|
|
10870
|
+
var paint=this.GetRectSelectPaint();
|
|
10871
|
+
if (!paint) return;
|
|
10872
|
+
|
|
10873
|
+
var kData=this.GetKData();
|
|
10874
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return;
|
|
10875
|
+
|
|
10876
|
+
var cursorIndex=corssCursor.CursorIndex;
|
|
10877
|
+
JSConsole.Chart.Log("[JSChartContainer::OnMarkRectSelect] dataIndex", cursorIndex);
|
|
10878
|
+
cursorIndex=parseInt(cursorIndex.toFixed(0));
|
|
10879
|
+
var index=cursorIndex+kData.DataOffset;
|
|
10880
|
+
if (index>=kData.Data.length) index=kData.Data.length-1;
|
|
10881
|
+
var item = kData.Data[index];
|
|
10882
|
+
JSConsole.Chart.Log("[KLineChartContainer::OnMarkRectSelect] item", item);
|
|
10883
|
+
|
|
10884
|
+
if (!this.SetRectSelectData(item, index)) return;
|
|
10885
|
+
|
|
10886
|
+
var pointCount=paint.GetPointCount();
|
|
10887
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
10888
|
+
var x=corssCursor.LastPoint.X/pixelTatio;
|
|
10889
|
+
var y=corssCursor.LastPoint.Y/pixelTatio;
|
|
10890
|
+
|
|
10891
|
+
if (pointCount==1) //第1个位置
|
|
10892
|
+
{
|
|
10893
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT_FIRST);
|
|
10894
|
+
if (event && event.Callback)
|
|
10895
|
+
{
|
|
10896
|
+
var data=
|
|
10897
|
+
{
|
|
10898
|
+
X:x, Y:y, Item:item, Index:index,
|
|
10899
|
+
RectSelectPaint:paint, //区间选择背景
|
|
10900
|
+
e:e,
|
|
10901
|
+
};
|
|
10902
|
+
event.Callback(event,data,this);
|
|
10903
|
+
}
|
|
10904
|
+
|
|
10905
|
+
this.Draw();
|
|
10906
|
+
}
|
|
10907
|
+
else if (pointCount==2)
|
|
10908
|
+
{
|
|
10909
|
+
var selectData=paint.GetSelectRectData();
|
|
10910
|
+
|
|
10911
|
+
if (e)
|
|
10912
|
+
{
|
|
10913
|
+
var data=
|
|
10914
|
+
{
|
|
10915
|
+
Chart:this, X:x, Y:y,
|
|
10916
|
+
SelectData:selectData, //区间选择的数据
|
|
10917
|
+
RectSelectPaint:paint //区间选择背景
|
|
10918
|
+
};
|
|
10919
|
+
e.data=data
|
|
10920
|
+
}
|
|
10921
|
+
|
|
10922
|
+
var aryMenu=null,command=null;
|
|
10923
|
+
var bMinuteChart=this.IsMinuteContainer();
|
|
10924
|
+
if (bMinuteChart)
|
|
10925
|
+
{
|
|
10926
|
+
command={ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] };
|
|
10927
|
+
}
|
|
10928
|
+
else //K线默认
|
|
10929
|
+
{
|
|
10930
|
+
aryMenu=
|
|
10931
|
+
[
|
|
10932
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
|
|
10933
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
|
|
10934
|
+
];
|
|
10935
|
+
}
|
|
10936
|
+
|
|
10937
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT);
|
|
10938
|
+
if (event && event.Callback)
|
|
10939
|
+
{
|
|
10940
|
+
var sendData=
|
|
10941
|
+
{
|
|
10942
|
+
X:x, Y:y,
|
|
10943
|
+
SelectData:selectData, //区间选择的数据
|
|
10944
|
+
RectSelectPaint:paint, //区间选择背景
|
|
10945
|
+
AryMenu:aryMenu,Command:command,
|
|
10946
|
+
e:e,
|
|
10947
|
+
PreventDefault:false,
|
|
10948
|
+
};
|
|
10949
|
+
if (bMinuteChart) sendData.Command=null; //分时图 调用事件 不做任何事
|
|
10950
|
+
|
|
10951
|
+
event.Callback(event,sendData,this);
|
|
10952
|
+
aryMenu=sendData.AryMenu;
|
|
10953
|
+
command=sendData.Command;
|
|
10954
|
+
if (sendData.PreventDefault)
|
|
10955
|
+
{
|
|
10956
|
+
this.Draw();
|
|
10957
|
+
return;
|
|
10958
|
+
}
|
|
10959
|
+
}
|
|
10960
|
+
|
|
10961
|
+
if (command)
|
|
10962
|
+
{
|
|
10963
|
+
this.ExecuteMenuCommand(command.ID, command.Args);
|
|
10964
|
+
}
|
|
10965
|
+
else if (aryMenu)
|
|
10966
|
+
{
|
|
10967
|
+
this.PopupSelectRectMenuV3(aryMenu, data, e);
|
|
10968
|
+
}
|
|
10969
|
+
|
|
10970
|
+
this.Draw();
|
|
10971
|
+
}
|
|
10972
|
+
}
|
|
10857
10973
|
}
|
|
10858
10974
|
|
|
10859
10975
|
function GetDevicePixelRatio()
|
|
@@ -58151,8 +58267,10 @@ function DynamicChartTitlePainting()
|
|
|
58151
58267
|
|
|
58152
58268
|
this.FormatMultiReport=function(data,format)
|
|
58153
58269
|
{
|
|
58270
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(data)) return null;
|
|
58271
|
+
|
|
58154
58272
|
var text="";
|
|
58155
|
-
for(var i
|
|
58273
|
+
for(var i=0; i<data.length; ++i)
|
|
58156
58274
|
{
|
|
58157
58275
|
var item = data[i];
|
|
58158
58276
|
let quarter=item.Quarter;
|
|
@@ -58184,8 +58302,10 @@ function DynamicChartTitlePainting()
|
|
|
58184
58302
|
return text;
|
|
58185
58303
|
}
|
|
58186
58304
|
|
|
58187
|
-
this.
|
|
58305
|
+
this.FormatMultiDataLine=function(value, dataInfo)
|
|
58188
58306
|
{
|
|
58307
|
+
if (!value) return null;
|
|
58308
|
+
|
|
58189
58309
|
var text="";
|
|
58190
58310
|
if (Array.isArray(value))
|
|
58191
58311
|
{
|
|
@@ -58213,7 +58333,7 @@ function DynamicChartTitlePainting()
|
|
|
58213
58333
|
}
|
|
58214
58334
|
|
|
58215
58335
|
//多变量输出
|
|
58216
|
-
this.
|
|
58336
|
+
this.FormatStackedBarTitle=function(aryBar, dataInfo)
|
|
58217
58337
|
{
|
|
58218
58338
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryBar)) return null;
|
|
58219
58339
|
if (!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Color)) return null;
|
|
@@ -58238,6 +58358,8 @@ function DynamicChartTitlePainting()
|
|
|
58238
58358
|
|
|
58239
58359
|
this.FormatKLineTitle=function(item, dataInfo)
|
|
58240
58360
|
{
|
|
58361
|
+
if (!item) return null;
|
|
58362
|
+
|
|
58241
58363
|
var defaultfloatPrecision=GetfloatPrecision(dataInfo.Symbol);//价格小数位数
|
|
58242
58364
|
var upperSymbol="";
|
|
58243
58365
|
if (dataInfo.Symbol) upperSymbol=dataInfo.Symbol.toUpperCase();
|
|
@@ -58246,7 +58368,6 @@ function DynamicChartTitlePainting()
|
|
|
58246
58368
|
|
|
58247
58369
|
var aryText=[];
|
|
58248
58370
|
|
|
58249
|
-
|
|
58250
58371
|
if (IFrameSplitOperator.IsNumber(item.Date))
|
|
58251
58372
|
{
|
|
58252
58373
|
var text=IFrameSplitOperator.FormatDateString(item.Date);
|
|
@@ -58777,6 +58898,25 @@ function DynamicChartTitlePainting()
|
|
|
58777
58898
|
if (dataIndex<0) return null;
|
|
58778
58899
|
}
|
|
58779
58900
|
|
|
58901
|
+
var value=null;
|
|
58902
|
+
if (dataIndex>=0 && item.Data && IFrameSplitOperator.IsNonEmptyArray(item.Data.Data)) value=item.Data.Data[dataIndex];
|
|
58903
|
+
|
|
58904
|
+
if (this.GetEventCallback) //外部处理
|
|
58905
|
+
{
|
|
58906
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_OUT_TEXT);
|
|
58907
|
+
if (event)
|
|
58908
|
+
{
|
|
58909
|
+
var sendData=
|
|
58910
|
+
{
|
|
58911
|
+
Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
|
|
58912
|
+
DataIndex:dataIndex, Value:value, PreventDefault:false, Out:null
|
|
58913
|
+
};
|
|
58914
|
+
event.Callback(event,sendData,this);
|
|
58915
|
+
if (sendData.Out) return sendData.Out;
|
|
58916
|
+
if (sendData.PreventDefault) return sendData.Out;
|
|
58917
|
+
}
|
|
58918
|
+
}
|
|
58919
|
+
|
|
58780
58920
|
if (item.DataType=="ChartMultiLine") //多线段数据
|
|
58781
58921
|
{
|
|
58782
58922
|
aryText=this.ForamtMultiLineTitle(dataIndex, item);
|
|
@@ -58795,46 +58935,19 @@ function DynamicChartTitlePainting()
|
|
|
58795
58935
|
if (!aryText) return null;
|
|
58796
58936
|
return { Text:null, ArrayText:aryText };
|
|
58797
58937
|
}
|
|
58798
|
-
|
|
58799
|
-
|
|
58800
|
-
value=item.Data.Data[dataIndex];
|
|
58801
|
-
|
|
58802
|
-
if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
|
|
58803
|
-
{
|
|
58804
|
-
preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
|
|
58805
|
-
if (!preVaildItem) return null;
|
|
58806
|
-
|
|
58807
|
-
preText=this.FormatValue(preVaildItem.Item,item);
|
|
58808
|
-
if (item.Name)
|
|
58809
|
-
{
|
|
58810
|
-
var dyValue=this.GetDynamicOutValue(item.Name, preText);
|
|
58811
|
-
if (dyValue) preText=dyValue;
|
|
58812
|
-
}
|
|
58813
|
-
|
|
58814
|
-
valueText=`--(${preText})`;
|
|
58815
|
-
|
|
58816
|
-
return { Text:valueText, ArrayText:aryText };
|
|
58817
|
-
}
|
|
58818
|
-
|
|
58819
|
-
if (value==null) return null;
|
|
58820
|
-
|
|
58821
|
-
if (item.DataType=="HistoryData-Vol")
|
|
58822
|
-
{
|
|
58823
|
-
value=value.Vol;
|
|
58824
|
-
valueText=this.FormatValue(value,item);
|
|
58825
|
-
}
|
|
58826
58938
|
else if (item.DataType=="MultiReport")
|
|
58827
58939
|
{
|
|
58828
58940
|
valueText=this.FormatMultiReport(value,item);
|
|
58941
|
+
if (!valueText) return null;
|
|
58829
58942
|
}
|
|
58830
58943
|
else if (item.DataType=="MULTI_POINT_LINE")
|
|
58831
58944
|
{
|
|
58832
|
-
valueText=this.
|
|
58945
|
+
valueText=this.FormatMultiDataLine(value, item);
|
|
58833
58946
|
if (!valueText) return null;
|
|
58834
58947
|
}
|
|
58835
58948
|
else if (item.DataType=="ChartStackedBar")
|
|
58836
58949
|
{
|
|
58837
|
-
aryText=this.
|
|
58950
|
+
aryText=this.FormatStackedBarTitle(value, item);
|
|
58838
58951
|
if (!aryText) return null;
|
|
58839
58952
|
return { Text:null, ArrayText:aryText };
|
|
58840
58953
|
}
|
|
@@ -58849,36 +58962,37 @@ function DynamicChartTitlePainting()
|
|
|
58849
58962
|
var outTitle=this.FormatIndexTitle(value, item);
|
|
58850
58963
|
return outTitle;
|
|
58851
58964
|
}
|
|
58965
|
+
else if (item.DataType=="ChartBand")
|
|
58966
|
+
{
|
|
58967
|
+
return null;
|
|
58968
|
+
}
|
|
58852
58969
|
else if (g_ScriptIndexChartFactory.Has(item.DataType)) //外部挂接
|
|
58853
58970
|
{
|
|
58854
58971
|
var find=g_ScriptIndexChartFactory.Get(item.DataType);
|
|
58855
58972
|
if (find && find.FormatTitleCallback)
|
|
58856
58973
|
return find.FormatTitleCallback(value, item, dataIndex);
|
|
58857
58974
|
}
|
|
58858
|
-
else
|
|
58975
|
+
else if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
|
|
58859
58976
|
{
|
|
58860
|
-
|
|
58977
|
+
preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
|
|
58978
|
+
if (!preVaildItem) return null;
|
|
58979
|
+
|
|
58980
|
+
preText=this.FormatValue(preVaildItem.Item,item);
|
|
58981
|
+
if (item.Name)
|
|
58861
58982
|
{
|
|
58862
|
-
var
|
|
58863
|
-
if (
|
|
58864
|
-
{
|
|
58865
|
-
var data=
|
|
58866
|
-
{
|
|
58867
|
-
Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
|
|
58868
|
-
DataIndex:dataIndex, Value:value,
|
|
58869
|
-
Out:null
|
|
58870
|
-
};
|
|
58871
|
-
event.Callback(event,data,this);
|
|
58872
|
-
if (data.Out) return data.Out;
|
|
58873
|
-
}
|
|
58983
|
+
var dyValue=this.GetDynamicOutValue(item.Name, preText);
|
|
58984
|
+
if (dyValue) preText=dyValue;
|
|
58874
58985
|
}
|
|
58875
|
-
|
|
58876
|
-
|
|
58877
|
-
|
|
58878
|
-
|
|
58986
|
+
|
|
58987
|
+
valueText=`--(${preText})`;
|
|
58988
|
+
|
|
58989
|
+
return { Text:valueText, ArrayText:aryText };
|
|
58990
|
+
}
|
|
58991
|
+
else
|
|
58992
|
+
{
|
|
58993
|
+
if (value==null) return null;
|
|
58879
58994
|
|
|
58880
58995
|
var arrowSuper=null; //独立颜色
|
|
58881
|
-
|
|
58882
58996
|
if (this.IsShowUpDownArrow)
|
|
58883
58997
|
{
|
|
58884
58998
|
var preValue=null;
|
|
@@ -59215,18 +59329,14 @@ function DynamicChartTitlePainting()
|
|
|
59215
59329
|
value=item.Data.Data[dataIndex];
|
|
59216
59330
|
if (value==null) continue;
|
|
59217
59331
|
|
|
59218
|
-
if (item.DataType=="
|
|
59219
|
-
{
|
|
59220
|
-
value=value.Vol;
|
|
59221
|
-
valueText=this.FormatValue(value,item);
|
|
59222
|
-
}
|
|
59223
|
-
else if (item.DataType=="MultiReport")
|
|
59332
|
+
if (item.DataType=="MultiReport")
|
|
59224
59333
|
{
|
|
59225
59334
|
valueText=this.FormatMultiReport(value,item);
|
|
59335
|
+
if (!valueText) continue;
|
|
59226
59336
|
}
|
|
59227
59337
|
else if (item.DataType=="ChartStackedBar")
|
|
59228
59338
|
{
|
|
59229
|
-
aryText=this.
|
|
59339
|
+
aryText=this.FormatStackedBarTitle(value, item);
|
|
59230
59340
|
if (!aryText) continue;
|
|
59231
59341
|
}
|
|
59232
59342
|
else if (item.DataType=="ChartMultiPoint")
|
|
@@ -77219,48 +77329,50 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77219
77329
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
77220
77330
|
var x=corssCursor.LastPoint.X/pixelTatio;
|
|
77221
77331
|
var y=corssCursor.LastPoint.Y/pixelTatio;
|
|
77222
|
-
|
|
77332
|
+
|
|
77333
|
+
if (e)
|
|
77334
|
+
{
|
|
77335
|
+
var data=
|
|
77336
|
+
{
|
|
77337
|
+
Chart:this,X:x,Y:y,
|
|
77338
|
+
SelectData:selectData, //区间选择的数据
|
|
77339
|
+
RectSelectPaint:paint //区间选择背景
|
|
77340
|
+
};
|
|
77341
|
+
e.data=data;
|
|
77342
|
+
}
|
|
77343
|
+
|
|
77344
|
+
var aryMenu=
|
|
77345
|
+
[
|
|
77346
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
|
|
77347
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
|
|
77348
|
+
];
|
|
77223
77349
|
|
|
77224
77350
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT_MOUSEUP);
|
|
77225
77351
|
if (event)
|
|
77226
77352
|
{
|
|
77227
|
-
var
|
|
77353
|
+
var sendData=
|
|
77228
77354
|
{
|
|
77229
77355
|
X:x,
|
|
77230
77356
|
Y:y,
|
|
77231
77357
|
SelectData:selectData, //区间选择的数据
|
|
77232
77358
|
RectSelectPaint:paint, //区间选择背景
|
|
77233
|
-
|
|
77359
|
+
AryMenu:null,
|
|
77360
|
+
PreventDefault:false,
|
|
77234
77361
|
};
|
|
77235
|
-
event.Callback(event,
|
|
77236
|
-
|
|
77362
|
+
event.Callback(event,sendData,this);
|
|
77363
|
+
|
|
77364
|
+
if (sendData.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
77365
|
+
|
|
77366
|
+
aryMenu=sendData.AryMenu;
|
|
77237
77367
|
}
|
|
77238
77368
|
|
|
77239
77369
|
if (this.IsShowSelectRectDialog()) //区间统计
|
|
77240
77370
|
{
|
|
77241
|
-
var data=
|
|
77242
|
-
{
|
|
77243
|
-
Chart:this,X:x,Y:y,
|
|
77244
|
-
SelectData:selectData, //区间选择的数据
|
|
77245
|
-
RectSelectPaint:paint //区间选择背景
|
|
77246
|
-
};
|
|
77247
|
-
e.data=data;
|
|
77248
|
-
|
|
77249
77371
|
this.DrawSelectRectDialog(e);
|
|
77250
77372
|
}
|
|
77251
|
-
else if (
|
|
77373
|
+
else if (aryMenu)
|
|
77252
77374
|
{
|
|
77253
|
-
|
|
77254
|
-
{
|
|
77255
|
-
Chart:this,
|
|
77256
|
-
X:x,
|
|
77257
|
-
Y:y,
|
|
77258
|
-
SelectData:selectData, //区间选择的数据
|
|
77259
|
-
RectSelectPaint:paint //区间选择背景
|
|
77260
|
-
};
|
|
77261
|
-
e.data=data;
|
|
77262
|
-
|
|
77263
|
-
this.PopupSelectRectMenuV2(data, e);
|
|
77375
|
+
this.PopupSelectRectMenuV3(aryMenu, data, e);
|
|
77264
77376
|
}
|
|
77265
77377
|
}
|
|
77266
77378
|
|
|
@@ -77317,6 +77429,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77317
77429
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
77318
77430
|
}
|
|
77319
77431
|
|
|
77432
|
+
/*
|
|
77320
77433
|
this.OnMarkRectSelect=function(e)
|
|
77321
77434
|
{
|
|
77322
77435
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
@@ -77398,6 +77511,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77398
77511
|
|
|
77399
77512
|
this.Draw();
|
|
77400
77513
|
}
|
|
77514
|
+
*/
|
|
77401
77515
|
|
|
77402
77516
|
//创建指定窗口指标
|
|
77403
77517
|
this.CreateWindowIndex=function(windowIndex)
|
|
@@ -85544,6 +85658,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85544
85658
|
else e.returnValue = false;
|
|
85545
85659
|
}
|
|
85546
85660
|
|
|
85661
|
+
/*
|
|
85547
85662
|
this.OnMarkRectSelect=function(e)
|
|
85548
85663
|
{
|
|
85549
85664
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
@@ -85619,6 +85734,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85619
85734
|
|
|
85620
85735
|
this.Draw();
|
|
85621
85736
|
}
|
|
85737
|
+
*/
|
|
85622
85738
|
|
|
85623
85739
|
//注册鼠标右键事件
|
|
85624
85740
|
this.OnRightMenu=function(x,y,e)
|
|
@@ -6362,9 +6362,7 @@ function ChartReport()
|
|
|
6362
6362
|
{
|
|
6363
6363
|
this.GetCustomLinkDrawInfo(data, column, drawInfo);
|
|
6364
6364
|
}
|
|
6365
|
-
else if (
|
|
6366
|
-
REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
|
|
6367
|
-
REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type))
|
|
6365
|
+
else if (this.IsReserveNumber(column.Type))
|
|
6368
6366
|
{
|
|
6369
6367
|
this.FormatReserveNumber(column, stock, drawInfo);
|
|
6370
6368
|
}
|
|
@@ -6503,6 +6501,18 @@ function ChartReport()
|
|
|
6503
6501
|
return ARARY_TYPE.includes(value);
|
|
6504
6502
|
}
|
|
6505
6503
|
|
|
6504
|
+
this.IsReserveNumber=function(value)
|
|
6505
|
+
{
|
|
6506
|
+
var ARARY_TYPE=
|
|
6507
|
+
[
|
|
6508
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,
|
|
6509
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
|
|
6510
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID
|
|
6511
|
+
];
|
|
6512
|
+
|
|
6513
|
+
return ARARY_TYPE.includes(value);
|
|
6514
|
+
}
|
|
6515
|
+
|
|
6506
6516
|
this.IsReserveString=function(value)
|
|
6507
6517
|
{
|
|
6508
6518
|
var ARARY_TYPE=
|
|
@@ -2103,7 +2103,7 @@ HQData.APIIndex_DRAWBAND=function(data, callback)
|
|
|
2103
2103
|
DrawType:"DRAWBAND",
|
|
2104
2104
|
DrawData:[],
|
|
2105
2105
|
Color:["rgb(220,20,60)","rgb(34,139,34)"]
|
|
2106
|
-
}
|
|
2106
|
+
},
|
|
2107
2107
|
};
|
|
2108
2108
|
|
|
2109
2109
|
for(var i=0;i<kData.Data.length;++i)
|
|
@@ -2149,7 +2149,7 @@ HQData.APIIndex_MULTI_LINE=function(data, callback)
|
|
|
2149
2149
|
}
|
|
2150
2150
|
}, //绘制线段数组
|
|
2151
2151
|
|
|
2152
|
-
IsShowTitle:
|
|
2152
|
+
IsShowTitle:true,
|
|
2153
2153
|
};
|
|
2154
2154
|
|
|
2155
2155
|
var point3=
|
|
@@ -2238,7 +2238,9 @@ HQData.APIIndex_MULTI_SVGICON=function(data, callback)
|
|
|
2238
2238
|
//{ Date:20190919, Value:15.3, Symbol:'\ue615', Color:'rgb(240,240,0)', Baseline:2 },
|
|
2239
2239
|
//{ Date:20190909, Value:15.4, Symbol:'\ue615', Color:'rgb(240,100,30)'}
|
|
2240
2240
|
]
|
|
2241
|
-
}
|
|
2241
|
+
},
|
|
2242
|
+
|
|
2243
|
+
|
|
2242
2244
|
} //绘制图标数组
|
|
2243
2245
|
};
|
|
2244
2246
|
|
|
@@ -2621,8 +2623,8 @@ HQData.APIIndex_MULTI_BAR=function(data, callback)
|
|
|
2621
2623
|
{
|
|
2622
2624
|
DrawType:'MULTI_BAR',
|
|
2623
2625
|
DrawData:[]
|
|
2624
|
-
},
|
|
2625
|
-
IsShowTitle:
|
|
2626
|
+
}, //绘制柱子数组
|
|
2627
|
+
IsShowTitle:true,
|
|
2626
2628
|
};
|
|
2627
2629
|
|
|
2628
2630
|
//第一组柱子
|
|
@@ -2914,7 +2916,9 @@ HQData.APIIndex_TITLE=function(data, callback)
|
|
|
2914
2916
|
{
|
|
2915
2917
|
code:0,
|
|
2916
2918
|
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
2917
|
-
outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] }
|
|
2919
|
+
outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] },
|
|
2920
|
+
|
|
2921
|
+
//error: { message:"无权限查看指标“测试指标1”" }
|
|
2918
2922
|
};
|
|
2919
2923
|
|
|
2920
2924
|
console.log('[HQData.APIIndex_TITLE] apiData ', apiData);
|