hqchart 1.1.13640 → 1.1.13652

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.
@@ -56,7 +56,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
56
56
  //改参数div
57
57
  this.ModifyIndexDialog=new ModifyIndexDialog(divElement);
58
58
  this.ChangeIndexDialog=new ChangeIndexDialog(divElement);
59
- this.MinuteDialog=new MinuteDialog(divElement);
60
59
 
61
60
  //额外的画布
62
61
  this.MapExtraCanvasElement=new Map(); //key=画布名字, value={ Element:, Canvas:}
@@ -293,7 +292,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
293
292
  //创建改参数div
294
293
  chart.ModifyIndexDialog=this.ModifyIndexDialog;
295
294
  chart.ChangeIndexDialog=this.ChangeIndexDialog;
296
- chart.MinuteDialog=this.MinuteDialog;
297
295
 
298
296
  var pixelRatio=GetDevicePixelRatio();
299
297
 
@@ -340,7 +338,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
340
338
  if (option.KLine.MaxReqeustDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxReqeustDataCount; //兼容老版本
341
339
  if (option.KLine.MaxRequestDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;
342
340
  if (option.KLine.Info && option.KLine.Info.length>0) chart.SetKLineInfo(option.KLine.Info,false);
343
- if (option.KLine.KLineDoubleClick==false) chart.MinuteDialog=this.MinuteDialog=null;
344
341
  if (IFrameSplitOperator.IsBool(item.IsShowTooltip)) chart.IsShowTooltip=item.IsShowTooltip;
345
342
  if (IFrameSplitOperator.IsBool(item.IsShowKLineDivTooltip)) chart.IsShowKLineDivTooltip=item.IsShowKLineDivTooltip;
346
343
  if (option.KLine.MaxRequestMinuteDayCount>0) chart.MaxRequestMinuteDayCount=option.KLine.MaxRequestMinuteDayCount;
@@ -740,7 +737,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
740
737
  //创建改参数div
741
738
  chart.ModifyIndexDialog=this.ModifyIndexDialog;
742
739
  chart.ChangeIndexDialog=this.ChangeIndexDialog;
743
- chart.MinuteDialog=this.MinuteDialog;
744
740
 
745
741
  //右键菜单
746
742
  if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
@@ -752,7 +748,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
752
748
  if (option.KLine.Period>=0) chart.Period=option.KLine.Period;
753
749
  if (option.KLine.MaxRequestDataCount>0) chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;
754
750
  if (option.KLine.Info && option.KLine.Info.length>0) chart.SetKLineInfo(option.KLine.Info,false);
755
- if (option.KLine.KLineDoubleClick==false) chart.MinuteDialog=this.MinuteDialog=null;
756
751
  if (option.KLine.PageSize>0) chart.PageSize=option.KLine.PageSize;
757
752
  if (option.KLine.IsShowTooltip==false) chart.IsShowTooltip=false;
758
753
  }
@@ -1348,6 +1343,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1348
1343
 
1349
1344
  }
1350
1345
 
1346
+ /*废弃
1347
+ //统一全部使用 MinuteChartContainer
1351
1348
  //历史分钟走势图
1352
1349
  this.CreateHistoryMinuteChartContainer=function(option)
1353
1350
  {
@@ -1409,6 +1406,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1409
1406
 
1410
1407
  return chart;
1411
1408
  }
1409
+ */
1412
1410
 
1413
1411
  this.CreateKLineTrainChartContainer=function(option)
1414
1412
  {
@@ -1685,9 +1683,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1685
1683
  case "迷你分钟走势图":
1686
1684
  chart=this.CreateMinMinuteChartContainer(option);
1687
1685
  break;
1688
- case "历史分钟走势图":
1689
- chart=this.CreateHistoryMinuteChartContainer(option);
1690
- break;
1691
1686
  case 'K线训练':
1692
1687
  case 'K线训练横屏':
1693
1688
  case "简单K线训练":
@@ -7913,6 +7908,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7913
7908
 
7914
7909
  if (option.Update && this.Update) this.Update( {UpdateCursorIndexType:2} ); //是否立即更新并重绘
7915
7910
  else if (option.Draw==true) this.Draw(); //是否立即重绘
7911
+
7912
+ if (this.PopMinuteChart) this.PopMinuteChart.ReloadResource(option);
7916
7913
  }
