hqchart 1.1.13238 → 1.1.13246

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.
@@ -1645,6 +1645,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1645
1645
  //内置菜单
1646
1646
  if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
1647
1647
 
1648
+ //画图工具
1649
+ if (option.EnableDrawToolDialogV2===true) chart.InitalDrawToolDialog();
1650
+
1648
1651
  //注册事件
1649
1652
  if (option.EventCallback)
1650
1653
  {
@@ -2895,6 +2898,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
2895
2898
  this.JSPopMenu; //内置菜单
2896
2899
  this.IsShowRightMenu=true; //显示右键菜单
2897
2900
 
2901
+ this.DialogDrawTool; //画图工具
2902
+
2898
2903
 
2899
2904
  this.ClearStockCache=function()
2900
2905
  {
@@ -2909,6 +2914,37 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
2909
2914
  this.JSPopMenu.Inital();
2910
2915
  }
2911
2916
 
2917
+ this.InitalDrawToolDialog=function()
2918
+ {
2919
+ if (this.DialogDrawTool) return;
2920
+
2921
+ this.DialogDrawTool=new JSDialogDrawTool();
2922
+ this.DialogDrawTool.Inital(this);
2923
+ this.DialogDrawTool.Create();
2924
+ }
2925
+
2926
+ this.ShowDrawToolDialog=function(x,y)
2927
+ {
2928
+ if (!this.DialogDrawTool) return;
2929
+
2930
+ var rtClient=this.UIElement.getBoundingClientRect();
2931
+ var rtScroll=GetScrollPosition();
2932
+
2933
+ var top=this.UIElement.offsetTop+15;
2934
+ var left=this.UIElement.offsetWidth-this.DialogDrawTool.DivDialog.offsetWidth-15;
2935
+ left+=rtClient.left+rtScroll.Left;
2936
+ top+=rtClient.top+rtScroll.Top;
2937
+
2938
+ this.DialogDrawTool.Show(left,top);
2939
+ }
2940
+
2941
+ this.IsShowDrawToolDialog=function()
2942
+ {
2943
+ if (!this.DialogDrawTool) return false;
2944
+
2945
+ return this.DialogDrawTool.IsShow();
2946
+ }
2947
+
2912
2948
  //obj={ Element:, Canvas: }
2913
2949
  this.SetCorssCursorElement=function(obj)
2914
2950
  {
@@ -7935,6 +7971,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7935
7971
  if (drawPicture.PointCount!=drawPicture.Point.length) return false;
7936
7972
  if (drawPicture.ClassName=="ChartDrawRuler") //尺子不用保存的
7937
7973
  {
7974
+ if (drawPicture.FinishedCallback) drawPicture.FinishedCallback(drawPicture);
7938
7975
  this.CurrentChartDrawPicture=null;
7939
7976
  return true;
7940
7977
  }
@@ -8120,7 +8157,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8120
8157
  {
8121
8158
  var item=this.ExtendChartPaint[i];
8122
8159
  if (!item) continue;
8123
- if (item.ClassName=="StockChip" || item.ClassName=="DrawToolsButton")
8160
+ if (item.ClassName=="StockChip")
8124
8161
  {
8125
8162
  if (IFrameSplitOperator.IsNumber(item.Width))
8126
8163
  width+=item.Width;
@@ -9210,30 +9247,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9210
9247
  }
9211
9248
  break;
9212
9249
  case JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID:
9213
- var option={Name:'画图工具', Top:this.Frame.ChartBorder.Top };
9214
- var extendChart=this.CreateExtendChart(option.Name, option); //创建扩展图形
9215
- this.SetSizeChange(true);
9216
- this.Draw();
9217
- break;
9218
- case JSCHART_MENU_ID.CMD_HIDE_DRAWTOOL_ID:
9219
- var drawTools=this.GetExtendChartByClassName('DrawToolsButton');
9220
- if (drawTools)
9221
- {
9222
- var toolsWidth=drawTools.Chart.Width;
9223
- var toolsIndex=parseInt(drawTools.Index);
9224
- for(var i=toolsIndex+1; i<this.ExtendChartPaint.length; ++i) //在画图工具后面创建的需要减去工具的宽度
9225
- {
9226
- var item=this.ExtendChartPaint[i];
9227
- if (item.ClassName=='StockChip')
9228
- {
9229
- item.Left-=toolsWidth;
9230
- }
9231
- }
9232
- this.DeleteExtendChart(drawTools);
9233
- this.Frame.ChartBorder.Right-=toolsWidth;
9234
- this.SetSizeChange(true);
9235
- this.Draw();
9236
- }
9250
+ if (!this.IsShowDrawToolDialog())
9251
+ this.ShowDrawToolDialog();
9237
9252
  break;
9238
9253
  case JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID:
9239
9254
  var option={Name:'筹码分布', ShowType:1, Width:230 };
@@ -41965,235 +41980,6 @@ function StockChip()
41965
41980
  }
41966
41981
  }
41967
41982
 
41968
- //画图工具条
41969
- function DrawToolsButton()
41970
- {
41971
- this.newMethod=IExtendChartPainting; //派生
41972
- this.newMethod();
41973
- delete this.newMethod;
41974
-
41975
- this.ClassName='DrawToolsButton';
41976
- this.HQChart;
41977
- this.ID=Guid();
41978
- this.ToolsDiv;
41979
- // this.Color='rgb(105,105,105)'; //颜色
41980
- this.Color = "#696969"; //input type="color"不支持rgb的颜色格式
41981
-
41982
- //this.Left=5;
41983
- this.Top=5*GetDevicePixelRatio();
41984
- this.Width=45*GetDevicePixelRatio(); //宽度
41985
-
41986
- this.SetOption=function(option)
41987
- {
41988
- var pixelRatio=GetDevicePixelRatio();
41989
- if (!option) return;
41990
- if (option.Width>10) this.Width=option.Width*pixelRatio;
41991
- }
41992
-
41993
- this.Clear=function()
41994
- {
41995
- if (this.ToolsDiv) this.ChartBorder.UIElement.parentNode.removeChild(this.ToolsDiv);
41996
- }
41997
-
41998
- this.Draw = function () {
41999
- if (this.SizeChange == false) return;
42000
-
42001
- //工具列表
42002
- const TOOL_LIST =
42003
- [
42004
- [
42005
- { HTML: { Title: '线段', IClass: 'iconfont icon-draw_line', ID: 'icon-segment' }, Name: '线段' },
42006
- { HTML: { Title: '尺子', IClass: 'iconfont icon-ruler', ID: 'icon_ruler' }, Name: '尺子' },
42007
- { HTML: { Title: '射线', IClass: 'iconfont icon-draw_rays', ID: 'icon-beam' }, Name: '射线' },
42008
- { HTML: { Title: '标价线', IClass: 'iconfont icon-price_line', ID: 'icon-price-line' }, Name: '标价线' },
42009
- { HTML: { Title: '垂直线', IClass: 'iconfont icon-vertical_line', ID: 'icon-vertical-line' }, Name: '垂直线' },
42010
- { HTML: { Title: '箭头', IClass: 'iconfont icon-draw_rays', ID: 'icon-beam2' }, Name: '箭头' },
42011
- { HTML: { Title: '趋势线', IClass: 'iconfont icon-draw_trendline', ID: 'icon-trendline' }, Name: '趋势线' },
42012
- { HTML: { Title: '水平线', IClass: 'iconfont icon-draw_hline', ID: 'icon-hline' }, Name: '水平线' },
42013
- { HTML: { Title: '水平线段', IClass: 'iconfont icon-draw_hlinesegment', ID: 'icon-hlineseg' }, Name: '水平线段' },
42014
- { HTML: { Title: '平行射线', IClass: 'iconfont icon-draw_p_rays_lines', ID: 'icon-rayslineseg' }, Name: '平行射线' },
42015
- { HTML: { Title: '平行线', IClass: 'iconfont icon-draw_parallel_lines', ID: 'icon-parallellines' }, Name: '平行线' },
42016
- { HTML: { Title: '平行通道', IClass: 'iconfont icon-draw_parallelchannel', ID: 'icon-parallelchannel' }, Name: '平行通道' },
42017
- { HTML: { Title: '价格通道线', IClass: 'iconfont icon-draw_pricechannel', ID: 'icon-pricechannel' }, Name: '价格通道线' },
42018
- { HTML: { Title: 'M头W底', IClass: 'iconfont icon-draw_wavemw', ID: 'icon-wavemw' }, Name: 'M头W底' },
42019
- { HTML: { Title: '头肩型', IClass: 'iconfont icon-draw_head_shoulders_bt', ID: 'icon-Head-Shoulders' }, Name: '头肩型' },
42020
- { HTML: { Title: '波浪尺', IClass: 'iconfont icon-waveruler', ID: 'icon-wave-ruler' }, Name: '波浪尺' },
42021
- { HTML: { Title: 'AB波浪尺', IClass: 'iconfont icon-waveruler', ID: 'icon-wave-ruler2' }, Name: 'AB波浪尺' },
42022
- { HTML: { Title: '箱型线', IClass: 'iconfont icon-draw_box', ID: 'icon-drawbox' }, Name: '箱型线' },
42023
- { HTML: { Title: '涂鸦线段', IClass: 'iconfont icon-draw_line', ID: 'icon-segment2' }, Name: '涂鸦线段' },
42024
-
42025
- ],
42026
- [
42027
- { HTML: { Title: '圆弧', IClass: 'iconfont icon-draw_arc', ID: 'icon-arc' }, Name: '圆弧线' },
42028
- { HTML: { Title: '矩形', IClass: 'iconfont icon-rectangle', ID: 'icon-rect' }, Name: '矩形' },
42029
- { HTML: { Title: '平行四边形', IClass: 'iconfont icon-draw_quadrangle', ID: 'icon-quad' }, Name: '平行四边形' },
42030
- { HTML: { Title: '三角形', IClass: 'iconfont icon-draw_triangle', ID: 'icon-triangle' }, Name: '三角形' },
42031
- { HTML: { Title: '圆', IClass: 'iconfont icon-draw_circle', ID: 'icon-circle' }, Name: '圆' },
42032
- { HTML: { Title: '对称角度', IClass: 'iconfont icon-draw_symangle', ID: 'icon-symangle' }, Name: '对称角度' },
42033
- ],
42034
- [
42035
- { HTML: { Title: '文本', IClass: 'iconfont icon-draw_text', ID: 'icon-text' }, Name: '文本' },
42036
- { HTML: { Title: '向上箭头', IClass: 'iconfont icon-arrow_up', ID: 'icon-arrowup' }, Name: 'icon-arrow_up' },
42037
- { HTML: { Title: '向下箭头', IClass: 'iconfont icon-arrow_down', ID: 'icon-arrowdown' }, Name: 'icon-arrow_down' },
42038
- { HTML: { Title: '向左箭头', IClass: 'iconfont icon-arrow_left', ID: 'icon-arrowleft' }, Name: 'icon-arrow_left' },
42039
- { HTML: { Title: '向右箭头', IClass: 'iconfont icon-arrow_right', ID: 'icon-arrowright' }, Name: 'icon-arrow_right' },
42040
- ],
42041
- [
42042
- { HTML: { Title: '江恩角度线', IClass: 'iconfont icon-draw_gannfan', ID: 'icon-gannfan' }, Name: '江恩角度线' },
42043
- { HTML: { Title: '斐波那契周期线', IClass: 'iconfont icon-draw_fibonacci', ID: 'icon-fibonacci' }, Name: '斐波那契周期线' },
42044
- { HTML: { Title: '阻速线', IClass: 'iconfont icon-draw_resline', ID: 'icon-resline' }, Name: '阻速线' },
42045
- { HTML: { Title: '黄金分割', IClass: 'iconfont icon-draw_goldensection', ID: 'icon-goldensection' }, Name: '黄金分割' },
42046
- { HTML: { Title: '百分比线', IClass: 'iconfont icon-draw_percentage', ID: 'icon-percentage' }, Name: '百分比线' },
42047
- { HTML: { Title: '波段线', IClass: 'iconfont icon-draw_waveband', ID: 'icon-waveband' }, Name: '波段线' },
42048
- { HTML: { Title: '线形回归线', IClass: 'iconfont icon-linear_3', ID: 'icon-waveband2' }, Name: '线形回归线' },
42049
- { HTML: { Title: '线形回归带', IClass: 'iconfont icon-linear_1', ID: 'icon-waveband3' }, Name: '线形回归带' },
42050
- { HTML: { Title: '延长线形回归带', IClass: 'iconfont icon-linear_2', ID: 'icon-waveband5' }, Name: '延长线形回归带' },
42051
- ],
42052
- [{ HTML: { Title: '全部删除', IClass: 'iconfont icon-recycle_bin', ID: 'icon-delete' }, Name: '全部删除' }]
42053
- ];
42054
-
42055
- var hqChart = this.HQChart;
42056
-
42057
- if (!this.ToolsDiv) {
42058
- var div = document.createElement("div");
42059
- div.className = 'drawtools';
42060
- div.id = this.ID;
42061
-
42062
- var spanList = ""; //一层菜单
42063
- var menuTwoList = ""; //二层菜单
42064
- var menuOne = new Array();
42065
- TOOL_LIST.forEach(function(item,index){
42066
- menuOne.push(item[0]);
42067
- });
42068
- for (var i = 0; i < TOOL_LIST.length; i++) {
42069
- var itemOut = menuOne[i];
42070
- var itemIn = TOOL_LIST[i];
42071
- var menuTwoStr = "";
42072
- var contentArrow = "";
42073
- for (var j = 0; j < itemIn.length; j++) {
42074
- var currentItem = itemIn[j];
42075
- var menuTwoName = currentItem.Name;
42076
- if(menuTwoName.indexOf('up') > -1){
42077
- menuTwoName = "向上箭头";
42078
- }else if(menuTwoName.indexOf('down') > -1){
42079
- menuTwoName = "向下箭头";
42080
- }else if(menuTwoName.indexOf('left') > -1){
42081
- menuTwoName = "向左箭头";
42082
- }else if(menuTwoName.indexOf('right') > -1){
42083
- menuTwoName = "向右箭头";
42084
- }
42085
- menuTwoStr += '<p class="menuTwoItem ' + currentItem.HTML.ID + '">' + menuTwoName + '<i class="' + currentItem.HTML.IClass + '" title="' + currentItem.HTML.Title + '"></i></p>';
42086
- }
42087
- if (i !== TOOL_LIST.length - 1) { //不是“全部删除”项
42088
- menuTwoList = '<div class="menuTwo">' + menuTwoStr + '</div>';
42089
- contentArrow = '<i class="contentArrow iconfont icon-menu_arraw_left"></i>';
42090
- } else {
42091
- menuTwoList = "";
42092
- contentArrow = "";
42093
- }
42094
-
42095
- var spanNode = '<div class="icon-image ' + 'first-' + itemOut.HTML.ID + '"><i class="' + itemOut.HTML.IClass + '" title="' + itemOut.HTML.Title + '"></i>' + menuTwoList + contentArrow +'</div>';
42096
- spanList += spanNode;
42097
- }
42098
- this.ChartBorder.UIElement.parentNode.appendChild(div);
42099
-
42100
- div.innerHTML = spanList;
42101
- this.ToolsDiv = div;
42102
-
42103
- for (var i in TOOL_LIST) {
42104
- var item = TOOL_LIST[i][0];
42105
- $('#' + this.ID + " .first-" + item.HTML.ID).hover(function(){ //箭头的旋转过渡
42106
- $(".drawtools").find(".contentArrow").hide();
42107
- $(this).find(".contentArrow").removeClass("trans").show();
42108
- });
42109
- $('#' + this.ID + " .first-" + item.HTML.ID+" .contentArrow").click(function(event){ //点击三角展示二级菜单
42110
- event.stopPropagation();
42111
- $(".drawtools").find(".menuTwo").hide();
42112
- $(this).siblings('.menuTwo').show();
42113
- });
42114
- $('#' + this.ID + " .first-" + item.HTML.ID+" .trans").click(function(){ //点击三角隐藏二级菜单
42115
- event.stopPropagation();
42116
- $(this).siblings('.menuTwo').hide();
42117
- });
42118
-
42119
-
42120
- if (item.Name == '全部删除') {
42121
- $('#' + this.ID + " .first-icon-delete").click(function () {
42122
- $(".drawtools").find(".menuTwo").hide();
42123
- $(this).siblings().removeClass('active');
42124
- $(this).addClass('active');
42125
- hqChart.ClearChartDrawPicture();
42126
- $(".subTolls").css("display", "none");
42127
- });
42128
- }
42129
- else {
42130
- $('#' + this.ID + " .first-" + menuOne[i].HTML.ID).click( //一层菜单类名是:“first-”+item.HTML.ID
42131
- {
42132
- // DrawName: menuOne[i].Name, //把画法名字传进去
42133
- CurrentIndex:i
42134
- },
42135
- function (event) {
42136
- $(".drawtools").find(".menuTwo").hide();
42137
- $(this).siblings().removeClass('active');
42138
- $(this).addClass('active');
42139
- hqChart.CreateChartDrawPicture(menuOne[event.data.CurrentIndex].Name);
42140
- }
42141
- );
42142
- for (var j in TOOL_LIST[i]) {
42143
- var itemTwo = TOOL_LIST[i][j];
42144
- let classname = itemTwo.HTML.IClass; //闭包问题
42145
- $('#' + this.ID + ' .' + itemTwo.HTML.ID).hover(function(event){
42146
- event.stopPropagation();
42147
- $(this).closest('.icon-image').find(".contentArrow").addClass("trans");
42148
- });
42149
- $('#' + this.ID + ' .' + itemTwo.HTML.ID).click(//二层菜单
42150
- {
42151
- DrawName: itemTwo.Name, //把画法名字传进去
42152
- CurrentIndex:i,
42153
- CurrentData:itemTwo
42154
- },
42155
- function (event) {
42156
- event.stopPropagation();
42157
- $(this).closest('.icon-image').find(".contentArrow").hide();
42158
- $(this).siblings().removeClass("current");
42159
- $(this).addClass("current");
42160
- $(this).closest('.icon-image').children('i').eq(0).removeClass().addClass(classname,"active").attr('title',event.data.CurrentData.HTML.Title);
42161
- menuOne.splice(event.data.CurrentIndex,1,event.data.CurrentData);
42162
- $(this).parent().hide();
42163
- hqChart.CreateChartDrawPicture(event.data.DrawName);
42164
- }
42165
- );
42166
- }
42167
- }
42168
- }
42169
-
42170
- }
42171
- var curID = this.ID;
42172
- $(document).click(function(event){
42173
- if(!($("#"+curID).is(event.target)) && ($("#"+curID).has(event.target).length === 0)){
42174
- $("#"+curID+" .menuTwo").hide();
42175
- $("#"+curID+" .contentArrow").hide();
42176
- }
42177
- });
42178
- var scrollPos = GetScrollPosition();
42179
- var pixelRatio=GetDevicePixelRatio();
42180
- // var left=this.ChartBorder.GetChartWidth()-this.Right-this.ToolsWidth;
42181
- var left=ToFixedPoint(this.ChartBorder.GetRight()+this.Left);
42182
- // var top = this.Top+this.ChartBorder.UIElement.getBoundingClientRect().top+scrollPos.Top;
42183
- var top = this.ChartBorder.GetTop();
42184
- this.ToolsDiv.style.left = left/pixelRatio + "px";
42185
- this.ToolsDiv.style.top = top/pixelRatio + "px";
42186
- this.ToolsDiv.style.width = (this.Width-5)/pixelRatio + "px";
42187
- this.ToolsDiv.style.height = 'auto';
42188
- this.ToolsDiv.style.position = "absolute";
42189
- this.ToolsDiv.style.display = "block";
42190
- // this.ToolsDiv.style.paddingLeft = "10px";
42191
-
42192
- this.SizeChange == true;
42193
- }
42194
- }
42195
-
42196
-
42197
41983
  //窗口分割
42198
41984
  function FrameSplitPaint()
42199
41985
  {
@@ -55418,7 +55204,7 @@ IChartDrawPicture.ArrayDrawPricture=
55418
55204
  { Name:"固定范围成交量分布图", ClassName:"ChartDrawVolProfile", Create:function() { return new ChartDrawVolProfile(); }},
55419
55205
 
55420
55206
  { Name:"DisjointChannel", ClassName:"ChartDrawDisjontChannel", Create:function() { return new ChartDrawDisjontChannel();}},
55421
- { Name:"FlatTop", ClassName:"ChartDrawDisjontChannel", Create:function() { return new ChartDrawFlatTop();}},
55207
+ { Name:"FlatTop", ClassName:"ChartDrawFlatTop", Create:function() { return new ChartDrawFlatTop();}},
55422
55208
 
55423
55209
  { Name:"水平线2", ClassName:"ChartDrawHLine", Create:function() { return new ChartDrawHLine(); }},
55424
55210
 
@@ -57589,7 +57375,7 @@ function ChartDrawPictureParallelLines()
57589
57375
  }
57590
57376
 
57591
57377
 
57592
- //FlatTop/Bottom
57378
+ //FlatTop/Bottom 平滑顶/底
57593
57379
  function ChartDrawFlatTop()
57594
57380
  {
57595
57381
  this.newMethod=IChartDrawPicture; //派生
@@ -57676,7 +57462,7 @@ function ChartDrawFlatTop()
57676
57462
  }
57677
57463
  }
