hqchart 1.1.12986 → 1.1.12988

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.
@@ -8652,7 +8652,7 @@ chart.SetSizeChange(true);chart.Draw();}});}var StockChip=chart.GetExtendChartBy
8652
8652
  {var item=chart.ExtendChartPaint[i];if(item.ClassName=='DrawToolsButton'){item.Left-=chipWidth;}}chart.DeleteExtendChart(StockChip);chart.Frame.ChartBorder.Right-=chipWidth;chart.SetSizeChange(true);chart.Draw();}});}else{data.push({text:"移动筹码",click:function click(){var option={Name:'筹码分布',ShowType:1,Width:230};var extendChart=chart.CreateExtendChart(option.Name,option);//创建扩展图形
8653
8653
  chart.SetSizeChange(true);chart.Draw();}});}return data;};//缺口提示
8654
8654
  this.GetPriceGap=function(chart){var klineChart=chart.ChartPaint[0];var priceGap=klineChart.PriceGap;var data=[{text:"显示1个缺口",click:function click(){chart.ChangePriceGap({Enable:true,Count:1});}},{text:"显示2个缺口",click:function click(){chart.ChangePriceGap({Enable:true,Count:2});}},{text:"显示3个缺口",click:function click(){chart.ChangePriceGap({Enable:true,Count:3});}},{text:"隐藏缺口",click:function click(){chart.ChangePriceGap({Enable:false});}}];if(!priceGap.Enable||priceGap.Count<=0){data[data.length-1].selected=true;//选中
8655
- }else if(priceGap.Enable&&priceGap.Count>0){var index=priceGap.Count;if(index>data.length-2)index=data.length-2;data[index].selected=true;//选中
8655
+ }else if(priceGap.Enable&&priceGap.Count>0){var index=priceGap.Count-1;if(index>data.length-2)index=data.length-2;data[index].selected=true;//选中
8656
8656
  }return data;};this.GetKLineInfo=function(chart){var setInfo=new _set2.default();for(var i in chart.ChartInfo){var item=chart.ChartInfo[i];setInfo.add(item.ClassName);}var aryKLineInfo=["公告","业绩预告","调研","大宗交易","龙虎榜","互动易"];var data=[];for(var i in aryKLineInfo){var infoName=aryKLineInfo[i];var classInfo=JSKLineInfoMap.GetClassInfo(infoName);if(!classInfo)continue;var item=this.CreateKlineInfoItem(infoName,setInfo.has(classInfo.ClassName),chart);data.push(item);}if(chart.ChartInfo.length>0){data[data.length-1].isBorder=true;var item={text:'删除所有',click:function click(){chart.ClearKLineInfo();}};data.push(item);}return data;};this.CreateKlineInfoItem=function(infoName,bExist,chart){var item={text:infoName,selected:bExist};if(bExist)item.click=function(){chart.DeleteKLineInfo(infoName);};else item.click=function(){chart.AddKLineInfo(infoName,true);};return item;};this.DoModal=function(event){var chart=event.data.Chart;var rightMenu=chart.RightMenu;var x=event.offsetX;var y=event.offsetY;var dataList=[{text:"分析周期",children:this.GetPeriod(chart)},{text:"复权处理",children:this.GetRight(chart)},{text:"指标切换",children:this.GetIndex(chart)},{text:"五彩K线",children:this.GetColorIndex(chart)},{text:'专家系统',children:this.GetTradeIndex(chart)},{text:'信息地雷',children:this.GetKLineInfo(chart)},{text:'缺口提示',children:this.GetPriceGap(chart)},{text:"叠加品种",children:this.GetOverlay(chart)},{text:'主图线型',children:this.GetKLineType(chart)},{text:"坐标类型",children:this.GetCoordinateType(chart)},{text:'指标窗口个数',children:this.GetIndexWindowCount(chart)},{text:'鼠标拖拽',children:this.GetDragModeType(chart)},{text:"工具",children:this.GetTools(chart)}];var upperSymbol=chart.Symbol.toUpperCase();if(MARKET_SUFFIX_NAME.IsSHSZIndex(chart.Symbol)||MARKET_SUFFIX_NAME.IsBIT(upperSymbol)){dataList.splice(1,1);}var identify=event.data.FrameID;var overlayIndex=this.GetOverlayIndex(chart,identify);if(overlayIndex&&overlayIndex.length>0){var delOverlayIndexMenu={text:'删除叠加指标',children:this.GetDeleteOverlayIndex(chart,overlayIndex)};dataList.splice(3,0,delOverlayIndexMenu);}JSConsole.Chart.Log('[KLineRightMenu::DoModal]',identify);rightMenu.Show({windowIndex:identify,x:x+chart.UIElement.offsetLeft,y:y+chart.UIElement.offsetTop,position:chart.Frame.Position,data:dataList});(0,_jquery2.default)(document).click(function(){rightMenu.Hide();});};this.GetOverlayIndex=function(chart,windowsIndex){if(windowsIndex>=chart.Frame.SubFrame.length||windowsIndex<0)return[];var result=[];var item=chart.Frame.SubFrame[windowsIndex];for(var i in item.OverlayIndex){var overlayItem=item.OverlayIndex[i];result.push({Name:overlayItem.Script.Name,Identify:overlayItem.Identify});}return result;};this.GetDeleteOverlayIndex=function(chart,overlayIndex){var data=[];var _loop4=function _loop4(){var identify=overlayIndex[i].Identify;data.push({text:overlayIndex[i].Name,click:function click(){chart.DeleteOverlayWindowsIndex(identify);}});};for(var i in overlayIndex){_loop4();}return data;};}//K线区间选择右键菜单