7917
7914
 
7918
7915
  this.ReloadBorder=function(option) //根据页面缩放调整对应边框的尺长
@@ -15185,6 +15182,7 @@ function OverlayMinuteFrame()
15185
15182
  this.IsShow=true; //坐标是否显示
15186
15183
  this.IsShareY=false; //使用和主框架公用Y轴
15187
15184
  this.IsCalculateYMaxMin=true; //是否计算Y最大最小值
15185
+ this.IsShowMainFrame=0; //是否显示在主框架坐标上 1=左边 2=右边
15188
15186
 
15189
15187
  this.Draw=function()
15190
15188
  {
@@ -56720,6 +56718,7 @@ IChartDrawPicture.ArrayDrawPricture=
56720
56718
  { Name:"InfoLine", ClassName:"ChartInfoLine", Create:function() { return new ChartInfoLine(); }},
56721
56719
  { Name:"TrendAngle", ClassName:"ChartTrendAngle", Create:function() { return new ChartTrendAngle(); }},
56722
56720
  { Name:"ArrowMarker", ClassName:"ChartArrowMarker", Create:function() { return new ChartArrowMarker(); } },
56721
+ { Name:"BarsPattern", ClassName:"ChartBarsPattern", Create:function() { return new ChartBarsPattern(); } },
56723
56722
  ];
56724
56723
 
56725
56724
  IChartDrawPicture.MapIonFont=new Map(
@@ -66617,6 +66616,22 @@ function ChartInfoLine()
66617
66616
  }
66618
66617
  }
66619
66618
 
66619
+ function ChartBarsPattern()
66620
+ {
66621
+ this.newMethod=IChartDrawPicture; //派生
66622
+ this.newMethod();
66623
+ delete this.newMethod;
66624
+
66625
+ this.ClassName='ChartBarsPattern';
66626
+ this.PointCount=2;
66627
+ this.KData=null; //K线数据 []
66628
+
66629
+ this.Draw=function()
66630
+ {
66631
+
66632
+ }
66633
+ }
66634
+
66620
66635
 
66621
66636
  function ChartDrawStorage()
66622
66637
  {
@@ -66976,6 +66991,12 @@ function JSChartResource()
66976
66991
  this.TooltipBGColor="rgb(255, 255, 255)"; //背景色
66977
66992
  this.TooltipAlpha=0.92; //透明度
66978
66993
 
66994
+ this.PopMinuteChart=
66995
+ {
66996
+ BGColor:"rgba(250,250,250,0.95)",
66997
+ BorderColor:"rgb(0,0,0)",
66998
+ }
66999
+
66979
67000
  this.SelectRectBGColor="rgba(1,130,212,0.06)"; //背景色
66980
67001
  // this.SelectRectAlpha=0.06; //透明度
66981
67002
 
@@ -68359,6 +68380,13 @@ function JSChartResource()
68359
68380
  }
68360
68381
  }
68361
68382
 
68383
+ if (style.PopMinuteChart)
68384
+ {
68385
+ var item=style.PopMinuteChart;
68386
+ if (item.BGColor) this.PopMinuteChart.BGColor=item.BGColor;
68387
+ if (item.BorderColor) this.PopMinuteChart.BorderColor=item.BorderColor;
68388
+ }
68389
+
68362
68390
  if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
68363
68391
  if (style.DefaultTextFont) this.DefaultTextFont = style.DefaultTextFont;
68364
68392
  if (style.TitleFont) this.TitleFont = style.TitleFont;
@@ -70317,7 +70345,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
70317
70345
  this.StockHistoryDayApiUrl= g_JSChartResource.Domain+'/API/StockHistoryDay'; //股票历史数据
70318
70346
  this.TickApiUrl=g_JSChartResource.Domain+'/API/StockDetail'; //当天分笔数据
