lt.monarch.chart.spc
Class ParetoChart

java.lang.Object
  extended by lt.monarch.chart.AbstractView<PaintTags>
      extended by lt.monarch.chart.AbstractChart<PaintTags,GeneralProjector>
          extended by lt.monarch.chart.MultiSeriesChartBase<ChartPaintTags,Projector2D>
              extended by lt.monarch.chart.chart2D.Chart2D
                  extended by lt.monarch.chart.spc.SpcChart
                      extended by lt.monarch.chart.spc.ParetoChart
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Chart<Projector2D>, ChartEntity, StyleEditorEntity, View

public class ParetoChart
extends SpcChart

Pareto chart. Contains bars and the cumulative line. Values are calculated using formulas: http://www.singleton-labs.com/doc/mcharts/guide/#guide/chart-types/4.4.1.html

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  BarSeries bar
           
protected  ChartDataModel barsModel
           
protected  ParetoValuesCalculator calc
           
protected  HorizontalMarkerLine hMarkerLine
           
protected  LineSeries line
           
protected  AbstractMarker lineMarker
           
protected  ChartDataModel lineModel
           
protected  LabelAxisMapper xMapper
           
protected  MathAxisMapper yMapper1
           
protected  MathAxisMapper yMapper2
           
 
Fields inherited from class lt.monarch.chart.spc.SpcChart
bottomAxis, dataModel, grid, leftAxis, rightAxis
 
Fields inherited from class lt.monarch.chart.chart2D.Chart2D
projector
 
Fields inherited from class lt.monarch.chart.AbstractChart
draftMode, locale, plugins
 
Fields inherited from class lt.monarch.chart.AbstractView
layoutInvalid, paintStyle, style
 
Constructor Summary
Constructor and Description
ParetoChart(ChartDataModel dataModel)
          Constructs a Pareto chart from the supplied data model.
 
Method Summary
Modifier and Type Method and Description
 HorizontalMarkerLine getCriticalMarkerLine()
          Returns critical marker line
 LineSeries getCumulativeLineSeries()
          Returns cumulative line series representing the sum of bar values.
 AbstractMarker getLineMarker()
          Returns cumulative line marker
 BarSeries getParetoSeries()
          Returns BarSeries representing Pareto bars.
 void setLineMarker(AbstractMarker marker)
          Set cumulative line marker.
protected  void updateAxes()
          Creates chart axes on chart creation.
protected  void updateChart()
          Redraws chart
protected  void updateCriticalMarkerLine()
          Creates critical marker line on chart creation.
protected  void updateCumulativeLineSeries()
          Creates cumulative line series chart creation.
protected  void updateGrid()
          Creates grid line on chart creation.
protected  void updateMappers(java.util.List<java.lang.String> labels, int maxValue)
          Creates axes mappers on chart creation or updates them on chart data model change.
protected  void updateParetoSeries()
          Creates pareto series on chart creation.
 
Methods inherited from class lt.monarch.chart.spc.SpcChart
getBottomAxis, getDataModel, getGrid, getLeftAxis, getMax, getMax, getMin, getMin, getRightAxis, resetDataModel, setDataModel, setNoData, setNoData, trim
 
Methods inherited from class lt.monarch.chart.chart2D.Chart2D
addBottomXAxis, addLeftYAxis, addRightYAxis, addTopXAxis, addXAxis, addYAxis, dispose, finalize, getBreakLine, getChartAreaMargin, getMinAxisWidth, getProjector, getStackedXAxisMargin, getStackedYAxisMargin, getXAxes, getYAxes, layout, paintChart, projector, removeBottomXAxis, removeLeftYAxis, removeRightYAxis, removeTopXAxis, removeXAxis, removeYAxis, setBottomXAxis, setBreakLine, setChartAreaMargin, setLeftYAxis, setMinAxisWidth, setRightYAxis, setStackedBottomXAxisProportion, setStackedLeftYAxisProportion, setStackedRightYAxisProportion, setStackedTopXAxisProportion, setStackedXAxisMargin, setStackedXAxisProportion, setStackedYAxisMargin, setStackedYAxisProportion, setTopXAxis, setXAxis, setXAxis, setYAxis, setYAxis
 
