svg数据可视化

发布于 2024-08-27 14:19:33 字数 105 浏览 4 评论 0原文

我想尝试使用 SVG 作为显示数据驱动的图形、图表等的一种方式。数据以 xml 形式存在,我将使用 XQuery 生成 xml。从 xml 创建 SVG 时应考虑哪些选项(例如图形库)?非常感谢。

I'd like to experiment with SVG as a way of displaying data-driven graphs, charts, etc. The data exists as xml, and I'll use XQuery to produce the xml. What options (eg, graphics libraries) should I consider for creating the SVG from the xml? Many thanks.

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

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

发布评论

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

评论(4

小瓶盖 2024-09-03 14:19:33

如果您使用 Java 中的 SVG,您可以考虑:

Batik 要大得多(还有很多其他东西),所以如果 SVG Salamander 适合你,我会选择它。

不过,从你的问题中我不确定你是在寻找与 SVG 一起使用的东西还是创建 SVG 的东西。如果是后者,SVG 是 XML,因此您可以使用 XQuery 创建 SVG 输出(然后可以通过 SVG 插件在浏览器中解释该输出,或者使用上述建议之一在 Java 中进行处理)。希望有帮助。

If you're working with the SVG in Java, you could consider:

Batik is much larger (with tons of other stuff) so if SVG Salamander works for you I'd go with that.

I'm not sure from your question, though, whether you're looking for something to work with the SVG or something to create the SVG. If the latter, SVG is XML so you could use your XQuery to create the SVG output (which then can be interpreted in a browser by an SVG plugin or handled in Java with one of the above suggestions). Hope that helps.

街角卖回忆 2024-09-03 14:19:33

实现 SVG 的一种途径是使用 AT&T 的 GraphViz 包 - 使用 XQuery 从 XML 生成点格式的中间文本文件,并使用 GraphViz 进行图形布局和 SVG 生成。

One route to SVG is to use AT&T's GraphViz package - use XQuery to generate the intermediate text file in dot format from the XML and use GraphViz to do the graph layout and SVG generation.

甜味超标? 2024-09-03 14:19:33

以下是来自 W3C 的示例,该示例使用 Javascript从 xml 创建一个 SVG 形式的堆叠条形图。我想做类似的事情,但使用图形库(或???)而不是js来处理轴、标签、标题、数据点等的构造。根据使用此操作的结果,下一步将是用户与图表的交互。谢谢。

Here's an example from the W3C that uses Javascript to create a stacked bar chart as SVG from xml. I'd like to do something similar but use a graphics library (or ???) instead of js to handle the construction of axes, labels, titles, data points, etc. Depending on the results from playing with this, the next step would be user interaction with the graphs. Thanks.

囍孤女 2024-09-03 14:19:33

查看 ChartSVG

Check out ChartSVG.

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