70319
70347
 
70320
- this.MinuteDialog; //双击历史K线 弹出分钟走势图
70348
+ this.PopMinuteChart=null; //双击历史K线 弹出分钟走势图
70321
70349
 
70322
70350
  this.BeforeBindMainData=null; //function(funcName) 在BindMainData() 调用前回调用
70323
70351
  this.AfterBindMainData=null; //function(funcName) 在BindMainData() 调用前后调用
@@ -71249,10 +71277,42 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
71249
71277
 
71250
71278
  if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
71251
71279
  if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
71280
+
71281
+ this.InitalPopMinuteChart(option);
71252
71282
  }
71253
71283
 
71254
-
71284
+ this.InitalPopMinuteChart=function(option)
71285
+ {
71286
+ if (!option || !option.KLine) return false;
71287
+ var item=option.KLine;
71288
+ if (item.KLineDoubleClick===true)
71289
+ {
71290
+ this.PopMinuteChart=new JSPopMinuteChart();
71291
+ this.PopMinuteChart.Inital(this);
71292
+ return true;
71293
+ }
71294
+
71295
+ return false;
71296
+ }
71297
+
71298
+ this.ShowMinuteChartDialog=function(data, x,y)
71299
+ {
71300
+ if (!this.PopMinuteChart) return;
71301
+ if (!data.Tooltip || !data.Chart) return;
71302
+
71303
+ var rtClient=this.UIElement.getBoundingClientRect();
71304
+ var rtScroll=GetScrollPosition();
71305
+
71306
+ x+=(rtClient.left+rtScroll.Left);
71307
+ y+=(rtClient.top+rtScroll.Top);
71308
+
71309
+ var date=data.Tooltip.Data.Date;
71310
+ var symbol=data.Chart.Symbol;
71255
71311
 
71312
+ this.PopMinuteChart.Show({ Date:date, Symbol:symbol, Data:data.Tooltip.Data }, x,y);
71313
+ }
71314
+
71315
+
71256
71316
  this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
71257
71317
  {
71258
71318
  if (keyID==37 && e.ctrlKey) //Ctrl+Left
@@ -76595,16 +76655,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
76595
76655
  }
76596
76656
  }
76597
76657
  }
76598
-
76599
- var event=null;
76600
- if (this.mapEvent.has(JSCHART_EVENT_ID.DBCLICK_KLINE)) event=this.mapEvent.get(JSCHART_EVENT_ID.DBCLICK_KLINE);
76601
-
76602
- if (!this.MinuteDialog && !event) return;
76603
76658
 
76604
76659
  var tooltip=new TooltipData();
76605
76660
  if (!this.PtInChartPaintTooltip(x,y,tooltip)) return;
76606
76661
  if (!tooltip.Data) return;
76607
76662
 
76663
+ var event=null;
76664
+ if (this.mapEvent.has(JSCHART_EVENT_ID.DBCLICK_KLINE)) event=this.mapEvent.get(JSCHART_EVENT_ID.DBCLICK_KLINE);
76608
76665
  if (event)
76609
76666
  {
76610
76667
  if (this.ClickChartTimer!=null) //清空单击定时器
@@ -76613,15 +76670,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
76613
76670
  this.ClickChartTimer=null;
76614
76671
  }
76615
76672
 
76616
- var data={ Tooltip:tooltip, Stock:{Symbol:this.Symbol, Name:this.Name }, X:e.clientX, Y:e.clientY };
76673
+ var data={ Tooltip:tooltip, Stock:{Symbol:this.Symbol, Name:this.Name }, X:e.clientX, Y:e.clientY, PreventDefault:false };
76617
76674
  event.Callback(event,data,this);
76675
+ if (data.PreventDefault) return;
76618
76676
  }
76619
76677
 
76620
- if (this.MinuteDialog)
76621
- {
76622
- e.data={Chart:this,Tooltip:tooltip};
76623
- this.MinuteDialog.DoModal(e);
76624
- }
76678
+ //内置弹分时图
76679
+ if (!this.PopMinuteChart) return;
76680
+
76681
+ this.ShowMinuteChartDialog({ Chart:this,Tooltip:tooltip, e:e }, x,y);
76625
76682
  }
