You are viewing documentation for an older version. For current documentation - click here.

Real-time charts are those charts which automatically update themselves every n seconds by getting new data from the server, without any page refreshes. The chart initializes itself, loads new data every n seconds and silently updates itself to reflect the current state of data.

Potential uses of these charts are in:

  • Network monitoring applications
  • Stock/finance monitoring applications
  • Manufacturing process indicators
  • Any other place where a continuous check of application/mechanism state is to be maintained

The real-time charts in FusionWidgets XT can be divided into two categories:

 
Data streaming charts

Data streaming charts can update themselves in real time and show historical data for the pre-defined period, along with the latest data. For example, in a stock monitoring application showing a real-time line chart, you can see the price of a stock for say last 20 minutes, along with the latest price. Whenever a price update occurs (new price comes in), the first price data (one on the extreme left) is pushed out of the chart and the new price takes the right most position.

FusionWidgets XT currently offers the following 6 data-streaming charts:

These charts are used in showing data that needs to be monitored over a period of time and whose historical comparison is equally relevant. For example, monitoring stock prices, CPU temperature, number of threads/processes, network usage etc.

Real-time gauges

Real-time gauges show only a single value (or multiple pointers with single value) in real-time. These are useful when you're just concerned with the current value of the monitored device, without any consideration for any historical values. For example, when you're monitoring temperature of a particular device and are only interested in the single value (i.e., the current temperature), the gauges are an ideal way to show that.

FusionWidgets XT offers the following real-time gauges:

 
Process flow

To setup a chart with real-time update capabilities, follow the steps below:

  1. Initialize the chart with XML/JSON data. The chart necessarily needs XML/JSON data to initialize, as this XML/JSON contains the URL of the real-time data provider page (through the dataStreamURL attribute) and the time interval (through the refreshInterval attribute) for regular polling (to get new data).

  2. If you're using data-streaming charts and want to show historical data on chart, you can push that data in this XML/JSON. This enables the chart to initialize and show the data present in XML/JSON and then initiate the method for regular polling of new data.

  3. Setup your script at dataStreamURL to provide the real-time data in the required format. The format has been explained in the next page. This data is called incremental data - as each time the chart accesses this particular URL, the new data (on incremental basis) is provided to it.

    You can use any scripting language like Classic ASP, ASP.NET (C# or VB), ColdFusion, PHP, JSP, J2EE, RoR etc. to provide this incremental data, as the end data needs to be pure text and it doesn't matter to FusionWidgets XT where this data is coming from.

    However, you need to make sure that the page which provides the incremental update data to FusionWidgets XT must be hosted on the same sub-domain in which the chart files are hosted - otherwise, FusionWidgets XT, owing to security restrictions, won't be able to receive the updated data. Due to security restrictions, you are allowed to retrieve data only from the same sub-domain in which the chart files reside. Data can only be loaded from a domain that is an exact match to the location of the chart files, including sub-domains. For this reason, the charts residing at server1.mydomain.com will not be able to access data from mydomain.com.

    If you wish to load data from a different domain, you can set up a proxy page at the same sub domain that will actually request data from the distant domain and then relay it to FusionWidgets XT. You must be able to upload and run a server-side script on a server in the same domain as the chart files. In this method, a chart accesses the script, which loads the information, retrieves it and returns the information back to the chart. This method is best if the server hosting the data is not under your control (for example, a public source or a web service).

  4. The chart now constantly polls the given URL, reads the new data and updates itself.
 
Features offered by real-time charts

FusionWidgets XT real-time charts have the following features w.r.t real-time capabilities: