hqchart 1.1.14784 → 1.1.14790
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 +122 -118
- package/package.json +1 -1
- package/src/jscommon/umychart.deal.js +131 -17
- package/src/jscommon/umychart.js +5 -1
- package/src/jscommon/umychart.style.js +2 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +139 -20
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +139 -20
|
@@ -79757,6 +79757,8 @@ function JSChartResource()
|
|
|
79757
79757
|
Selected:
|
|
79758
79758
|
{
|
|
79759
79759
|
BGColor:"rgb(180,240,240)",
|
|
79760
|
+
LineColor:"rgb(128,128,128)",
|
|
79761
|
+
LineWidth:2,
|
|
79760
79762
|
}
|
|
79761
79763
|
},
|
|
79762
79764
|
|
|
@@ -80876,6 +80878,8 @@ function JSChartResource()
|
|
|
80876
80878
|
{
|
|
80877
80879
|
var subItem=item.Selected;
|
|
80878
80880
|
if (subItem.BGColor) this.DealList.Selected.BGColor=subItem.BGColor;
|
|
80881
|
+
if (subItem.LineColor) this.DealList.Selected.LineColor=subItem.LineColor;
|
|
80882
|
+
if (IFrameSplitOperator.IsPlusNumber(subItem.LineWidth)) this.DealList.Selected.LineWidth=subItem.LineWidth;
|
|
80879
80883
|
}
|
|
80880
80884
|
}
|
|
80881
80885
|
|
|
@@ -80890,7 +80894,7 @@ function JSChartResource()
|
|
|
80890
80894
|
if (IFrameSplitOperator.IsNumber(item.Radius)) this.SelectedChart.Radius=item.Radius;
|
|
80891
80895
|
if (IFrameSplitOperator.IsNumber(item.MinSpace)) this.SelectedChart.MinSpace=item.MinSpace;
|
|
80892
80896
|
if (item.LineColor) this.SelectedChart.LineColor=item.LineColor;
|
|
80893
|
-
if (item.
|
|
80897
|
+
if (item.BGColor) this.SelectedChart.BGColor=item.BGColor;
|
|
80894
80898
|
}
|
|
80895
80899
|
|
|
80896
80900
|
if (style.DragMovePaint)
|
|
@@ -133551,7 +133555,8 @@ function GetBlackStyle()
|
|
|
133551
133555
|
|
|
133552
133556
|
Selected:
|
|
133553
133557
|
{
|
|
133554
|
-
BGColor:"
|
|
133558
|
+
BGColor:"rgba(49,48,56,0.7)",
|
|
133559
|
+
LineColor:"rgb(220,220,220)",
|
|
133555
133560
|
}
|
|
133556
133561
|
},
|
|
133557
133562
|
|
|
@@ -133867,6 +133872,7 @@ function JSDealChart(divElement)
|
|
|
133867
133872
|
{
|
|
133868
133873
|
this.DivElement=divElement;
|
|
133869
133874
|
this.JSChartContainer; //表格控件
|
|
133875
|
+
this.ResizeListener; //大小变动监听
|
|
133870
133876
|
|
|
133871
133877
|
//h5 canvas
|
|
133872
133878
|
this.CanvasElement=document.createElement("canvas");
|
|
@@ -133923,6 +133929,8 @@ function JSDealChart(divElement)
|
|
|
133923
133929
|
}
|
|
133924
133930
|
}
|
|
133925
133931
|
|
|
133932
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
133933
|
+
|
|
133926
133934
|
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
133927
133935
|
if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
|
|
133928
133936
|
|
|
@@ -133936,6 +133944,19 @@ function JSDealChart(divElement)
|
|
|
133936
133944
|
}
|
|
133937
133945
|
}
|
|
133938
133946
|
|
|
133947
|
+
this.CreateResizeListener=function()
|
|
133948
|
+
{
|
|
133949
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
133950
|
+
this.ResizeListener.observe(this.DivElement);
|
|
133951
|
+
}
|
|
133952
|
+
|
|
133953
|
+
this.OnDivResize=function(entries)
|
|
133954
|
+
{
|
|
133955
|
+
JSConsole.Chart.Log("[JSDealChart::OnDivResize] entries=", entries);
|
|
133956
|
+
this.OnSize();
|
|
133957
|
+
}
|
|
133958
|
+
|
|
133959
|
+
|
|
133939
133960
|
this.CreateJSDealChartContainer=function(option)
|
|
133940
133961
|
{
|
|
133941
133962
|
var chart=new JSDealChartContainer(this.CanvasElement);
|
|
@@ -133953,6 +133974,12 @@ function JSDealChart(divElement)
|
|
|
133953
133974
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
133954
133975
|
if (IFrameSplitOperator.IsBool(option.EnableFilter)) chart.EnableFilter=option.EnableFilter;
|
|
133955
133976
|
|
|
133977
|
+
var dealChart=chart.GetDealChart();
|
|
133978
|
+
if (dealChart)
|
|
133979
|
+
{
|
|
133980
|
+
if (IFrameSplitOperator.IsNumber(option.SelectedStyle)) dealChart.SelectedStyle=option.SelectedStyle;
|
|
133981
|
+
}
|
|
133982
|
+
|
|
133956
133983
|
//注册事件
|
|
133957
133984
|
if (option.EventCallback)
|
|
133958
133985
|
{
|
|
@@ -134489,12 +134516,17 @@ function JSDealChartContainer(uielement)
|
|
|
134489
134516
|
}
|
|
134490
134517
|
}
|
|
134491
134518
|
|
|
134519
|
+
this.GetDealChart=function()
|
|
134520
|
+
{
|
|
134521
|
+
return this.ChartPaint[0];
|
|
134522
|
+
}
|
|
134523
|
+
|
|
134492
134524
|
this.RecvDealUpdateData=function(data)
|
|
134493
134525
|
{
|
|
134494
134526
|
var aryDeal=JSDealChartContainer.JsonDataToDealData(data);
|
|
134495
134527
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryDeal)) return;
|
|
134496
134528
|
|
|
134497
|
-
var chart=this.
|
|
134529
|
+
var chart=this.GetDealChart();
|
|
134498
134530
|
if (!chart) return;
|
|
134499
134531
|
|
|
134500
134532
|
if (data.UpdateType===1) //全量更新
|
|
@@ -134565,7 +134597,14 @@ function JSDealChartContainer(uielement)
|
|
|
134565
134597
|
|
|
134566
134598
|
var self = this;
|
|
134567
134599
|
var marketStatus=MARKET_SUFFIX_NAME.GetMarketStatus(this.Symbol);
|
|
134568
|
-
if (marketStatus==0 || marketStatus==3)
|
|
134600
|
+
if (marketStatus==0 || marketStatus==3) //闭市,盘后
|
|
134601
|
+
{
|
|
134602
|
+
this.AutoUpdateTimer=setTimeout(function()
|
|
134603
|
+
{
|
|
134604
|
+
self.AutoUpdate();
|
|
134605
|
+
},20000);
|
|
134606
|
+
return;
|
|
134607
|
+
}
|
|
134569
134608
|
|
|
134570
134609
|
var frequency=this.AutoUpdateFrequency;
|
|
134571
134610
|
if (marketStatus==1) //盘前
|
|
@@ -134919,8 +134958,9 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
134919
134958
|
if (item[5]) dealItem.StrTime=item[5];
|
|
134920
134959
|
if (item[6]) dealItem.ID=item[6];
|
|
134921
134960
|
|
|
134922
|
-
if (item[11]) dealItem.Symbol=item[11];
|
|
134923
|
-
if (item[12]) dealItem.Name=item[12];
|
|
134961
|
+
if (item[11]) dealItem.Symbol=item[11]; //股票代码
|
|
134962
|
+
if (item[12]) dealItem.Name=item[12]; //股票名称
|
|
134963
|
+
if (item[13]) dealItem.BGColor=item[13]; //整行颜色
|
|
134924
134964
|
|
|
134925
134965
|
if (item[100]) dealItem.Guid=item[100];
|
|
134926
134966
|
|
|
@@ -135136,7 +135176,8 @@ function ChartDealList()
|
|
|
135136
135176
|
|
|
135137
135177
|
this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
|
|
135138
135178
|
|
|
135139
|
-
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor };
|
|
135179
|
+
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor, LineColor:g_JSChartResource.DealList.Selected.LineColor, LineWidth:g_JSChartResource.DealList.Selected.LineWidth };
|
|
135180
|
+
this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
|
|
135140
135181
|
|
|
135141
135182
|
//表头配置
|
|
135142
135183
|
this.HeaderFontConfig={ Size:g_JSChartResource.DealList.Header.Font.Size, Name:g_JSChartResource.DealList.Header.Font.Name };
|
|
@@ -135458,6 +135499,7 @@ function ChartDealList()
|
|
|
135458
135499
|
var left=this.RectClient.Left+this.HeaderMergin.Left;
|
|
135459
135500
|
var dataCount=this.Data.Data.length;
|
|
135460
135501
|
var index=this.Data.DataOffset;
|
|
135502
|
+
var selectedRowData=null;
|
|
135461
135503
|
|
|
135462
135504
|
if (this.ShowOrder==1)
|
|
135463
135505
|
{
|
|
@@ -135468,17 +135510,37 @@ function ChartDealList()
|
|
|
135468
135510
|
var tableLeft=left+(this.TableWidth*i);
|
|
135469
135511
|
var textLeft=tableLeft;
|
|
135470
135512
|
var textTop=top;
|
|
135471
|
-
|
|
135472
135513
|
for(j=0;j<this.RowCount && index>=0;++j, --index)
|
|
135473
135514
|
{
|
|
135474
135515
|
var dataItem=this.Data.Data[index];
|
|
135475
|
-
this.
|
|
135476
|
-
|
|
135516
|
+
var rtRow={ Left:textLeft-this.HeaderMergin.Left, Top:textTop, Height:this.RowHeight, Width:this.TableWidth };
|
|
135517
|
+
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
135518
|
+
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
135519
|
+
|
|
135520
|
+
if (dataItem.BGColor)
|
|
135521
|
+
{
|
|
135522
|
+
this.Canvas.fillStyle=dataItem.BGColor;
|
|
135523
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
135524
|
+
}
|
|
135525
|
+
|
|
135526
|
+
if (this.DrawSelectedRow(dataItem, index, rtRow))
|
|
135527
|
+
selectedRowData={ Rect:rtRow };
|
|
135528
|
+
|
|
135477
135529
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
135530
|
+
|
|
135531
|
+
this.AryCellRect.push({ Rect:rtRow, Type:1, DataIndex:index });
|
|
135478
135532
|
|
|
135479
135533
|
textTop+=this.RowHeight;
|
|
135480
135534
|
}
|
|
135481
135535
|
}
|
|
135536
|
+
|
|
135537
|
+
if (selectedRowData && this.SelectedStyle===2)
|
|
135538
|
+
{
|
|
135539
|
+
var rtBG=selectedRowData.Rect;
|
|
135540
|
+
this.Canvas.fillStyle=this.SelectedConfig.LineColor;
|
|
135541
|
+
var lineWidth=this.SelectedConfig.LineWidth;
|
|
135542
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
135543
|
+
}
|
|
135482
135544
|
}
|
|
135483
135545
|
else
|
|
135484
135546
|
{
|
|
@@ -135494,7 +135556,14 @@ function ChartDealList()
|
|
|
135494
135556
|
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
135495
135557
|
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
135496
135558
|
|
|
135497
|
-
|
|
135559
|
+
if (dataItem.BGColor)
|
|
135560
|
+
{
|
|
135561
|
+
this.Canvas.fillStyle=dataItem.BGColor;
|
|
135562
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
135563
|
+
}
|
|
135564
|
+
|
|
135565
|
+
if (this.DrawSelectedRow(dataItem, index, rtRow))
|
|
135566
|
+
selectedRowData={ Rect:rtRow };
|
|
135498
135567
|
|
|
135499
135568
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
135500
135569
|
|
|
@@ -135503,6 +135572,14 @@ function ChartDealList()
|
|
|
135503
135572
|
textTop+=this.RowHeight;
|
|
135504
135573
|
}
|
|
135505
135574
|
}
|
|
135575
|
+
|
|
135576
|
+
if (selectedRowData && this.SelectedStyle===2)
|
|
135577
|
+
{
|
|
135578
|
+
var rtBG=selectedRowData.Rect;
|
|
135579
|
+
this.Canvas.fillStyle=this.SelectedConfig.LineColor;
|
|
135580
|
+
var lineWidth=this.SelectedConfig.LineWidth;
|
|
135581
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
135582
|
+
}
|
|
135506
135583
|
}
|
|
135507
135584
|
}
|
|
135508
135585
|
|
|
@@ -135510,6 +135587,7 @@ function ChartDealList()
|
|
|
135510
135587
|
{
|
|
135511
135588
|
var tableLeft=left;
|
|
135512
135589
|
var tableRight=left+this.TableWidth;
|
|
135590
|
+
var borderRight=this.RectClient.Right;
|
|
135513
135591
|
for(var i=0;i<this.Column.length;++i)
|
|
135514
135592
|
{
|
|
135515
135593
|
var item=this.Column[i];
|
|
@@ -135624,7 +135702,8 @@ function ChartDealList()
|
|
|
135624
135702
|
|
|
135625
135703
|
if (bDrawV2)
|
|
135626
135704
|
{
|
|
135627
|
-
this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
|
|
135705
|
+
//this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
|
|
135706
|
+
this.DrawItemTextV2(drawInfo, rtItem);
|
|
135628
135707
|
}
|
|
135629
135708
|
else
|
|
135630
135709
|
{
|
|
@@ -135737,12 +135816,17 @@ function ChartDealList()
|
|
|
135737
135816
|
|
|
135738
135817
|
this.DrawSelectedRow=function(data, index, rtRow)
|
|
135739
135818
|
{
|
|
135740
|
-
if (!this.SelectedData) return;
|
|
135741
|
-
if (!this.SelectedData.Enable) return;
|
|
135742
|
-
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return;
|
|
135819
|
+
if (!this.SelectedData) return false;
|
|
135820
|
+
if (!this.SelectedData.Enable) return false;
|
|
135821
|
+
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return false;
|
|
135743
135822
|
|
|
135744
|
-
this.
|
|
135745
|
-
|
|
135823
|
+
if ( this.SelectedStyle==1)
|
|
135824
|
+
{
|
|
135825
|
+
this.Canvas.fillStyle=this.SelectedConfig.BGColor;
|
|
135826
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
135827
|
+
}
|
|
135828
|
+
|
|
135829
|
+
return true;
|
|
135746
135830
|
}
|
|
135747
135831
|
|
|
135748
135832
|
this.DrawItemText=function(text, textColor, textAlign, left, top, width)
|
|
@@ -135763,9 +135847,44 @@ function ChartDealList()
|
|
|
135763
135847
|
this.Canvas.textAlign="left";
|
|
135764
135848
|
}
|
|
135765
135849
|
|
|
135766
|
-
this.Canvas.textBaseline="
|
|
135850
|
+
this.Canvas.textBaseline="bottom";
|
|
135767
135851
|
this.Canvas.fillStyle=textColor;
|
|
135768
|
-
if (text) this.Canvas.fillText(text,x,top+this.RowHeight
|
|
135852
|
+
if (text) this.Canvas.fillText(text,x,top+this.RowHeight-2);
|
|
135853
|
+
}
|
|
135854
|
+
|
|
135855
|
+
this.DrawItemTextV2=function(drawInfo, rtItem)
|
|
135856
|
+
{
|
|
135857
|
+
if (drawInfo.BGColor)
|
|
135858
|
+
{
|
|
135859
|
+
this.Canvas.fillStyle=drawInfo.BGColor;
|
|
135860
|
+
this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);
|
|
135861
|
+
}
|
|
135862
|
+
|
|
135863
|
+
if (drawInfo.Text)
|
|
135864
|
+
{
|
|
135865
|
+
var text=drawInfo.Text;
|
|
135866
|
+
var x=rtItem.Left;
|
|
135867
|
+
if (drawInfo.TextAlign=='center')
|
|
135868
|
+
{
|
|
135869
|
+
x=rtItem.Left+rtItem.Width/2;
|
|
135870
|
+
this.Canvas.textAlign="center";
|
|
135871
|
+
}
|
|
135872
|
+
else if (drawInfo.TextAlign=='right')
|
|
135873
|
+
{
|
|
135874
|
+
x=rtItem.Left+rtItem.Width-2;
|
|
135875
|
+
this.Canvas.textAlign="right";
|
|
135876
|
+
}
|
|
135877
|
+
else
|
|
135878
|
+
{
|
|
135879
|
+
x+=2;
|
|
135880
|
+
this.Canvas.textAlign="left";
|
|
135881
|
+
}
|
|
135882
|
+
|
|
135883
|
+
var textWidth=this.Canvas.measureText(text).width+1;
|
|
135884
|
+
this.Canvas.textBaseline="bottom";
|
|
135885
|
+
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
135886
|
+
this.Canvas.fillText(text,x,rtItem.Top+this.RowHeight-2);
|
|
135887
|
+
}
|
|
135769
135888
|
}
|
|
135770
135889
|
|
|
135771
135890
|
this.DrawMultiBar=function(colunmInfo, data, rtItem)
|
|
@@ -160000,7 +160119,7 @@ function HQChartScriptWorker()
|
|
|
160000
160119
|
|
|
160001
160120
|
|
|
160002
160121
|
|
|
160003
|
-
var HQCHART_VERSION="1.1.
|
|
160122
|
+
var HQCHART_VERSION="1.1.14789";
|
|
160004
160123
|
|
|
160005
160124
|
function PrintHQChartVersion()
|
|
160006
160125
|
{
|