hqchart 1.1.14746 → 1.1.14752
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.
|
@@ -133852,6 +133852,8 @@ function JSDealChart(divElement)
|
|
|
133852
133852
|
}
|
|
133853
133853
|
}
|
|
133854
133854
|
|
|
133855
|
+
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
133856
|
+
|
|
133855
133857
|
if (!option.Symbol)
|
|
133856
133858
|
{
|
|
133857
133859
|
chart.Draw();
|
|
@@ -133992,10 +133994,15 @@ function JSDealChartContainer(uielement)
|
|
|
133992
133994
|
this.AutoUpdateFrequency=15000; //更新频率
|
|
133993
133995
|
|
|
133994
133996
|
this.LoadDataSplashTitle="数据加载中"; //下载数据提示信息
|
|
133997
|
+
|
|
133998
|
+
this.TooltipMinuteChart; //分时图
|
|
133995
133999
|
|
|
133996
134000
|
this.UIElement=uielement;
|
|
133997
134001
|
this.LastPoint=new Point(); //鼠标位置
|
|
133998
134002
|
|
|
134003
|
+
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
134004
|
+
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
134005
|
+
|
|
133999
134006
|
this.IsDestroy=false; //是否已经销毁了
|
|
134000
134007
|
|
|
134001
134008
|
this.ChartDestroy=function() //销毁
|
|
@@ -134006,6 +134013,51 @@ function JSDealChartContainer(uielement)
|
|
|
134006
134013
|
|
|
134007
134014
|
this.EnableFilterData=false; //是否启动筛选
|
|
134008
134015
|
|
|
134016
|
+
this.InitalMinuteChartTooltip=function(option)
|
|
134017
|
+
{
|
|
134018
|
+
if (this.TooltipMinuteChart) return;
|
|
134019
|
+
|
|
134020
|
+
this.TooltipMinuteChart=new JSTooltipMinuteChart();
|
|
134021
|
+
this.TooltipMinuteChart.Inital(this, option);
|
|
134022
|
+
this.TooltipMinuteChart.Create();
|
|
134023
|
+
}
|
|
134024
|
+
|
|
134025
|
+
this.DestroyMinuteChartTooltip=function()
|
|
134026
|
+
{
|
|
134027
|
+
if (!this.TooltipMinuteChart) return;
|
|
134028
|
+
|
|
134029
|
+
this.TooltipMinuteChart.Destroy();
|
|
134030
|
+
this.TooltipMinuteChart=null;
|
|
134031
|
+
}
|
|
134032
|
+
|
|
134033
|
+
//data={ Symbol }
|
|
134034
|
+
this.ShowMinuteChartTooltip=function(x,y, data)
|
|
134035
|
+
{
|
|
134036
|
+
if (!this.TooltipMinuteChart) return;
|
|
134037
|
+
|
|
134038
|
+
var rtClient=this.UIElement.getBoundingClientRect();
|
|
134039
|
+
var rtScroll=GetScrollPosition();
|
|
134040
|
+
|
|
134041
|
+
var offsetLeft=rtClient.left+rtScroll.Left;
|
|
134042
|
+
var offsetTop=rtClient.top+rtScroll.Top;
|
|
134043
|
+
|
|
134044
|
+
data.Offset={ Left:offsetLeft, Top:offsetTop };
|
|
134045
|
+
|
|
134046
|
+
this.TooltipMinuteChart.Show(data, x,y);
|
|
134047
|
+
}
|
|
134048
|
+
|
|
134049
|
+
this.HideMinuteChartTooltip=function()
|
|
134050
|
+
{
|
|
134051
|
+
if (!this.TooltipMinuteChart) return;
|
|
134052
|
+
|
|
134053
|
+
this.TooltipMinuteChart.Hide();
|
|
134054
|
+
}
|
|
134055
|
+
|
|
134056
|
+
this.HideAllTooltip=function()
|
|
134057
|
+
{
|
|
134058
|
+
this.HideMinuteChartTooltip();
|
|
134059
|
+
}
|
|
134060
|
+
|
|
134009
134061
|
//筛选数据
|
|
134010
134062
|
this.FilterData=function(aryDeal)
|
|
134011
134063
|
{
|
|
@@ -134114,6 +134166,7 @@ function JSDealChartContainer(uielement)
|
|
|
134114
134166
|
this.UIElement.onmousedown=(e)=> { this.UIOnMouseDown(e); }
|
|
134115
134167
|
this.UIElement.ondblclick=(e)=>{ this.UIOnDblClick(e); }
|
|
134116
134168
|
this.UIElement.oncontextmenu=(e)=> { this.UIOnContextMenu(e); }
|
|
134169
|
+
this.UIElement.onmousemove=(e)=>{ this.UIOnMouseMove(e);}
|
|
134117
134170
|
}
|
|
134118
134171
|
|
|
134119
134172
|
this.Draw=function()
|
|
@@ -134456,10 +134509,12 @@ function JSDealChartContainer(uielement)
|
|
|
134456
134509
|
|
|
134457
134510
|
if (wheelValue<0) //下一页
|
|
134458
134511
|
{
|
|
134512
|
+
this.HideAllTooltip();
|
|
134459
134513
|
if (this.GotoNextPage()) this.Draw();
|
|
134460
134514
|
}
|
|
134461
134515
|
else if (wheelValue>0) //上一页
|
|
134462
134516
|
{
|
|
134517
|
+
this.HideAllTooltip();
|
|
134463
134518
|
if (this.GotoPreviousPage()) this.Draw();
|
|
134464
134519
|
}
|
|
134465
134520
|
|
|
@@ -134475,9 +134530,11 @@ function JSDealChartContainer(uielement)
|
|
|
134475
134530
|
switch(keyID)
|
|
134476
134531
|
{
|
|
134477
134532
|
case 38: //up
|
|
134533
|
+
this.HideAllTooltip();
|
|
134478
134534
|
if (this.GotoPreviousPage()) this.Draw();
|
|
134479
134535
|
break;
|
|
134480
134536
|
case 40: //down
|
|
134537
|
+
this.HideAllTooltip();
|
|
134481
134538
|
if (this.GotoNextPage()) this.Draw();
|
|
134482
134539
|
break;
|
|
134483
134540
|
}
|
|
@@ -134487,6 +134544,12 @@ function JSDealChartContainer(uielement)
|
|
|
134487
134544
|
else e.returnValue = false;
|
|
134488
134545
|
}
|
|
134489
134546
|
|
|
134547
|
+
this.GetReportChart=function()
|
|
134548
|
+
{
|
|
134549
|
+
var chart=this.ChartPaint[0];
|
|
134550
|
+
return chart;
|
|
134551
|
+
}
|
|
134552
|
+
|
|
134490
134553
|
this.UIOnMouseDown=function(e)
|
|
134491
134554
|
{
|
|
134492
134555
|
var pixelTatio = GetDevicePixelRatio();
|
|
@@ -134506,6 +134569,67 @@ function JSDealChartContainer(uielement)
|
|
|
134506
134569
|
}
|
|
134507
134570
|
}
|
|
134508
134571
|
|
|
134572
|
+
this.UIOnMouseMove=function(e)
|
|
134573
|
+
{
|
|
134574
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
134575
|
+
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
134576
|
+
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
134577
|
+
|
|
134578
|
+
var oldMouseOnStatus=this.LastMouseStatus.MouseOnStatus;
|
|
134579
|
+
this.LastMouseStatus.OnMouseMove=null;
|
|
134580
|
+
|
|
134581
|
+
var bDrawTooltip=false;
|
|
134582
|
+
if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
|
|
134583
|
+
this.LastMouseStatus.TooltipStatus=null;
|
|
134584
|
+
|
|
134585
|
+
var bShowMinuteTooltip=false;
|
|
134586
|
+
var chartTooltipData=null;
|
|
134587
|
+
|
|
134588
|
+
this.LastMouseStatus.OnMouseMove={ X:x, Y:y };
|
|
134589
|
+
var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
|
|
134590
|
+
var report=this.GetReportChart();
|
|
134591
|
+
var bDraw=false;
|
|
134592
|
+
|
|
134593
|
+
if (report)
|
|
134594
|
+
{
|
|
134595
|
+
var tooltipData=report.GetTooltipData(x,y); //单元格提示信息
|
|
134596
|
+
if (tooltipData)
|
|
134597
|
+
{
|
|
134598
|
+
if (tooltipData.Type==20)
|
|
134599
|
+
{
|
|
134600
|
+
if (tooltipData.Data && tooltipData.Data.Symbol)
|
|
134601
|
+
{
|
|
134602
|
+
bShowMinuteTooltip=true;
|
|
134603
|
+
chartTooltipData={ Symbol:tooltipData.Data.Symbol, Rect:tooltipData.Rect };
|
|
134604
|
+
}
|
|
134605
|
+
}
|
|
134606
|
+
/*
|
|
134607
|
+
else if (tooltipData.Type==21)
|
|
134608
|
+
{
|
|
134609
|
+
if (tooltipData.Stock && tooltipData.Stock.Symbol)
|
|
134610
|
+
{
|
|
134611
|
+
bShowKLineTooltip=true;
|
|
134612
|
+
chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
|
|
134613
|
+
}
|
|
134614
|
+
}
|
|
134615
|
+
else
|
|
134616
|
+
{
|
|
134617
|
+
this.LastMouseStatus.TooltipStatus={ X:x, Y:y, Data:tooltipData, ClientX:e.clientX, ClientY:e.clientY };
|
|
134618
|
+
bDrawTooltip=true;
|
|
134619
|
+
}
|
|
134620
|
+
*/
|
|
134621
|
+
|
|
134622
|
+
}
|
|
134623
|
+
}
|
|
134624
|
+
|
|
134625
|
+
if (mouseStatus) this.UIElement.style.cursor=mouseStatus.Cursor;
|
|
134626
|
+
|
|
134627
|
+
if (bDraw) this.Draw();
|
|
134628
|
+
|
|
134629
|
+
if (!bShowMinuteTooltip) this.HideMinuteChartTooltip();
|
|
134630
|
+
if (bShowMinuteTooltip) this.ShowMinuteChartTooltip(null, null, chartTooltipData);
|
|
134631
|
+
}
|
|
134632
|
+
|
|
134509
134633
|
this.UIOnDblClick=function(e)
|
|
134510
134634
|
{
|
|
134511
134635
|
var pixelTatio = GetDevicePixelRatio();
|
|
@@ -134620,6 +134744,33 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
134620
134744
|
if (item[5]) dealItem.StrTime=item[5];
|
|
134621
134745
|
if (item[6]) dealItem.ID=item[6];
|
|
134622
134746
|
|
|
134747
|
+
if (item[11]) dealItem.Symbol=item[11]; //股票代码
|
|
134748
|
+
if (item[12]) dealItem.Name=item[12]; //股票名称
|
|
134749
|
+
|
|
134750
|
+
//10个数值型 101-199
|
|
134751
|
+
if (IFrameSplitOperator.IsNumber(item[101])) dealItem.ReserveNumber1=item[101];
|
|
134752
|
+
if (IFrameSplitOperator.IsNumber(item[102])) dealItem.ReserveNumber2=item[102];
|
|
134753
|
+
if (IFrameSplitOperator.IsNumber(item[103])) dealItem.ReserveNumber3=item[103];
|
|
134754
|
+
if (IFrameSplitOperator.IsNumber(item[104])) dealItem.ReserveNumber4=item[104];
|
|
134755
|
+
if (IFrameSplitOperator.IsNumber(item[105])) dealItem.ReserveNumber5=item[105];
|
|
134756
|
+
if (IFrameSplitOperator.IsNumber(item[106])) dealItem.ReserveNumber6=item[106];
|
|
134757
|
+
if (IFrameSplitOperator.IsNumber(item[107])) dealItem.ReserveNumber7=item[107];
|
|
134758
|
+
if (IFrameSplitOperator.IsNumber(item[108])) dealItem.ReserveNumber8=item[108];
|
|
134759
|
+
if (IFrameSplitOperator.IsNumber(item[109])) dealItem.ReserveNumber9=item[109];
|
|
134760
|
+
if (IFrameSplitOperator.IsNumber(item[110])) dealItem.ReserveNumber10=item[110];
|
|
134761
|
+
|
|
134762
|
+
//10个字符型 201-299
|
|
134763
|
+
if (IFrameSplitOperator.IsString(item[201]) || IFrameSplitOperator.IsObject(item[201])) dealItem.ReserveString1=item[201];
|
|
134764
|
+
if (IFrameSplitOperator.IsString(item[202]) || IFrameSplitOperator.IsObject(item[202])) dealItem.ReserveString2=item[202];
|
|
134765
|
+
if (IFrameSplitOperator.IsString(item[203]) || IFrameSplitOperator.IsObject(item[203])) dealItem.ReserveString3=item[203];
|
|
134766
|
+
if (IFrameSplitOperator.IsString(item[204]) || IFrameSplitOperator.IsObject(item[204])) dealItem.ReserveString4=item[204];
|
|
134767
|
+
if (IFrameSplitOperator.IsString(item[205]) || IFrameSplitOperator.IsObject(item[205])) dealItem.ReserveString5=item[205];
|
|
134768
|
+
if (IFrameSplitOperator.IsString(item[206]) || IFrameSplitOperator.IsObject(item[206])) dealItem.ReserveString6=item[206];
|
|
134769
|
+
if (IFrameSplitOperator.IsString(item[207]) || IFrameSplitOperator.IsObject(item[207])) dealItem.ReserveString7=item[207];
|
|
134770
|
+
if (IFrameSplitOperator.IsString(item[208]) || IFrameSplitOperator.IsObject(item[208])) dealItem.ReserveString8=item[208];
|
|
134771
|
+
if (IFrameSplitOperator.IsString(item[209]) || IFrameSplitOperator.IsObject(item[209])) dealItem.ReserveString9=item[209];
|
|
134772
|
+
if (IFrameSplitOperator.IsString(item[210]) || IFrameSplitOperator.IsObject(item[210])) dealItem.ReserveString10=item[210];
|
|
134773
|
+
|
|
134623
134774
|
result.push(dealItem);
|
|
134624
134775
|
}
|
|
134625
134776
|
|
|
@@ -134719,9 +134870,66 @@ var DEAL_COLUMN_ID=
|
|
|
134719
134870
|
INDEX_ID:7, //序号 从1开始
|
|
134720
134871
|
MULTI_BAR_ID:8, //多颜色柱子
|
|
134721
134872
|
CENTER_BAR_ID:9, //中心柱子
|
|
134722
|
-
CUSTOM_TEXT_ID:10 //自定义文本
|
|
134873
|
+
CUSTOM_TEXT_ID:10, //自定义文本
|
|
134874
|
+
|
|
134875
|
+
SYMBOL_ID:11, //股票代码
|
|
134876
|
+
NAME_ID:12, //股票名称
|
|
134877
|
+
|
|
134878
|
+
|
|
134879
|
+
//预留数值类型 10个
|
|
134880
|
+
RESERVE_NUMBER1_ID:201, //ReserveNumber1:
|
|
134881
|
+
RESERVE_NUMBER2_ID:202,
|
|
134882
|
+
RESERVE_NUMBER3_ID:203,
|
|
134883
|
+
RESERVE_NUMBER4_ID:204,
|
|
134884
|
+
RESERVE_NUMBER5_ID:205,
|
|
134885
|
+
RESERVE_NUMBER6_ID:206,
|
|
134886
|
+
RESERVE_NUMBER7_ID:207,
|
|
134887
|
+
RESERVE_NUMBER8_ID:208,
|
|
134888
|
+
RESERVE_NUMBER9_ID:209,
|
|
134889
|
+
RESERVE_NUMBER10_ID:210,
|
|
134890
|
+
|
|
134891
|
+
//预留字符串类型 10个 301-399
|
|
134892
|
+
RESERVE_STRING1_ID:301, //ReserveString1:
|
|
134893
|
+
RESERVE_STRING2_ID:302,
|
|
134894
|
+
RESERVE_STRING3_ID:303,
|
|
134895
|
+
RESERVE_STRING4_ID:304,
|
|
134896
|
+
RESERVE_STRING5_ID:305,
|
|
134897
|
+
RESERVE_STRING6_ID:306,
|
|
134898
|
+
RESERVE_STRING7_ID:307,
|
|
134899
|
+
RESERVE_STRING8_ID:308,
|
|
134900
|
+
RESERVE_STRING9_ID:309,
|
|
134901
|
+
RESERVE_STRING10_ID:310,
|
|
134723
134902
|
}
|
|
134724
134903
|
|
|
134904
|
+
var MAP_DEAL_COLUMN_FIELD=new Map(
|
|
134905
|
+
[
|
|
134906
|
+
[DEAL_COLUMN_ID.SYMBOL_ID, "Symbol"],
|
|
134907
|
+
[DEAL_COLUMN_ID.NAME_ID, "Name"],
|
|
134908
|
+
[DEAL_COLUMN_ID.PRICE_ID, "Price"],
|
|
134909
|
+
|
|
134910
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,"ReserveNumber1"],
|
|
134911
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,"ReserveNumber2"],
|
|
134912
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,"ReserveNumber3"],
|
|
134913
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,"ReserveNumber4"],
|
|
134914
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,"ReserveNumber5"],
|
|
134915
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,"ReserveNumber6"],
|
|
134916
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,"ReserveNumber7"],
|
|
134917
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,"ReserveNumber8"],
|
|
134918
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,"ReserveNumber9"],
|
|
134919
|
+
[DEAL_COLUMN_ID.RESERVE_NUMBER10_ID,"ReserveNumber10"],
|
|
134920
|
+
|
|
134921
|
+
[DEAL_COLUMN_ID.RESERVE_STRING1_ID,"ReserveString1"],
|
|
134922
|
+
[DEAL_COLUMN_ID.RESERVE_STRING2_ID,"ReserveString2"],
|
|
134923
|
+
[DEAL_COLUMN_ID.RESERVE_STRING3_ID,"ReserveString3"],
|
|
134924
|
+
[DEAL_COLUMN_ID.RESERVE_STRING4_ID,"ReserveString4"],
|
|
134925
|
+
[DEAL_COLUMN_ID.RESERVE_STRING5_ID,"ReserveString5"],
|
|
134926
|
+
[DEAL_COLUMN_ID.RESERVE_STRING6_ID,"ReserveString6"],
|
|
134927
|
+
[DEAL_COLUMN_ID.RESERVE_STRING7_ID,"ReserveString7"],
|
|
134928
|
+
[DEAL_COLUMN_ID.RESERVE_STRING8_ID,"ReserveString8"],
|
|
134929
|
+
[DEAL_COLUMN_ID.RESERVE_STRING9_ID,"ReserveString9"],
|
|
134930
|
+
[DEAL_COLUMN_ID.RESERVE_STRING10_ID,"ReserveString10"],
|
|
134931
|
+
]);
|
|
134932
|
+
|
|
134725
134933
|
function ChartDealList()
|
|
134726
134934
|
{
|
|
134727
134935
|
this.Canvas; //画布
|
|
@@ -134747,7 +134955,7 @@ function ChartDealList()
|
|
|
134747
134955
|
//涨跌颜色
|
|
134748
134956
|
this.UpColor=g_JSChartResource.DealList.UpTextColor;
|
|
134749
134957
|
this.DownColor=g_JSChartResource.DealList.DownTextColor;
|
|
134750
|
-
this.
|
|
134958
|
+
this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
|
|
134751
134959
|
|
|
134752
134960
|
this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
|
|
134753
134961
|
|
|
@@ -134794,11 +135002,15 @@ function ChartDealList()
|
|
|
134794
135002
|
this.RectClient={};
|
|
134795
135003
|
this.AryCellRect=[]; //{ Rect:, Type: 1=单行 }
|
|
134796
135004
|
|
|
135005
|
+
//Type:20=分时图
|
|
135006
|
+
//{ Rect, Data, Index, Column, Type }}
|
|
135007
|
+
this.TooltipRect=[];
|
|
135008
|
+
|
|
134797
135009
|
this.ReloadResource=function(resource)
|
|
134798
135010
|
{
|
|
134799
135011
|
this.UpColor=g_JSChartResource.DealList.UpTextColor;
|
|
134800
135012
|
this.DownColor=g_JSChartResource.DealList.DownTextColor;
|
|
134801
|
-
this.
|
|
135013
|
+
this.UnchangeColor=g_JSChartResource.DealList.UnchagneTextColor;
|
|
134802
135014
|
|
|
134803
135015
|
this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
|
|
134804
135016
|
|
|
@@ -134848,6 +135060,8 @@ function ChartDealList()
|
|
|
134848
135060
|
if (item.TextColor) colItem.TextColor=item.TextColor;
|
|
134849
135061
|
if (item.MaxText) colItem.MaxText=item.MaxText;
|
|
134850
135062
|
|
|
135063
|
+
if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type }; //图形提示信息
|
|
135064
|
+
|
|
134851
135065
|
if (item.Type==DEAL_COLUMN_ID.MULTI_BAR_ID || item.Type==DEAL_COLUMN_ID.CENTER_BAR_ID)
|
|
134852
135066
|
{
|
|
134853
135067
|
if (!IFrameSplitOperator.IsNumber(item.DataIndex)) continue;
|
|
@@ -134857,6 +135071,11 @@ function ChartDealList()
|
|
|
134857
135071
|
{
|
|
134858
135072
|
if (IFrameSplitOperator.IsString(item.Foramt)) colItem.Foramt=item.Foramt; //设置时间格式
|
|
134859
135073
|
}
|
|
135074
|
+
else if (this.IsReserveNumber(item.Type))
|
|
135075
|
+
{
|
|
135076
|
+
if (item.Format) colItem.Format=item.Format; //数据格式化设置{ Type:1=原始 2=千分位分割 3=万亿转换, ExFloatPrecision:万亿转换以后的小数位数 }
|
|
135077
|
+
if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
|
|
135078
|
+
}
|
|
134860
135079
|
|
|
134861
135080
|
this.Column.push(colItem);
|
|
134862
135081
|
}
|
|
@@ -134878,6 +135097,31 @@ function ChartDealList()
|
|
|
134878
135097
|
{ Type:DEAL_COLUMN_ID.MULTI_BAR_ID, Title:"柱子", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
134879
135098
|
{ Type:DEAL_COLUMN_ID.CENTER_BAR_ID, Title:"柱子2", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.BarTitle, MaxText:"888888" },
|
|
134880
135099
|
{ Type:DEAL_COLUMN_ID.CUSTOM_TEXT_ID, Title:"自定义", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎擎" },
|
|
135100
|
+
|
|
135101
|
+
{ Type:DEAL_COLUMN_ID.NAME_ID, Title:"股票名称", TextAlign:"center", Width:null, TextColor:g_JSChartResource.DealList.FieldColor.Text, MaxText:"擎擎擎擎*" },
|
|
135102
|
+
|
|
135103
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER1_ID, Title:"数值1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135104
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER2_ID, Title:"数值2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135105
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER3_ID, Title:"数值3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135106
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER4_ID, Title:"数值4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135107
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER5_ID, Title:"数值5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135108
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER6_ID, Title:"数值6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135109
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER7_ID, Title:"数值7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135110
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER8_ID, Title:"数值8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135111
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER9_ID, Title:"数值9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135112
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_NUMBER10_ID, Title:"数值10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"9999.99", FloatPrecision:2 },
|
|
135113
|
+
|
|
135114
|
+
|
|
135115
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING1_ID, Title:"文字1", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135116
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING2_ID, Title:"文字2", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135117
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING3_ID, Title:"文字3", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135118
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING4_ID, Title:"文字4", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135119
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING5_ID, Title:"文字5", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135120
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING6_ID, Title:"文字6", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135121
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING7_ID, Title:"文字7", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135122
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING8_ID, Title:"文字8", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135123
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING9_ID, Title:"文字9", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
135124
|
+
{ Type:DEAL_COLUMN_ID.RESERVE_STRING10_ID, Title:"文字10", TextAlign:"right", TextColor:g_JSChartResource.Report.FieldColor.Text, MaxText:"擎擎擎擎擎擎" },
|
|
134881
135125
|
|
|
134882
135126
|
];
|
|
134883
135127
|
|
|
@@ -134894,6 +135138,7 @@ function ChartDealList()
|
|
|
134894
135138
|
this.Draw=function()
|
|
134895
135139
|
{
|
|
134896
135140
|
this.AryCellRect=[];
|
|
135141
|
+
this.TooltipRect=[];
|
|
134897
135142
|
if (this.SizeChange) this.CalculateSize();
|
|
134898
135143
|
else this.UpdateCacheData();
|
|
134899
135144
|
|
|
@@ -135099,6 +135344,19 @@ function ChartDealList()
|
|
|
135099
135344
|
|
|
135100
135345
|
if (i==this.Column.length-1) itemWidth=this.TableWidth-(left-tableLeft)-this.HeaderMergin.Right-this.HeaderMergin.Left;
|
|
135101
135346
|
|
|
135347
|
+
var drawInfo=
|
|
135348
|
+
{
|
|
135349
|
+
Text:null, TextColor:item.TextColor , TextAlign:item.TextAlign, Tooltip:null,
|
|
135350
|
+
Index:dataIndex, ColumnIndex:i
|
|
135351
|
+
};
|
|
135352
|
+
|
|
135353
|
+
var rtItem={ Left:left, Top:top, Width:itemWidth, Height:this.RowHeight };
|
|
135354
|
+
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
135355
|
+
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
135356
|
+
drawInfo.Rect=rtItem;
|
|
135357
|
+
|
|
135358
|
+
var bDrawV2=false;
|
|
135359
|
+
|
|
135102
135360
|
if (item.Type==DEAL_COLUMN_ID.TIME_ID)
|
|
135103
135361
|
{
|
|
135104
135362
|
text=IFrameSplitOperator.FormatTimeString(data.Time,item.Foramt);
|
|
@@ -135111,7 +135369,7 @@ function ChartDealList()
|
|
|
135111
135369
|
{
|
|
135112
135370
|
if (data.Price>this.YClose) textColor=this.UpColor;
|
|
135113
135371
|
else if (data.Price<this.YClose) textColor=this.DownColor;
|
|
135114
|
-
else textColor=this.
|
|
135372
|
+
else textColor=this.UnchangeColor;
|
|
135115
135373
|
|
|
135116
135374
|
text=data.Price.toFixed(this.Decimal);
|
|
135117
135375
|
}
|
|
@@ -135146,7 +135404,7 @@ function ChartDealList()
|
|
|
135146
135404
|
|
|
135147
135405
|
if (value>0) textColor=this.UpColor;
|
|
135148
135406
|
else if (value<0) textColor=this.DownColor;
|
|
135149
|
-
else textColor=this.
|
|
135407
|
+
else textColor=this.UnchangeColor;
|
|
135150
135408
|
}
|
|
135151
135409
|
}
|
|
135152
135410
|
else if (item.Type==DEAL_COLUMN_ID.INDEX_ID)
|
|
@@ -135174,13 +135432,115 @@ function ChartDealList()
|
|
|
135174
135432
|
if (out.TextAlign) textAlign=out.TextAlign;
|
|
135175
135433
|
}
|
|
135176
135434
|
}
|
|
135177
|
-
|
|
135178
|
-
|
|
135435
|
+
else if (this.IsReserveString(item.Type))
|
|
135436
|
+
{
|
|
135437
|
+
this.FormatReserveString(item, data, drawInfo);
|
|
135438
|
+
bDrawV2=true;
|
|
135439
|
+
}
|
|
135440
|
+
else if (this.IsReserveNumber(item.Type))
|
|
135441
|
+
{
|
|
135442
|
+
this.FormatReserveNumber(item, data, drawInfo);
|
|
135443
|
+
bDrawV2=true;
|
|
135444
|
+
}
|
|
135445
|
+
|
|
135446
|
+
|
|
135447
|
+
if (bDrawV2)
|
|
135448
|
+
{
|
|
135449
|
+
this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
|
|
135450
|
+
}
|
|
135451
|
+
else
|
|
135452
|
+
{
|
|
135453
|
+
this.DrawItemText(text, textColor, textAlign, left, top, itemWidth);
|
|
135454
|
+
}
|
|
135455
|
+
|
|
135456
|
+
if (item.ChartTooltip && item.ChartTooltip.Enable && IFrameSplitOperator.IsNumber(item.ChartTooltip.Type)) //Type 20分时图 21K线图
|
|
135457
|
+
{
|
|
135458
|
+
var tooltipData={ Rect:rtItem, Data:data, Index:dataIndex, Column:item, Type:item.ChartTooltip.Type };
|
|
135459
|
+
this.TooltipRect.push(tooltipData);
|
|
135460
|
+
}
|
|
135179
135461
|
|
|
135180
135462
|
left+=item.Width;
|
|
135181
135463
|
}
|
|
135182
135464
|
}
|
|
135183
135465
|
|
|
135466
|
+
this.FormatReserveNumber=function(column, data, drawInfo)
|
|
135467
|
+
{
|
|
135468
|
+
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
135469
|
+
|
|
135470
|
+
var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
|
|
135471
|
+
if (!data || !fieldName) return;
|
|
135472
|
+
|
|
135473
|
+
var value=data[fieldName];
|
|
135474
|
+
if (!IFrameSplitOperator.IsNumber(value)) return;
|
|
135475
|
+
|
|
135476
|
+
if (IFrameSplitOperator.IsNumber(column.ColorType))
|
|
135477
|
+
{
|
|
135478
|
+
if (column.ColorType==1)
|
|
135479
|
+
{
|
|
135480
|
+
drawInfo.TextColor=this.GetUpDownColor(value,0);
|
|
135481
|
+
}
|
|
135482
|
+
else if (column.ColorType==2)
|
|
135483
|
+
{
|
|
135484
|
+
drawInfo.TextColor=this.GetUpDownColorV2(value,0);
|
|
135485
|
+
}
|
|
135486
|
+
}
|
|
135487
|
+
|
|
135488
|
+
var text=value.toFixed(column.FloatPrecision);
|
|
135489
|
+
if (column.Format && IFrameSplitOperator.IsNumber(column.Format.Type))
|
|
135490
|
+
{
|
|
135491
|
+
var format=column.Format;
|
|
135492
|
+
switch(format.Type)
|
|
135493
|
+
{
|
|
135494
|
+
case 1: //原始数据
|
|
135495
|
+
text=value.toFixed(column.FloatPrecision);
|
|
135496
|
+
break;
|
|
135497
|
+
case 2: //千分位分割
|
|
135498
|
+
text=IFrameSplitOperator.FormatValueThousandsString(value, column.FloatPrecision);
|
|
135499
|
+
break;
|
|
135500
|
+
case 3:
|
|
135501
|
+
var exfloatPrecision=1;
|
|
135502
|
+
if (IFrameSplitOperator.IsNumber(format.ExFloatPrecision)) exfloatPrecision=format.ExFloatPrecision;
|
|
135503
|
+
text=IFrameSplitOperator.FormatValueStringV2(value, column.FloatPrecision,exfloatPrecision);
|
|
135504
|
+
break;
|
|
135505
|
+
}
|
|
135506
|
+
}
|
|
135507
|
+
|
|
135508
|
+
drawInfo.Text=text;
|
|
135509
|
+
}
|
|
135510
|
+
|
|
135511
|
+
this.FormatReserveString=function(column, data, drawInfo)
|
|
135512
|
+
{
|
|
135513
|
+
if (column.DefaultText) drawInfo.Text=column.DefaultText;
|
|
135514
|
+
|
|
135515
|
+
var fieldName=MAP_DEAL_COLUMN_FIELD.get(column.Type);
|
|
135516
|
+
if (!data || !fieldName) return;
|
|
135517
|
+
|
|
135518
|
+
var item=data[fieldName];
|
|
135519
|
+
if (IFrameSplitOperator.IsObject(item))
|
|
135520
|
+
{
|
|
135521
|
+
if (item.Text) drawInfo.Text=item.Text;
|
|
135522
|
+
if (item.TextColor) drawInfo.TextColor=item.TextColor;
|
|
135523
|
+
if (item.BGColor) drawInfo.BGColor=item.BGColor;
|
|
135524
|
+
}
|
|
135525
|
+
else if (IFrameSplitOperator.IsString(item))
|
|
135526
|
+
{
|
|
135527
|
+
drawInfo.Text=item;
|
|
135528
|
+
}
|
|
135529
|
+
}
|
|
135530
|
+
|
|
135531
|
+
this.GetUpDownColor=function(price, price2)
|
|
135532
|
+
{
|
|
135533
|
+
if (price>price2) return this.UpColor;
|
|
135534
|
+
else if (price<price2) return this.DownColor;
|
|
135535
|
+
else return this.UnchangeColor;
|
|
135536
|
+
}
|
|
135537
|
+
|
|
135538
|
+
this.GetUpDownColorV2=function(price, price2)
|
|
135539
|
+
{
|
|
135540
|
+
if (price>=price2) return this.UpColor;
|
|
135541
|
+
else return this.DownColor;
|
|
135542
|
+
}
|
|
135543
|
+
|
|
135184
135544
|
this.DrawSelectedRow=function(data, index, rtRow)
|
|
135185
135545
|
{
|
|
135186
135546
|
if (!this.SelectedData) return;
|
|
@@ -135392,6 +135752,49 @@ function ChartDealList()
|
|
|
135392
135752
|
event.Callback(event,data,this);
|
|
135393
135753
|
}
|
|
135394
135754
|
}
|
|
135755
|
+
|
|
135756
|
+
this.IsReserveString=function(value)
|
|
135757
|
+
{
|
|
135758
|
+
var ARARY_TYPE=
|
|
135759
|
+
[
|
|
135760
|
+
DEAL_COLUMN_ID.RESERVE_STRING1_ID,DEAL_COLUMN_ID.RESERVE_STRING2_ID,DEAL_COLUMN_ID.RESERVE_STRING3_ID,DEAL_COLUMN_ID.RESERVE_STRING4_ID,
|
|
135761
|
+
DEAL_COLUMN_ID.RESERVE_STRING5_ID,DEAL_COLUMN_ID.RESERVE_STRING6_ID,DEAL_COLUMN_ID.RESERVE_STRING7_ID,DEAL_COLUMN_ID.RESERVE_STRING8_ID,
|
|
135762
|
+
DEAL_COLUMN_ID.RESERVE_STRING9_ID,DEAL_COLUMN_ID.RESERVE_STRING10_ID
|
|
135763
|
+
];
|
|
135764
|
+
|
|
135765
|
+
return ARARY_TYPE.includes(value);
|
|
135766
|
+
}
|
|
135767
|
+
|
|
135768
|
+
this.IsReserveNumber=function(value)
|
|
135769
|
+
{
|
|
135770
|
+
var ARARY_TYPE=
|
|
135771
|
+
[
|
|
135772
|
+
DEAL_COLUMN_ID.RESERVE_NUMBER1_ID,DEAL_COLUMN_ID.RESERVE_NUMBER2_ID,DEAL_COLUMN_ID.RESERVE_NUMBER3_ID,
|
|
135773
|
+
DEAL_COLUMN_ID.RESERVE_NUMBER4_ID,DEAL_COLUMN_ID.RESERVE_NUMBER5_ID,DEAL_COLUMN_ID.RESERVE_NUMBER6_ID,DEAL_COLUMN_ID.RESERVE_NUMBER7_ID,
|
|
135774
|
+
DEAL_COLUMN_ID.RESERVE_NUMBER8_ID,DEAL_COLUMN_ID.RESERVE_NUMBER9_ID,DEAL_COLUMN_ID.RESERVE_NUMBER10_ID
|
|
135775
|
+
];
|
|
135776
|
+
|
|
135777
|
+
return ARARY_TYPE.includes(value);
|
|
135778
|
+
}
|
|
135779
|
+
|
|
135780
|
+
this.GetTooltipData=function(x,y)
|
|
135781
|
+
{
|
|
135782
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect)) return null;
|
|
135783
|
+
|
|
135784
|
+
for(var i=0;i<this.TooltipRect.length;++i)
|
|
135785
|
+
{
|
|
135786
|
+
var item=this.TooltipRect[i];
|
|
135787
|
+
var rt=item.Rect;
|
|
135788
|
+
if (!rt) continue;
|
|
135789
|
+
|
|
135790
|
+
if (x>=rt.Left && x<=rt.Right && y>=rt.Top && y<=rt.Bottom)
|
|
135791
|
+
{
|
|
135792
|
+
return { Rect:item.Rect, Data:item.Data, Column:item.Column, Index:item.Index, Type:item.Type, Data:item.Data };
|
|
135793
|
+
}
|
|
135794
|
+
}
|
|
135795
|
+
|
|
135796
|
+
return null;
|
|
135797
|
+
}
|
|
135395
135798
|
}
|
|
135396
135799
|
/*
|
|
135397
135800
|
Copyright (c) 2018 jones
|
|
@@ -159214,7 +159617,7 @@ function HQChartScriptWorker()
|
|
|
159214
159617
|
|
|
159215
159618
|
|
|
159216
159619
|
|
|
159217
|
-
var HQCHART_VERSION="1.1.
|
|
159620
|
+
var HQCHART_VERSION="1.1.14751";
|
|
159218
159621
|
|
|
159219
159622
|
function PrintHQChartVersion()
|
|
159220
159623
|
{
|