Methods inherited from class lt.monarch.chart.MultiSeriesChartBase
activate, addObject, createLegendEntries, deactivate, findObject, getContainingObjects, getObjects, layoutObjects, removeObject, replaceObject, reset, setObjects, shiftObjects
 
Methods inherited from class lt.monarch.chart.AbstractChart
addPlugin, disableDrafMode, enableDraftMode, fillEntitySheet, getDescription, getLocale, getParentEntity, getPlugins, getShortDescription, invalidate, isDraftMode, paint, removePlugin, removePlugins, setDraftMode, setLocale
 
Methods inherited from class lt.monarch.chart.AbstractView
addViewListener, clone, container, getAlignmentX, getAlignmentY, getBounds, getChartObjectBounds, getContainer, getGraphicsType, getHeight, getMaximumSize, getMinimumSize, getPaintMode, getPaintStyle, getParent, getPreferredSize, getSize, getSize, getStyle, getStyle, getWidth, getX, getY, isLayoutValid, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setBounds, setContainer, setLocation, setMaximumSize, setMinimumSize, setPaintMode, setPreferredSize, setSize, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lt.monarch.chart.engine.View
addViewListener, clone, container, getAlignmentX, getAlignmentY, getBounds, getGraphicsType, getHeight, getMaximumSize, getMinimumSize, getPreferredSize, getSize, getSize, getStyle, getWidth, getX, getY, removeViewListener, render, repaint, repaint, setAlignmentX, setAlignmentY, setBounds, setBounds, setContainer, setLocation, setMaximumSize, setMinimumSize, setPreferredSize, setSize, validate
 

Field Detail

calc

protected ParetoValuesCalculator calc

lineMarker

protected AbstractMarker lineMarker

bar

protected BarSeries bar

line

protected LineSeries line

hMarkerLine

protected HorizontalMarkerLine hMarkerLine

xMapper

protected LabelAxisMapper xMapper

yMapper1

protected MathAxisMapper yMapper1

yMapper2

protected MathAxisMapper yMapper2

lineModel

protected ChartDataModel lineModel

barsModel

protected ChartDataModel barsModel
Constructor Detail

ParetoChart

public ParetoChart(ChartDataModel dataModel)
            throws DataFormatException
Constructs a Pareto chart from the supplied data model.

Throws:
DataFormatException
Method Detail

getParetoSeries

public BarSeries getParetoSeries()
Returns BarSeries representing Pareto bars.


getCumulativeLineSeries

public LineSeries getCumulativeLineSeries()
Returns cumulative line series representing the sum of bar values.


getLineMarker

public AbstractMarker getLineMarker()
Returns cumulative line marker


getCriticalMarkerLine

public HorizontalMarkerLine getCriticalMarkerLine()
Returns critical marker line


setLineMarker

public void setLineMarker(AbstractMarker marker)
Set cumulative line marker. The old marker is removed.


updateChart

protected void updateChart()
                    throws DataFormatException
Description copied from class: SpcChart
Redraws chart

Overrides:
updateChart in class SpcChart
Throws:
DataFormatException

updateMappers

protected void updateMappers(java.util.List<java.lang.String> labels,
                             int maxValue)
Creates axes mappers on chart creation or updates them on chart data model change.


updateAxes

protected void updateAxes()
Creates chart axes on chart creation.


updateParetoSeries

protected void updateParetoSeries()
Creates pareto series on chart creation.


updateCumulativeLineSeries

protected void updateCumulativeLineSeries()
Creates cumulative line series chart creation.


updateCriticalMarkerLine

protected void updateCriticalMarkerLine()
Creates critical marker line on chart creation.


updateGrid

protected void updateGrid()
Creates grid line on chart creation.