Skip to content

Commit

Permalink
Fix error w3c#488
Browse files Browse the repository at this point in the history
  • Loading branch information
almossawi committed Oct 22, 2015
1 parent 304ed6a commit 7f2e30e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion dist/metricsgraphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,7 @@ function mg_find_min_max_x(args) {
return Math.max.apply(null, trio);
});
}

//if data set is of length 1, expand the range so that we can build the x-axis
if (min_x === max_x
&& !(args.min_x && args.max_x)
Expand Down Expand Up @@ -2858,12 +2859,13 @@ MG.button_layout = function(target) {
.rollup(function(v) { return v[0]; })
.entries(d3.merge(args.data.map(function(d) { return d; })))
.map(function(d) { return d.values; });

//add the voronoi rollovers
g.selectAll('path')
.data(voronoi(data_nested))
.enter()
.append('path')
.filter(function(d) { return d !== undefined; })
.filter(function(d) { return d !== undefined && d.length > 0; })
.attr("d", function(d) { return "M" + d.join("L") + "Z"; })
.datum(function(d) { return d.point; }) //because of d3.nest, reassign d
.attr('class', function(d) {
Expand Down Expand Up @@ -4697,6 +4699,7 @@ function raw_data_transformation(args) {
}
}

//if the y_accessor is an array, break it up and store the result in args.data
if (args.y_accessor instanceof Array) {
args.data = args.data.map(function(_d) {
return args.y_accessor.map(function(ya) {
Expand Down
3 changes: 0 additions & 3 deletions dist/metricsgraphics.min.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/js/charts/line.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/js/common/x_axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ function mg_find_min_max_x(args) {
return Math.max.apply(null, trio);
});
}

//if data set is of length 1, expand the range so that we can build the x-axis
if (min_x === max_x
&& !(args.min_x && args.max_x)
Expand Down
1 change: 1 addition & 0 deletions src/js/misc/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function raw_data_transformation(args) {
}
}

//if the y_accessor is an array, break it up and store the result in args.data
if (args.y_accessor instanceof Array) {
args.data = args.data.map(function(_d) {
return args.y_accessor.map(function(ya) {
Expand Down

0 comments on commit 7f2e30e

Please sign in to comment.