8657
8657
  function KLineSelectRightMenu(divElement){this.newMethod=KLineRightMenu;//派生
8658
8658
  this.newMethod(divElement);delete this.newMethod;this.DoModal=function(event){var chart=event.data.Chart;var rightMenu=this;var x=event.data.X;var y=event.data.Y;var dataList=[{text:"区间统计",click:function click(){JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间统计');rightMenu.Hide();var dialog=new KLineSelectRectDialog(divElement);dialog.DoModal(event);}},{text:'区间放大',click:function click(){JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间放大');var chart=event.data.Chart;chart.ShowSelectData(event.data.SelectData);}}];rightMenu.Show({x:x,y:y,position:chart.Frame.Position,data:dataList});};this.Show=function(obj){var _self=this;_jquery2.default.extend(_self.option,obj);//判断是否重复创建
@@ -12622,7 +12622,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
12622
12622
  this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
12623
12623
  * 版本信息输出
12624
12624
  *
12625
- */var HQCHART_VERSION="1.1.12985";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
12625
+ */var HQCHART_VERSION="1.1.12987";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
12626
12626
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
12627
12627
  // BaseIndex:BaseIndex,
12628
12628
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.12986",
3
+ "version": "1.1.12988",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -84227,7 +84227,7 @@ function KLineRightMenu(divElement)
84227
84227
  }
84228
84228
  else if (priceGap.Enable && priceGap.Count>0)
84229
84229
  {
84230
- var index=priceGap.Count;
84230
+ var index=priceGap.Count-1;
84231
84231
  if (index>data.length-2) index=data.length-2;
84232
84232
  data[index].selected=true; //选中
84233
84233
  }
@@ -88119,7 +88119,7 @@ function KLineRightMenu(divElement)
88119
88119
  }
88120
88120
  else if (priceGap.Enable && priceGap.Count>0)
88121
88121
  {
88122
- var index=priceGap.Count;
88122
+ var index=priceGap.Count-1;
88123
88123
  if (index>data.length-2) index=data.length-2;
88124
88124
  data[index].selected=true; //选中
88125
88125
  }
@@ -129521,7 +129521,7 @@ function ScrollBarBGChart()
129521
129521
 
129522
129522
 
129523
129523
 
129524
- var HQCHART_VERSION="1.1.12985";
129524
+ var HQCHART_VERSION="1.1.12987";
129525
129525
 
129526
129526
  function PrintHQChartVersion()
129527
129527
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12985";
8
+ var HQCHART_VERSION="1.1.12987";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -88163,7 +88163,7 @@ function KLineRightMenu(divElement)
88163
88163
  }
88164
88164
  else if (priceGap.Enable && priceGap.Count>0)
88165
88165
  {
88166
- var index=priceGap.Count;
88166
+ var index=priceGap.Count-1;
88167
88167
  if (index>data.length-2) index=data.length-2;
88168
88168
  data[index].selected=true; //选中
88169
88169
  }
@@ -129679,7 +129679,7 @@ function HQChartScriptWorker()
129679
129679
 
129680
129680
 
129681
129681
 
129682
- var HQCHART_VERSION="1.1.12985";
129682
+ var HQCHART_VERSION="1.1.12987";
129683
129683
 
129684
129684
  function PrintHQChartVersion()
129685
129685
  {