Open riley-steele-parsons opened 6 years ago
I encountered the same issue while migrating from an old version of plottable to 3.8.x. This can be traced back to changes made to the arguments of the functions Rectangle.prototype.x2 = function (x2, postScale) {...}
and Rectangle.prototype.y2 = function (y2, postScale) {...}
.
You can fix your example by excluding xScale
and yScale
respectively from said functions:
...
var plot = new Plottable.Plots.Rectangle();
plot.addDataset(new Plottable.Dataset(data));
plot
.x(function(d) {
return d.x;
}, xScale)
.y(function(d) {
return d.y;
}, yScale)
.x2(function(d) {
return d.x2;
})
.y2(function(d) {
return d.y2;
})
.attr("fill", function(d) {
return d.fill;
})
.attr("stroke", function() {
return "#000000";
})
.attr("stroke-width", function() {
return 4;
});
plot.renderTo(this._rootNode);
...
@themadcreator, can you comment as to whether this is expected behavior?
Hello. I'm attempting to render a plottable.js rectangle plot within a React app. I repeatedly am seeing the same error:
I've replicated this same error within the Mondrian example inside of a codesandbox, see below.
Bug report
Live example URL: https://codesandbox.io/s/xlqn2mnwyw
Expected behavior
It should render properly.
Actual behavior
It does not.