lt.monarch.chart.spc
Class LinePlotChart

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.LinePlotChart
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Chart<Projector2D>, ChartEntity, StyleEditorEntity, View

public class LinePlotChart
extends SpcChart

Line Plot chart

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  BarSeries bar
           
protected  ChartDataModel barsModel
           
protected  LinePlotValuesCalculator calc
           
protected  double scaleRatio
           
protected  MathAxisMapper xMapper
           
protected  MathAxisMapper yMapper
           
 
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
LinePlotChart(ChartDataModel dataModel, double scaleRatio)
          Constructs a LinePlot chart from the supplied data model.
 
Method Summary
Modifier and Type Method and Description
protected  lt.monarch.chart.spc.ChartBounds getBounds(java.util.LinkedList<ChartDataInfo> items)
           
 BarSeries getLinePlotSeries()
          Returns BarSeries
 java.lang.Double getScaleRatio()
          Returns scale ratio
 void setChartData(ChartDataModel dataModel, double scaleRatio)
          Sets all chart data
 void setScaleRatio(java.lang.Double scaleRatio)
          Sets scale ratio
protected  void updateAxes()
          Creates chart axes on chart creation.
protected  void updateChart()
          Redraws chart
protected  void updateLinePlotSeries()
          Creates LinePlot series on chart creation.
protected  void updateMappers(lt.monarch.chart.spc.ChartBounds bounds)
          Creates axes mappers on chart creation or updates them on chart data model change.
 
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 LinePlotValuesCalculator calc

scaleRatio

protected double scaleRatio

bar

protected BarSeries bar

xMapper

protected MathAxisMapper xMapper

yMapper

protected MathAxisMapper yMapper

barsModel

protected ChartDataModel barsModel
Constructor Detail

LinePlotChart

public LinePlotChart(ChartDataModel dataModel,
                     double scaleRatio)
              throws DataFormatException
Constructs a LinePlot chart from the supplied data model.

Parameters:
dataModel - data model
scaleRatio - initial scale ratio
Throws:
DataFormatException
Method Detail

setChartData

public void setChartData(ChartDataModel dataModel,
                         double scaleRatio)
                  throws DataFormatException
Sets all chart data

Parameters:
dataModel - data model
scaleRatio - initial scale ratio
Throws:
DataFormatException

getLinePlotSeries

public BarSeries getLinePlotSeries()
Returns BarSeries


updateChart

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

Overrides:
updateChart in class SpcChart
Throws:
DataFormatException

getBounds

protected lt.monarch.chart.spc.ChartBounds getBounds(java.util.LinkedList<ChartDataInfo> items)

updateMappers

protected void updateMappers(lt.monarch.chart.spc.ChartBounds bounds)
Creates axes mappers on chart creation or updates them on chart data model change.


updateAxes

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


updateLinePlotSeries

protected void updateLinePlotSeries()
Creates LinePlot series on chart creation.


getScaleRatio

public java.lang.Double getScaleRatio()
Returns scale ratio


setScaleRatio

public void setScaleRatio(java.lang.Double scaleRatio)
                   throws DataFormatException
Sets scale ratio

Throws:
DataFormatException