hqchart 1.1.14473 → 1.1.14482
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 +43 -38
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +10 -2
- package/src/jscommon/umychart.NetworkFilterTest.js +124 -10
- package/src/jscommon/umychart.complier.js +66 -25
- package/src/jscommon/umychart.deal.js +151 -1
- package/src/jscommon/umychart.js +24 -7
- package/src/jscommon/umychart.report.js +1 -1
- package/src/jscommon/umychart.style.js +6 -1
- package/src/jscommon/umychart.testdata.js +124 -10
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +249 -36
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +124 -10
- package/src/jscommon/umychart.vue/umychart.vue.js +259 -38
|
@@ -6620,6 +6620,11 @@ var JSCHART_EVENT_ID=
|
|
|
6620
6620
|
SEARCH_DIALOG_ON_CLICK_INDEX:163, //切换指标-指标对话框
|
|
6621
6621
|
|
|
6622
6622
|
ON_CALCULATE_CHIP_DATA:164, //计算筹码数据 (筹码图用)
|
|
6623
|
+
|
|
6624
|
+
|
|
6625
|
+
ON_CLICK_DEAL_ROW:165,
|
|
6626
|
+
ON_RCLICK_DEAL_ROW:166,
|
|
6627
|
+
ON_DBCLICK_DEAL_ROW:167,
|
|
6623
6628
|
}
|
|
6624
6629
|
|
|
6625
6630
|
var JSCHART_OPERATOR_ID=
|
|
@@ -10907,7 +10912,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10907
10912
|
return this.Frame.ZoomIndexWindow(frameID, option);
|
|
10908
10913
|
}
|
|
10909
10914
|
|
|
10910
|
-
this.ShowIndexTitleOnly=function(frameID, option) //只显示指标的标题
|
|
10915
|
+
this.ShowIndexTitleOnly=function(frameID, option) //只显示指标的标题 option={ Enable:true/false }
|
|
10911
10916
|
{
|
|
10912
10917
|
if (frameID<0 || frameID>=this.Frame.SubFrame.length) return false;
|
|
10913
10918
|
return this.Frame.ShowIndexTitleOnly(frameID, option);
|
|
@@ -29208,7 +29213,7 @@ function IChartPainting()
|
|
|
29208
29213
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth))
|
|
29209
29214
|
{
|
|
29210
29215
|
var data=this.Data.Data[i];
|
|
29211
|
-
if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
29216
|
+
if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
29212
29217
|
|
|
29213
29218
|
if (firstOverlayOpen==null) firstOverlayOpen=data.Open;
|
|
29214
29219
|
|
|
@@ -30138,7 +30143,7 @@ function ChartKLine()
|
|
|
30138
30143
|
{
|
|
30139
30144
|
var data=this.Data.Data[i];
|
|
30140
30145
|
this.ShowRange.End=i;
|
|
30141
|
-
if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
30146
|
+
if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
30142
30147
|
|
|
30143
30148
|
var left=xOffset;
|
|
30144
30149
|
var right=xOffset+dataWidth;
|
|
@@ -32506,6 +32511,7 @@ function ChartKLine()
|
|
|
32506
32511
|
tooltip.Data=this.Data.Data[index];
|
|
32507
32512
|
tooltip.ChartPaint=this;
|
|
32508
32513
|
tooltip.Type=0; //K线信息
|
|
32514
|
+
tooltip.Symbol=this.Symbol;
|
|
32509
32515
|
return true;
|
|
32510
32516
|
}
|
|
32511
32517
|
}
|
|
@@ -32540,7 +32546,7 @@ function ChartKLine()
|
|
|
32540
32546
|
for(var i=start,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
32541
32547
|
{
|
|
32542
32548
|
var data=this.Data.Data[i];
|
|
32543
|
-
if (!IFrameSplitOperator.IsNumber(data.Close)) continue;
|
|
32549
|
+
if (!data || !IFrameSplitOperator.IsNumber(data.Close)) continue;
|
|
32544
32550
|
|
|
32545
32551
|
if (range.Max==null) range.Max=data.Close;
|
|
32546
32552
|
if (range.Min==null) range.Min=data.Close;
|
|
@@ -32554,7 +32560,7 @@ function ChartKLine()
|
|
|
32554
32560
|
for(var i=start,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
|
|
32555
32561
|
{
|
|
32556
32562
|
var data=this.Data.Data[i];
|
|
32557
|
-
if (data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
32563
|
+
if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
|
|
32558
32564
|
|
|
32559
32565
|
if (this.DrawType==5 && data.OrderFlow && IFrameSplitOperator.IsNumber(data.OrderFlow.PriceOffset))
|
|
32560
32566
|
{
|
|
@@ -76371,7 +76377,12 @@ function JSChartResource()
|
|
|
76371
76377
|
|
|
76372
76378
|
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
76373
76379
|
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
76374
|
-
UnchagneTextColor:"rgb(0,0,0)" //平盘文字颜色
|
|
76380
|
+
UnchagneTextColor:"rgb(0,0,0)", //平盘文字颜色
|
|
76381
|
+
|
|
76382
|
+
Selected:
|
|
76383
|
+
{
|
|
76384
|
+
BGColor:"rgb(180,240,240)",
|
|
76385
|
+
}
|
|
76375
76386
|
},
|
|
76376
76387
|
|
|
76377
76388
|
//报价列表
|
|
@@ -76391,7 +76402,7 @@ function JSChartResource()
|
|
|
76391
76402
|
SortIcon:
|
|
76392
76403
|
{
|
|
76393
76404
|
Size:12, Family:"iconfont",
|
|
76394
|
-
Arrow:["\ue704",
|
|
76405
|
+
Arrow:["\ue704", "\uf0c9","\ue81b"], //[0]=默认排序的图标背景色
|
|
76395
76406
|
Color:['rgb(169,169,169)', "rgb(51,51,51)", "rgb(51,51,51)"],
|
|
76396
76407
|
Margin:{ Left:1*GetDevicePixelRatio(), Bottom:2, Right:0,}
|
|
76397
76408
|
},
|
|
@@ -77424,6 +77435,12 @@ function JSChartResource()
|
|
|
77424
77435
|
this.DealList.FieldColor.Bar[i]=filed.Bar[i];
|
|
77425
77436
|
}
|
|
77426
77437
|
}
|
|
77438
|
+
|
|
77439
|
+
if (item.Selected)
|
|
77440
|
+
{
|
|
77441
|
+
var subItem=item.Selected;
|
|
77442
|
+
if (subItem.BGColor) this.DealList.Selected.BGColor=subItem.BGColor;
|
|
77443
|
+
}
|
|
77427
77444
|
}
|
|
77428
77445
|
|
|
77429
77446
|
if (style.Report) this.SetReportStyle(style.Report);
|
|
@@ -122462,6 +122479,8 @@ var SCRIPT_CHART_NAME=
|
|
|
122462
122479
|
SCATTER_PLOT:"SCATTER_PLOT", //散点图
|
|
122463
122480
|
|
|
122464
122481
|
CLIP_COLOR_STICK:"CLIP_COLOR_STICK", //上下柱子 裁剪
|
|
122482
|
+
|
|
122483
|
+
DRAW_KLINE:"DRAWKLINE"
|
|
122465
122484
|
}
|
|
122466
122485
|
|
|
122467
122486
|
|
|
@@ -123530,6 +123549,15 @@ function ScriptIndex(name,script,args,option)
|
|
|
123530
123549
|
if (varItem.Color) //如果设置了颜色,使用外面设置的颜色
|
|
123531
123550
|
chart.UnchagneColor=chart.DownColor=chart.UpColor=this.GetColor(varItem.Color);
|
|
123532
123551
|
|
|
123552
|
+
if (varItem.Draw.Config)
|
|
123553
|
+
{
|
|
123554
|
+
var config=varItem.Draw.Config;
|
|
123555
|
+
if (IFrameSplitOperator.IsBool(config.IsShowMaxMinPrice)) chart.IsShowMaxMinPrice=config.IsShowMaxMinPrice;
|
|
123556
|
+
if (IFrameSplitOperator.IsBool(config.IsShowKTooltip)) chart.IsShowKTooltip=config.IsShowKTooltip;
|
|
123557
|
+
if (config.Symbol) chart.Symbol=config.Symbol;
|
|
123558
|
+
if (config.Name) chart.Title=config.Name;
|
|
123559
|
+
}
|
|
123560
|
+
|
|
123533
123561
|
this.SetChartIndexName(chart);
|
|
123534
123562
|
hqChart.ChartPaint.push(chart);
|
|
123535
123563
|
}
|
|
@@ -124218,12 +124246,10 @@ function ScriptIndex(name,script,args,option)
|
|
|
124218
124246
|
this.SetChartIndexName(chart);
|
|
124219
124247
|
hqChart.ChartPaint.push(chart);
|
|
124220
124248
|
|
|
124221
|
-
|
|
124222
|
-
|
|
124223
|
-
|
|
124224
|
-
|
|
124225
|
-
}
|
|
124226
|
-
else
|
|
124249
|
+
var titleIndex=windowIndex+1;
|
|
124250
|
+
var bShowTitle=true;
|
|
124251
|
+
if (varItem.IsShowTitle===false) bShowTitle=false;
|
|
124252
|
+
if (bShowTitle)
|
|
124227
124253
|
{
|
|
124228
124254
|
var titleData=new DynamicTitleData(chart.Data,chart.Name, null);
|
|
124229
124255
|
titleData.DataType="ChartMultiLine";
|
|
@@ -124249,10 +124275,15 @@ function ScriptIndex(name,script,args,option)
|
|
|
124249
124275
|
hqChart.ChartPaint.push(chart);
|
|
124250
124276
|
|
|
124251
124277
|
var titleIndex=windowIndex+1;
|
|
124252
|
-
var
|
|
124253
|
-
|
|
124254
|
-
|
|
124255
|
-
|
|
124278
|
+
var bShowTitle=true;
|
|
124279
|
+
if (varItem.IsShowTitle===false) bShowTitle=false;
|
|
124280
|
+
if (bShowTitle)
|
|
124281
|
+
{
|
|
124282
|
+
var titleData=new DynamicTitleData(chart.Data,chart.Name, null);
|
|
124283
|
+
titleData.DataType="ChartMultiPoint";
|
|
124284
|
+
titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
|
|
124285
|
+
hqChart.TitlePaint[titleIndex].Data[i]=titleData;
|
|
124286
|
+
}
|
|
124256
124287
|
}
|
|
124257
124288
|
|
|
124258
124289
|
this.CreateMultiBar=function(hqChart,windowIndex,varItem,id)
|
|
@@ -124271,10 +124302,17 @@ function ScriptIndex(name,script,args,option)
|
|
|
124271
124302
|
hqChart.ChartPaint.push(chart);
|
|
124272
124303
|
|
|
124273
124304
|
var titleIndex=windowIndex+1;
|
|
124274
|
-
|
|
124275
|
-
|
|
124276
|
-
|
|
124277
|
-
|
|
124305
|
+
|
|
124306
|
+
var bShowTitle=true;
|
|
124307
|
+
if (varItem.IsShowTitle===false) bShowTitle=false;
|
|
124308
|
+
if (bShowTitle)
|
|
124309
|
+
{
|
|
124310
|
+
var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
|
|
124311
|
+
titleData.DataType="ChartMultiBar";
|
|
124312
|
+
titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
|
|
124313
|
+
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
124314
|
+
}
|
|
124315
|
+
|
|
124278
124316
|
}
|
|
124279
124317
|
|
|
124280
124318
|
this.CreateMultiText=function(hqChart,windowIndex,varItem,i)
|
|
@@ -125988,11 +126026,16 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
125988
126026
|
chart.BuildCacheData();
|
|
125989
126027
|
|
|
125990
126028
|
var titleIndex=windowIndex+1;
|
|
125991
|
-
var
|
|
125992
|
-
|
|
125993
|
-
|
|
125994
|
-
|
|
125995
|
-
|
|
126029
|
+
var bShowTitle=true;
|
|
126030
|
+
if (varItem.IsShowTitle===false) bShowTitle=false;
|
|
126031
|
+
if (bShowTitle)
|
|
126032
|
+
{
|
|
126033
|
+
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
126034
|
+
var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
|
|
126035
|
+
titleData.DataType="ChartMultiPoint";
|
|
126036
|
+
titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
|
|
126037
|
+
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
|
|
126038
|
+
}
|
|
125996
126039
|
|
|
125997
126040
|
this.SetChartIndexName(chart);
|
|
125998
126041
|
|
|
@@ -126038,12 +126081,16 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
126038
126081
|
chart.BuildCacheData();
|
|
126039
126082
|
|
|
126040
126083
|
var titleIndex=windowIndex+1;
|
|
126041
|
-
var
|
|
126042
|
-
|
|
126043
|
-
|
|
126044
|
-
|
|
126045
|
-
|
|
126046
|
-
|
|
126084
|
+
var bShowTitle=true;
|
|
126085
|
+
if (varItem.IsShowTitle===false) bShowTitle=false;
|
|
126086
|
+
if (bShowTitle)
|
|
126087
|
+
{
|
|
126088
|
+
var titlePaint=hqChart.TitlePaint[titleIndex];
|
|
126089
|
+
var titleData=new DynamicTitleData(chart.Data,varItem.Name,null);
|
|
126090
|
+
titleData.DataType="ChartMultiBar";
|
|
126091
|
+
titleData.GetItemCallback=(kItem)=>{ return chart.GetItem(kItem); }
|
|
126092
|
+
titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
|
|
126093
|
+
}
|
|
126047
126094
|
|
|
126048
126095
|
this.SetChartIndexName(chart);
|
|
126049
126096
|
frame.ChartPaint.push(chart);
|
|
@@ -127470,6 +127517,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
127470
127517
|
outVarItem.Draw=drawItem;
|
|
127471
127518
|
result.push(outVarItem);
|
|
127472
127519
|
}
|
|
127520
|
+
else if (draw.DrawType==SCRIPT_CHART_NAME.DRAW_KLINE)
|
|
127521
|
+
{
|
|
127522
|
+
drawItem.Name=draw.Name;
|
|
127523
|
+
drawItem.Type=draw.Type;
|
|
127524
|
+
drawItem.DrawType=draw.DrawType;
|
|
127525
|
+
|
|
127526
|
+
drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);
|
|
127527
|
+
drawItem.Config=draw.Config;
|
|
127528
|
+
outVarItem.Draw=drawItem;
|
|
127529
|
+
result.push(outVarItem);
|
|
127530
|
+
}
|
|
127473
127531
|
else
|
|
127474
127532
|
{
|
|
127475
127533
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -129197,7 +129255,12 @@ function GetBlackStyle()
|
|
|
129197
129255
|
|
|
129198
129256
|
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
129199
129257
|
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
129200
|
-
UnchagneTextColor:"rgb(228,228,228)" //平盘文字颜色
|
|
129258
|
+
UnchagneTextColor:"rgb(228,228,228)", //平盘文字颜色
|
|
129259
|
+
|
|
129260
|
+
Selected:
|
|
129261
|
+
{
|
|
129262
|
+
BGColor:"rgb(49,48,56)",
|
|
129263
|
+
}
|
|
129201
129264
|
},
|
|
129202
129265
|
|
|
129203
129266
|
//报价列表
|
|
@@ -129556,6 +129619,17 @@ function JSDealChart(divElement)
|
|
|
129556
129619
|
|
|
129557
129620
|
this.JSChartContainer=chart;
|
|
129558
129621
|
this.DivElement.JSChart=this; //div中保存一份
|
|
129622
|
+
|
|
129623
|
+
//注册事件
|
|
129624
|
+
if (option.EventCallback)
|
|
129625
|
+
{
|
|
129626
|
+
for(var i=0;i<option.EventCallback.length;++i)
|
|
129627
|
+
{
|
|
129628
|
+
var item=option.EventCallback[i];
|
|
129629
|
+
chart.AddEventCallback(item);
|
|
129630
|
+
}
|
|
129631
|
+
}
|
|
129632
|
+
|
|
129559
129633
|
if (!option.Symbol)
|
|
129560
129634
|
{
|
|
129561
129635
|
chart.Draw();
|
|
@@ -129780,6 +129854,7 @@ function JSDealChartContainer(uielement)
|
|
|
129780
129854
|
chart.Frame=this.Frame;
|
|
129781
129855
|
chart.ChartBorder=this.Frame.ChartBorder;
|
|
129782
129856
|
chart.Canvas=this.Canvas;
|
|
129857
|
+
chart.UIElement=this.UIElement;
|
|
129783
129858
|
chart.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
129784
129859
|
this.ChartPaint[0]=chart;
|
|
129785
129860
|
|
|
@@ -129807,10 +129882,16 @@ function JSDealChartContainer(uielement)
|
|
|
129807
129882
|
bRegisterWheel=false;
|
|
129808
129883
|
JSConsole.Chart.Log('[JSDealChartContainer::Create] not register wheel event.');
|
|
129809
129884
|
}
|
|
129885
|
+
|
|
129886
|
+
if (IFrameSplitOperator.IsBool(option.EnableSelected)) chart.SelectedData.Enable=option.EnableSelected;
|
|
129810
129887
|
}
|
|
129811
129888
|
|
|
129812
129889
|
if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
|
|
129813
129890
|
if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
|
|
129891
|
+
|
|
129892
|
+
this.UIElement.onmousedown=(e)=> { this.UIOnMouseDown(e); }
|
|
129893
|
+
this.UIElement.ondblclick=(e)=>{ this.UIOnDblClick(e); }
|
|
129894
|
+
this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
|
|
129814
129895
|
}
|
|
129815
129896
|
|
|
129816
129897
|
this.Draw=function()
|
|
@@ -130184,6 +130265,40 @@ function JSDealChartContainer(uielement)
|
|
|
130184
130265
|
else e.returnValue = false;
|
|
130185
130266
|
}
|
|
130186
130267
|
|
|
130268
|
+
this.UIOnMouseDown=function(e)
|
|
130269
|
+
{
|
|
130270
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
130271
|
+
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
130272
|
+
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
130273
|
+
|
|
130274
|
+
|
|
130275
|
+
var chart=this.ChartPaint[0];
|
|
130276
|
+
if (!chart) return;
|
|
130277
|
+
|
|
130278
|
+
var clickData=chart.OnMouseDown(x,y,e);
|
|
130279
|
+
if (!clickData) return;
|
|
130280
|
+
|
|
130281
|
+
if ((clickData.Type==1) && (e.button==0 || e.button==2)) //点击行
|
|
130282
|
+
{
|
|
130283
|
+
if (clickData.Redraw==true) this.Draw();
|
|
130284
|
+
}
|
|
130285
|
+
}
|
|
130286
|
+
|
|
130287
|
+
this.UIOnDblClick=function(e)
|
|
130288
|
+
{
|
|
130289
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
130290
|
+
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
130291
|
+
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
130292
|
+
|
|
130293
|
+
var chart=this.ChartPaint[0];
|
|
130294
|
+
if (chart) chart.OnDblClick(x,y,e);
|
|
130295
|
+
}
|
|
130296
|
+
|
|
130297
|
+
this.UIOnContextMenu=function(e)
|
|
130298
|
+
{
|
|
130299
|
+
e.preventDefault();
|
|
130300
|
+
}
|
|
130301
|
+
|
|
130187
130302
|
this.GotoNextPage=function()
|
|
130188
130303
|
{
|
|
130189
130304
|
if (!this.Data || !IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return false;
|
|
@@ -130277,7 +130392,7 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
130277
130392
|
{
|
|
130278
130393
|
var item=data.detail[i];
|
|
130279
130394
|
|
|
130280
|
-
var dealItem={ Time:item[0], Price:item[1], Vol:item[2], BS:item[4], Amount:item[3] };
|
|
130395
|
+
var dealItem={ Time:item[0], Price:item[1], Vol:item[2], BS:item[4], Amount:item[3], Guid:Guid() };
|
|
130281
130396
|
dealItem.Source=item;
|
|
130282
130397
|
|
|
130283
130398
|
if (item[5]) dealItem.StrTime=item[5];
|
|
@@ -130403,6 +130518,7 @@ function ChartDealList()
|
|
|
130403
130518
|
this.IsSingleTable=false; //单表模式
|
|
130404
130519
|
this.IsShowHeader=true; //是否显示表头
|
|
130405
130520
|
this.ShowOrder=1; //0=顺序 1=倒序
|
|
130521
|
+
this.SelectedData={ Index:null, Guid:null, Enable:false }; //{ Index:序号, Guid, Enable:是否启动 }
|
|
130406
130522
|
|
|
130407
130523
|
this.SizeChange=true;
|
|
130408
130524
|
|
|
@@ -130413,6 +130529,8 @@ function ChartDealList()
|
|
|
130413
130529
|
|
|
130414
130530
|
this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
|
|
130415
130531
|
|
|
130532
|
+
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor };
|
|
130533
|
+
|
|
130416
130534
|
//表头配置
|
|
130417
130535
|
this.HeaderFontConfig={ Size:g_JSChartResource.DealList.Header.Font.Size, Name:g_JSChartResource.DealList.Header.Font.Name };
|
|
130418
130536
|
this.HeaderColor=g_JSChartResource.DealList.Header.Color;
|
|
@@ -130452,6 +130570,7 @@ function ChartDealList()
|
|
|
130452
130570
|
];
|
|
130453
130571
|
|
|
130454
130572
|
this.RectClient={};
|
|
130573
|
+
this.AryCellRect=[]; //{ Rect:, Type: 1=单行 }
|
|
130455
130574
|
|
|
130456
130575
|
this.ReloadResource=function(resource)
|
|
130457
130576
|
{
|
|
@@ -130552,6 +130671,7 @@ function ChartDealList()
|
|
|
130552
130671
|
|
|
130553
130672
|
this.Draw=function()
|
|
130554
130673
|
{
|
|
130674
|
+
this.AryCellRect=[];
|
|
130555
130675
|
if (this.SizeChange) this.CalculateSize();
|
|
130556
130676
|
else this.UpdateCacheData();
|
|
130557
130677
|
|
|
@@ -130707,6 +130827,7 @@ function ChartDealList()
|
|
|
130707
130827
|
for(j=0;j<this.RowCount && index>=0;++j, --index)
|
|
130708
130828
|
{
|
|
130709
130829
|
var dataItem=this.Data.Data[index];
|
|
130830
|
+
this.DrawSelectedRow(dataItem, index, rtRow);
|
|
130710
130831
|
|
|
130711
130832
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
130712
130833
|
|
|
@@ -130724,8 +130845,15 @@ function ChartDealList()
|
|
|
130724
130845
|
for(j=0;j<this.RowCount && index<dataCount;++j, ++index)
|
|
130725
130846
|
{
|
|
130726
130847
|
var dataItem=this.Data.Data[index];
|
|
130848
|
+
var rtRow={ Left:textLeft-this.HeaderMergin.Left, Top:textTop, Height:this.RowHeight, Width:this.TableWidth };
|
|
130849
|
+
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
130850
|
+
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
130851
|
+
|
|
130852
|
+
this.DrawSelectedRow(dataItem, index, rtRow);
|
|
130727
130853
|
|
|
130728
130854
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
130855
|
+
|
|
130856
|
+
this.AryCellRect.push({ Rect:rtRow, Type:1, DataIndex:index });
|
|
130729
130857
|
|
|
130730
130858
|
textTop+=this.RowHeight;
|
|
130731
130859
|
}
|
|
@@ -130831,6 +130959,16 @@ function ChartDealList()
|
|
|
130831
130959
|
}
|
|
130832
130960
|
}
|
|
130833
130961
|
|
|
130962
|
+
this.DrawSelectedRow=function(data, index, rtRow)
|
|
130963
|
+
{
|
|
130964
|
+
if (!this.SelectedData) return;
|
|
130965
|
+
if (!this.SelectedData.Enable) return;
|
|
130966
|
+
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return;
|
|
130967
|
+
|
|
130968
|
+
this.Canvas.fillStyle=this.SelectedConfig.BGColor;
|
|
130969
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
130970
|
+
}
|
|
130971
|
+
|
|
130834
130972
|
this.DrawItemText=function(text, textColor, textAlign, left, top, width)
|
|
130835
130973
|
{
|
|
130836
130974
|
var x=left;
|
|
@@ -130957,6 +131095,81 @@ function ChartDealList()
|
|
|
130957
131095
|
{
|
|
130958
131096
|
return GetFontHeight(this.Canvas, font, word);
|
|
130959
131097
|
}
|
|
131098
|
+
|
|
131099
|
+
this.OnMouseDown=function(x,y,e) //Type: 1=行
|
|
131100
|
+
{
|
|
131101
|
+
if (!this.Data) return null;
|
|
131102
|
+
|
|
131103
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
131104
|
+
var insidePoint={X:x/pixelTatio, Y:y/pixelTatio};
|
|
131105
|
+
var uiElement;
|
|
131106
|
+
if (this.UIElement) uiElement={Left:this.UIElement.getBoundingClientRect().left, Top:this.UIElement.getBoundingClientRect().top};
|
|
131107
|
+
else uiElement={Left:null, Top:null};
|
|
131108
|
+
|
|
131109
|
+
var row=this.PtInBody(x,y);
|
|
131110
|
+
if (row)
|
|
131111
|
+
{
|
|
131112
|
+
var bRedraw=true;
|
|
131113
|
+
var index=row.DataIndex;
|
|
131114
|
+
var id=row.Item.Guid
|
|
131115
|
+
if (this.SelectedData.Index==index && this.SelectedData.Guid==id) bRedraw=false;
|
|
131116
|
+
|
|
131117
|
+
this.SelectedData.Index=index;
|
|
131118
|
+
this.SelectedData.Guid=id;
|
|
131119
|
+
|
|
131120
|
+
var eventID=JSCHART_EVENT_ID.ON_CLICK_DEAL_ROW;
|
|
131121
|
+
if (e.button==2) eventID=JSCHART_EVENT_ID.ON_RCLICK_DEAL_ROW;
|
|
131122
|
+
|
|
131123
|
+
this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
|
|
131124
|
+
|
|
131125
|
+
return { Type:row.Type, Redraw:bRedraw, Row:row };
|
|
131126
|
+
}
|
|
131127
|
+
|
|
131128
|
+
return null;
|
|
131129
|
+
}
|
|
131130
|
+
|
|
131131
|
+
this.OnDblClick=function(x,y,e)
|
|
131132
|
+
{
|
|
131133
|
+
if (!this.Data) return false;
|
|
131134
|
+
|
|
131135
|
+
var row=this.PtInBody(x,y);
|
|
131136
|
+
if (row)
|
|
131137
|
+
{
|
|
131138
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_DEAL_ROW, { Data:row, X:x, Y:y });
|
|
131139
|
+
return true;
|
|
131140
|
+
}
|
|
131141
|
+
|
|
131142
|
+
return false;
|
|
131143
|
+
}
|
|
131144
|
+
|
|
131145
|
+
this.PtInBody=function(x,y)
|
|
131146
|
+
{
|
|
131147
|
+
if (!this.Data) return null;
|
|
131148
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return null;
|
|
131149
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryCellRect)) return null;
|
|
131150
|
+
|
|
131151
|
+
for(var i=0;i<this.AryCellRect.length;++i)
|
|
131152
|
+
{
|
|
131153
|
+
var item=this.AryCellRect[i];
|
|
131154
|
+
var rtRow=item.Rect;
|
|
131155
|
+
if (x>=rtRow.Left && x<=rtRow.Right && y>=rtRow.Top && y<=rtRow.Bottom)
|
|
131156
|
+
{
|
|
131157
|
+
var data={ Rect:rtRow, DataIndex:item.DataIndex, Item:this.Data.Data[item.DataIndex], Type:item.Type };
|
|
131158
|
+
return data;
|
|
131159
|
+
}
|
|
131160
|
+
}
|
|
131161
|
+
|
|
131162
|
+
return null;
|
|
131163
|
+
}
|
|
131164
|
+
|
|
131165
|
+
this.SendClickEvent=function(id, data)
|
|
131166
|
+
{
|
|
131167
|
+
var event=this.GetEventCallback(id);
|
|
131168
|
+
if (event && event.Callback)
|
|
131169
|
+
{
|
|
131170
|
+
event.Callback(event,data,this);
|
|
131171
|
+
}
|
|
131172
|
+
}
|
|
130960
131173
|
}
|
|
130961
131174
|
/*
|
|
130962
131175
|
Copyright (c) 2018 jones
|
|
@@ -139538,7 +139751,7 @@ function ChartReport()
|
|
|
139538
139751
|
return null;
|
|
139539
139752
|
}
|
|
139540
139753
|
|
|
139541
|
-
//设置选中行
|
|
139754
|
+
//设置选中行 option={ Symbol:, AutoYScroll:true/false Y滚动条自定定位 }
|
|
139542
139755
|
this.SetSelectedRow=function(option)
|
|
139543
139756
|
{
|
|
139544
139757
|
if (!option) return false;
|
|
@@ -143710,7 +143923,7 @@ function ScrollBarBGChart()
|
|
|
143710
143923
|
|
|
143711
143924
|
|
|
143712
143925
|
|
|
143713
|
-
var HQCHART_VERSION="1.1.
|
|
143926
|
+
var HQCHART_VERSION="1.1.14481";
|
|
143714
143927
|
|
|
143715
143928
|
function PrintHQChartVersion()
|
|
143716
143929
|
{
|