|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.chart.ChartFactory
com.davisor.graphics.chart.AxisFactory
com.davisor.graphics.chart.ShapeFactory
com.davisor.graphics.chart.ScatterFactory
ScatterFactory implements a scatter chart producer that can make polyline charts from twoe-dimensional multichannel data.
This factory inherits all of it's attribute and data operation
logic from AxisFactory grand-superclass, and most of it's
rendering logic from ShapeFactory superclass. In fact, this
class implements itself only some low-level rendering methods that
lay out shape chart visual elements in a way suitable for scatter
charts. Please see AxisFactory documentation for more
information about what kind of data and attributes this factory
accepts.
If the dataset the line is based on is cumulative, open filled areas are closed by two lines that connect the first and last points of the cumulative line the the corredponding points on the previous line. Please note that this is somewhat untypical way to visualize cumulative values, as unlike in many other cumulative data visualizations, the coordinate values of the cumulative points are not summed together.
Scatter factory 3D lines are rendered using painter's algorithm and simple isometric projection. This imposes certain limitations of what kind of lines can be rendered in 3D:
null values in cumulative 3D lines are ignored
completely by just connecting all other points, while in all other
cases the null points break the line in two or more
disconnected parts
sumCumulativeValues() ShapeFactory.isCumulative(int, boolean[]))
absCumulativeValues(boolean) and ShapeFactory.isAbsolute(int, boolean[], com.davisor.graphics.chart.ChartData, com.davisor.graphics.chart.ChartAttributes, com.davisor.graphics.chart.PlotRenderAttributes, boolean))
zeroCumulativeValues() and ShapeFactory.isCumulative(int, boolean[]))
ShapeFactory.isCumulative(int, boolean[]))
ChartAttributes,
ChartData,
ColumnBarFactory,
PieFactory,
RowBarFactory,
ScatterFactory| Nested Class Summary |
| Nested classes inherited from class com.davisor.graphics.chart.ShapeFactory |
ShapeFactory.ShapeContext |
| Nested classes inherited from class com.davisor.graphics.chart.AxisFactory |
AxisFactory.AxisContext, AxisFactory.AxisMetrics |
| Nested classes inherited from class com.davisor.graphics.chart.ChartFactory |
ChartFactory.ChartContext, ChartFactory.ChartMetrics |
| Field Summary |
| Fields inherited from class com.davisor.graphics.chart.ShapeFactory |
BELOW, CENTER, LEFT, OVER, RIGHT |
| Fields inherited from class com.davisor.graphics.chart.AxisFactory |
DEFAULTLABELTYPE, FLIPX, FLIPY, MAJORMARGIN, MINORMARGIN, MINSIZE |
| Fields inherited from class com.davisor.graphics.chart.ChartFactory |
ALL, BRIGHT, CHANNEL, COS, DARK, DOTSEQUENCE, DOTSTROKE, DOTSTROKEWIDTH, DUMPFACTORYNAME, ENCODERINFO, FONT, FRC, HAS_3D, I, LABEL, LABELFIELDNAMES, LABELFIELDS, MIME_DEFAULT, NONE, NORMAL, NULLSTROKE, PERCENT, PI2, SHAPE, SIN, STROKE, STROKEWIDTH, TIC, VALUE, X, Y, Z |
| Fields inherited from interface com.davisor.core.MIMETypes |
FILETYPE_BMP, FILETYPE_CSS, FILETYPE_DOC, FILETYPE_ECMA, FILETYPE_GIF, FILETYPE_HTML, FILETYPE_HTML_CSS, FILETYPE_INDEX, FILETYPE_INDEX_DOC, FILETYPE_INDEX_HTML, FILETYPE_INDEX_HTML_CSS, FILETYPE_INDEX_PDF, FILETYPE_INDEX_PPT, FILETYPE_INDEX_SVG, FILETYPE_INDEX_XHTML, FILETYPE_INDEX_XLS, FILETYPE_INDEX_XMSE, FILETYPE_INDEX_XMSP, FILETYPE_INDEX_XMSW, FILETYPE_INDEX_XSLFO, FILETYPE_JPEG, FILETYPE_PDF, FILETYPE_PNG, FILETYPE_PNG_WBMP, FILETYPE_PPM, FILETYPE_PPT, FILETYPE_SVG, FILETYPE_TEXT, FILETYPE_WBMP, FILETYPE_XHTML, FILETYPE_XLS, FILETYPE_XML, FILETYPE_XMSE, FILETYPE_XMSP, FILETYPE_XMSW, FILETYPE_XSLFO, FILETYPE_XSLFO_CSS, MIME_BMP, MIME_CSS, MIME_DOC, MIME_ECMA, MIME_GIF, MIME_HTML, MIME_HTML_CSS, MIME_INDEX, MIME_INDEX_DOC, MIME_INDEX_HTML, MIME_INDEX_HTML_CSS, MIME_INDEX_PDF, MIME_INDEX_PPT, MIME_INDEX_SVG, MIME_INDEX_XHTML, MIME_INDEX_XLS, MIME_INDEX_XMSE, MIME_INDEX_XMSP, MIME_INDEX_XMSW, MIME_INDEX_XSLFO, MIME_JPEG, MIME_OTHER, MIME_PDF, MIME_PNG, MIME_PNG_WBMP, MIME_PPM, MIME_PPT, MIME_SVG, MIME_TEXT, MIME_WBMP, MIME_XHTML, MIME_XLS, MIME_XML, MIME_XMSE, MIME_XMSP, MIME_XMSW, MIME_XSLFO, MIME_XSLFO_CSS |
| Constructor Summary | |
ScatterFactory()
Default constructor. |
|
ScatterFactory(ScatterFactory factory)
Copy constructor. |
|
| Method Summary | |
protected boolean |
absCumulativeValues(boolean isometric)
Tests if the visualization strategy implemented by this shape factory instance requires that only absolute values should be used for cumulative data. |
protected void |
drawValues(java.awt.Graphics2D g,
java.awt.Paint color,
java.awt.Paint paint,
java.awt.Font font,
java.lang.String[] value,
AxisFactory.AxisMetrics info,
int alignment,
java.awt.geom.Rectangle2D[] shapeBounds,
boolean multiSeriesMode)
Draws values at the top the data points. |
com.davisor.core.Dupable |
dup()
Duplicates this factory. |
protected DataValue |
getSubChannel(DataValue channelValue,
int subChannel)
Gets a sub-channel value. |
protected int |
getSubChannels(Type valueType)
Gets the number of sub-channels. |
protected DataValue[] |
resolveDataLimits(ChartData data,
ChartAttributes attr,
PlotRenderAttributes plot,
int[] channels,
boolean isometric,
boolean[] cumulative)
Determines global minimum and maximum data values. |
protected DataValue[][] |
resolveLimits(ChartDataSummary summary)
Computes chart factory specific limit values for axes. |
protected boolean |
sumCumulativeValues()
Tests if the visualization strategy implemented by this shape factory instance requires that cumulative data values should be summed together or not. |
protected boolean |
zeroCumulativeValues()
Tests if the visualization strategy implemented by this shape factory instance requires that missing cumulative data values should be replaced by zero values. |
| Methods inherited from class com.davisor.graphics.chart.ShapeFactory |
createContext, createContext, createContext, createMetrics, drawChart, drawGroup, drawLine, drawSegments, drawShapes, drawSmoothedLine, getAngle, getDefaultLineColor, getDefaultLinePaint, getLegendShape, isAbsolute, isCumulative |
| Methods inherited from class com.davisor.graphics.chart.AxisFactory |
computeMinorMargin, createChart, createChart, createContext, createMetrics, createMetrics, createMetrics, drawAxis, drawMarkers, drawTics, drawXYAxes, drawXYZAxes, fillGrid, fillMarkers, formatDouble, getIdealSize, getIdealSize, hasGridLines, isSilent, labelAxis, labelMarkers, resolveLabels, resolveLabels, resolveMarkerSizes, resolveOverlap, titleAxis, transpose |
| Methods inherited from class com.davisor.graphics.chart.ChartFactory |
annotate, combineProperties, createChannelType, createChannelType, createChart, createChart, createChart, createChart, createChart, createFormat, createPaintChannelType, createPaintChannelType, createShapeChannelType, createShapeChannelType, createSummary, drawLabel, getContentType, getDefaultPaint, getFactory, getFactory, getGroup, getIsometricCoefficients, getName, has3D, hasSVG, isClassAvailable, isMultiSeriesMode, main, mayHaveLegend, registerFactory, resolveDataLimits, rotateSize, shade, unregisterFactory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ScatterFactory()
public ScatterFactory(ScatterFactory factory)
| Method Detail |
protected DataValue[][] resolveLimits(ChartDataSummary summary)
This implementation assumes that the given data values are tuples and it takes the X- and Y-axis limit values from the respective first two tuple member values.
resolveLimits in class ShapeFactorysummary - chart data summary
ChartFactory.createSummary(com.davisor.graphics.chart.ChartData, com.davisor.graphics.chart.ChartAttributes, com.davisor.graphics.chart.ChartAxes, com.davisor.graphics.chart.PlotRenderAttributes, com.davisor.data.EnumType, int[], boolean, int[])
protected DataValue[] resolveDataLimits(ChartData data,
ChartAttributes attr,
PlotRenderAttributes plot,
int[] channels,
boolean isometric,
boolean[] cumulative)
throws InvalidDataException
Scatter factory cumulative data channel coordinate values do not stack. Instead, cumulativeness affects wether line fill area attaches itself to previous line (cumulative), or X -axis (not cumulative).
Warning! Do not modify the returned values since they may be references to the original data points.
resolveDataLimits in class ChartFactorydata - chart data to be inspectedattr - chart rendering attributesplot - local plot area attributeschannels - indexes of the channels to be inspectedisometric - isometric rendering may affect how doata is understoodcumulative - precomputed channel cumulativenes values
InvalidDataException - if data limit resolvation failsChartFactory.resolveDataLimits(DataValue[][],boolean[]),
ChartData.getLimits(int[],Type,boolean[],boolean[])protected boolean absCumulativeValues(boolean isometric)
absCumulativeValues in class ShapeFactoryisometric - tells if visualization will be isometric 3D or not
falseDataValue.abs(),
sumCumulativeValues(),
zeroCumulativeValues()
protected DataValue getSubChannel(DataValue channelValue,
int subChannel)
getSubChannel in class ShapeFactorychannelValue - channel valuesubChannel - sub-channel index
protected int getSubChannels(Type valueType)
getSubChannels in class ShapeFactoryvalueType - channel type
protected boolean sumCumulativeValues()
sumCumulativeValues in class ShapeFactoryfalseDataValue.add(DataValue),
absCumulativeValues(boolean),
zeroCumulativeValues()protected boolean zeroCumulativeValues()
zeroCumulativeValues in class ShapeFactoryfalseType.zero(),
absCumulativeValues(boolean),
sumCumulativeValues()
protected void drawValues(java.awt.Graphics2D g,
java.awt.Paint color,
java.awt.Paint paint,
java.awt.Font font,
java.lang.String[] value,
AxisFactory.AxisMetrics info,
int alignment,
java.awt.geom.Rectangle2D[] shapeBounds,
boolean multiSeriesMode)
drawValues in class ShapeFactoryg - the graphics' context to draw intocolor - label colorspaint - label paintsfont - label fontvalue - value textsinfo - axis infoalignment - label alignment in relation to shapeshapeBounds - value will be aligned in relation to shape boundsmultiSeriesMode - if this is false, palette colors will be rotatedpublic com.davisor.core.Dupable dup()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||