57678
57464
 
57679
- //Disjont Channel
57465
+ //Disjont Channel 不相交通道 (未完成)
57680
57466
  function ChartDrawDisjontChannel()
57681
57467
  {
57682
57468
  this.newMethod=ChartDrawFlatTop; //派生
@@ -71664,17 +71450,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
71664
71450
  this.ExtendChartPaint.push(chart);
71665
71451
  this.Frame.ChartBorder.Right+=chart.Width; //创建筹码需要增加右边的间距
71666
71452
  return chart;
71667
- case '画图工具':
71668
- chart=new DrawToolsButton();
71669
- chart.Canvas=this.Canvas;
71670
- chart.ChartBorder=this.Frame.ChartBorder;
71671
- chart.ChartFrame=this.Frame;
71672
- chart.HQChart=this;
71673
- chart.Left=this.Frame.ChartBorder.Right; //左边间距使用当前框架间距
71674
- chart.SetOption(option);
71675
- this.ExtendChartPaint.push(chart);
71676
- this.Frame.ChartBorder.Right+=chart.Width; //创建筹码需要增加右边的间距
71677
- return chart;
71678
71453
  case 'KLineTooltip':
71679
71454
  if (option.Create && typeof(option.Create)=='function') chart=option.Create();
71680
71455
  else chart=new KLineTooltipPaint();
@@ -72688,6 +72463,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
72688
72463
  return true;
72689
72464
  }
