raphael pie chart error?
i try to add grahael pie chart in my web site using same code from graphael site
开发者_StackOverflow社区 gRaphaël Static Pie Chart
<script src="http://raphaeljs.com/raphael.js" type="text/javascript" charset="utf-8"></script>
<script src="g.raphael.js" type="text/javascript" charset="utf-8"></script>
<script src="g.pie.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
window.onload = function () {
var r = Raphael("holder");
r.g.txtattr.font = "12px 'Fontin Sans', Fontin-Sans, sans-serif";
r.g.text(320, 70, "Static Pie Chart").attr({"font-size": 20});
r.g.piechart(320, 240, 150, [55, 20, 13, 32, 5, 1, 2, 10]);
};
</script>
</head>
<body class="raphael" id="g.raphael.dmitry.baranovskiy.com">
<div id="holder"></div>
<p>
Demo of <a href="http://g.raphaeljs.com/">gRaphaël</a> JavaScript library.
</p>
</body>
But im not getting the chart and on firebug im getting error like Raphael not defined ?
<script src="http://raphaeljs.com/raphael.js" type="text/javascript" charset="utf-8"></script>
<script src="g.raphael.js" type="text/javascript" charset="utf-8"></script>
<script src="g.pie.js" type="text/javascript" charset="utf-8"></script>
You are loading one script from a remote site and the others locally. Are you sure you actually have g.raphael.js
and g.pie.js
in the same folder as your html file?
精彩评论