Chart FX 7 for Java Desktop

com.softwarefx.chartfx.desktop
Class Chart

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.softwarefx.chartfx.desktop.Chart
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class Chart
extends JComponent
implements Serializable

Provides access to the Chart object. This is the main class of the ChartFX library.

General chart properties are provided to set general attributes in the chart. For example, you may use properties to show or hide tools in the chart window or to apply a specific line style to all lines in a line chart.

The data is passed to the chart using the getData() property. Alternativelly, data binding is also available through the setDataSource(com.softwarefx.chartfx.desktop.dataproviders.IDataSource) and getDataSourceSettings() properties.

There may be a case in which a general property is also found in a specific object. For example, you may use a general property called setGallery(com.softwarefx.chartfx.desktop.Gallery) property to change the chart type displayed (for getAllSeries() in the chart), but if you use the Gallery property supported by the SeriesAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery)object you will change the chart type for a particular series (thus creating a MultiType chart) instead of all series in the chart. You may even go a step further by assigning properties directly to specific points rather than series using the getPoints()object.

Some properties of the Chart object act as a mechanism for assigning attributes directly to other objects that exist in the chart. Some of these properties include LegendBox, ToolBarItem, getMenuBar(), and getDataGrid(). If you want to assign individual properties to elements in the chart, you may refer to the different objects available.

The chart can be rendered in 3D. The getView3D() property provides access the 3D customization of the chart.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
Field Summary
static double HIDDEN
           
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Chart()
           
 
Method Summary
 void addConditionalAttributesCallbackListener(ConditionalAttributesListener value)
          Adds a ConditionalAttributesCallbackListener to the listener list.
 void addDataChangedByUserListener(PointLabelListener value)
          Adds a DataChangedByUserListener to the listener list.
 void addGetAxisLabelListener(AxisLabelListener value)
          Adds a GetAxisLabelListener to the listener list.
 void addGetPointLabelListener(PointLabelListener value)
          Adds a GetPointLabelListener to the listener list.
 void addGetTipListener(GetTipListener value)
          Adds a GetTipListener to the listener list.
 void addHighlightingListener(com.softwarefx.chartfx.desktop.HighlightingListener value)
          Adds a HighlightingListener to the listener list.
 void addMouseClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Adds a MouseClickListener to the listener list.
 void addMouseDoubleClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Adds a MouseDoubleClickListener to the listener list.
 void addMouseDownListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Adds a MouseDownListener to the listener list.
 void addMouseMoveListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Adds a MouseMoveListener to the listener list.
 void addMouseUpListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Adds a MouseUpListener to the listener list.
 void addPaintMarkerListener(PaintMarkerListener value)
          Adds a PaintMarkerListener to the listener list.
 void addPostPaintListener(CustomPaintListener value)
          Adds a PostPaintListener to the listener list.
 void addPrePaintListener(CustomPaintListener value)
          Adds a PrePaintListener to the listener list.
 void addPrePaintMarkerListener(PaintMarkerListener value)
          Adds a PrePaintMarkerListener to the listener list.
 void addProcessUrlListener(com.softwarefx.chartfx.desktop.ProcessUrlListener value)
          Adds a ProcessUrlListener to the listener list.
static double dateToNumber(Calendar date)
          Converts a Java Date to Chart FX internal Format.
