绘制动态图

发布于 2024-08-16 09:53:35 字数 298 浏览 2 评论 0原文

我有一个使用 JavaServer Faces 技术编写的 Web 应用程序。

该应用程序接受 n 个输入并提供一个输出。

我希望我的应用程序具有以下功能。

我希望每个输入都有滑块。

我希望用图表来描述输出。

因此,每当我通过滑块更改输入值时,我都希望更改后的输出值也显示在图表中

那么执行此操作的最佳方法是什么?

I have a web application written with JavaServer Faces technology.

The application takes n inputs and provides an output.

I want the following functionality in my application.

I want to have sliders for each of my inputs.

I want the output to be depicted by a graph.

So whenever I change the input values via a slider I want the changed output value also displayed in the graph

So what will be the best way to do this?

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

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

发布评论

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

评论(3

荒路情人 2024-08-23 09:53:35

您需要两个组件。一个是滑块组件,几乎每个组件库都附带它。
第二个是我相信的图表组件
使用 PrimeFaces 组件库。所有 JavaServer Faces 组件库都支持 Ajax,因此您可以尝试一下。

You need two components. One is the slider component which comes with pretty much every component library.
Second one is the chart component I believe comes
with the PrimeFaces component library. All JavaServer Faces component libraries support Ajax so you could give it a shot.

夏末染殇 2024-08-23 09:53:35

也许您可以使用 Google Chart API

May be you could use the Google Chart API.

温馨耳语 2024-08-23 09:53:35

在我的一个项目中,我们也有类似的要求。

当我们使用 richfaces 时,我们使用了这些组件,但对于图形绘制,我们使用 jGraph,一个小型的“开源”库。

我们选择 jGraph,因为它是我们发现的唯一(不太昂贵)的库,可以让我们自动布局图表。 (自动布局是许可版本的一部分,不是免费的)

我们使用 richfaces mediaoutput 组件来调用我们的 backingbean,它使用 jGraph 来渲染我们的图形的 jpg。

In one of my projects we had a similar request.

As we where using richfaces we used those components but for the graph drawing we used jGraph, a small 'open source' library.

We chose jGraph as it was the only (not too expensive) library we found that allowed us to layout automatically a graph. (automatic layout is part of a licensed version, not free)

We used the richfaces mediaoutput component to call our backingbean which used jGraph to render a jpg of our graph.

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