72690
72465
 
72466
+ this.ClearCurrnetDrawPicture=function()
72467
+ {
72468
+ this.CurrentChartDrawPicture=null;
72469
+ }
72470
+
72691
72471
  this.AddChartDrawPicture=function(obj)
72692
72472
  {
72693
72473
  if (!obj) return null;
@@ -72875,9 +72655,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
72875
72655
  if (item && item.Symbol) aryOverlaySymbol.push(item.Symbol)
72876
72656
  }
72877
72657
 
72878
- var bBGSpit=false, bShowDrawTool=false, bShowStockChip=false;
72658
+ var bBGSpit=false, bShowStockChip=false;
72879
72659
  if (this.GetExtendChartByClassName("SessionBreaksPaint")) bBGSpit=true;
72880
- if (this.GetExtendChartByClassName('DrawToolsButton')) bShowDrawTool=true; //画图工具
72881
72660
  if (this.GetExtendChartByClassName('StockChip')) bShowStockChip=true; //筹码
72882
72661
 
72883
72662
  var aryMenu=
@@ -73035,7 +72814,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
73035
72814
 
73036
72815
  { Name:"背景分割", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_BG_SPLIT_ID, Args:[!bBGSpit]}, Checked:bBGSpit},
73037
72816
 
73038
- { Name:"画图工具", Data:{ ID:bShowDrawTool?JSCHART_MENU_ID.CMD_HIDE_DRAWTOOL_ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:bShowDrawTool},
72817
+ { Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
73039
72818
 
73040
72819
  { Name:"移动筹码图", Data:{ ID:bShowStockChip?JSCHART_MENU_ID.CMD_HIDE_STOCKCHIP_ID:JSCHART_MENU_ID.CMD_SHOW_STOCKCHIP_ID, Args:[]}, Checked:bShowStockChip},
73041
72820
  ]
@@ -76513,9 +76292,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
76513
76292
  if (item && item.Symbol) aryOverlaySymbol.push(item.Symbol)
76514
76293
  }
