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
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ function JSDealChart(divElement)
|
|
|
15
15
|
{
|
|
16
16
|
this.DivElement=divElement;
|
|
17
17
|
this.JSChartContainer; //表格控件
|
|
18
|
+
this.ResizeListener; //大小变动监听
|
|
18
19
|
|
|
19
20
|
//h5 canvas
|
|
20
21
|
this.CanvasElement=document.createElement("canvas");
|
|
@@ -71,6 +72,8 @@ function JSDealChart(divElement)
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
76
|
+
|
|
74
77
|
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
75
78
|
if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
|
|
76
79
|
|
|
@@ -84,6 +87,19 @@ function JSDealChart(divElement)
|
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
|
|
90
|
+
this.CreateResizeListener=function()
|
|
91
|
+
{
|
|
92
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
93
|
+
this.ResizeListener.observe(this.DivElement);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
this.OnDivResize=function(entries)
|
|
97
|
+
{
|
|
98
|
+
JSConsole.Chart.Log("[JSDealChart::OnDivResize] entries=", entries);
|
|
99
|
+
this.OnSize();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
87
103
|
this.CreateJSDealChartContainer=function(option)
|
|
88
104
|
{
|
|
89
105
|
var chart=new JSDealChartContainer(this.CanvasElement);
|
|
@@ -101,6 +117,12 @@ function JSDealChart(divElement)
|
|
|
101
117
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
102
118
|
if (IFrameSplitOperator.IsBool(option.EnableFilter)) chart.EnableFilter=option.EnableFilter;
|
|
103
119
|
|
|
120
|
+
var dealChart=chart.GetDealChart();
|
|
121
|
+
if (dealChart)
|
|
122
|
+
{
|
|
123
|
+
if (IFrameSplitOperator.IsNumber(option.SelectedStyle)) dealChart.SelectedStyle=option.SelectedStyle;
|
|
124
|
+
}
|
|
125
|
+
|
|
104
126
|
//注册事件
|
|
105
127
|
if (option.EventCallback)
|
|
106
128
|
{
|
|
@@ -637,12 +659,17 @@ function JSDealChartContainer(uielement)
|
|
|
637
659
|
}
|
|
638
660
|
}
|
|
639
661
|
|
|
662
|
+
this.GetDealChart=function()
|
|
663
|
+
{
|
|
664
|
+
return this.ChartPaint[0];
|
|
665
|
+
}
|
|
666
|
+
|
|
640
667
|
this.RecvDealUpdateData=function(data)
|
|
641
668
|
{
|
|
642
669
|
var aryDeal=JSDealChartContainer.JsonDataToDealData(data);
|
|
643
670
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryDeal)) return;
|
|
644
671
|
|
|
645
|
-
var chart=this.
|
|
672
|
+
var chart=this.GetDealChart();
|
|
646
673
|
if (!chart) return;
|
|
647
674
|
|
|
648
675
|
if (data.UpdateType===1) //全量更新
|
|
@@ -713,7 +740,14 @@ function JSDealChartContainer(uielement)
|
|
|
713
740
|
|
|
714
741
|
var self = this;
|
|
715
742
|
var marketStatus=MARKET_SUFFIX_NAME.GetMarketStatus(this.Symbol);
|
|
716
|
-
if (marketStatus==0 || marketStatus==3)
|
|
743
|
+
if (marketStatus==0 || marketStatus==3) //闭市,盘后
|
|
744
|
+
{
|
|
745
|
+
this.AutoUpdateTimer=setTimeout(function()
|
|
746
|
+
{
|
|
747
|
+
self.AutoUpdate();
|
|
748
|
+
},20000);
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
717
751
|
|
|
718
752
|
var frequency=this.AutoUpdateFrequency;
|
|
719
753
|
if (marketStatus==1) //盘前
|
|
@@ -1067,8 +1101,9 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
1067
1101
|
if (item[5]) dealItem.StrTime=item[5];
|
|
1068
1102
|
if (item[6]) dealItem.ID=item[6];
|
|
1069
1103
|
|
|
1070
|
-
if (item[11]) dealItem.Symbol=item[11];
|
|
1071
|
-
if (item[12]) dealItem.Name=item[12];
|
|
1104
|
+
if (item[11]) dealItem.Symbol=item[11]; //股票代码
|
|
1105
|
+
if (item[12]) dealItem.Name=item[12]; //股票名称
|
|
1106
|
+
if (item[13]) dealItem.BGColor=item[13]; //整行颜色
|
|
1072
1107
|
|
|
1073
1108
|
if (item[100]) dealItem.Guid=item[100];
|
|
1074
1109
|
|
|
@@ -1284,7 +1319,8 @@ function ChartDealList()
|
|
|
1284
1319
|
|
|
1285
1320
|
this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
|
|
1286
1321
|
|
|
1287
|
-
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor };
|
|
1322
|
+
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor, LineColor:g_JSChartResource.DealList.Selected.LineColor, LineWidth:g_JSChartResource.DealList.Selected.LineWidth };
|
|
1323
|
+
this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
|
|
1288
1324
|
|
|
1289
1325
|
//表头配置
|
|
1290
1326
|
this.HeaderFontConfig={ Size:g_JSChartResource.DealList.Header.Font.Size, Name:g_JSChartResource.DealList.Header.Font.Name };
|
|
@@ -1606,6 +1642,7 @@ function ChartDealList()
|
|
|
1606
1642
|
var left=this.RectClient.Left+this.HeaderMergin.Left;
|
|
1607
1643
|
var dataCount=this.Data.Data.length;
|
|
1608
1644
|
var index=this.Data.DataOffset;
|
|
1645
|
+
var selectedRowData=null;
|
|
1609
1646
|
|
|
1610
1647
|
if (this.ShowOrder==1)
|
|
1611
1648
|
{
|
|
@@ -1616,17 +1653,37 @@ function ChartDealList()
|
|
|
1616
1653
|
var tableLeft=left+(this.TableWidth*i);
|
|
1617
1654
|
var textLeft=tableLeft;
|
|
1618
1655
|
var textTop=top;
|
|
1619
|
-
|
|
1620
1656
|
for(j=0;j<this.RowCount && index>=0;++j, --index)
|
|
1621
1657
|
{
|
|
1622
1658
|
var dataItem=this.Data.Data[index];
|
|
1623
|
-
this.
|
|
1624
|
-
|
|
1659
|
+
var rtRow={ Left:textLeft-this.HeaderMergin.Left, Top:textTop, Height:this.RowHeight, Width:this.TableWidth };
|
|
1660
|
+
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
1661
|
+
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
1662
|
+
|
|
1663
|
+
if (dataItem.BGColor)
|
|
1664
|
+
{
|
|
1665
|
+
this.Canvas.fillStyle=dataItem.BGColor;
|
|
1666
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
if (this.DrawSelectedRow(dataItem, index, rtRow))
|
|
1670
|
+
selectedRowData={ Rect:rtRow };
|
|
1671
|
+
|
|
1625
1672
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
1673
|
+
|
|
1674
|
+
this.AryCellRect.push({ Rect:rtRow, Type:1, DataIndex:index });
|
|
1626
1675
|
|
|
1627
1676
|
textTop+=this.RowHeight;
|
|
1628
1677
|
}
|
|
1629
1678
|
}
|
|
1679
|
+
|
|
1680
|
+
if (selectedRowData && this.SelectedStyle===2)
|
|
1681
|
+
{
|
|
1682
|
+
var rtBG=selectedRowData.Rect;
|
|
1683
|
+
this.Canvas.fillStyle=this.SelectedConfig.LineColor;
|
|
1684
|
+
var lineWidth=this.SelectedConfig.LineWidth;
|
|
1685
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
1686
|
+
}
|
|
1630
1687
|
}
|
|
1631
1688
|
else
|
|
1632
1689
|
{
|
|
@@ -1642,7 +1699,14 @@ function ChartDealList()
|
|
|
1642
1699
|
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
1643
1700
|
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
1644
1701
|
|
|
1645
|
-
|
|
1702
|
+
if (dataItem.BGColor)
|
|
1703
|
+
{
|
|
1704
|
+
this.Canvas.fillStyle=dataItem.BGColor;
|
|
1705
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
if (this.DrawSelectedRow(dataItem, index, rtRow))
|
|
1709
|
+
selectedRowData={ Rect:rtRow };
|
|
1646
1710
|
|
|
1647
1711
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
1648
1712
|
|
|
@@ -1651,6 +1715,14 @@ function ChartDealList()
|
|
|
1651
1715
|
textTop+=this.RowHeight;
|
|
1652
1716
|
}
|
|
1653
1717
|
}
|
|
1718
|
+
|
|
1719
|
+
if (selectedRowData && this.SelectedStyle===2)
|
|
1720
|
+
{
|
|
1721
|
+
var rtBG=selectedRowData.Rect;
|
|
1722
|
+
this.Canvas.fillStyle=this.SelectedConfig.LineColor;
|
|
1723
|
+
var lineWidth=this.SelectedConfig.LineWidth;
|
|
1724
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
1725
|
+
}
|
|
1654
1726
|
}
|
|
1655
1727
|
}
|
|
1656
1728
|
|
|
@@ -1658,6 +1730,7 @@ function ChartDealList()
|
|
|
1658
1730
|
{
|
|
1659
1731
|
var tableLeft=left;
|
|
1660
1732
|
var tableRight=left+this.TableWidth;
|
|
1733
|
+
var borderRight=this.RectClient.Right;
|
|
1661
1734
|
for(var i=0;i<this.Column.length;++i)
|
|
1662
1735
|
{
|
|
1663
1736
|
var item=this.Column[i];
|
|
@@ -1772,7 +1845,8 @@ function ChartDealList()
|
|
|
1772
1845
|
|
|
1773
1846
|
if (bDrawV2)
|
|
1774
1847
|
{
|
|
1775
|
-
this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
|
|
1848
|
+
//this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
|
|
1849
|
+
this.DrawItemTextV2(drawInfo, rtItem);
|
|
1776
1850
|
}
|
|
1777
1851
|
else
|
|
1778
1852
|
{
|
|
@@ -1885,12 +1959,17 @@ function ChartDealList()
|
|
|
1885
1959
|
|
|
1886
1960
|
this.DrawSelectedRow=function(data, index, rtRow)
|
|
1887
1961
|
{
|
|
1888
|
-
if (!this.SelectedData) return;
|
|
1889
|
-
if (!this.SelectedData.Enable) return;
|
|
1890
|
-
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return;
|
|
1962
|
+
if (!this.SelectedData) return false;
|
|
1963
|
+
if (!this.SelectedData.Enable) return false;
|
|
1964
|
+
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return false;
|
|
1891
1965
|
|
|
1892
|
-
this.
|
|
1893
|
-
|
|
1966
|
+
if ( this.SelectedStyle==1)
|
|
1967
|
+
{
|
|
1968
|
+
this.Canvas.fillStyle=this.SelectedConfig.BGColor;
|
|
1969
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
return true;
|
|
1894
1973
|
}
|
|
1895
1974
|
|
|
1896
1975
|
this.DrawItemText=function(text, textColor, textAlign, left, top, width)
|
|
@@ -1911,9 +1990,44 @@ function ChartDealList()
|
|
|
1911
1990
|
this.Canvas.textAlign="left";
|
|
1912
1991
|
}
|
|
1913
1992
|
|
|
1914
|
-
this.Canvas.textBaseline="
|
|
1993
|
+
this.Canvas.textBaseline="bottom";
|
|
1915
1994
|
this.Canvas.fillStyle=textColor;
|
|
1916
|
-
if (text) this.Canvas.fillText(text,x,top+this.RowHeight
|
|
1995
|
+
if (text) this.Canvas.fillText(text,x,top+this.RowHeight-2);
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
this.DrawItemTextV2=function(drawInfo, rtItem)
|
|
1999
|
+
{
|
|
2000
|
+
if (drawInfo.BGColor)
|
|
2001
|
+
{
|
|
2002
|
+
this.Canvas.fillStyle=drawInfo.BGColor;
|
|
2003
|
+
this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
if (drawInfo.Text)
|
|
2007
|
+
{
|
|
2008
|
+
var text=drawInfo.Text;
|
|
2009
|
+
var x=rtItem.Left;
|
|
2010
|
+
if (drawInfo.TextAlign=='center')
|
|
2011
|
+
{
|
|
2012
|
+
x=rtItem.Left+rtItem.Width/2;
|
|
2013
|
+
this.Canvas.textAlign="center";
|
|
2014
|
+
}
|
|
2015
|
+
else if (drawInfo.TextAlign=='right')
|
|
2016
|
+
{
|
|
2017
|
+
x=rtItem.Left+rtItem.Width-2;
|
|
2018
|
+
this.Canvas.textAlign="right";
|
|
2019
|
+
}
|
|
2020
|
+
else
|
|
2021
|
+
{
|
|
2022
|
+
x+=2;
|
|
2023
|
+
this.Canvas.textAlign="left";
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
var textWidth=this.Canvas.measureText(text).width+1;
|
|
2027
|
+
this.Canvas.textBaseline="bottom";
|
|
2028
|
+
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
2029
|
+
this.Canvas.fillText(text,x,rtItem.Top+this.RowHeight-2);
|
|
2030
|
+
}
|
|
1917
2031
|
}
|
|
1918
2032
|
|
|
1919
2033
|
this.DrawMultiBar=function(colunmInfo, data, rtItem)
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -75617,6 +75617,8 @@ function JSChartResource()
|
|
|
75617
75617
|
Selected:
|
|
75618
75618
|
{
|
|
75619
75619
|
BGColor:"rgb(180,240,240)",
|
|
75620
|
+
LineColor:"rgb(128,128,128)",
|
|
75621
|
+
LineWidth:2,
|
|
75620
75622
|
}
|
|
75621
75623
|
},
|
|
75622
75624
|
|
|
@@ -76736,6 +76738,8 @@ function JSChartResource()
|
|
|
76736
76738
|
{
|
|
76737
76739
|
var subItem=item.Selected;
|
|
76738
76740
|
if (subItem.BGColor) this.DealList.Selected.BGColor=subItem.BGColor;
|
|
76741
|
+
if (subItem.LineColor) this.DealList.Selected.LineColor=subItem.LineColor;
|
|
76742
|
+
if (IFrameSplitOperator.IsPlusNumber(subItem.LineWidth)) this.DealList.Selected.LineWidth=subItem.LineWidth;
|
|
76739
76743
|
}
|
|
76740
76744
|
}
|
|
76741
76745
|
|
|
@@ -76750,7 +76754,7 @@ function JSChartResource()
|
|
|
76750
76754
|
if (IFrameSplitOperator.IsNumber(item.Radius)) this.SelectedChart.Radius=item.Radius;
|
|
76751
76755
|
if (IFrameSplitOperator.IsNumber(item.MinSpace)) this.SelectedChart.MinSpace=item.MinSpace;
|
|
76752
76756
|
if (item.LineColor) this.SelectedChart.LineColor=item.LineColor;
|
|
76753
|
-
if (item.
|
|
76757
|
+
if (item.BGColor) this.SelectedChart.BGColor=item.BGColor;
|
|
76754
76758
|
}
|
|
76755
76759
|
|
|
76756
76760
|
if (style.DragMovePaint)
|
|
@@ -79713,6 +79713,8 @@ function JSChartResource()
|
|
|
79713
79713
|
Selected:
|
|
79714
79714
|
{
|
|
79715
79715
|
BGColor:"rgb(180,240,240)",
|
|
79716
|
+
LineColor:"rgb(128,128,128)",
|
|
79717
|
+
LineWidth:2,
|
|
79716
79718
|
}
|
|
79717
79719
|
},
|
|
79718
79720
|
|
|
@@ -80832,6 +80834,8 @@ function JSChartResource()
|
|
|
80832
80834
|
{
|
|
80833
80835
|
var subItem=item.Selected;
|
|
80834
80836
|
if (subItem.BGColor) this.DealList.Selected.BGColor=subItem.BGColor;
|
|
80837
|
+
if (subItem.LineColor) this.DealList.Selected.LineColor=subItem.LineColor;
|
|
80838
|
+
if (IFrameSplitOperator.IsPlusNumber(subItem.LineWidth)) this.DealList.Selected.LineWidth=subItem.LineWidth;
|
|
80835
80839
|
}
|
|
80836
80840
|
}
|
|
80837
80841
|
|
|
@@ -80846,7 +80850,7 @@ function JSChartResource()
|
|
|
80846
80850
|
if (IFrameSplitOperator.IsNumber(item.Radius)) this.SelectedChart.Radius=item.Radius;
|
|
80847
80851
|
if (IFrameSplitOperator.IsNumber(item.MinSpace)) this.SelectedChart.MinSpace=item.MinSpace;
|
|
80848
80852
|
if (item.LineColor) this.SelectedChart.LineColor=item.LineColor;
|
|
80849
|
-
if (item.
|
|
80853
|
+
if (item.BGColor) this.SelectedChart.BGColor=item.BGColor;
|
|
80850
80854
|
}
|
|
80851
80855
|
|
|
80852
80856
|
if (style.DragMovePaint)
|
|
@@ -133507,7 +133511,8 @@ function GetBlackStyle()
|
|
|
133507
133511
|
|
|
133508
133512
|
Selected:
|
|
133509
133513
|
{
|
|
133510
|
-
BGColor:"
|
|
133514
|
+
BGColor:"rgba(49,48,56,0.7)",
|
|
133515
|
+
LineColor:"rgb(220,220,220)",
|
|
133511
133516
|
}
|
|
133512
133517
|
},
|
|
133513
133518
|
|
|
@@ -133823,6 +133828,7 @@ function JSDealChart(divElement)
|
|
|
133823
133828
|
{
|
|
133824
133829
|
this.DivElement=divElement;
|
|
133825
133830
|
this.JSChartContainer; //表格控件
|
|
133831
|
+
this.ResizeListener; //大小变动监听
|
|
133826
133832
|
|
|
133827
133833
|
//h5 canvas
|
|
133828
133834
|
this.CanvasElement=document.createElement("canvas");
|
|
@@ -133879,6 +133885,8 @@ function JSDealChart(divElement)
|
|
|
133879
133885
|
}
|
|
133880
133886
|
}
|
|
133881
133887
|
|
|
133888
|
+
if (option.EnableResize==true) this.CreateResizeListener();
|
|
133889
|
+
|
|
133882
133890
|
if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
|
|
133883
133891
|
if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
|
|
133884
133892
|
|
|
@@ -133892,6 +133900,19 @@ function JSDealChart(divElement)
|
|
|
133892
133900
|
}
|
|
133893
133901
|
}
|
|
133894
133902
|
|
|
133903
|
+
this.CreateResizeListener=function()
|
|
133904
|
+
{
|
|
133905
|
+
this.ResizeListener = new ResizeObserver((entries)=>{ this.OnDivResize(entries); });
|
|
133906
|
+
this.ResizeListener.observe(this.DivElement);
|
|
133907
|
+
}
|
|
133908
|
+
|
|
133909
|
+
this.OnDivResize=function(entries)
|
|
133910
|
+
{
|
|
133911
|
+
JSConsole.Chart.Log("[JSDealChart::OnDivResize] entries=", entries);
|
|
133912
|
+
this.OnSize();
|
|
133913
|
+
}
|
|
133914
|
+
|
|
133915
|
+
|
|
133895
133916
|
this.CreateJSDealChartContainer=function(option)
|
|
133896
133917
|
{
|
|
133897
133918
|
var chart=new JSDealChartContainer(this.CanvasElement);
|
|
@@ -133909,6 +133930,12 @@ function JSDealChart(divElement)
|
|
|
133909
133930
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
133910
133931
|
if (IFrameSplitOperator.IsBool(option.EnableFilter)) chart.EnableFilter=option.EnableFilter;
|
|
133911
133932
|
|
|
133933
|
+
var dealChart=chart.GetDealChart();
|
|
133934
|
+
if (dealChart)
|
|
133935
|
+
{
|
|
133936
|
+
if (IFrameSplitOperator.IsNumber(option.SelectedStyle)) dealChart.SelectedStyle=option.SelectedStyle;
|
|
133937
|
+
}
|
|
133938
|
+
|
|
133912
133939
|
//注册事件
|
|
133913
133940
|
if (option.EventCallback)
|
|
133914
133941
|
{
|
|
@@ -134445,12 +134472,17 @@ function JSDealChartContainer(uielement)
|
|
|
134445
134472
|
}
|
|
134446
134473
|
}
|
|
134447
134474
|
|
|
134475
|
+
this.GetDealChart=function()
|
|
134476
|
+
{
|
|
134477
|
+
return this.ChartPaint[0];
|
|
134478
|
+
}
|
|
134479
|
+
|
|
134448
134480
|
this.RecvDealUpdateData=function(data)
|
|
134449
134481
|
{
|
|
134450
134482
|
var aryDeal=JSDealChartContainer.JsonDataToDealData(data);
|
|
134451
134483
|
if (!IFrameSplitOperator.IsNonEmptyArray(aryDeal)) return;
|
|
134452
134484
|
|
|
134453
|
-
var chart=this.
|
|
134485
|
+
var chart=this.GetDealChart();
|
|
134454
134486
|
if (!chart) return;
|
|
134455
134487
|
|
|
134456
134488
|
if (data.UpdateType===1) //全量更新
|
|
@@ -134521,7 +134553,14 @@ function JSDealChartContainer(uielement)
|
|
|
134521
134553
|
|
|
134522
134554
|
var self = this;
|
|
134523
134555
|
var marketStatus=MARKET_SUFFIX_NAME.GetMarketStatus(this.Symbol);
|
|
134524
|
-
if (marketStatus==0 || marketStatus==3)
|
|
134556
|
+
if (marketStatus==0 || marketStatus==3) //闭市,盘后
|
|
134557
|
+
{
|
|
134558
|
+
this.AutoUpdateTimer=setTimeout(function()
|
|
134559
|
+
{
|
|
134560
|
+
self.AutoUpdate();
|
|
134561
|
+
},20000);
|
|
134562
|
+
return;
|
|
134563
|
+
}
|
|
134525
134564
|
|
|
134526
134565
|
var frequency=this.AutoUpdateFrequency;
|
|
134527
134566
|
if (marketStatus==1) //盘前
|
|
@@ -134875,8 +134914,9 @@ JSDealChartContainer.JsonDataToDealData=function(data)
|
|
|
134875
134914
|
if (item[5]) dealItem.StrTime=item[5];
|
|
134876
134915
|
if (item[6]) dealItem.ID=item[6];
|
|
134877
134916
|
|
|
134878
|
-
if (item[11]) dealItem.Symbol=item[11];
|
|
134879
|
-
if (item[12]) dealItem.Name=item[12];
|
|
134917
|
+
if (item[11]) dealItem.Symbol=item[11]; //股票代码
|
|
134918
|
+
if (item[12]) dealItem.Name=item[12]; //股票名称
|
|
134919
|
+
if (item[13]) dealItem.BGColor=item[13]; //整行颜色
|
|
134880
134920
|
|
|
134881
134921
|
if (item[100]) dealItem.Guid=item[100];
|
|
134882
134922
|
|
|
@@ -135092,7 +135132,8 @@ function ChartDealList()
|
|
|
135092
135132
|
|
|
135093
135133
|
this.BorderColor=g_JSChartResource.DealList.BorderColor; //边框线
|
|
135094
135134
|
|
|
135095
|
-
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor };
|
|
135135
|
+
this.SelectedConfig={ BGColor:g_JSChartResource.DealList.Selected.BGColor, LineColor:g_JSChartResource.DealList.Selected.LineColor, LineWidth:g_JSChartResource.DealList.Selected.LineWidth };
|
|
135136
|
+
this.SelectedStyle=1; //选中行样式 1=整行填充 2=底部绘制直线
|
|
135096
135137
|
|
|
135097
135138
|
//表头配置
|
|
135098
135139
|
this.HeaderFontConfig={ Size:g_JSChartResource.DealList.Header.Font.Size, Name:g_JSChartResource.DealList.Header.Font.Name };
|
|
@@ -135414,6 +135455,7 @@ function ChartDealList()
|
|
|
135414
135455
|
var left=this.RectClient.Left+this.HeaderMergin.Left;
|
|
135415
135456
|
var dataCount=this.Data.Data.length;
|
|
135416
135457
|
var index=this.Data.DataOffset;
|
|
135458
|
+
var selectedRowData=null;
|
|
135417
135459
|
|
|
135418
135460
|
if (this.ShowOrder==1)
|
|
135419
135461
|
{
|
|
@@ -135424,17 +135466,37 @@ function ChartDealList()
|
|
|
135424
135466
|
var tableLeft=left+(this.TableWidth*i);
|
|
135425
135467
|
var textLeft=tableLeft;
|
|
135426
135468
|
var textTop=top;
|
|
135427
|
-
|
|
135428
135469
|
for(j=0;j<this.RowCount && index>=0;++j, --index)
|
|
135429
135470
|
{
|
|
135430
135471
|
var dataItem=this.Data.Data[index];
|
|
135431
|
-
this.
|
|
135432
|
-
|
|
135472
|
+
var rtRow={ Left:textLeft-this.HeaderMergin.Left, Top:textTop, Height:this.RowHeight, Width:this.TableWidth };
|
|
135473
|
+
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
135474
|
+
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
135475
|
+
|
|
135476
|
+
if (dataItem.BGColor)
|
|
135477
|
+
{
|
|
135478
|
+
this.Canvas.fillStyle=dataItem.BGColor;
|
|
135479
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
135480
|
+
}
|
|
135481
|
+
|
|
135482
|
+
if (this.DrawSelectedRow(dataItem, index, rtRow))
|
|
135483
|
+
selectedRowData={ Rect:rtRow };
|
|
135484
|
+
|
|
135433
135485
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
135486
|
+
|
|
135487
|
+
this.AryCellRect.push({ Rect:rtRow, Type:1, DataIndex:index });
|
|
135434
135488
|
|
|
135435
135489
|
textTop+=this.RowHeight;
|
|
135436
135490
|
}
|
|
135437
135491
|
}
|
|
135492
|
+
|
|
135493
|
+
if (selectedRowData && this.SelectedStyle===2)
|
|
135494
|
+
{
|
|
135495
|
+
var rtBG=selectedRowData.Rect;
|
|
135496
|
+
this.Canvas.fillStyle=this.SelectedConfig.LineColor;
|
|
135497
|
+
var lineWidth=this.SelectedConfig.LineWidth;
|
|
135498
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
135499
|
+
}
|
|
135438
135500
|
}
|
|
135439
135501
|
else
|
|
135440
135502
|
{
|
|
@@ -135450,7 +135512,14 @@ function ChartDealList()
|
|
|
135450
135512
|
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
135451
135513
|
rtRow.Bottom=rtRow.Top+rtRow.Height;
|
|
135452
135514
|
|
|
135453
|
-
|
|
135515
|
+
if (dataItem.BGColor)
|
|
135516
|
+
{
|
|
135517
|
+
this.Canvas.fillStyle=dataItem.BGColor;
|
|
135518
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
135519
|
+
}
|
|
135520
|
+
|
|
135521
|
+
if (this.DrawSelectedRow(dataItem, index, rtRow))
|
|
135522
|
+
selectedRowData={ Rect:rtRow };
|
|
135454
135523
|
|
|
135455
135524
|
this.DrawRow(dataItem, textLeft, textTop, index);
|
|
135456
135525
|
|
|
@@ -135459,6 +135528,14 @@ function ChartDealList()
|
|
|
135459
135528
|
textTop+=this.RowHeight;
|
|
135460
135529
|
}
|
|
135461
135530
|
}
|
|
135531
|
+
|
|
135532
|
+
if (selectedRowData && this.SelectedStyle===2)
|
|
135533
|
+
{
|
|
135534
|
+
var rtBG=selectedRowData.Rect;
|
|
135535
|
+
this.Canvas.fillStyle=this.SelectedConfig.LineColor;
|
|
135536
|
+
var lineWidth=this.SelectedConfig.LineWidth;
|
|
135537
|
+
this.Canvas.fillRect(rtBG.Left,rtBG.Bottom-lineWidth,rtBG.Width,lineWidth);
|
|
135538
|
+
}
|
|
135462
135539
|
}
|
|
135463
135540
|
}
|
|
135464
135541
|
|
|
@@ -135466,6 +135543,7 @@ function ChartDealList()
|
|
|
135466
135543
|
{
|
|
135467
135544
|
var tableLeft=left;
|
|
135468
135545
|
var tableRight=left+this.TableWidth;
|
|
135546
|
+
var borderRight=this.RectClient.Right;
|
|
135469
135547
|
for(var i=0;i<this.Column.length;++i)
|
|
135470
135548
|
{
|
|
135471
135549
|
var item=this.Column[i];
|
|
@@ -135580,7 +135658,8 @@ function ChartDealList()
|
|
|
135580
135658
|
|
|
135581
135659
|
if (bDrawV2)
|
|
135582
135660
|
{
|
|
135583
|
-
this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
|
|
135661
|
+
//this.DrawItemText(drawInfo.Text, drawInfo.TextColor, drawInfo.TextAlign, rtItem.Left, rtItem.Top, rtItem.Width, drawInfo.BGColor);
|
|
135662
|
+
this.DrawItemTextV2(drawInfo, rtItem);
|
|
135584
135663
|
}
|
|
135585
135664
|
else
|
|
135586
135665
|
{
|
|
@@ -135693,12 +135772,17 @@ function ChartDealList()
|
|
|
135693
135772
|
|
|
135694
135773
|
this.DrawSelectedRow=function(data, index, rtRow)
|
|
135695
135774
|
{
|
|
135696
|
-
if (!this.SelectedData) return;
|
|
135697
|
-
if (!this.SelectedData.Enable) return;
|
|
135698
|
-
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return;
|
|
135775
|
+
if (!this.SelectedData) return false;
|
|
135776
|
+
if (!this.SelectedData.Enable) return false;
|
|
135777
|
+
if (!this.SelectedData.Guid || this.SelectedData.Guid!=data.Guid) return false;
|
|
135699
135778
|
|
|
135700
|
-
this.
|
|
135701
|
-
|
|
135779
|
+
if ( this.SelectedStyle==1)
|
|
135780
|
+
{
|
|
135781
|
+
this.Canvas.fillStyle=this.SelectedConfig.BGColor;
|
|
135782
|
+
this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
|
|
135783
|
+
}
|
|
135784
|
+
|
|
135785
|
+
return true;
|
|
135702
135786
|
}
|
|
135703
135787
|
|
|
135704
135788
|
this.DrawItemText=function(text, textColor, textAlign, left, top, width)
|
|
@@ -135719,9 +135803,44 @@ function ChartDealList()
|
|
|
135719
135803
|
this.Canvas.textAlign="left";
|
|
135720
135804
|
}
|
|
135721
135805
|
|
|
135722
|
-
this.Canvas.textBaseline="
|
|
135806
|
+
this.Canvas.textBaseline="bottom";
|
|
135723
135807
|
this.Canvas.fillStyle=textColor;
|
|
135724
|
-
if (text) this.Canvas.fillText(text,x,top+this.RowHeight
|
|
135808
|
+
if (text) this.Canvas.fillText(text,x,top+this.RowHeight-2);
|
|
135809
|
+
}
|
|
135810
|
+
|
|
135811
|
+
this.DrawItemTextV2=function(drawInfo, rtItem)
|
|
135812
|
+
{
|
|
135813
|
+
if (drawInfo.BGColor)
|
|
135814
|
+
{
|
|
135815
|
+
this.Canvas.fillStyle=drawInfo.BGColor;
|
|
135816
|
+
this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);
|
|
135817
|
+
}
|
|
135818
|
+
|
|
135819
|
+
if (drawInfo.Text)
|
|
135820
|
+
{
|
|
135821
|
+
var text=drawInfo.Text;
|
|
135822
|
+
var x=rtItem.Left;
|
|
135823
|
+
if (drawInfo.TextAlign=='center')
|
|
135824
|
+
{
|
|
135825
|
+
x=rtItem.Left+rtItem.Width/2;
|
|
135826
|
+
this.Canvas.textAlign="center";
|
|
135827
|
+
}
|
|
135828
|
+
else if (drawInfo.TextAlign=='right')
|
|
135829
|
+
{
|
|
135830
|
+
x=rtItem.Left+rtItem.Width-2;
|
|
135831
|
+
this.Canvas.textAlign="right";
|
|
135832
|
+
}
|
|
135833
|
+
else
|
|
135834
|
+
{
|
|
135835
|
+
x+=2;
|
|
135836
|
+
this.Canvas.textAlign="left";
|
|
135837
|
+
}
|
|
135838
|
+
|
|
135839
|
+
var textWidth=this.Canvas.measureText(text).width+1;
|
|
135840
|
+
this.Canvas.textBaseline="bottom";
|
|
135841
|
+
this.Canvas.fillStyle=drawInfo.TextColor;
|
|
135842
|
+
this.Canvas.fillText(text,x,rtItem.Top+this.RowHeight-2);
|
|
135843
|
+
}
|
|
135725
135844
|
}
|
|
135726
135845
|
|
|
135727
135846
|
this.DrawMultiBar=function(colunmInfo, data, rtItem)
|
|
@@ -149031,7 +149150,7 @@ function ScrollBarBGChart()
|
|
|
149031
149150
|
|
|
149032
149151
|
|
|
149033
149152
|
|
|
149034
|
-
var HQCHART_VERSION="1.1.
|
|
149153
|
+
var HQCHART_VERSION="1.1.14789";
|
|
149035
149154
|
|
|
149036
149155
|
function PrintHQChartVersion()
|
|
149037
149156
|
{
|