76626
76683
 
76627
76684
  this.CancelAutoUpdate=function() //关闭停止更新
@@ -78173,7 +78230,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
78173
78230
  {
78174
78231
  this.ShowCallAuctionData({ Left:false, Right:false, MultiDay:{ Left:false, Right:false } });
78175
78232
  }
78176
- if (button.ID==JSCHART_BUTTON_ID.CLOSE_OVERLAY_INDEX)
78233
+ else if (button.ID==JSCHART_BUTTON_ID.CLOSE_OVERLAY_INDEX)
78177
78234
  {
78178
78235
  var id=button.IndexID;
78179
78236
  if (id) this.DeleteOverlayWindowsIndex(id);
@@ -79618,6 +79675,17 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
79618
79675
  [
79619
79676
  { Name:"画图工具", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:this.IsShowDrawToolDialog()},
79620
79677
  { Name:"十字光标线", Data:{ ID:JSCHART_MENU_ID.CMD_SHOW_CORSS_LINE_ID, Args:[!bShowCorss]}, Checked:bShowCorss },
79678
+ { Name:JSPopMenu.SEPARATOR_LINE_NAME },
79679
+
79680
+ {
79681
+ Name:"语言设置",
79682
+ SubMenu:
79683
+ [
79684
+ { Name:"中文", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["CN"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID },
79685
+ { Name:"英语", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["EN"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_ENGLISH_ID },
79686
+ { Name:"繁体", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_LANGUAGE_ID, Args:["TC"]}, Checked:this.LanguageID==JSCHART_LANGUAGE_ID.LANGUAGE_TRADITIONAL_CHINESE_ID },
79687
+ ]
79688
+ },
79621
79689
 
79622
79690
  {
79623
79691
  Name:"区间选择样式",
@@ -82673,10 +82741,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
82673
82741
  frame.MainFrame=subFrame.Frame;
82674
82742
  frame.ChartBorder=subFrame.Frame.ChartBorder;
82675
82743
  frame.GlobalOption=this.GlobalOption;
82676
- if (obj.ShowRightText===true) frame.IsShow=true;
82677
- else if (obj.ShowRightText===false) frame.IsShow=false;
82678
- if (obj.IsShareY===true) frame.IsShareY=true;
82744
+ if (IFrameSplitOperator.IsBool(obj.ShowRightText)) frame.IsShow=obj.ShowRightText;
82745
+ if (IFrameSplitOperator.IsBool(obj.IsShareY)) frame.IsShareY=obj.IsShareY;
82679
82746
  if (IFrameSplitOperator.IsBool(obj.IsCalculateYMaxMin)) frame.IsCalculateYMaxMin=obj.IsCalculateYMaxMin; //是否计算Y最大最小值
82747
+ if (IFrameSplitOperator.IsNumber(obj.IsShowMainFrame)) frame.IsShowMainFrame=obj.IsShowMainFrame;
82680
82748
 
82681
82749
  frame.YSplitOperator=new FrameSplitY();
82682
82750
  frame.YSplitOperator.LanguageID=this.LanguageID;
@@ -84012,6 +84080,7 @@ MinuteChartContainer.JosnDataToAfterCloseDataArray=function(data)
84012
84080
  /*
84013
84081
  历史分钟走势图
84014
84082
  */
84083
+ /* 废弃 统一使用 MinuteChartContainer
84015
84084
  function HistoryMinuteChartContainer(uielement)
84016
84085
  {
84017
84086
  this.newMethod=MinuteChartContainer; //派生
@@ -84056,17 +84125,6 @@ function HistoryMinuteChartContainer(uielement)
84056
84125
  this.TitlePaint[0].Frame=this.Frame.SubFrame[0].Frame;
84057
84126
  this.TitlePaint[0].Canvas=this.Canvas;
84058
84127
  this.TitlePaint[0].IsShowDate=true;
84059
-
84060
- /*
84061
- //主图叠加画法
84062
- var paint=new ChartOverlayKLine();
84063
- paint.Canvas=this.Canvas;
84064
- paint.ChartBorder=this.Frame.SubFrame[0].Frame.ChartBorder;
84065
- paint.ChartFrame=this.Frame.SubFrame[0].Frame;
84066
- paint.Name="Overlay-KLine";
84067
- this.OverlayChartPaint[0]=paint;
84068
- */
84069
-
84070
84128
  }
84071
84129
 
84072
84130
  //设置交易日期
@@ -84212,6 +84270,7 @@ HistoryMinuteChartContainer.JsonDataToMinuteData=function(data)
84212
84270
 
84213
84271
  return aryMinuteData;
84214
84272
  }
84273
+ */
84215
84274
 
84216
84275
  /////////////////////////////////////////////////////////////////////////////
84217
84276
  // 自定义指数
@@ -88793,142 +88852,6 @@ function KLineInfoTooltip(divElement)
88793
88852
  }
88794
88853
  }
