Chart FX for Java 6.5

SoftwareFX.ChartFX.Statistical
Class Statistics

java.lang.Object
  extended by SoftwareFX.ChartFX.Statistical.Statistics

public final class Statistics
extends java.lang.Object

Provides access to the Statistics object.

This is the core class of the Statistical Extension. The supported members of the Statistics class allow developers to access many other classes implemented in the Statistical Extension. Calculating statistical values, adding studies to a chart and controling the legend are a few of the tasks you will need to access this class to complete.


Constructor Summary
Statistics()
           
 
Method Summary
 void addDataChangedListener(DataChangedListener value)
          Adds a DataChangedListener to the listener list.
 void addStudyChangedListener(StudyChangedListener value)
          Adds a StudyChangedListener to the listener list.
 CalculatorMulti getCalculators()
          Gets a CalculatorMulti or Calculator object containing chart values.
 CalculatorMulti getCalculatorsRaw()
          Gets a CalculatorMulti or Calculator object containing all the original data values passed to the chart.
 java.lang.Object getChart()
          Gets the Chart.
 int getCommandID(int id)
          Used to obtain the CommandID for Statistical commands.
 int getConfidence()
          Gets the Confidence.
 java.lang.String getCulture()
          Gets the Culture.
 DataChangedListener[] getDataChangedListeners()
          Returns an array of all the DataChangedListeners added to this class with addDataChangedListeners().
 Galleries getGallery()
          Returns a Galleries object.
 int[] getIgnoredSeries()
          Gets the IgnoredSeries.
 Legend getLegendBoxObj()
          Returns a LegendBox object and exposes members of the LegendBoxBase class.
 int getSelectedSeries()
          Gets the SelectedSeries.
 StudiesCollection getStudies()
          Gets the Studies Collection object.
 StudyChangedListener[] getStudyChangedListeners()
          Returns an array of all the StudyChangedListeners added to this class with addStudyChangedListeners().
 boolean isAutoSelectSeries()
          Gets the AutoSelectSeries.
 boolean isFreeze()
          Gets the Freeze.
 boolean isLegendBox()
          Gets the LegendBox.
 boolean isSampleData()
          Gets the SampleData.
 void loadState(java.io.InputStream stream)
          Used to load previous Usl and Lsl values to be saved from a SPC chart at a earlier time.
 void removeDataChangedListener(DataChangedListener value)
          Removes a DataChangedListener from the listener list.
 void removeStudyChangedListener(StudyChangedListener value)
          Removes a StudyChangedListener from the listener list.
 void saveState(java.io.OutputStream stream)
          Used to save the current Usl and Lsl values to be loaded into an SPC chart at a later time.
 void setAutoSelectSeries(boolean value)
          Gets or sets a value indicating the Statistical extension to automatically select a series during the highlight event.
 void setChart(java.lang.Object value)
          Gets or sets a value indicating the chart which the Statistical Extension will be included.
 void setConfidence(int value)
          Gets or sets the default Confidence level for the Statistical Extension.
 void setCulture(java.lang.String value)
          Gets or sets a CultureInfo object to localize a Statistics object for a specific language and region.
 void setFreeze(boolean value)
          Gets or sets a value specifying whether to stop the calculation of limit values used in SPC charts for evaluations or to continue processing new data values.
 void setIgnoredSeries(int[] value)
          Gets or sets an array indicating the chart series to ignore in chart calculations.
 void setLegendBox(boolean value)
          Gets or sets a value indicating whether to show or hide the statistical legend.
 void setSampleData(boolean value)
          Gets or sets a value indicating whether calculations based on Sample or Population data.
 void setSelectedSeries(int value)
          Gets or sets the selected series for statistical analysis.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistics

public Statistics()
Method Detail

addDataChangedListener

public void addDataChangedListener(DataChangedListener value)

Adds a DataChangedListener to the listener list.

Parameters:
value - The DataChangedListener to be added.

addStudyChangedListener

public void addStudyChangedListener(StudyChangedListener value)

Adds a StudyChangedListener to the listener list.

Parameters:
value - The StudyChangedListener to be added.

getCalculators

public CalculatorMulti getCalculators()

Gets a CalculatorMulti or Calculator object containing chart values.

