org.ibisph.charts
Class AbstractSharedChart

java.lang.Object
  extended by org.ibisph.charts.AbstractChart
      extended by org.ibisph.charts.AbstractSharedChart
All Implemented Interfaces:
java.io.Serializable, Chart
Direct Known Subclasses:
GroupedBar, GroupedHorzBar, Line, StackedBar

public abstract class AbstractSharedChart
extends AbstractChart

Core chart object that provides the common Chart methods for shared static type charts. Creating Agileblox charts takes time and is resource expensive. Some charts are able to be reused over and over again. A shared chart object is able to load the core properties once and then simply load the data values, do the adjustments and create the chart. Due to the fact that Agileblox charts are not thread safe, the main toOutputStream method is synchronized. There are two main methods that of all "shared" type chart objects will implement. They are the constructor and the getBaseChart method.

Author:
Garth Braithwaite, STG
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.ibisph.charts.AbstractChart
acxmlPathAndFilename, defaultChartHeight, defaultXAxisLabelDistance, defaultYAxisLabelDistance, labelCharacterWidth, legendSymbolWidth, maxLegendWidth, maxXAxisLabelWidth, maxYAxisLabelWidth, minLegendWidth
 
Constructor Summary
AbstractSharedChart(java.lang.String acxmlPathAndFilename)
          Required explicit constructor which should be overridden for all sub classes.
 
Method Summary
 void generate(javax.servlet.http.HttpServletRequest request, ChartData chartData, java.lang.String chartHeight, boolean showConfidenceLimits, boolean zipOutput, java.io.OutputStream outputStream)
          Synchronized version of the super's toOutputStream method.
 
Methods inherited from class org.ibisph.charts.AbstractChart
adjustLegendSize, adjustXAxisLabelHeight, adjustXAxisLabelHeight, adjustYAxisLabelWidthAndSetScale, adjustYAxisLabelWidthAndSetScale, getBaseChart, getMaxCategorySum, getMaxSeriesSum, numberOfLines, setChartHeight, setDefaultChartHeight, setDefaultXAxisLabelDistance, setDefaultYAxisLabelDistance, setLabelCharacterWidth, setLegendSymbolWidth, setMaxLegendWidth, setMaxXAxisLabelWidth, setMaxYAxisLabelWidth, setMinLegendWidth, setTitle, toDouble, toNullToZeroDoubleArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSharedChart

public AbstractSharedChart(java.lang.String acxmlPathAndFilename)
Required explicit constructor which should be overridden for all sub classes. Typically, the sub classed chart will create the actual Agileblox chart class object, load the ACXML file/properties, and set any other general chart property settings needed for that chart.

Parameters:
acxmlPathAndFilename - complete filename with path of the ACXML properties file to load.
Method Detail

generate

public void generate(javax.servlet.http.HttpServletRequest request,
                     ChartData chartData,
                     java.lang.String chartHeight,
                     boolean showConfidenceLimits,
                     boolean zipOutput,
                     java.io.OutputStream outputStream)
Synchronized version of the super's toOutputStream method.

Specified by:
generate in interface Chart
Overrides:
generate in class AbstractChart
Parameters:
request - HttpServletRequest needed by the Agileblox chart object.
chartData - Contains chart data typically loaded by a DAO.
chartHeight - controls how tall/high the chart will be (in pixels).
showConfidenceLimits - Controls displaying confidence intervals. If true the confidence limits will always be visible. If false then the limits are only shown to the user when they mouse over the value or they mouse over the series title in the legend.
zipOutput - Controls compressed output. true = compress the output using gzip. false = no compression. As of 10/2005, this feature is not used. The biggest reason that the output should NOT be zipped for IBIS is that the jpeg conversion needs raw SVG text. To do SVG compression, a compression servlet filter was developed.
outputStream - destination where chart data is sent.