OpenAPI 1.0

com.aquafold.openapi.chart
Interface AQChartFactory


public interface AQChartFactory

ChartFactory

Synopsis:

ChartFactory creates charts and provides utility methods for creating request urls for a ChartServlet.

Description:
ChartFactory provides an interface for creating charts. Charts contain a data model and a set of properties which control the chart's appearance. Once the model and properties are specified, the Chart can be rendered to an image.

ChartFactory also provides utility methods for generating ChartServlet request url strings.


Method Summary
 String getServletString(AQChart chart)
          Get a string containing the url parameters used to make a ChartServlet request.
 boolean isChartAvailable()
          This method returns TRUE if the chart rendering is available.
 AQChart newChart()
          Get a new AQChart instance
 String toDataString(AQChart chart)
          Get the data portion of the servlet request parameters.
 String toPropertiesString(AQChart chart)
          Get the properties portion of the servlet request parameters.
 

Method Detail

isChartAvailable

boolean isChartAvailable()
This method returns TRUE if the chart rendering is available. Chart rendering can be unavailable for many reasons, for example: missing libraries lack of driver support for required graphics features

Returns:
TRUE if chart rendering is available; otherwise FALSE (e.g. due to missing libraries or lack of support for PBuffers on graphics card)

newChart

AQChart newChart()
Get a new AQChart instance

Returns:
a new AQChart instance

getServletString

String getServletString(AQChart chart)
Get a string containing the url parameters used to make a ChartServlet request.

The current format for these parameters is: data=&properties=

An example url is: http:///chart?data=&properties=

Parameters:
chart - Chart containing data & properties used to generate the Chart servlet parameter string
Returns:
String parameters to the Chart servlet

toDataString

String toDataString(AQChart chart)
Get the data portion of the servlet request parameters.

The format of the data string is: category="[CATEGORY_NAME], [CATEGORY_NAME], ..." series="[SERIES_NAME], [SERIES_NAME], ...", values="[1,2,3,4,5,...], [3,4,5,6,7...], ..."

Parameters:
chart - Chart containing data used to generate the data script
Returns:
String containing data script

toPropertiesString

String toPropertiesString(AQChart chart)
Get the properties portion of the servlet request parameters.

The format of the properties string is: properties='Chart="{area}", RotX=321, RotY=0, RotZ=0, ZoomScalar=1.0, ShowLegend=true, ...'

Parameters:
chart - ChartRenderer containing properties used to generate the properties script
Returns:
Sring containing properties script

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.