hqchart 1.1.14506 → 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 +388 -236
- package/package.json +1 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +10 -6
- package/src/jscommon/umychart.js +245 -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 +259 -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 +259 -109
|
@@ -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);
|
|
@@ -7117,9 +7117,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7117
7117
|
this.DialogModifyIndexParam; //指标参数修改
|
|
7118
7118
|
|
|
7119
7119
|
|
|
7120
|
-
this.RestoreFocusTimer=null;
|
|
7121
|
-
this.
|
|
7122
|
-
|
|
7120
|
+
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
7121
|
+
this.PreventRightMenu={ Timer:null, Enable:false, Delay:2000 }; //阻止右键菜单
|
|
7122
|
+
|
|
7123
7123
|
this.RestoreFocus=function(delay)
|
|
7124
7124
|
{
|
|
7125
7125
|
var value=1000;
|
|
@@ -7561,17 +7561,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7561
7561
|
|
|
7562
7562
|
this.UIOnContextMenu=function(e)
|
|
7563
7563
|
{
|
|
7564
|
+
if (e)
|
|
7565
|
+
{
|
|
7566
|
+
if (e.preventDefault) e.preventDefault();
|
|
7567
|
+
if (e.stopPropagation) e.stopPropagation();
|
|
7568
|
+
e.returnValue=false;
|
|
7569
|
+
}
|
|
7570
|
+
|
|
7564
7571
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
7565
7572
|
if (!this.IsShowRightMenu) return;
|
|
7573
|
+
if (this.PreventRightMenu.Enable) return;
|
|
7566
7574
|
|
|
7567
7575
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
7568
7576
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
7569
7577
|
|
|
7570
7578
|
if(typeof(this.OnRightMenu)=='function') this.OnRightMenu(x,y,e); //右键菜单事件
|
|
7571
|
-
|
|
7572
|
-
if (e && e.preventDefault) e.preventDefault();
|
|
7573
|
-
if (e && e.stopPropagation) e.stopPropagation();
|
|
7574
|
-
e.returnValue=false;
|
|
7575
7579
|
}
|
|
7576
7580
|
|
|
7577
7581
|
this.UIOnDblClick=function(e)
|
|
@@ -8397,20 +8401,21 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8397
8401
|
return true;
|
|
8398
8402
|
}
|
|
8399
8403
|
|
|
8400
|
-
this.
|
|
8404
|
+
this.ClearPreventRightMenu=function(delay)
|
|
8401
8405
|
{
|
|
8402
|
-
var value=
|
|
8406
|
+
var value=3000;
|
|
8403
8407
|
if (IFrameSplitOperator.IsNumber(delay)) value=delay;
|
|
8404
8408
|
|
|
8405
|
-
if (this.
|
|
8409
|
+
if (this.PreventRightMenu.Timer)
|
|
8406
8410
|
{
|
|
8407
|
-
clearTimeout(this.
|
|
8408
|
-
this.
|
|
8411
|
+
clearTimeout(this.PreventRightMenu.Timer);
|
|
8412
|
+
this.PreventRightMenu.Timer = null;
|
|
8409
8413
|
}
|
|
8410
|
-
|
|
8411
|
-
this.
|
|
8414
|
+
|
|
8415
|
+
this.PreventRightMenu.Timer=setTimeout(()=>
|
|
8412
8416
|
{
|
|
8413
|
-
|
|
8417
|
+
this.PreventRightMenu.Enable=false;
|
|
8418
|
+
this.PreventRightMenu.Timer=null;
|
|
8414
8419
|
}, value);
|
|
8415
8420
|
}
|
|
8416
8421
|
|
|
@@ -8419,7 +8424,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8419
8424
|
//清空事件
|
|
8420
8425
|
document.onmousemove=null;
|
|
8421
8426
|
document.onmouseup=null;
|
|
8422
|
-
|
|
8427
|
+
|
|
8423
8428
|
var bRButtonSelectRect=this.IsEnableRSelectRect(e, "DocOnMouseUp"); //右键区间选择
|
|
8424
8429
|
var bLButtonSelectRect=this.IsEnableLSelectRect(e, "DocOnMouseUp"); //左键区间选择
|
|
8425
8430
|
|
|
@@ -8526,7 +8531,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8526
8531
|
this.CustomChartDrag=null;
|
|
8527
8532
|
if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
|
|
8528
8533
|
|
|
8529
|
-
this.
|
|
8534
|
+
this.ClearPreventRightMenu(this.PreventRightMenu.Delay);
|
|
8530
8535
|
}
|
|
8531
8536
|
|
|
8532
8537
|
//区间选择完成
|
|
@@ -8539,6 +8544,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8539
8544
|
|
|
8540
8545
|
var x=drag.LastMove.X-uielement.getBoundingClientRect().left;
|
|
8541
8546
|
var y=drag.LastMove.Y-uielement.getBoundingClientRect().top;
|
|
8547
|
+
if (e && e.button==2) this.PreventRightMenu.Enable=true; //右键拖动 需要阻止菜单
|
|
8542
8548
|
|
|
8543
8549
|
if (e) //往事件里面 写如我们的数据
|
|
8544
8550
|
{
|
|
@@ -8568,7 +8574,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8568
8574
|
}
|
|
8569
8575
|
|
|
8570
8576
|
if (event && event.Callback)
|
|
8571
|
-
|
|
8577
|
+
{
|
|
8572
8578
|
var sendData=
|
|
8573
8579
|
{
|
|
8574
8580
|
X:x, Y:y, e:e,
|
|
@@ -8587,7 +8593,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8587
8593
|
|
|
8588
8594
|
aryMenu=sendData.AryMenu;
|
|
8589
8595
|
command=sendData.Command;
|
|
8590
|
-
|
|
8596
|
+
}
|
|
8591
8597
|
|
|
8592
8598
|
if (aryMenu) //弹菜单
|
|
8593
8599
|
{
|
|
@@ -8617,7 +8623,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8617
8623
|
|
|
8618
8624
|
this.DocContextMenu=function(e)
|
|
8619
8625
|
{
|
|
8620
|
-
e.preventDefault();
|
|
8626
|
+
if (this.PreventRightMenu.Enable) e.preventDefault();
|
|
8621
8627
|
}
|
|
8622
8628
|
|
|
8623
8629
|
this.UIOnMounseOut=function(e)
|
|
@@ -14823,6 +14829,116 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14823
14829
|
|
|
14824
14830
|
return true;
|
|
14825
14831
|
}
|
|
14832
|
+
|
|
14833
|
+
this.OnMarkRectSelect=function(e)
|
|
14834
|
+
{
|
|
14835
|
+
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
14836
|
+
if (!corssCursor || corssCursor.Status==0) return;
|
|
14837
|
+
if (!IFrameSplitOperator.IsNumber(corssCursor.CursorIndex)) return;
|
|
14838
|
+
if (!this.ChartPaint[0] || !this.ChartPaint[0].Data) return;
|
|
14839
|
+
var paint=this.GetRectSelectPaint();
|
|
14840
|
+
if (!paint) return;
|
|
14841
|
+
|
|
14842
|
+
var kData=this.GetKData();
|
|
14843
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return;
|
|
14844
|
+
|
|
14845
|
+
var cursorIndex=corssCursor.CursorIndex;
|
|
14846
|
+
JSConsole.Chart.Log("[JSChartContainer::OnMarkRectSelect] dataIndex", cursorIndex);
|
|
14847
|
+
cursorIndex=parseInt(cursorIndex.toFixed(0));
|
|
14848
|
+
var index=cursorIndex+kData.DataOffset;
|
|
14849
|
+
if (index>=kData.Data.length) index=kData.Data.length-1;
|
|
14850
|
+
var item = kData.Data[index];
|
|
14851
|
+
JSConsole.Chart.Log("[KLineChartContainer::OnMarkRectSelect] item", item);
|
|
14852
|
+
|
|
14853
|
+
if (!this.SetRectSelectData(item, index)) return;
|
|
14854
|
+
|
|
14855
|
+
var pointCount=paint.GetPointCount();
|
|
14856
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
14857
|
+
var x=corssCursor.LastPoint.X/pixelTatio;
|
|
14858
|
+
var y=corssCursor.LastPoint.Y/pixelTatio;
|
|
14859
|
+
|
|
14860
|
+
if (pointCount==1) //第1个位置
|
|
14861
|
+
{
|
|
14862
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT_FIRST);
|
|
14863
|
+
if (event && event.Callback)
|
|
14864
|
+
{
|
|
14865
|
+
var data=
|
|
14866
|
+
{
|
|
14867
|
+
X:x, Y:y, Item:item, Index:index,
|
|
14868
|
+
RectSelectPaint:paint, //区间选择背景
|
|
14869
|
+
e:e,
|
|
14870
|
+
};
|
|
14871
|
+
event.Callback(event,data,this);
|
|
14872
|
+
}
|
|
14873
|
+
|
|
14874
|
+
this.Draw();
|
|
14875
|
+
}
|
|
14876
|
+
else if (pointCount==2)
|
|
14877
|
+
{
|
|
14878
|
+
var selectData=paint.GetSelectRectData();
|
|
14879
|
+
|
|
14880
|
+
if (e)
|
|
14881
|
+
{
|
|
14882
|
+
var data=
|
|
14883
|
+
{
|
|
14884
|
+
Chart:this, X:x, Y:y,
|
|
14885
|
+
SelectData:selectData, //区间选择的数据
|
|
14886
|
+
RectSelectPaint:paint //区间选择背景
|
|
14887
|
+
};
|
|
14888
|
+
e.data=data
|
|
14889
|
+
}
|
|
14890
|
+
|
|
14891
|
+
var aryMenu=null,command=null;
|
|
14892
|
+
var bMinuteChart=this.IsMinuteContainer();
|
|
14893
|
+
if (bMinuteChart)
|
|
14894
|
+
{
|
|
14895
|
+
command={ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] };
|
|
14896
|
+
}
|
|
14897
|
+
else //K线默认
|
|
14898
|
+
{
|
|
14899
|
+
aryMenu=
|
|
14900
|
+
[
|
|
14901
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
|
|
14902
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
|
|
14903
|
+
];
|
|
14904
|
+
}
|
|
14905
|
+
|
|
14906
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN_SELECT_RECT);
|
|
14907
|
+
if (event && event.Callback)
|
|
14908
|
+
{
|
|
14909
|
+
var sendData=
|
|
14910
|
+
{
|
|
14911
|
+
X:x, Y:y,
|
|
14912
|
+
SelectData:selectData, //区间选择的数据
|
|
14913
|
+
RectSelectPaint:paint, //区间选择背景
|
|
14914
|
+
AryMenu:aryMenu,Command:command,
|
|
14915
|
+
e:e,
|
|
14916
|
+
PreventDefault:false,
|
|
14917
|
+
};
|
|
14918
|
+
if (bMinuteChart) sendData.Command=null; //分时图 调用事件 不做任何事
|
|
14919
|
+
|
|
14920
|
+
event.Callback(event,sendData,this);
|
|
14921
|
+
aryMenu=sendData.AryMenu;
|
|
14922
|
+
command=sendData.Command;
|
|
14923
|
+
if (sendData.PreventDefault)
|
|
14924
|
+
{
|
|
14925
|
+
this.Draw();
|
|
14926
|
+
return;
|
|
14927
|
+
}
|
|
14928
|
+
}
|
|
14929
|
+
|
|
14930
|
+
if (command)
|
|
14931
|
+
{
|
|
14932
|
+
this.ExecuteMenuCommand(command.ID, command.Args);
|
|
14933
|
+
}
|
|
14934
|
+
else if (aryMenu)
|
|
14935
|
+
{
|
|
14936
|
+
this.PopupSelectRectMenuV3(aryMenu, data, e);
|
|
14937
|
+
}
|
|
14938
|
+
|
|
14939
|
+
this.Draw();
|
|
14940
|
+
}
|
|
14941
|
+
}
|
|
14826
14942
|
}
|
|
14827
14943
|
|
|
14828
14944
|
function GetDevicePixelRatio()
|
|
@@ -62120,8 +62236,10 @@ function DynamicChartTitlePainting()
|
|
|
62120
62236
|
|
|
62121
62237
|
this.FormatMultiReport=function(data,format)
|
|
62122
62238
|
{
|
|
62239
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(data)) return null;
|
|
62240
|
+
|
|
62123
62241
|
var text="";
|
|
62124
|
-
for(var i
|
|
62242
|
+
for(var i=0; i<data.length; ++i)
|
|
62125
62243
|
{
|
|
62126
62244
|
var item = data[i];
|
|
62127
62245
|
let quarter=item.Quarter;
|
|
@@ -62153,8 +62271,10 @@ function DynamicChartTitlePainting()
|
|
|
62153
62271
|
return text;
|
|
62154
62272
|
}
|
|
62155
62273
|
|
|
62156
|
-
this.
|
|
62274
|
+
this.FormatMultiDataLine=function(value, dataInfo)
|
|
62157
62275
|
{
|
|
62276
|
+
if (!value) return null;
|
|
62277
|
+
|
|
62158
62278
|
var text="";
|
|
62159
62279
|
if (Array.isArray(value))
|
|
62160
62280
|
{
|
|
@@ -62182,7 +62302,7 @@ function DynamicChartTitlePainting()
|
|
|
62182
62302
|
}
|
|
62183
62303
|
|
|
62184
62304
|
//多变量输出
|
|
62185
|
-
this.
|
|
62305
|
+
this.FormatStackedBarTitle=function(aryBar, dataInfo)
|
|
62186
62306
|
{
|
|
62187
62307
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryBar)) return null;
|
|
62188
62308
|
if (!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Color)) return null;
|
|
@@ -62207,6 +62327,8 @@ function DynamicChartTitlePainting()
|
|
|
62207
62327
|
|
|
62208
62328
|
this.FormatKLineTitle=function(item, dataInfo)
|
|
62209
62329
|
{
|
|
62330
|
+
if (!item) return null;
|
|
62331
|
+
|
|
62210
62332
|
var defaultfloatPrecision=GetfloatPrecision(dataInfo.Symbol);//价格小数位数
|
|
62211
62333
|
var upperSymbol="";
|
|
62212
62334
|
if (dataInfo.Symbol) upperSymbol=dataInfo.Symbol.toUpperCase();
|
|
@@ -62215,7 +62337,6 @@ function DynamicChartTitlePainting()
|
|
|
62215
62337
|
|
|
62216
62338
|
var aryText=[];
|
|
62217
62339
|
|
|
62218
|
-
|
|
62219
62340
|
if (IFrameSplitOperator.IsNumber(item.Date))
|
|
62220
62341
|
{
|
|
62221
62342
|
var text=IFrameSplitOperator.FormatDateString(item.Date);
|
|
@@ -62746,6 +62867,25 @@ function DynamicChartTitlePainting()
|
|
|
62746
62867
|
if (dataIndex<0) return null;
|
|
62747
62868
|
}
|
|
62748
62869
|
|
|
62870
|
+
var value=null;
|
|
62871
|
+
if (dataIndex>=0 && item.Data && IFrameSplitOperator.IsNonEmptyArray(item.Data.Data)) value=item.Data.Data[dataIndex];
|
|
62872
|
+
|
|
62873
|
+
if (this.GetEventCallback) //外部处理
|
|
62874
|
+
{
|
|
62875
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_OUT_TEXT);
|
|
62876
|
+
if (event)
|
|
62877
|
+
{
|
|
62878
|
+
var sendData=
|
|
62879
|
+
{
|
|
62880
|
+
Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
|
|
62881
|
+
DataIndex:dataIndex, Value:value, PreventDefault:false, Out:null
|
|
62882
|
+
};
|
|
62883
|
+
event.Callback(event,sendData,this);
|
|
62884
|
+
if (sendData.Out) return sendData.Out;
|
|
62885
|
+
if (sendData.PreventDefault) return sendData.Out;
|
|
62886
|
+
}
|
|
62887
|
+
}
|
|
62888
|
+
|
|
62749
62889
|
if (item.DataType=="ChartMultiLine") //多线段数据
|
|
62750
62890
|
{
|
|
62751
62891
|
aryText=this.ForamtMultiLineTitle(dataIndex, item);
|
|
@@ -62764,46 +62904,19 @@ function DynamicChartTitlePainting()
|
|
|
62764
62904
|
if (!aryText) return null;
|
|
62765
62905
|
return { Text:null, ArrayText:aryText };
|
|
62766
62906
|
}
|
|
62767
|
-
|
|
62768
|
-
|
|
62769
|
-
value=item.Data.Data[dataIndex];
|
|
62770
|
-
|
|
62771
|
-
if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
|
|
62772
|
-
{
|
|
62773
|
-
preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
|
|
62774
|
-
if (!preVaildItem) return null;
|
|
62775
|
-
|
|
62776
|
-
preText=this.FormatValue(preVaildItem.Item,item);
|
|
62777
|
-
if (item.Name)
|
|
62778
|
-
{
|
|
62779
|
-
var dyValue=this.GetDynamicOutValue(item.Name, preText);
|
|
62780
|
-
if (dyValue) preText=dyValue;
|
|
62781
|
-
}
|
|
62782
|
-
|
|
62783
|
-
valueText=`--(${preText})`;
|
|
62784
|
-
|
|
62785
|
-
return { Text:valueText, ArrayText:aryText };
|
|
62786
|
-
}
|
|
62787
|
-
|
|
62788
|
-
if (value==null) return null;
|
|
62789
|
-
|
|
62790
|
-
if (item.DataType=="HistoryData-Vol")
|
|
62791
|
-
{
|
|
62792
|
-
value=value.Vol;
|
|
62793
|
-
valueText=this.FormatValue(value,item);
|
|
62794
|
-
}
|
|
62795
62907
|
else if (item.DataType=="MultiReport")
|
|
62796
62908
|
{
|
|
62797
62909
|
valueText=this.FormatMultiReport(value,item);
|
|
62910
|
+
if (!valueText) return null;
|
|
62798
62911
|
}
|
|
62799
62912
|
else if (item.DataType=="MULTI_POINT_LINE")
|
|
62800
62913
|
{
|
|
62801
|
-
valueText=this.
|
|
62914
|
+
valueText=this.FormatMultiDataLine(value, item);
|
|
62802
62915
|
if (!valueText) return null;
|
|
62803
62916
|
}
|
|
62804
62917
|
else if (item.DataType=="ChartStackedBar")
|
|
62805
62918
|
{
|
|
62806
|
-
aryText=this.
|
|
62919
|
+
aryText=this.FormatStackedBarTitle(value, item);
|
|
62807
62920
|
if (!aryText) return null;
|
|
62808
62921
|
return { Text:null, ArrayText:aryText };
|
|
62809
62922
|
}
|
|
@@ -62818,36 +62931,37 @@ function DynamicChartTitlePainting()
|
|
|
62818
62931
|
var outTitle=this.FormatIndexTitle(value, item);
|
|
62819
62932
|
return outTitle;
|
|
62820
62933
|
}
|
|
62934
|
+
else if (item.DataType=="ChartBand")
|
|
62935
|
+
{
|
|
62936
|
+
return null;
|
|
62937
|
+
}
|
|
62821
62938
|
else if (g_ScriptIndexChartFactory.Has(item.DataType)) //外部挂接
|
|
62822
62939
|
{
|
|
62823
62940
|
var find=g_ScriptIndexChartFactory.Get(item.DataType);
|
|
62824
62941
|
if (find && find.FormatTitleCallback)
|
|
62825
62942
|
return find.FormatTitleCallback(value, item, dataIndex);
|
|
62826
62943
|
}
|
|
62827
|
-
else
|
|
62944
|
+
else if (value==null && item.ChartClassName=="ChartStepLine") //当前值无效,上一个值延续
|
|
62828
62945
|
{
|
|
62829
|
-
|
|
62946
|
+
preVaildItem=this.GetPreVaildItem(item.Data.Data, dataIndex);
|
|
62947
|
+
if (!preVaildItem) return null;
|
|
62948
|
+
|
|
62949
|
+
preText=this.FormatValue(preVaildItem.Item,item);
|
|
62950
|
+
if (item.Name)
|
|
62830
62951
|
{
|
|
62831
|
-
var
|
|
62832
|
-
if (
|
|
62833
|
-
{
|
|
62834
|
-
var data=
|
|
62835
|
-
{
|
|
62836
|
-
Item:item, Index:titleIndex, Data:this.Data, FrameID:this.Frame.Identify,
|
|
62837
|
-
DataIndex:dataIndex, Value:value,
|
|
62838
|
-
Out:null
|
|
62839
|
-
};
|
|
62840
|
-
event.Callback(event,data,this);
|
|
62841
|
-
if (data.Out) return data.Out;
|
|
62842
|
-
}
|
|
62952
|
+
var dyValue=this.GetDynamicOutValue(item.Name, preText);
|
|
62953
|
+
if (dyValue) preText=dyValue;
|
|
62843
62954
|
}
|
|
62844
|
-
|
|
62845
|
-
|
|
62846
|
-
|
|
62847
|
-
|
|
62955
|
+
|
|
62956
|
+
valueText=`--(${preText})`;
|
|
62957
|
+
|
|
62958
|
+
return { Text:valueText, ArrayText:aryText };
|
|
62959
|
+
}
|
|
62960
|
+
else
|
|
62961
|
+
{
|
|
62962
|
+
if (value==null) return null;
|
|
62848
62963
|
|
|
62849
62964
|
var arrowSuper=null; //独立颜色
|
|
62850
|
-
|
|
62851
62965
|
if (this.IsShowUpDownArrow)
|
|
62852
62966
|
{
|
|
62853
62967
|
var preValue=null;
|
|
@@ -63184,18 +63298,14 @@ function DynamicChartTitlePainting()
|
|
|
63184
63298
|
value=item.Data.Data[dataIndex];
|
|
63185
63299
|
if (value==null) continue;
|
|
63186
63300
|
|
|
63187
|
-
if (item.DataType=="
|
|
63188
|
-
{
|
|
63189
|
-
value=value.Vol;
|
|
63190
|
-
valueText=this.FormatValue(value,item);
|
|
63191
|
-
}
|
|
63192
|
-
else if (item.DataType=="MultiReport")
|
|
63301
|
+
if (item.DataType=="MultiReport")
|
|
63193
63302
|
{
|
|
63194
63303
|
valueText=this.FormatMultiReport(value,item);
|
|
63304
|
+
if (!valueText) continue;
|
|
63195
63305
|
}
|
|
63196
63306
|
else if (item.DataType=="ChartStackedBar")
|
|
63197
63307
|
{
|
|
63198
|
-
aryText=this.
|
|
63308
|
+
aryText=this.FormatStackedBarTitle(value, item);
|
|
63199
63309
|
if (!aryText) continue;
|
|
63200
63310
|
}
|
|
63201
63311
|
else if (item.DataType=="ChartMultiPoint")
|
|
@@ -81188,48 +81298,50 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81188
81298
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
81189
81299
|
var x=corssCursor.LastPoint.X/pixelTatio;
|
|
81190
81300
|
var y=corssCursor.LastPoint.Y/pixelTatio;
|
|
81191
|
-
|
|
81301
|
+
|
|
81302
|
+
if (e)
|
|
81303
|
+
{
|
|
81304
|
+
var data=
|
|
81305
|
+
{
|
|
81306
|
+
Chart:this,X:x,Y:y,
|
|
81307
|
+
SelectData:selectData, //区间选择的数据
|
|
81308
|
+
RectSelectPaint:paint //区间选择背景
|
|
81309
|
+
};
|
|
81310
|
+
e.data=data;
|
|
81311
|
+
}
|
|
81312
|
+
|
|
81313
|
+
var aryMenu=
|
|
81314
|
+
[
|
|
81315
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e,selectData] }},
|
|
81316
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[selectData] }}
|
|
81317
|
+
];
|
|
81192
81318
|
|
|
81193
81319
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT_MOUSEUP);
|
|
81194
81320
|
if (event)
|
|
81195
81321
|
{
|
|
81196
|
-
var
|
|
81322
|
+
var sendData=
|
|
81197
81323
|
{
|
|
81198
81324
|
X:x,
|
|
81199
81325
|
Y:y,
|
|
81200
81326
|
SelectData:selectData, //区间选择的数据
|
|
81201
81327
|
RectSelectPaint:paint, //区间选择背景
|
|
81202
|
-
|
|
81328
|
+
AryMenu:null,
|
|
81329
|
+
PreventDefault:false,
|
|
81203
81330
|
};
|
|
81204
|
-
event.Callback(event,
|
|
81205
|
-
|
|
81331
|
+
event.Callback(event,sendData,this);
|
|
81332
|
+
|
|
81333
|
+
if (sendData.PreventDefault==true) return; //已被上层替换,不调用默认的网络请求
|
|
81334
|
+
|
|
81335
|
+
aryMenu=sendData.AryMenu;
|
|
81206
81336
|
}
|
|
81207
81337
|
|
|
81208
81338
|
if (this.IsShowSelectRectDialog()) //区间统计
|
|
81209
81339
|
{
|
|
81210
|
-
var data=
|
|
81211
|
-
{
|
|
81212
|
-
Chart:this,X:x,Y:y,
|
|
81213
|
-
SelectData:selectData, //区间选择的数据
|
|
81214
|
-
RectSelectPaint:paint //区间选择背景
|
|
81215
|
-
};
|
|
81216
|
-
e.data=data;
|
|
81217
|
-
|
|
81218
81340
|
this.DrawSelectRectDialog(e);
|
|
81219
81341
|
}
|
|
81220
|
-
else if (
|
|
81342
|
+
else if (aryMenu)
|
|
81221
81343
|
{
|
|
81222
|
-
|
|
81223
|
-
{
|
|
81224
|
-
Chart:this,
|
|
81225
|
-
X:x,
|
|
81226
|
-
Y:y,
|
|
81227
|
-
SelectData:selectData, //区间选择的数据
|
|
81228
|
-
RectSelectPaint:paint //区间选择背景
|
|
81229
|
-
};
|
|
81230
|
-
e.data=data;
|
|
81231
|
-
|
|
81232
|
-
this.PopupSelectRectMenuV2(data, e);
|
|
81344
|
+
this.PopupSelectRectMenuV3(aryMenu, data, e);
|
|
81233
81345
|
}
|
|
81234
81346
|
}
|
|
81235
81347
|
|
|
@@ -81286,6 +81398,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81286
81398
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
81287
81399
|
}
|
|
81288
81400
|
|
|
81401
|
+
/*
|
|
81289
81402
|
this.OnMarkRectSelect=function(e)
|
|
81290
81403
|
{
|
|
81291
81404
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
@@ -81367,6 +81480,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81367
81480
|
|
|
81368
81481
|
this.Draw();
|
|
81369
81482
|
}
|
|
81483
|
+
*/
|
|
81370
81484
|
|
|
81371
81485
|
//创建指定窗口指标
|
|
81372
81486
|
this.CreateWindowIndex=function(windowIndex)
|
|
@@ -87420,6 +87534,30 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
87420
87534
|
|
|
87421
87535
|
return position;
|
|
87422
87536
|
}
|
|
87537
|
+
|
|
87538
|
+
this.GetDateTimeByPoint=function(x,y)
|
|
87539
|
+
{
|
|
87540
|
+
var clientPos=this.PtInClient(x,y);
|
|
87541
|
+
if (clientPos<0) return null;
|
|
87542
|
+
|
|
87543
|
+
if (!IFrameSplitOperator.IsNumber(x)) return;
|
|
87544
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Frame.SubFrame)) return null;
|
|
87545
|
+
var frame=this.Frame.SubFrame[0].Frame;
|
|
87546
|
+
if (!frame) return null;
|
|
87547
|
+
var kData=this.GetKData();
|
|
87548
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return null;
|
|
87549
|
+
|
|
87550
|
+
var index=parseInt(frame.GetXData(x));
|
|
87551
|
+
var dataIndex=index+kData.DataOffset;
|
|
87552
|
+
if (dataIndex<0 || dataIndex>=kData.Data.length) return null;
|
|
87553
|
+
|
|
87554
|
+
var kItem=kData.Data[dataIndex];
|
|
87555
|
+
if (!kItem) return null;
|
|
87556
|
+
|
|
87557
|
+
var result={ Date:kItem.Date, Time:kItem.Time, DataIndex:dataIndex, Index:index, ClientPos:clientPos };
|
|
87558
|
+
|
|
87559
|
+
return result;
|
|
87560
|
+
}
|
|
87423
87561
|
}
|
|
87424
87562
|
|
|
87425
87563
|
//API 返回数据 转化为array[]
|
|
@@ -89489,6 +89627,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89489
89627
|
else e.returnValue = false;
|
|
89490
89628
|
}
|
|
89491
89629
|
|
|
89630
|
+
/*
|
|
89492
89631
|
this.OnMarkRectSelect=function(e)
|
|
89493
89632
|
{
|
|
89494
89633
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
@@ -89564,6 +89703,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89564
89703
|
|
|
89565
89704
|
this.Draw();
|
|
89566
89705
|
}
|
|
89706
|
+
*/
|
|
89567
89707
|
|
|
89568
89708
|
//注册鼠标右键事件
|
|
89569
89709
|
this.OnRightMenu=function(x,y,e)
|
|
@@ -138065,9 +138205,7 @@ function ChartReport()
|
|
|
138065
138205
|
{
|
|
138066
138206
|
this.GetCustomLinkDrawInfo(data, column, drawInfo);
|
|
138067
138207
|
}
|
|
138068
|
-
else if (
|
|
138069
|
-
REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
|
|
138070
|
-
REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID].includes(column.Type))
|
|
138208
|
+
else if (this.IsReserveNumber(column.Type))
|
|
138071
138209
|
{
|
|
138072
138210
|
this.FormatReserveNumber(column, stock, drawInfo);
|
|
138073
138211
|
}
|
|
@@ -138206,6 +138344,18 @@ function ChartReport()
|
|
|
138206
138344
|
return ARARY_TYPE.includes(value);
|
|
138207
138345
|
}
|
|
138208
138346
|
|
|
138347
|
+
this.IsReserveNumber=function(value)
|
|
138348
|
+
{
|
|
138349
|
+
var ARARY_TYPE=
|
|
138350
|
+
[
|
|
138351
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER1_ID,REPORT_COLUMN_ID.RESERVE_NUMBER2_ID,REPORT_COLUMN_ID.RESERVE_NUMBER3_ID,
|
|
138352
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER4_ID,REPORT_COLUMN_ID.RESERVE_NUMBER5_ID,REPORT_COLUMN_ID.RESERVE_NUMBER6_ID,REPORT_COLUMN_ID.RESERVE_NUMBER7_ID,
|
|
138353
|
+
REPORT_COLUMN_ID.RESERVE_NUMBER8_ID,REPORT_COLUMN_ID.RESERVE_NUMBER9_ID,REPORT_COLUMN_ID.RESERVE_NUMBER10_ID
|
|
138354
|
+
];
|
|
138355
|
+
|
|
138356
|
+
return ARARY_TYPE.includes(value);
|
|
138357
|
+
}
|
|
138358
|
+
|
|
138209
138359
|
this.IsReserveString=function(value)
|
|
138210
138360
|
{
|
|
138211
138361
|
var ARARY_TYPE=
|
|
@@ -154238,7 +154388,7 @@ function HQChartScriptWorker()
|
|
|
154238
154388
|
|
|
154239
154389
|
|
|
154240
154390
|
|
|
154241
|
-
var HQCHART_VERSION="1.1.
|
|
154391
|
+
var HQCHART_VERSION="1.1.14513";
|
|
154242
154392
|
|
|
154243
154393
|
function PrintHQChartVersion()
|
|
154244
154394
|
{
|