hqchart 1.1.15018 → 1.1.15029
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 +37 -18
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +269 -2
- package/src/jscommon/umychart.TReport.js +39 -7
- package/src/jscommon/umychart.complier.js +1 -1
- package/src/jscommon/umychart.js +36 -3
- package/src/jscommon/umychart.resource/css/tools.css +71 -1
- package/src/jscommon/umychart.style.js +11 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +49 -6
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +357 -15
|
@@ -10512,12 +10512,20 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10512
10512
|
canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);
|
|
10513
10513
|
}
|
|
10514
10514
|
|
|
10515
|
+
this.ClearCorssCursorCanvas=function()
|
|
10516
|
+
{
|
|
10517
|
+
if (!this.CorssCursorCanvas) return;
|
|
10518
|
+
|
|
10519
|
+
this.CorssCursorCanvas.clearRect(0,0,this.CorssCursorElement.width,this.CorssCursorElement.height);
|
|
10520
|
+
}
|
|
10521
|
+
|
|
10515
10522
|
this.Draw=function()
|
|
10516
10523
|
{
|
|
10517
10524
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
10518
10525
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
10519
10526
|
|
|
10520
10527
|
this.StopDrawDynamicInfo();
|
|
10528
|
+
this.ClearCorssCursorCanvas();
|
|
10521
10529
|
|
|
10522
10530
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW);
|
|
10523
10531
|
if (event && event.Callback)
|
|
@@ -10691,7 +10699,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10691
10699
|
if (this.CorssCursorCanvas) //独立的十字光标层
|
|
10692
10700
|
{
|
|
10693
10701
|
this.ChartCorssCursor.Canvas=this.CorssCursorCanvas;
|
|
10694
|
-
this.ChartCorssCursor.Canvas.clearRect(0,0,this.CorssCursorElement.width,this.CorssCursorElement.height)
|
|
10695
10702
|
bRestoreCanvas=true;
|
|
10696
10703
|
}
|
|
10697
10704
|
|
|
@@ -11495,6 +11502,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11495
11502
|
{
|
|
11496
11503
|
if (!this.ChartCorssCursor) return null;
|
|
11497
11504
|
if (this.ChartCorssCursor.Status===0) return null;
|
|
11505
|
+
if (!this.ChartCorssCursor.IsShowCorss) return null;
|
|
11498
11506
|
|
|
11499
11507
|
var kItem=this.ChartCorssCursor.StringFormatX.KItem;
|
|
11500
11508
|
if (!kItem) return null;
|
|
@@ -58933,6 +58941,8 @@ IFrameSplitOperator.FormatDateTimeStringV2=function(datetime, format, languageID
|
|
|
58933
58941
|
|
|
58934
58942
|
case "HH:MM:SS":
|
|
58935
58943
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}`;
|
|
58944
|
+
case "MM:SS":
|
|
58945
|
+
return `${IFrameSplitOperator.NumberToString(datetime.getMinutes())}:${IFrameSplitOperator.NumberToString(datetime.getSeconds())}`;
|
|
58936
58946
|
case "HH:MM":
|
|
58937
58947
|
return `${IFrameSplitOperator.NumberToString(datetime.getHours())}:${IFrameSplitOperator.NumberToString(datetime.getMinutes())}`;
|
|
58938
58948
|
case "HH:MM:SS.fff":
|
|
@@ -62022,7 +62032,7 @@ function ChartCorssCursor()
|
|
|
62022
62032
|
|
|
62023
62033
|
//内部使用
|
|
62024
62034
|
this.Close=null; //收盘价格
|
|
62025
|
-
this.Status=0; //当前状态 0=隐藏 1
|
|
62035
|
+
this.Status=0; //当前状态 0=隐藏 1=显示底部 2=十字线
|
|
62026
62036
|
|
|
62027
62037
|
this.ReloadResource=function(resource)
|
|
62028
62038
|
{
|
|
@@ -81593,6 +81603,15 @@ function JSChartResource()
|
|
|
81593
81603
|
ValueColor:"rgb(0,0,0)", //数值
|
|
81594
81604
|
};
|
|
81595
81605
|
|
|
81606
|
+
this.SmallFloatTooltipV2=
|
|
81607
|
+
{
|
|
81608
|
+
BGColor:'rgb(250,250,250)', //背景色
|
|
81609
|
+
BorderColor:'rgb(20,20,20)', //边框颜色
|
|
81610
|
+
|
|
81611
|
+
TextColor:"rgb(0,0,0)", //数值名称
|
|
81612
|
+
ValueColor:"rgb(0,0,0)", //数值
|
|
81613
|
+
};
|
|
81614
|
+
|
|
81596
81615
|
//区间统计
|
|
81597
81616
|
this.DialogSelectRect=
|
|
81598
81617
|
{
|
|
@@ -82304,7 +82323,8 @@ function JSChartResource()
|
|
|
82304
82323
|
{
|
|
82305
82324
|
TextColor:"rgb(60,60,83)",
|
|
82306
82325
|
BaseTextColor:"rgb(60,60,83)",
|
|
82307
|
-
BGColor:"rgb(180,180,180)"
|
|
82326
|
+
BGColor:"rgb(180,180,180)",
|
|
82327
|
+
MatchTextColor:"rgb(60,60,83)",
|
|
82308
82328
|
},
|
|
82309
82329
|
|
|
82310
82330
|
FieldColor:
|
|
@@ -83378,8 +83398,20 @@ function JSChartResource()
|
|
|
83378
83398
|
|
|
83379
83399
|
if (style.ChartDrawTVLongPosition) this.SetChartDrawTVLongPosition(style.ChartDrawTVLongPosition);
|
|
83380
83400
|
if (style.KLineCountDownPaint) this.SetKLineCountDownPaint(style.KLineCountDownPaint);
|
|
83401
|
+
|
|
83402
|
+
if (style.SmallFloatTooltipV2) this.SetSmallFloatTooltipV2(style.SmallFloatTooltipV2);
|
|
83381
83403
|
}
|
|
83382
83404
|
|
|
83405
|
+
this.SetSmallFloatTooltipV2=function(style)
|
|
83406
|
+
{
|
|
83407
|
+
var dest=this.SmallFloatTooltipV2;
|
|
83408
|
+
|
|
83409
|
+
if (style.BGColor) dest.BGColor=style.BGColor;
|
|
83410
|
+
if (style.BorderColor) dest.BorderColor=style.BorderColor;
|
|
83411
|
+
|
|
83412
|
+
if (style.TextColor) dest.TextColor=style.TextColor;
|
|
83413
|
+
if (style.ValueColor) dest.ValueColor=style.ValueColor;
|
|
83414
|
+
}
|
|
83383
83415
|
|
|
83384
83416
|
this.SetKLineCountDownPaint=function(style)
|
|
83385
83417
|
{
|
|
@@ -83914,6 +83946,7 @@ function JSChartResource()
|
|
|
83914
83946
|
if (cell.TextColor) dest.CenterItem.TextColor=cell.TextColor;
|
|
83915
83947
|
if (cell.BaseTextColor) dest.CenterItem.BaseTextColor=cell.BaseTextColor;
|
|
83916
83948
|
if (cell.BGColor) dest.CenterItem.BGColor=cell.BGColor;
|
|
83949
|
+
if (cell.MatchTextColor) dest.CenterItem.MatchTextColor=cell.MatchTextColor;
|
|
83917
83950
|
}
|
|
83918
83951
|
|
|
83919
83952
|
if (item.Item)
|
|
@@ -112524,7 +112557,7 @@ function JSAlgorithm(errorHandler,symbolData)
|
|
|
112524
112557
|
this.EMA=function(data,dayCount)
|
|
112525
112558
|
{
|
|
112526
112559
|
var result = [];
|
|
112527
|
-
if (data.length<=0) return result;
|
|
112560
|
+
if (!data || data.length<=0) return result;
|
|
112528
112561
|
|
|
112529
112562
|
if (Array.isArray(dayCount))
|
|
112530
112563
|
{
|
|
@@ -136521,6 +136554,15 @@ function GetBlackStyle()
|
|
|
136521
136554
|
ValueColor:"rgb(210,210,210)", //数值
|
|
136522
136555
|
},
|
|
136523
136556
|
|
|
136557
|
+
SmallFloatTooltipV2:
|
|
136558
|
+
{
|
|
136559
|
+
BGColor:'rgb(20,20,20)', //背景色
|
|
136560
|
+
BorderColor:'rgb(170,170,170)', //边框颜色
|
|
136561
|
+
|
|
136562
|
+
TextColor:"rgb(210,210,210)", //数值名称
|
|
136563
|
+
ValueColor:"rgb(210,210,210)", //数值
|
|
136564
|
+
},
|
|
136565
|
+
|
|
136524
136566
|
DialogSelectRect:
|
|
136525
136567
|
{
|
|
136526
136568
|
BGColor:'rgb(20,20,20)', //背景色
|
|
@@ -136951,7 +136993,8 @@ function GetBlackStyle()
|
|
|
136951
136993
|
{
|
|
136952
136994
|
TextColor:"rgb(16,226,217)",
|
|
136953
136995
|
BaseTextColor:"rgb(60,60,83)",
|
|
136954
|
-
BGColor:"rgb(65,65,65)"
|
|
136996
|
+
BGColor:"rgb(65,65,65)",
|
|
136997
|
+
MatchTextColor:"rgb(210,210,210)"
|
|
136955
136998
|
},
|
|
136956
136999
|
|
|
136957
137000
|
FieldColor:
|
|
@@ -150129,7 +150172,7 @@ function JSTReportChartContainer(uielement)
|
|
|
150129
150172
|
this.Symbol; //期权对应的品种代码
|
|
150130
150173
|
this.Name; //期权对应的品种名称
|
|
150131
150174
|
this.NetworkFilter; //数据回调接口
|
|
150132
|
-
this.Data={ XOffset:0, YOffset:0, Data:[], Price:null }; //股票列表 Price=标的物市场价格
|
|
150175
|
+
this.Data={ XOffset:0, YOffset:0, Data:[], Price:null, MatchExePrice:null }; //股票列表 Price=标的物市场价格 MatchExePrice=标的物市场价格匹配的行权价格
|
|
150133
150176
|
this.BorderData={ MapData:null }; //key=Field Value:[null, {ExePrice} ,{ExePrice} ]
|
|
150134
150177
|
this.SourceData={ Data:[] } ; //原始股票顺序(排序还原用) {ExePrice=行权价格 LeftData:, RightData}
|
|
150135
150178
|
|
|
@@ -150679,7 +150722,11 @@ function JSTReportChartContainer(uielement)
|
|
|
150679
150722
|
}
|
|
150680
150723
|
}
|
|
150681
150724
|
|
|
150682
|
-
if (IFrameSplitOperator.IsNumber(data.price))
|
|
150725
|
+
if (IFrameSplitOperator.IsNumber(data.price))
|
|
150726
|
+
{
|
|
150727
|
+
this.Data.Price=data.price;
|
|
150728
|
+
this.Data.MatchExePrice=null;
|
|
150729
|
+
}
|
|
150683
150730
|
|
|
150684
150731
|
if (IFrameSplitOperator.IsNonEmptyArray(data.fixedRowData))
|
|
150685
150732
|
{
|
|
@@ -150718,11 +150765,13 @@ function JSTReportChartContainer(uielement)
|
|
|
150718
150765
|
//计算统计数据
|
|
150719
150766
|
this.CalculateData=function()
|
|
150720
150767
|
{
|
|
150768
|
+
this.Data.MatchExePrice=null;
|
|
150721
150769
|
if (!this.MapExePriceData || this.MapExePriceData.size<=0) return;
|
|
150722
150770
|
|
|
150723
150771
|
var leftMaxPosition={ Max:null, ExePrice:null, CellType:1 };
|
|
150724
150772
|
var rightMaxPosition={ Max:null,ExePrice:null, CellType:2 };
|
|
150725
150773
|
this.BorderData.MapData=new Map();
|
|
150774
|
+
var aryPrice=[];
|
|
150726
150775
|
for(var mapItem of this.MapExePriceData)
|
|
150727
150776
|
{
|
|
150728
150777
|
var item=mapItem[1];
|
|
@@ -150745,6 +150794,8 @@ function JSTReportChartContainer(uielement)
|
|
|
150745
150794
|
rightMaxPosition.ExePrice=mapItem[0];
|
|
150746
150795
|
}
|
|
150747
150796
|
}
|
|
150797
|
+
|
|
150798
|
+
aryPrice.push(item.ExePrice);
|
|
150748
150799
|
}
|
|
150749
150800
|
|
|
150750
150801
|
var aryData=[null, null, null];
|
|
@@ -150752,6 +150803,24 @@ function JSTReportChartContainer(uielement)
|
|
|
150752
150803
|
if (rightMaxPosition.ExePrice) aryData[2]=rightMaxPosition;
|
|
150753
150804
|
|
|
150754
150805
|
this.BorderData.MapData.set(TREPORT_COLUMN_ID.POSITION_ID, { Data:aryData });
|
|
150806
|
+
|
|
150807
|
+
if (IFrameSplitOperator.IsNumber(this.Data.Price))
|
|
150808
|
+
{
|
|
150809
|
+
aryPrice.sort((left, right)=>{ return left-right;});
|
|
150810
|
+
var prePrice=null;
|
|
150811
|
+
for(var i=0;i<aryPrice.length;++i)
|
|
150812
|
+
{
|
|
150813
|
+
var value=aryPrice[i];
|
|
150814
|
+
if (value>this.Data.Price)
|
|
150815
|
+
{
|
|
150816
|
+
this.Data.MatchExePrice=prePrice
|
|
150817
|
+
break;
|
|
150818
|
+
}
|
|
150819
|
+
|
|
150820
|
+
prePrice=value;
|
|
150821
|
+
}
|
|
150822
|
+
}
|
|
150823
|
+
|
|
150755
150824
|
}
|
|
150756
150825
|
|
|
150757
150826
|
//读取单条股票json数据
|
|
@@ -151806,7 +151875,8 @@ function ChartTReport()
|
|
|
151806
151875
|
{
|
|
151807
151876
|
TextColor:g_JSChartResource.TReport.CenterItem.TextColor,
|
|
151808
151877
|
BaseTextColor:g_JSChartResource.TReport.CenterItem.BaseTextColor,
|
|
151809
|
-
BGColor: g_JSChartResource.TReport.CenterItem.BGColor
|
|
151878
|
+
BGColor: g_JSChartResource.TReport.CenterItem.BGColor,
|
|
151879
|
+
MatchTextColor:g_JSChartResource.TReport.CenterItem.MatchTextColor,
|
|
151810
151880
|
};
|
|
151811
151881
|
|
|
151812
151882
|
//缓存
|
|
@@ -152325,13 +152395,13 @@ function ChartTReport()
|
|
|
152325
152395
|
var leftBGColor=null, rightBGColor=null;
|
|
152326
152396
|
if (exePrice>this.Data.Price)
|
|
152327
152397
|
{
|
|
152328
|
-
leftBGColor=this.
|
|
152329
|
-
rightBGColor=this.
|
|
152398
|
+
leftBGColor=this.DownBGColor;
|
|
152399
|
+
rightBGColor=this.UpBGColor;
|
|
152330
152400
|
}
|
|
152331
152401
|
else
|
|
152332
152402
|
{
|
|
152333
|
-
leftBGColor=this.
|
|
152334
|
-
rightBGColor=this.
|
|
152403
|
+
leftBGColor=this.UpBGColor;
|
|
152404
|
+
rightBGColor=this.DownBGColor;
|
|
152335
152405
|
}
|
|
152336
152406
|
|
|
152337
152407
|
if (leftBGColor)
|
|
@@ -152450,6 +152520,11 @@ function ChartTReport()
|
|
|
152450
152520
|
var drawInfo={ Text:null, TextColor:this.CenterItemConfig.TextColor, BGColor:this.CenterItemConfig.BGColor, TextAlign:column.TextAlign, Rect:rtItem, RectText:rtText };
|
|
152451
152521
|
drawInfo.Text=`${data.ExePrice.toFixed(data.Decimal)}`;
|
|
152452
152522
|
|
|
152523
|
+
if (IFrameSplitOperator.IsNumber(this.Data.MatchExePrice) && this.Data.MatchExePrice==data.ExePrice)
|
|
152524
|
+
{
|
|
152525
|
+
drawInfo.TextColor=this.CenterItemConfig.MatchTextColor;
|
|
152526
|
+
}
|
|
152527
|
+
|
|
152453
152528
|
this.FormatCenterItem(data,drawInfo);
|
|
152454
152529
|
|
|
152455
152530
|
this.DrawCell(drawInfo);
|
|
@@ -162237,6 +162312,7 @@ function JSSmallFloatTooltip()
|
|
|
162237
162312
|
this.DivDialog=null;
|
|
162238
162313
|
this.DivContent=null;
|
|
162239
162314
|
this.HQChart=null;
|
|
162315
|
+
this.ClassName="JSSmallFloatTooltip";
|
|
162240
162316
|
|
|
162241
162317
|
this.Destroy=function()
|
|
162242
162318
|
{
|
|
@@ -162324,23 +162400,242 @@ function JSSmallFloatTooltip()
|
|
|
162324
162400
|
}
|
|
162325
162401
|
}
|
|
162326
162402
|
|
|
162403
|
+
|
|
162404
|
+
function JSSmallFloatTooltipV2()
|
|
162405
|
+
{
|
|
162406
|
+
this.newMethod=JSSmallFloatTooltip; //派生
|
|
162407
|
+
this.newMethod();
|
|
162408
|
+
delete this.newMethod;
|
|
162409
|
+
|
|
162410
|
+
this.ClassName="JSSmallFloatTooltipV2";
|
|
162411
|
+
|
|
162412
|
+
this.AryData=[]; //输出文字信息
|
|
162413
|
+
this.AryText=[]; //表格tr
|
|
162414
|
+
this.MaxRowCount=25;
|
|
162415
|
+
|
|
162416
|
+
this.BGColor=g_JSChartResource.SmallFloatTooltipV2.BGColor;
|
|
162417
|
+
this.BorderColor=g_JSChartResource.SmallFloatTooltipV2.BorderColor;
|
|
162418
|
+
|
|
162419
|
+
this.TextColor=g_JSChartResource.SmallFloatTooltipV2.TextColor;
|
|
162420
|
+
this.ValueColor=g_JSChartResource.SmallFloatTooltipV2.ValueColor;
|
|
162421
|
+
|
|
162422
|
+
this.ValueAlign=
|
|
162423
|
+
{
|
|
162424
|
+
Left:"UMyChart_Small_Tooltip_V2_Text2_Span", //左对齐
|
|
162425
|
+
MarginLeft:'UMyChart_Small_Tooltip_V2_Text3_Span',
|
|
162426
|
+
Right:"UMyChart_Small_Tooltip_V2_Text_Span",
|
|
162427
|
+
}
|
|
162428
|
+
|
|
162429
|
+
this.TitleAlign=
|
|
162430
|
+
{
|
|
162431
|
+
Default:"UMyChart_Small_Tooltip_V2_Title_Span", //标题默认
|
|
162432
|
+
}
|
|
162433
|
+
|
|
162434
|
+
this.Destroy=function()
|
|
162435
|
+
{
|
|
162436
|
+
this.AryData=[];
|
|
162437
|
+
this.AryText=[];
|
|
162438
|
+
this.HQChart=null;
|
|
162439
|
+
|
|
162440
|
+
if (this.DivDialog)
|
|
162441
|
+
{
|
|
162442
|
+
document.body.removeChild(this.DivDialog);
|
|
162443
|
+
this.DivDialog=null;
|
|
162444
|
+
}
|
|
162445
|
+
}
|
|
162446
|
+
|
|
162447
|
+
this.Create=function()
|
|
162448
|
+
{
|
|
162449
|
+
var divDom=document.createElement("div");
|
|
162450
|
+
divDom.className='UMyChart_Small_Tooltip_V2_Div';
|
|
162451
|
+
|
|
162452
|
+
var table=document.createElement("table");
|
|
162453
|
+
table.className="UMyChart_Small_Tooltip_V2_Table";
|
|
162454
|
+
divDom.appendChild(table);
|
|
162455
|
+
|
|
162456
|
+
var tbody=document.createElement("tbody");
|
|
162457
|
+
tbody.className="UMyChart_Small_Tooltip_V2_Tbody";
|
|
162458
|
+
table.appendChild(tbody);
|
|
162459
|
+
|
|
162460
|
+
this.AryData=[];
|
|
162461
|
+
|
|
162462
|
+
for(var i=0;i<this.MaxRowCount;++i)
|
|
162463
|
+
{
|
|
162464
|
+
var rowItem={ Tr:null, TitleSpan:null, TextSpan:null, TitleTd:null, TextTd:null };
|
|
162465
|
+
|
|
162466
|
+
var trDom=document.createElement("tr");
|
|
162467
|
+
trDom.className='UMyChart_Small_Tooltip_V2_Group_Tr';
|
|
162468
|
+
tbody.appendChild(trDom);
|
|
162469
|
+
rowItem.Tr=trDom;
|
|
162470
|
+
|
|
162471
|
+
var tdDom=document.createElement("td");
|
|
162472
|
+
tdDom.className="UMyChart_Small_Tooltip_V2_Title_Td"; //标题
|
|
162473
|
+
trDom.appendChild(tdDom);
|
|
162474
|
+
rowItem.TitleTd=tdDom;
|
|
162475
|
+
|
|
162476
|
+
var spanDom=document.createElement("span");
|
|
162477
|
+
spanDom.className=this.TitleAlign.Default;
|
|
162478
|
+
spanDom.innerText='标题';
|
|
162479
|
+
tdDom.appendChild(spanDom);
|
|
162480
|
+
rowItem.TitleSpan=spanDom;
|
|
162481
|
+
|
|
162482
|
+
var tdDom=document.createElement("td");
|
|
162483
|
+
tdDom.className="UMyChart_Small_Tooltip_V2_Text_Td"; //数值
|
|
162484
|
+
trDom.appendChild(tdDom);
|
|
162485
|
+
rowItem.TextTd=tdDom;
|
|
162486
|
+
|
|
162487
|
+
var spanDom=document.createElement("span");
|
|
162488
|
+
spanDom.className='UMyChart_Small_Tooltip_V2_Text_Span';
|
|
162489
|
+
spanDom.innerText='数值';
|
|
162490
|
+
tdDom.appendChild(spanDom);
|
|
162491
|
+
rowItem.TextSpan=spanDom;
|
|
162492
|
+
|
|
162493
|
+
this.AryData.push(rowItem);
|
|
162494
|
+
}
|
|
162495
|
+
|
|
162496
|
+
document.body.appendChild(divDom);
|
|
162497
|
+
|
|
162498
|
+
this.DivDialog=divDom;
|
|
162499
|
+
|
|
162500
|
+
this.UpdateStyle();
|
|
162501
|
+
}
|
|
162502
|
+
|
|
162503
|
+
this.UpdateStyle=function()
|
|
162504
|
+
{
|
|
162505
|
+
if (!this.DivDialog) return;
|
|
162506
|
+
|
|
162507
|
+
if (this.BGColor) this.DivDialog.style['background-color']=this.BGColor;
|
|
162508
|
+
if (this.BorderColor) this.DivDialog.style['border-color']=this.BorderColor;
|
|
162509
|
+
}
|
|
162510
|
+
|
|
162511
|
+
this.Update=function(data)
|
|
162512
|
+
{
|
|
162513
|
+
if (!this.DivDialog) return;
|
|
162514
|
+
|
|
162515
|
+
this.AryText=[];
|
|
162516
|
+
for(var i=0;i<data.AryData.length;++i)
|
|
162517
|
+
{
|
|
162518
|
+
var item=data.AryData[i];
|
|
162519
|
+
if (item.Type==1) this.UpdateDefaultTooltip(item);
|
|
162520
|
+
//else if (item.Type==2) this.Updateddd();
|
|
162521
|
+
}
|
|
162522
|
+
|
|
162523
|
+
this.UpdateTableDOM();
|
|
162524
|
+
this.ShowTooltip(data);
|
|
162525
|
+
}
|
|
162526
|
+
|
|
162527
|
+
this.UpdateDefaultTooltip=function(data)
|
|
162528
|
+
{
|
|
162529
|
+
var text=data.Data.Text;
|
|
162530
|
+
var rowItem={ Text:"", HTMLTitle:text, Color:this.ValueColor, IsMergeCell:true };
|
|
162531
|
+
this.AryText.push(rowItem);
|
|
162532
|
+
}
|
|
162533
|
+
|
|
162534
|
+
this.UpdateTableDOM=function()
|
|
162535
|
+
{
|
|
162536
|
+
var index=0;
|
|
162537
|
+
for(index=0;index<this.AryText.length && index<this.MaxRowCount;++index)
|
|
162538
|
+
{
|
|
162539
|
+
var outItem=this.AryText[index];
|
|
162540
|
+
var item=this.AryData[index];
|
|
162541
|
+
|
|
162542
|
+
if (outItem.HTMLTitle) item.TitleSpan.innerHTML=outItem.HTMLTitle
|
|
162543
|
+
else item.TitleSpan.innerText=outItem.Title;
|
|
162544
|
+
|
|
162545
|
+
if (outItem.TitleColor) item.TitleSpan.style.color=outItem.TitleColor;
|
|
162546
|
+
else item.TitleSpan.style.color=this.TextColor;
|
|
162547
|
+
|
|
162548
|
+
if (outItem.HTMLText) item.TextSpan.innerHTML=outItem.HTMLText
|
|
162549
|
+
else item.TextSpan.innerText=outItem.Text;
|
|
162550
|
+
|
|
162551
|
+
item.TextSpan.style.color=outItem.Color;
|
|
162552
|
+
item.TextTd.style.color=outItem.Color;
|
|
162553
|
+
|
|
162554
|
+
if (outItem.ClassName)
|
|
162555
|
+
{
|
|
162556
|
+
item.TextSpan.className=outItem.ClassName;
|
|
162557
|
+
}
|
|
162558
|
+
else
|
|
162559
|
+
{
|
|
162560
|
+
if (item.TextSpan.className!=this.ValueAlign.Right) item.TextSpan.className=this.ValueAlign.Right;
|
|
162561
|
+
}
|
|
162562
|
+
|
|
162563
|
+
if (outItem.TitleClassName)
|
|
162564
|
+
{
|
|
162565
|
+
item.TitleSpan.className=outItem.TitleClassName;
|
|
162566
|
+
}
|
|
162567
|
+
else
|
|
162568
|
+
{
|
|
162569
|
+
if (item.TitleSpan.className!=this.TitleAlign.Default) item.TitleSpan.className=this.TitleAlign.Default;
|
|
162570
|
+
}
|
|
162571
|
+
|
|
162572
|
+
if (outItem.IsMergeCell) //合并单元格
|
|
162573
|
+
{
|
|
162574
|
+
item.TitleTd.colspan=2;
|
|
162575
|
+
item.TextTd.style.display="none";
|
|
162576
|
+
}
|
|
162577
|
+
else
|
|
162578
|
+
{
|
|
162579
|
+
if (item.TitleTd.colspan!=1) item.TitleTd.colspan=1;
|
|
162580
|
+
item.TextTd.style.display="";
|
|
162581
|
+
}
|
|
162582
|
+
|
|
162583
|
+
item.Tr.style.display="";
|
|
162584
|
+
if (item.Tr2) item.Tr2.style.display="none";
|
|
162585
|
+
|
|
162586
|
+
}
|
|
162587
|
+
|
|
162588
|
+
for( ; index<this.MaxRowCount; ++index)
|
|
162589
|
+
{
|
|
162590
|
+
var item=this.AryData[index];
|
|
162591
|
+
item.Tr.style.display="none";
|
|
162592
|
+
if (item.Tr2) item.Tr2.style.display="none";
|
|
162593
|
+
}
|
|
162594
|
+
}
|
|
162595
|
+
}
|
|
162596
|
+
|
|
162327
162597
|
function JSSmallFloatTooltipGroup()
|
|
162328
162598
|
{
|
|
162329
162599
|
this.AryTooltip=[];
|
|
162330
162600
|
this.HQChart=null;
|
|
162331
162601
|
this.MaxCount=5;
|
|
162602
|
+
this.MaxRowCount=15;
|
|
162603
|
+
this.Style=0;
|
|
162332
162604
|
|
|
162333
162605
|
this.Inital=function(hqchart, option)
|
|
162334
162606
|
{
|
|
162335
162607
|
this.HQChart=hqchart;
|
|
162608
|
+
if (option)
|
|
162609
|
+
{
|
|
162610
|
+
if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
|
|
162611
|
+
if (IFrameSplitOperator.IsNumber(option.MaxRowCount)) this.Style=option.MaxRowCount;
|
|
162612
|
+
if (IFrameSplitOperator.IsNumber(option.MaxCount)) this.Style=option.MaxCount;
|
|
162613
|
+
}
|
|
162614
|
+
}
|
|
162615
|
+
|
|
162616
|
+
this.CreateTooltipDom=function()
|
|
162617
|
+
{
|
|
162618
|
+
var item=null;
|
|
162619
|
+
if (this.Style==1)
|
|
162620
|
+
{
|
|
162621
|
+
item=new JSSmallFloatTooltipV2();
|
|
162622
|
+
item.MaxRowCount=this.MaxRowCount;
|
|
162623
|
+
}
|
|
162624
|
+
else
|
|
162625
|
+
{
|
|
162626
|
+
item=new JSSmallFloatTooltip();
|
|
162627
|
+
}
|
|
162628
|
+
|
|
162629
|
+
item.HQChart=this.HQChart;
|
|
162630
|
+
return item;
|
|
162336
162631
|
}
|
|
162337
162632
|
|
|
162338
162633
|
this.Create=function()
|
|
162339
162634
|
{
|
|
162340
162635
|
for(var i=0;i<this.MaxCount;++i)
|
|
162341
162636
|
{
|
|
162342
|
-
var item=
|
|
162343
|
-
|
|
162637
|
+
var item=this.CreateTooltipDom();
|
|
162638
|
+
|
|
162344
162639
|
item.Create();
|
|
162345
162640
|
this.AryTooltip.push(item);
|
|
162346
162641
|
}
|
|
@@ -162359,6 +162654,12 @@ function JSSmallFloatTooltipGroup()
|
|
|
162359
162654
|
|
|
162360
162655
|
this.Update=function(data)
|
|
162361
162656
|
{
|
|
162657
|
+
if (this.Style==1)
|
|
162658
|
+
{
|
|
162659
|
+
this.UpdateV2(data);
|
|
162660
|
+
return;
|
|
162661
|
+
}
|
|
162662
|
+
|
|
162362
162663
|
var tooltipData=data.Tooltip;
|
|
162363
162664
|
var pixelTatio = GetDevicePixelRatio();
|
|
162364
162665
|
if (pixelTatio===0) pixelTatio=1;
|
|
@@ -162380,6 +162681,47 @@ function JSSmallFloatTooltipGroup()
|
|
|
162380
162681
|
}
|
|
162381
162682
|
}
|
|
162382
162683
|
|
|
162684
|
+
//Style==1 同价格合并输出
|
|
162685
|
+
this.UpdateV2=function(data)
|
|
162686
|
+
{
|
|
162687
|
+
var tooltipData=data.Tooltip;
|
|
162688
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
162689
|
+
if (pixelTatio===0) pixelTatio=1;
|
|
162690
|
+
|
|
162691
|
+
var x=tooltipData.X/pixelTatio;
|
|
162692
|
+
var mapTooltip=new Map(); //根据Y轴 归类
|
|
162693
|
+
for(var i=0; i<tooltipData.AryData.length;++i)
|
|
162694
|
+
{
|
|
162695
|
+
var item=tooltipData.AryData[i];
|
|
162696
|
+
var key=parseInt(item.Y);
|
|
162697
|
+
if (mapTooltip.has(key))
|
|
162698
|
+
{
|
|
162699
|
+
var mapItem=mapTooltip.get(key);
|
|
162700
|
+
mapItem.AryData.push(item);
|
|
162701
|
+
}
|
|
162702
|
+
else
|
|
162703
|
+
{
|
|
162704
|
+
mapTooltip.set(key, { Key:key, Point:{ X:x, Y:item.Y/pixelTatio }, AryData:[ item ] });
|
|
162705
|
+
}
|
|
162706
|
+
}
|
|
162707
|
+
|
|
162708
|
+
var aryData=[];
|
|
162709
|
+
for(var mapItem of mapTooltip) aryData.push(mapItem[1]);
|
|
162710
|
+
|
|
162711
|
+
for(var i=0; i<aryData.length && i<this.AryTooltip.length; ++i)
|
|
162712
|
+
{
|
|
162713
|
+
var item=aryData[i];
|
|
162714
|
+
var tooltipItem=this.AryTooltip[i];
|
|
162715
|
+
tooltipItem.Update(item);
|
|
162716
|
+
}
|
|
162717
|
+
|
|
162718
|
+
for(var i=tooltipData.AryData.length; i<this.AryTooltip.length; ++i)
|
|
162719
|
+
{
|
|
162720
|
+
var item=this.AryTooltip[i];
|
|
162721
|
+
item.Hide();
|
|
162722
|
+
}
|
|
162723
|
+
}
|
|
162724
|
+
|
|
162383
162725
|
this.Hide=function()
|
|
162384
162726
|
{
|
|
162385
162727
|
for(var i=0;i<this.AryTooltip.length;++i)
|
|
@@ -164680,7 +165022,7 @@ function HQChartScriptWorker()
|
|
|
164680
165022
|
|
|
164681
165023
|
|
|
164682
165024
|
|
|
164683
|
-
var HQCHART_VERSION="1.1.
|
|
165025
|
+
var HQCHART_VERSION="1.1.15028";
|
|
164684
165026
|
|
|
164685
165027
|
function PrintHQChartVersion()
|
|
164686
165028
|
{
|