88795
88854
 
88796
- //历史K线上双击 弹出分钟走势图框
88797
- function MinuteDialog(divElement)
88798
- {
88799
- this.newMethod=IDivDialog; //派生
88800
- this.newMethod(divElement);
88801
- delete this.newMethod;
88802
-
88803
-
88804
- this.JSChart=null;
88805
- this.Height=500;
88806
- this.Width=600;
88807
- this.Symbol;
88808
- this.TradeDate;
88809
- this.HistoryData;
88810
-
88811
- //显示窗口
88812
- this.Show=function(left,top,width,height)
88813
- {
88814
- var div=document.getElementById(this.ID);
88815
- if (!div) return false;
88816
-
88817
- var findDiv=div.getElementsByClassName("minute-hqchart");
88818
- if (!findDiv || findDiv.length!=1) return false;
88819
- var klineDiv=findDiv[0];
88820
-
88821
- if (IFrameSplitOperator.IsNumber(width)) div.style.width=width+"px";
88822
- if (IFrameSplitOperator.IsNumber(height)) div.style.height=height+"px";
88823
- if (IFrameSplitOperator.IsNumber(left)) div.style.left=left+"px";
88824
- if (IFrameSplitOperator.IsNumber(top)) div.style.top=top+"px";
88825
-
88826
- div.style.display='block';
88827
-
88828
- var klineWdith=klineDiv.offsetWidth;
88829
- var klineTop=klineDiv.offsetTop;
88830
- klineDiv.style.width=klineWdith+"px";
88831
- klineDiv.style.height=(height-klineTop-5)+"px";
88832
- }
88833
-
88834
- this.Create=function()
88835
- {
88836
- this.ID=Guid();
88837
- var div=document.createElement('div');
88838
- div.className='jchart-kline-minute-box';
88839
- div.id=this.ID;
88840
- var hqchartID=Guid();
88841
- div.innerHTML=`<div><div class='minute-dialog-title'><span></span><strong class='close-munite icon iconfont icon-close'></strong></div><div class='minute-hqchart' id='${hqchartID}' ></div></div>`;
88842
- div.style.width=this.Height+'px';
88843
- div.style.height=this.Width+'px';
88844
-
88845
- this.DivElement.appendChild(div);
88846
- this.JSChart=JSChart.Init(document.getElementById(hqchartID));
88847
-
88848
- var option=
88849
- {
88850
- Type:'历史分钟走势图',
88851
- Symbol:this.Symbol, //股票代码
88852
- IsAutoUpdate:false, //是自动更新数据
88853
-
88854
- IsShowRightMenu:false, //右键菜单
88855
- HistoryMinute: { TradeDate:this.TradeDate, IsShowName:false, IsShowDate:false } //显示的交易日期
88856
- };
88857
-
88858
- this.JSChart.SetOption(option);
88859
- }
88860
-
88861
- this.BindClose=function(chart)
88862
- {
88863
- //关闭按钮
88864
- $("#"+this.ID+" .close-munite").click(
88865
- {
88866
- Chart:chart
88867
- },
88868
- function(event)
88869
- {
88870
- var chart=event.data.Chart;
88871
- chart.MinuteDialog.Hide();
88872
- }
88873
- );
88874
- }
88875
-
88876
- this.DoModal=function(event)
88877
- {
88878
- this.UpColor=g_JSChartResource.UpTextColor;
88879
- this.DownColor=g_JSChartResource.DownTextColor;
88880
- this.UnchagneColor=g_JSChartResource.UnchagneTextColor;
88881
-
88882
- var chart=event.data.Chart;
88883
- var tooltip=event.data.Tooltip;
88884
- var dialog=chart.MinuteDialog;
88885
-
88886
- dialog.Symbol=chart.Symbol;
88887
- dialog.TradeDate=tooltip.Data.Date;
88888
-
88889
- if(!dialog) return;
88890
- if (dialog.ID==null)
88891
- {
88892
- dialog.Create(); //第1次 需要创建div
88893
- }
88894
- else
88895
- {
88896
- dialog.JSChart.JSChartContainer.TradeDate=dialog.TradeDate;
88897
- dialog.JSChart.ChangeSymbol(this.Symbol);
88898
- }
88899
-
88900
- var left=event.clientX;
88901
- var top=event.clientY+10;
88902
-
88903
- var pixelTatio=GetDevicePixelRatio();
88904
- dialog.Show(500/pixelTatio,100/pixelTatio,600,500);
88905
- dialog.JSChart.OnSize();
88906
-
88907
- this.BindClose(chart);
88908
-
88909
- this.GetColor=function(price,yclse)
88910
- {
88911
- if(price>yclse) return this.UpColor;
88912
- else if (price<yclse) return this.DownColor;
88913
- else return this.UnchagneColor;
88914
- }
88915
-
88916
- var strName = event.data.Chart.Name;
88917
- var strData=event.data.Tooltip.Data;
88918
- var date=new Date(parseInt(strData.Date/10000),(strData.Date/100%100-1),strData.Date%100);
88919
- var strDate = strData.Date.toString();
88920
- var strNewDate=strDate.substring(0,4)+"-"+strDate.substring(4,6)+"-"+strDate.substring(6,8); //转换时间格式
88921
- var str = "<span>"+strName+"</span>"+"<span>"+strNewDate+"</span>&nbsp;"+
88922
- "<span style='color:"+this.GetColor(strData.Open,strData.YClose)+";'>开:"+strData.Open.toFixed(2)+"</span>"+
88923
- "<span style='color:"+this.GetColor(strData.High,strData.YClose)+";'>高:"+strData.High.toFixed(2)+"</span>"+
88924
- "<span style='color:"+this.GetColor(strData.Low,strData.YClose)+";'>低:"+strData.Low.toFixed(2)+"</span>"+
88925
- "<span style='color:"+this.GetColor(strData.Close,strData.YClose)+";'>收:"+strData.Close.toFixed(2)+"</span>"+
88926
- "<span style='color:"+this.VolColor+";'>量:"+IFrameSplitOperator.FormatValueString(strData.Vol,2)+"</span>"+
88927
- "<span style='color:"+this.AmountColor+";'>额:"+IFrameSplitOperator.FormatValueString(strData.Amount,2)+"</span>";
88928
- $(".minute-dialog-title span").html(str);
88929
- }
88930
- }
88931
-
88932
88855
  function MinuteSelectRectDialog(divElement)
