KavaChart ProServe Tags - Web Service XML Data

This page demonstrates the built-in localization facilities in KavaChart's custom tag library. Just extend your existing ResourceBundles to include KavaChart chart properties, like "titleString", or "axisDateFormat", and include the ResourceBundle base name as a chart tag attribute to automatically customize your charts by locale.

These charts read data from a Web Service that provides temperature data for San Francisco Bay Area cities. ProServe's webservice data tag reads XML data in the format defined by this DTD: http://www.ve.com/kavachart/KavaChartDataProvider.dtd. The actual data is supplied by this URL: http://www.kavachart.com/weather.jsp, which in turn reads and translates data from a National Weather Service web site.

In an actual application, we might want to use a performance enhancing method available to ProServe chart tag users. Data sources can be placed into page, session, or application contexts. Since weather observations don't change too often, we could just make the weather DataProvider intelligent enough to avoid unecessary traffic to the NWS web site, and then place that DataProvider into an application context.

That way, every viewer of these charts would be able to re-use the same DataProvider, boosting page delivery speeds. We could also use the "cached" chart tag instead of the "streamed" tag to completely eliminate unnecessary rendering activity on our server. New chart images would only be constructed when weather data changes. Best of all, it's all automatic. You don't need to add any application logic at drive your server at full speed.

The next chart uses the same styles, and the same data.

Notice that the title, subtitle, axis title and flyover labels have changed for this chart. Although the locale is usually detected and loaded automatically, this example uses an inner tag to specify "Spain" as our locale (es_es). Since we have a resource bundle for Spain that contains new information for tooltip labels, titles, the axis title and reference line label, these items have changed.

Place your cursor over the bars to see the localized tooltips.