lt.monarch.chart.spc.math
Class ParetoValuesCalculator

java.lang.Object
  extended by lt.monarch.chart.spc.math.ValuesCalculator
      extended by lt.monarch.chart.spc.math.ParetoValuesCalculator

public class ParetoValuesCalculator
extends ValuesCalculator

Calculates values for Pareto chart Values are calculated using formulas: http://www.singleton-labs.com/doc/mcharts/guide/#guide/chart-types/4.4.1.html


Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.chart.spc.math.ValuesCalculator
nullName
 
Constructor Summary
Constructor and Description
ParetoValuesCalculator()
           
 
Method Summary
Modifier and Type Method and Description
 int getModels(java.util.List<java.lang.String> labels, ChartDataModel linesModel, ChartDataModel barsModel, ChartDataModel srcModel)
          Calculates values for the Pareto chart.
protected  void validateDataModel(ChartDataModel dataModel)
          Validates data model.
 
Methods inherited from class lt.monarch.chart.spc.math.ValuesCalculator
average, fill, fill, fillColumn, fillColumn, fillConstant, fillConstant, getAverage, getc4, getColumn, getd2, getd3, getD3, getD4, getDouble, getE, getF, getG, getH, isEmpty, isNconstant, validateDataModel, validateDataModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParetoValuesCalculator

public ParetoValuesCalculator()
Method Detail

getModels

public int getModels(java.util.List<java.lang.String> labels,
                     ChartDataModel linesModel,
                     ChartDataModel barsModel,
                     ChartDataModel srcModel)
              throws DataFormatException
Calculates values for the Pareto chart.

Parameters:
labels - the destination for pareto chart labels.
linesModel - the destination model for pareto cumulative line.
barsModel - the destination model for pareto bars.
srcModel - the input data model.
Returns:
number of histogram bars.
Throws:
DataFormatException - when the input data are invalid.

validateDataModel

protected void validateDataModel(ChartDataModel dataModel)
                          throws DataFormatException
Description copied from class: ValuesCalculator
Validates data model. Checks if it satisfies chart type requirements.

Specified by:
validateDataModel in class ValuesCalculator
Parameters:
dataModel - input chart data model.
Throws:
DataFormatException - when the data is invalid.