Skip to content

Instantly share code, notes, and snippets.

@trotter
Created April 1, 2011 02:09
Show Gist options
  • Select an option

  • Save trotter/897626 to your computer and use it in GitHub Desktop.

Select an option

Save trotter/897626 to your computer and use it in GitHub Desktop.
r = Raphael("jobs-graph", 640, 120);
rect = r.rect(481, 30, 7, 90);
rect.attr({stroke: "none",
fill: "#446093"});
r = Raphael("jobs-graph", 640, 140);
text = r.text(490, 130, "Clinton");
text.attr({"font-family": "8px Courier",
fill: "#9c9c9b"});
hover = r.rect(481, 0, 8, 120);
hover.attr({stroke: "none",
"fill": "#fff",
"fill-opacity": 0});
$(hover.node).hover(function () {
rect.attr({"stroke": "#000"});
}, function () {
rect.attr({"stroke": "none"});
});
r = Raphael("usa", 637, 432);
path = r.path("M352,226L401,224L403,227L399,232L407,231L408,233L404,235L406,236L405,237L405,238L404,238L404,240L403,239L402,240L403,240L402,242L404,244L401,246L401,248L399,248L400,250L399,249L398,250L399,251L398,251L398,255L397,256L396,256L395,258L394,257L396,259L394,259L395,260L394,262L393,261L394,264L392,265L394,266L391,266L392,267L391,267L391,269L393,269L392,270L393,269L392,270L393,272L394,271L393,273L392,274L392,275L358,276L358,269L354,269L353,268L353,242L350,226L352,226Z");
path.attr({fill: "#3081c2",
stroke: "#828282"});
path.animate({scale: [2, 2]}, 1000);
r = Raphael("nissan", 1264, 568);
r.image("http://www.nissanusa.com/ev/media/images/learn/nodes/3/3i1.png", 672, 301, 48, 48);
circle = r.circle(213, 244, 5);
circle.attr({stroke: "#a2c9e3",
"stroke-width": 4,
"stroke-opacity": 0.6});
r = 30 * Math.PI / 180;
startX = Math.cos(r) * 7 + 213;
startY = Math.sin(r) * 7 + 244;
path = ["M", startX, startY, "l300,100"];
r.path(path);
circle.click(function () {
circle.animate({cx: 513,
cy: 344},
1000,
"elastic");
});
circle.attr({fill: "270-#58a0ff-#5fe2fe",
stroke: "none"});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment