Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
cq(640, 480).drawImage(image, 0, 0).fillStyle("#ff0000").fillRect(64, 64, 32, 32).blur().appendTo("body");
window.onload = function () {
var r = Raphael("holder");
var pie = r.g.piechart(
120, 140, 100,
[35349.7,41085],
{legend: ["%%.% – Расход (35349.7р.)", "%%.% - Приход (41085р.)"],
legendpos: "east"});
pie.hover(function () {
this.sector.stop();
this.sector.scale(1.1, 1.1, this.cx, this.cy);
if (this.label) {
this.label[0].stop();
this.label[0].scale(1.5);
this.label[1].attr({"font-weight": 800});
}
}, function () {
this.sector.animate({scale: [1, 1, this.cx, this.cy]}, 500, "bounce");
if (this.label) {
this.label[0].animate({scale: 1}, 500, "bounce");
this.label[1].attr({"font-weight": 400});
}
});
};
Пример круговой диаграммы в SVG средствами Raphael и PHP