使用 raphaël 绘制条形图

发布于 2024-10-07 12:01:28 字数 255 浏览 0 评论 0原文

我喜欢

带来如图alt text

使用 rapheal 所示的图表。对我来说学习它非常困难。向我展示一些使用代码绘制垂直条形图的实例。

我的数据值

x 轴 {1,2,3,4,5} 这是问题的 ID y 轴 {10,20,30,40,7} 这代表问题的访问次数

我需要条形图,每个轴和图表的绘图和标签中包含 x,y 值

I like to bring a chart as shown

alt text

By using rapheal. Its very tough for me to learn it. show me some live example with code to draw verticalbar graph.

My data values

x-axis {1,2,3,4,5} This is an id of question
y-axis {10,20,30,40,7} This represent number of visits of question

I need bar graph with x,y values in plot and label for each axis and for graph

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心在旅行 2024-10-14 12:01:28

最基本的实现是:

var r = Raphael("holder"),
    data = [[10], [105], [30]];

r.g.barchart(0, 0, width, height, data);

然后您可以使用 raphael.js 操作它。

笔记。 g.raphael 可以在这里找到:http://g.raphaeljs.com/

The most basic implementation would be:

var r = Raphael("holder"),
    data = [[10], [105], [30]];

r.g.barchart(0, 0, width, height, data);

Then you can manipulate it with raphael.js.

Note. g.raphael can be found here: http://g.raphaeljs.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文