hqchart 1.1.14915 → 1.1.14922
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 +109 -99
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogTooltip.js +17 -1
- package/src/jscommon/umychart.js +2 -0
- package/src/jscommon/umychart.report.js +98 -42
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +101 -43
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +118 -44
|
@@ -6969,6 +6969,8 @@ var JSCHART_EVENT_ID=
|
|
|
6969
6969
|
GET_DEFAULT_INDEX_PARAM:172, //获取指标默认参数
|
|
6970
6970
|
|
|
6971
6971
|
ON_RELOAD_RESOURCE:173,
|
|
6972
|
+
|
|
6973
|
+
ON_REPORT_DATA_FILTER:174, //数据筛选
|
|
6972
6974
|
}
|
|
6973
6975
|
|
|
6974
6976
|
var JSCHART_OPERATOR_ID=
|
|
@@ -137972,7 +137974,13 @@ function JSReportChart(divElement)
|
|
|
137972
137974
|
//是否自动更新
|
|
137973
137975
|
if (option.IsAutoUpdate!=null) chart.IsAutoUpdate=option.IsAutoUpdate;
|
|
137974
137976
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
137975
|
-
|
|
137977
|
+
|
|
137978
|
+
//数据筛选
|
|
137979
|
+
if (option.DataFilter)
|
|
137980
|
+
{
|
|
137981
|
+
var item=option.DataFilter;
|
|
137982
|
+
if (IFrameSplitOperator.IsBool(item.Enable)) chart.DataFilterConfig.Enable=item.Enable;
|
|
137983
|
+
}
|
|
137976
137984
|
|
|
137977
137985
|
//注册事件
|
|
137978
137986
|
if (option.EventCallback)
|
|
@@ -138046,9 +138054,9 @@ function JSReportChart(divElement)
|
|
|
138046
138054
|
if (this.JSChartContainer) this.JSChartContainer.AddSymbol(arySymbol, option);
|
|
138047
138055
|
}
|
|
138048
138056
|
|
|
138049
|
-
this.
|
|
138057
|
+
this.EnableDataFilter=function(bEnable, option) //启动|关闭筛选
|
|
138050
138058
|
{
|
|
138051
|
-
if (this.JSChartContainer) this.JSChartContainer.
|
|
138059
|
+
if (this.JSChartContainer) this.JSChartContainer.EnableDataFilter(bEnable, option);
|
|
138052
138060
|
}
|
|
138053
138061
|
|
|
138054
138062
|
//事件回调
|
|
@@ -138238,6 +138246,8 @@ function JSReportChartContainer(uielement)
|
|
|
138238
138246
|
//MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
|
|
138239
138247
|
this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
|
|
138240
138248
|
this.RequestStatus={ IsFinishStockList:false, IsFinishMemberList:false }; //下载状态
|
|
138249
|
+
|
|
138250
|
+
this.DataFilterConfig={ Enable:false, }; //数据筛选
|
|
138241
138251
|
|
|
138242
138252
|
this.ChartDestroy=function() //销毁
|
|
138243
138253
|
{
|
|
@@ -138889,6 +138899,8 @@ function JSReportChartContainer(uielement)
|
|
|
138889
138899
|
|
|
138890
138900
|
this.RequestMemberListData=function()
|
|
138891
138901
|
{
|
|
138902
|
+
if (this.RequestStatus.IsFinishStockList==false) return; //码表没有下完
|
|
138903
|
+
|
|
138892
138904
|
//this.ChartSplashPaint.SetTitle(this.SplashTitle.MemberList);
|
|
138893
138905
|
//this.ChartSplashPaint.EnableSplash(true);
|
|
138894
138906
|
//this.Draw();
|
|
@@ -138948,6 +138960,16 @@ function JSReportChartContainer(uielement)
|
|
|
138948
138960
|
|
|
138949
138961
|
this.RequestStatus.IsFinishMemberList=true;
|
|
138950
138962
|
|
|
138963
|
+
this.DataFilter();
|
|
138964
|
+
|
|
138965
|
+
//实时本地数据排序
|
|
138966
|
+
var chart=this.GetReportChart();
|
|
138967
|
+
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
138968
|
+
{
|
|
138969
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
138970
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
138971
|
+
}
|
|
138972
|
+
|
|
138951
138973
|
this.Draw();
|
|
138952
138974
|
this.UpdateStockData();
|
|
138953
138975
|
}
|
|
@@ -139261,7 +139283,7 @@ function JSReportChartContainer(uielement)
|
|
|
139261
139283
|
if (!chart) return;
|
|
139262
139284
|
|
|
139263
139285
|
//列表还没有加载完成
|
|
139264
|
-
if (this.RequestStatus.
|
|
139286
|
+
if (this.RequestStatus.IsFinishStockList==false || this.RequestStatus.IsFinishMemberList==false) return;
|
|
139265
139287
|
|
|
139266
139288
|
if (this.Data.Virtual && this.Data.Virtual.Enable)
|
|
139267
139289
|
{
|
|
@@ -139359,31 +139381,21 @@ function JSReportChartContainer(uielement)
|
|
|
139359
139381
|
var chart=this.ChartPaint[0];
|
|
139360
139382
|
if (!chart) return;
|
|
139361
139383
|
|
|
139384
|
+
|
|
139385
|
+
|
|
139362
139386
|
var bUpdate=false;
|
|
139387
|
+
if (this.DataFilter()) bUpdate=true; //过滤数据每次都刷新
|
|
139388
|
+
|
|
139363
139389
|
//实时本地数据排序
|
|
139364
139390
|
var chart=this.ChartPaint[0];
|
|
139365
139391
|
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
139366
139392
|
{
|
|
139367
|
-
var column=chart.Column[this.SortInfo.Field];
|
|
139368
|
-
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
|
|
139369
|
-
|
|
139370
139393
|
//当前选中的股票
|
|
139371
139394
|
var selectedSymbol=null;
|
|
139372
139395
|
if (chart.SelectedRowData && chart.SelectedModel==1) selectedSymbol=chart.SelectedRowData.Symbol;
|
|
139373
139396
|
|
|
139374
|
-
var
|
|
139375
|
-
|
|
139376
|
-
{
|
|
139377
|
-
var sendData={ Column:column, SortInfo:this.SortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false };
|
|
139378
|
-
event.Callback (event, sendData, this);
|
|
139379
|
-
if (event.PreventDefault)
|
|
139380
|
-
{
|
|
139381
|
-
bLocalSrot=false;
|
|
139382
|
-
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
139383
|
-
}
|
|
139384
|
-
}
|
|
139385
|
-
|
|
139386
|
-
if (bLocalSrot) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, this.SortInfo.Sort); });
|
|
139397
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
139398
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
139387
139399
|
|
|
139388
139400
|
if (selectedSymbol)
|
|
139389
139401
|
{
|
|
@@ -141448,33 +141460,15 @@ function JSReportChartContainer(uielement)
|
|
|
141448
141460
|
{
|
|
141449
141461
|
if (sortInfo.Sort==0)
|
|
141450
141462
|
{
|
|
141451
|
-
this.Data.Data=
|
|
141452
|
-
|
|
141453
|
-
{
|
|
141454
|
-
this.Data.Data.push(this.SourceData.Data[i]);
|
|
141455
|
-
}
|
|
141463
|
+
this.Data.Data=this.SourceData.Data.slice();
|
|
141464
|
+
this.DataFilter();
|
|
141456
141465
|
}
|
|
141457
141466
|
else
|
|
141458
141467
|
{
|
|
141459
141468
|
if (header.Column.Sort==1) //本地排序
|
|
141460
141469
|
{
|
|
141461
|
-
|
|
141462
|
-
|
|
141463
|
-
if (event && event.Callback)
|
|
141464
|
-
{
|
|
141465
|
-
var sendData={ Column:header.Column, SortInfo:sortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false};
|
|
141466
|
-
event.Callback (event, sendData, this);
|
|
141467
|
-
if (sendData.PreventDefault)
|
|
141468
|
-
{
|
|
141469
|
-
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
141470
|
-
bLocalSort=false;
|
|
141471
|
-
}
|
|
141472
|
-
|
|
141473
|
-
}
|
|
141474
|
-
|
|
141475
|
-
|
|
141476
|
-
if (bLocalSort) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, header.Column, sortInfo.Sort); });
|
|
141477
|
-
|
|
141470
|
+
this.DataFilter();
|
|
141471
|
+
this.LocalDataSort(header.Column, sortInfo);
|
|
141478
141472
|
}
|
|
141479
141473
|
else if (header.Column.Sort==2) //远程排序
|
|
141480
141474
|
{
|
|
@@ -141499,6 +141493,70 @@ function JSReportChartContainer(uielement)
|
|
|
141499
141493
|
}
|
|
141500
141494
|
}
|
|
141501
141495
|
|
|
141496
|
+
this.LocalDataSort=function(column, sortInfo)
|
|
141497
|
+
{
|
|
141498
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_LOCAL_SORT);
|
|
141499
|
+
var bLocalSort=true;
|
|
141500
|
+
if (event && event.Callback)
|
|
141501
|
+
{
|
|
141502
|
+
var sendData={ Column:header.Column, SortInfo:sortInfo, SymbolList:this.Data.Data, Result:null, PreventDefault:false};
|
|
141503
|
+
event.Callback (event, sendData, this);
|
|
141504
|
+
if (sendData.PreventDefault)
|
|
141505
|
+
{
|
|
141506
|
+
if (Array.isArray(sendData.Result)) this.Data.Data=sendData.Result;
|
|
141507
|
+
bLocalSort=false;
|
|
141508
|
+
}
|
|
141509
|
+
}
|
|
141510
|
+
|
|
141511
|
+
if (bLocalSort) this.Data.Data.sort((left, right)=> { return this.LocalSort(left, right, column, sortInfo.Sort); });
|
|
141512
|
+
}
|
|
141513
|
+
|
|
141514
|
+
//数据筛选
|
|
141515
|
+
this.DataFilter=function()
|
|
141516
|
+
{
|
|
141517
|
+
if (!this.DataFilterConfig.Enable) return false;
|
|
141518
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data)) return false;
|
|
141519
|
+
|
|
141520
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_REPORT_DATA_FILTER);
|
|
141521
|
+
if (!event || !event.Callback) return false;
|
|
141522
|
+
|
|
141523
|
+
var aryData=this.SourceData.Data.slice(); //原始数据
|
|
141524
|
+
|
|
141525
|
+
var sendData={ AryData:aryData, PreventDefault:false };
|
|
141526
|
+
event.Callback(event, sendData, this);
|
|
141527
|
+
if (!sendData.PreventDefault) return false;
|
|
141528
|
+
|
|
141529
|
+
this.Data.Data=sendData.AryData;
|
|
141530
|
+
|
|
141531
|
+
return true;
|
|
141532
|
+
}
|
|
141533
|
+
|
|
141534
|
+
this.EnableDataFilter=function(enable, option)
|
|
141535
|
+
{
|
|
141536
|
+
if (!IFrameSplitOperator.IsBool(enable)) return false;
|
|
141537
|
+
|
|
141538
|
+
this.DataFilterConfig.Enable=enable;
|
|
141539
|
+
if (enable)
|
|
141540
|
+
{
|
|
141541
|
+
this.DataFilter();
|
|
141542
|
+
}
|
|
141543
|
+
else
|
|
141544
|
+
{
|
|
141545
|
+
this.Data.Data=this.SourceData.Data.slice();
|
|
141546
|
+
}
|
|
141547
|
+
|
|
141548
|
+
//排序
|
|
141549
|
+
var chart=this.GetReportChart();
|
|
141550
|
+
if (chart && (this.SortInfo.Sort==1 || this.SortInfo.Sort==2) && IFrameSplitOperator.IsNumber(this.SortInfo.Field) && this.SortInfo.Field>=0)
|
|
141551
|
+
{
|
|
141552
|
+
var column=chart.Column[this.SortInfo.Field];
|
|
141553
|
+
this.LocalDataSort(column, this.SortInfo);
|
|
141554
|
+
}
|
|
141555
|
+
|
|
141556
|
+
this.ResetReportStatus();
|
|
141557
|
+
this.Draw();
|
|
141558
|
+
}
|
|
141559
|
+
|
|
141502
141560
|
this.PopupHeaderMenu=function(clickData, e)
|
|
141503
141561
|
{
|
|
141504
141562
|
if (!this.JSPopMenu) return;
|
|
@@ -158964,6 +159022,13 @@ function JSFloatTooltip()
|
|
|
158964
159022
|
Left:"UMyChart_Tooltip_Float_Text2_Span", //左对齐
|
|
158965
159023
|
MarginLeft:'UMyChart_Tooltip_Float_Text3_Span',
|
|
158966
159024
|
Right:"UMyChart_Tooltip_Float_Text_Span",
|
|
159025
|
+
|
|
159026
|
+
|
|
159027
|
+
}
|
|
159028
|
+
|
|
159029
|
+
this.TitleAlign=
|
|
159030
|
+
{
|
|
159031
|
+
Default:"UMyChart_Tooltip_Float_Title_Span", //标题默认
|
|
158967
159032
|
}
|
|
158968
159033
|
|
|
158969
159034
|
this.AryData=[]; //输出文字信息
|
|
@@ -159062,7 +159127,7 @@ function JSFloatTooltip()
|
|
|
159062
159127
|
rowItem.TitleTd=tdDom;
|
|
159063
159128
|
|
|
159064
159129
|
var spanDom=document.createElement("span");
|
|
159065
|
-
spanDom.className=
|
|
159130
|
+
spanDom.className=this.TitleAlign.Default;
|
|
159066
159131
|
spanDom.innerText='标题';
|
|
159067
159132
|
tdDom.appendChild(spanDom);
|
|
159068
159133
|
rowItem.TitleSpan=spanDom;
|
|
@@ -159563,6 +159628,15 @@ function JSFloatTooltip()
|
|
|
159563
159628
|
if (item.TextSpan.className!=this.ValueAlign.Right) item.TextSpan.className=this.ValueAlign.Right;
|
|
159564
159629
|
}
|
|
159565
159630
|
|
|
159631
|
+
if (outItem.TitleClassName)
|
|
159632
|
+
{
|
|
159633
|
+
item.TitleSpan.className=outItem.TitleClassName;
|
|
159634
|
+
}
|
|
159635
|
+
else
|
|
159636
|
+
{
|
|
159637
|
+
if (item.TitleSpan.className!=this.TitleAlign.Default) item.TitleSpan.className=this.TitleAlign.Default;
|
|
159638
|
+
}
|
|
159639
|
+
|
|
159566
159640
|
if (outItem.IsMergeCell) //合并单元格
|
|
159567
159641
|
{
|
|
159568
159642
|
item.TitleTd.colspan=2;
|
|
@@ -162437,7 +162511,7 @@ function HQChartScriptWorker()
|
|
|
162437
162511
|
|
|
162438
162512
|
|
|
162439
162513
|
|
|
162440
|
-
var HQCHART_VERSION="1.1.
|
|
162514
|
+
var HQCHART_VERSION="1.1.14921";
|
|
162441
162515
|
|
|
162442
162516
|
function PrintHQChartVersion()
|
|
162443
162517
|
{
|