hqchart 1.1.14523 → 1.1.14538

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.
@@ -157,6 +157,7 @@ function JSReportChart(divElement)
157
157
  if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
158
158
  if (option.FloatTooltip && option.FloatTooltip.Enable) chart.InitalFloatTooltip(option.FloatTooltip); //提示信息
159
159
  if (option.MinuteChartTooltip && option.MinuteChartTooltip.Enable) chart.InitalMinuteChartTooltip(option.MinuteChartTooltip);
160
+ if (option.KLineChartTooltip && option.KLineChartTooltip.Enable) chart.InitalKLineChartTooltip(option.KLineChartTooltip);
160
161
 
161
162
  if (option.Symbol) chart.Symbol=option.Symbol;
162
163
  if (option.Name) chart.Name=option.Name;
@@ -477,6 +478,7 @@ function JSReportChartContainer(uielement)
477
478
 
478
479
  //
479
480
  this.TooltipMinuteChart; //分时图
481
+ this.TooltipKLineChart; //分时图
480
482
 
481
483
  //MouseOnStatus:{ RowIndex:行, ColumnIndex:列}
482
484
  this.LastMouseStatus={ MoveStatus:null, TooltipStatus:null, MouseOnStatus:null };
@@ -487,6 +489,7 @@ function JSReportChartContainer(uielement)
487
489
  this.StopAutoUpdate();
488
490
 
489
491
  this.DestroyMinuteChartTooltip();
492
+ this.DestroyKLineChartTooltip();
490
493
  this.DestroyFloatTooltip();
491
494
  }
492
495
 
@@ -526,6 +529,24 @@ function JSReportChartContainer(uielement)
526
529
  this.TooltipMinuteChart=null;
527
530
  }
528
531
 
532
+ this.InitalKLineChartTooltip=function(option)
533
+ {
534
+ if (this.TooltipKLineChart) return;
535
+
536
+ this.TooltipKLineChart=new JSTooltipKLineChart();
537
+ this.TooltipKLineChart.Inital(this, option);
538
+ this.TooltipKLineChart.Create();
539
+ }
540
+
541
+ this.DestroyKLineChartTooltip=function()
542
+ {
543
+ if (!this.TooltipKLineChart) return;
544
+
545
+ this.TooltipKLineChart.Destroy();
546
+ this.TooltipKLineChart=null;
547
+ }
548
+
549
+
529
550
  this.InitalFloatTooltip=function(option)
530
551
  {
531
552
  if (this.FloatTooltip) return;
@@ -595,6 +616,35 @@ function JSReportChartContainer(uielement)
595
616
  }
596
617
 
597
618
 
619
+ this.ShowKLineChartTooltip=function(x,y, data)
620
+ {
621
+ if (!this.TooltipKLineChart) return;
622
+
623
+ var rtClient=this.UIElement.getBoundingClientRect();
624
+ var rtScroll=GetScrollPosition();
625
+
626
+ var offsetLeft=rtClient.left+rtScroll.Left;
627
+ var offsetTop=rtClient.top+rtScroll.Top;
628
+
629
+ data.Offset={ Left:offsetLeft, Top:offsetTop };
630
+
631
+ this.TooltipKLineChart.Show(data, x,y);
632
+ }
633
+
634
+ this.HideKLineChartTooltip=function()
635
+ {
636
+ if (!this.TooltipKLineChart) return;
637
+
638
+ this.TooltipKLineChart.Hide();
639
+ }
640
+
641
+ this.HideAllTooltip=function()
642
+ {
643
+ this.HideKLineChartTooltip();
644
+ this.HideMinuteChartTooltip();
645
+ this.HideFloatTooltip();
646
+ }
647
+
598
648
 
599
649
  this.AutoScrollPage=function(step)
