|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.AbstractView<PaintTags>
lt.monarch.chart.AbstractChart<PaintTags,GeneralProjector>
lt.monarch.chart.MultiSeriesChartBase<ChartPaintTags,Projector2D>
lt.monarch.chart.chart2D.Chart2D
lt.monarch.chart.spc.SpcChart
lt.monarch.chart.spc.HistogramChart
public class HistogramChart extends SpcChart
Histogram chart. Displays data divided into groups as a bar chart. Contains specified LSL and USL marker lines and the fitted normal distribution curve onto histogram bars. Values are calculated using formulas: http://www.singleton-labs.com/doc/mcharts/guide/#guide/chart-types/4.5.1.html
| Modifier and Type | Field and Description |
|---|---|
protected ChartDataModel |
barsDataModel
|
protected HistogramValuesCalculator |
calc
|
protected int |
groupsCount
|
protected BarSeries |
histogramBarSeries
|
protected TextMarker |
infoMarker
|
protected LineSeries |
line
|
protected ChartDataModel |
lineDataModel
|
protected java.lang.Double |
lsl
|
protected VerticalMarkerLine |
lslMarkerLine
|
protected VerticalMarkerLine |
meanMarkerLine
|
protected java.text.NumberFormat |
nf
|
protected java.lang.Double |
usl
|
protected VerticalMarkerLine |
uslMarkerLine
|
protected MathAxisMapper |
xMapper
|
protected LabelAxisMapper |
xMapperLabel
|
protected MathAxisMapper |
yMapperLeft
|
protected MathAxisMapper |
yMapperRight
|
| 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 and Description |
|---|
HistogramChart(ChartDataModel dataModel,
int groupsCount)
Constructs histogram chart without LSL and USL lines |
HistogramChart(ChartDataModel dataModel,
int groupsCount,
java.lang.Double lsl,
java.lang.Double usl)
Constructs histogram chart with LSL and USL lines |
| Modifier and Type | Method and Description |
|---|---|
protected lt.monarch.chart.spc.ChartBounds |
getBounds(double mean,
double std,
java.util.List<BinCenter> binCenters,
double binWidth)
|
LineSeries |
getDistributionCurveSeries()
Returns normal distribution curve. |
int |
getGroupsCount()
Returns value showing how many bins histogram contains. |
BarSeries |
getHistogramBarSeries()
Returns histogram bar series. |
TextMarker |
getInfoMarker()
Returns information marker. |
protected java.lang.String |
getInfoMarkerText(double mean,
double std)
Returns string value for info marker. |
java.lang.Double |
getLsl()
Returns lower specification limit |
VerticalMarkerLine |
getLslMarkerLine()
Returns lower specification limit marker line use setVisible(false) to hide it. |
VerticalMarkerLine |
getMeanMarkerLine()
Returns mean value marker. |
java.lang.Double |
getUsl()
Returns upper specification limit |
VerticalMarkerLine |
getUslMarkerLine()
Returns upper specification limit marker line Use setVisible(false) to hide it. |
void |
setChartData(ChartDataModel dataModel,
int groupsCount,
java.lang.Double lsl,
java.lang.Double usl)
Sets all histogram chart data with LSL and USL lines |
void |
setGroupsCount(int groupsCount)
Sets value showing how many bins histogram has to contain Recommended values: Number of Data Points Number of groups < 50 5--7 50--100 6--10 101--250 7--12 > 250 10--20 |
void |
setLsl(java.lang.Double lsl)
Sets lower specification limit |
void |
setUsl(java.lang.Double usl)
Sets upper specification limit |
protected void |
updateAxes()
Creates chart axes on chart initialization. |
protected void |
updateChart()
Redraws chart |
protected void |
updateGrid()
Creates chart grid on chart creation. |
protected void |
updateHistogramSeries(java.util.List<BinCenter> binCenters)
Creates histogram series on chart creation or updates them on chart data model change. |
protected void |
updateInfoMarker(double minx,
double max,
double diff,
double mean,
double std)
Creates string value of text marker on chart creation or updates it on chart data model change. |
protected void |
updateLineSeries(lt.monarch.chart.spc.ChartBounds bounds,
double mean,
double std,
double area)
Creates lines series on chart creation or updates them on chart data model change. |
protected void |
updateLslMarkerLine()
Creates lower specification level marker line on chart creation or updates it on chart data model change. |
protected void |
updateMappers(lt.monarch.chart.spc.ChartBounds bounds,
java.util.List<BinCenter> binCenters,
int dataCount)
|
protected void |
updateMeanMarkerLine(double mean)
Creates mean marker line on chart creation or updates it on chart data model change. |
protected void |
updateUslMarkerLine()
Creates upper specification level marker line on chart creation or updates it 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.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 |
|---|
protected VerticalMarkerLine uslMarkerLine
protected VerticalMarkerLine lslMarkerLine
protected VerticalMarkerLine meanMarkerLine
protected java.text.NumberFormat nf
protected ChartDataModel barsDataModel
protected ChartDataModel lineDataModel
protected TextMarker infoMarker
protected java.lang.Double lsl
protected java.lang.Double usl
protected MathAxisMapper xMapper
protected BarSeries histogramBarSeries
protected LineSeries line
protected MathAxisMapper yMapperLeft
protected MathAxisMapper yMapperRight
protected LabelAxisMapper xMapperLabel
protected HistogramValuesCalculator calc
protected int groupsCount
| Constructor Detail |
|---|
public HistogramChart(ChartDataModel dataModel,
int groupsCount)
throws DataFormatException
dataModel - histogram datagroupsCount - bins countDataFormatException
public HistogramChart(ChartDataModel dataModel,
int groupsCount,
java.lang.Double lsl,
java.lang.Double usl)
throws DataFormatException
dataModel - histogram datagroupsCount - bins countlsl - LSL valueusl - USL valueDataFormatException| Method Detail |
|---|
public void setChartData(ChartDataModel dataModel,
int groupsCount,
java.lang.Double lsl,
java.lang.Double usl)
throws DataFormatException
dataModel - histogram datagroupsCount - bins countlsl - LSL valueusl - USL valueDataFormatException
protected void updateChart()
throws DataFormatException
SpcChart
updateChart in class SpcChartDataFormatException
protected void updateLineSeries(lt.monarch.chart.spc.ChartBounds bounds,
double mean,
double std,
double area)
protected void updateGrid()
protected void updateAxes()
protected void updateMappers(lt.monarch.chart.spc.ChartBounds bounds,
java.util.List<BinCenter> binCenters,
int dataCount)
protected void updateLslMarkerLine()
protected void updateUslMarkerLine()
protected void updateMeanMarkerLine(double mean)
protected void updateInfoMarker(double minx,
double max,
double diff,
double mean,
double std)
throws DataFormatException
minx - max - diff - mean - std - DataFormatException
protected java.lang.String getInfoMarkerText(double mean,
double std)
throws DataFormatException
mean - std - DataFormatExceptionprotected void updateHistogramSeries(java.util.List<BinCenter> binCenters)
protected lt.monarch.chart.spc.ChartBounds getBounds(double mean,
double std,
java.util.List<BinCenter> binCenters,
double binWidth)
public LineSeries getDistributionCurveSeries()
public java.lang.Double getLsl()
public void setLsl(java.lang.Double lsl)
throws DataFormatException
DataFormatExceptionpublic java.lang.Double getUsl()
public void setUsl(java.lang.Double usl)
throws DataFormatException
DataFormatExceptionpublic int getGroupsCount()
public void setGroupsCount(int groupsCount)
throws DataFormatException
DataFormatExceptionpublic BarSeries getHistogramBarSeries()
public VerticalMarkerLine getUslMarkerLine()
public VerticalMarkerLine getLslMarkerLine()
public TextMarker getInfoMarker()
public VerticalMarkerLine getMeanMarkerLine()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||