88933
88856
  {
88934
88857
  this.newMethod=IDivDialog; //派生
@@ -1496,6 +1496,48 @@ input[type="color"] {
1496
1496
  }
1497
1497
 
1498
1498
 
1499
+ /*
1500
+ 弹出分时图对话框
1501
+ */
1502
+ .jchart_pop_minute_dailog
1503
+ {
1504
+ position: absolute;
1505
+ height: 500px;
1506
+ width: 600px;
1507
+ z-index: 999;
1508
+ visibility:'hidden';
1509
+ background-color: rgba(255,255,255,0.95);
1510
+ border: solid 1px rgba(200, 210, 219, 0.92);
1511
+ display: flex;
1512
+ flex-flow: column;
1513
+ }
1514
+
1515
+ .jschart_pop_minute_chart
1516
+ {
1517
+ flex: 1
1518
+ }
1519
+
1520
+ .jschart_pop_minute_chart_Title_Div
1521
+ {
1522
+ padding-left: 2px;
1523
+ height:20px;
1524
+ border-bottom: 1px solid;
1525
+ border-color: rgb(204,204,204);
1526
+ display: flex;
1527
+ cursor: default;
1528
+ user-select: none;
1529
+ background-color:rgb(222,222,222)
1530
+ }
1531
+
1532
+ .jschart_pop_minute_chart_Close_Div
1533
+ {
1534
+ margin-left: auto;
1535
+ padding-right: 4px;
1536
+ cursor:pointer;
1537
+ }
1538
+
1539
+
1540
+
1499
1541
 
1500
1542
 
1501
1543
 
@@ -90,6 +90,12 @@ function GetBlackStyle()
90
90
  Night: { Color:"rgb(153,153,153)", BGColor:"rgb(51,51,51)", BorderColor:"rgb(51,51,51)", Margin:{ Left:5, Top:2, Bottom:2, Right:5 } },
91
91
  }