static double dateToNumber(Date date)
          Converts a Java Date to Chart FX internal Format.
 String expandMacros(String mask, int series, int point, boolean inPoint)
          Returns the mask string for a selected point or line in a chart.
 void export(FileFormat format)
          Allows you to export the chart to a data file or stream.
 void export(FileFormat format, OutputStream stream)
          Allows you to export the chart to a data file or stream.
 void exportChart(FileFormat format, OutputStream stream)
          Allows you to export the chart to a data file or stream.
 void exportChart(FileFormat format, String fileName)
          Allows you to export the chart to a data file or stream.
 void exportChart(OutputStream stream)
          Allows you to export the chart to a data file or stream.
 EnumSet<AllowChanges> getAllowChanges()
          Gets the AllowChanges.
 GlobalAttributes getAllSeries()
          Gets the AllSeries.
 AxesStyle getAxesStyle()
          Gets the AxesStyle.
 AxisXCollection getAxesX()
          Returns the collection of the X axes of the chart.
 AxisYCollection getAxesY()
          Returns the collection of the Y axes of the chart.
 AxisX getAxisX()
          Gets the AxisX.
 AxisY getAxisY()
          Gets the AxisY.
 AxisY getAxisY2()
          Gets the AxisY2.
 Color getBackColor()
          Gets the BackColor.
 Rectangle getChartAreaRectangle()
          Gets the rectangle object for the chart area.
 CommandCollection getCommands()
          Gets the list of commands associated with the chart.
 ConditionalAttributesCollection getConditionalAttributes()
          Gets the ConditionalAttributes.
 ConditionalAttributesListener[] getConditionalAttributesCallbackListeners()
          Returns an array of all the ConditionalAttributesCallbackListeners added to this class with addConditionalAttributesCallbackListeners().
 Locale getCulture()
          Gets the Culture.
 DataValues getData()
          Allows you to set the Y values.
 PointLabelListener[] getDataChangedByUserListeners()
          Returns an array of all the DataChangedByUserListeners added to this class with addDataChangedByUserListeners().
 DataGrid getDataGrid()
          Gets the DataGrid.
 IDataSource getDataSource()
          Gets the DataSource.
 DataSourceSettings getDataSourceSettings()
          Used to assign data related attributes to your chart applications.
 Dimension getExportImageSize()
          Gets the ExportImageSize.
 ExtensionCollection getExtensions()
          Collection used to add, clear and assign Chart FX extension objects.
 EnumSet<ChartStyles> getExtraStyle()
          Gets the ExtraStyle.
 EnumSet<FileContents> getFileContents()
          Gets the FileContents.
 Color getForeColor()
          Gets the ForeColor.
 Gallery getGallery()
          Gets the Gallery.
 IGallery getGalleryAttributes()
          Gets the GalleryAttributes.
 AxisLabelListener[] getGetAxisLabelListeners()
          Returns an array of all the GetAxisLabelListeners added to this class with addGetAxisLabelListeners().
 PointLabelListener[] getGetPointLabelListeners()
          Returns an array of all the GetPointLabelListeners added to this class with addGetPointLabelListeners().
 GetTipListener[] getGetTipListeners()
          Returns an array of all the GetTipListeners added to this class with addGetTipListeners().
 com.softwarefx.chartfx.desktop.HighlightingListener[] getHighlightingListeners()
          Returns an array of all the HighlightingListeners added to this class with addHighlightingListeners().
 LegendBox getLegendBox()
          Gets the LegendBox.
 Pane getMainPane()
          Gets the default pane of the chart.
 ToolBar getMenuBar()
          Allows you to access the menu bar of the chart.
 String getMessageText(String key)
          Allows you to obtain default Chart FX stings which are displayed in the chart.
 com.softwarefx.chartfx.desktop.HitTestListener[] getMouseClickListeners()
          Returns an array of all the MouseClickListeners added to this class with addMouseClickListeners().
 com.softwarefx.chartfx.desktop.HitTestListener[] getMouseDoubleClickListeners()
          Returns an array of all the MouseDoubleClickListeners added to this class with addMouseDoubleClickListeners().
 com.softwarefx.chartfx.desktop.HitTestListener[] getMouseDownListeners()
          Returns an array of all the MouseDownListeners added to this class with addMouseDownListeners().
 com.softwarefx.chartfx.desktop.HitTestListener[] getMouseMoveListeners()
          Returns an array of all the MouseMoveListeners added to this class with addMouseMoveListeners().
 com.softwarefx.chartfx.desktop.HitTestListener[] getMouseUpListeners()
          Returns an array of all the MouseUpListeners added to this class with addMouseUpListeners().
 Color getPageColor()
          Gets the PageColor.
 PaintMarkerListener[] getPaintMarkerListeners()
          Returns an array of all the PaintMarkerListeners added to this class with addPaintMarkerListeners().
 String getPalette()
          Gets the Palette.
 PaneCollection getPanes()
          Gets the Panes.
 PersonalizeAttributes getPersonalize()
          Gets the Personalize.
 IBackgroundAdornment getPlotAreaBackground()
          Gets the PlotAreaBackground.
 Color getPlotAreaColor()
          Gets the PlotAreaColor.
 Margins getPlotAreaMargin()
          Gets the PlotAreaMargin.
 PointAttributesCollection getPoints()
          Assigns properties directly to a specific point in the chart.
 CustomPaintListener[] getPostPaintListeners()
          Returns an array of all the PostPaintListeners added to this class with addPostPaintListeners().
 CustomPaintListener[] getPrePaintListeners()
          Returns an array of all the PrePaintListeners added to this class with addPrePaintListeners().
 PaintMarkerListener[] getPrePaintMarkerListeners()
          Returns an array of all the PrePaintMarkerListeners added to this class with addPrePaintMarkerListeners().
 Printer getPrinter()
          Allows you to set properties of the printer object.
 com.softwarefx.chartfx.desktop.ProcessUrlListener[] getProcessUrlListeners()
          Returns an array of all the ProcessUrlListeners added to this class with addProcessUrlListeners().
 SeriesAttributesCollection getSeries()
          Gets the Series.
 EnumSet<FileContents> getTemplateContents()
          Gets the TemplateContents.
 TitleCollection getTitles()
          Gets the Titles.
 ToolBar getToolBar()
          Gets the ToolBar.
 String getToolTipFormat()
          Gets the ToolTipFormat.
 Attributes3D getView3D()
          Gets the View3D.
 void importChart(FileFormat format, InputStream stream)
          Allows you to import a chart from a file or stream.
 void importChart(FileFormat format, String fileName)
          Allows you to import a chart from a file or stream.
 void importChart(InputStream stream)
          Allows you to import a chart from a file or stream.
 boolean isAllowDrag()
          Gets the AllowDrag.
 boolean isAntialiasing()
          Gets the Antialiasing.
 boolean isContextMenus()
          Gets the ContextMenus.
 boolean isCrosshairs()
          Gets the Crosshairs.
 boolean isDirty()
          Gets the Dirty.
 boolean isToolTips()
          Gets the ToolTips.
 boolean isZoom()
          Gets the Zoom.
 Point markerToPixel(int series, int point)
          Returns a point storing the position in pixel of a specified chart marker.
 void paint(Graphics2D g, Rectangle r, EnumSet<PaintStyles> paintFlags)
          Allows you to paint the chart in a given device context.
 void recalculateScale()
          Resets and recalculates all scale values.
 void removeConditionalAttributesCallbackListener(ConditionalAttributesListener value)
          Removes a ConditionalAttributesCallbackListener from the listener list.
 void removeDataChangedByUserListener(PointLabelListener value)
          Removes a DataChangedByUserListener from the listener list.
 void removeGetAxisLabelListener(AxisLabelListener value)
          Removes a GetAxisLabelListener from the listener list.
 void removeGetPointLabelListener(PointLabelListener value)
          Removes a GetPointLabelListener from the listener list.
 void removeGetTipListener(GetTipListener value)
          Removes a GetTipListener from the listener list.
 void removeHighlightingListener(com.softwarefx.chartfx.desktop.HighlightingListener value)
          Removes a HighlightingListener from the listener list.
 void removeMouseClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Removes a MouseClickListener from the listener list.
 void removeMouseDoubleClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Removes a MouseDoubleClickListener from the listener list.
 void removeMouseDownListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Removes a MouseDownListener from the listener list.
 void removeMouseMoveListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Removes a MouseMoveListener from the listener list.
 void removeMouseUpListener(com.softwarefx.chartfx.desktop.HitTestListener value)
          Removes a MouseUpListener from the listener list.
 void removePaintMarkerListener(PaintMarkerListener value)
          Removes a PaintMarkerListener from the listener list.
 void removePostPaintListener(CustomPaintListener value)
          Removes a PostPaintListener from the listener list.
 void removePrePaintListener(CustomPaintListener value)
          Removes a PrePaintListener from the listener list.
 void removePrePaintMarkerListener(PaintMarkerListener value)
          Removes a PrePaintMarkerListener from the listener list.
 void removeProcessUrlListener(com.softwarefx.chartfx.desktop.ProcessUrlListener value)
          Removes a ProcessUrlListener from the listener list.
 void reset()
          Resets the chart to its orgininal state.
 void setAllowChanges(EnumSet<AllowChanges> value)
          Enables or prevents the end user from altering data.
 void setAllowDrag(boolean value)
          Enables or prevents the end user from dragging a marker with the mouse to change its value.
 void setAllSeries(GlobalAttributes value)
          Gets the global attributes which are shared across the getSeries() of the chart.
 void setAntialiasing(boolean value)
          Gives a smooth visual effect to the chart.
 void setAxesStyle(AxesStyle value)
          Used to change the style of the axes.
 void setAxisX(AxisX value)
          Assigns properties specifically to the primary X axis.
 void setAxisY(AxisY value)
          Assigns properties specifically to the primary Y axis of the chart.
 void setAxisY2(AxisY value)
          Assigns properties specifically to the secondary Y axis of the chart.
 void setBackColor(Color value)
          Sets the background color of the chart.
 void setConditionalAttributes(ConditionalAttributesCollection value)
          Returns the collection of ConditionalAttributes objects.
 void setContextMenus(boolean value)
          Allows you to enable or disable context sensitive menus when the user right clicks a particular chart element.
 void setCrosshairs(boolean value)
          Enables or Disables the cross-hairs marker in the chart.
 void setCulture(Locale value)
          Allows you to localize charts for a specific language and region.
 void setDataGrid(DataGrid value)
          Gets the Data Grid of the chart.
 void setDataSource(IDataSource value)
          Sets the source containing the values used to populate the chart.
 void setDirty(boolean value)
          Returns a boolean specifying if the chart has been modified by the user.
 void setExportImageSize(Dimension value)
          Sets the image dimensions for exported chart images.
 void setExtraStyle(EnumSet<ChartStyles> value)
          Allows you to set additional visual attributes in the chart.
 void setFileContents(EnumSet<FileContents> value)
          Sets the attributes to save in chart files (Export method).
 void setForeColor(Color value)
          Sets the default font color of the chart.
 void setGallery(Gallery value)
          Sets the gallery type for the whole chart.
 void setGalleryAttributes(IGallery value)
          Used to create a gallery object to assign additional attributes to the selected setGallery(com.softwarefx.chartfx.desktop.Gallery) of the chart.
 void setHeight(int value)
          Specifies the suggested height of the chart when generating images.
 void setHighlight(com.softwarefx.chartfx.desktop.HighlightAttributes value)
          Allows you to customized how all the series of the chart are highlighted.
 void setLegendBox(LegendBox value)
          Allows you to acces the legend box of the chart.
 void setMessageText(String key, String message)
          Allows you to customize default Chart FX strings which are displayed in the chart.
 void setPageColor(Color value)
          Allows you to specify a form background color needed to fill areas around image border shadowing.
 void setPalette(String value)
          Allows you to set a pre-defined palette.
 void setPanes(PaneCollection value)
          Returns the collection of the defined Paneof the chart.
 void setPersonalize(PersonalizeAttributes value)
          Allows you to set the preferences for saving and loading personalized charts.
 void setPlotAreaBackground(IBackgroundAdornment value)
          Allows you to assign a gradient to the inside area of a chart.
 void setPlotAreaColor(Color value)
          Gets and Sets the color of the PlotAreaBackground.
 void setPlotAreaMargin(Margins value)
          Gets and Sets the top, bottom, left and right gaps of the chart.
 void setSeries(SeriesAttributesCollection value)
          Assigns properties directly to the selected series in the chart.
 void setTemplateContents(EnumSet<FileContents> value)
          Sets the attributes to save in personalization features and template files (Export method).
 void setTitles(TitleCollection value)
          Returns the collection of titles defined in the chart.
 void setToolBar(ToolBar value)
          Allow to acces the tool bar of the chart.
 void setToolTipFormat(String value)
          Allows you to control the information to be displayed in the tooltip when the user positions the mouse over a particular data point in the chart.
 void setToolTips(boolean value)
          Allows you to enable or disable tooltips when the user positions the mouse over a particular element in the chart area only.
 void setView3D(Attributes3D value)
          Allows you to enable or disable 3D view of the chart.
 void setVisible(boolean visible)
          Sets a value specifying to show or hide the chart.
 void setWidth(int value)
          Specifies the suggested width of the chart when generating images.
 void setZoom(boolean value)
          Allows you to select a section of the chart using the mouse cursor and zoom in that area.
 void updateSizeNow()
          Allows you to force a scale calculation before the chart is drawn.
 void zoomToPercentage(int percentage)
          Zooms the chart to center based on configured percentage value.
 void zoomToWindow(int x1, int y1, int x2, int y2)
          Zooms the chart to a rectangular area based on specified x and y coordinates for the rectangle
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HIDDEN

public static final double HIDDEN
See Also:
Constant Field Values
Constructor Detail

Chart

public Chart()
Method Detail

addConditionalAttributesCallbackListener

public void addConditionalAttributesCallbackListener(ConditionalAttributesListener value)

Adds a ConditionalAttributesCallbackListener to the listener list.

Parameters:
value - The ConditionalAttributesCallbackListener to be added.

addDataChangedByUserListener

public void addDataChangedByUserListener(PointLabelListener value)

Adds a DataChangedByUserListener to the listener list.

Parameters:
value - The DataChangedByUserListener to be added.

addGetAxisLabelListener

public void addGetAxisLabelListener(AxisLabelListener value)

Adds a GetAxisLabelListener to the listener list.

Parameters:
value - The GetAxisLabelListener to be added.

addGetPointLabelListener

public void addGetPointLabelListener(PointLabelListener value)

Adds a GetPointLabelListener to the listener list.

Parameters:
value - The GetPointLabelListener to be added.

addGetTipListener

public void addGetTipListener(GetTipListener value)

Adds a GetTipListener to the listener list.

Parameters:
value - The GetTipListener to be added.

addHighlightingListener

public void addHighlightingListener(com.softwarefx.chartfx.desktop.HighlightingListener value)

Adds a HighlightingListener to the listener list.

Parameters:
value - The HighlightingListener to be added.

addMouseClickListener

public void addMouseClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)

Adds a MouseClickListener to the listener list.

Parameters:
value - The MouseClickListener to be added.

addMouseDoubleClickListener

public void addMouseDoubleClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)

Adds a MouseDoubleClickListener to the listener list.

Parameters:
value - The MouseDoubleClickListener to be added.

addMouseDownListener

public void addMouseDownListener(com.softwarefx.chartfx.desktop.HitTestListener value)

Adds a MouseDownListener to the listener list.

Parameters:
value - The MouseDownListener to be added.

addMouseMoveListener

public void addMouseMoveListener(com.softwarefx.chartfx.desktop.HitTestListener value)

Adds a MouseMoveListener to the listener list.

Parameters:
value - The MouseMoveListener to be added.

addMouseUpListener

public void addMouseUpListener(com.softwarefx.chartfx.desktop.HitTestListener value)

Adds a MouseUpListener to the listener list.

Parameters:
value - The MouseUpListener to be added.

addPaintMarkerListener

public void addPaintMarkerListener(PaintMarkerListener value)

Adds a PaintMarkerListener to the listener list.

Parameters:
value - The PaintMarkerListener to be added.

addPostPaintListener

public void addPostPaintListener(CustomPaintListener value)

Adds a PostPaintListener to the listener list.

