Skip to content

Commit

Permalink
Removed Error Second Version
Browse files Browse the repository at this point in the history
  • Loading branch information
WiednerF committed Jan 13, 2017
1 parent 872bf75 commit 4a11425
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ export class GraphHistogramComponent implements OnChanges, AfterViewInit {
type: 'histogram',
autobinx: false,
xbins: {
start: this.arrayMin(this.points[i].x),
end: this.arrayMax(this.points[i].x),
start: 0,
end: 100,
size: this.size
}
});
Expand All @@ -119,11 +119,13 @@ export class GraphHistogramComponent implements OnChanges, AfterViewInit {
let update1: any = {x: [], xbins: []};
for (let i: number = 0; i < changes.points.currentValue.length; i++) {
update1.x.push(changes.points.currentValue[i].x);//Calculates the changes for each trace again
update1.xbins.push({
start: this.arrayMin(changes.points.currentValue[i].x),
end: this.arrayMax(changes.points.currentValue[i].x),
size: this.size
});
if(changes.points.currentValue[i].x!=[] && changes.points.currentValue[i].x.length>=0) {
update1.xbins.push({
start: this.arrayMin(changes.points.currentValue[i].x),
end: this.arrayMax(changes.points.currentValue[i].x),
size: this.size
});
}
}
Plotly.restyle(graphDiv, update1);//Update and change range of percentile, if wanted
if (this.xAxisPercentile && !this.layout.xaxis.autorange) {
Expand Down

0 comments on commit 4a11425

Please sign in to comment.