92
92
  },
93
+
94
+ PopMinuteChart:
95
+ {
96
+ BGColor:"rgba(0,0,0,0.95)",
97
+ BorderColor:"rgb(230,230,230)",
98
+ },
93
99
 
94
100
 
95
101
  DefaultTextColor: "rgb(101,104,112)",
@@ -26,6 +26,11 @@ HQData.NetworkFilter=function(data, callback)
26
26
  HQData.RequestMinuteDaysData(data, callback);
27
27
  break;
28
28
 
29
+ case "MinuteChartContainer::RequestPopMinuteData": //弹出分时图数据
30
+ //HQChart使用教程29-走势图如何对接第3方数据2-最新分时数据 格式跟这个一样
31
+ HQData.RequestPopMinuteData(data, callback);
32
+ break;
33
+
29
34
  //HQChart使用教程30-K线图如何对接第3方数据1
30
35
  case 'KLineChartContainer::RequestHistoryData': //日线全量数据下载
31
36
  //HQChart使用教程30-K线图如何对接第3方数据2-日K数据
@@ -130,39 +135,93 @@ HQData.RequestMinuteData=function(data, callback)
130
135
  var symbol=data.Request.Data.symbol[0]; //请求的股票代码
131
136
  var callcation=data.Request.Data.callcation; //集合竞价
132
137
  console.log(`[HQData::RequestMinuteData] Symbol=${symbol}`);
