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
|
@@ -7073,9 +7073,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7073
7073
|
this.DialogModifyIndexParam; //指标参数修改
|
|
7074
7074
|
|
|
7075
7075
|
|
|
7076
|
-
this.RestoreFocusTimer=null;
|
|
7077
|
-
this.
|
|
7078
|
-
|
|
7076
|
+
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
7077
|
+
this.PreventRightMenu={ Timer:null, Enable:false, Delay:2000 }; //阻止右键菜单
|
|
7078
|
+
|
|
7079
7079
|
this.RestoreFocus=function(delay)
|
|
7080
7080
|
{
|
|
7081
7081
|
var value=1000;
|
|
@@ -7517,17 +7517,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7517
7517
|
|
|
7518
7518
|
this.UIOnContextMenu=function(e)
|
|
7519
7519
|
{
|
|
7520
|
+
if (e)
|
|
7521
|
+
{
|
|
7522
|
+
if (e.preventDefault) e.preventDefault();
|
|
7523
|
+
if (e.stopPropagation) e.stopPropagation();
|
|
7524
|
+
e.returnValue=false;
|
|
7525
|
+
}
|
|
7526
|
+
|
|
7520
7527
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
7521
7528
|
if (!this.IsShowRightMenu) return;
|
|
7529
|
+
if (this.PreventRightMenu.Enable) return;
|
|
7522
7530
|
|
|
7523
7531
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
7524
7532
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
7525
7533
|
|
|
7526
7534
|
if(typeof(this.OnRightMenu)=='function') this.OnRightMenu(x,y,e); //右键菜单事件
|
|
7527
|
-
|
|
7528
|
-
if (e && e.preventDefault) e.preventDefault();
|
|
7529
|
-
if (e && e.stopPropagation) e.stopPropagation();
|
|
7530
|
-
e.returnValue=false;
|
|
7531
7535
|
}
|
|
7532
7536
|
|
|
7533
7537
|
this.UIOnDblClick=function(e)
|
|
@@ -8353,20 +8357,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8353
8357
|
return true;
|
|
8354
8358
|
}
|
|
8355
8359
|
|
|
8356
|
-
this.
|
|
8360
|
+
this.ClearPreventRightMenu=function(delay)
|
|
8357
8361
|
{
|
|
8358
|
-
var value=
|
|
8362
|
+
var value=3000;
|
|
8359
8363
|
if (IFrameSplitOperator.IsNumber(delay)) value=delay;
|
|
8360
8364
|
|
|
8361
|
-
if (this.
|
|
8365
|
+
if (this.PreventRightMenu.Timer)
|
|
8362
8366
|
{
|
|
8363
|
-
clearTimeout(this.
|
|
8364
|
-
this.
|
|
8367
|
+
clearTimeout(this.PreventRightMenu.Timer);
|
|
8368
|
+
this.PreventRightMenu.Timer = null;
|
|
8365
8369
|
}
|
|
8366
|
-
|
|
8367
|
-
this.
|
|
8370
|
+
|
|
8371
|
+
this.PreventRightMenu.Timer=setTimeout(()=>
|
|
8368
8372
|
{
|
|
8369
|
-
|
|
8373
|
+
this.PreventRightMenu.Enable=false;
|
|
8374
|
+
this.PreventRightMenu.Timer=null;
|
|
8370
8375
|
}, value);
|
|
8371
8376
|
}
|
|
8372
8377
|
|
|
@@ -8375,7 +8380,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8375
8380
|
//清空事件
|
|
8376
8381
|
document.onmousemove=null;
|
|
8377
8382
|
document.onmouseup=null;
|
|
8378
|
-
|
|
8383
|
+
|
|
8379
8384
|
var bRButtonSelectRect=this.IsEnableRSelectRect(e, "DocOnMouseUp"); //右键区间选择
|
|
8380
8385
|
var bLButtonSelectRect=this.IsEnableLSelectRect(e, "DocOnMouseUp"); //左键区间选择
|
|
8381
8386
|
|
|
@@ -8482,7 +8487,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8482
8487
|
this.CustomChartDrag=null;
|
|
8483
8488
|
if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
|
|
8484
8489
|
|
|
8485
|
-
this.
|
|
8490
|
+
this.ClearPreventRightMenu(this.PreventRightMenu.Delay);
|
|
8486
8491
|
}
|
|
8487
8492
|
|
|
8488
8493
|
//区间选择完成
|
|
@@ -8495,6 +8500,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8495
8500
|
|
|
8496
8501
|
var x=drag.LastMove.X-uielement.getBoundingClientRect().left;
|
|
8497
8502
|
var y=drag.LastMove.Y-uielement.getBoundingClientRect().top;
|
|
8503
|
+
if (e && e.button==2) this.PreventRightMenu.Enable=true; //右键拖动 需要阻止菜单
|
|
8498
8504
|
|
|
8499
8505
|
if (e) //往事件里面 写如我们的数据
|
|
8500
8506
|
{
|
|
@@ -8524,7 +8530,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8524
8530
|
}
|
|
8525
8531
|
|
|
8526
8532
|
if (event && event.Callback)
|
|
8527
|
-
|
|
8533
|
+
{
|
|
8528
8534
|
var sendData=
|
|
8529
8535
|
{
|
|
8530
8536
|
X:x, Y:y, e:e,
|
|
@@ -8543,7 +8549,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8543
8549
|
|
|
8544
8550
|
aryMenu=sendData.AryMenu;
|
|
8545
8551
|
command=sendData.Command;
|
|
8546
|
-
|
|
8552
|
+
}
|
|
8547
8553
|
|
|
8548
8554
|
if (aryMenu) //弹菜单
|
|
8549
8555
|
{
|
|
@@ -8573,7 +8579,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8573
8579
|
|
|
8574
8580
|
this.DocContextMenu=function(e)
|
|
8575
8581
|
{
|
|
8576
|
-
e.preventDefault();
|
|
8582
|
+
if (this.PreventRightMenu.Enable) e.preventDefault();
|
|
8577
8583
|
}
|
|
8578
8584
|
|
|
8579
8585
|
this.UIOnMounseOut=function(e)
|
|
@@ -14779,6 +14785,116 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14779
14785
|
|
|
14780
14786
|
return true;
|
|
14781
14787
|
}
|
|
14788
|
+
|
|
14789
|
+
this.OnMarkRectSelect=function(e)
|
|
14790
|
+
{
|
|
14791
|
+
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
14792
|
+
if (!corssCursor || corssCursor.Status==0) return;
|
|
14793
|
+
if (!IFrameSplitOperator.IsNumber(corssCursor.CursorIndex)) return;
|
|
14794
|
+
if (!this.ChartPaint[0] || !this.ChartPaint[0].Data) return;
|
|
14795
|
+
var paint=this.GetRectSelectPaint();
|
|
14796
|
+
if (!paint) return;
|
|
14797
|
+
|
|
14798
|
+
var kData=this.GetKData();
|
|
14799
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return;
|
|
14800
|
+
|
|
14801
|
+
var cursorIndex=corssCursor.CursorIndex;
|
|
14802
|
+
JSConsole.Chart.Log("[JSChartContainer::OnMarkRectSelect] dataIndex", cursorIndex);
|
|
14803
|
+
cursorIndex=parseInt(cursorIndex.toFixed(0));
|
|
14804
|
+
var index=cursorIndex+kData.DataOffset;
|
|
14805
|
+
if (index>=kData.Data.length) index=kData.Data.length-1;
|
|
14806
|
+
var item = kData.Data[index];
|
|
14807
|
+
JSConsole.Chart.Log("[KLineChartContainer::OnMarkRectSelect] item", item);
|
|
14808
|
+
|
|
14809
|
+
if (!this.SetRectSelectData(item, index)) return;
|
|
14810
|
+
|
|
14811
|
+
var pointCount=paint.GetPointCount();
|
|
14812
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
14813
|
+
var x=corssCursor.LastPoint.X/pixelTatio;
|
|
14814
|
+
var y=corssCursor.LastPoint.Y/pixelTatio;
|
|
14815
|
+
|
|
14816
|
+
if (pointCount==1) //第1个位置
|
|
14817
|
+
{
|
|
14818
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT_FIRST);
|
|
14819
|
+
if (event && event.Callback)
|
|
14820
|
+
{
|
|
14821
|
+
var data=
|
|
14822
|
+
{
|
|
14823
|
+
X:x, Y:y, Item:item, Index:index,
|
|
14824
|
+
RectSelectPaint:paint, //区间选择背景
|
|
14825
|
+
e:e,
|
|
14826
|
+
};
|
|
14827
|
+
event.Callback(event,data,this);
|
|
14828
|
+
}
|
|
14829
|
+
|
|
14830
|
+
this.Draw();
|
|
14831
|
+
}
|
|
14832
|
+
else if (pointCount==2)
|
|
14833
|
+
{
|
|
14834
|
+
var selectData=paint.GetSelectRectData();
|
|
14835
|
+
|
|
14836
|
+
if (e)
|
|
14837
|
+
{
|
|
14838
|
+
var data=
|
|
14839
|
+
{
|
|
14840
|
+
Chart:this, X:x, Y:y,
|
|
14841
|
+
SelectData:selectData, //区间选择的数据
|
|
14842
|
+
RectSelectPaint:paint //区间选择背景
|
|
14843
|
+
};
|
|
14844
|
+
e.data=data
|
|
14845
|
+
}
|
|
14846
|
+
|
|
14847
|
+
var aryMenu=null,command=null;
|
|
14848
|
+
var bMinuteChart=this.IsMinuteContainer();
|
|
14849
|
+
if (bMinuteChart)
|
|
14850
|
+
{
|
|
14851
|
+
command={ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] };
|
|
14852
|
+
}
|
|
14853
|
+
else //K线默认
|
|
14854
|
+
{
|
|
14855
|
+
aryMenu=
|
|
14856
|
+
[
|
|
14857
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
|
|
14858
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
|
|
14859
|
+
];
|
|
14860
|
+
}
|
|
14861
|
+
|
|
14862
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT);
|
|
14863
|
+
if (event && event.Callback)
|
|
14864
|
+
{
|
|
14865
|
+
var sendData=
|
|
14866
|
+
{
|
|
14867
|
+
X:x, Y:y,
|
|
14868
|
+
SelectData:selectData, //区间选择的数据
|
|
14869
|
+
RectSelectPaint:paint, //区间选择背景
|
|
14870
|
+
AryMenu:aryMenu,Command:command,
|
|
14871
|
+
e:e,
|
|
14872
|
+
PreventDefault:false,
|
|
14873
|
+
};
|
|
14874
|
+
if (bMinuteChart) sendData.Command=null; //分时图 调用事件 不做任何事
|
|
14875
|
+
|
|
14876
|
+
event.Callback(event,sendData,this);
|
|
14877
|
+
aryMenu=sendData.AryMenu;
|
|
14878
|
+
command=sendData.Command;
|
|
14879
|
+
if (sendData.PreventDefault)
|
|
14880
|
+
{
|
|
14881
|
+
this.Draw();
|
|
14882
|
+
return;
|
|
14883
|
+
}
|
|
14884
|
+
}
|
|
14885
|
+
|
|
14886
|
+
if (command)
|
|
14887
|
+
{
|
|
14888
|
+
this.ExecuteMenuCommand(command.ID, command.Args);
|
|
14889
|
+
}
|
|
14890
|
+
else if (aryMenu)
|
|
14891
|
+
{
|
|
14892
|
+
this.PopupSelectRectMenuV3(aryMenu, data, e);
|
|
14893
|
+
}
|
|
14894
|
+
|
|
14895
|
+
this.Draw();
|
|
14896
|
+
}
|
|
14897
|
+
}
|
|
14782
14898
|
}
|
|
14783
14899
|
|
|
14784
14900
|
function GetDevicePixelRatio()
|
|
@@ -62076,8 +62192,10 @@ function DynamicChartTitlePainting()
|
|
|
62076
62192
|
|
|
62077
62193
|
this.FormatMultiReport=function(data,format)
|
|
62078
62194
|
{
|
|
62195
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(data)) return null;
|
|
62196
|
+
|
|
62079
62197
|
var text="";
|
|
62080
|
-
for(var i
|
|
62198
|
+
for(var i=0; i<data.length; ++i)
|
|
62081
62199
|
{
|
|
62082
62200
|
var item = data[i];
|
|
62083
62201
|
let quarter=item.Quarter;
|
|
@@ -62109,8 +62227,10 @@ function DynamicChartTitlePainting()
|
|
|
62109
62227
|
return text;
|
|
62110
62228
|
}
|
|
62111
62229
|
|
|
62112
|
-
this.
|
|
62230
|
+
this.FormatMultiDataLine=function(value, dataInfo)
|
|
62113
62231
|
{
|
|
62232
|
+
if (!value) return null;
|
|
62233
|
+
|
|
62114
62234
|
var text="";
|
|
62115
62235
|
if (Array.isArray(value))
|
|
62116
62236
|
{
|
|
@@ -62138,7 +62258,7 @@ function DynamicChartTitlePainting()
|
|
|
62138
62258
|
}
|
|
62139
62259
|
|
|
62140
62260
|
//多变量输出
|
|
62141
|
-
this.
|
|
62261
|
+
this.FormatStackedBarTitle=function(aryBar, dataInfo)
|
|
62142
62262
|
{
|
|
62143
62263
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryBar)) return null;
|
|
62144
62264
|
if (!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Color)) return null;
|
|
@@ -62163,6 +62283,8 @@ function DynamicChartTitlePainting()
|
|
|
62163
62283
|
|
|
62164
62284
|
this.FormatKLineTitle=function(item, dataInfo)
|
|
62165
62285
|
{
|
|
62286
|
+
if (!item) return null;
|
|
62287
|
+
|
|
62166
62288
|
var defaultfloatPrecision=GetfloatPrecision(dataInfo.Symbol);//价格小数位数
|
|
62167
62289
|
var upperSymbol="";
|
|
62168
62290
|
if (dataInfo.Symbol) upperSymbol=dataInfo.Symbol.toUpperCase();
|
|
@@ -62171,7 +62293,6 @@ function DynamicChartTitlePainting()
|
|
|
62171
62293
|
|
|
62172
62294
|
var aryText=[];
|
|
62173
62295
|
|
|
62174
|
-
|
|
62175
62296
|
if (IFrameSplitOperator.IsNumber(item.Date))
|
|
62176
62297
|
{
|
|
62177
62298
|
var text=IFrameSplitOperator.FormatDateString(item.Date);
|
|
@@ -62702,6 +62823,25 @@ function DynamicChartTitlePainting()
|
|
|
62702
62823
|
if (dataIndex<0) return null;
|
|
62703
62824
|
}
|
|
62704
62825
|
|
|
62826
|
+
var value=null;
|
|
62827
|
+
if (dataIndex>=0 && item.Data && IFrameSplitOperator.IsNonEmptyArray(item.Data.Data)) value=item.Data.Data[dataIndex];
|
|
62828
|
+
|
|
62829
|
+
if (this.GetEventCallback) //外部处理
|
|
62830
|
+
{
|
|
62831
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_OUT_TEXT);
|
|
62832
|
+
if (event)
|
|
62833
|
+
{
|
|
62834
|
+
var sendData=
|
|
62835
|
+
{
|
|
62836
|
+
Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
|
|
62837
|
+
DataIndex:dataIndex, Value:value, PreventDefault:false, Out:null
|
|
62838
|
+
};
|
|
62839
|
+
event.Callback(event,sendData,this);
|
|
62840
|
+
if (sendData.Out) return sendData.Out;
|
|
62841
|
+
if (sendData.PreventDefault) return sendData.Out;
|
|
62842
|
+
}
|
|
62843
|
+
}
|
|
62844
|
+
|
|
62705
62845
|
if (item.DataType=="ChartMultiLine") //多线段数据
|
|
62706
62846
|
{
|
|
62707
62847
|
aryText=this.ForamtMultiLineTitle(dataIndex, item);
|
|
@@ -62720,46 +62860,19 @@ function DynamicChartTitlePainting()
|
|
|
62720
62860
|
if (!aryText) return null;
|
|
62721
62861
|
return { Text:null, ArrayText:aryText };
|
|
62722
62862
|
}
|
|
62723
|
-
|
|
62724
|
-
|
|
62725
|
-
value=item.Data.Data[dataIndex];
|
|
62726
|
-
|
|
62727
|
-
if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
|
|
62728
|
-
{
|
|
62729
|
-
preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
|
|
62730
|
-
if (!preVaildItem) return null;
|
|
62731
|
-
|
|
62732
|
-
preText=this.FormatValue(preVaildItem.Item,item);
|
|
62733
|
-
if (item.Name)
|
|
62734
|
-
{
|
|
62735
|
-
var dyValue=this.GetDynamicOutValue(item.Name, preText);
|
|
62736
|
-
if (dyValue) preText=dyValue;
|
|
62737
|
-
}
|
|
62738
|
-
|
|
62739
|
-
valueText=`--(${preText})`;
|
|
62740
|
-
|
|
62741
|
-
return { Text:valueText, ArrayText:aryText };
|
|
62742
|
-
}
|
|
62743
|
-
|
|
62744
|
-
if (value==null) return null;
|
|
62745
|
-
|
|
62746
|
-
if (item.DataType=="HistoryData-Vol")
|
|
62747
|
-
{
|
|
62748
|
-
value=value.Vol;
|
|
62749
|
-
valueText=this.FormatValue(value,item);
|
|
62750
|
-
}
|
|
62751
62863
|
else if (item.DataType=="MultiReport")
|
|
62752
62864
|
{
|
|
62753
62865
|
valueText=this.FormatMultiReport(value,item);
|
|
62866
|
+
if (!valueText) return null;
|
|
62754
62867
|
}
|
|
62755
62868
|
else if (item.DataType=="MULTI_POINT_LINE")
|
|
62756
62869
|
{
|
|
62757
|
-
valueText=this.
|
|
62870
|
+
valueText=this.FormatMultiDataLine(value, item);
|
|
62758
62871
|
if (!valueText) return null;
|
|
62759
62872
|
}
|
|
62760
62873
|
else if (item.DataType=="ChartStackedBar")
|
|
62761
62874
|
{
|
|
62762
|
-
aryText=this.
|
|
62875
|
+
aryText=this.FormatStackedBarTitle(value, item);
|
|
62763
62876
|
if (!aryText) return null;
|
|
62764
62877
|
return { Text:null, ArrayText:aryText };
|
|
62765
62878
|
}
|
|
@@ -62774,36 +62887,37 @@ function DynamicChartTitlePainting()
|
|
|
62774
62887
|
var outTitle=this.FormatIndexTitle(value, item);
|
|
62775
62888
|
return outTitle;
|
|
62776
62889
|
}
|
|
62890
|
+
else if (item.DataType=="ChartBand")
|
|
62891
|
+
{
|
|
62892
|
+
return null;
|
|
62893
|
+
}
|
|
62777
62894
|
else if (g_ScriptIndexChartFactory.Has(item.DataType)) //外部挂接
|
|
62778
62895
|
{
|
|
62779
62896
|
var find=g_ScriptIndexChartFactory.Get(item.DataType);
|
|
62780
62897
|
if (find && find.FormatTitleCallback)
|
|
62781
62898
|
return find.FormatTitleCallback(value, item, dataIndex);
|
|
62782
62899
|
}
|
|
62783
|
-
else
|
|
62900
|
+
else if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
|
|
62784
62901
|
{
|
|
62785
|
-
|
|
62902
|
+
preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
|
|
62903
|
+
if (!preVaildItem) return null;
|
|
62904
|
+
|
|
62905
|
+
preText=this.FormatValue(preVaildItem.Item,item);
|
|
62906
|
+
if (item.Name)
|
|
62786
62907
|
{
|
|
62787
|
-
var
|
|
62788
|
-
if (
|
|
62789
|
-
{
|
|
62790
|
-
var data=
|
|
62791
|
-
{
|
|
62792
|
-
Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
|
|
62793
|
-
DataIndex:dataIndex, Value:value,
|
|
62794
|
-
Out:null
|
|
62795
|
-
};
|
|
62796
|
-
event.Callback(event,data,this);
|
|
62797
|
-
if (data.Out) return data.Out;
|
|
62798
|
-
}
|
|
62908
|
+
var dyValue=this.GetDynamicOutValue(item.Name, preText);
|
|
62909
|
+
if (dyValue) preText=dyValue;
|
|
62799
62910
|
}
|
|
62800
|
-
|
|
62801
|
-
|
|
62802
|
-
|
|
62803
|
-
|
|
62911
|
+
|
|
62912
|
+
valueText=`--(${preText})`;
|
|
62913
|
+
|
|
62914
|
+
return { Text:valueText, ArrayText:aryText };
|
|
62915
|
+
}
|
|
62916
|
+
else
|
|
62917
|
+
{
|
|
62918
|
+
if (value==null) return null;
|
|
62804
62919
|
|
|
62805
62920
|
var arrowSuper=null; //独立颜色
|
|
62806
|
-
|
|
62807
62921
|
if (this.IsShowUpDownArrow)
|
|
62808
62922
|
{
|
|
62809
62923
|
var preValue=null;
|
|
@@ -63140,18 +63254,14 @@ function DynamicChartTitlePainting()
|
|
|
63140
63254
|
value=item.Data.Data[dataIndex];
|
|
63141
63255
|
if (value==null) continue;
|
|
63142
63256
|
|
|
63143
|
-
if (item.DataType=="
|
|
63144
|
-
{
|
|
63145
|
-
value=value.Vol;
|
|
63146
|
-
valueText=this.FormatValue(value,item);
|
|
63147
|
-
}
|
|
63148
|
-
else if (item.DataType=="MultiReport")
|
|
63257
|
+
if (item.DataType=="MultiReport")
|
|
63149
63258
|
{
|
|
63150
63259
|
valueText=this.FormatMultiReport(value,item);
|
|
63260
|
+
if (!valueText) continue;
|
|
63151
63261
|
}
|
|
63152
63262
|
else if (item.DataType=="ChartStackedBar")
|
|
63153
63263
|
{
|
|
63154
|
-
aryText=this.
|
|
63264
|
+
aryText=this.FormatStackedBarTitle(value, item);
|
|
63155
63265
|
if (!aryText) continue;
|
|
63156
63266
|
}
|
|
63157
63267
|
else if (item.DataType=="ChartMultiPoint")
|
|
@@ -81144,48 +81254,50 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81144
81254
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
81145
81255
|
var x=corssCursor.LastPoint.X/pixelTatio;
|
|
81146
81256
|
var y=corssCursor.LastPoint.Y/pixelTatio;
|
|
81147
|
-
|
|
81257
|
+
|
|
81258
|
+
if (e)
|
|
81259
|
+
{
|
|
81260
|
+
var data=
|
|
81261
|
+
{
|
|
81262
|
+
Chart:this,X:x,Y:y,
|
|
81263
|
+
SelectData:selectData, //区间选择的数据
|
|
81264
|
+
RectSelectPaint:paint //区间选择背景
|
|
81265
|
+
};
|
|
81266
|
+
e.data=data;
|
|
81267
|
+
}
|
|
81268
|
+
|
|
81269
|
+
var aryMenu=
|
|
81270
|
+
[
|
|
81271
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
|
|
81272
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
|
|
81273
|
+
];
|
|
81148
81274
|
|
|
81149
81275
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT_MOUSEUP);
|
|
81150
81276
|
if (event)
|
|
81151
81277
|
{
|
|
81152
|
-
var
|
|
81278
|
+
var sendData=
|
|
81153
81279
|
{
|
|
81154
81280
|
X:x,
|
|
81155
81281
|
Y:y,
|
|
81156
81282
|
SelectData:selectData, //区间选择的数据
|
|
81157
81283
|
RectSelectPaint:paint, //区间选择背景
|
|
81158
|
-
|
|
81284
|
+
AryMenu:null,
|
|
81285
|
+
PreventDefault:false,
|
|
81159
81286
|
};
|
|
81160
|
-
event.Callback(event,
|
|
81161
|
-
|
|
81287
|
+
event.Callback(event,sendData,this);
|
|
81288
|
+
|
|
81289
|
+
if (sendData.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
81290
|
+
|
|
81291
|
+
aryMenu=sendData.AryMenu;
|
|
81162
81292
|
}
|
|
81163
81293
|
|
|
81164
81294
|
if (this.IsShowSelectRectDialog()) //区间统计
|
|
81165
81295
|
{
|
|
81166
|
-
var data=
|
|
81167
|
-
{
|
|
81168
|
-
Chart:this,X:x,Y:y,
|
|
81169
|
-
SelectData:selectData, //区间选择的数据
|
|
81170
|
-
RectSelectPaint:paint //区间选择背景
|
|
81171
|
-
};
|
|
81172
|
-
e.data=data;
|
|
81173
|
-
|
|
81174
81296
|
this.DrawSelectRectDialog(e);
|
|
81175
81297
|
}
|
|
81176
|
-
else if (
|
|
81298
|
+
else if (aryMenu)
|
|
81177
81299
|
{
|
|
81178
|
-
|
|
81179
|
-
{
|
|
81180
|
-
Chart:this,
|
|
81181
|
-
X:x,
|
|
81182
|
-
Y:y,
|
|
81183
|
-
SelectData:selectData, //区间选择的数据
|
|
81184
|
-
RectSelectPaint:paint //区间选择背景
|
|
81185
|
-
};
|
|
81186
|
-
e.data=data;
|
|
81187
|
-
|
|
81188
|
-
this.PopupSelectRectMenuV2(data, e);
|
|
81300
|
+
this.PopupSelectRectMenuV3(aryMenu, data, e);
|
|
81189
81301
|
}
|
|
81190
81302
|
}
|
|
81191
81303
|
|
|
@@ -81242,6 +81354,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81242
81354
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
81243
81355
|
}
|
|
81244
81356
|
|
|
81357
|
+
/*
|
|
81245
81358
|
this.OnMarkRectSelect=function(e)
|
|
81246
81359
|
{
|
|
81247
81360
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
@@ -81323,6 +81436,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81323
81436
|
|
|
81324
81437
|
this.Draw();
|
|
81325
81438
|
}
|
|
81439
|
+
*/
|
|
81326
81440
|
|
|
81327
81441
|
//创建指定窗口指标
|
|
81328
81442
|
this.CreateWindowIndex=function(windowIndex)
|
|
@@ -89469,6 +89583,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89469
89583
|
else e.returnValue = false;
|
|
89470
89584
|
}
|
|
89471
89585
|
|
|
89586
|
+
/*
|
|
89472
89587
|
this.OnMarkRectSelect=function(e)
|
|
89473
89588
|
{
|
|
89474
89589
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
@@ -89544,6 +89659,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89544
89659
|
|
|
89545
89660
|
this.Draw();
|
|
89546
89661
|
}
|
|
89662
|
+
*/
|
|
89547
89663
|
|
|
89548
89664
|
//注册鼠标右键事件
|
|
89549
89665
|
this.OnRightMenu=function(x,y,e)
|
|
@@ -138045,9 +138161,7 @@ function ChartReport()
|
|
|
138045
138161
|
{
|
|
138046
138162
|
this.GetCustomLinkDrawInfo(data, column, drawInfo);
|
|
138047
138163
|
}
|
|
138048
|
-
else if (
|
|
138049
|
-
REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
|
|
138050
|
-
REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type))
|
|
138164
|
+
else if (this.IsReserveNumber(column.Type))
|
|
138051
138165
|
{
|
|
138052
138166
|
this.FormatReserveNumber(column, stock, drawInfo);
|
|
138053
138167
|
}
|
|
@@ -138186,6 +138300,18 @@ function ChartReport()
|
|
|
138186
138300
|
return ARARY_TYPE.includes(value);
|
|
138187
138301
|
}
|
|
138188
138302
|
|
|
138303
|
+
this.IsReserveNumber=function(value)
|
|
138304
|
+
{
|
|
138305
|
+
var ARARY_TYPE=
|
|
138306
|
+
[
|
|
138307
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,
|
|
138308
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
|
|
138309
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID
|
|
138310
|
+
];
|
|
138311
|
+
|
|
138312
|
+
return ARARY_TYPE.includes(value);
|
|
138313
|
+
}
|
|
138314
|
+
|
|
138189
138315
|
this.IsReserveString=function(value)
|
|
138190
138316
|
{
|
|
138191
138317
|
var ARARY_TYPE=
|
|
@@ -144433,7 +144559,7 @@ function ScrollBarBGChart()
|
|
|
144433
144559
|
|
|
144434
144560
|
|
|
144435
144561
|
|
|
144436
|
-
var HQCHART_VERSION="1.1.
|
|
144562
|
+
var HQCHART_VERSION="1.1.14513";
|
|
144437
144563
|
|
|
144438
144564
|
function PrintHQChartVersion()
|
|
144439
144565
|
{
|
|
@@ -57635,7 +57635,7 @@ HQData.APIIndex_DRAWBAND=function(data, callback)
|
|
|
57635
57635
|
DrawType:"DRAWBAND",
|
|
57636
57636
|
DrawData:[],
|
|
57637
57637
|
Color:["rgb(220,20,60)","rgb(34,139,34)"]
|
|
57638
|
-
}
|
|
57638
|
+
},
|
|
57639
57639
|
};
|
|
57640
57640
|
|
|
57641
57641
|
for(var i=0;i<kData.Data.length;++i)
|
|
@@ -57681,7 +57681,7 @@ HQData.APIIndex_MULTI_LINE=function(data, callback)
|
|
|
57681
57681
|
}
|
|
57682
57682
|
}, //绘制线段数组
|
|
57683
57683
|
|
|
57684
|
-
IsShowTitle:
|
|
57684
|
+
IsShowTitle:true,
|
|
57685
57685
|
};
|
|
57686
57686
|
|
|
57687
57687
|
var point3=
|
|
@@ -57770,7 +57770,9 @@ HQData.APIIndex_MULTI_SVGICON=function(data, callback)
|
|
|
57770
57770
|
//{ Date:20190919, Value:15.3, Symbol:'\ue615', Color:'rgb(240,240,0)', Baseline:2 },
|
|
57771
57771
|
//{ Date:20190909, Value:15.4, Symbol:'\ue615', Color:'rgb(240,100,30)'}
|
|
57772
57772
|
]
|
|
57773
|
-
}
|
|
57773
|
+
},
|
|
57774
|
+
|
|
57775
|
+
|
|
57774
57776
|
} //绘制图标数组
|
|
57775
57777
|
};
|
|
57776
57778
|
|
|
@@ -58153,8 +58155,8 @@ HQData.APIIndex_MULTI_BAR=function(data, callback)
|
|
|
58153
58155
|
{
|
|
58154
58156
|
DrawType:'MULTI_BAR',
|
|
58155
58157
|
DrawData:[]
|
|
58156
|
-
},
|
|
58157
|
-
IsShowTitle:
|
|
58158
|
+
}, //绘制柱子数组
|
|
58159
|
+
IsShowTitle:true,
|
|
58158
58160
|
};
|
|
58159
58161
|
|
|
58160
58162
|
//第一组柱子
|
|
@@ -58446,7 +58448,9 @@ HQData.APIIndex_TITLE=function(data, callback)
|
|
|
58446
58448
|
{
|
|
58447
58449
|
code:0,
|
|
58448
58450
|
stock:{ name:hqchart.Name, symbol:hqchart.Symbol },
|
|
58449
|
-
outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] }
|
|
58451
|
+
outdata: { date:aryDate, time:aryTime, outvar:[ textData, closeData] },
|
|
58452
|
+
|
|
58453
|
+
//error: { message:"无权限查看指标“测试指标1”" }
|
|
58450
58454
|
};
|
|
58451
58455
|
|
|
58452
58456
|
console.log('[HQData.APIIndex_TITLE] apiData ', apiData);
|