在网络花园中创建带有工具提示的图表

发布于 2024-07-15 06:37:25 字数 676 浏览 6 评论 0原文

我需要在 ASP.NET 页面上显示 折线图,其中每个数据点都有一个工具提示显示其精确的 X 和 Y 值。 特定数据集的图表可能只会被请求一次,因此缓存被禁用,并且如果需要再次显示图表,将会重新生成图表。

限制:

  1. 需要在网络园环境中工作
  2. 无法使用会话
  3. 无法使用富媒体,例如 Flash 或 Silverlight。

我见过的方法使用图像映射来生成图表图像。 由于限制,到目前为止我的所有图表都是在内存中的处理程序中生成的,直接流式传输回用户,然后进行处理。 现在我需要添加工具提示,这需要 HTML 和图像。

我当前的计划是在页面上生成一次图表以获取 HTML,忽略生成的图像,并重写图像标记的“src”以指向第二页。 第二个页面生成与第一个页面完全相同的图表,忽略 HTML 标记,并将图像流式传输回客户端。 这一切看起来都很笨拙。

有没有更好的方法来做到这一点,而不涉及生成图表两次?

可用的图表控件:

  1. Dev Express 8.2
  2. Syncfusion 6.2
  3. ?? - 推荐一些东西

I need to show a Line Chart on an ASP.NET page where each data point has a tooltip that shows its exact X and Y values. A chart for a particular dataset will probably only ever be requested once, so caching is disabled and the chart will be regenerated if it ever needs to be shown again.

Restrictions:

  1. Needs to work in a web garden environment
  2. Cannot use Session
  3. Cannot use rich media, such as Flash or Silverlight.

The approaches I've seen used an image map for a generated chart image. Due to the restrictions, all of my charts so far have been generated in a handler in memory, streamed directly back to the user, and then disposed of. Now I need to add tool tips, which would requires both HTML and an image.

My current plan is to generate the chart once on the page to get the HTML, ignore the generated image, and rewrite the "src" of the image tag to point to a second page. The second page generates the same exact chart as the first, ignores the HTML markup, and streams the image back to the client. This all seems very kludgy.

Is there an better way to do this that doesn't involve generating the chart twice?

Available chart controls:

  1. Dev Express 8.2
  2. Syncfusion 6.2
  3. ?? - Recommend something

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

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

发布评论

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

评论(2

叫嚣ゝ 2024-07-22 06:37:25

使用 Google Chart API.Net 包装器? 请参阅此SO 讨论了解更多信息信息。

What about using the Google Chart API, and a .Net wrapper? See this SO discussion for more information.

妄想挽回 2024-07-22 06:37:25

我通过使用 MS Chart Control 解决了这个问题。 磁盘处理程序可以在网络园中的服务器之间共享图像,并在完成后自动清理。

I solved this by using the MS Chart Control. The disk handler can share images across servers in the web garden and automatically cleans up after itself.

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