Skip to content

Commit

Permalink
fixing some problems, should work ok now
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Sep 14, 2016
1 parent 727eecc commit e07027c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ui/public/vislib/lib/axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default function AxisFactory(Private) {
}
})());
});
const length = _.max(lengths);
const length = lengths.length > 0 ? _.max(lengths) : 0;

if (self.isHorizontal()) {
selection.attr('height', length);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/vislib/lib/axis_scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default function AxisScaleFactory(Private) {

if (!this.isUserDefined() && !this.isOrdinal() && !this.isTimeDomain()) this.scale.nice(); // round extents when not user defined
// Prevents bars from going off the chart when the y extents are within the domain range
if (this.axis._attr.type === 'histogram') this.scale.clamp(true);
if (this.axis._attr.type === 'histogram' && this.scale.clamp) this.scale.clamp(true);

this.validateScale(this.scale);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ define(function () {
selection.each(function () {
const div = d3.select(this);

div.call(setWidth, yAxis);
//div.call(setWidth, yAxis);

div.selectAll('.y-axis-div')
.append('div')
Expand Down
2 changes: 0 additions & 2 deletions src/ui/public/vislib/visualizations/area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ export default function AreaChartFactory(Private) {
return xScale(d.x) + xScale.rangeBand() / 2;
})
.attr('cy', function cy(d, i, j) {
const yScale = self.handler.valueAxes[0].getScale();

if (isOverlapping) {
return yScale(d.y);
}
Expand Down

0 comments on commit e07027c

Please sign in to comment.