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
|
@@ -72215,6 +72215,16 @@ function JSChartResource()
|
|
|
72215
72215
|
NameFont:{ Size:14, Name:"微软雅黑" },
|
|
72216
72216
|
SymbolFont:{ Size:12, Name:"微软雅黑" }
|
|
72217
72217
|
},
|
|
72218
|
+
|
|
72219
|
+
VScrollbar:
|
|
72220
|
+
{
|
|
72221
|
+
ScrollBarHeight:50,
|
|
72222
|
+
ButtonColor:"rgba(252,252,252,0.8)",
|
|
72223
|
+
BarColor:"rgba(168,168,168,0.9)",
|
|
72224
|
+
BorderColor:'rgba(180,180,180,0.9)',
|
|
72225
|
+
BGColor:"rgba(234,239,248,0.9)",
|
|
72226
|
+
BarWidth:{ Size:8 }
|
|
72227
|
+
},
|
|
72218
72228
|
},
|
|
72219
72229
|
|
|
72220
72230
|
//滚动条
|
|
@@ -134037,7 +134047,7 @@ function ChartVScrollbar()
|
|
|
134037
134047
|
this.ChartBorder; //边框信息
|
|
134038
134048
|
this.ChartFrame; //框架画法
|
|
134039
134049
|
this.Name; //名称
|
|
134040
|
-
this.ClassName='
|
|
134050
|
+
this.ClassName='ChartVScrollbar'; //类名
|
|
134041
134051
|
this.IsDrawFirst=false;
|
|
134042
134052
|
this.GetEventCallback; //获取事件
|
|
134043
134053
|
this.Report;
|
|
@@ -137020,6 +137030,7 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137020
137030
|
|
|
137021
137031
|
//拖拽滚动条
|
|
137022
137032
|
this.DragYScroll=null; //{Start:{x,y}, End:{x, y}}
|
|
137033
|
+
|
|
137023
137034
|
this.IsDestroy=false; //是否已经销毁了
|
|
137024
137035
|
|
|
137025
137036
|
this.ChartDestory=function() //销毁
|
|
@@ -137060,6 +137071,7 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137060
137071
|
this.Data.Data=aryExactQuery.concat(aryFuzzyQuery);
|
|
137061
137072
|
|
|
137062
137073
|
this.ChartPaint[0].SelectedRow=0;
|
|
137074
|
+
this.ChartPaint[0].SizeChange=true;
|
|
137063
137075
|
|
|
137064
137076
|
JSConsole.Chart.Log(`[JSKeyboardChart:Search] search=${strSearch}, source=${this.SourceData.Data.length} match=${this.Data.Data.length}`);
|
|
137065
137077
|
|
|
@@ -137136,6 +137148,12 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137136
137148
|
chart.Data=this.Data;
|
|
137137
137149
|
this.ChartPaint[0]=chart;
|
|
137138
137150
|
|
|
137151
|
+
chart.VScrollbar=new ChartKeyboardVScrollbar();
|
|
137152
|
+
chart.VScrollbar.Frame=this.Frame;
|
|
137153
|
+
chart.VScrollbar.Canvas=this.Canvas;
|
|
137154
|
+
chart.VScrollbar.ChartBorder=this.Frame.ChartBorder;
|
|
137155
|
+
chart.VScrollbar.Report=chart;
|
|
137156
|
+
|
|
137139
137157
|
if (option)
|
|
137140
137158
|
{
|
|
137141
137159
|
|
|
@@ -137387,7 +137405,7 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137387
137405
|
|
|
137388
137406
|
this.UIOnMouseDown=function(e)
|
|
137389
137407
|
{
|
|
137390
|
-
this.
|
|
137408
|
+
this.DragYScroll=null;
|
|
137391
137409
|
this.DragMove={ Click:{ X:e.clientX, Y:e.clientY }, Move:{X:e.clientX, Y:e.clientY}, PreMove:{X:e.clientX, Y:e.clientY } };
|
|
137392
137410
|
|
|
137393
137411
|
var pixelTatio = GetDevicePixelRatio();
|
|
@@ -137406,6 +137424,29 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137406
137424
|
if (clickData.Redraw==true)
|
|
137407
137425
|
this.Draw();
|
|
137408
137426
|
}
|
|
137427
|
+
else if (clickData.Type==5 && e.button==0) //右侧滚动条
|
|
137428
|
+
{
|
|
137429
|
+
var scroll=clickData.VScrollbar;
|
|
137430
|
+
if (scroll.Type==1) //顶部按钮
|
|
137431
|
+
{
|
|
137432
|
+
if (this.MoveYOffset(-1))
|
|
137433
|
+
this.Draw();
|
|
137434
|
+
}
|
|
137435
|
+
else if (scroll.Type==2) //底部按钮
|
|
137436
|
+
{
|
|
137437
|
+
if (this.MoveYOffset(1))
|
|
137438
|
+
this.Draw();
|
|
137439
|
+
}
|
|
137440
|
+
else if (scroll.Type==3) //滚动条
|
|
137441
|
+
{
|
|
137442
|
+
this.DragYScroll={ Click:{X:x, Y:y}, LastMove:{X:x, Y:y} };
|
|
137443
|
+
}
|
|
137444
|
+
else if (scroll.Type==4) //滚动条内部
|
|
137445
|
+
{
|
|
137446
|
+
if (this.SetYOffset(scroll.Pos))
|
|
137447
|
+
this.Draw();
|
|
137448
|
+
}
|
|
137449
|
+
}
|
|
137409
137450
|
}
|
|
137410
137451
|
|
|
137411
137452
|
document.onmousemove=(e)=>{ this.DocOnMouseMove(e); }
|
|
@@ -137451,68 +137492,17 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137451
137492
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
137452
137493
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
137453
137494
|
|
|
137454
|
-
|
|
137455
|
-
|
|
137456
|
-
if (this.DragRow)
|
|
137457
|
-
{
|
|
137458
|
-
var drag=this.DragRow;
|
|
137459
|
-
var moveSetpY=drag.LastMove.Y-e.clientY;
|
|
137460
|
-
if (Math.abs(moveSetpY)<2) return;
|
|
137461
|
-
var reportChart=this.GetReportChart();
|
|
137462
|
-
drag.LastMove.X=e.clientX;
|
|
137463
|
-
drag.LastMove.Y=e.clientY;
|
|
137464
|
-
drag.Inside={X:x, Y:y};
|
|
137465
|
-
|
|
137466
|
-
if (reportChart)
|
|
137467
|
-
{
|
|
137468
|
-
var moveRow=reportChart.OnDrawgRow(x,y,e);
|
|
137469
|
-
if (moveRow )
|
|
137470
|
-
{
|
|
137471
|
-
if (moveRow.Type==2)
|
|
137472
|
-
{
|
|
137473
|
-
if (moveRow.Data.DataIndex!=drag.Data.Row.DataIndex)
|
|
137474
|
-
{
|
|
137475
|
-
drag.MoveRow=moveRow;
|
|
137476
|
-
}
|
|
137477
|
-
}
|
|
137478
|
-
else if (moveRow.Type==7)
|
|
137479
|
-
{
|
|
137480
|
-
var pageStatus=reportChart.GetCurrentPageStatus();
|
|
137481
|
-
if (!pageStatus.IsEnd)
|
|
137482
|
-
{
|
|
137483
|
-
this.MoveYOffset(1, false);
|
|
137484
|
-
drag.MoveRow=null;
|
|
137485
|
-
|
|
137486
|
-
this.EnablePageScroll=true;
|
|
137487
|
-
this.AutoScrollPage(2);
|
|
137488
|
-
}
|
|
137489
|
-
}
|
|
137490
|
-
else if (moveRow.Type==5)
|
|
137491
|
-
{
|
|
137492
|
-
if (this.Data.YOffset>0)
|
|
137493
|
-
{
|
|
137494
|
-
this.MoveYOffset(-1, false);
|
|
137495
|
-
drag.MoveRow=null;
|
|
137496
|
-
|
|
137497
|
-
this.EnablePageScroll=true;
|
|
137498
|
-
this.AutoScrollPage(-2);
|
|
137499
|
-
}
|
|
137500
|
-
}
|
|
137501
|
-
}
|
|
137502
|
-
reportChart.DragRow=drag;
|
|
137503
|
-
}
|
|
137504
|
-
|
|
137505
|
-
this.Draw();
|
|
137506
|
-
}
|
|
137507
|
-
else if (this.DragXScroll)
|
|
137495
|
+
if (this.DragYScroll)
|
|
137508
137496
|
{
|
|
137509
137497
|
var chart=this.ChartPaint[0];
|
|
137510
|
-
if (!chart || !chart.
|
|
137498
|
+
if (!chart || !chart.VScrollbar) return;
|
|
137511
137499
|
|
|
137512
|
-
this.
|
|
137513
|
-
this.
|
|
137514
|
-
|
|
137515
|
-
|
|
137500
|
+
this.DragYScroll.LastMove.X=x;
|
|
137501
|
+
this.DragYScroll.LastMove.Y=y;
|
|
137502
|
+
|
|
137503
|
+
var pos=chart.VScrollbar.GetScrollPostionByPoint(x,y);
|
|
137504
|
+
if (this.SetYOffset(pos))
|
|
137505
|
+
this.Draw();
|
|
137516
137506
|
}
|
|
137517
137507
|
}
|
|
137518
137508
|
|
|
@@ -137522,6 +137512,8 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137522
137512
|
document.onmousemove=null;
|
|
137523
137513
|
document.onmouseup=null;
|
|
137524
137514
|
|
|
137515
|
+
this.DragYScroll=null;
|
|
137516
|
+
|
|
137525
137517
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYBOARD_MOUSEUP)
|
|
137526
137518
|
if (event && event.Callback)
|
|
137527
137519
|
{
|
|
@@ -137828,6 +137820,21 @@ function JSKeyboardChartContainer(uielement)
|
|
|
137828
137820
|
return result;
|
|
137829
137821
|
}
|
|
137830
137822
|
}
|
|
137823
|
+
|
|
137824
|
+
this.SetYOffset=function(pos)
|
|
137825
|
+
{
|
|
137826
|
+
if (!IFrameSplitOperator.IsNumber(pos)) return false;
|
|
137827
|
+
var chart=this.ChartPaint[0];
|
|
137828
|
+
if (!chart) return false;
|
|
137829
|
+
|
|
137830
|
+
var maxOffset=chart.GetYScrollRange();
|
|
137831
|
+
if (pos<0) pos=0;
|
|
137832
|
+
if (pos>maxOffset) pos=maxOffset;
|
|
137833
|
+
|
|
137834
|
+
this.Data.YOffset=pos;
|
|
137835
|
+
|
|
137836
|
+
return true;
|
|
137837
|
+
}
|
|
137831
137838
|
}
|
|
137832
137839
|
|
|
137833
137840
|
function JSKeyboardFrame()
|
|
@@ -137837,14 +137844,14 @@ function JSKeyboardFrame()
|
|
|
137837
137844
|
|
|
137838
137845
|
this.BorderLine=null; //1=上 2=下 4=左 8=右
|
|
137839
137846
|
|
|
137840
|
-
this.BorderColor=g_JSChartResource.
|
|
137847
|
+
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
137841
137848
|
|
|
137842
137849
|
this.LogoTextColor=g_JSChartResource.FrameLogo.TextColor;
|
|
137843
137850
|
this.LogoTextFont=g_JSChartResource.FrameLogo.Font;
|
|
137844
137851
|
|
|
137845
|
-
this.ReloadResource=function(
|
|
137852
|
+
this.ReloadResource=function(option)
|
|
137846
137853
|
{
|
|
137847
|
-
this.BorderColor=g_JSChartResource.
|
|
137854
|
+
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
137848
137855
|
this.LogoTextColor=g_JSChartResource.FrameLogo.TextColor;
|
|
137849
137856
|
this.LogoTextFont=g_JSChartResource.FrameLogo.Font;
|
|
137850
137857
|
}
|
|
@@ -137941,10 +137948,12 @@ function ChartSymbolList()
|
|
|
137941
137948
|
this.IsDrawBorder=false; //是否绘制单元格边框
|
|
137942
137949
|
|
|
137943
137950
|
this.ShowSymbol=[]; //显示的股票列表 { Index:序号(排序用), Symbol:股票代码 }
|
|
137951
|
+
|
|
137952
|
+
this.VScrollbar; //竖向滚动条
|
|
137944
137953
|
|
|
137945
137954
|
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
137946
137955
|
this.SelectedColor=g_JSChartResource.Keyboard.SelectedColor; //选中行
|
|
137947
|
-
this.TextColor=g_JSChartResource.Keyboard.TextColor;
|
|
137956
|
+
this.TextColor=g_JSChartResource.Keyboard.TextColor; //文字颜色
|
|
137948
137957
|
|
|
137949
137958
|
//表格内容配置
|
|
137950
137959
|
this.ItemFontConfig={ Size:g_JSChartResource.Keyboard.Item.Font.Size, Name:g_JSChartResource.Keyboard.Item.Font.Name };
|
|
@@ -137977,7 +137986,11 @@ function ChartSymbolList()
|
|
|
137977
137986
|
|
|
137978
137987
|
this.ReloadResource=function(resource)
|
|
137979
137988
|
{
|
|
137980
|
-
|
|
137989
|
+
this.BorderColor=g_JSChartResource.Keyboard.BorderColor; //边框线
|
|
137990
|
+
this.SelectedColor=g_JSChartResource.Keyboard.SelectedColor; //选中行
|
|
137991
|
+
this.TextColor=g_JSChartResource.Keyboard.TextColor; //文字颜色
|
|
137992
|
+
|
|
137993
|
+
if (this.VScrollbar) this.VScrollbar.ReloadResource(resource);
|
|
137981
137994
|
}
|
|
137982
137995
|
|
|
137983
137996
|
this.SetColumn=function(aryColumn)
|
|
@@ -137992,6 +138005,7 @@ function ChartSymbolList()
|
|
|
137992
138005
|
if (this.SizeChange) this.CalculateSize();
|
|
137993
138006
|
else this.UpdateCacheData();
|
|
137994
138007
|
|
|
138008
|
+
var bShowVScrollbar=this.IsShowVScrollbar();
|
|
137995
138009
|
this.Canvas.save();
|
|
137996
138010
|
|
|
137997
138011
|
this.Canvas.beginPath();
|
|
@@ -138004,6 +138018,12 @@ function ChartSymbolList()
|
|
|
138004
138018
|
|
|
138005
138019
|
this.DrawBorder();
|
|
138006
138020
|
|
|
138021
|
+
if (this.VScrollbar && bShowVScrollbar)
|
|
138022
|
+
{
|
|
138023
|
+
var bottom=this.ChartBorder.GetBottom();
|
|
138024
|
+
this.VScrollbar.DrawScrollbar(this.RectClient.Left,this.RectClient.Top+2, this.RectClient.Right+this.VScrollbar.ButtonSize+2, bottom-2);
|
|
138025
|
+
}
|
|
138026
|
+
|
|
138007
138027
|
this.SizeChange=false;
|
|
138008
138028
|
}
|
|
138009
138029
|
|
|
@@ -138014,6 +138034,12 @@ function ChartSymbolList()
|
|
|
138014
138034
|
this.RectClient.Right=this.ChartBorder.GetRight();
|
|
138015
138035
|
this.RectClient.Top=this.ChartBorder.GetTop();
|
|
138016
138036
|
this.RectClient.Bottom=this.ChartBorder.GetBottom();
|
|
138037
|
+
|
|
138038
|
+
var bShowVScrollbar=this.IsShowVScrollbar();
|
|
138039
|
+
if (bShowVScrollbar && this.VScrollbar && this.VScrollbar.Enable)
|
|
138040
|
+
{
|
|
138041
|
+
this.RectClient.Right-=(this.VScrollbar.ButtonSize+2);
|
|
138042
|
+
}
|
|
138017
138043
|
}
|
|
138018
138044
|
|
|
138019
138045
|
this.GetPageSize=function(recalculate) //recalculate 是否重新计算
|
|
@@ -138047,6 +138073,8 @@ function ChartSymbolList()
|
|
|
138047
138073
|
|
|
138048
138074
|
this.CalculateSize=function() //计算大小
|
|
138049
138075
|
{
|
|
138076
|
+
if (this.VScrollbar && this.VScrollbar.Enable) this.VScrollbar.CalculateSize();
|
|
138077
|
+
|
|
138050
138078
|
this.UpdateCacheData();
|
|
138051
138079
|
|
|
138052
138080
|
var pixelRatio=GetDevicePixelRatio();
|
|
@@ -138241,6 +138269,7 @@ function ChartSymbolList()
|
|
|
138241
138269
|
else if (textAlign=='right')
|
|
138242
138270
|
{
|
|
138243
138271
|
x=left+width-2;
|
|
138272
|
+
if (left+width-2>this.RectClient.Right) x=this.RectClient.Right-2;
|
|
138244
138273
|
this.Canvas.textAlign="right";
|
|
138245
138274
|
}
|
|
138246
138275
|
else
|
|
@@ -138295,6 +138324,12 @@ function ChartSymbolList()
|
|
|
138295
138324
|
else
|
|
138296
138325
|
var uiElement={Left:null, Top:null};
|
|
138297
138326
|
|
|
138327
|
+
if (this.VScrollbar)
|
|
138328
|
+
{
|
|
138329
|
+
var item=this.VScrollbar.OnMouseDown(x,y,e);
|
|
138330
|
+
if (item) return { Type:5, VScrollbar:item }; //右侧滚动条
|
|
138331
|
+
}
|
|
138332
|
+
|
|
138298
138333
|
var row=this.PtInBody(x,y);
|
|
138299
138334
|
if (row)
|
|
138300
138335
|
{
|
|
@@ -138455,6 +138490,57 @@ function ChartSymbolList()
|
|
|
138455
138490
|
event.Callback(event,data,this);
|
|
138456
138491
|
}
|
|
138457
138492
|
}
|
|
138493
|
+
|
|
138494
|
+
this.GetYScrollRange=function()
|
|
138495
|
+
{
|
|
138496
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return 0;
|
|
138497
|
+
|
|
138498
|
+
var maxOffset=this.Data.Data.length-this.RowCount;
|
|
138499
|
+
|
|
138500
|
+
return maxOffset;
|
|
138501
|
+
}
|
|
138502
|
+
|
|
138503
|
+
//大于1屏数据 显示滚动条
|
|
138504
|
+
this.IsShowVScrollbar=function()
|
|
138505
|
+
{
|
|
138506
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return false;
|
|
138507
|
+
|
|
138508
|
+
return this.Data.Data.length>this.RowCount;
|
|
138509
|
+
}
|
|
138510
|
+
}
|
|
138511
|
+
|
|
138512
|
+
//纵向滚动条
|
|
138513
|
+
function ChartKeyboardVScrollbar()
|
|
138514
|
+
{
|
|
138515
|
+
this.newMethod=ChartVScrollbar; //派生
|
|
138516
|
+
this.newMethod();
|
|
138517
|
+
delete this.newMethod;
|
|
138518
|
+
|
|
138519
|
+
this.ClassName='ChartKeyboardVScrollbar';
|
|
138520
|
+
this.Enable=true;
|
|
138521
|
+
|
|
138522
|
+
this.ScrollBarHeight=g_JSChartResource.Keyboard.VScrollbar.ScrollBarHeight;
|
|
138523
|
+
this.ButtonColor=g_JSChartResource.Keyboard.VScrollbar.ButtonColor;
|
|
138524
|
+
this.BarColor=g_JSChartResource.Keyboard.VScrollbar.BarColor;
|
|
138525
|
+
this.BorderColor=g_JSChartResource.Keyboard.VScrollbar.BorderColor;
|
|
138526
|
+
this.BGColor=g_JSChartResource.Keyboard.VScrollbar.BGColor;
|
|
138527
|
+
this.Mergin={ Left:2, Right:2, Top:2, Bottom:2 };
|
|
138528
|
+
this.BarWithConfig={ Size:g_JSChartResource.Keyboard.VScrollbar.BarWidth.Size };
|
|
138529
|
+
|
|
138530
|
+
this.ReloadResource=function(resource)
|
|
138531
|
+
{
|
|
138532
|
+
this.ScrollBarHeight=g_JSChartResource.Keyboard.VScrollbar.ScrollBarHeight;
|
|
138533
|
+
this.ButtonColor=g_JSChartResource.Keyboard.VScrollbar.ButtonColor;
|
|
138534
|
+
this.BarColor=g_JSChartResource.Keyboard.VScrollbar.BarColor;
|
|
138535
|
+
this.BorderColor=g_JSChartResource.Keyboard.VScrollbar.BorderColor;
|
|
138536
|
+
this.BGColor=g_JSChartResource.Keyboard.VScrollbar.BGColor;
|
|
138537
|
+
this.BarWithConfig={ Size:g_JSChartResource.Keyboard.VScrollbar.BarWidth.Size };
|
|
138538
|
+
}
|
|
138539
|
+
|
|
138540
|
+
this.IsShowCallback=function()
|
|
138541
|
+
{
|
|
138542
|
+
return true;
|
|
138543
|
+
}
|
|
138458
138544
|
}
|
|
138459
138545
|
|
|
138460
138546
|
/*
|
|
@@ -142001,7 +142087,7 @@ function HQChartScriptWorker()
|
|
|
142001
142087
|
|
|
142002
142088
|
|
|
142003
142089
|
|
|
142004
|
-
var HQCHART_VERSION="1.1.
|
|
142090
|
+
var HQCHART_VERSION="1.1.13681";
|
|
142005
142091
|
|
|
142006
142092
|
function PrintHQChartVersion()
|
|
142007
142093
|
{
|