600
650
  {
@@ -1764,8 +1814,7 @@ function JSReportChartContainer(uielement)
1764
1814
  if (wheelValue<0) //下
1765
1815
  {
1766
1816
  this.LastMouseStatus.TooltipStatus=null;
1767
- this.HideMinuteChartTooltip();
1768
- this.HideFloatTooltip();
1817
+ this.HideAllTooltip();
1769
1818
  if (this.GotoNextItem(1))
1770
1819
  {
1771
1820
  this.Draw();
@@ -1775,8 +1824,7 @@ function JSReportChartContainer(uielement)
1775
1824
  else if (wheelValue>0) //上
1776
1825
  {
1777
1826
  this.LastMouseStatus.TooltipStatus=null;
1778
- this.HideMinuteChartTooltip();
1779
- this.HideFloatTooltip();
1827
+ this.HideAllTooltip();
1780
1828
  if (this.GotoNextItem(-1))
1781
1829
  {
1782
1830
  this.Draw();
@@ -1789,8 +1837,7 @@ function JSReportChartContainer(uielement)
1789
1837
  if (wheelValue<0) //下一页
1790
1838
  {
1791
1839
  this.LastMouseStatus.TooltipStatus=null;
1792
- this.HideMinuteChartTooltip();
1793
- this.HideFloatTooltip();
1840
+ this.HideAllTooltip();
1794
1841
  if (this.GotoNextPage(this.PageUpDownCycle))
1795
1842
  {
1796
1843
  this.Draw();
@@ -1800,8 +1847,7 @@ function JSReportChartContainer(uielement)
1800
1847
  else if (wheelValue>0) //上一页
1801
1848
  {
1802
1849
  this.LastMouseStatus.TooltipStatus=null;
1803
- this.HideMinuteChartTooltip();
1804
- this.HideFloatTooltip();
1850
+ this.HideAllTooltip();
1805
1851
  if (this.GotoPreviousPage(this.PageUpDownCycle))
1806
1852
  {
1807
1853
  this.Draw();
@@ -1823,8 +1869,7 @@ function JSReportChartContainer(uielement)
1823
1869
  var keyID = e.keyCode ? e.keyCode :e.which;
1824
1870
  if (keyID==116) return; //F15刷新不处理
1825
1871
 
1826
- this.HideMinuteChartTooltip();
1827
- this.HideFloatTooltip();
1872
+ this.HideAllTooltip();
1828
1873
  switch(keyID)
1829
1874
  {
1830
1875
  case 33: //page up
@@ -2113,7 +2158,8 @@ function JSReportChartContainer(uielement)
2113
2158
  if (this.LastMouseStatus.TooltipStatus) bDrawTooltip=true;
2114
2159
  this.LastMouseStatus.TooltipStatus=null;
2115
2160
 
2116
- var bShowChartTooltip=false;
2161
+ var bShowKLineTooltip=false;
2162
+ var bShowMinuteTooltip=false;
2117
2163
  var chartTooltipData=null;
2118
2164
 
2119
2165
  if (this.DragRow) return;
@@ -2189,7 +2235,15 @@ function JSReportChartContainer(uielement)
2189
2235
  {
2190
2236
  if (tooltipData.Stock && tooltipData.Stock.Symbol)
2191
2237
  {
2192
- bShowChartTooltip=true;
2238
+ bShowMinuteTooltip=true;
2239
+ chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
2240
+ }
2241
+ }
2242
+ else if (tooltipData.Type==21)
2243
+ {
2244
+ if (tooltipData.Stock && tooltipData.Stock.Symbol)
2245
+ {
2246
+ bShowKLineTooltip=true;
2193
2247
  chartTooltipData={ Symbol:tooltipData.Stock.OriginalSymbol, Rect:tooltipData.Rect };
2194
2248
  }
2195
2249
  }
@@ -2239,20 +2293,17 @@ function JSReportChartContainer(uielement)
2239
2293
  this.HideFloatTooltip();
2240
2294
  }
2241
2295
 
2242
- if (bShowChartTooltip)
2243
- {
2244
- this.ShowMinuteChartTooltip(null, null, chartTooltipData);
2245
- }
2246
- else
2247
- {
2248
- this.HideMinuteChartTooltip();
2249
- }
2296
+ if (!bShowKLineTooltip) this.HideKLineChartTooltip();
2297
+ if (!bShowMinuteTooltip) this.HideMinuteChartTooltip();
2298
+
2299
+ if (bShowMinuteTooltip) this.ShowMinuteChartTooltip(null, null, chartTooltipData);
2300
+ if (bShowKLineTooltip) this.ShowKLineChartTooltip(null, null, chartTooltipData);
2301
+
2250
2302
  }
2251
2303
 
2252
2304
  this.UIOnMounseOut=function(e)
2253
2305
  {
2254
- this.HideMinuteChartTooltip();
2255
- this.HideFloatTooltip();
2306
+ this.HideAllTooltip();
2256
2307
 
2257
2308
  var bDraw=false;
2258
2309
  var tabChart=this.GetTabChart();
@@ -2278,8 +2329,7 @@ function JSReportChartContainer(uielement)
2278
2329
 
2279
2330
  this.UIOnMouseleave=function(e)
2280
2331
  {
2281
- this.HideMinuteChartTooltip();
2282
- this.HideFloatTooltip();
2332
+ this.HideAllTooltip();
2283
2333
 
2284
2334
  var tabChart=this.GetTabChart();
2285
2335
  if (tabChart && tabChart.MoveOnTabIndex>=0)
@@ -2505,7 +2555,7 @@ function JSReportChartContainer(uielement)
2505
2555
  document.onmouseup=null;
2506
2556
 
2507
2557
  this.StopAutoDragScrollTimer();
2508
- this.HideTooltip();
2558
+ this.HideAllTooltip();
2509
2559
  var reportChart=this.GetReportChart();
2510
2560
 
2511
2561
  var mouseStatus={ Cursor:"default", Name:"Default"};; //鼠标状态
@@ -4897,7 +4947,8 @@ function ChartReport()
4897
4947
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) colItem.FloatPrecision=item.FloatPrecision; //小数位数
4898
4948
  if (IFrameSplitOperator.IsNumber(item.ColorType)) colItem.ColorType=item.ColorType; //0=默认 1=(>0, =0, <0) 2=(>=0, <0)
4899
4949
  if (item.Icon) colItem.Icon=item.Icon;
4900
- if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.EnableChartTooltip=item.EnableChartTooltip;
4950
+ if (IFrameSplitOperator.IsBool(item.EnableChartTooltip)) colItem.ChartTooltip={ Enable:item.EnableChartTooltip, Type:20 };
4951
+ if (item.ChartTooltip) colItem.ChartTooltip={ Enable:item.ChartTooltip.Enable, Type:item.ChartTooltip.Type };
4901
4952
 
4902
4953
  //点击表头弹出菜单
4903
4954
  if (IFrameSplitOperator.IsBool(item.EnablePopupHeaderMenu)) colItem.EnablePopupHeaderMenu=item.EnablePopupHeaderMenu;
@@ -6466,9 +6517,9 @@ function ChartReport()
6466
6517
  var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:drawInfo.Tooltip.Type, Data:drawInfo.Tooltip.Data };
6467
6518
  this.TooltipRect.push(tooltipData);
6468
6519
  }
6469
- else if (column.EnableChartTooltip)
6520
+ else if (column.ChartTooltip && column.ChartTooltip.Enable && IFrameSplitOperator.IsNumber(column.ChartTooltip.Type)) //Type 20分时图 21K线图
6470
6521
  {
6471
- var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:20 };
6522
+ var tooltipData={ Rect:rtItem, Stock:stock, Index:index, Column:column, RowType:rowType, Type:column.ChartTooltip.Type };
6472
6523
  this.TooltipRect.push(tooltipData);
6473
6524
  }
6474
6525
 
@@ -1566,6 +1566,8 @@ input[type="color"] {
1566
1566
  border: solid 1px rgba(200, 210, 219, 0.92);
1567
1567
  z-index: 99;
1568
1568
  pointer-events:none;
1569
+ left: 0px;
1570
+ top: 0px;
1569
1571
  }
1570
1572
 
1571
1573
  .UMyChart_Tooltip_Minute_Chart_Div
@@ -1575,6 +1577,39 @@ input[type="color"] {
1575
1577
  }
1576
1578
 
1577
1579
 
1580
+ /*
1581
+ Copyright (c) 2018 jones
1582
+
1583
+ http://www.apache.org/licenses/LICENSE-2.0
1584
+
1585
+ 开源项目 https://github.com/jones2000/HQChart
1586
+
1587
+ jones_2000@163.com
1588
+
1589
+ 内置K线图图浮动框
1590
+ */
1591
+
1592
+ .UMyChart_Tooltip_KLine_Div
1593
+ {
1594
+ position: absolute;
1595
+ height: 300px;
1596
+ width: 400px;
1597
+ visibility:hidden;
1598
+ background-color: rgba(255,255,255,0.95);
1599
+ border: solid 1px rgba(200, 210, 219, 0.92);
1600
+ z-index: 99;
1601
+ pointer-events:none;
1602
+ left: 0px;
1603
+ top: 0px;
1604
+ }
1605
+
1606
+ .UMyChart_Tooltip_KLine_Chart_Div
1607
+ {
1608
+ height: 100%;
1609
+ width: 100%;
1610
+ }
1611
+
1612
+
1578
1613
  /*
1579
1614
  Copyright (c) 2018 jones
1580
1615
 
@@ -54,6 +54,30 @@
54
54
  <div class="content unicode" style="display: block;">
55
55
  <ul class="icon_lists dib-box">
56
56
 
57
+ <li class="dib">
58
+ <span class="icon hqchart_drawtool">&#xe79e;</span>
59
+ <div class="name">图标_固定范围成交量分布图</div>
60
+ <div class="code-name">&amp;#xe79e;</div>
61
+ </li>
62
+
63
+ <li class="dib">
64
+ <span class="icon hqchart_drawtool">&#xe897;</span>
65
+ <div class="name">zoom out</div>
66
+ <div class="code-name">&amp;#xe897;</div>
67
+ </li>
68
+
69
+ <li class="dib">
70
+ <span class="icon hqchart_drawtool">&#xe898;</span>
71
+ <div class="name">zoom in</div>
72
+ <div class="code-name">&amp;#xe898;</div>
73
+ </li>
74
+
75
+ <li class="dib">
76
+ <span class="icon hqchart_drawtool">&#xe651;</span>
77
+ <div class="name">编辑</div>
78
+ <div class="code-name">&amp;#xe651;</div>
79
+ </li>
80
+
57
81
  <li class="dib">
58
82
  <span class="icon hqchart_drawtool">&#xe7fa;</span>
59
83
  <div class="name">unlock</div>
@@ -480,9 +504,9 @@
480
504
  <pre><code class="language-css"
481
505
  >@font-face {
482
506
  font-family: 'hqchart_drawtool';
483
- src: url('iconfont.woff2?t=1724304295473') format('woff2'),
484
- url('iconfont.woff?t=1724304295473') format('woff'),
485
- url('iconfont.ttf?t=1724304295473') format('truetype');
507
+ src: url('iconfont.woff2?t=1741778896955') format('woff2'),
508
+ url('iconfont.woff?t=1741778896955') format('woff'),
509
+ url('iconfont.ttf?t=1741778896955') format('truetype');
486
510
  }
487
511
  </code></pre>
488
512
  <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -508,6 +532,42 @@
508
532
  <div class="content font-class">
509
533
  <ul class="icon_lists dib-box">
510
534
 
535
+ <li class="dib">
536
+ <span class="icon hqchart_drawtool icon-tubiao_gudingfanweichengjiaoliangfenbutu"></span>
537
+ <div class="name">
538
+ 图标_固定范围成交量分布图
539
+ </div>
540
+ <div class="code-name">.icon-tubiao_gudingfanweichengjiaoliangfenbutu
541
+ </div>
542
+ </li>
543
+
544
+ <li class="dib">
545
+ <span class="icon hqchart_drawtool icon-zoomout"></span>
546
+ <div class="name">
547
+ zoom out
548
+ </div>
549
+ <div class="code-name">.icon-zoomout
550
+ </div>
551
+ </li>
552
+
553
+ <li class="dib">
554
+ <span class="icon hqchart_drawtool icon-zoomin"></span>
555
+ <div class="name">
556
+ zoom in
557
+ </div>
558
+ <div class="code-name">.icon-zoomin
559
+ </div>
560
+ </li>
561
+
562
+ <li class="dib">
563
+ <span class="icon hqchart_drawtool icon-bianji"></span>
564
+ <div class="name">
565
+ 编辑
566
+ </div>
567
+ <div class="code-name">.icon-bianji
568
+ </div>
569
+ </li>
570
+
511
571
  <li class="dib">
512
572
  <span class="icon hqchart_drawtool icon-unlock"></span>
513
573
  <div class="name">
@@ -1147,6 +1207,38 @@
1147
1207
  <div class="content symbol">
1148
1208
  <ul class="icon_lists dib-box">
1149
1209
 
1210
+ <li class="dib">
1211
+ <svg class="icon svg-icon" aria-hidden="true">
1212
+ <use xlink:href="#icon-tubiao_gudingfanweichengjiaoliangfenbutu"></use>
1213
+ </svg>
1214
+ <div class="name">图标_固定范围成交量分布图</div>
1215
+ <div class="code-name">#icon-tubiao_gudingfanweichengjiaoliangfenbutu</div>
1216
+ </li>
1217
+
1218
+ <li class="dib">
1219
+ <svg class="icon svg-icon" aria-hidden="true">
1220
+ <use xlink:href="#icon-zoomout"></use>
1221
+ </svg>
1222
+ <div class="name">zoom out</div>
1223
+ <div class="code-name">#icon-zoomout</div>
1224
+ </li>
1225
+
1226
+ <li class="dib">
1227
+ <svg class="icon svg-icon" aria-hidden="true">
1228
+ <use xlink:href="#icon-zoomin"></use>
1229
+ </svg>
1230
+ <div class="name">zoom in</div>
1231
+ <div class="code-name">#icon-zoomin</div>
1232
+ </li>
1233
+
1234
+ <li class="dib">
1235
+ <svg class="icon svg-icon" aria-hidden="true">
1236
+ <use xlink:href="#icon-bianji"></use>
1237
+ </svg>
1238
+ <div class="name">编辑</div>
1239
+ <div class="code-name">#icon-bianji</div>
1240
+ </li>
1241
+
1150
1242
  <li class="dib">
1151
1243
  <svg class="icon svg-icon" aria-hidden="true">
1152
1244
  <use xlink:href="#icon-unlock"></use>
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "hqchart_drawtool"; /* Project id 4529603 */
3
- src: url('iconfont.woff2?t=1724304295473') format('woff2'),
4
- url('iconfont.woff?t=1724304295473') format('woff'),
5
- url('iconfont.ttf?t=1724304295473') format('truetype');
3
+ src: url('iconfont.woff2?t=1741778896955') format('woff2'),
4
+ url('iconfont.woff?t=1741778896955') format('woff'),
5
+ url('iconfont.ttf?t=1741778896955') format('truetype');
6
6
  }
7
7
 
8
8
  .hqchart_drawtool {
@@ -13,6 +13,22 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .icon-tubiao_gudingfanweichengjiaoliangfenbutu:before {
17
+ content: "\e79e";
18
+ }
19
+
20
+ .icon-zoomout:before {
21
+ content: "\e897";
22
+ }
23
+
24
+ .icon-zoomin:before {
25
+ content: "\e898";
26
+ }
27
+
28
+ .icon-bianji:before {
29
+ content: "\e651";
30
+ }
31
+
16
32
  .icon-unlock:before {
17
33
  content: "\e7fa";
18
34
  }