hqchart 1.1.13678 → 1.1.13682
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 +32 -20
- package/package.json +1 -1
- package/src/jscommon/umychart.js +10 -0
- package/src/jscommon/umychart.keyboard.js +141 -65
- package/src/jscommon/umychart.report.js +1 -1
- package/src/jscommon/umychart.resource/css/tools.css +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +153 -67
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +153 -67
|
@@ -72171,6 +72171,16 @@ function JSChartResource()
|
|
|
72171
72171
|
NameFont:{ Size:14, Name:"微软雅黑" },
|
|
72172
72172
|
SymbolFont:{ Size:12, Name:"微软雅黑" }
|
|
72173
72173
|
},
|
|
72174
|
+
|
|
72175
|
+
VScrollbar:
|
|
72176
|
+
{
|
|
72177
|
+
ScrollBarHeight:50,
|
|
72178
|
+
ButtonColor:"rgba(252,252,252,0.8)",
|
|
72179
|
+
BarColor:"rgba(168,168,168,0.9)",
|
|
72180
|
+
BorderColor:'rgba(180,180,180,0.9)',
|
|
72181
|
+
BGColor:"rgba(234,239,248,0.9)",
|
|
72182
|
+
BarWidth:{ Size:8 }
|
|
72183
|
+
},
|
|
72174
72184
|
},
|
|
72175
72185
|
|
|
72176
72186
|
//滚动条
|
|
@@ -133993,7 +134003,7 @@ function ChartVScrollbar()
|
|
|
133993
134003
|
this.ChartBorder; //边框信息
|
|
133994
134004
|
this.ChartFrame; //框架画法
|
|
133995
134005
|
this.Name; //名称
|
|
133996
|
-
this.ClassName='
|
|
134006
|
+
this.ClassName='ChartVScrollbar'; //类名
|
|
133997
134007
|
this.IsDrawFirst=false;
|
|
133998
134008
|
this.GetEventCallback; //获取事件
|
|
133999
134009
|
this.Report;
|
|
@@ -134570,6 +134580,7 @@ function JSKeyboardChartContainer(uielement)
|
|
|
134570
134580
|
|
|
134571
134581
|
//拖拽滚动条
|
|
134572
134582
|
this.DragYScroll=null; //{Start:{x,y}, End:{x, y}}
|
|
134583
|
+
|
|
134573
134584
|
this.IsDestroy=false; //是否已经销毁了
|
|
134574
134585
|
|
|
134575
134586
|
this.ChartDestory=function() //销毁
|
|
@@ -134610,6 +134621,7 @@ function JSKeyboardChartContainer(uielement)
|
|
|
134610
134621
|
this.Data.Data=aryExactQuery.concat(aryFuzzyQuery);
|
|
134611
134622
|
|
|
134612
134623
|
this.ChartPaint[0].SelectedRow=0;
|
|
134624
|
+
this.ChartPaint[0].SizeChange=true;
|
|
134613
134625
|
|
|
134614
134626
|
JSConsole.Chart.Log(`[JSKeyboardChart:Search] search=${strSearch}, source=${this.SourceData.Data.length} match=${this.Data.Data.length}`);
|
|
134615
134627
|
|
|
@@ -134686,6 +134698,12 @@ function JSKeyboardChartContainer(uielement)
|
|
|
134686
134698
|
chart.Data=this.Data;
|
|
134687
134699
|
this.ChartPaint[0]=chart;
|
|
134688
134700
|
|
|
134701
|
+
chart.VScrollbar=new ChartKeyboardVScrollbar();
|
|
134702
|
+
chart.VScrollbar.Frame=this.Frame;
|
|
134703
|
+
chart.VScrollbar.Canvas=this.Canvas;
|
|
134704
|
+
chart.VScrollbar.ChartBorder=this.Frame.ChartBorder;
|
|
134705
|
+
chart.VScrollbar.Report=chart;
|
|
134706
|
+
|
|
134689
134707
|
if (option)
|
|
134690
134708
|
{
|
|
134691
134709
|
|
|
@@ -134937,7 +134955,7 @@ function JSKeyboardChartContainer(uielement)
|
|
|
134937
134955
|
|
|
134938
134956
|
this.UIOnMouseDown=function(e)
|
|
134939
134957
|
{
|
|
134940
|
-
this.
|
|
134958
|
+
this.DragYScroll=null;
|
|
134941
134959
|
this.DragMove={ Click:{ X:e.clientX, Y:e.clientY }, Move:{X:e.clientX, Y:e.clientY}, PreMove:{X:e.clientX, Y:e.clientY } };
|
|
134942
134960
|
|
|
134943
134961
|
var pixelTatio = GetDevicePixelRatio();
|
|
@@ -134956,6 +134974,29 @@ function JSKeyboardChartContainer(uielement)
|
|
|
134956
134974
|
if (clickData.Redraw==true)
|
|
134957
134975
|
this.Draw();
|
|
134958
134976
|
}
|
|
134977
|
+
else if (clickData.Type==5 && e.button==0) //右侧滚动条
|
|
134978
|
+
{
|
|
134979
|
+
var scroll=clickData.VScrollbar;
|
|
134980
|
+
if (scroll.Type==1) //顶部按钮
|
|
134981
|
+
{
|
|
134982
|
+
if (this.MoveYOffset(-1))
|
|
134983
|
+
this.Draw();
|
|
134984
|
+
}
|
|
134985
|
+
else if (scroll.Type==2) //底部按钮
|
|
134986
|
+
{
|
|
134987
|
+
if (this.MoveYOffset(1))
|
|
134988
|
+
this.Draw();
|
|
134989
|
+
}
|
|
134990
|
+
else if (scroll.Type==3) //滚动条
|
|
134991
|
+
{
|
|
134992
|
+
this.DragYScroll={ Click:{X:x, Y:y}, LastMove:{X:x, Y:y} };
|
|
134993
|
+
}
|
|
134994
|
+
else if (scroll.Type==4) //滚动条内部
|
|
134995
|
+
{
|
|
134996
|
+
if (this.SetYOffset(scroll.Pos))
|
|
134997
|
+
this.Draw();
|
|
134998
|
+
}
|
|
134999
|
+
}
|
|
134959
135000
|
}
|
|
134960
135001
|
|
|
134961
135002
|
document.onmousemove=(e)=>{ this.DocOnMouseMove(e); }
|
|
@@ -135001,68 +135042,17 @@ function JSKeyboardChartContainer(uielement)
|
|
|
135001
135042
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
135002
135043
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
135003
135044
|
|
|
135004
|
-
|
|
135005
|
-
|
|
135006
|
-
if (this.DragRow)
|
|
135007
|
-
{
|
|
135008
|
-
var drag=this.DragRow;
|
|
135009
|
-
var moveSetpY=drag.LastMove.Y-e.clientY;
|
|
135010
|
-
if (Math.abs(moveSetpY)<2) return;
|
|
135011
|
-
var reportChart=this.GetReportChart();
|
|
135012
|
-
drag.LastMove.X=e.clientX;
|
|
135013
|
-
drag.LastMove.Y=e.clientY;
|
|
135014
|
-
drag.Inside={X:x, Y:y};
|
|
135015
|
-
|
|
135016
|
-
if (reportChart)
|
|
135017
|
-
{
|
|
135018
|
-
var moveRow=reportChart.OnDrawgRow(x,y,e);
|
|
135019
|
-
if (moveRow )
|
|
135020
|
-
{
|
|
135021
|
-
if (moveRow.Type==2)
|
|
135022
|
-
{
|
|
135023
|
-
if (moveRow.Data.DataIndex!=drag.Data.Row.DataIndex)
|
|
135024
|
-
{
|
|
135025
|
-
drag.MoveRow=moveRow;
|
|
135026
|
-
}
|
|
135027
|
-
}
|
|
135028
|
-
else if (moveRow.Type==7)
|
|
135029
|
-
{
|
|
135030
|
-
var pageStatus=reportChart.GetCurrentPageStatus();
|
|
135031
|
-
if (!pageStatus.IsEnd)
|
|
135032
|
-
{
|
|
135033
|
-
this.MoveYOffset(1, false);
|
|
135034
|
-
drag.MoveRow=null;
|
|
135035
|
-
|
|
135036
|
-
this.EnablePageScroll=true;
|
|
135037
|
-
this.AutoScrollPage(2);
|
|
135038
|
-
}
|
|
135039
|
-
}
|
|
135040
|
-
else if (moveRow.Type==5)
|
|
135041
|
-
{
|
|
135042
|
-
if (this.Data.YOffset>0)
|
|
135043
|
-
{
|
|
135044
|
-
this.MoveYOffset(-1, false);
|
|
135045
|
-
drag.MoveRow=null;
|
|
135046
|
-
|
|
135047
|
-
this.EnablePageScroll=true;
|
|
135048
|
-
this.AutoScrollPage(-2);
|
|
135049
|
-
}
|
|
135050
|
-
}
|
|
135051
|
-
}
|
|
135052
|
-
reportChart.DragRow=drag;
|
|
135053
|
-
}
|
|
135054
|
-
|
|
135055
|
-
this.Draw();
|
|
135056
|
-
}
|
|
135057
|
-
else if (this.DragXScroll)
|
|
135045
|
+
if (this.DragYScroll)
|
|
135058
135046
|
{
|
|
135059
135047
|
var chart=this.ChartPaint[0];
|
|
135060
|
-
if (!chart || !chart.
|
|
135048
|
+
if (!chart || !chart.VScrollbar) return;
|
|
135061
135049
|
|
|
135062
|
-
this.
|
|
135063
|
-
this.
|
|
135064
|
-
|
|
135065
|
-
|
|
135050
|
+
this.DragYScroll.LastMove.X=x;
|
|
135051
|
+
this.DragYScroll.LastMove.Y=y;
|
|
135052
|
+
|
|
135053
|
+
var pos=chart.VScrollbar.GetScrollPostionByPoint(x,y);
|
|
135054
|
+
if (this.SetYOffset(pos))
|
|
135055
|
+
this.Draw();
|
|
135066
135056
|
}
|
|
135067
135057
|
}
|
|
135068
135058
|
|
|
@@ -135072,6 +135062,8 @@ function JSKeyboardChartContainer(uielement)
|
|
|
135072
135062
|
document.onmousemove=null;
|
|
135073
135063
|
document.onmouseup=null;
|
|
135074
135064
|
|
|
135065
|
+
this.DragYScroll=null;
|
|
135066
|
+
|
|
135075
135067
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYBOARD_MOUSEUP)
|
|
135076
135068
|
if (event && event.Callback)
|
|
135077
135069
|
{
|
|
@@ -135378,6 +135370,21 @@ function JSKeyboardChartContainer(uielement)
|
|
|
135378
135370
|
return result;
|
|
135379
135371
|
}
|
|
135380
135372
|
}
|
|
135373
|
+
|
|
135374
|
+
this.SetYOffset=function(pos)
|
|
135375
|
+
{
|
|
135376
|
+
if (!IFrameSplitOperator.IsNumber(pos)) return false;
|
|
135377
|
+
var chart=this.ChartPaint[0];
|
|
135378
|
+
if (!chart) return false;
|
|
135379
|
+
|
|
135380
|
+
var maxOffset=chart.GetYScrollRange();
|
|
135381
|
+
if (pos<0) pos=0;
|
|
135382
|
+
if (pos>maxOffset) pos=maxOffset;
|
|
135383
|
+
|
|
135384
|
+
this.Data.YOffset=pos;
|
|
135385
|
+
|
|
135386
|
+
return true;
|
|
135387
|
+
}
|
|
135381
135388
|
}
|
|
135382
135389
|
|
|
135383
135390
|
function JSKeyboardFrame()
|
|
@@ -135387,14 +135394,14 @@ function JSKeyboardFrame()
|
|
|
135387
135394
|
|
|
135388
135395
|
this.BorderLine=null; //1=上 2=下 4=左 8=右
|
|
135389
135396
|
|
|
135390
|
-
this.BorderColor=g_JSChartResource.
|
|
135397
|
+
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
135391
135398
|
|
|
135392
135399
|
this.LogoTextColor=g_JSChartResource.FrameLogo.TextColor;
|
|
135393
135400
|
this.LogoTextFont=g_JSChartResource.FrameLogo.Font;
|
|
135394
135401
|
|
|
135395
|
-
this.ReloadResource=function(
|
|
135402
|
+
this.ReloadResource=function(option)
|
|
135396
135403
|
{
|
|
135397
|
-
this.BorderColor=g_JSChartResource.
|
|
135404
|
+
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
135398
135405
|
this.LogoTextColor=g_JSChartResource.FrameLogo.TextColor;
|
|
135399
135406
|
this.LogoTextFont=g_JSChartResource.FrameLogo.Font;
|
|
135400
135407
|
}
|
|
@@ -135491,10 +135498,12 @@ function ChartSymbolList()
|
|
|
135491
135498
|
this.IsDrawBorder=false; //是否绘制单元格边框
|
|
135492
135499
|
|
|
135493
135500
|
this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
|
|
135501
|
+
|
|
135502
|
+
this.VScrollbar; //竖向滚动条
|
|
135494
135503
|
|
|
135495
135504
|
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
135496
135505
|
this.SelectedColor=g_JSChartResource.Keyboard.SelectedColor; //选中行
|
|
135497
|
-
this.TextColor=g_JSChartResource.Keyboard.TextColor;
|
|
135506
|
+
this.TextColor=g_JSChartResource.Keyboard.TextColor; //文字颜色
|
|
135498
135507
|
|
|
135499
135508
|
//表格内容配置
|
|
135500
135509
|
this.ItemFontConfig={ Size:g_JSChartResource.Keyboard.Item.Font.Size, Name:g_JSChartResource.Keyboard.Item.Font.Name };
|
|
@@ -135527,7 +135536,11 @@ function ChartSymbolList()
|
|
|
135527
135536
|
|
|
135528
135537
|
this.ReloadResource=function(resource)
|
|
135529
135538
|
{
|
|
135530
|
-
|
|
135539
|
+
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
135540
|
+
this.SelectedColor=g_JSChartResource.Keyboard.SelectedColor; //选中行
|
|
135541
|
+
this.TextColor=g_JSChartResource.Keyboard.TextColor; //文字颜色
|
|
135542
|
+
|
|
135543
|
+
if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
|
|
135531
135544
|
}
|
|
135532
135545
|
|
|
135533
135546
|
this.SetColumn=function(aryColumn)
|
|
@@ -135542,6 +135555,7 @@ function ChartSymbolList()
|
|
|
135542
135555
|
if (this.SizeChange) this.CalculateSize();
|
|
135543
135556
|
else this.UpdateCacheData();
|
|
135544
135557
|
|
|
135558
|
+
var bShowVScrollbar=this.IsShowVScrollbar();
|
|
135545
135559
|
this.Canvas.save();
|
|
135546
135560
|
|
|
135547
135561
|
this.Canvas.beginPath();
|
|
@@ -135554,6 +135568,12 @@ function ChartSymbolList()
|
|
|
135554
135568
|
|
|
135555
135569
|
this.DrawBorder();
|
|
135556
135570
|
|
|
135571
|
+
if (this.VScrollbar && bShowVScrollbar)
|
|
135572
|
+
{
|
|
135573
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
135574
|
+
this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+2, this.RectClient.Right+this.VScrollbar.ButtonSize+2, bottom-2);
|
|
135575
|
+
}
|
|
135576
|
+
|
|
135557
135577
|
this.SizeChange=false;
|
|
135558
135578
|
}
|
|
135559
135579
|
|
|
@@ -135564,6 +135584,12 @@ function ChartSymbolList()
|
|
|
135564
135584
|
this.RectClient.Right=this.ChartBorder.GetRight();
|
|
135565
135585
|
this.RectClient.Top=this.ChartBorder.GetTop();
|
|
135566
135586
|
this.RectClient.Bottom=this.ChartBorder.GetBottom();
|
|
135587
|
+
|
|
135588
|
+
var bShowVScrollbar=this.IsShowVScrollbar();
|
|
135589
|
+
if (bShowVScrollbar && this.VScrollbar && this.VScrollbar.Enable)
|
|
135590
|
+
{
|
|
135591
|
+
this.RectClient.Right-=(this.VScrollbar.ButtonSize+2);
|
|
135592
|
+
}
|
|
135567
135593
|
}
|
|
135568
135594
|
|
|
135569
135595
|
this.GetPageSize=function(recalculate) //recalculate 是否重新计算
|
|
@@ -135597,6 +135623,8 @@ function ChartSymbolList()
|
|
|
135597
135623
|
|
|
135598
135624
|
this.CalculateSize=function() //计算大小
|
|
135599
135625
|
{
|
|
135626
|
+
if (this.VScrollbar && this.VScrollbar.Enable) this.VScrollbar.CalculateSize();
|
|
135627
|
+
|
|
135600
135628
|
this.UpdateCacheData();
|
|
135601
135629
|
|
|
135602
135630
|
var pixelRatio=GetDevicePixelRatio();
|
|
@@ -135791,6 +135819,7 @@ function ChartSymbolList()
|
|
|
135791
135819
|
else if (textAlign=='right')
|
|
135792
135820
|
{
|
|
135793
135821
|
x=left+width-2;
|
|
135822
|
+
if (left+width-2>this.RectClient.Right) x=this.RectClient.Right-2;
|
|
135794
135823
|
this.Canvas.textAlign="right";
|
|
135795
135824
|
}
|
|
135796
135825
|
else
|
|
@@ -135845,6 +135874,12 @@ function ChartSymbolList()
|
|
|
135845
135874
|
else
|
|
135846
135875
|
var uiElement={Left:null, Top:null};
|
|
135847
135876
|
|
|
135877
|
+
if (this.VScrollbar)
|
|
135878
|
+
{
|
|
135879
|
+
var item=this.VScrollbar.OnMouseDown(x,y,e);
|
|
135880
|
+
if (item) return { Type:5, VScrollbar:item }; //右侧滚动条
|
|
135881
|
+
}
|
|
135882
|
+
|
|
135848
135883
|
var row=this.PtInBody(x,y);
|
|
135849
135884
|
if (row)
|
|
135850
135885
|
{
|
|
@@ -136005,6 +136040,57 @@ function ChartSymbolList()
|
|
|
136005
136040
|
event.Callback(event,data,this);
|
|
136006
136041
|
}
|
|
136007
136042
|
}
|
|
136043
|
+
|
|
136044
|
+
this.GetYScrollRange=function()
|
|
136045
|
+
{
|
|
136046
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
|
|
136047
|
+
|
|
136048
|
+
var maxOffset=this.Data.Data.length-this.RowCount;
|
|
136049
|
+
|
|
136050
|
+
return maxOffset;
|
|
136051
|
+
}
|
|
136052
|
+
|
|
136053
|
+
//大于1屏数据 显示滚动条
|
|
136054
|
+
this.IsShowVScrollbar=function()
|
|
136055
|
+
{
|
|
136056
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return false;
|
|
136057
|
+
|
|
136058
|
+
return this.Data.Data.length>this.RowCount;
|
|
136059
|
+
}
|
|
136060
|
+
}
|
|
136061
|
+
|
|
136062
|
+
//纵向滚动条
|
|
136063
|
+
function ChartKeyboardVScrollbar()
|
|
136064
|
+
{
|
|
136065
|
+
this.newMethod=ChartVScrollbar; //派生
|
|
136066
|
+
this.newMethod();
|
|
136067
|
+
delete this.newMethod;
|
|
136068
|
+
|
|
136069
|
+
this.ClassName='ChartKeyboardVScrollbar';
|
|
136070
|
+
this.Enable=true;
|
|
136071
|
+
|
|
136072
|
+
this.ScrollBarHeight=g_JSChartResource.Keyboard.VScrollbar.ScrollBarHeight;
|
|
136073
|
+
this.ButtonColor=g_JSChartResource.Keyboard.VScrollbar.ButtonColor;
|
|
136074
|
+
this.BarColor=g_JSChartResource.Keyboard.VScrollbar.BarColor;
|
|
136075
|
+
this.BorderColor=g_JSChartResource.Keyboard.VScrollbar.BorderColor;
|
|
136076
|
+
this.BGColor=g_JSChartResource.Keyboard.VScrollbar.BGColor;
|
|
136077
|
+
this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
|
|
136078
|
+
this.BarWithConfig={ Size:g_JSChartResource.Keyboard.VScrollbar.BarWidth.Size };
|
|
136079
|
+
|
|
136080
|
+
this.ReloadResource=function(resource)
|
|
136081
|
+
{
|
|
136082
|
+
this.ScrollBarHeight=g_JSChartResource.Keyboard.VScrollbar.ScrollBarHeight;
|
|
136083
|
+
this.ButtonColor=g_JSChartResource.Keyboard.VScrollbar.ButtonColor;
|
|
136084
|
+
this.BarColor=g_JSChartResource.Keyboard.VScrollbar.BarColor;
|
|
136085
|
+
this.BorderColor=g_JSChartResource.Keyboard.VScrollbar.BorderColor;
|
|
136086
|
+
this.BGColor=g_JSChartResource.Keyboard.VScrollbar.BGColor;
|
|
136087
|
+
this.BarWithConfig={ Size:g_JSChartResource.Keyboard.VScrollbar.BarWidth.Size };
|
|
136088
|
+
}
|
|
136089
|
+
|
|
136090
|
+
this.IsShowCallback=function()
|
|
136091
|
+
{
|
|
136092
|
+
return true;
|
|
136093
|
+
}
|
|
136008
136094
|
}
|
|
136009
136095
|
|
|
136010
136096
|
/*
|
|
@@ -137485,7 +137571,7 @@ function ScrollBarBGChart()
|
|
|
137485
137571
|
|
|
137486
137572
|
|
|
137487
137573
|
|
|
137488
|
-
var HQCHART_VERSION="1.1.
|
|
137574
|
+
var HQCHART_VERSION="1.1.13681";
|
|
137489
137575
|
|
|
137490
137576
|
function PrintHQChartVersion()
|
|
137491
137577
|
{
|