76515
76294
 
76516
- var bShowDrawTool=false;
76517
- if (this.GetExtendChartByClassName('DrawToolsButton')) bShowDrawTool=true; //画图工具
76518
-
76519
76295
  var aryMenu=
76520
76296
  [
76521
76297
  {
@@ -76573,7 +76349,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
76573
76349
  Name:"其他设置",
76574
76350
  SubMenu:
76575
76351
  [
76576
- { Name:"画图工具", Data:{ ID:bShowDrawTool?JSCHART_MENU_ID.CMD_HIDE_DRAWTOOL_ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:bShowDrawTool},
76352
+ { Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
76577
76353
  ]
76578
76354
  }
76579
76355
 
@@ -79738,17 +79514,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
79738
79514
  chart.SetOption(option);
79739
79515
  this.ExtendChartPaint.push(chart);
79740
79516
  return chart;
79741
- case '画图工具':
79742
- chart=new DrawToolsButton();
79743
- chart.Canvas=this.Canvas;
79744
- chart.ChartBorder=this.Frame.ChartBorder;
79745
- chart.ChartFrame=this.Frame;
79746
- chart.HQChart=this;
79747
- chart.Left=this.Frame.ChartBorder.Right; //左边间距使用当前框架间距
79748
- chart.SetOption(option);
79749
- this.ExtendChartPaint.push(chart);
79750
- this.Frame.ChartBorder.Right+=chart.Width; //创建筹码需要增加右边的间距
79751
- return chart;
79752
79517
  case "MinuteBackgroundPaint":
79753
79518
  chart=new MinuteBackgroundPaint();
79754
79519
  chart.Canvas=this.Canvas;
@@ -1326,6 +1326,108 @@ input[type="color"] {
1326
1326
 
1327
1327
 
1328
1328
 
1329
+ /*
1330
+ Copyright (c) 2018 jones
1331
+
1332
+ http://www.apache.org/licenses/LICENSE-2.0
1333
+
1334
+ 开源项目 https://github.com/jones2000/HQChart
1335
+
1336
+ jones_2000@163.com
1337
+
1338
+ 内置画图工具对话框
1339
+ */
1340
+
1341
+ .UMyChart_DrawTool_Dialog_Div
1342
+ {
1343
+ font-family: "微软雅黑";
1344
+ /*display: flex;*/
1345
+ border: 2px solid;
1346
+ width:fit-content;
1347
+ border-color: rgb(128,128,128);
1348
+ visibility:hidden;
1349
+ position: absolute;
1350
+ background-color: rgba(255,255,255,0.9);
1351
+ left:1px;
1352
+ top:1px;
1353
+ }
1354
+
1355
+ .UMyChart_DrawTool_Title_Div
1356
+ {
1357
+ padding-left: 2px;
1358
+ height:20px;
1359
+ border-bottom: 1px solid;
1360
+ border-color: rgb(128,128,128);
1361
+ display: flex;
1362
+ cursor: default;
1363
+ user-select: none;
1364
+ }
1365
+
1366
+ .UMyChart_DrawTool_Close_Div
1367
+ {
1368
+ margin-left: auto;
1369
+ padding-right: 4px;
1370
+ cursor:pointer;
1371
+ }
1372
+
1373
+ .UMyChart_DrawTool_Table
1374
+ {
1375
+ border-collapse: collapse;
1376
+ border-spacing: 2px;
1377
+ }
1378
+
1379
+ .UMyChart_DrawTool_Tbody
1380
+ {
1381
+
1382
+ }
1383
+
1384
+ .UMyChart_DrawTool_Tr
1385
+ {
1386
+ display: table-row;
1387
+ height:20px;
1388
+ }
1389
+
1390
+ .UMyChart_DrawTool_Span_Selected
1391
+ {
1392
+ background: rgb(128,128,128);
1393
+ color: rgb(255,255,255);
1394
+ }
1395
+
1396
+ .UMyChart_DrawTool_Td
1397
+ {
1398
+ padding: 2px;
1399
+ }
1400
+
1401
+ .UMyChart_DrawTool_Span
1402
+ {
1403
+ font-size:22px;
1404
+ border: 1px solid;
1405
+ border-color: rgb(128,128,128);
1406
+ }
1407
+
1408
+ .UMyChart_DrawTool_Group_Tr
1409
+ {
1410
+ font-size: 12px;
1411
+ cursor: default;
1412
+ user-select: none;
1413
+ }
1414
+
1415
+ .UMyChart_DrawTool_Group_Td
1416
+ {
1417
+ text-align:center;
1418
+ }
1419
+
1420
+ .UMyChart_DrawTool_Group_End_Tr
1421
+ {
1422
+ height:5px;
1423
+ border-bottom: 1px solid;
1424
+ border-color: rgb(128,128,128);
1425
+ }
1426
+
1427
+
1428
+
1429
+
1430
+
1329
1431
 
1330
1432
 
1331
1433
 
@@ -0,0 +1,98 @@
1
+
2
+ /*
3
+ Copyright (c) 2018 jones
4
+
5
+ http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ 开源项目 https://github.com/jones2000/HQChart
8
+
9
+ jones_2000@163.com
10
+
11
+ 内置画图工具对话框
12
+ */
13
+
14
+ .UMyChart_DrawTool_Dialog_Div
15
+ {
16
+ font-family: "微软雅黑";
17
+ /*display: flex;*/
18
+ border: 2px solid;
19
+ width:fit-content;
20
+ border-color: rgb(128,128,128);
21
+ visibility:hidden;
22
+ position: absolute;
23
+ background-color: rgba(255,255,255,0.9);
24
+ left:1px;
25
+ top:1px;
26
+ }
27
+
28
+ .UMyChart_DrawTool_Title_Div
29
+ {
30
+ padding-left: 2px;
31
+ height:20px;
32
+ border-bottom: 1px solid;
33
+ border-color: rgb(128,128,128);
34
+ display: flex;
35
+ cursor: default;
36
+ user-select: none;
37
+ }
38
+
39
+ .UMyChart_DrawTool_Close_Div
40
+ {
41
+ margin-left: auto;
42
+ padding-right: 4px;
43
+ cursor:pointer;
44
+ }
45
+
46
+ .UMyChart_DrawTool_Table
47
+ {
48
+ border-collapse: collapse;
49
+ border-spacing: 2px;
50
+ }
51
+
52
+ .UMyChart_DrawTool_Tbody
53
+ {
54
+
55
+ }
56
+
57
+ .UMyChart_DrawTool_Tr
58
+ {
59
+ display: table-row;
60
+ height:20px;
61
+ }
62
+
63
+ .UMyChart_DrawTool_Span_Selected
64
+ {
65
+ background: rgb(128,128,128);
66
+ color: rgb(255,255,255);
67
+ }
68
+
69
+ .UMyChart_DrawTool_Td
70
+ {
71
+ padding: 2px;
72
+ }
73
+
74
+ .UMyChart_DrawTool_Span
75
+ {
76
+ font-size:22px;
77
+ border: 1px solid;
78
+ border-color: rgb(128,128,128);
79
+ }
80
+
81
+ .UMyChart_DrawTool_Group_Tr
82
+ {
83
+ font-size: 12px;
84
+ cursor: default;
85
+ user-select: none;
86
+ }
87
+
88
+ .UMyChart_DrawTool_Group_Td
89
+ {
90
+ text-align:center;
91
+ }
92
+
93
+ .UMyChart_DrawTool_Group_End_Tr
94
+ {
95
+ height:5px;
96
+ border-bottom: 1px solid;
97
+ border-color: rgb(128,128,128);
98
+ }