简体   繁体   English

IE不通过JSF Trinidad支持SVG查看器

[英]IE does not support SVG viewer via JSF Trinidad

When using <tr:chart> component from Trinidad lib there is problem using it in Explorer since it does not have built in support for SVG viewer. 当使用特立尼达lib中的<tr:chart>组件时,在资源管理器中使用它会出现问题,因为它没有内置对SVG查看器的支持。

Trinidad has hard coded url in case of error which open adobe page of SVG viewer. 特立尼达(Trinidad)具有硬编码的URL,以防在打开SVG查看器的Adobe页面时出错。 The problem is that it link is not updated since there is no SVG installation in adobe. 问题在于,由于Adobe中没有安装SVG,因此未更新该链接。

We need to supply different link. 我们需要提供不同的链接。 how can we override this URL? 我们如何覆盖此URL?

Is there any better solution ? 有没有更好的解决方案?

Adobe have decided to discontinue support for the SVG viewer on January 1, 2009. Adobe已决定自2009年1月1日起停止对SVG查看器的支持

Ever considered using Highcharts to generate graphs in your Trinidad project? 是否曾经考虑过在您的特立尼达项目中使用Highcharts生成图形? We do and it works like a charm! 我们做到了,它就像一个魅力! It does not use SVG on older versions of Internet Explorer; 在较旧版本的Internet Explorer上,它不使用SVG。 see Highcharts compatibility documentation . 请参阅Highcharts兼容性文档 Also, Highcharts has way more possibilities to generate graphs and add interactivity then <tr:chart> . 此外,与<tr:chart> ,Highcharts具有更多的可能性来生成图并添加交互性。 Actually, <tr:chart> is kind of limited in its possibilities . 实际上, <tr:chart> 的可能性有限。

The downside is that you don't have a JSF component to work with. 缺点是您没有可使用的JSF组件。 Creating a static graph will be easy, but you might want to write a few lines of code to pass your data to the Highcharts Javascript to get things a bit more interesting. 创建静态图很容易,但是您可能需要编写几行代码以将数据传递给Highcharts Javascript,以使事情变得更加有趣。 Trinidad's ExtendedRenderKitService comes in handy there: 特立尼达的ExtendedRenderKitService可以派上用场:

ExtendedRenderKitService service = 
  Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "alert('foo');");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM