NetCharts Pro

netcharts.pro.common.rectangular
Class NFDataChart

java.lang.Object
  extended by netcharts.pro.common.NFGraph
      extended by netcharts.pro.common.zoomable.NFZoomableChart
          extended by netcharts.pro.common.rectangular.NFDataChart
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver
Direct Known Subclasses:
NFAbstractBarchart, NFAbstractLineChart, NFBoxchart, NFBubblechart, NFStripchart, NFTimechart

public abstract class NFDataChart
extends NFZoomableChart

Represents an axis based chart. Provides the attributes common to charts that have axes.

See Also:
Serialized Form

Field Summary
static int GRID_ANIMATION_STYLE_FADE
          Grid animation style fade
static int GRID_ANIMATION_STYLE_NONE
          No grid animation style
 
Fields inherited from class netcharts.pro.common.zoomable.NFZoomableChart
NOZOOM, zoomActionsMap, ZOOMIN, ZOOMOUT
 
Fields inherited from class netcharts.pro.common.NFGraph
ANTIALIAS_OFF, ANTIALIAS_ON, ANTIALIAS_ONDRAW, ANTIALIAS_ONTEXT, antiAliasModeMap, BAR, BAR3D, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, DWELL_ANIMATION_STYLE_HIGHLIGHT, DWELL_ANIMATION_STYLE_NONE, FADE, HEATMAP, HIGHLIGHT, HISTOGRAM, LABEL_ANIMATION_STYLE_FADE, LABEL_ANIMATION_STYLE_NONE, LEGEND_ANIMATION_STYLE_FADE, LEGEND_ANIMATION_STYLE_NONE, LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHT, LEGEND_DWELL_ANIMATION_STYLE_NONE, LINE, MULTIPIE, PARETO, PIE, POLAR, RADAR, STOCK, STRIP, TIME, XY
 
Constructor Summary
NFDataChart()
          Constructs a default chart object.