Remarks:
  • By specifying a series index, devolpers can access a selected Calculators object to analyze a specific series of data. This can be accomplished with the following code:

    Calculator calc1 = statistics1.getCalculators().getItem(1);

    However, this property may also be used to obtain a CalculatorsMulti object. This object may be used to anlayze the data series included in the chart. This may be done with the next code snippet:

    CalculatorMulti calcMulit1 = statistics1.getCalculators();

  • The Calculator and CalculatorMulti classes expose methods allowing you to analyse and perform tests on each repective object. The Calculator.get(int) and Calculator.performTest(int) methods, shared by both classes, expose a myriad of calculations and tests which you may perform on a selected object.

  • The getCalculatorsRaw() property may be used to return a CalculatorMulti or Calculator object containing all the original data values passed to the chart.

  • See Also:
    Calculator.get(int), Calculator.performTest(int), Calculator, CalculatorMulti

    getCalculatorsRaw

    public CalculatorMulti getCalculatorsRaw()

    Gets a CalculatorMulti or Calculator object containing all the original data values passed to the chart.

    Remarks:
  • Several statistical gallery types process the sample data passed to the chart. This is required to correctly display the graphical representation of the data and is standard in may statistical studies.

    Using the CalculatorsRaw property, you may be used to return a CalculatorMulti object containing all the original data values passed to the chart (independent of gallery).

  • By specifying a series index, devolpers can access a selected Calculators object to analyze a specific series of data. This can be accomplished with the following code:

    Calculator calc1 = statistics1.getCalculatorsRaw().getItem(1);

    However, this property may also be used to obtain a CalculatorsMulti object. This object may be used to anlayze the data series included in the chart. This may be done with the next code snippet:

    CalculatorMulti calcMulit1 = statistics1.getCalculatorsRaw();

  • The Calculator and CalculatorMulti classes expose methods allowing you to analyse and perform tests on each repective object. The Calculator.get(int) and Calculator.performTest(int) methods, shared by both classes, expose a myriad of calculations and tests which you may perform on a selected object.

  • The getCalculators() property may be used to return a CalculatorMulti or Calculator object containing the processed data values of the chart.

  • See Also:
    getCalculators(), Calculator.get(int), Calculator.performTest(int), CalculatorMulti, Calculator

    getChart

    public java.lang.Object getChart()

    Gets the Chart. For more detail see setChart(java.lang.Object).


    getCommandID

    public int getCommandID(int id)

    Used to obtain the CommandID for Statistical commands.

    Remarks:
  • When the Statistical Extension is added to the Chart, commands may be added to the default Chart FX CommandID list. If you wanted to customize this command, you will need to know the CommandID assigned by the Chart FX CommandID list. This property will return this value. For example, the following code could be used to obtain the CommandID of the Statistical Legend added to the chart:

    int x = statistics1.getCommandID(StatisticsCommandID.LEGEND_BOX);

  • Parameters:
    id - Statistical CommandID.

    Parameter Values:
    The available values for id are:

    ValueDescription
    StatisticsCommandID.LEGEND_BOXStatistical LegendBox.


    getConfidence

    public int getConfidence()

    Gets the Confidence. For more detail see setConfidence(int).


    getCulture

    public java.lang.String getCulture()

    Gets the Culture. For more detail see setCulture(java.lang.String).


    getDataChangedListeners

    public DataChangedListener[] getDataChangedListeners()

    Returns an array of all the DataChangedListeners added to this class with addDataChangedListeners().


    getGallery

    public Galleries getGallery()

    Returns a Galleries object.

    Remarks:
  • Ths property is used to obtain the Galleries object. This object may be assigned to the chart's Gallery object to configure a statistical chart type to the chart.

    chart1.setGalleryObj(statistics1.getGallery().getBoxPlot());

  • Access to this object also allows you to set attributes specific to the selected gallery type. For example, the BoxPlot gallery type supports a Notched property. To configure a BoxPlot to be Notched, the following code could be employed:

    statistics1.getGallery().getBoxPlot().setNotched(true);
    chart1.setGalleryObj(statistics1.getGallery().getBoxPlot());

  • Please see the Galleries class for all the supported gallery types accessible using this property.

  • See Also:
    Galleries.getBoxPlot(), Galleries.getFrequencyPolygon(), Galleries.getHistogram(), Galleries.getOgive(), Galleries.getRegression(), Galleries

    getIgnoredSeries

    public int[] getIgnoredSeries()

    Gets the IgnoredSeries. For more detail see setIgnoredSeries(int[]).


    getLegendBoxObj

    public Legend getLegendBoxObj()

    Returns a LegendBox object and exposes members of the LegendBoxBase class.

    Remarks:
  • The setLegendBox(boolean) property may be used to show and hide the statistical legend in the chart area.

  • See Also:
    setLegendBox(boolean), Legend

    getSelectedSeries

    public int getSelectedSeries()

    Gets the SelectedSeries. For more detail see setSelectedSeries(int).


    getStudies

    public StudiesCollection getStudies()

    Gets the Studies Collection object.

    Remarks:
  • This property exposes all the supported members of the StudiesCollection class. When an index is configured, this property returns a Study object.

    Study s = statistics1.getStudies().getItem(0);
    or

    StudyStripe ss1 = (StudyStripe) statistics1.getStudies().Add(Analysis.UPPER_QUARTILE);

  • See Also:
    StudiesCollection.getItem(int), StudiesCollection.add(java.lang.Object), StudiesCollection.addTitle(java.lang.String), StudiesCollection.clear(), StudiesCollection.contains(java.lang.Object), StudiesCollection.find(int, int), StudiesCollection.remove(java.lang.Object), StudiesCollection, Study

    getStudyChangedListeners

    public StudyChangedListener[] getStudyChangedListeners()

    Returns an array of all the StudyChangedListeners added to this class with addStudyChangedListeners().


    isAutoSelectSeries

    public boolean isAutoSelectSeries()

    Gets the AutoSelectSeries. For more detail see setAutoSelectSeries(boolean).


    isFreeze

    public boolean isFreeze()

    Gets the Freeze. For more detail see setFreeze(boolean).


    isLegendBox

    public boolean isLegendBox()

    Gets the LegendBox. For more detail see setLegendBox(boolean).


    isSampleData

    public boolean isSampleData()

    Gets the SampleData. For more detail see setSampleData(boolean).


    loadState

    public void loadState(java.io.InputStream stream)

    Used to load previous Usl and Lsl values to be saved from a SPC chart at a earlier time.

    Remarks:
  • A Statistical Process Control (SPC) or control chart provides basis for deciding whether the variation in the output is due to common causes (in control) or assignable causes (out of control).

    Using this method, you can load the upper and lower limits from a previous process. By loading limit values from a previous sample that was determined to be "in control", you can easily determine if the current sample is "in control" or "out of control".

  • The saveState(java.io.OutputStream) method may be used to save a current SPC chart's state.

  • Parameters:
    stream - Output stream to load the state values.
    See Also:
    setFreeze(boolean), saveState(java.io.OutputStream)

    removeDataChangedListener

    public void removeDataChangedListener(DataChangedListener value)

    Removes a DataChangedListener from the listener list.

    Parameters:
    value - The DataChangedListener to be removed.

    removeStudyChangedListener

    public void removeStudyChangedListener(StudyChangedListener value)

    Removes a StudyChangedListener from the listener list.

    Parameters:
    value - The StudyChangedListener to be removed.

    saveState

    public void saveState(java.io.OutputStream stream)

    Used to save the current Usl and Lsl values to be loaded into an SPC chart at a later time.

    Remarks:
  • A Statistical Process Control (SPC) or control chart provides basis for deciding whether the variation in the output is due to common causes (in control) or assignable causes (out of control).

    Using this method, you can load the upper and lower limits from a previous process. By loading limit values from a previous sample that was determined to be "in control", you can easily determine if the current sample is "in control" or "out of control".

  • The loadState(java.io.InputStream) method may be used to load a previously saved SPC chart state.

  • Parameters:
    stream - Output stream to save the state values.
    See Also:
    setFreeze(boolean), loadState(java.io.InputStream)

    setAutoSelectSeries

    public void setAutoSelectSeries(boolean value)

    Gets or sets a value indicating the Statistical extension to automatically select a series during the highlight event.

    Remarks:
  • The Statistical Legend will display study information specific to the series selected in a highlight event when multiple data series are included in a chart. Chart FX automatically configures the series highlighted as the selected series.

    Due to the nature in which some statistical galleries are created, the automatically selected series can display incorrect information in the legend. An example of this is when the BoxPlot gallery is selected.

    By configuring this property to false and handling the HightLight event, you can configure the selected series property for the Statistical extension so the correct data is displayed in the legend.

  • See Also:
    setSelectedSeries(int)

    setChart

    public void setChart(java.lang.Object value)

    Gets or sets a value indicating the chart which the Statistical Extension will be included.

    Remarks:
  • If more than chart is exists on a form or a page, this property is used to select the chart the extension will be attached.

  • The setConfidence(int) property allows you to configure the confidence level for the statstical extension.

  • See Also:
    setConfidence(int)

    setConfidence

    public void setConfidence(int value)

    Gets or sets the default Confidence level for the Statistical Extension.

    Remarks:
  • The Confidence Level is defined as the degree of confidence associated witha confidence interval; the probablity that the interval contains the true value of the parameter.

  • The setSelectedSeries(int) property is used to select a particular series for analysis in the chart.

  • See Also:
    setSelectedSeries(int)

    setCulture

    public void setCulture(java.lang.String value)

    Gets or sets a CultureInfo object to localize a Statistics object for a specific language and region.

    Remarks:
  • When setting this property, you may need the Culture Name or Culture Identifier constants for the desired culture. These values are documented in your development environment documentation.

  • For more information regarding the CultureInfo type, please refer to your development environment documentation.

  • If no attributes are set using this property then it inherits the system culture.

  • When setting this property, you may need the Languaje Code and/or Country Code constants for the desired culture. For more information, please refer to the java.util.Locale documentation.

    Example:

    statistics1.setCulture("es-ES");

  • See Also:
    Statistics

    setFreeze

    public void setFreeze(boolean value)

    Gets or sets a value specifying whether to stop the calculation of limit values used in SPC charts for evaluations or to continue processing new data values.

    Remarks:
  • A Statistical Process Control (SPC) or control chart provides basis for deciding whether the variation in the output is due to common causes (in control) or assignable causes (out of control).

    By "freezing" the extension, values used to determine the upper and lower specification limits will not be adjusted. Once a acceptable limit values have been set, new samples observations may be evaluated to determine whether a process is in control.

  • The loadState(java.io.InputStream) method may be used to load previous Calculator.setUsl(double) and Calculator.setLsl(double) values to be saved from a SPC chart at a earlier time.

  • The saveState(java.io.OutputStream) method may be used to save a current SPC chart's state.

  • See Also:
    Calculator.setUsl(double), Calculator.setLsl(double), Calculator.setSigma(double), loadState(java.io.InputStream), saveState(java.io.OutputStream)

    setIgnoredSeries

    public void setIgnoredSeries(int[] value)

    Gets or sets an array indicating the chart series to ignore in chart calculations.

    Remarks:
  • This property allows you to specify a set of series to be completely ignored by the calculators, studies and all the gallery types.

  • See Also:
    getCalculators(), getCalculatorsRaw()

    setLegendBox

    public void setLegendBox(boolean value)

    Gets or sets a value indicating whether to show or hide the statistical legend.

    Remarks:
  • The Statistical LegendBox is used to display results of studies and act as a user interface to control different distribution formulas which may be applied to a chart.

  • The getLegendBoxObj() property is used to access the LegendBoxBase class members provided by the Chart FX Core. The supported members allow visual attribute customization for the statistical legend.

  • See Also:
    getLegendBoxObj(), Legend

    setSampleData

    public void setSampleData(boolean value)

    Gets or sets a value indicating whether calculations based on Sample or Population data.

    Remarks:
  • When the data analyzed is Population data (all data), slightly different algorithms are used for statistical evaluation. Therefore, if you are not analysing Sample data, this property should be configured to false.

  • See Also:
    setConfidence(int), setSelectedSeries(int)

    setSelectedSeries

    public void setSelectedSeries(int value)

    Gets or sets the selected series for statistical analysis.

    Remarks:
  • For many studies, it will be required to select a specific series in order to analyze that data specifically. For example, before adding a the UpperQuartile study, here the first series is selected as the SelectedSeries:

    statistics1.setSelectedSeries(0);
    StudyStripe ss1 = (StudyStripe) statistics1.getStudies().Add(Analysis.UPPER_QUARTILE);

  • See Also:
    getStudies(), StudiesCollection.add(java.lang.Object), Statistics, StudiesCollection

    http://www.softwarefx.com

    2007 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.