Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into fix/elastic#1962
  • Loading branch information
Juan Thomassie committed Jan 19, 2015
2 parents 5ceebf1 + efb5858 commit a2d892f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/kibana/components/vislib/lib/handler/types/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ define(function (require) {
}),
yAxis: new YAxis({
el : vis.el,
yMin : data.getYMinValue(),
yMax : data.getYMaxValue(),
_attr: vis._attr
})
Expand Down
2 changes: 1 addition & 1 deletion src/kibana/components/vislib/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ define(function (require) {
this.el = $el.get ? $el.get(0) : $el;
this.ChartClass = chartTypes[config.type];
this._attr = _.defaults(config || {}, {
defaultYMin: false
defaultYMin: true
});
this.eventTypes = {
enabled: []
Expand Down
5 changes: 4 additions & 1 deletion test/unit/specs/vislib/lib/y_axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ define(function (require) {
yAxisDiv = el.append('div')
.attr('class', 'y-axis-div');

dataObj = new Data(data, {});
dataObj = new Data(data, {
defaultYMin: true
});
yAxis = new YAxis({
el: node,
yMin: dataObj.getYMinValue(),
yMax: dataObj.getYMaxValue(),
_attr: {
margin: { top: 0, right: 0, bottom: 0, left: 0 }
Expand Down

0 comments on commit a2d892f

Please sign in to comment.