绘制折线图。从 JpGraph 迁移到 Raphael JS

发布于 2024-10-22 13:55:26 字数 1219 浏览 10 评论 0原文

我有一个应用程序,它基于不同输入(温度、湿度...)的一些值,显示不同的图表。
到目前为止,我已经使用 JpGraph 做到了这一点,而且我发现它很容易做到。您可以轻松添加图例,并根据需要绘制任意数量的函数。您还可以轻松修复秤。不管怎样,我希望与用户进行一些交互(我只希望用户单击图表的某一点,显示 X 和 Y 值)。这对于 JpGraph 来说并不容易做到,因为它只是一个 PNG 图像。

有人建议我使用 Raphael JS 库,并且我一直在阅读文档(Raphael JS 参考) ,但我不认为我想要做的(折线图)那么简单。

所以,我问 Jpgraph 用户和 Raphael JS 用户是否有这方面的经验,以及是否有任何好的在线教程(我无法找到适用于折线图的教程)。我现在绘制的图表是这样的: JpGraph示例

I've an application that based on some values from different inputs (temperature, humidity...), show different charts.
So far I've done that with JpGraph, and I found it pretty easy to do. You can add a legend easily, and plot as many functions as you want. You can also fix the scale easily. Regardless of that, I would like to have some interactivity with the user (I just want that one the user clicks on a point of the graph, the X and Y value are shown). That is not easy to do with JpGraph because it is just a PNG image.

I was recommended to use Raphael JS library, and I've been reading to the documentation (Raphael JS Reference), but I don't see that what I want to do (line charts) is that simple.

So, I am asking, to both Jpgraph users and Raphael JS users if they had had experience with this, and if there is any good tutorial online (I have not able to find one that works with line charts). The kind of graphs I'm drawing now are like this: JpGraph Example

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

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

发布评论

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

评论(3

ぃ双果 2024-10-29 13:55:26

其他一些选项:

Some other options:

别把无礼当个性 2024-10-29 13:55:26

Raphael 有一个图表插件。它支持折线图文档肯定是缺乏的 - 但总有来源

There is a chart plugin for Raphael. It supports line charts. The documentation is certainly lacking - but there is always the source.

末骤雨初歇 2024-10-29 13:55:26

回答我自己。经过一番研究后,我发现这个对于制作折线图非常有趣:Grafico

Answering myself. After doing some research, I found this one pretty interesting for doing line charts:Grafico

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