Skip to content

Commit

Permalink
ver 7705
Browse files Browse the repository at this point in the history
7705 py 修正 ZIG, TROUGHBARS,PEAKBARS 执行异常
  • Loading branch information
jones2000 committed Dec 24, 2019
1 parent b1922ff commit 1e90082
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion umychart_python/umychart_complier_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def CalculateZIGLine(firstData,secondData,thridData,data,result) :
for lineItem in lineData :
result[lineItem.ID]=lineItem.Value

if thridData.ID==data.length-1: # 最后一组数据
if thridData.ID==len(data)-1: # 最后一组数据
# 最后2个点的数据连成线
lineCache=Variant()
lineCache.Start, lineCache.End = Variant(), Variant()
Expand Down
12 changes: 6 additions & 6 deletions umychart_python/umychart_complier_jsalgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2561,8 +2561,8 @@ def ZIG(self,data,n) :
lastData.ID, lastData.Value =i, item

# 计算最后1组数据
thridData.ID=data.length-1,
thridData.Value=data[data.length-1],
thridData.ID=len(data)-1
thridData.Value=data[len(data)-1]
thridData.Up=not secondData.Up
JSComplierHelper.CalculateZIGLine(firstData,secondData,thridData,data,result)

Expand All @@ -2575,10 +2575,10 @@ def ZIG(self,data,n) :
def TROUGHBARS(self,data,n,n2) :
zigData=self.ZIG(data,n) # 计算ZIG
zigDataLen=len(zigData)
dataLen=len(data)
dataLen=len(zigData)
result=JSComplierHelper.CreateArray(dataLen)

for i in range(len(zigDataLen)) :
for i in range(zigDataLen) :
if JSComplierHelper.IsNumber(zigData[i]) :
break

Expand Down Expand Up @@ -2616,10 +2616,10 @@ def TROUGHBARS(self,data,n,n2) :
def PEAKBARS(self, data,n,n2) :
zigData=self.ZIG(data,n) # 计算ZIG
zigDataLen=len(zigData)
dataLen=len(data)
dataLen=len(zigData)
result=JSComplierHelper.CreateArray(dataLen)

for i in range(len(zigDataLen)) :
for i in range(zigDataLen) :
if JSComplierHelper.IsNumber(zigData[i]) :
break

Expand Down
6 changes: 5 additions & 1 deletion vuehqchart/src/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -29893,7 +29893,11 @@ function MarketLongShortIndex()

this.CreateChart=function(id)
{
if (id==2) return new ChartLine();
if (id==2){
var newChartLine = new ChartLine();
newChartLine.LineWidth = 2;
return newChartLine;
}

return new ChartStraightLine();
}
Expand Down
6 changes: 5 additions & 1 deletion vuehqchart/src/jscommon/umychart.vue/umychart.vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -33252,7 +33252,11 @@ function MarketLongShortIndex()

this.CreateChart=function(id)
{
if (id==2) return new ChartLine();
if (id==2){
var newChartLine = new ChartLine();
newChartLine.LineWidth = 2;
return newChartLine;
}

return new ChartStraightLine();
}
Expand Down
6 changes: 5 additions & 1 deletion webhqchart.demo/jscommon/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -29893,7 +29893,11 @@ function MarketLongShortIndex()

this.CreateChart=function(id)
{
if (id==2) return new ChartLine();
if (id==2){
var newChartLine = new ChartLine();
newChartLine.LineWidth = 2;
return newChartLine;
}

return new ChartStraightLine();
}
Expand Down
6 changes: 5 additions & 1 deletion webhqchart/umychart.js
Original file line number Diff line number Diff line change
Expand Up @@ -29893,7 +29893,11 @@ function MarketLongShortIndex()

this.CreateChart=function(id)
{
if (id==2) return new ChartLine();
if (id==2){
var newChartLine = new ChartLine();
newChartLine.LineWidth = 2;
return newChartLine;
}

return new ChartStraightLine();
}
Expand Down

0 comments on commit 1e90082

Please sign in to comment.