Parameters:
value - The PostPaintListener to be added.

addPrePaintListener

public void addPrePaintListener(CustomPaintListener value)

Adds a PrePaintListener to the listener list.

Parameters:
value - The PrePaintListener to be added.

addPrePaintMarkerListener

public void addPrePaintMarkerListener(PaintMarkerListener value)

Adds a PrePaintMarkerListener to the listener list.

Parameters:
value - The PrePaintMarkerListener to be added.

addProcessUrlListener

public void addProcessUrlListener(com.softwarefx.chartfx.desktop.ProcessUrlListener value)

Adds a ProcessUrlListener to the listener list.

Parameters:
value - The ProcessUrlListener to be added.

dateToNumber

public static double dateToNumber(Calendar date)

Converts a Java Date to Chart FX internal Format.

Remarks:
  • When loading XValues which are dates to a Chart, they must be converted to an internal format for Chart FX to properly handle labeling and scaling.

  • Parameters:
    date - Date to convert
    See Also:
    Chart

    dateToNumber

    public static double dateToNumber(Date date)

    Converts a Java Date to Chart FX internal Format.

    Remarks:
  • When loading XValues which are dates to a Chart, they must be converted to an internal format for Chart FX to properly handle labeling and scaling.

  • Parameters:
    date - Date to convert
    See Also:
    Chart

    expandMacros

    public String expandMacros(String mask,
                               int series,
                               int point,
                               boolean inPoint)

    Returns the mask string for a selected point or line in a chart.

    Remarks:
  • This method is useful when you would like to return the configured mask string for a selected point label.

  • You may set the mask string for a selected chart element using the PointLabelAttributes.setFormat(java.lang.String) property of the PointLabelAttributes Class , or the setToolTipFormat(java.lang.String) property.

  • Parameters:
    mask - Speicifies the mask string. (May be null value.)
    series - Specifies the Series.
    point - Specifies the Point.
    inPoint - Specifies to return the mask of the Point or the line between the Points.
    See Also:
    PointLabelAttributes.setFormat(java.lang.String), setToolTipFormat(java.lang.String)

    export

    public void export(FileFormat format)

    Allows you to export the chart to a data file or stream.

    Remarks:
  • When saving to a Binary or XML file, you may select which chart settings to save by using the FileMask property. The BinaryTemplate type is preset to save using the TemplateMask enumeration property.

  • Parameters:
    format - The available formats the export can handle.
    See Also:
    setFileContents(java.util.EnumSet), setTemplateContents(java.util.EnumSet), importChart(java.io.InputStream)

    export

    public void export(FileFormat format,
                       OutputStream stream)

    Allows you to export the chart to a data file or stream.

    Remarks:
  • When saving to a Binary or XML file, you may select which chart settings to save by using the FileMask property. The BinaryTemplate type is preset to save using the TemplateMask enumeration property.

  • Parameters:
    format - The available formats the export can handle.
    stream - A stream where to store the exported chart.
    See Also:
    setFileContents(java.util.EnumSet), setTemplateContents(java.util.EnumSet), importChart(java.io.InputStream)

    exportChart

    public void exportChart(OutputStream stream)

    Allows you to export the chart to a data file or stream.

    Remarks:
  • When saving to a Binary or XML file, you may select which chart settings to save by using the FileMask property. The BinaryTemplate type is preset to save using the TemplateMask enumeration property.

  • Parameters:
    stream - A stream where to store the exported chart.
    See Also:
    setFileContents(java.util.EnumSet), setTemplateContents(java.util.EnumSet), importChart(java.io.InputStream)

    exportChart

    public void exportChart(FileFormat format,
                            OutputStream stream)

    Allows you to export the chart to a data file or stream.

    Remarks:
  • When saving to a Binary or XML file, you may select which chart settings to save by using the FileMask property. The BinaryTemplate type is preset to save using the TemplateMask enumeration property.

  • Parameters:
    format - The available formats the export can handle.
    stream - A stream where to store the exported chart.
    See Also:
    setFileContents(java.util.EnumSet), setTemplateContents(java.util.EnumSet), importChart(java.io.InputStream)

    exportChart

    public void exportChart(FileFormat format,
                            String fileName)

    Allows you to export the chart to a data file or stream.

    Remarks:
  • When saving to a Binary or XML file, you may select which chart settings to save by using the FileMask property. The BinaryTemplate type is preset to save using the TemplateMask enumeration property.

  • Parameters:
    format - The available formats the export can handle.
    fileName - The location of the file where to export the chart.
    See Also:
    setFileContents(java.util.EnumSet), setTemplateContents(java.util.EnumSet), importChart(java.io.InputStream)

    getAllSeries

    public GlobalAttributes getAllSeries()

    Gets the AllSeries. For more detail see setAllSeries(com.softwarefx.chartfx.desktop.GlobalAttributes).


    getAllowChanges

    public EnumSet<AllowChanges> getAllowChanges()

    Gets the AllowChanges. For more detail see setAllowChanges(java.util.EnumSet).


    getAxesStyle

    public AxesStyle getAxesStyle()

    Gets the AxesStyle. For more detail see setAxesStyle(com.softwarefx.chartfx.desktop.AxesStyle).


    getAxesX

    public AxisXCollection getAxesX()

    Returns the collection of the X axes of the chart.

    Remarks:
  • The first element of the collection is the getAxisX() of the chart.

  • See Also:
    getAxesY(), getAxisX(), AxisX, Axis

    getAxesY

    public AxisYCollection getAxesY()

    Returns the collection of the Y axes of the chart.

    Remarks:
  • The first element of the collection is the getAxisY() of the chart. Similarly, the second element of the collection is the getAxisY2() of the chart.

  • See Also:
    getAxesX(), getAxisY(), getAxisY2(), Axis, AxisY

    getAxisX

    public AxisX getAxisX()

    Gets the AxisX. For more detail see setAxisX(com.softwarefx.chartfx.desktop.AxisX).


    getAxisY

    public AxisY getAxisY()

    Gets the AxisY. For more detail see setAxisY(com.softwarefx.chartfx.desktop.AxisY).


    getAxisY2

    public AxisY getAxisY2()

    Gets the AxisY2. For more detail see setAxisY2(com.softwarefx.chartfx.desktop.AxisY).


    getBackColor

    public Color getBackColor()

    Gets the BackColor. For more detail see setBackColor(java.awt.Color).


    getChartAreaRectangle

    public Rectangle getChartAreaRectangle()

    Gets the rectangle object for the chart area.

    Remarks:
  • This member returns a Rectangle object. Please see your development environment help refernece for additional information regarding supported members.


  • getCommands

    public CommandCollection getCommands()

    Gets the list of commands associated with the chart.

    Remarks:
  • This property is accessed when you want to customize the getToolBar()/getMenuBar() or change any option associated with the default ToolBar/MenuBar. For more information on how to customize the ToolBar/MenuBar, please refer to the Programmer's Guide or Resource Center.

  • When customizing the Chart's ToolBar/MenuBar, you may reference the pre-defined commands. To do so, you will access the CommandID enumeration.

  • See Also:
    getMenuBar(), getToolBar(), Command, ToolBar

    getConditionalAttributes

    public ConditionalAttributesCollection getConditionalAttributes()

    Gets the ConditionalAttributes. For more detail see setConditionalAttributes(com.softwarefx.chartfx.desktop.ConditionalAttributesCollection).


    getConditionalAttributesCallbackListeners

    public ConditionalAttributesListener[] getConditionalAttributesCallbackListeners()

    Returns an array of all the ConditionalAttributesCallbackListeners added to this class with addConditionalAttributesCallbackListeners().


    getCulture

    public Locale getCulture()

    Gets the Culture. For more detail see setCulture(java.util.Locale).


    getData

    public DataValues getData()

    Allows you to set the Y values. Alternativelly, the Y values can be access through the DataValues.getY() property of the DataValues Class .

    Remarks:
  • Once the chart has been populated using Value property, the getDataGrid() object allows users to view point values at runtime.

  • Please note that instead of the Y value associated with the point, you can assign a hidden constant will cause the point to be hidden in the chart. Although a hidden point is physically in the data array, when you use this constant the marker will not appear in the chart, and if you have charts like a line or area chart, the line will break at that particular point.

  • See Also:
    DataValues.getX(), DataValues.getY(), DataValues.getYFrom(), getData(), recalculateScale(), DataValues

    getDataChangedByUserListeners

    public PointLabelListener[] getDataChangedByUserListeners()

    Returns an array of all the DataChangedByUserListeners added to this class with addDataChangedByUserListeners().


    getDataGrid

    public DataGrid getDataGrid()

    Gets the DataGrid. For more detail see setDataGrid(com.softwarefx.chartfx.desktop.DataGrid).


    getDataSource

    public IDataSource getDataSource()

    Gets the DataSource. For more detail see setDataSource(com.softwarefx.chartfx.desktop.dataproviders.IDataSource).


    getDataSourceSettings

    public DataSourceSettings getDataSourceSettings()

    Used to assign data related attributes to your chart applications.

    Remarks:
  • You can use the DataSourceSettings.setDataSource(com.softwarefx.chartfx.desktop.dataproviders.IDataSource) property to define where the chart datasource when passing data from database, text files or arrays.

  • See Also:
    DataSourceSettings.setDataSource(com.softwarefx.chartfx.desktop.dataproviders.IDataSource), DataSourceSettings.setDataSource(com.softwarefx.chartfx.desktop.dataproviders.IDataSource)

    getExportImageSize

    public Dimension getExportImageSize()

    Gets the ExportImageSize. For more detail see setExportImageSize(java.awt.Dimension).


    getExtensions

    public ExtensionCollection getExtensions()

    Collection used to add, clear and assign Chart FX extension objects.

    Remarks:
  • Chart FX has been designed with extensibility in mind. Using this property, additional functionality can be added to the component such as the Annotation, Maps or Statistical Extensions. For more information about the available Chart FX Extensions, please visit our website at:

    http://www.softwarefx.com/SFXJavaProducts/CFXforJava/


  • getExtraStyle

    public EnumSet<ChartStyles> getExtraStyle()

    Gets the ExtraStyle. For more detail see setExtraStyle(java.util.EnumSet).


    getFileContents

    public EnumSet<FileContents> getFileContents()

    Gets the FileContents. For more detail see setFileContents(java.util.EnumSet).


    getForeColor

    public Color getForeColor()

    Gets the ForeColor. For more detail see setForeColor(java.awt.Color).


    getGallery

    public Gallery getGallery()

    Gets the Gallery. For more detail see setGallery(com.softwarefx.chartfx.desktop.Gallery).


    getGalleryAttributes

    public IGallery getGalleryAttributes()

    Gets the GalleryAttributes. For more detail see setGalleryAttributes(com.softwarefx.chartfx.desktop.IGallery).


    getGetAxisLabelListeners

    public AxisLabelListener[] getGetAxisLabelListeners()

    Returns an array of all the GetAxisLabelListeners added to this class with addGetAxisLabelListeners().


    getGetPointLabelListeners

    public PointLabelListener[] getGetPointLabelListeners()

    Returns an array of all the GetPointLabelListeners added to this class with addGetPointLabelListeners().


    getGetTipListeners

    public GetTipListener[] getGetTipListeners()

    Returns an array of all the GetTipListeners added to this class with addGetTipListeners().


    getHighlightingListeners

    public com.softwarefx.chartfx.desktop.HighlightingListener[] getHighlightingListeners()

    Returns an array of all the HighlightingListeners added to this class with addHighlightingListeners().


    getLegendBox

    public LegendBox getLegendBox()

    Gets the LegendBox. For more detail see setLegendBox(com.softwarefx.chartfx.desktop.LegendBox).


    getMainPane

    public Pane getMainPane()

    Gets the default pane of the chart.

    Remarks:
  • Below, the back color of the main pane is set to blue:

  • The default pane can also be accessed through the getAllSeries() property.

  • See Also:
    GlobalAttributes.setPane(com.softwarefx.chartfx.desktop.Pane), getAllSeries(), SeriesAttributes.setPane(com.softwarefx.chartfx.desktop.Pane), setPlotAreaColor(java.awt.Color), setPlotAreaBackground(com.softwarefx.chartfx.desktop.adornments.IBackgroundAdornment), GlobalAttributes, SeriesAttributes

    getMenuBar

    public ToolBar getMenuBar()

    Allows you to access the menu bar of the chart. Alternativelly, you can access the tool bar of the chart using getToolBar().

    Remarks:
  • You can configure the commands available through the menu bar using the getCommands() property.

  • Although the chart is displayed in a bounding rectangle, Chart FX for Java is capable of displaying a menu bar as part of the chart.

  • Below, the menu bar of the chart is made visible:

  • See Also:
    getLegendBox(), getDataGrid(), setContextMenus(boolean), getCommands(), LegendBox, DataGrid, DockableBar, Command

    getMessageText

    public String getMessageText(String key)

    Allows you to obtain default Chart FX stings which are displayed in the chart.

    Remarks:
  • The key parameter is case sensitive, therefore you must use the exact pre-defined key value string.

  • You can use the Culture property to fully localize your charts. Elements that can be modified include the names of the culture, the writing system, and the calendar used, as well as formatting dates and strings.

  • The ValueFormat.setCulture(java.util.Locale) property of the ValueFormat Class allow you to assign culture specific formatting to labels and numbers for a selected axis.

  • Pre-defined message identifiers with the defualt values for each key (key=value):

    NoData=No Data Available
    LicDownloading=Downloading License ...
    DataDownloading=Downloading Chart ...
    DataFailed=Failed to download Chart\n{0}
    Mask.Percentage=%s\n%l\n%v out of %t\n(%p%%)
    Mask.OHLC=%l\nOpen: %v2\nHigh: %v4 - Low: %v1\nClose: %v3
    Mask.HLC=%l\nHigh: %v3 - Low: %v1\nClose %v2
    Mask.Ini=%s\n%l\nFrom %i to\n%v
    Mask.XY=%s\n%l\nX: %x, Y: %v
    Mask.Between=%s\n%l - %l\n%v - %v
    Mask.Default=%s\n%l\n%v
    LegMask.Series=Series #{0}
    LegMask.Values=Value #{0}
    CFX61B0=A temporary file on {0} could not be created
    XAxis=X Axis
    YAxis=Y Axis
    General=General
    Series=Series
    Chart=Chart Area
    Draw=Drawing Area
    AllSeries=All Series
    Auto=Auto
    None=None
    Raised=Raised
    Light=Light
    Dark=Dark
    Opposite=Opposite
    Shadow=Shadow
    Number=Number
    Currency=Currency
    Scientific=Scientific
    Percentage=Percentage
    Date=Short Date
    LongDate=Long Date
    Time=Time
    DateTime=Date-Time
    Label0=Horizontal
    Label1=Vertical
    Label2=45 Degrees
    Inside=Inside
    Outside=Outside
    Cross=Across
    ExportFilter=ChartFX File (*.cfx)|*.cfx|Text File (data only)|*.txt|XML File (properties only)|*.xml|Bitmap Image (*.bmp)|*.bmp|Metafile Picture (*.emf)|*.emf
    ImportFilter=ChartFX Files (*.cfx)|*.cfx|Text Files (data only)|*.txt|XML Files(properties only)|*.xml
    NoPermission=The application does not have enough permissions to execute this operation.

  • Parameters:
    key - Pre-defined message identifier.

    getMouseClickListeners

    public com.softwarefx.chartfx.desktop.HitTestListener[] getMouseClickListeners()

    Returns an array of all the MouseClickListeners added to this class with addMouseClickListeners().


    getMouseDoubleClickListeners

    public com.softwarefx.chartfx.desktop.HitTestListener[] getMouseDoubleClickListeners()

    Returns an array of all the MouseDoubleClickListeners added to this class with addMouseDoubleClickListeners().


    getMouseDownListeners

    public com.softwarefx.chartfx.desktop.HitTestListener[] getMouseDownListeners()

    Returns an array of all the MouseDownListeners added to this class with addMouseDownListeners().


    getMouseMoveListeners

    public com.softwarefx.chartfx.desktop.HitTestListener[] getMouseMoveListeners()

    Returns an array of all the MouseMoveListeners added to this class with addMouseMoveListeners().


    getMouseUpListeners

    public com.softwarefx.chartfx.desktop.HitTestListener[] getMouseUpListeners()

    Returns an array of all the MouseUpListeners added to this class with addMouseUpListeners().


    getPageColor

    public Color getPageColor()

    Gets the PageColor. For more detail see setPageColor(java.awt.Color).


    getPaintMarkerListeners

    public PaintMarkerListener[] getPaintMarkerListeners()

    Returns an array of all the PaintMarkerListeners added to this class with addPaintMarkerListeners().


    getPalette

    public String getPalette()

    Gets the Palette. For more detail see setPalette(java.lang.String).


    getPanes

    public PaneCollection getPanes()

    Gets the Panes. For more detail see setPanes(com.softwarefx.chartfx.desktop.PaneCollection).


    getPersonalize

    public PersonalizeAttributes getPersonalize()

    Gets the Personalize. For more detail see setPersonalize(com.softwarefx.chartfx.desktop.PersonalizeAttributes).


    getPlotAreaBackground

    public IBackgroundAdornment getPlotAreaBackground()

    Gets the PlotAreaBackground. For more detail see setPlotAreaBackground(com.softwarefx.chartfx.desktop.adornments.IBackgroundAdornment).


    getPlotAreaColor

    public Color getPlotAreaColor()

    Gets the PlotAreaColor. For more detail see setPlotAreaColor(java.awt.Color).


    getPlotAreaMargin

    public Margins getPlotAreaMargin()

    Gets the PlotAreaMargin. For more detail see setPlotAreaMargin(com.softwarefx.chartfx.desktop.Margins).


    getPoints

    public PointAttributesCollection getPoints()

    Assigns properties directly to a specific point in the chart.

    Remarks:
  • Allows you to assign supported properties directly to the specified data point. For supported properties, please see the SeriesAttributesPointAttributes Class .

  • Below, the third point of the second series is changed to black:

  • If you want to change the markers and the labels for all the points of the same series, please refer to the getSeries() property.

  • See Also:
    PointAttributes.setAlternateColor(java.awt.Color), PointAttributes.getBorder(), PointAttributes.setColor(java.awt.Color), PointAttributes.setMarkerShape(com.softwarefx.chartfx.desktop.MarkerShape), PointAttributes.setPicture(java.awt.Image), PointAttributes.getPointLabels(), PointAttributes.setSeparateSlice(short), PointAttributes, PointLabelAttributes

    getPostPaintListeners

    public CustomPaintListener[] getPostPaintListeners()

    Returns an array of all the PostPaintListeners added to this class with addPostPaintListeners().


    getPrePaintListeners

    public CustomPaintListener[] getPrePaintListeners()

    Returns an array of all the PrePaintListeners added to this class with addPrePaintListeners().


    getPrePaintMarkerListeners

    public PaintMarkerListener[] getPrePaintMarkerListeners()

    Returns an array of all the PrePaintMarkerListeners added to this class with addPrePaintMarkerListeners().


    getPrinter

    public Printer getPrinter()

    Allows you to set properties of the printer object.

    Remarks:
  • The Printer value of the ChartStyles enumeration (which can be access by the setExtraStyle(java.util.EnumSet) property) ables/disables the UI which allow the end-user to print a chart.

  • The Printer property provides the mechanism for assigning important properties to print the chart. You can modify the margins, paper orientation, color or pattern printing, among others. Please refer to the Printer Class for supported properties.

  • The Printer Class supports a Print, PrintDialog, PrintPreview, and PageSetup methods which are only supported in desktop application development. Please see the Printer Class for all supported members.

  • See Also:
    Printer.setCompress(boolean), Printer.setForceColors(boolean), Printer.setMargins(java.awt.Insets), Printer.setOrientation(com.softwarefx.chartfx.desktop.PageOrientation), Printer.setUsePrinterResolution(boolean)

    getProcessUrlListeners

    public com.softwarefx.chartfx.desktop.ProcessUrlListener[] getProcessUrlListeners()

    Returns an array of all the ProcessUrlListeners added to this class with addProcessUrlListeners().


    getSeries

    public SeriesAttributesCollection getSeries()

    Gets the Series. For more detail see setSeries(com.softwarefx.chartfx.desktop.SeriesAttributesCollection).


    getTemplateContents

    public EnumSet<FileContents> getTemplateContents()

    Gets the TemplateContents. For more detail see setTemplateContents(java.util.EnumSet).


    getTitles

    public TitleCollection getTitles()

    Gets the Titles. For more detail see setTitles(com.softwarefx.chartfx.desktop.TitleCollection).


    getToolBar

    public ToolBar getToolBar()

    Gets the ToolBar. For more detail see setToolBar(com.softwarefx.chartfx.desktop.ToolBar).


    getToolTipFormat

    public String getToolTipFormat()

    Gets the ToolTipFormat. For more detail see setToolTipFormat(java.lang.String).


    getView3D

    public Attributes3D getView3D()

    Gets the View3D. For more detail see setView3D(com.softwarefx.chartfx.desktop.Attributes3D).


    importChart

    public void importChart(InputStream stream)

    Allows you to import a chart from a file or stream.

    Remarks:
  • If an error is encountered, an exception will be thrown. Your Java API may allow you to catch this exception and add your own custom error messages. For more information regarding your own custom error messages, please refer to the Java API .

  • Parameters:
    stream - A stream where to import the exported chart.
    See Also:
    setFileContents(java.util.EnumSet), exportChart(java.io.OutputStream)

    importChart

    public void importChart(FileFormat format,
                            InputStream stream)

    Allows you to import a chart from a file or stream.

    Remarks:
  • If an error is encountered, an exception will be thrown. Your Java API may allow you to catch this exception and add your own custom error messages. For more information regarding your own custom error messages, please refer to the Java API .

  • Parameters:
    format - The available formats the export can handle.
    stream - A stream where to import the exported chart.
    See Also:
    setFileContents(java.util.EnumSet), exportChart(java.io.OutputStream)

    importChart

    public void importChart(FileFormat format,
                            String fileName)

    Allows you to import a chart from a file or stream.

    Remarks:
  • If an error is encountered, an exception will be thrown. Your Java API may allow you to catch this exception and add your own custom error messages. For more information regarding your own custom error messages, please refer to the Java API .

  • Parameters:
    format - The available formats the export can handle.
    fileName - The location of the file where to import the chart.
    See Also:
    setFileContents(java.util.EnumSet), exportChart(java.io.OutputStream)

    isAllowDrag

    public boolean isAllowDrag()

    Gets the AllowDrag. For more detail see setAllowDrag(boolean).


    isAntialiasing

    public boolean isAntialiasing()

    Gets the Antialiasing. For more detail see setAntialiasing(boolean).


    isContextMenus

    public boolean isContextMenus()

    Gets the ContextMenus. For more detail see setContextMenus(boolean).


    isCrosshairs

    public boolean isCrosshairs()

    Gets the Crosshairs. For more detail see setCrosshairs(boolean).


    isDirty

    public boolean isDirty()

    Gets the Dirty. For more detail see setDirty(boolean).


    isToolTips

    public boolean isToolTips()

    Gets the ToolTips. For more detail see setToolTips(boolean).


    isZoom

    public boolean isZoom()

    Gets the Zoom. For more detail see setZoom(boolean).


    markerToPixel

    public Point markerToPixel(int series,
                               int point)

    Returns a point storing the position in pixel of a specified chart marker.

    Remarks:
  • Note that the x,y are in chart coordinates, where 0,0 is the top-left corner of the chart area.

  • When this method is applied to a bar chart, the point object is from the top center of the select bar.

  • This method may be used in conjunction with annotation objects. You may position annotation objects with chart markers very easily by extracting the X and Y values from the returned point object.

  • Parameters:
    series - An integer specifying the series.
    point - An integer specifying the point.

    paint

    public void paint(Graphics2D g,
                      Rectangle r,
                      EnumSet<PaintStyles> paintFlags)

    Allows you to paint the chart in a given device context.

    Remarks:
  • This function is very useful when you want to print charts and others objects in the same page or more than one chart in a page.

  • If you want to print the chart in full page mode, please refer to the Printer Class .

  • Parameters:
    g - Indicates the Graphics object used to paint.
    r - Rectangle to be painted.
    paintFlags - The style used to paint the area.
    See Also:
    Printer

    recalculateScale

    public void recalculateScale()

    Resets and recalculates all scale values.

    Remarks:
  • This method should be invoked to force Chart FX to calculate the Min, Max and Step for the axes.

  • Please keep in mind that this method reads the entire data array, so abusing this method could affect the performance of your application, as Chart FX will read the entire data array every time this method is called.

  • This method will not affect the Axis.setStep(double) and Axis.setMinorStep(double) if they have been previously set. To make sure they respond to this method make sure the Step and MinorStep properties are set to zero (0).

  • A typical case of when to use this method is when you disable the Axis.setAutoScale(boolean) property to calculate your Axis.setMin(double) and Axis.setMax(double) and you set new data to the chart that causes the scale values to be recalculated to show the appropriate data.

  • When using a GlobalAttributes.setStacked(com.softwarefx.chartfx.desktop.Stacked) style chart, recalculating the scale will sometimes make the chart more readable.

  • See Also:
    Axis.setMin(double), Axis.setMax(double), Axis.setStep(double), Axis.setMinorStep(double), Axis.setAutoScale(boolean), GlobalAttributes.setStacked(com.softwarefx.chartfx.desktop.Stacked), Axis

    removeConditionalAttributesCallbackListener

    public void removeConditionalAttributesCallbackListener(ConditionalAttributesListener value)

    Removes a ConditionalAttributesCallbackListener from the listener list.

    Parameters:
    value - The ConditionalAttributesCallbackListener to be removed.

    removeDataChangedByUserListener

    public void removeDataChangedByUserListener(PointLabelListener value)

    Removes a DataChangedByUserListener from the listener list.

    Parameters:
    value - The DataChangedByUserListener to be removed.

    removeGetAxisLabelListener

    public void removeGetAxisLabelListener(AxisLabelListener value)

    Removes a GetAxisLabelListener from the listener list.

    Parameters:
    value - The GetAxisLabelListener to be removed.

    removeGetPointLabelListener

    public void removeGetPointLabelListener(PointLabelListener value)

    Removes a GetPointLabelListener from the listener list.

    Parameters:
    value - The GetPointLabelListener to be removed.

    removeGetTipListener

    public void removeGetTipListener(GetTipListener value)

    Removes a GetTipListener from the listener list.

    Parameters:
    value - The GetTipListener to be removed.

    removeHighlightingListener

    public void removeHighlightingListener(com.softwarefx.chartfx.desktop.HighlightingListener value)

    Removes a HighlightingListener from the listener list.

    Parameters:
    value - The HighlightingListener to be removed.

    removeMouseClickListener

    public void removeMouseClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)

    Removes a MouseClickListener from the listener list.

    Parameters:
    value - The MouseClickListener to be removed.

    removeMouseDoubleClickListener

    public void removeMouseDoubleClickListener(com.softwarefx.chartfx.desktop.HitTestListener value)

    Removes a MouseDoubleClickListener from the listener list.

    Parameters:
    value - The MouseDoubleClickListener to be removed.

    removeMouseDownListener

    public void removeMouseDownListener(com.softwarefx.chartfx.desktop.HitTestListener value)

    Removes a MouseDownListener from the listener list.

    Parameters:
    value - The MouseDownListener to be removed.

    removeMouseMoveListener

    public void removeMouseMoveListener(com.softwarefx.chartfx.desktop.HitTestListener value)

    Removes a MouseMoveListener from the listener list.

    Parameters:
    value - The MouseMoveListener to be removed.

    removeMouseUpListener

    public void removeMouseUpListener(com.softwarefx.chartfx.desktop.HitTestListener value)

    Removes a MouseUpListener from the listener list.

    Parameters:
    value - The MouseUpListener to be removed.

    removePaintMarkerListener

    public void removePaintMarkerListener(PaintMarkerListener value)

    Removes a PaintMarkerListener from the listener list.

    Parameters:
    value - The PaintMarkerListener to be removed.

    removePostPaintListener

    public void removePostPaintListener(CustomPaintListener value)

    Removes a PostPaintListener from the listener list.

    Parameters:
    value - The PostPaintListener to be removed.

    removePrePaintListener

    public void removePrePaintListener(CustomPaintListener value)

    Removes a PrePaintListener from the listener list.

    Parameters:
    value - The PrePaintListener to be removed.

    removePrePaintMarkerListener

    public void removePrePaintMarkerListener(PaintMarkerListener value)

    Removes a PrePaintMarkerListener from the listener list.

    Parameters:
    value - The PrePaintMarkerListener to be removed.

    removeProcessUrlListener

    public void removeProcessUrlListener(com.softwarefx.chartfx.desktop.ProcessUrlListener value)

    Removes a ProcessUrlListener from the listener list.

    Parameters:
    value - The ProcessUrlListener to be removed.

    reset

    public void reset()

    Resets the chart to its orgininal state.

    Remarks:
  • Below is the chart before Reset is called:

    When Reset is called, all the custom visual attributes as well as the getData() are cleared.

  • See Also:
    DataValues

    setAllSeries

    public void setAllSeries(GlobalAttributes value)

    Gets the global attributes which are shared across the getSeries() of the chart.

    Remarks:
  • For performance reason, the series and the points related to the series share the same visual attributes. Those visual attributes are stored in the GlobalAttributes Class . Therefore, to set a attribute common to all the points of the chart, AllSeries should be used. If the user wants to change a visual attribute for a particular series, getSeries() should be used. Similarly, if the user wants to change a visual attribute for a particular point, getPoints() should be used.

  • Below, the galleries of all the series have been changed to Pies:

  • See Also:
    getSeries(), getPoints(), SeriesAttributes, PointAttributes

    setAllowChanges

    public void setAllowChanges(EnumSet<AllowChanges> value)

    Enables or prevents the end user from altering data.

    Remarks:
  • Use this property if you don't want the end user to change the existing data by using the DataGrid. Although the DataGrid may be visible, it will not allow the user to double click a cell in the grid to change its value.

  • By default, an end user is able to change data using the DataGrid. However, this only changes values in the chart not a bound database.

  • See Also:
    DataGrid.setReadOnly(boolean), setAllowDrag(boolean), DataGrid

    setAllowDrag

    public void setAllowDrag(boolean value)

    Enables or prevents the end user from dragging a marker with the mouse to change its value.

    Remarks:
  • Alternativelly, AllowDrag from the setAllowChanges(java.util.EnumSet) property can be used.

  • When performing a marker drag, the end user will be able to change the data point value and a Tooltip will appear.

  • See Also:
    setAllowChanges(java.util.EnumSet)

    setAntialiasing

    public void setAntialiasing(boolean value)

    Gives a smooth visual effect to the chart.

    Remarks:
  • The ExtraStyle parameter also supports a DoubleBuffer value that can prevent flickering in real-time charts.

  • The setExtraStyle(java.util.EnumSet) property also supports a DoubleBuffer enumeration that can prevent flickering in real-time charts.

  • The following images illustrate the antiliasing feature of the chart. The first image was made when the antiliasing is set to true.

    The second image has antiliasing set to false.

  • See Also:
    setExtraStyle(java.util.EnumSet)

    setAxesStyle

    public void setAxesStyle(AxesStyle value)

    Used to change the style of the axes.

    Remarks:
  • Toggling the chart from 2D and 3D Attributes3D.setEnabled(boolean) will produce different effects.

  • Below, the style of the Axis is set to math:

  • See Also:
    getAxesX(), getAxesY(), getView3D(), Axis.setStep(double), Axis.setMinorStep(double), Attributes3D.setEnabled(boolean), Attributes3D

    setAxisX

    public void setAxisX(AxisX value)

    Assigns properties specifically to the primary X axis.

    Remarks:
  • Below, the primary X axis of the chart is hidden.

  • See Also:
    getAxesY(), getAxisY(), getAxisY2()

    setAxisY

    public void setAxisY(AxisY value)

    Assigns properties specifically to the primary Y axis of the chart.

    Remarks:
  • Below, the labels of the primary Y axis are set to blue and are formatted to use 4 decimals.

  • See Also:
    getAxisY2(), getAxesY()

    setAxisY2

    public void setAxisY2(AxisY value)

    Assigns properties specifically to the secondary Y axis of the chart.

    Remarks:
  • By default, the secondary Y axis is not visible. This axis needs to be associated to a series in order to be rendered by the chart.

  • Below, the second series of the chart is associated to the secondary Y axis.

  • See Also:
    getAxesY(), getAxisY()

    setBackColor

    public void setBackColor(Color value)

    Sets the background color of the chart.

    Remarks:
  • You can customize the color of the inside charting area by using the setPlotAreaColor(java.awt.Color) property.

  • A gradient may be assigned to the background using the JComponent.setBackground(java.awt.Color) property.

  • For more information regarding the Color type, please refer to the Java API Documentation.

  • Named color are supported (e.g. java.awt.Color.red) as well as Hex notation (e.g. new java.awt.Color(0xEEFFEE)).

  • Here the BackColor of the Chart has been set to Yellow:

  • See Also:
    setPlotAreaColor(java.awt.Color), JComponent.setBackground(java.awt.Color), setPlotAreaBackground(com.softwarefx.chartfx.desktop.adornments.IBackgroundAdornment), SolidBackground, ImageBackground, GradientBackground

    setConditionalAttributes

    public void setConditionalAttributes(ConditionalAttributesCollection value)

    Returns the collection of ConditionalAttributes objects.

    Remarks:
  • This property exposes the members of the Condition and ConditionalAttributes classes. Please see the Condition and ConditionalAttributesclasses for additional information regarding those supported members.

  • See Also:
    Condition, ConditionalAttributes

    setContextMenus

    public void setContextMenus(boolean value)

    Allows you to enable or disable context sensitive menus when the user right clicks a particular chart element.

    Remarks:
  • This property allows the end user to easily alter various chart elements rather than finding the appropriate dialog in the chart tabbed dialog. Therefore, we strongly recommend the use of this setting.

  • This is the context menu activated when right-clicking on a point marker while the ContextMenus property is set to True:


  • setCrosshairs

    public void setCrosshairs(boolean value)

    Enables or Disables the cross-hairs marker in the chart.

    Remarks:
  • If enabled, the end user will view a Cross-Hairs marker and a tooltip showing the point index and the value, when he presses the left button of the mouse. The Cross-Hairs marker will disappear when the user releases the button.

  • See Also:
    setToolTipFormat(java.lang.String)

    setCulture

    public void setCulture(Locale value)

    Allows you to localize charts for a specific language and region.

    Remarks:
  • Culture attributes set with this property will effect the entire chart, if no attributes are set using this property then Chart FX inherits the current Thread culture. For more information regarding the CultureInfo type and the Thread Class , please refer to the Java API Documentation.

  • The ValueFormat Class supports a ValueFormat.setCulture(java.util.Locale) property that allows you to set the culture for axes and values, not the entire chart.

  • If no attributes are set using this property or the Chart class setCulture(java.util.Locale) property, then Chart FX inherits the system culture.

  • When setting this property, you may need the Language Code and/or Country Code constants for the desired culture. For more information, please refer to the Locale documentation.

    Example:

    chart1.setCulture(new java.util.Locale("es", "ES"));

  • See Also:
    ValueFormat.setCulture(java.util.Locale), setMessageText(java.lang.String, java.lang.String), ValueFormat

    setDataGrid

    public void setDataGrid(DataGrid value)

    Gets the Data Grid of the chart. The Data Gird is a spreadsheet that shows the data points in tabular format. When shown, it allows the user to see both the chart and the grid at the same time.

    Remarks:
  • Below, the DataGrid is visible:

  • See Also:
    DockableBar.setVisible(boolean)

    setDataSource

    public void setDataSource(IDataSource value)

    Sets the source containing the values used to populate the chart.

    Remarks:
  • This property is a shortcut to the DataSourceSettings.setDataSource(com.softwarefx.chartfx.desktop.dataproviders.IDataSource) property of the DataSourceSettings Class .

  • Once the DataSource has been configured using this property, the chart is automatically bound to the data.

  • Important Note: When developing web apps and using any design time control to pass data to Chart FX, you must bind the data to the chart by calling the DataBind method after setting the DataSource (Web Apps Only):

    chart1.DataSource = DataSet1.Table1;
    chart1.DataBind();

  • See Also:
    DataSourceSettings.setStyle(java.util.EnumSet), DataSourceSettings.getFields(), DataSourceSettings.setDataSource(com.softwarefx.chartfx.desktop.dataproviders.IDataSource), getDataSourceSettings(), TextProvider, DataSourceSettings

    setDirty

    public void setDirty(boolean value)

    Returns a boolean specifying if the chart has been modified by the user.

    Remarks:
  • If a user makes any modification to the chart, the return value of this property will be True, else False.

  • See Also:
    setAllowChanges(java.util.EnumSet)

    setExportImageSize

    public void setExportImageSize(Dimension value)

    Sets the image dimensions for exported chart images.

    Remarks:
  • This property accepts a Size type object assignment. Please see your development environment documentation for more information regarding this object.

  • This attribute may also controlled via the design-time controls in your Development IDE.

  • See Also:
    exportChart(java.io.OutputStream)

    setExtraStyle

    public void setExtraStyle(EnumSet<ChartStyles> value)

    Allows you to set additional visual attributes in the chart.

    Remarks:
  • This property is set using the bitwise operators (And, Or, Not, Xor) provided by your Java API .

  • This property uses bitwise operators to turn on and off settings. To combine two flags. use the 'Or' bitwise operator.


  • setFileContents

    public void setFileContents(EnumSet<FileContents> value)

    Sets the attributes to save in chart files (Export method).

    Remarks:
  • The FileContents property is used to customize the chart attributes saved in 'Binary' and 'XML' FileFormat output.

  • The setTemplateContents(java.util.EnumSet) property may be used to customize what attributes are saved into chart template files (FileFormat.BinaryTemplate).

  • Use the exportChart(java.io.OutputStream) method to export charts as binary output containing the contents specified with this property.

  • This property is a mask property, this means all settings represent a bit in the word that you need to turn on or off according to what you want. For this purpose you'll need to use the bitwise operators supported by your development environment. Also ensure you use these operators to turn on/off bits and avoid losing previous settings.

  • By default the setting of this property is 'All' so all chart settings are actually saved in the chart file (including data).

  • See Also:
    setTemplateContents(java.util.EnumSet), exportChart(java.io.OutputStream)

    setForeColor

    public void setForeColor(Color value)

    Sets the default font color of the chart.

    Remarks:
  • See the Color Class in Java API .

  • Named color are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").

  • Below, the defaut font color is set to green:

  • See Also:
    JComponent.setFont(java.awt.Font), setBackColor(java.awt.Color)

    setGallery

    public void setGallery(Gallery value)

    Sets the gallery type for the whole chart.

    Remarks:
  • When you set the gallery with this property, it applies to all the series in the chart. If you want to create a Multitype (combination) chart you need to assign galleries individally for each series. Please refer to the SeriesAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery) properties of the SeriesAttributes Class .

  • setGalleryAttributes(com.softwarefx.chartfx.desktop.IGallery) allows you to assign additional attributes to selected gallery types.

  • See Also:
    GlobalAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery), getAllSeries(), SeriesAttributes, SeriesAttributes

    setGalleryAttributes

    public void setGalleryAttributes(IGallery value)

    Used to create a gallery object to assign additional attributes to the selected setGallery(com.softwarefx.chartfx.desktop.Gallery) of the chart. The gallery attribute can also be accessed through the getAllSeries() property.

    Remarks:
  • This property returns an object which allows assignment of special properties to be set for the selected gallery. Note that not all gallery types support additional properties.

  • Below, the attributes of the Pie gallery are modified to render a 3D effect:

  • See Also:
    setGallery(com.softwarefx.chartfx.desktop.Gallery), getAllSeries(), Pie, Radar, GlobalAttributes

    setHeight

    public void setHeight(int value)

    Specifies the suggested height of the chart when generating images. This property allows you to configure the height of the image using units other than pixels.

    Remarks:
  • You may also set the dimensions for the image generated using the ImageSettings#setHeight and ImageSettings#setWidth properties of ImageSettings.

  • For more information regarding the dimension classes, please refer to the documentation in the Java API .

  • This method overrides the default implementation of WebControl. Please refer to the documentation of WebControl in the Java API .

  • See Also:
    ImageSettings#setHeight, ImageSettings#setWidth

    setHighlight

    public void setHighlight(com.softwarefx.chartfx.desktop.HighlightAttributes value)

    Allows you to customized how all the series of the chart are highlighted. To highlight a series in a chart, simply hover the mouse over a desired series while this property is set to true.

    Remarks:
  • The HighlightAttributes Class supports members which allow the developer to customize how a hightlighted item will be displayed.

  • See Also:
    HighlightDataGridAttributes, HighlightLegendAttributes

    setLegendBox

    public void setLegendBox(LegendBox value)

    Allows you to acces the legend box of the chart.

    Remarks:
  • The values legend box is used to display legends associated with data points and is used to improve the chart's readability in charts like Pie, Doughnut and Pyramid where there's no axis, but point labels are still necessary in the chart.

  • Below, the legend box is render at the bottom of the chart:

  • See Also:
    (LegendBox)

    setMessageText

    public void setMessageText(String key,
                               String message)

    Allows you to customize default Chart FX strings which are displayed in the chart.

    Remarks:
  • The key parameter is case sensitive, therefore you must use the exact pre-defined key value string.

  • You can use the Culture property to fully localize your charts. Elements that can be modified include the names of the culture, the writing system, and the calendar used, as well as formatting dates and strings.

  • The ValueFormat.setCulture(java.util.Locale) property of the ValueFormat Class allow you to assign culture specific formatting to labels and numbers for a selected axis.

  • Pre-defined message identifiers with the defualt values for each key (key=value):

    NoData=No Data Available
    LicDownloading=Downloading License ...
    DataDownloading=Downloading Chart ...
    DataFailed=Failed to download Chart\n{0}
    Mask.Percentage=%s\n%l\n%v out of %t\n(%p%%)
    Mask.OHLC=%l\nOpen: %v2\nHigh: %v4 - Low: %v1\nClose: %v3
    Mask.HLC=%l\nHigh: %v3 - Low: %v1\nClose %v2
    Mask.Ini=%s\n%l\nFrom %i to\n%v
    Mask.XY=%s\n%l\nX: %x, Y: %v
    Mask.Between=%s\n%l - %l\n%v - %v
    Mask.Default=%s\n%l\n%v
    LegMask.Series=Series #{0}
    LegMask.Values=Value #{0}
    CFX61B0=A temporary file on {0} could not be created
    XAxis=X Axis
    YAxis=Y Axis
    General=General
    Series=Series
    Chart=Chart Area
    Draw=Drawing Area
    AllSeries=All Series
    Auto=Auto
    None=None
    Raised=Raised
    Light=Light
    Dark=Dark
    Opposite=Opposite
    Shadow=Shadow
    Number=Number
    Currency=Currency
    Scientific=Scientific
    Percentage=Percentage
    Date=Short Date
    LongDate=Long Date
    Time=Time
    DateTime=Date-Time
    Label0=Horizontal
    Label1=Vertical
    Label2=45 Degrees
    Inside=Inside
    Outside=Outside
    Cross=Across
    ExportFilter=ChartFX File (*.cfx)|*.cfx|Text File (data only)|*.txt|XML File (properties only)|*.xml|Bitmap Image (*.bmp)|*.bmp|Metafile Picture (*.emf)|*.emf
    ImportFilter=ChartFX Files (*.cfx)|*.cfx|Text Files (data only)|*.txt|XML Files(properties only)|*.xml
    NoPermission=The application does not have enough permissions to execute this operation.

  • Parameters:
    key - Pre-defined message identifier.
    message - The new string value for the message.
    See Also:
    ValueFormat.setCulture(java.util.Locale), ValueFormat

    setPageColor

    public void setPageColor(Color value)

    Allows you to specify a form background color needed to fill areas around image border shadowing.

    Remarks:
  • This is automatically done in Chart FX when creating desktop applications. This property is useful when using image borders with the Internet Edition.

  • For more information regarding the Color type, please refer to the Java API Documentation.

  • The ImageBorder Class uses shading to give a multidimensional effect. The PageColor property can be used to modify the background color of the shaded area around the border. Below, the page color of the chart has been set to purple:

  • See Also:
    JComponent.setBorder(javax.swing.border.Border)

    setPalette

    public void setPalette(String value)

    Allows you to set a pre-defined palette.

    Remarks:
  • When changing the palette, all the properties related to changing colors in the chart will also be affected as Chart FX for Java will change the windows palette for the chart window. So if you previously set a color using any of the Chart FX for Java supported properties (setForeColor(java.awt.Color), setBackColor(java.awt.Color), etc) this color may not be part of the applied palette and therefore will be replaced by a color in the selected palette.

  • New palettes may be created and integrated into Chart FX for Java . For more information regarding palette creation, please contact Software FX support.

  • Below is a list of Chart FX for Java palettes:

    Natural.Sky

    ChartFX6.EarthTones

    ChartFX6.ModernBusiness

    DarkPastels.Pastels

    Mesa.Mesa

    Natural.Adventure

    HighContrast.HighContrast

    Vivid

    ChartFX6.Alternate

    ChartFX6.Windows

    ChartFX6.ChartFX6

    Note: To properly load these palettes, you will simply use their string names (e.g. "DarkPastels.Pastels").

  • Below, the palette of the chart is set to EarthTones, sucessively:

  • See Also:
    PointAttributes.setColor(java.awt.Color), PointAttributes.setAlternateColor(java.awt.Color), setForeColor(java.awt.Color), setBackColor(java.awt.Color), PointAttributes, SeriesAttributes

    setPanes

    public void setPanes(PaneCollection value)

    Returns the collection of the defined Paneof the chart.

    Remarks:
  • The Main Pane of the chart is the first indexed pane of the collection.

  • The getMainPane() of the chart is the first indexed pane of the collection.

  • Below, the first series of the chart is associated to the main pane. However, the second and third series are associated to a second pane:

  • See Also:
    getMainPane(), Pane

    setPersonalize

    public void setPersonalize(PersonalizeAttributes value)

    Allows you to set the preferences for saving and loading personalized charts.

    Remarks:
  • Many users require and demand information on an individual basis. Using personalized charts allows users to change visual attributes and have those settings saved locally. When the user accesses the chart in the future, the saved settings can be automatically loaded so the user can view a chart configured to their personal preference.

  • See Also:
    exportChart(java.io.OutputStream), importChart(java.io.InputStream)

    setPlotAreaBackground

    public void setPlotAreaBackground(IBackgroundAdornment value)

    Allows you to assign a gradient to the inside area of a chart.

    Remarks:
  • Once you have created a gradient using the GradientBackground.setAngle(float), GradientBackground.getColors(), GradientBackground.getFactor() and GradientBackground.getPosition() properties, you will need to assign the gradient Class to the InsideBackObject.

  • You can use the JComponent.setBackground(java.awt.Color) to assign a gradient to the chart background area.

  • Gradients applied to the PlotAreaBackground of a chart will only be applied to 2D charts. Gradients applied to the PlotAreaBackground of 3D charts will be ignored, however gradients applied to the JComponent.setBackground(java.awt.Color) of both 2D and 3D charts is supported.

  • To use gradients, the assembly ChartFX.Adornments.dll must be added as a reference in the project.

  • Below is an example of a gradient rendered in the plot area of the chart:

  • See Also:
    GradientBackground.setAngle(float), JComponent.setBackground(java.awt.Color), GradientBackground.getColors(), GradientBackground.getFactor(), GradientBackground.getPosition(), setPlotAreaColor(java.awt.Color), setBackColor(java.awt.Color), Pane.setBackground(com.softwarefx.chartfx.desktop.adornments.IBackgroundAdornment), GradientBackground, SolidBackground, ImageBackground

    setPlotAreaColor

    public void setPlotAreaColor(Color value)

    Gets and Sets the color of the PlotAreaBackground. Alternatively, the color can be access using the Color property of the setPlotAreaBackground(com.softwarefx.chartfx.desktop.adornments.IBackgroundAdornment) object.

    Remarks:
  • For more information regarding the Color type, please refer to the Java API Documentation.

  • Named color are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").

  • When the chart renders several panes, setting the color of the plot area is equivalent to setting the Pane.setBackColor(java.awt.Color) of the panes individually.

    Below, the color of the plot area is set to purple:

  • PlotAreaColor supports transparency. When the PlotArea is transparent, the background of the PlotArea is rendered by the JComponent.setBackground(java.awt.Color) and setBackColor(java.awt.Color) properties. In this screenshot, the PlotAreaColor is set to transparent and the setBackColor(java.awt.Color) is set to blue:

  • See Also:
    Pane.setBackColor(java.awt.Color), setBackColor(java.awt.Color), setPlotAreaBackground(com.softwarefx.chartfx.desktop.adornments.IBackgroundAdornment), ImageBackground, SolidBackground

    setPlotAreaMargin

    public void setPlotAreaMargin(Margins value)

    Gets and Sets the top, bottom, left and right gaps of the chart.

    Remarks:
  • A gap is defined as the margin between the chart and the bounding rectangle in pixels. Each chart has a top, bottom, left and right gaps.

  • The lowest value for the each gap is 1, which sets it to one pixel. Setting a gap to 0 will reset it to default values.

  • Below, the bottom gap of the chart is set to 100 pixels. The other gaps are set to 0:


  • setSeries

    public void setSeries(SeriesAttributesCollection value)

    Assigns properties directly to the selected series in the chart.

    Remarks:
  • Allows you to assign supported properties directly to the specified data series. For supported properties, please see the SeriesAttributes Class .

  • getAllSeries() allows to set properties common to all the Series or/and getPoints() of the chart.

  • The Series property allows you to create charts with mixed SeriesAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery) types and assign specific colors to each series.

  • Below is an example of a multi-gallery chart:

  • See Also:
    SeriesAttributes.setColor(java.awt.Color), GlobalAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery), SeriesAttributes.setGallery(com.softwarefx.chartfx.desktop.Gallery), getAllSeries(), getPoints(), SeriesAttributes, PointAttributes, GlobalAttributes

    setTemplateContents

    public void setTemplateContents(EnumSet<FileContents> value)

    Sets the attributes to save in personalization features and template files (Export method).

    Remarks:
  • The TemplateContents property is used to customize the chart attributes saved in 'BinaryTemplate' FileFormat output.

  • The TemplateContents property is also used to control the attributes saved into templates saved when utilizing Personalization options.

  • The setFileContents(java.util.EnumSet) property may be used to customize what attributes are saved into chart Binary files (FileFormat.Binary).

  • Use the exportChart(java.io.OutputStream) method to export charts as BinaryTemplate output containing the contents specified with this property.

  • This property is a mask property, this means all settings represent a bit in the word that you need to turn on or off according to what you want. For this purpose you'll need to use the bitwise operators supported by your development environment. Also ensure you use these operators to turn on/off bits and avoid losing previous settings.

  • By default the setting of this property is 'Template' so only selected chart elements are saved (excluding data).

  • See Also:
    setFileContents(java.util.EnumSet), exportChart(java.io.OutputStream)

    setTitles

    public void setTitles(TitleCollection value)

    Returns the collection of titles defined in the chart.

    Remarks:
  • Using the numerical index, you can access multiple items of this collection.

  • The Title.setTextColor(java.awt.Color) property may be used to get or set the color of the title text; the JComponent.setFont(java.awt.Font) Property can be used to configure a new font object for the title.

  • Below, a title in bold has been added in the chart:

  • See Also:
    Axis.setTitle(com.softwarefx.chartfx.desktop.Title), Title.setTextColor(java.awt.Color), Title.setFont(java.awt.Font), Axis, Title

    setToolBar

    public void setToolBar(ToolBar value)

    Allow to acces the tool bar of the chart. Alternativelly, you can access the tool bar of the chart using getMenuBar().

    Remarks:
  • You can configure the commands available through the menu bar using the getCommands() property.

  • If you want to customize the toolbar, you will need to use properties supported by the ToolBar Class .

  • Below is a chart with the ToolBar enabled:

  • See Also:
    getMenuBar(), getDataGrid(), getLegendBox(), getCommands(), ToolBar, DataGrid, LegendBox, DockableBar, Command

    setToolTipFormat

    public void setToolTipFormat(String value)

    Allows you to control the information to be displayed in the tooltip when the user positions the mouse over a particular data point in the chart.

    Remarks:
  • setToolTips(boolean) toggle on/off the tooltip in the chart.

  • The syntax for this property is the same as the one used in the PointLabelAttributes.setFormat(java.lang.String) property. Variables can be accessed using the % following the variable you want to include:

    l Shows X-Axis Legend.

    k Shows X-Axis Key Legend.

    s Shows Series Legend.

    S Shows the Series Index.

    x Shows XValue (XY charts, when they were set with X values).

    i Shows IniValues (Gantt).

    v Shows Data Value.

    v <n> For types that require more than one series, these are replaced by the value of each one. (n represents an index).

    t Series Total (Sum of all points in this series).

    p Percentage of total this point represents (Pie).

    T Point Total (Sum of all series for this point).

    P Percentage of total this series represents (Used in stacked charts).

    X displays the marker X value for any chart type including those that do not support X values such as bar.

    N Shows the index for the point.

    L Shows the Text property of the PointAttributes object.

  • See Also:
    setToolTips(boolean), PointLabelAttributes.setFormat(java.lang.String), expandMacros(java.lang.String, int, int, boolean), GlobalAttributes, PointLabelAttributes

    setToolTips

    public void setToolTips(boolean value)

    Allows you to enable or disable tooltips when the user positions the mouse over a particular element in the chart area only.

    Remarks:
  • This property does not affect whether if the Toolbar ToolTips will appear or not when the user positions the mouse over a particular button or element in the Toolbar. For more information on how to disable Toolbar tooltips, please refer to the ToolTips property in the ToolBar Class .

  • This property must be set to True for the GetTip event to fire.

  • See Also:
    setToolTipFormat(java.lang.String), getToolBar(), getMenuBar(), ToolBar

    setView3D

    public void setView3D(Attributes3D value)

    Allows you to enable or disable 3D view of the chart. Also permits to customize the 3D view.

    Remarks:
  • When this property is set to True, you can apply a rotation angle or perspective with the AngleX, AngleY and Perspective parameters of the View3D object.

  • When this property is set to True, you can apply a rotation angle or perspective with the Attributes3D.setAngleX(int), Attributes3D.setAngleY(int) and Attributes3D.setPerspective(int) properties of the Attributes3D Class .

  • Below is a chart where the 3D view is enabled:


  • setVisible

    public void setVisible(boolean visible)

    Sets a value specifying to show or hide the chart.

    Remarks:
  • By default the chart is visible.

  • Overrides:
    setVisible in class JComponent

    setWidth

    public void setWidth(int value)

    Specifies the suggested width of the chart when generating images. This property allows you to configure the width of the image using units other than pixels.

    Remarks:
  • You may also set the dimensions for the image generated using the ImageSettings#setHeight and ImageSettings#setWidth properties of ImageSettings.

  • For more information regarding the dimension classes, please refer to the Java API documentation.

  • This method overrides the default implementation of WebControl. Please refer to the documentation of WebControl in the Java API .

  • See Also:
    ImageSettings#setHeight, ImageSettings#setWidth

    setZoom

    public void setZoom(boolean value)

    Allows you to select a section of the chart using the mouse cursor and zoom in that area.

    Remarks:
  • When set to True, this property allows you to select a section of the chart using the mouse cursor for Chart FX to zoom in for a closer look.

  • When set to False, this property turns off all zoom attributes globally, including the Axis object Axis.zoom(double, double) and Axis.zoomOff() methods.

  • When the Zoom property is enabled, you can select a portion of the chart to Zoom by left clicking and dragging your mouse of the desired area:

    Once you have selected a range, the zoom area of the chart will be displayed:

  • See Also:
    getAxisX(), getAxisY(), getAxisY2(), getAxesX(), getAxesY(), Axis.zoom(double, double), Axis.zoomOff(), Axis

    updateSizeNow

    public void updateSizeNow()

    Allows you to force a scale calculation before the chart is drawn.

    Remarks:
  • Scale calculations in Chart FX are delayed until the chart is about to be drawn. This increases the performance as setting multiple properties from only one windows event, cause only one recalculation.

  • The UpdateSizeNow method allows you to make this on demand. This allows you to access information about the chart scaling before it is drawn. It also allows you to make changes to a chart and export it to a picture without the chart ever being visible.

  • See Also:
    exportChart(java.io.OutputStream)

    zoomToPercentage

    public void zoomToPercentage(int percentage)

    Zooms the chart to center based on configured percentage value.

    Remarks:
  • This method is used to zoom to the center of the chart. Both X and Y axes are zoomed at the same time.

  • The percentage value should be configured as an integer value between 0 and 100.

  • After calling this method, the user can continue to zoom the chart using the mouse in selected chart types. Webform chart images (static and interactive images) do not support continued zoom after the ZoomToPercentage call.

  • Parameters:
    percentage - The percentage to zoom.
    See Also:
    Axis.setScrollView(double, double)

    zoomToWindow

    public void zoomToWindow(int x1,
                             int y1,
                             int x2,
                             int y2)

    Zooms the chart to a rectangular area based on specified x and y coordinates for the rectangle

    Remarks:
  • The Zooming rectangle is defined Using Left and Top pixel coordinates.

  • The X and Y coordinates are relative to the Top Left corner of the plot area. I other words, the top left point of the plot area is point (0,0)

  • Parameters:
    x1 - X coordinate of the zooming rectangle's Left side
    y1 - Y coordinate of the zooming rectangle's Top side
    x2 - X coordinate of the zooming rectangle's Right side
    y2 - Y coordinate of the zooming rectangle's Bottom side
    See Also:
    zoomToPercentage(int)

    http://www.softwarefx.com

    2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.