Skip to content

Commit

Permalink
Merge branch 'fix/elastic#1962' of github.com:stormpython/kibana into…
Browse files Browse the repository at this point in the history
… fix/elastic#1962
  • Loading branch information
stormpython committed Jan 20, 2015
2 parents ebe4e22 + a1b6e77 commit a338984
Show file tree
Hide file tree
Showing 8 changed files with 366 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/kibana/components/vislib/visualizations/area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ define(function (require) {

// Draw line at yScale 0 value
svg.append('line')
.attr('class', 'zero-line')
.attr('x1', 0)
.attr('y1', yScale(0))
.attr('x2', width)
Expand All @@ -352,6 +353,7 @@ define(function (require) {

// chart base line
var line = svg.append('line')
.attr('class', 'base-line')
.attr('x1', 0)
.attr('y1', height)
.attr('x2', width)
Expand Down
2 changes: 2 additions & 0 deletions src/kibana/components/vislib/visualizations/line_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ define(function (require) {

// Draw line at yScale 0 value
svg.append('line')
.attr('class', 'zero-line')
.attr('x1', 0)
.attr('y1', yScale(0))
.attr('x2', width)
Expand All @@ -280,6 +281,7 @@ define(function (require) {

var line = svg
.append('line')
.attr('class', 'base-line')
.attr('x1', startLineX)
.attr('y1', height)
.attr('x2', width)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/specs/plugins/vis_types/vislib/_renderbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ define(function (require) {
it('should create a new Vis object when params change', function () {
// called on init
expect(createVisSpy.callCount).to.be(1);
renderbot.updateParams();
renderbot.updateParams(_.clone(params));
// not called again, same params
expect(createVisSpy.callCount).to.be(1);
renderbot.vis.params = { one: 'fishy', two: 'fishy' };
Expand Down
152 changes: 152 additions & 0 deletions test/unit/specs/vislib/fixture/mock_data/date_histogram/_series_neg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
define(function (require) {
var moment = require('moment');

return {
'label': '',
'xAxisLabel': '@timestamp per 30 sec',
'ordered': {
'date': true,
'min': 1411761457636,
'max': 1411762357636,
'interval': 30000
},
'yAxisLabel': 'Count of documents',
'series': [
{
'values': [
{
'x': 1411761450000,
'y': -41
},
{
'x': 1411761480000,
'y': -18
},
{
'x': 1411761510000,
'y': -22
},
{
'x': 1411761540000,
'y': -17
},
{
'x': 1411761570000,
'y': -17
},
{
'x': 1411761600000,
'y': -21
},
{
'x': 1411761630000,
'y': -16
},
{
'x': 1411761660000,
'y': -17
},
{
'x': 1411761690000,
'y': -15
},
{
'x': 1411761720000,
'y': -19
},
{
'x': 1411761750000,
'y': -11
},
{
'x': 1411761780000,
'y': -13
},
{
'x': 1411761810000,
'y': -24
},
{
'x': 1411761840000,
'y': -20
},
{
'x': 1411761870000,
'y': -20
},
{
'x': 1411761900000,
'y': -21
},
{
'x': 1411761930000,
'y': -17
},
{
'x': 1411761960000,
'y': -20
},
{
'x': 1411761990000,
'y': -13
},
{
'x': 1411762020000,
'y': -14
},
{
'x': 1411762050000,
'y': -25
},
{
'x': 1411762080000,
'y': -17
},
{
'x': 1411762110000,
'y': -14
},
{
'x': 1411762140000,
'y': -22
},
{
'x': 1411762170000,
'y': -14
},
{
'x': 1411762200000,
'y': -19
},
{
'x': 1411762230000,
'y': -22
},
{
'x': 1411762260000,
'y': -17
},
{
'x': 1411762290000,
'y': -8
},
{
'x': 1411762320000,
'y': -15
},
{
'x': 1411762350000,
'y': -4
}
]
}
],
'hits': 533,
'xAxisFormatter': function (thing) {
return moment(thing);
},
'tooltipFormatter': function (d) {
return d;
}
};
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
define(function (require) {
var moment = require('moment');

return {
'label': '',
'xAxisLabel': '@timestamp per 30 sec',
'ordered': {
'date': true,
'min': 1411761457636,
'max': 1411762357636,
'interval': 30000
},
'yAxisLabel': 'Count of documents',
'series': [
{
'values': [
{
'x': 1411761450000,
'y': 41
},
{
'x': 1411761480000,
'y': 18
},
{
'x': 1411761510000,
'y': -22
},
{
'x': 1411761540000,
'y': -17
},
{
'x': 1411761570000,
'y': -17
},
{
'x': 1411761600000,
'y': -21
},
{
'x': 1411761630000,
'y': -16
},
{
'x': 1411761660000,
'y': 17
},
{
'x': 1411761690000,
'y': 15
},
{
'x': 1411761720000,
'y': 19
},
{
'x': 1411761750000,
'y': 11
},
{
'x': 1411761780000,
'y': -13
},
{
'x': 1411761810000,
'y': -24
},
{
'x': 1411761840000,
'y': -20
},
{
'x': 1411761870000,
'y': -20
},
{
'x': 1411761900000,
'y': -21
},
{
'x': 1411761930000,
'y': 17
},
{
'x': 1411761960000,
'y': 20
},
{
'x': 1411761990000,
'y': -13
},
{
'x': 1411762020000,
'y': -14
},
{
'x': 1411762050000,
'y': 25
},
{
'x': 1411762080000,
'y': -17
},
{
'x': 1411762110000,
'y': -14
},
{
'x': 1411762140000,
'y': -22
},
{
'x': 1411762170000,
'y': -14
},
{
'x': 1411762200000,
'y': 19
},
{
'x': 1411762230000,
'y': 22
},
{
'x': 1411762260000,
'y': 17
},
{
'x': 1411762290000,
'y': 8
},
{
'x': 1411762320000,
'y': -15
},
{
'x': 1411762350000,
'y': -4
}
]
}
],
'hits': 533,
'xAxisFormatter': function (thing) {
return moment(thing);
},
'tooltipFormatter': function (d) {
return d;
}
};
});
2 changes: 1 addition & 1 deletion test/unit/specs/vislib/lib/y_axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ define(function (require) {
});
});
});
});
});
Loading

0 comments on commit a338984

Please sign in to comment.