hqchart 1.1.12513 → 1.1.12522

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.
@@ -98,6 +98,7 @@ function IChartPainting()
98
98
  this.Name; //名称
99
99
  this.ClassName = 'IChartPainting'; //类名
100
100
  this.Data = new ChartData(); //数据区
101
+ this.Script; //图形对应的指标脚本 (只有指标图形才有)
101
102
 
102
103
  this.NotSupportMessage = null;
103
104
  this.MessageFont = g_JSChartPaintResource.Index.NotSupport.Font;
@@ -123,6 +124,13 @@ function IChartPainting()
123
124
  return isMinute
124
125
  }
125
126
 
127
+ //是否隐藏指标
128
+ this.IsHideScriptIndex=function()
129
+ {
130
+ if (this.Script && this.Script.IsShow==false) return true;
131
+ return false;
132
+ }
133
+
126
134
  this.DrawNotSupportmessage = function ()
127
135
  {
128
136
  this.Canvas.font = this.MessageFont;
@@ -3303,6 +3311,7 @@ function ChartLine()
3303
3311
  this.Draw = function ()
3304
3312
  {
3305
3313
  if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
3314
+ if (this.IsHideScriptIndex()) return;
3306
3315
  if (this.NotSupportMessage)
3307
3316
  {
3308
3317
  this.DrawNotSupportmessage();
@@ -3804,6 +3813,7 @@ function ChartStick()
3804
3813
  this.DrawLine = function ()
3805
3814
  {
3806
3815
  if (this.ChartFrame.IsMinSize) return;
3816
+ if (this.IsHideScriptIndex()) return;
3807
3817
  if (!this.Data || !this.Data.Data) return;
3808
3818
 
3809
3819
  var isHScreen = (this.ChartFrame.IsHScreen === true);
@@ -3915,7 +3925,7 @@ function ChartLineStick()
3915
3925
  this.Draw = function ()
3916
3926
  {
3917
3927
  if (!this.IsShow || this.ChartFrame.IsMinSize) return;
3918
-
3928
+ if (this.IsHideScriptIndex()) return;
3919
3929
  if (this.NotSupportMessage)
3920
3930
  {
3921
3931
  this.DrawNotSupportmessage();
@@ -5936,6 +5946,7 @@ function ChartMACD()
5936
5946
  this.Draw = function ()
5937
5947
  {
5938
5948
  if (this.ChartFrame.IsMinSize || !this.IsVisible) return;
5949
+ if (this.IsHideScriptIndex()) return;
5939
5950
  if (this.NotSupportMessage)
5940
5951
  {
5941
5952
  this.DrawNotSupportmessage();
@@ -7010,6 +7021,7 @@ function ChartVolStick()
7010
7021
  this.Draw = function ()
7011
7022
  {
7012
7023
  if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
7024
+ if (this.IsHideScriptIndex()) return;
7013
7025
  if (this.ChartFrame.IsHScreen === true)
7014
7026
  {
7015
7027
  this.HScreenDraw();
@@ -216,6 +216,8 @@ function ScriptIndex(name, script, args, option)
216
216
  this.TitleFont=g_JSChartResource.DynamicTitleFont; //标题字体
217
217
  this.IsShortTitle=false; //是否显示指标参数
218
218
 
219
+ this.IsShow=true; //是否显示图形
220
+
219
221
  if (option)
220
222
  {
221
223
  if (option.FloatPrecision >= 0) this.FloatPrecision = option.FloatPrecision;
@@ -1476,6 +1478,10 @@ function ScriptIndex(name, script, args, option)
1476
1478
  {
1477
1479
  if (this.Name) chart.IndexName=this.Name;
1478
1480
  else if (this.ID) chart.IndexName==this.ID;
1481
+
1482
+ if (this.ID) chart.IndexID=this.ID;
1483
+
1484
+ chart.Script=this; //指标内容绑定上去
1479
1485
  }
1480
1486
  }
1481
1487