hqchart 1.1.14478 → 1.1.14484
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 +46 -47
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +10 -2
- package/src/jscommon/umychart.NetworkFilterTest.js +125 -10
- package/src/jscommon/umychart.complier.js +33 -0
- package/src/jscommon/umychart.deal.js +104 -17
- package/src/jscommon/umychart.js +137 -5
- package/src/jscommon/umychart.style.js +6 -1
- package/src/jscommon/umychart.testdata.js +125 -10
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +281 -24
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +125 -10
- package/src/jscommon/umychart.vue/umychart.vue.js +291 -26
|
@@ -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=
|
|
@@ -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
|
{
|
|
@@ -61701,6 +61707,19 @@ function DynamicChartTitlePainting()
|
|
|
61701
61707
|
DownColor:g_JSChartResource.IndexTitle.UpDownArrow.DownColor,
|
|
61702
61708
|
UnchangeColor:g_JSChartResource.IndexTitle.UpDownArrow.UnchangeColor
|
|
61703
61709
|
};
|
|
61710
|
+
|
|
61711
|
+
|
|
61712
|
+
//K线标题颜色
|
|
61713
|
+
this.UpColor=g_JSChartResource.UpTextColor;
|
|
61714
|
+
this.DownColor=g_JSChartResource.DownTextColor;
|
|
61715
|
+
this.UnchangeColor=g_JSChartResource.UnchagneTextColor;
|
|
61716
|
+
|
|
61717
|
+
this.VolColor=g_JSChartResource.Title.VolColor;
|
|
61718
|
+
this.AmountColor=g_JSChartResource.Title.AmountColor;
|
|
61719
|
+
this.DateTimeColor=g_JSChartResource.Title.DateTimeColor;
|
|
61720
|
+
this.NameColor = g_JSChartResource.Title.NameColor;
|
|
61721
|
+
this.PositionColor=g_JSChartResource.Title.PositionColor; //持仓
|
|
61722
|
+
|
|
61704
61723
|
|
|
61705
61724
|
|
|
61706
61725
|
//动态标题
|
|
@@ -61721,6 +61740,15 @@ function DynamicChartTitlePainting()
|
|
|
61721
61740
|
this.BGColor=g_JSChartResource.IndexTitleBGColor;
|
|
61722
61741
|
this.BGBorderColor=g_JSChartResource.IndexTitleBorderColor;
|
|
61723
61742
|
this.BGBorderMoveOnColor=g_JSChartResource.IndexTitleBorderMoveOnColor;
|
|
61743
|
+
|
|
61744
|
+
this.UpColor=g_JSChartResource.UpTextColor;
|
|
61745
|
+
this.DownColor=g_JSChartResource.DownTextColor;
|
|
61746
|
+
this.UnchangeColor=g_JSChartResource.UnchagneTextColor;
|
|
61747
|
+
|
|
61748
|
+
this.VolColor=g_JSChartResource.Title.VolColor;
|
|
61749
|
+
this.AmountColor=g_JSChartResource.Title.AmountColor;
|
|
61750
|
+
this.DateTimeColor=g_JSChartResource.Title.DateTimeColor;
|
|
61751
|
+
this.PositionColor=g_JSChartResource.Title.PositionColor; //持仓
|
|
61724
61752
|
}
|
|
61725
61753
|
|
|
61726
61754
|
this.SetDynamicTitleData=function(outName, args, data)
|
|
@@ -61944,6 +61972,93 @@ function DynamicChartTitlePainting()
|
|
|
61944
61972
|
return aryText;
|
|
61945
61973
|
}
|
|
61946
61974
|
|
|
61975
|
+
this.FromatKLineTitle=function(item, dataInfo)
|
|
61976
|
+
{
|
|
61977
|
+
var defaultfloatPrecision=GetfloatPrecision(dataInfo.Symbol);//价格小数位数
|
|
61978
|
+
var upperSymbol="";
|
|
61979
|
+
if (dataInfo.Symbol) upperSymbol=dataInfo.Symbol.toUpperCase();
|
|
61980
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
61981
|
+
var leftSpace=3*pixelRatio;
|
|
61982
|
+
|
|
61983
|
+
var aryText=[];
|
|
61984
|
+
|
|
61985
|
+
|
|
61986
|
+
if (IFrameSplitOperator.IsNumber(item.Date))
|
|
61987
|
+
{
|
|
61988
|
+
var text=IFrameSplitOperator.FormatDateString(item.Date);
|
|
61989
|
+
aryText.push({ Text:text, Color:this.DateTimeColor });
|
|
61990
|
+
}
|
|
61991
|
+
|
|
61992
|
+
if (IFrameSplitOperator.IsNumber(item.Open))
|
|
61993
|
+
{
|
|
61994
|
+
var color=this.GetColor(item.Open,item.YClose);
|
|
61995
|
+
var text=g_JSChartLocalization.GetText('KTitle-Open',this.LanguageID)+item.Open.toFixed(defaultfloatPrecision);
|
|
61996
|
+
aryText.push({ Text:text, Color:color, LeftSpace:leftSpace});
|
|
61997
|
+
}
|
|
61998
|
+
|
|
61999
|
+
if (IFrameSplitOperator.IsNumber(item.High))
|
|
62000
|
+
{
|
|
62001
|
+
var color=this.GetColor(item.High,item.YClose);
|
|
62002
|
+
var text=g_JSChartLocalization.GetText('KTitle-High',this.LanguageID)+item.High.toFixed(defaultfloatPrecision);
|
|
62003
|
+
aryText.push({ Text:text, Color:color, LeftSpace:leftSpace });
|
|
62004
|
+
}
|
|
62005
|
+
|
|
62006
|
+
if (IFrameSplitOperator.IsNumber(item.Low))
|
|
62007
|
+
{
|
|
62008
|
+
var color=this.GetColor(item.Low,item.YClose);
|
|
62009
|
+
var text=g_JSChartLocalization.GetText('KTitle-Low',this.LanguageID)+item.Low.toFixed(defaultfloatPrecision);
|
|
62010
|
+
aryText.push({ Text:text, Color:color, LeftSpace:leftSpace});
|
|
62011
|
+
}
|
|
62012
|
+
|
|
62013
|
+
if (IFrameSplitOperator.IsNumber(item.Close))
|
|
62014
|
+
{
|
|
62015
|
+
var color=this.GetColor(item.Close,item.YClose);
|
|
62016
|
+
var text=g_JSChartLocalization.GetText('KTitle-Close',this.LanguageID)+item.Close.toFixed(defaultfloatPrecision);
|
|
62017
|
+
aryText.push({ Text:text, Color:color, LeftSpace:leftSpace});
|
|
62018
|
+
}
|
|
62019
|
+
|
|
62020
|
+
//涨幅
|
|
62021
|
+
if (item.YFClose>0 && MARKET_SUFFIX_NAME.IsChinaFutures(upperSymbol))
|
|
62022
|
+
{
|
|
62023
|
+
var value=(item.Close-item.YFClose)/item.YFClose*100;
|
|
62024
|
+
var color = this.GetColor(value, 0);
|
|
62025
|
+
var text = g_JSChartLocalization.GetText('KTitle-Increase',this.LanguageID) + value.toFixed(2)+'%';
|
|
62026
|
+
aryText.push({ Text:text, Color:color, LeftSpace:leftSpace});
|
|
62027
|
+
}
|
|
62028
|
+
else if (item.YClose>0)
|
|
62029
|
+
{
|
|
62030
|
+
var value=(item.Close-item.YClose)/item.YClose*100;
|
|
62031
|
+
var color = this.GetColor(value, 0);
|
|
62032
|
+
var text = g_JSChartLocalization.GetText('KTitle-Increase',this.LanguageID) + value.toFixed(2)+'%';
|
|
62033
|
+
aryText.push({ Text:text, Color:color, LeftSpace:leftSpace});
|
|
62034
|
+
}
|
|
62035
|
+
|
|
62036
|
+
if (IFrameSplitOperator.IsNumber(item.Vol)) //成交量
|
|
62037
|
+
{
|
|
62038
|
+
var unit=MARKET_SUFFIX_NAME.GetVolUnit(upperSymbol);
|
|
62039
|
+
var vol=item.Vol/unit;
|
|
62040
|
+
var text=g_JSChartLocalization.GetText('KTitle-Vol',this.LanguageID)+IFrameSplitOperator.FromatIntegerString(vol,2,this.LanguageID);
|
|
62041
|
+
aryText.push({ Text:text, Color:this.VolColor, LeftSpace:leftSpace});
|
|
62042
|
+
}
|
|
62043
|
+
|
|
62044
|
+
if (IFrameSplitOperator.IsNumber(item.Amount)) //成交金额
|
|
62045
|
+
{
|
|
62046
|
+
var text=g_JSChartLocalization.GetText('KTitle-Amount',this.LanguageID)+IFrameSplitOperator.FormatValueString(item.Amount,2,this.LanguageID);
|
|
62047
|
+
aryText.push({ Text:text, Color:this.AmountColor, LeftSpace:leftSpace});
|
|
62048
|
+
}
|
|
62049
|
+
|
|
62050
|
+
return aryText;
|
|
62051
|
+
}
|
|
62052
|
+
|
|
62053
|
+
this.GetColor=function(price,yClose)
|
|
62054
|
+
{
|
|
62055
|
+
if (!IFrameSplitOperator.IsNumber(yClose)) return this.UnchangeColor;
|
|
62056
|
+
|
|
62057
|
+
if(price>yClose) return this.UpColor;
|
|
62058
|
+
else if (price<yClose) return this.DownColor;
|
|
62059
|
+
else return this.UnchangeColor;
|
|
62060
|
+
}
|
|
62061
|
+
|
|
61947
62062
|
this.ForamtMultiLineTitle=function(dataIndex, dataInfo)
|
|
61948
62063
|
{
|
|
61949
62064
|
if (!IFrameSplitOperator.IsNonEmptyArray(dataInfo.Lines)) return null;
|
|
@@ -62429,6 +62544,12 @@ function DynamicChartTitlePainting()
|
|
|
62429
62544
|
if (!aryText) return null;
|
|
62430
62545
|
return { Text:null, ArrayText:aryText };
|
|
62431
62546
|
}
|
|
62547
|
+
else if (item.DataType=="DRAWKLINE")
|
|
62548
|
+
{
|
|
62549
|
+
aryText=this.FromatKLineTitle(value, item);
|
|
62550
|
+
if (!aryText) return null;
|
|
62551
|
+
return { Text:null, ArrayText:aryText };
|
|
62552
|
+
}
|
|
62432
62553
|
else if (g_ScriptIndexChartFactory.Has(item.DataType)) //外部挂接
|
|
62433
62554
|
{
|
|
62434
62555
|
var find=g_ScriptIndexChartFactory.Get(item.DataType);
|
|
@@ -76371,7 +76492,12 @@ function JSChartResource()
|
|
|
76371
76492
|
|
|
76372
76493
|
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
76373
76494
|
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
76374
|
-
UnchagneTextColor:"rgb(0,0,0)" //平盘文字颜色
|
|
76495
|
+
UnchagneTextColor:"rgb(0,0,0)", //平盘文字颜色
|
|
76496
|
+
|
|
76497
|
+
Selected:
|
|
76498
|
+
{
|
|
76499
|
+
BGColor:"rgb(180,240,240)",
|
|
76500
|
+
}
|
|
76375
76501
|
},
|
|
76376
76502
|
|
|
76377
76503
|
//报价列表
|
|
@@ -77424,6 +77550,12 @@ function JSChartResource()
|
|
|
77424
77550
|
this.DealList.FieldColor.Bar[i]=filed.Bar[i];
|
|
77425
77551
|
}
|
|
77426
77552
|
}
|
|
77553
|
+
|
|
77554
|
+
if (item.Selected)
|
|
77555
|
+
{
|
|
77556
|
+
var subItem=item.Selected;
|
|
77557
|
+
if (subItem.BGColor) this.DealList.Selected.BGColor=subItem.BGColor;
|
|
77558
|
+
}
|
|
77427
77559
|
}
|
|
77428
77560
|
|
|
77429
77561
|
if (style.Report) this.SetReportStyle(style.Report);
|
|
@@ -122462,6 +122594,8 @@ var SCRIPT_CHART_NAME=
|
|
|
122462
122594
|
SCATTER_PLOT:"SCATTER_PLOT", //散点图
|
|
122463
122595
|
|
|
122464
122596
|
CLIP_COLOR_STICK:"CLIP_COLOR_STICK", //上下柱子 裁剪
|
|
122597
|
+
|
|
122598
|
+
DRAW_KLINE:"DRAWKLINE"
|
|
122465
122599
|
}
|
|
122466
122600
|
|
|
122467
122601
|
|
|
@@ -123530,6 +123664,26 @@ function ScriptIndex(name,script,args,option)
|
|
|
123530
123664
|
if (varItem.Color) //如果设置了颜色,使用外面设置的颜色
|
|
123531
123665
|
chart.UnchagneColor=chart.DownColor=chart.UpColor=this.GetColor(varItem.Color);
|
|
123532
123666
|
|
|
123667
|
+
if (varItem.Draw.Config)
|
|
123668
|
+
{
|
|
123669
|
+
var config=varItem.Draw.Config;
|
|
123670
|
+
if (IFrameSplitOperator.IsBool(config.IsShowMaxMinPrice)) chart.IsShowMaxMinPrice=config.IsShowMaxMinPrice;
|
|
123671
|
+
if (IFrameSplitOperator.IsBool(config.IsShowKTooltip)) chart.IsShowKTooltip=config.IsShowKTooltip;
|
|
123672
|
+
if (config.Symbol) chart.Symbol=config.Symbol;
|
|
123673
|
+
if (config.Name) chart.Title=config.Name;
|
|
123674
|
+
}
|
|
123675
|
+
|
|
123676
|
+
var bShowTitle=false;
|
|
123677
|
+
if (IFrameSplitOperator.IsBool(varItem.IsShowTitle)) bShowTitle=varItem.IsShowTitle;
|
|
123678
|
+
if (bShowTitle)
|
|
123679
|
+
{
|
|
123680
|
+
let titleIndex=windowIndex+1;
|
|
123681
|
+
var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color); //标题
|
|
123682
|
+
titleData.DataType="DRAWKLINE";
|
|
123683
|
+
titleData.Symbol=chart.Symbol;
|
|
123684
|
+
hqChart.TitlePaint[titleIndex].Data[id]=titleData;
|
|
123685
|
+
}
|
|
123686
|
+
|
|
123533
123687
|
this.SetChartIndexName(chart);
|
|
123534
123688
|
hqChart.ChartPaint.push(chart);
|
|
123535
123689
|
}
|
|
@@ -127489,6 +127643,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
127489
127643
|
outVarItem.Draw=drawItem;
|
|
127490
127644
|
result.push(outVarItem);
|
|
127491
127645
|
}
|
|
127646
|
+
else if (draw.DrawType==SCRIPT_CHART_NAME.DRAW_KLINE)
|
|
127647
|
+
{
|
|
127648
|
+
drawItem.Name=draw.Name;
|
|
127649
|
+
drawItem.Type=draw.Type;
|
|
127650
|
+
drawItem.DrawType=draw.DrawType;
|
|
127651
|
+
|
|
127652
|
+
drawItem.DrawData=this.FittingArray(draw.DrawData,date,time,hqChart,1);
|
|
127653
|
+
drawItem.Config=draw.Config;
|
|
127654
|
+
outVarItem.Draw=drawItem;
|
|
127655
|
+
result.push(outVarItem);
|
|
127656
|
+
}
|
|
127492
127657
|
else
|
|
127493
127658
|
{
|
|
127494
127659
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -129216,7 +129381,12 @@ function GetBlackStyle()
|
|
|
129216
129381
|
|
|
129217
129382
|
UpTextColor:"rgb(238,21,21)", //上涨文字颜色
|
|
129218
129383
|
DownTextColor:"rgb(25,158,0)", //下跌文字颜色
|
|
129219
|
-
UnchagneTextColor:"rgb(228,228,228)" //平盘文字颜色
|
|
129384
|
+
UnchagneTextColor:"rgb(228,228,228)", //平盘文字颜色
|
|
129385
|
+
|
|
129386
|
+
Selected:
|
|
129387
|
+
{
|
|
129388
|
+
BGColor:"rgb(49,48,56)",
|
|
129389
|
+
}
|
|
129220
129390
|
},
|
|
129221
129391
|
|
|
129222
129392
|
//报价列表
|
|
@@ -129575,6 +129745,17 @@ function JSDealChart(divElement)
|
|
|
129575
129745
|
|
|
129576
129746
|
this.JSChartContainer=chart;
|
|
129577
129747
|
this.DivElement.JSChart=this; //div中保存一份
|
|
129748
|
+
|
|
129749
|
+
//注册事件
|
|
129750
|
+
if (option.EventCallback)
|
|
129751
|
+
{
|
|
129752
|
+
for(var i=0;i<option.EventCallback.length;++i)
|
|
129753
|
+
{
|
|
129754
|
+
var item=option.EventCallback[i];
|
|
129755
|
+
chart.AddEventCallback(item);
|
|
129756
|
+
}
|
|
129757
|
+
}
|
|
129758
|
+
|
|
129578
129759
|
if (!option.Symbol)
|
|
129579
129760
|
{
|
|
129580
129761
|
chart.Draw();
|
|
@@ -129799,6 +129980,7 @@ function JSDealChartContainer(uielement)
|
|
|
129799
129980
|
chart.Frame=this.Frame;
|
|
129800
129981
|
chart.ChartBorder=this.Frame.ChartBorder;
|
|
129801
129982
|
chart.Canvas=this.Canvas;
|
|
129983
|
+
chart.UIElement=this.UIElement;
|
|
129802
129984
|
chart.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
129803
129985
|
this.ChartPaint[0]=chart;
|
|
129804
129986
|
|
|
@@ -129826,12 +130008,16 @@ function JSDealChartContainer(uielement)
|
|
|
129826
130008
|
bRegisterWheel=false;
|
|
129827
130009
|
JSConsole.Chart.Log('[JSDealChartContainer::Create] not register wheel event.');
|
|
129828
130010
|
}
|
|
130011
|
+
|
|
130012
|
+
if (IFrameSplitOperator.IsBool(option.EnableSelected)) chart.SelectedData.Enable=option.EnableSelected;
|
|
129829
130013
|
}
|
|
129830
130014
|
|
|
129831
130015
|
if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
|
|
129832
130016
|
if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
|
|
129833
130017
|
|
|
129834
130018
|
this.UIElement.onmousedown=(e)=> { this.UIOnMouseDown(e); }
|
|
130019
|
+
this.UIElement.ondblclick=(e)=>{ this.UIOnDblClick(e); }
|
|
130020
|
+
this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
|
|
129835
130021
|
}
|
|
129836
130022
|
|
|
129837
130023
|
this.Draw=function()
|
|
@@ -130215,20 +130401,28 @@ function JSDealChartContainer(uielement)
|
|
|
130215
130401
|
var chart=this.ChartPaint[0];
|
|
130216
130402
|
if (!chart) return;
|
|
130217
130403
|
|
|
130218
|
-
/*
|
|
130219
130404
|
var clickData=chart.OnMouseDown(x,y,e);
|
|
130220
130405
|
if (!clickData) return;
|
|
130221
130406
|
|
|
130222
|
-
if ((clickData.Type==
|
|
130407
|
+
if ((clickData.Type==1) && (e.button==0 || e.button==2)) //点击行
|
|
130223
130408
|
{
|
|
130224
130409
|
if (clickData.Redraw==true) this.Draw();
|
|
130225
130410
|
}
|
|
130226
|
-
|
|
130227
|
-
|
|
130228
|
-
|
|
130229
|
-
|
|
130230
|
-
|
|
130231
|
-
|
|
130411
|
+
}
|
|
130412
|
+
|
|
130413
|
+
this.UIOnDblClick=function(e)
|
|
130414
|
+
{
|
|
130415
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
130416
|
+
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
130417
|
+
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
130418
|
+
|
|
130419
|
+
var chart=this.ChartPaint[0];
|
|
130420
|
+
if (chart) chart.OnDblClick(x,y,e);
|
|
130421
|
+
}
|
|
130422
|
+
|
|
130423
|
+
this.UIOnContextMenu=function(e)
|
|
130424
|
+
{
|
|
130425
|
+
e.preventDefault();
|
|
130232
130426
|
}
|
|
130233
130427
|
|
|
130234
130428
|
this.GotoNextPage=function()
|
|
@@ -130450,7 +130644,7 @@ function ChartDealList()
|
|
|
130450
130644
|
this.IsSingleTable=false; //单表模式
|
|
130451
130645
|
this.IsShowHeader=true; //是否显示表头
|
|
130452
130646
|
this.ShowOrder=1; //0=顺序 1=倒序
|
|
130453
|
-
this.SelectedData={ Index:
|
|
130647
|
+
this.SelectedData={ Index:null, Guid:null, Enable:false }; //{ Index:序号, Guid, Enable:是否启动 }
|
|
130454
130648
|
|
|
130455
130649
|
this.SizeChange=true;
|
|
130456
130650
|
|
|
@@ -130461,7 +130655,7 @@ function ChartDealList()
|
|
|
130461
130655
|
|
|
130462
130656
|
this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
|
|
130463
130657
|
|
|
130464
|
-
this.SelectedConfig={ BGColor:
|
|
130658
|
+
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor };
|
|
130465
130659
|
|
|
130466
130660
|
//表头配置
|
|
130467
130661
|
this.HeaderFontConfig={ Size:g_JSChartResource.DealList.Header.Font.Size, Name:g_JSChartResource.DealList.Header.Font.Name };
|
|
@@ -130502,6 +130696,7 @@ function ChartDealList()
|
|
|
130502
130696
|
];
|
|
130503
130697
|
|
|
130504
130698
|
this.RectClient={};
|
|
130699
|
+
this.AryCellRect=[]; //{ Rect:, Type: 1=单行 }
|
|
130505
130700
|
|
|
130506
130701
|
this.ReloadResource=function(resource)
|
|
130507
130702
|
{
|
|
@@ -130602,6 +130797,7 @@ function ChartDealList()
|
|
|
130602
130797
|
|
|
130603
130798
|
this.Draw=function()
|
|
130604
130799
|
{
|
|
130800
|
+
this.AryCellRect=[];
|
|
130605
130801
|
if (this.SizeChange) this.CalculateSize();
|
|
130606
130802
|
else this.UpdateCacheData();
|
|
130607
130803
|
|
|
@@ -130757,7 +130953,7 @@ function ChartDealList()
|
|
|
130757
130953
|
for(j=0;j<this.RowCount && index>=0;++j, --index)
|
|
130758
130954
|
{
|
|
130759
130955
|
var dataItem=this.Data.Data[index];
|
|
130760
|
-
|
|
130956
|
+
this.DrawSelectedRow(dataItem, index, rtRow);
|
|
130761
130957
|
|
|
130762
130958
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
130763
130959
|
|
|
@@ -130775,10 +130971,15 @@ function ChartDealList()
|
|
|
130775
130971
|
for(j=0;j<this.RowCount && index<dataCount;++j, ++index)
|
|
130776
130972
|
{
|
|
130777
130973
|
var dataItem=this.Data.Data[index];
|
|
130974
|
+
var rtRow={ Left:textLeft-this.HeaderMergin.Left, Top:textTop, Height:this.RowHeight, Width:this.TableWidth };
|
|
130975
|
+
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
130976
|
+
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
130778
130977
|
|
|
130779
|
-
|
|
130978
|
+
this.DrawSelectedRow(dataItem, index, rtRow);
|
|
130780
130979
|
|
|
130781
130980
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
130981
|
+
|
|
130982
|
+
this.AryCellRect.push({ Rect:rtRow, Type:1, DataIndex:index });
|
|
130782
130983
|
|
|
130783
130984
|
textTop+=this.RowHeight;
|
|
130784
130985
|
}
|
|
@@ -130884,11 +131085,11 @@ function ChartDealList()
|
|
|
130884
131085
|
}
|
|
130885
131086
|
}
|
|
130886
131087
|
|
|
130887
|
-
this.DrawSelectedRow=function(data,
|
|
131088
|
+
this.DrawSelectedRow=function(data, index, rtRow)
|
|
130888
131089
|
{
|
|
130889
|
-
|
|
130890
|
-
|
|
130891
|
-
|
|
131090
|
+
if (!this.SelectedData) return;
|
|
131091
|
+
if (!this.SelectedData.Enable) return;
|
|
131092
|
+
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return;
|
|
130892
131093
|
|
|
130893
131094
|
this.Canvas.fillStyle=this.SelectedConfig.BGColor;
|
|
130894
131095
|
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
@@ -131021,7 +131222,7 @@ function ChartDealList()
|
|
|
131021
131222
|
return GetFontHeight(this.Canvas, font, word);
|
|
131022
131223
|
}
|
|
131023
131224
|
|
|
131024
|
-
this.OnMouseDown=function(x,y,e) //Type:
|
|
131225
|
+
this.OnMouseDown=function(x,y,e) //Type: 1=行
|
|
131025
131226
|
{
|
|
131026
131227
|
if (!this.Data) return null;
|
|
131027
131228
|
|
|
@@ -131032,12 +131233,68 @@ function ChartDealList()
|
|
|
131032
131233
|
else uiElement={Left:null, Top:null};
|
|
131033
131234
|
|
|
131034
131235
|
var row=this.PtInBody(x,y);
|
|
131236
|
+
if (row)
|
|
131237
|
+
{
|
|
131238
|
+
var bRedraw=true;
|
|
131239
|
+
var index=row.DataIndex;
|
|
131240
|
+
var id=row.Item.Guid
|
|
131241
|
+
if (this.SelectedData.Index==index && this.SelectedData.Guid==id) bRedraw=false;
|
|
131242
|
+
|
|
131243
|
+
this.SelectedData.Index=index;
|
|
131244
|
+
this.SelectedData.Guid=id;
|
|
131245
|
+
|
|
131246
|
+
var eventID=JSCHART_EVENT_ID.ON_CLICK_DEAL_ROW;
|
|
131247
|
+
if (e.button==2) eventID=JSCHART_EVENT_ID.ON_RCLICK_DEAL_ROW;
|
|
131248
|
+
|
|
131249
|
+
this.SendClickEvent(eventID, { Data:row, X:x, Y:y, e:e, Inside:insidePoint, UIElement:uiElement });
|
|
131250
|
+
|
|
131251
|
+
return { Type:row.Type, Redraw:bRedraw, Row:row };
|
|
131252
|
+
}
|
|
131253
|
+
|
|
131254
|
+
return null;
|
|
131255
|
+
}
|
|
131256
|
+
|
|
131257
|
+
this.OnDblClick=function(x,y,e)
|
|
131258
|
+
{
|
|
131259
|
+
if (!this.Data) return false;
|
|
131260
|
+
|
|
131261
|
+
var row=this.PtInBody(x,y);
|
|
131262
|
+
if (row)
|
|
131263
|
+
{
|
|
131264
|
+
this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_DEAL_ROW, { Data:row, X:x, Y:y });
|
|
131265
|
+
return true;
|
|
131266
|
+
}
|
|
131267
|
+
|
|
131268
|
+
return false;
|
|
131035
131269
|
}
|
|
131036
131270
|
|
|
131037
131271
|
this.PtInBody=function(x,y)
|
|
131038
131272
|
{
|
|
131039
131273
|
if (!this.Data) return null;
|
|
131040
131274
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return null;
|
|
131275
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryCellRect)) return null;
|
|
131276
|
+
|
|
131277
|
+
for(var i=0;i<this.AryCellRect.length;++i)
|
|
131278
|
+
{
|
|
131279
|
+
var item=this.AryCellRect[i];
|
|
131280
|
+
var rtRow=item.Rect;
|
|
131281
|
+
if (x>=rtRow.Left && x<=rtRow.Right && y>=rtRow.Top && y<=rtRow.Bottom)
|
|
131282
|
+
{
|
|
131283
|
+
var data={ Rect:rtRow, DataIndex:item.DataIndex, Item:this.Data.Data[item.DataIndex], Type:item.Type };
|
|
131284
|
+
return data;
|
|
131285
|
+
}
|
|
131286
|
+
}
|
|
131287
|
+
|
|
131288
|
+
return null;
|
|
131289
|
+
}
|
|
131290
|
+
|
|
131291
|
+
this.SendClickEvent=function(id, data)
|
|
131292
|
+
{
|
|
131293
|
+
var event=this.GetEventCallback(id);
|
|
131294
|
+
if (event && event.Callback)
|
|
131295
|
+
{
|
|
131296
|
+
event.Callback(event,data,this);
|
|
131297
|
+
}
|
|
131041
131298
|
}
|
|
131042
131299
|
}
|
|
131043
131300
|
/*
|
|
@@ -143792,7 +144049,7 @@ function ScrollBarBGChart()
|
|
|
143792
144049
|
|
|
143793
144050
|
|
|
143794
144051
|
|
|
143795
|
-
var HQCHART_VERSION="1.1.
|
|
144052
|
+
var HQCHART_VERSION="1.1.14483";
|
|
143796
144053
|
|
|
143797
144054
|
function PrintHQChartVersion()
|
|
143798
144055
|
{
|