NFDataChart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFDataChart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
NFDataChart(java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
 
Method Summary
 void addGrid(NFGrid grid)
          Adds a grid to the grid series.
 double getAutoscalePad()
          Get the autoscale padding.
 NFAxesSize getAxesSizes()
          Gets the axes size.
 int getAxisThickness()
          Get axis thickness - only applies if chart depth is not 0
 NFAxis getBottomAxis()
          Gets the bottom axis object.
 NFAxisSeries getBottomAxisSeries()
          Gets the bottom axis series.
 NFGrid getGrid()
          Gets the grid object for this chart.
 int getGridAnimationStyle()
          Get the grid animation style.
 int getGridDepth()
          Get the 3D depth of the grids.
 NFGridSeries getGridSeries()
          Gets the grid objects for this chart.
 NFAxis getLeftAxis()
          Gets the left axis object.
 NFAxisSeries getLeftAxisSeries()
          Gets the left axis series.
 NFAxis getRightAxis()
          Gets the right axis object.
 NFAxisSeries getRightAxisSeries()
          Gets the right axis series.
 NFAxis getTopAxis()
          Gets the top axis object.
 NFAxisSeries getTopAxisSeries()
          Gets the top axis series.
 NFAxis getXAxis(NFDataSet set)
          Gets the X axis object for a dataset.
 NFAxis getYAxis(NFDataSet set)
          Gets the Y axis object for a dataset.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setAutoscalePad(double autoscalePad)
          Set the autoscale padding.
 void setAxesSizes(NFAxesSize axesSizes)
          Sets the axes size.
 void setAxisThickness(int axisThickness)
          Set axis thickness - only applies if chart depth is not 0
 void setBottomAxis(NFAxis bottomAxis)
          Sets the bottom axis object.
 void setBottomAxisSeries(NFAxisSeries bottomAxisSeries)
          Sets the bottom axis series.
 void setGrid(NFGrid grid)
          Sets a grid object for this chart.
 void setGridAnimationStyle(int style)
          Set the grid animation style.
 void setGridDepth(int gridDepth)
          Set the 3D depth of the grids.
 void setGridSeries(NFGridSeries gridSeries)
          Sets the grid objects for this chart.
 void setLeftAxis(NFAxis leftAxis)
          Sets the left axis object.
 void setLeftAxisSeries(NFAxisSeries leftAxisSeries)
          Sets the left axis series.
 void setRightAxis(NFAxis rightAxis)
          Sets the right axis object.
 void setRightAxisSeries(NFAxisSeries rightAxisSeries)
          Sets the right axis series.
 void setTopAxis(NFAxis topAxis)
          Sets the top axis object.
 void setTopAxisSeries(NFAxisSeries topAxisSeries)
          Sets the top axis series.
 void writeChart(java.lang.StringBuffer sb)
          Writes this chart into a string buffer
 void writeExternal(java.io.ObjectOutput out)
          Writes this chart into an object for serialization.
 
Methods inherited from class netcharts.pro.common.zoomable.NFZoomableChart
getMouseControlDown, getMouseMetaDown, getMouseShiftDown, getZoomingEnabled, setMouseControlDown, setMouseMetaDown, setMouseShiftDown, setZoomingEnabled, zoom
 
Methods inherited from class netcharts.pro.common.NFGraph
addChartActionListener, addGraphObserver, addNote, addPropertyChangeListener, display, dwellDisplay, dwellPress, finalize, getActiveClicks, getAlwaysUpdate, getAntiAlias, getAntiAliasMode, getBackgroundActiveLabel, getBackgroundFillPattern, getBackgroundRegion, getBuildAnimationEnabled, getCDL, getChartElementSpacing, getChartName, getChartSize, getColorTable, getDataActiveLabelsEnabled, getDefaultData, getDwell, getDwellAnimation, getDwellAnimationHighlight, getDwellAnimationStyle, getDwellOffset, getErrors, getFooter, getGraph, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphGraphics, getHeader, getLabelAnimationStyle, getLeftTitle, getLegend, getLegendAnimationStyle, getLegendDwellAnimation, getLegendDwellAnimationHighlight, getLegendDwellAnimationStyle, getLicenseActivationKey, getMetaData, getMinimumSize, getNoteSeries, getNumberFormat, getNumErrors, getPanel, getPlotArea, getPreferredSize, getRightTitle, getRootPanel, getRubberband, getScaleFactor, getTitleSpacing, getToggleDataVisibility, getType, getVersion, graphDrawn, graphTooSmall, initializeFromFile, initializeFromString, initializeFromURL, loadFromTemplate, loadFromTemplate, loadFromTemplate, loadLicenseFile, paint, postDrag, postScroll, preDrag, preScroll, readExternal, removeChartActionListener, removeGraphObserver, removePropertyChangeListener, sendData, sendData, sendData, sendData, sendUpdate, set, set, set, set, set, set, setActiveClicks, setAlwaysUpdate, setAntiAlias, setAntiAliasMode, setBackgroundActiveLabel, setBackgroundFillPattern, setBackgroundRegion, setBuildAnimationEnabled, setChartElementSpacing, setChartName, setChartSize, setColorTable, setDataActiveLabelsEnabled, setDocumentBase, setDwell, setDwellAnimation, setDwellAnimationHighlight, setDwellAnimationStyle, setDwellOffset, setFooter, setHeader, setLabelAnimationStyle, setLeftTitle, setLegend, setLegendAnimationStyle, setLegendDwellAnimation, setLegendDwellAnimationHighlight, setLegendDwellAnimationStyle, setLicenseKey, setLicenseKey, setLicenseLocation, setMetaData, setNoteSeries, setNumberFormat, setParentApplet, setPlotArea, setRightTitle, setRubberband, setScaleFactor, setSize, setSize, setTitleSpacing, setToggleDataVisibility, start, stop, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GRID_ANIMATION_STYLE_NONE

public static final int GRID_ANIMATION_STYLE_NONE
No grid animation style

See Also:
Constant Field Values

GRID_ANIMATION_STYLE_FADE

public static final int GRID_ANIMATION_STYLE_FADE
Grid animation style fade

See Also:
Constant Field Values
Constructor Detail

NFDataChart

public NFDataChart()
Constructs a default chart object.


NFDataChart

public NFDataChart(java.util.Properties initProperties)
Constructs a chart object on the given JPanel.

Parameters:
initProperties - A java.util.Properties object containing the set of runtime properties to use when generating the chart. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.

NFDataChart

public NFDataChart(javax.swing.JPanel panel)
Constructs a chart object on the given JPanel.

Parameters:
panel - Panel to draw graph on.

NFDataChart

public NFDataChart(javax.swing.JPanel panel,
                   java.util.Properties initProperties)
Constructs a chart object on the given JPanel.

Parameters:
panel - Panel to draw chart on.
initProperties - A java.util.Properties object containing the set of runtime properties to use when generating the chart. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.
Method Detail

setGridAnimationStyle

public void setGridAnimationStyle(int style)
Set the grid animation style.

If the value passed is not a valid grid animation style, GRID_ANIMATION_STYLE_NONE will be used.

Parameters:
style - One of GRID_ANIMATION_STYLE_NONE (default) or GRID_ANIMATION_STYLE_FADE

getGridAnimationStyle

public int getGridAnimationStyle()
Get the grid animation style.

Returns:
style One of GRID_ANIMATION_STYLE_NONE (default) or GRID_ANIMATION_STYLE_FADE

setAxisThickness

public void setAxisThickness(int axisThickness)
Set axis thickness - only applies if chart depth is not 0

Parameters:
axisThickness -

getAxisThickness

public int getAxisThickness()
Get axis thickness - only applies if chart depth is not 0

Returns:
axisThickness

setGridDepth

public void setGridDepth(int gridDepth)
Set the 3D depth of the grids. If set to -1, it will use the default depth of the chart.

Parameters:
gridDepth -

getGridDepth

public int getGridDepth()
Get the 3D depth of the grids. If set to -1, it will use the default depth of the chart.

Returns:
gridDepth

setAutoscalePad

public void setAutoscalePad(double autoscalePad)
Set the autoscale padding. This is a number between 0 and 100 representing a percentage.

Parameters:
autoscalePad -

getAutoscalePad

public double getAutoscalePad()
Get the autoscale padding. This is a number between 0 and 100 representing a percentage.

Returns:
autoscalePad

addGrid

public void addGrid(NFGrid grid)
Adds a grid to the grid series. A new grid series object will be created if not present.

Parameters:
grid -

setGrid

public void setGrid(NFGrid grid)
Sets a grid object for this chart. Will override any other calls to addGrid or setGridSeries

Parameters:
grid -

getGrid

public NFGrid getGrid()
Gets the grid object for this chart. If more than one grid has been set, then this method will return the first grid. If no grids have been set, null is returned.

Returns:
grid or null

setGridSeries

public void setGridSeries(NFGridSeries gridSeries)
Sets the grid objects for this chart. An easier interface for most applications is to use addGrid(grid); To set a property on the grid series, you must first retrieve the series, then set the property (properties) and finally set the line series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFGridSeries gridSeries = chart.getGridSeries();
     NFGrid grid = (NFGrid)gridSeries.elementAt(0);
     // Set some of the properties on the NFGrid
     ...
     gridSeries.setElementAt(grid, 0);
     chart.setGridSeries(gridSeries);
 

Parameters:
gridSeries -

getGridSeries

public NFGridSeries getGridSeries()
Gets the grid objects for this chart. To set a property on the grid series, you must first retrieve the series, then set the property (properties) and finally set the line series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFGridSeries gridSeries = chart.getGridSeries();
     NFGrid grid = (NFGrid)gridSeries.elementAt(0);
     // Set some of the properties on the NFGrid
     ...
     gridSeries.setElementAt(grid, 0);
     chart.setGridSeries(gridSeries);
 

Returns:
gridSeries or null if not set.

setLeftAxis

public void setLeftAxis(NFAxis leftAxis)
Sets the left axis object.

Parameters:
leftAxis -

getLeftAxis

public NFAxis getLeftAxis()
Gets the left axis object.

Returns:
leftAxis

getXAxis

public NFAxis getXAxis(NFDataSet set)
Gets the X axis object for a dataset.

Parameters:
set - dataset
Returns:
X axis

getYAxis

public NFAxis getYAxis(NFDataSet set)
Gets the Y axis object for a dataset.

Parameters:
set - dataset
Returns:
Y axis

setLeftAxisSeries

public void setLeftAxisSeries(NFAxisSeries leftAxisSeries)
Sets the left axis series. This should only be used if more than one left axis is displayed. In that case, do not use setLeftAxis. To set a property on the left axis series, you must first retrieve the series, then set the property (properties) and finally set the left axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis leftAxis1 = null;
     ...
     NFAxisSeries leftAxisSeries = chart.getLeftAxisSeries();
     leftAxisSeries.setElementAt(leftAxis1, 0);
     chart.setLeftAxisSeries(leftAxisSeries);
 

Parameters:
leftAxisSeries -

getLeftAxisSeries

public NFAxisSeries getLeftAxisSeries()
Gets the left axis series. This should only be used if more than one left axis is displayed. In that case, do not use getLeftAxis. To set a property on the left axis series, you must first retrieve the series, then set the property (properties) and finally set the left axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis leftAxis1 = null;
     ...
     NFAxisSeries leftAxisSeries = chart.getLeftAxisSeries();
     leftAxisSeries.setElementAt(leftAxis1, 0);
     chart.setLeftAxisSeries(leftAxisSeries);
 

Returns:
leftAxisSeries

setRightAxis

public void setRightAxis(NFAxis rightAxis)
Sets the right axis object.

Parameters:
rightAxis -

getRightAxis

public NFAxis getRightAxis()
Gets the right axis object.

Returns:
rightAxis

setRightAxisSeries

public void setRightAxisSeries(NFAxisSeries rightAxisSeries)
Sets the right axis series. This should only be used if more than one right axis is displayed. In that case, do not use setRightAxis. To set a property on the right axis series, you must first retrieve the series, then set the property (properties) and finally set the right axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis rightAxis1 = null;
     ...
     NFAxisSeries rightAxisSeries = chart.getRightAxisSeries();
     rightAxisSeries.setElementAt(rightAxis1, 0);
     chart.setRightAxisSeries(rightAxisSeries);
 

Parameters:
rightAxisSeries -

getRightAxisSeries

public NFAxisSeries getRightAxisSeries()
Gets the right axis series. This should only be used if more than one right axis is displayed. In that case, do not use getRightAxis. To set a property on the right axis series, you must first retrieve the series, then set the property (properties) and finally set the right axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis rightAxis1 = null;
     ...
     NFAxisSeries rightAxisSeries = chart.getRightAxisSeries();
     rightAxisSeries.setElementAt(rightAxis1, 0);
     chart.setRightAxisSeries(rightAxisSeries);
 

Returns:
rightAxisSeries

setBottomAxis

public void setBottomAxis(NFAxis bottomAxis)
Sets the bottom axis object.

Parameters:
bottomAxis -

getBottomAxis

public NFAxis getBottomAxis()
Gets the bottom axis object.

Returns:
bottomAxis

setBottomAxisSeries

public void setBottomAxisSeries(NFAxisSeries bottomAxisSeries)
Sets the bottom axis series. This should only be used if more than one bottom axis is displayed. In that case, do not use setBottomAxis. To set a property on the bottom axis series, you must first retrieve the series, then set the property (properties) and finally set the left axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis bottomAxis1 = null;
     ...
     NFAxisSeries bottomAxisSeries = chart.getBottomAxisSeries();
     bottomAxisSeries.setElementAt(bottomAxis1, 0);
     chart.setBottomAxisSeries(bottomAxisSeries);
 

Parameters:
bottomAxisSeries -

getBottomAxisSeries

public NFAxisSeries getBottomAxisSeries()
Gets the bottom axis series. This should only be used if more than one bottom axis is displayed. In that case, do not use getBottomAxis. To set a property on the bottom axis series, you must first retrieve the series, then set the property (properties) and finally set the left axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis bottomAxis1 = null;
     ...
     NFAxisSeries bottomAxisSeries = chart.getBottomAxisSeries();
     bottomAxisSeries.setElementAt(bottomAxis1, 0);
     chart.setBottomAxisSeries(bottomAxisSeries);
 

Returns:
bottomAxisSeries

setTopAxis

public void setTopAxis(NFAxis topAxis)
Sets the top axis object.

Parameters:
topAxis -

getTopAxis

public NFAxis getTopAxis()
Gets the top axis object.

Returns:
topAxis

setTopAxisSeries

public void setTopAxisSeries(NFAxisSeries topAxisSeries)
Sets the top axis series. This should only be used if more than one top axis is displayed. In that case, do not use setTopAxis. To set a property on the top axis series, you must first retrieve the series, then set the property (properties) and finally set the right axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis topAxis1 = null;
     ...
     NFAxisSeries topAxisSeries = chart.getTopAxisSeries();
     topAxisSeries.setElementAt(topAxis1, 0);
     chart.setTopAxisSeries(topAxisSeries);
 

Parameters:
topAxisSeries -

getTopAxisSeries

public NFAxisSeries getTopAxisSeries()
Gets the top axis series. This should only be used if more than one top axis is displayed. In that case, do not use getTopAxis. To set a property on the top axis series, you must first retrieve the series, then set the property (properties) and finally set the right axis series.
     NFBarchart chart = null; // NFBarchart, NFBoxchart, etc.
     NFAxis topAxis1 = null;
     ...
     NFAxisSeries topAxisSeries = chart.getTopAxisSeries();
     topAxisSeries.setElementAt(topAxis1, 0);
     chart.setTopAxisSeries(topAxisSeries);
 

Returns:
leftTopSeries

setAxesSizes

public void setAxesSizes(NFAxesSize axesSizes)
Sets the axes size. The AxesSize specifies the amount of space that will allocated to draw top, bottom, left and right axes. AxesSize is typically used in conjunction with PlotArea to further control the layout of the plot area of the chart.

Parameters:
axesSizes -

getAxesSizes

public NFAxesSize getAxesSizes()
Gets the axes size. The AxesSize specifies the amount of space that will allocated to draw top, bottom, left and right axes. AxesSize is typically used in conjunction with PlotArea to further control the layout of the plot area of the chart.

Returns:
axesSizes

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Writes this chart into an object for serialization.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class NFZoomableChart
Throws:
java.io.IOException

writeChart

public void writeChart(java.lang.StringBuffer sb)
Writes this chart into a string buffer

Overrides:
writeChart in class NFZoomableChart

resetState

public void resetState()
Resets all of the parameter values to their initial state.

Overrides:
resetState in class NFZoomableChart

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011