Skip to content

Commit

Permalink
See DmitryBaranovskiy#137: More refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspotteddog committed Jul 8, 2012
1 parent eec6419 commit 18c3170
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
10 changes: 0 additions & 10 deletions g.line.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@

var axis = paper.set();

if (opts.axis) {
var ax = (opts.axis + "").split(/[,\s]+/);
//(+ax[0] || +ax[2]) && chartinst.grid(x + gutter, gutter + 10, width - 2 * gutter, height - 2 * gutter, opts.axisxstep || Math.floor((width - 2 * gutter) / 20), 0, paper);
if (+ax[1] || +ax[3]) {
var grid = chartinst.grid(x + gutter, y + height - gutter, width - 2 * gutter, height - 2 * gutter, opts.axisystep || Math.floor((height - 2 * gutter) / 20), 1, paper);
chart.yaxis = grid;
axis.push(grid);
}
}

if (opts.axis) {
var axisLabelsInside = 1;
if (opts.axisLabelsInside) {
Expand Down
37 changes: 0 additions & 37 deletions g.raphael.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,43 +789,6 @@ Raphael.g = {
return { from: f, to: t, power: i };
},

grid: function (x, y, width, height, steps, orientation, paper) {
steps = steps || 10;
paper = arguments[arguments.length-1] //paper is always last argument

var grid = [];

if (+orientation == 1 || +orientation == 3) {
var Y = y;
var dx = height / steps;

while (Y >= y - height) {
grid = grid.concat(["M", x, Y, "l", width, 0]);
Y -= dx;
}
} else {
var X = x;
var dx = width / steps;

while (X <= x + width) {
grid = grid.concat(["M", X, y, "l", 0, height]);
X += dx;
}
grid = grid.concat(["M", X, y, "l", 0, height]);
}

var grid = paper.path(grid);
grid.attr ("stroke", "#efefef");

var res = paper.path(grid);

res.remove = function () {
this.constructor.prototype.remove.call(this);
};

return res;
},

axis: function (x, y, length, from, to, steps, orientation, labels, type, dashsize, paper) {
dashsize = dashsize == null ? 2 : dashsize;
type = type || "t";
Expand Down

0 comments on commit 18c3170

Please sign in to comment.