|
You can embed the entire chart into your HTML page by using one of the vector graphics formats that can be directly
rendered by the browsers. WebCharts3D currently supports VML that can be rendered by Internet Explorer 5.0 and above and
canvas HTML tag that is supported by Firefox 1.5, Safari and Opera.
In order to choose the output format we need to check User-Agent header and select the format that the client's browser
understands. For example, the following code fragment will select VML if it can be rendered on the client.
String userAgent = request.getHeader("User-Agent");
int index ;
if((index = userAgent.indexOf("MSIE"))!=-1 && userAgent.charAt(index+5)>='5')
myChart.type = "VML";
You will need to view the Example page in different browsers in order to see the chart in different formats.
|