138
+
139
+ setTimeout(()=>{
140
+ var srcStock=MINUTE_1DAY_DATA.stock[0];
141
+ var stockItem={ date:srcStock.date, minute:srcStock.minute, yclose:srcStock.yclose, symbol:srcStock.symbol, name:srcStock.name };
142
+ if (callcation.Before)
143
+ {
144
+ var before=
145
+ [
146
+ //[交易时间, 价格,成交量, 成交金额, 日期(可选,YYYYMMDD)],
147
+ [915, srcStock.yclose,0,0],
148
+ [916, srcStock.yclose+0.01,0,0],
149
+ [917, srcStock.yclose+0.03,0,0],
150
+ [918, srcStock.yclose+0.02,0,0],
151
+ [919, srcStock.yclose+0.02,0,0],
152
+ [920, srcStock.yclose+0.01,0,0],
153
+ [921, srcStock.yclose,0,0],
154
+ [922, srcStock.yclose-0.02,0,0],
155
+ [923, srcStock.yclose-0.03,0,0],
156
+ [924, srcStock.yclose,0,0],
157
+ [925, srcStock.yclose,0,0],
158
+ ];
159
+
160
+ var beforeinfo={ totalcount:11, ver:1.0 };
161
+
162
+ stockItem.before=before;
163
+ stockItem.beforeinfo=beforeinfo;
164
+ }
165
+
166
+ var hqchartData={code:0, stock:[stockItem] };
133
167
 
134
- var srcStock=MINUTE_1DAY_DATA.stock[0];
135
- var stockItem={ date:srcStock.date, minute:srcStock.minute, yclose:srcStock.yclose, symbol:srcStock.symbol, name:srcStock.name };
136
- if (callcation.Before)
137
- {
138
- var before=
139
- [
140
- //[交易时间, 价格,成交量, 成交金额, 日期(可选,YYYYMMDD)],
141
- [915, srcStock.yclose,0,0],
142
- [916, srcStock.yclose+0.01,0,0],
143
- [917, srcStock.yclose+0.03,0,0],
144
- [918, srcStock.yclose+0.02,0,0],
145
- [919, srcStock.yclose+0.02,0,0],
146
- [920, srcStock.yclose+0.01,0,0],
147
- [921, srcStock.yclose,0,0],
148
- [922, srcStock.yclose-0.02,0,0],
149
- [923, srcStock.yclose-0.03,0,0],
150
- [924, srcStock.yclose,0,0],
151
- [925, srcStock.yclose,0,0],
152
- ];
153
-
154
- var beforeinfo={ totalcount:11, ver:1.0 };
155
-
156
- stockItem.before=before;
157
- stockItem.beforeinfo=beforeinfo;
158
- }
159
168
 
160
- var hqchartData={code:0, stock:[stockItem] };
161
-
169
+ callback(hqchartData);
170
+ }, 50);
171
+ }
162
172
 
163
- callback(hqchartData);
173
+ HQData.RequestPopMinuteData=function(data, callback)
174
+ {
175
+ data.PreventDefault=true;
176
+ var symbol=data.Request.Data.symbol[0]; //请求的股票代码
177
+ var date=data.Request.Data.date;
178
+ var callcation=data.Request.Data.callcation; //集合竞价
179
+ console.log(`[HQData::RequestPopMinuteData] Symbol=${symbol} Date=${date}`);
180
+
181
+ setTimeout(()=>{
182
+ var srcStock=MINUTE_1DAY_DATA.stock[0];
183
+ var stockItem={ date:date, minute:[], yclose:srcStock.yclose, symbol:srcStock.symbol, name:srcStock.symbol, IsHistoryMinute:true };
184
+ if (callcation.Before)
185
+ {
186
+ var before=
187
+ [
188
+ //[交易时间, 价格,成交量, 成交金额, 日期(可选,YYYYMMDD)],
189
+ [915, srcStock.yclose,0,0],
190
+ [916, srcStock.yclose+0.01,0,0],
191
+ [917, srcStock.yclose+0.03,0,0],
192
+ [918, srcStock.yclose+0.02,0,0],
193
+ [919, srcStock.yclose+0.02,0,0],
194
+ [920, srcStock.yclose+0.01,0,0],
195
+ [921, srcStock.yclose,0,0],
196
+ [922, srcStock.yclose-0.02,0,0],
197
+ [923, srcStock.yclose-0.03,0,0],
198
+ [924, srcStock.yclose,0,0],
199
+ [925, srcStock.yclose,0,0],
200
+ ];
201
+
202
+ var beforeinfo={ totalcount:11, ver:1.0 };
203
+
204
+ stockItem.before=before;
205
+ stockItem.beforeinfo=beforeinfo;
206
+ }
207
+
208
+ for(var i=0;i<srcStock.minute.length;++i)
209
+ {
210
+ var item=srcStock.minute[i];
211
+ var newItem=CloneData(item);
212
+ newItem.date=date;
213
+
214
+ stockItem.minute.push(newItem);
215
+ }
216
+
217
+ var hqchartData={code:0, stock:[stockItem] };
218
+
219
+
220
+ callback(hqchartData);
221
+ }, 50);
164
222
  }
165
223
 
224
+
166
225
  HQData.RequestMinuteDaysData=function(data, callback)
167
226
  {
168
227
  data.PreventDefault=true;