Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: inquus/g.raphael
base: f6f32595fb
...
head fork: inquus/g.raphael
compare: c362096a72
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 05, 2012
Matt Farmer Allow for manual setting of minimum and maximum points via opts object.
This enables opts.minx, opts.miny, opts.maxx, opts.maxy for overridding the default
scaling of the graph.
b75b562
Matt Farmer Add the ability to disable horizontal and vertical axis lines.
Adds two axis options, noverticalline and nohorizontalline.
66c331c
Matt Farmer Add ability to change the axis label color.
This adds an additional axis option, "labelcolor" that allows you to specify an HTML
color string to set the color of the axis labels.
c362096
Showing with 7 additions and 5 deletions.
  1. +4 −4 g.line.js
  2. +3 −1 g.raphael.js
View
8 g.line.js
@@ -100,11 +100,11 @@
var allx = Array.prototype.concat.apply([], valuesx),
ally = Array.prototype.concat.apply([], valuesy),
xdim = chartinst.snapEnds(Math.min.apply(Math, allx), Math.max.apply(Math, allx), valuesx[0].length - 1),
- minx = xdim.from,
- maxx = xdim.to,
+ minx = opts.minx || xdim.from,
+ maxx = opts.maxx || xdim.to,
ydim = chartinst.snapEnds(Math.min.apply(Math, ally), Math.max.apply(Math, ally), valuesy[0].length - 1),
- miny = ydim.from,
- maxy = ydim.to,
+ miny = opts.miny || ydim.from,
+ maxy = opts.maxy || ydim.to,
kx = (width - gutter * 2) / ((maxx - minx) || 1),
ky = (height - gutter * 2) / ((maxy - miny) || 1),
symbolwidth = (opts.width || 2) * 3;
View
4 g.raphael.js
@@ -828,12 +828,14 @@ Raphael.g = {
opts = opts || {};
var path = type == "|" || type == " " ? ["M", x + .5, y, "l", 0, .001] : orientation == 1 || orientation == 3 ? ["M", x + .5, y, "l", 0, -length] : ["M", x, y + .5, "l", length, 0],
+ path = (opts.noverticalline && (orientation == 1 || orientation == 3)) ? [] : path,
+ path = (opts.nohorizontalline && (orientation == 0 || orientation == 2)) ? [] : path,
ends = this.snapEnds(from, to, steps),
f = ends.from,
t = ends.to,
i = ends.power,
j = 0,
- txtattr = { font: "11px 'Fontin Sans', Fontin-Sans, sans-serif" },
+ txtattr = { font: "11px 'Fontin Sans', Fontin-Sans, sans-serif", 'fill': (opts.labelcolor) ? opts.labelcolor : '#000000'},
text = paper.set(),
d = (t - f) / steps,
horizontalLabels = (opts.horizontalLabels == undefined) ? true : opts.horizontalLabels,

No commit comments for this range

Something went wrong with that request. Please try again.