Chart FX for Java 6.2

SoftwareFX.ChartFX
Class SeriesAttributes

java.lang.Object
  extended bySoftwareFX.ChartFX.SeriesAttributes

public final class SeriesAttributes
extends java.lang.Object

Provides access to the SeriesAttributes object.

The chart series are represented by groups of data points. For example if you want to plot yearly sales for two different products. Product A and Product B are called the series of the chart. For example, if you create a bar chart, two groups of bars will appear, a group of bars will represent each product and each bar will represent actual sales for a particular month, as depicted in the following figure:

The series object allows you to set everything related to the series of the chart, including data, legends and visual attributes like colors, chart types and border styles among others.

What's important about the series object is that you can use properties available in this object to set specific settings to individual series in the chart without affecting the other ones. For example, if you want to create a combination (multitype) chart, where Product A is plotted as line with data labels and Product B is displayed as bars with no borders, you can access each series properties using the series object and obtain the following chart:


Constructor Summary
SeriesAttributes()
           
SeriesAttributes(Chart chart, int index)
           
 
Method Summary
 void drawMarker(java.awt.Graphics2D g, java.awt.Point pt, int item, int radius, boolean drawLine)
          Used to draw a marker on a selected device context.
 void DrawMarker(java.awt.Graphics2D g, java.awt.Point pt, int item, int radius, boolean drawLine)
          Deprecated. You should use drawMarker instead.
 java.awt.Color getAlternateColor()
          Allows you to set the alternate color for a selected item when using gradient scheme.
 java.awt.Color getBorderColor()
          Allows you to set a border color for a selected item in the chart.
 int getBorderEffect()
          Specifies the valid border effects for a selected item.
 java.awt.Color getColor()
          Sets a color for the selected series.
 short getCylSides()
          Sets the 3D shape of the selected item.
 int getGallery()
          Sets the chart type for a particular series.
 java.lang.String getLegend()
          Allows you to set a legend (categorical Axis labels) for the selected series.
 int getLineEndCap()
          Sets an ending marker shape for lines in the borders of 3D charts.
 int getLineStartCap()
          Sets an starting marker shape for lines in the borders of 3D charts.
 int getLineStyle()
          Used to set a line style to the selected item.
 short getLineWidth()
          Used to set the line weight or thickness for the selected item.
 Link getLink()
          Gets the Link object for a selected PointAttributes item.
 int getMarkerShape()
          Used to specify the point type used to paint markers for the selected item.
 short getMarkerSize()
          Controls the size of the markers for the selected item.
 short getMarkerStep()
          Controls how frequently point markers are shown in the selected series.
 int getPattern()
          Allows you to set a pattern for the selected item.
 java.awt.Image getPicture()
          Allows you to set a picture to the selected item.
 int getPointLabelAlign()
          Allows you to align point labels using the marker as a reference for the selected item.
 short getPointLabelAngle()
          Allows you to display the point label at the specified angle for the selected item.
 java.awt.Color getPointLabelColor()
          Allows you to change the color of point labels for the selected item.
 java.awt.Font getPointLabelFont()
          Allows you to change the text font attributes for the point labels of the selected item.
 int getScheme()
          Allows you to change the color scheme for a selected item.
 short getSeparateSlice()
          Allows you to separate a slice of a Pie or Doughnut chart for a selected item.
 int getSmoothFlags()
          Sets the rendering quality for the selected series and text related to this series.
 java.lang.Object getTag()
          Assign a string to any item for retrieval later.
 int getTypeMask()
          Allows you to set additional attributes to the selected item.
 java.lang.String getURL()
          Deprecated. You should use SeriesAttributes.getLink().getUrl instead.
 short getVolume()
          Allows you to specify a volume for a data point markers in supported galleries.
 int getYAxis()
          Allows you to move (or assign) the selected data series to a different numerical axis.
 boolean isBorder()
          Allows you to show or hide marker borders for a selected item.
 boolean isInternalBorder()
          Gets or sets a value indicating whether a chart will have an internal border.
 boolean isPointLabels()
          Allows you to display the value via point label for a selected item.
 boolean isStacked()
          Allows you to stack the selected series with the previous series to achieve multi-stacked charts.
 boolean isVisible()
          Shows or hides the selected series.
 void setAlternateColor(java.awt.Color value)
          Allows you to set the alternate color for a selected item when using gradient scheme.
 void setBorder(boolean value)
          Allows you to show or hide marker borders for a selected item.
 void setBorderColor(java.awt.Color value)
          Allows you to set a border color for a selected item in the chart.
 void setBorderEffect(int value)
          Specifies the valid border effects for a selected item.
 void setColor(java.awt.Color value)
          Sets a color for the selected series.
 void setCylSides(short value)
          Sets the 3D shape of the selected item.
 void setGallery(int value)
          Sets the chart type for a particular series.
 void setInternalBorder(boolean value)
          Gets or sets a value indicating whether a chart will have an internal border.
 void setLegend(java.lang.String value)
          Allows you to set a legend (categorical Axis labels) for the selected series.
 void setLineEndCap(int value)
          Sets an ending marker shape for lines in the borders of 3D charts.
 void setLineStartCap(int value)
          Sets an starting marker shape for lines in the borders of 3D charts.
 void setLineStyle(int value)
          Used to set a line style to the selected item.
 void setLineWidth(short value)
          Used to set the line weight or thickness for the selected item.
 void setMarkerShape(int value)
          Used to specify the point type used to paint markers for the selected item.
 void setMarkerSize(short value)
          Controls the size of the markers for the selected item.
 void setMarkerStep(short value)
          Controls how frequently point markers are shown in the selected series.
 void setPattern(int value)
          Allows you to set a pattern for the selected item.
 void setPicture(java.awt.Image value)
          Allows you to set a picture to the selected item.
 void setPointLabelAlign(int value)
          Allows you to align point labels using the marker as a reference for the selected item.
 void setPointLabelAngle(short value)
          Allows you to display the point label at the specified angle for the selected item.
 void setPointLabelColor(java.awt.Color value)
          Allows you to change the color of point labels for the selected item.
 void setPointLabelFont(java.awt.Font value)
          Allows you to change the text font attributes for the point labels of the selected item.
 void setPointLabels(boolean value)
          Allows you to display the value via point label for a selected item.
 void setScheme(int value)
          Allows you to change the color scheme for a selected item.
 void setSeparateSlice(short value)
          Allows you to separate a slice of a Pie or Doughnut chart for a selected item.
 void setSmoothFlags(int value)
          Sets the rendering quality for the selected series and text related to this series.
 void setStacked(boolean value)
          Allows you to stack the selected series with the previous series to achieve multi-stacked charts.
 void setTag(java.lang.Object value)
          Assign a string to any item for retrieval later.
 void setTypeMask(int value)
          Allows you to set additional attributes to the selected item.
 void setURL(java.lang.String value)
          Deprecated. You should use SeriesAttributes.getLink().setUrl instead.
 void setVisible(boolean value)
          Shows or hides the selected series.
 void setVolume(short value)
          Allows you to specify a volume for a data point markers in supported galleries.
 void setYAxis(int value)
          Allows you to move (or assign) the selected data series to a different numerical axis.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeriesAttributes

public SeriesAttributes()

SeriesAttributes

public SeriesAttributes(Chart chart,
                        int index)
Method Detail

drawMarker

public void drawMarker(java.awt.Graphics2D g,
                       java.awt.Point pt,
                       int item,
                       int radius,
                       boolean drawLine)

Used to draw a marker on a selected device context.

Remarks:
  • This method allows you to draw a markers to a selected device context without ever assigning the values to a chart.

  • Parameters:
    g - A Graphics object is associated with a specific device context.
    pt - A Point object with the desired X and Y coordinates where the marker will be drawn.
    item - Index of the marker item you wish to draw. (If a specific point index has been assigned special attributes you want to use, i.e. MarkerShape) Set to -1 to use default series assignments.
    radius - Controls the size of the markershape.
    drawLine - Specifies if the markers will have a line on either side of the marker. (Simulate markers in a line chart)
    See Also:
    DefaultBorder.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color), ImageBorder.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color), GradientBackground.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color), DefaultBorder, ImageBorder, GradientBackground

    DrawMarker

    public void DrawMarker(java.awt.Graphics2D g,
                           java.awt.Point pt,
                           int item,
                           int radius,
                           boolean drawLine)
    Deprecated. You should use drawMarker instead.


    getAlternateColor

    public java.awt.Color getAlternateColor()

    Allows you to set the alternate color for a selected item when using gradient scheme.

    Remarks:
  • This property is used in conjunction with PointAttributes.setScheme(int) property. You need to set the scheme to gradient in order to use AlternateColor property.

    chart1.setScheme(Scheme.GRADIENT);

  • To create a gradient for an item, you first need to set an initial color using the setColor(java.awt.Color) property. Then you can assign a AlternateColor to complete the gradient assignment.

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

  • See Also:
    setColor(java.awt.Color), PointAttributes.setScheme(int), SeriesAttributes

    getBorderColor

    public java.awt.Color getBorderColor()

    Allows you to set a border color for a selected item in the chart.

    Remarks:
  • In order to see the color set using this property, you must make sure the PointAttributes.setBorderEffect(int) is set to BorderEffect.None and make sure the border for the selected item is visible (default setting) by using the PointAttributes.setBorder(boolean) property.

  • This property applies to the selected item in the chart. If you want to apply it for all items in a chart, please refer to the Chart's Chart.setBorderColor(java.awt.Color) property.

  • To set the Border Effect, Line Style and Line Width, please refer to the PointAttributes.setBorderEffect(int), PointAttributes.setLineStyle(int) and PointAttributes.setLineWidth(short) properties respectively.

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

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setBorderEffect(int), PointAttributes.setLineStyle(int), PointAttributes.setLineWidth(short), SeriesAttributes

    getBorderEffect

    public int getBorderEffect()

    Specifies the valid border effects for a selected item.

    Values:
    BorderEffect : Specify different border effects that may be applied to a object.
    ValueDescription
    NONENo border effect is applied. The border effect must be None for the BorderColor property to take effect.
    RAISEDThe border has raised inner and outer edges.
    LIGHTApply light color to the border using the series/points color.
    DARKApply dark color to the border using the series/points color.
    OPPOSITEChooses between dark and light border depending on the object color. If the color is dark Chart FX will choose a light border color. If the color is light Chart FX will choose a dark border color.
    SHADOWThe border will have shadow.

    Remarks:
  • When setting this property, make sure the border for the selected item is visible by using the PointAttributes.setBorder(boolean) property.

  • The BorderEffect property must be set to BorderEffect.None for the PointAttributes.setBorderColor(java.awt.Color) property to have any effect on the selected item border.

  • To set the Border Color, Line Style and Line Width, please refer to the PointAttributes.setBorderColor(java.awt.Color),PointAttributes.setLineStyle(int) and PointAttributes.setLineWidth(short) properties respectively.

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setBorderColor(java.awt.Color), PointAttributes.setLineStyle(int), PointAttributes.setLineWidth(short), Chart, SeriesAttributes

    getColor

    public java.awt.Color getColor()

    Sets a color for the selected series.

    Remarks:
  • If no colors are specified, The default color is automatically selected by Chart FX when you create the chart, and chosen according to the current palette and its position in the series array.

  • The color property is used to set a specific color to the selected series. You can control colors of other chart elements using the PointAttributes.setBorderColor(java.awt.Color), Chart.setBackColor(java.awt.Color) and Chart.setInsideColor(java.awt.Color) properties.

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

  • See Also:
    Chart.setBackColor(java.awt.Color), PointAttributes.setBorderColor(java.awt.Color), Chart.setInsideColor(java.awt.Color), Chart, PointAttributes

    getCylSides

    public short getCylSides()

    Sets the 3D shape of the selected item.

    You can create different cylindrical and conical shapes.

    Remarks:
  • This property can only be applied to BAR, CUBES or GANTT charts. When specifying a large number of sides in the base (i.e. -32 or 32) it may be a good idea to get rid off the border (Border Property), this will create a seamless color effect on the marker.

  • With this property you will set individual items to different conical or cylindrical shapes. For example, using this property you can combine Cylinders with Cones. If you want to apply the setting to the entire chart (all data series),you can use the general Chart.setCylSides(short) property.

  • Setting this property to a positive number [1,32] will create a cylindrical shape.

  • Setting this property to a negative number [-32,-1] will create a conical shape. For example if you want to convert bars into pyramids (base 3) you can set the value of this property to -3.

  • Making the Chart a 3D chart using the Chart.setChart3D(boolean) property is not required, however the 3D markers are in better context.

  • See Also:
    Chart.setGallery(int), PointAttributes.setBorder(boolean), Chart.setChart3D(boolean), Chart, SeriesAttributes

    getGallery

    public int getGallery()

    Sets the chart type for a particular series. All chart types are available in both 2D and 3D modes.

    Values:
    Gallery : Defines the chart type.
    ValueDescription
    LINESLine Chart.
    BARBar Chart.
    CURVESpline Curve chart.
    SCATTERScatter or XY Plot.
    PIEPie Chart.
    AREAArea Chart.
    PARETOPareto Chart.
    STEPStep Lines Chart
    HI_LOW_CLOSEHi-Low-Close Chart.
    SURFACESurface Plot.
    RADARRadar Chart.
    CUBECubes Chart.
    DOUGHNUTDoughnut Chart.
    PYRAMIDPyramid Chart.
    BUBBLEBubble Chart.
    OPEN_HI_LOW_CLOSEOpen-Hi-Lo-Close Chart.
    CANDLESTICKCandleStick Chart.
    CONTOURContour Chart.
    CURVE_AREACurve Area Chart.
    GANTTHorizontal Bar Chart.

    Remarks:
  • Applying this property to a specific series will create a MultiType chart, where different Chart Types can be combined in the same chart. For example, if you initially created a bar chart with 3 series, you can convert the first series to a line chart as follows:

    chart1.getSeries(0).setGallery(Gallery.LINES);

    You must be careful of the chart types you select to combine as not all of them will produce desirable results. For example, combining a chart that does not have numerical axis (e.g. Pie Chart) with a chart that has a numerical axis (e.g. Line Chart) will produce a chart that can't be read by the end user.

    A rule of thumb is that you can combine axis charts with similar types and non-axis charts with similar types, as follows:

    Axis Charts:

    Lines, Bar, Curve, Scatter, Area, Step, HiLowClose, Cube, Bubble, CandleStick, CurveArea, OpenHiLowClose, Pareto.

    Non-axis charts:

    Pie, Radar, DoughNut, Pyramid

    Note: Gantt, Surface and Contour can't be combined with other chart types

  • Another important issue to keep in mind when creating MultiType charts is the number of series each chart type requires to properly plot the data. For example, an Open-Hi-Lo-Close chart requires 4 consecutive series to properly plot the data, so if you want to combine this chart type with a line chart, the series containing the data for the line chart must be either the first or the last series in the data set.

  • See Also:
    Chart.setGallery(int), Chart

    getLegend

    public java.lang.String getLegend()

    Allows you to set a legend (categorical Axis labels) for the selected series.

    Remarks:
  • Once you have set the series legend in the chart, you can treat the legend window as an additional tool with different properties that can be accessed using the Chart.getSerLegBoxObj() property.

  • Use the Chart.setSerLegBox(boolean) property to make the series legend box visible.

  • You can also use the Chart.getSerLeg(int) property to define names for your series.

  • See Also:
    Chart.getSerLeg(int), Chart.setSerLegBox(boolean), Chart.getSerLegBoxObj(), LegendBox, Chart

    getLineEndCap

    public int getLineEndCap()

    Sets an ending marker shape for lines in the borders of 3D charts.

    Values:
    LineCap : Specifies the available cap styles with which a line can end.
    ValueDescription
    ANCHOR_MASKSpecifies a mask used to check whether a line cap is an anchor cap.
    ARROW_ANCHORSpecifies an arrow-shaped anchor cap.
    CUSTOMSpecifies a custom line cap.
    DIAMOND_ANCHORSpecifies a diamond anchor cap.
    FLATSpecifies a flat line cap.
    NO_ANCHORSpecifies no anchor.
    ROUNDSpecifies a round line cap.
    ROUND_ANCHORSpecifies a round anchor cap.
    SQUARESpecifies a square line cap.
    SQUARE_ANCHORSpecifies a square anchor line cap.
    TRIANGLESpecifies a triangular line cap.

    Remarks:
  • Adjusting the line width using the PointAttributes.setLineWidth(short) property makes the border of the point or series markers set with this property more and less noticeable.

  • Set the chart to 3D mode using the Chart.setChart3D(boolean) property to see the shape created using the PointAttributes.setLineStartCap(int) and LineEndCap properties.

  • The PointAttributes.setLineStyle(int) property allows you to apply an addition style to the selected items.

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

  • See Also:
    PointAttributes.setLineStartCap(int), Chart.setChart3D(boolean), PointAttributes.setLineWidth(short), PointAttributes.setLineStyle(int), Chart

    getLineStartCap

    public int getLineStartCap()

    Sets an starting marker shape for lines in the borders of 3D charts.

    Values:
    LineCap : Specifies the available cap styles with which a line can end.
    ValueDescription
    ANCHOR_MASKSpecifies a mask used to check whether a line cap is an anchor cap.
    ARROW_ANCHORSpecifies an arrow-shaped anchor cap.
    CUSTOMSpecifies a custom line cap.
    DIAMOND_ANCHORSpecifies a diamond anchor cap.
    FLATSpecifies a flat line cap.
    NO_ANCHORSpecifies no anchor.
    ROUNDSpecifies a round line cap.
    ROUND_ANCHORSpecifies a round anchor cap.
    SQUARESpecifies a square line cap.
    SQUARE_ANCHORSpecifies a square anchor line cap.
    TRIANGLESpecifies a triangular line cap.

    Remarks:
  • Adjusting the line width using the PointAttributes.setLineWidth(short) property makes the border of the point or series markers set with this property more and less noticeable.

  • Set the chart to 3D mode using the Chart.setChart3D(boolean) property to see the shape created using the LineStartCap and PointAttributes.setLineEndCap(int) properties.

  • The PointAttributes.setLineStyle(int) property allows you to apply an addition style to the selected items.

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

  • See Also:
    PointAttributes.setLineEndCap(int), Chart.setChart3D(boolean), PointAttributes.setLineWidth(short), PointAttributes.setLineStyle(int), Chart

    getLineStyle

    public int getLineStyle()

    Used to set a line style to the selected item.

    Values:
    DashStyle : Specifies the style with which dashed lines are drawn.
    ValueDescription
    CUSTOMSpecifies a user-defined custom dash style.
    DASHSpecifies a line consisting of dashes.
    DASH_DOTSpecifies a line consisting of a repeating pattern of dash-dot.
    DASH_DOT_DOTSpecifies a line consisting of a repeating pattern of dash-dot-dot.
    DOTSpecifies a line consisting of dots.
    SOLIDSpecifies a solid line.

    Remarks:
  • If you're displaying a 2D Line chart, this property will set the 2D line style. For other charts, this property controls the style of the border surrounding the marker.

  • If you're using this property for a different chart type (other than a 2D Line chart) you can set the Border Color and Width, with the PointAttributes.setBorderColor(java.awt.Color) and PointAttributes.setLineWidth(short) properties respectively. However, you must make sure the Border is visible by setting the Border property to True.

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

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setLineWidth(short), PointAttributes.setBorderColor(java.awt.Color), SeriesAttributes

    getLineWidth

    public short getLineWidth()

    Used to set the line weight or thickness for the selected item.

    Remarks:
  • If you're displaying a 2D Line chart, this property will set the line thickness. For other charts, this property controls the thickness of the border surrounding the marker.

  • If you're using this property for a different chart type (other than a 2D Line chart) you can set the Border Color and Style, with the PointAttributes.setBorderColor(java.awt.Color) and PointAttributes.setLineStyle(int) properties respectively. However, you must make sure the Border is visible by setting the Border property to True.

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setLineStyle(int), PointAttributes.setBorderColor(java.awt.Color), SeriesAttributes

    getLink

    public Link getLink()

    Gets the Link object for a selected PointAttributes item.

    Remarks:
  • Developers may obtain the Link object for a PointAttributes item using this property. Using the supported Link class members, developers may configure a Link.setUrl(java.lang.String) and Link.setTarget(java.lang.String) for the object.

  • See Also:
    Link.setUrl(java.lang.String), Link.setTarget(java.lang.String), Link

    getMarkerShape

    public int getMarkerShape()

    Used to specify the point type used to paint markers for the selected item.

    Values:
    MarkerShape : Defines different shapes used to paint point markers in the chart.
    ValueDescription
    NONEDo not display point markers.
    RECTDisplays a rectangle.
    CIRCLEDisplays a circle.
    TRIANGLEDisplays a triangle.
    DIAMONDDisplays a diamond.
    MARBLEDisplays a 3D marble.
    HORZ_LINEDisplays a horizontal line.
    VERT_LINEDisplays a vertical line.
    CROSSDisplays a cross.
    INVERTED_TRIANGLEDisplays a rotated triangle.
    XDisplays an X.
    MANYSelects a combination of the above.
    PICTUREDisplays a configured picture.

    Remarks:
  • Point markers will not be shown in 3D line charts.

  • This property applies only to: LINES, CURVE, SCATTER, PARETO, STEP and RADAR charts.

  • You can control the size of the points with the PointAttributes.setMarkerSize(short) property, or how frequently do they appear on the selected series by using the Chart.setMarkerStep(short) property.

  • You can set custom images as chart markers by setting this property to the 'Picture' enumeration and setting an image using the PointAttributes.setPicture(java.awt.Image) property.

  • See Also:
    PointAttributes.setMarkerSize(short), Chart.setMarkerStep(short), Chart.setPointFont(java.awt.Font), Chart.setGallery(int), Chart, SeriesAttributes

    getMarkerSize

    public short getMarkerSize()

    Controls the size of the markers for the selected item.

    Remarks:
  • This property sets the radius of the marker in physical units (pixels). You must make sure the PointAttributes.setMarkerShape(int) Property is set to a valid point type (other than None), before setting this property.

  • Point markers will not be shown in 3D line charts.

  • You can control the shape (or type) of the points with the PointAttributes.setMarkerShape(int) property, or how frequently do they appear on the selected series by using the setMarkerStep(short) property.

  • See Also:
    PointAttributes.setMarkerShape(int), setMarkerStep(short), Chart.setMarkerStep(short), Chart, SeriesAttributes

    getMarkerStep

    public short getMarkerStep()

    Controls how frequently point markers are shown in the selected series.

    Remarks:
  • This property is very useful when the chart contains a large number of points and the point markers disturb the chart's readability. For example, if you are showing 100 points in a line chart, the physical separation (pixels) of them is very small and probably the point markers will make the chart unreadable to the end user. In this case, you can set this property to force Chart FX to show point markers every 20 points.

  • Point markers will not be shown in 3D line charts.

  • You must make sure the PointAttributes.setMarkerShape(int) Property is set to a valid point type (other than None), before setting this property.

  • You can control the shape and Size of the point markers with the PointAttributes.setMarkerShape(int) property and PointAttributes.setMarkerSize(short) properties, respectively.

  • You can extend the point types available by setting this property to an integer representing the negative ASCII code from any font. By default, Chart FX uses the WingDings font table to handle additional point types. For changing the default font, use the Chart.setPointFont(java.awt.Font) property.

  • See Also:
    PointAttributes.setMarkerSize(short), PointAttributes.setMarkerShape(int), Chart.setPointFont(java.awt.Font), Chart

    getPattern

    public int getPattern()

    Allows you to set a pattern for the selected item.

    Values:
    HatchStyle : Specifies the different hatch patterns available.
    ValueDescription
    BACKWARD_DIAGONALA pattern of lines on a diagonal from upper right to lower left.
    CROSSSpecifies horizontal and vertical lines that cross.
    DARK_DOWNWARD_DIAGONALSpecifies diagonal lines that slant to the right from top points to bottom points, are spaced 50 percent closer together than, and are twice the width of ForwardDiagonal. This hatch pattern is not antialiased.
    DARK_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal and are twice the width of HatchStyleHorizontal.
    DARK_UPWARD_DIAGONALSpecifies diagonal lines that slant to the left from top points to bottom points, are spaced 50 percent closer together than BackwardDiagonal, and are twice its width, but the lines are not antialiased.
    DARK_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical and are twice its width.
    DASHED_DOWNWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the right from top points to bottom points.
    DASHED_HORIZONTALSpecifies dashed horizontal lines.
    DASHED_UPWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the left from top points to bottom points.
    DASHED_VERTICALSpecifies dashed vertical lines.
    DIAGONAL_BRICKSpecifies a hatch that has the appearance of layered bricks that slant to the left from top points to bottom points.
    DIAGONAL_CROSSSpecifies forward diagonal and backward diagonal lines that cross. The lines are antialiased.
    DIVOTSpecifies a hatch that has the appearance of divots.
    DOTTED_DIAMONDSpecifies forward diagonal and backward diagonal lines, each of which is composed of dots, that cross.
    DOTTED_GRIDSpecifies horizontal and vertical lines, each of which is composed of dots, that cross.
    FORWARD_DIAGONALA pattern of lines on a diagonal from upper left to lower right.
    HORIZONTALA pattern of horizontal lines.
    HORIZONTAL_BRICKSpecifies a hatch that has the appearance of horizontally layered bricks.
    LARGE_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard with squares that are twice the size of SmallCheckerBoard.
    LARGE_CONFETTISpecifies a hatch that has the appearance of confetti, and is composed of larger pieces than SmallConfetti.
    LARGE_GRIDSpecifies the hatch style Cross.
    LIGHT_DOWNWARD_DIAGONALSpecifies diagonal lines that slant to the right from top points to bottom points and are spaced 50 percent closer together than DownwardDiagonal, but they are not antialiased.
    LIGHT_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal.
    LIGHT_UPWARD_DIAGONALSpecifies diagonal lines that slant to the left from top points to bottom points and are spaced 50 percent closer together than BackwardDiagonal, but they are not antialiased.
    LIGHT_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical.
    MAXSpecifies hatch style SolidDiamond.
    MINSpecifies hatch style Horizonal.
    NARROW_HORIZONTALSpecifies horizontal lines that are spaced 75 percent closer together than hatch style Horizontal (or 25 percent closer together than LightHorizontal).
    NARROW_VERTICALSpecifies vertical lines that are spaced 75 percent closer together than hatch style Vertical (or 25 percent closer together than LightVertical).
    OUTLINED_DIAMONDSpecifies forward diagonal and backward diagonal lines that cross but are not antialiased.
    PERCENT_05Specifies a 5-percent hatch. The ratio of foreground color to background color is 5:100.
    PERCENT_10Specifies a 10-percent hatch. The ratio of foreground color to background color is 10:100.
    PERCENT_20Specifies a 20-percent hatch. The ratio of foreground color to background color is 20:100.
    PERCENT_25Specifies a 25-percent hatch. The ratio of foreground color to background color is 25:100.
    PERCENT_30Specifies a 30-percent hatch. The ratio of foreground color to background color is 30:100.
    PERCENT_40Specifies a 40-percent hatch. The ratio of foreground color to background color is 40:100.
    PERCENT_50Specifies a 50-percent hatch. The ratio of foreground color to background color is 50:100.
    PERCENT_60Specifies a 60-percent hatch. The ratio of foreground color to background color is 60:100.
    PERCENT_70Specifies a 70-percent hatch. The ratio of foreground color to background color is 70:100.
    PERCENT_75Specifies a 75-percent hatch. The ratio of foreground color to background color is 75:100.
    PERCENT_80Specifies a 80-percent hatch. The ratio of foreground color to background color is 80:100.
    PERCENT_90Specifies a 90-percent hatch. The ratio of foreground color to background color is 90:100.
    PLAIDSpecifies a hatch that has the appearance of a plaid material.
    SHINGLESpecifies a hatch that has the appearance of diagonally-layered shingles that slant to the right from top points to bottom points.
    SMALL_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard.
    SMALL_CONFETTISpecifies a hatch that has the appearance of confetti.
    SMALL_GRIDSpecifies horizontal and vertical lines that cross and are spaced 50 percent closer together than hatch style Cross.
    SOLID_DIAMONDSpecifies a hatch that has the appearance of a checkerboard placed diagonally.
    SPHERESpecifies a hatch that has the appearance of spheres laid adjacent to one another.
    TRELLISSpecifies a hatch that has the appearance of a trellis.
    VERTICALA pattern of vertical lines.
    WAVESpecifies horizontal lines that are composed of tildes.
    WEAVESpecifies a hatch that has the appearance of a woven material.
    WIDE_DOWNWARD_DIAGONALSpecifies diagonal lines that slant to the right from top points to bottom points, have the same spacing as hatch style ForwardDiagonal, and are triple its width, but are not antialiased.
    WIDE_UPWARD_DIAGONALSpecifies diagonal lines that slant to the left from top points to bottom points, have the same spacing as hatch style BackwardDiagonal, and are triple its width, but are not antialiased.
    ZIG_ZAGSpecifies horizontal lines that are composed of zigzags.

    Remarks:
  • To use this property, you must make sure the chart scheme (PointAttributes.setScheme(int) property) is set to either B&W or colored patterns.

  • If the chart's scheme is set to colored patterns you can set both the background and foreground color of the pattern with the setColor(java.awt.Color) and PointAttributes.setAlternateColor(java.awt.Color) properties, respectively.

  • See Also:
    PointAttributes.setScheme(int), setColor(java.awt.Color), PointAttributes.setAlternateColor(java.awt.Color), SeriesAttributes, Chart

    getPicture

    public java.awt.Image getPicture()

    Allows you to set a picture to the selected item.

    Remarks:
  • The Picture property may be used in two different ways depending on the chart's gallery and scheme:

    1. If the chart gallery is one that uses point markers, meaning you can set the shape of the marker using the MarkerShape property, then the configured image will be used as a point marker as long as the PointAttributes.setMarkerShape(int) for that point is set to MarkerShape.Picture.

    2. If the chart gallery is one that uses bars, area markers or pie slices (Bar, Area or Pie type charts), the image will be tiled in the selected series or point. However, in order for the tiled effect to be applied you must set the PointAttributes.setScheme(int) to Scheme.Pattern.

  • The Legends and DataEditor will also show the picture but with an appropriated size. Notice that if you do not set the PointAttributes.setScheme(int) to Scheme.Pattern, the configured picture will only be used with charts that have point markers.

  • When this property is set to a 3D chart, the sides of the markers (3D perspective) are painted with the configured series color.

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

  • See Also:
    setGallery(int), SeriesAttributes

    getPointLabelAlign

    public int getPointLabelAlign()

    Allows you to align point labels using the marker as a reference for the selected item.

    Values:
    LabelAlign : Define the ways of aligning point labels using the marker as a reference.
    ValueDescription
    LEFTThe label will be left aligned to the marker.
    CENTERThe label will be centered with the marker.
    RIGHTThe label will be right aligned to the marker.
    TOPThe label will be on the top edge of the marker.
    VCENTERThe label will be vertically centered.
    BOTTOMThe label will be on the bottom edge of the marker.

    Remarks:
  • The right way of setting this property is to chose a horizontal and vertical alignment styles and combined them using the Or (bitwise) operator, as follows:

    chart1.getPoint(0, 0).setPointLabelAlign(LabelAlign.LEFT | LabelAlign.TOP);

  • To use this property, you must make sure the point labels are visible (PointAttributes.setPointLabels(boolean) property).

  • Although you can set a general alignment for labels showing data values, Chart FX may overwrite such setting to avoid an undesired display of the point label. For example, if you have negative values in the chart, Chart FX will overwrite the Centered-Bottom alignment to a Centered-Top alignment so the label will show properly for points having negative values.

  • You can also control the label angle with the PointAttributes.setPointLabelAngle(short) property.

  • To set the font associated with the selected point label, please refer to the PointAttributes.setPointLabelFont(java.awt.Font) property.

  • To set the font color associated with the point labels please refer to the PointAttributes.setPointLabelColor(java.awt.Color) property.

  • See Also:
    PointAttributes.setPointLabelColor(java.awt.Color), PointAttributes.setPointLabelFont(java.awt.Font), PointAttributes.setPointLabels(boolean), PointAttributes.setPointLabelAngle(short), Chart, SeriesAttributes

    getPointLabelAngle

    public short getPointLabelAngle()

    Allows you to display the point label at the specified angle for the selected item.

    Remarks:
  • The PointAttributes.setPointLabels(boolean) must be visible in order to view the label angle configured.

  • You can also control the text alignment with the PointAttributes.setPointLabelAlign(int) property.

  • The font for a selected item may be customized using the PointAttributes.setPointLabelFont(java.awt.Font) property.

  • Use a positive number to rotate the labels from lower left to upper right. Use negative degrees to rotate text from upper left to lower right. (Range [-90,90])

  • See Also:
    PointAttributes.setPointLabelFont(java.awt.Font), PointAttributes.setPointLabelAlign(int), PointAttributes.setPointLabels(boolean), Chart, SeriesAttributes

    getPointLabelColor

    public java.awt.Color getPointLabelColor()

    Allows you to change the color of point labels for the selected item.

    Remarks:
  • The Chart.setPointLabels(boolean) property must first be set to True in order to view the color of the point label.

  • It is recommended to use light point label colors when the Chart.setInsideColor(java.awt.Color) or a series of a Bar chart is a dark color (and, vice versa).

  • The Chart.setPointLabelColor(java.awt.Color) property is a global property to change the color for all point labels.

  • You may modify the font of the selected item using the PointAttributes.setPointLabelFont(java.awt.Font) property.

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

  • See Also:
    Chart.setPointLabels(boolean), Chart.setInsideColor(java.awt.Color), Chart.setPointLabelColor(java.awt.Color), PointAttributes.setPointLabelFont(java.awt.Font), Chart

    getPointLabelFont

    public java.awt.Font getPointLabelFont()

    Allows you to change the text font attributes for the point labels of the selected item.

    Remarks:
  • When setting a font in Chart FX, you must create a new font object with the desired attributes and assign that object to the desired chart element every time you want to change the font.

  • You can set the color for a selected point label using the PointAttributes.setPointLabelColor(java.awt.Color) property.

  • The Chart.setPointLabels(boolean) property must first be set to True in order to view the font of the point label.

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

  • See Also:
    Chart.setPointLabels(boolean), PointAttributes.setPointLabelColor(java.awt.Color), Chart.setFont(java.awt.Font), Chart

    getScheme

    public int getScheme()

    Allows you to change the color scheme for a selected item.

    Values:
    Scheme : Define color scheme in the chart.
    ValueDescription
    SOLIDUse solid colors.
    BW_PATTERNUse Black & White patterns.
    PATTERNUse colored patterns.
    GRADIENTUse Gradient when painting the chart series

    Remarks:
  • The difference between patterns and hatched patterns is that hatched patterns are defined by windows and they can be resized when printing the charts. However, there are limited hatched patterns available.

  • The Chart FX patternbar uses patterns (not hatched) that are suitable for the screen but when they are printed, they are defined as 8x8 pixels and therefore they will not be visible when printing with high resolution printer (i.e. 600 dpi). The Printer.setForceColors(boolean) property in the printer object uses hatched patterns to print the charts.

  • A general rule of thumb is to use patterns for the screen and hatched patterns when printing the chart.

  • When creating gradients on point markers, the Scheme must be set to Gradient. The setColor(java.awt.Color) and PointAttributes.setAlternateColor(java.awt.Color) properties can be set to create the desired gradient colors.

  • See Also:
    PointAttributes.setAlternateColor(java.awt.Color), PointAttributes.setPattern(int), setColor(java.awt.Color), Chart.setScheme(int), Chart, SeriesAttributes

    getSeparateSlice

    public short getSeparateSlice()

    Allows you to separate a slice of a Pie or Doughnut chart for a selected item.

    Remarks:
  • Setting this property to 100 will make the vertex of the slice to be on the edge of the pie.

  • Chart FX does not provide administrative properties, such as the biggest slice in a PIE chart, so if you want to separate a particular slice based on a certain condition, you must first determine the slice to be separated based on the data contained in the chart.

  • See Also:
    Chart.setGallery(int), setGallery(int), Chart

    getSmoothFlags

    public int getSmoothFlags()

    Sets the rendering quality for the selected series and text related to this series.

    Values:
    SmoothFlags : Sets the rendering quality
    ValueDescription
    FILLSpecifies antialiased rendering inside of the chart.
    BORDERSpecifies antialiased rendering on chart borders.
    TEXTSpecifies that each character is antialiased rendering.
    NONESpecifies no antialiasing.
    TEXT_SYSTEMSpecifies to use the system settings.

    Remarks:
  • To change the chart rendering quality use directly the chart Chart.setSmoothFlags(int) property.

  • See Also:
    Chart.setSmoothFlags(int), Chart

    getTag

    public java.lang.Object getTag()

    Assign a string to any item for retrieval later.

    Remarks:
  • This string can be viewed when the mouse is placed over a point in a series using the Chart.setShowTips(boolean) property.

  • The Chart.setPointLabelMask(java.lang.String) and Chart.setTipMask(java.lang.String) properties have a format called %L to display the Tag if exists.

  • See Also:
    Chart.setShowTips(boolean), Chart.setPointLabelMask(java.lang.String), Chart.setTipMask(java.lang.String), Chart

    getTypeMask

    public int getTypeMask()

    Allows you to set additional attributes to the selected item.

    Values:
    ChartType : Define additional visual attributes in the chart and allows to turn on/off them.
    ValueDescription
    PAINT_MARKERThis constant will turn on message event for customize chart drawing process.
    COLOR_LINEThis constant specifies that the lines of a 2D Line Chart must be drawn using colors.
    SHOW_3DSee Chart3D.
    HORZSee Gallery.
    TOOLSee Toolbar.
    PALETTESee PaletteBar.
    LEGENDSee LegendBox.
    HIDE_SERIESThis constant will hide all chart series.
    EACH_BARSee MultipleColors.
    CLUSTERSee Cluster.
    SHOW_DATASee DataEditor.
    EDITORThis constant will show the Data Editor. See DataEditor.
    DLG_GRAYThis constant will cause the dialogs to be shown with a gray background, to provide support for applications that also use gray backgrounds. This keeps the graphics library consistent with the rest of the client application.
    PATTERNSee PatternBar.
    SHOW_VALUESSee PointLabels.
    POINT_LABELSThis constant will show the point markers on a Line or Spline Chart.
    MENUSee MenuBar.
    DEFAULTSee property default.
    INTERNAL_BORDERThis constant will show an internal border for supported Chart FX tools in the chart area.
    NO_BORDERSSee Border.
    PIE_VALUESThis constant specifies that the values must be painted in the pie chart (instead of painting the percentages).
    TRACK_MOUSEThis constant has to be included for those charts you want to capture mouse tracking.
    EVEN_SPACINGThis constant specifies points in the x axis will be even spaced, which means that points will be equally distanced in the x axis. When apply, this can cause a behavior in which you will see a blank gap at the right side of the chart, since the points can not be equally distance. Useful with real-time charts. (Default = Off)
    SER_LEGENDSee SerLegBox.
    GLOBALInternal use. Refers all enumerations that effect the chart globally, not by point or series.
    USER_LEGENDShows or Hides the user legend box in the chart. See UserLegendBox.

    Remarks:
  • Some of the available flags in this property are supported by individual properties of the object which will apply changes to the selected item. If you want to apply some flags to the entire chart, please refer to the chart's Chart.setTypeEx(int)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 will use the bitwise operators (And, Or, Not, Xor) provided by your development tool. Because it is a mask property, you must make sure you use these operators to turn on/off bits and avoid losing previous settings to the property.For example if you want to include the NoBorders setting, the right way of setting this property is:

    chart1.getPoint(0,0).setTypeMask(chart1.getPoint(0,0).getTypeMask() | TypeMask.NO_BORDERS);
    (RIGHT!)

    If you type the following code:

    chart1.getPoint(0,0).setTypeMask(TypeMask.NO_BORDERS);
    (WRONG!)

    You'll erase all other settings in the property causing an erratic behavior of the library and an incorrect setting of the individual properties which also control these flags.

  • See Also:
    Chart.setTypeEx(int), Chart.setChartStyle(int), PointAttributes.setPointLabels(boolean), PointAttributes.setBorder(boolean), setVisible(boolean), Chart, SeriesAttributes

    getURL

    public java.lang.String getURL()
    Deprecated. You should use SeriesAttributes.getLink().getUrl instead.

    See Also:
    getLink()

    getVolume

    public short getVolume()

    Allows you to specify a volume for a data point markers in supported galleries. By adjusting the volume, you can modify the amount of space you want between the items.

    Remarks:
  • The larger the value, the lesser the distance between the selected point and its neighbors.

  • This property has a dual functionality depending on the clustered status of the chart, as follows:

    If the chart is clustered, this property is used to specify the amount of space between the selected point and its neighbors in the z-axis (a.k.a. Gap Depth). When used in this context, this property is used for any chart type that supports clustered options (Including Multi-Type charts)

    When the chart is not clustered, this property controls the amount of space between the selected point and its neighbors in the x-axis (a.k.a. Gap Width). When used in this context, this property applies to any chart type that allows side to side positioning of the series (BAR, BUBBLE, CANDLESTICK, HI-LO-CLOSE, OPEN-HI-LOW-CLOSE and CUBES).

  • If you want to control the Volume property for all the series in the chart (i.e. apply the same volume setting to all of them) you can use the chart class Chart.setVolume(short) property.

  • See Also:
    Chart.setGallery(int), Chart.setVolume(short), setGallery(int), Chart, SeriesAttributes

    getYAxis

    public int getYAxis()

    Allows you to move (or assign) the selected data series to a different numerical axis.

    Values:
    YAxis : Defines the main or secondary Y Axis when assigning series to a selected Y axis.
    ValueDescription
    MAINMain Y axis.
    SECONDARYSecondary Y axis.

    Remarks:
  • Chart FX supports two Y axes with different and independent scales, you can use this property to associate data series with any of these axis. A typical example of a double Y axis chart is a financial (volume) chart, where the price of the stock ranges from 70-90 and the volume traded ranges from 500.000 to 2.000.000. Obviously, when you attempt to plot both series in the same chart, the scale needed in one axis to plot both series will not produce desirable results. In this case, you'll use this property to associate the stock price data series with the primary Y axis (ranging from 70-90) and the volume traded series with a secondary Y axis (ranging from 0 to 2.000.000).

  • When assigning a series to a Secondary Y axis you should make sure that you make the axis assignment before passing data. By doing this, Chart FX will calculate the Axis.setMax(double), Axis.setMin(double) and Axis.setStep(double) for the secondary Y axis automatically. If the axis assignment is done after the data has been passed, you can set the Max, Min and Step manually or call the Chart.recalcScale() method. Please keep in mind that calling the RecalcScale method is a less efficient way to create the chart.

  • Once you have set a specific data series to a chart, you can customize the axis settings using any of the properties supported by the Axis Object.

  • See Also:
    Chart.getAxis(int), Chart.getAxisX(), Chart.getAxisY(), Axis.setMax(double), Axis.setMin(double), Axis.setStep(double), Chart.recalcScale(), Axis, Chart

    isBorder

    public boolean isBorder()

    Allows you to show or hide marker borders for a selected item.

    Remarks:
  • The effect of this property on 2D line charts is slightly different, as follows:

    When set to False, the 2D line color will be equal to the item color assigned with the setColor(java.awt.Color) property. When set to True and the BorderEffect is set to BorderEffect.None, the 2D line color will be equal to the color set with the PointAttributes.setBorderColor(java.awt.Color) property.

  • To set the Border Style and Width for the Point, please refer to the PointAttributes.setLineStyle(int) and PointAttributes.setLineWidth(short) properties respectively.

  • See Also:
    PointAttributes.setBorderColor(java.awt.Color), PointAttributes.setLineStyle(int), PointAttributes.setLineWidth(short), SeriesAttributes

    isInternalBorder

    public boolean isInternalBorder()

    Gets or sets a value indicating whether a chart will have an internal border.

    Remarks:
  • This property only affects selected chart gallery types. For example, Pie, Area and Doughnut galleries will have an internal border painted between slices/sections when this property is set to true.

  • See Also:
    Chart.setGallery(int), Chart.getPoint(int, int), Chart.getSeries(int), Chart

    isPointLabels

    public boolean isPointLabels()

    Allows you to display the value via point label for a selected item.

    Remarks:
  • You can also control the text alignment and text display angle with the PointAttributes.setPointLabelAlign(int) and PointAttributes.setPointLabelAngle(short) properties, respectively.

  • You can modify the font of the selected point label using the PointAttributes.setPointLabelFont(java.awt.Font) property.

  • See Also:
    PointAttributes.setPointLabelAlign(int), PointAttributes.setPointLabelAngle(short), PointAttributes.setPointLabelFont(java.awt.Font), SeriesAttributes

    isStacked

    public boolean isStacked()

    Allows you to stack the selected series with the previous series to achieve multi-stacked charts.

    Remarks:
  • Stacked options apply only to Bar and Area charts. So before applying this property, you must make sure the previous series and the selected series are of the same type (Bar or Area).

  • You can also use the Chart.setStacked(int) property of the Chart object to assign the attribute to all series.

  • See Also:
    Chart.setStacked(int), Chart

    isVisible

    public boolean isVisible()

    Shows or hides the selected series.

    Remarks:
  • Hiding an Series will:

    - not recalculate any of the scale values for the axis.

    - not remove the data associated with it.

    - hide the legend associated with it from the Series Legend.

    - hide all the data points in the Data Editor.

  • If you hide a Series and want Chart FX to recalculate the axis scale values, you must invoke the Chart.recalcScale() method when you show and/or hide the selected Series.

  • See Also:
    Chart.recalcScale(), PointAttributes

    setAlternateColor

    public void setAlternateColor(java.awt.Color value)

    Allows you to set the alternate color for a selected item when using gradient scheme.

    Remarks:
  • This property is used in conjunction with PointAttributes.setScheme(int) property. You need to set the scheme to gradient in order to use AlternateColor property.

    chart1.setScheme(Scheme.GRADIENT);

  • To create a gradient for an item, you first need to set an initial color using the setColor(java.awt.Color) property. Then you can assign a AlternateColor to complete the gradient assignment.

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

  • See Also:
    setColor(java.awt.Color), PointAttributes.setScheme(int), SeriesAttributes

    setBorder

    public void setBorder(boolean value)

    Allows you to show or hide marker borders for a selected item.

    Remarks:
  • The effect of this property on 2D line charts is slightly different, as follows:

    When set to False, the 2D line color will be equal to the item color assigned with the setColor(java.awt.Color) property. When set to True and the BorderEffect is set to BorderEffect.None, the 2D line color will be equal to the color set with the PointAttributes.setBorderColor(java.awt.Color) property.

  • To set the Border Style and Width for the Point, please refer to the PointAttributes.setLineStyle(int) and PointAttributes.setLineWidth(short) properties respectively.

  • See Also:
    PointAttributes.setBorderColor(java.awt.Color), PointAttributes.setLineStyle(int), PointAttributes.setLineWidth(short), SeriesAttributes

    setBorderColor

    public void setBorderColor(java.awt.Color value)

    Allows you to set a border color for a selected item in the chart.

    Remarks:
  • In order to see the color set using this property, you must make sure the PointAttributes.setBorderEffect(int) is set to BorderEffect.None and make sure the border for the selected item is visible (default setting) by using the PointAttributes.setBorder(boolean) property.

  • This property applies to the selected item in the chart. If you want to apply it for all items in a chart, please refer to the Chart's Chart.setBorderColor(java.awt.Color) property.

  • To set the Border Effect, Line Style and Line Width, please refer to the PointAttributes.setBorderEffect(int), PointAttributes.setLineStyle(int) and PointAttributes.setLineWidth(short) properties respectively.

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

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setBorderEffect(int), PointAttributes.setLineStyle(int), PointAttributes.setLineWidth(short), SeriesAttributes

    setBorderEffect

    public void setBorderEffect(int value)

    Specifies the valid border effects for a selected item.

    Values:
    BorderEffect : Specify different border effects that may be applied to a object.
    ValueDescription
    NONENo border effect is applied. The border effect must be None for the BorderColor property to take effect.
    RAISEDThe border has raised inner and outer edges.
    LIGHTApply light color to the border using the series/points color.
    DARKApply dark color to the border using the series/points color.
    OPPOSITEChooses between dark and light border depending on the object color. If the color is dark Chart FX will choose a light border color. If the color is light Chart FX will choose a dark border color.
    SHADOWThe border will have shadow.

    Remarks:
  • When setting this property, make sure the border for the selected item is visible by using the PointAttributes.setBorder(boolean) property.

  • The BorderEffect property must be set to BorderEffect.None for the PointAttributes.setBorderColor(java.awt.Color) property to have any effect on the selected item border.

  • To set the Border Color, Line Style and Line Width, please refer to the PointAttributes.setBorderColor(java.awt.Color),PointAttributes.setLineStyle(int) and PointAttributes.setLineWidth(short) properties respectively.

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setBorderColor(java.awt.Color), PointAttributes.setLineStyle(int), PointAttributes.setLineWidth(short), Chart, SeriesAttributes

    setColor

    public void setColor(java.awt.Color value)

    Sets a color for the selected series.

    Remarks:
  • If no colors are specified, The default color is automatically selected by Chart FX when you create the chart, and chosen according to the current palette and its position in the series array.

  • The color property is used to set a specific color to the selected series. You can control colors of other chart elements using the PointAttributes.setBorderColor(java.awt.Color), Chart.setBackColor(java.awt.Color) and Chart.setInsideColor(java.awt.Color) properties.

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

  • See Also:
    Chart.setBackColor(java.awt.Color), PointAttributes.setBorderColor(java.awt.Color), Chart.setInsideColor(java.awt.Color), Chart, PointAttributes

    setCylSides

    public void setCylSides(short value)

    Sets the 3D shape of the selected item.

    You can create different cylindrical and conical shapes.

    Remarks:
  • This property can only be applied to BAR, CUBES or GANTT charts. When specifying a large number of sides in the base (i.e. -32 or 32) it may be a good idea to get rid off the border (Border Property), this will create a seamless color effect on the marker.

  • With this property you will set individual items to different conical or cylindrical shapes. For example, using this property you can combine Cylinders with Cones. If you want to apply the setting to the entire chart (all data series),you can use the general Chart.setCylSides(short) property.

  • Setting this property to a positive number [1,32] will create a cylindrical shape.

  • Setting this property to a negative number [-32,-1] will create a conical shape. For example if you want to convert bars into pyramids (base 3) you can set the value of this property to -3.

  • Making the Chart a 3D chart using the Chart.setChart3D(boolean) property is not required, however the 3D markers are in better context.

  • See Also:
    Chart.setGallery(int), PointAttributes.setBorder(boolean), Chart.setChart3D(boolean), Chart, SeriesAttributes

    setGallery

    public void setGallery(int value)

    Sets the chart type for a particular series. All chart types are available in both 2D and 3D modes.

    Values:
    Gallery : Defines the chart type.
    ValueDescription
    LINESLine Chart.
    BARBar Chart.
    CURVESpline Curve chart.
    SCATTERScatter or XY Plot.
    PIEPie Chart.
    AREAArea Chart.
    PARETOPareto Chart.
    STEPStep Lines Chart
    HI_LOW_CLOSEHi-Low-Close Chart.
    SURFACESurface Plot.
    RADARRadar Chart.
    CUBECubes Chart.
    DOUGHNUTDoughnut Chart.
    PYRAMIDPyramid Chart.
    BUBBLEBubble Chart.
    OPEN_HI_LOW_CLOSEOpen-Hi-Lo-Close Chart.
    CANDLESTICKCandleStick Chart.
    CONTOURContour Chart.
    CURVE_AREACurve Area Chart.
    GANTTHorizontal Bar Chart.

    Remarks:
  • Applying this property to a specific series will create a MultiType chart, where different Chart Types can be combined in the same chart. For example, if you initially created a bar chart with 3 series, you can convert the first series to a line chart as follows:

    chart1.getSeries(0).setGallery(Gallery.LINES);

    You must be careful of the chart types you select to combine as not all of them will produce desirable results. For example, combining a chart that does not have numerical axis (e.g. Pie Chart) with a chart that has a numerical axis (e.g. Line Chart) will produce a chart that can't be read by the end user.

    A rule of thumb is that you can combine axis charts with similar types and non-axis charts with similar types, as follows:

    Axis Charts:

    Lines, Bar, Curve, Scatter, Area, Step, HiLowClose, Cube, Bubble, CandleStick, CurveArea, OpenHiLowClose, Pareto.

    Non-axis charts:

    Pie, Radar, DoughNut, Pyramid

    Note: Gantt, Surface and Contour can't be combined with other chart types

  • Another important issue to keep in mind when creating MultiType charts is the number of series each chart type requires to properly plot the data. For example, an Open-Hi-Lo-Close chart requires 4 consecutive series to properly plot the data, so if you want to combine this chart type with a line chart, the series containing the data for the line chart must be either the first or the last series in the data set.

  • See Also:
    Chart.setGallery(int), Chart

    setInternalBorder

    public void setInternalBorder(boolean value)

    Gets or sets a value indicating whether a chart will have an internal border.

    Remarks:
  • This property only affects selected chart gallery types. For example, Pie, Area and Doughnut galleries will have an internal border painted between slices/sections when this property is set to true.

  • See Also:
    Chart.setGallery(int), Chart.getPoint(int, int), Chart.getSeries(int), Chart

    setLegend

    public void setLegend(java.lang.String value)

    Allows you to set a legend (categorical Axis labels) for the selected series.

    Remarks:
  • Once you have set the series legend in the chart, you can treat the legend window as an additional tool with different properties that can be accessed using the Chart.getSerLegBoxObj() property.

  • Use the Chart.setSerLegBox(boolean) property to make the series legend box visible.

  • You can also use the Chart.getSerLeg(int) property to define names for your series.

  • See Also:
    Chart.getSerLeg(int), Chart.setSerLegBox(boolean), Chart.getSerLegBoxObj(), LegendBox, Chart

    setLineEndCap

    public void setLineEndCap(int value)

    Sets an ending marker shape for lines in the borders of 3D charts.

    Values:
    LineCap : Specifies the available cap styles with which a line can end.
    ValueDescription
    ANCHOR_MASKSpecifies a mask used to check whether a line cap is an anchor cap.
    ARROW_ANCHORSpecifies an arrow-shaped anchor cap.
    CUSTOMSpecifies a custom line cap.
    DIAMOND_ANCHORSpecifies a diamond anchor cap.
    FLATSpecifies a flat line cap.
    NO_ANCHORSpecifies no anchor.
    ROUNDSpecifies a round line cap.
    ROUND_ANCHORSpecifies a round anchor cap.
    SQUARESpecifies a square line cap.
    SQUARE_ANCHORSpecifies a square anchor line cap.
    TRIANGLESpecifies a triangular line cap.

    Remarks:
  • Adjusting the line width using the PointAttributes.setLineWidth(short) property makes the border of the point or series markers set with this property more and less noticeable.

  • Set the chart to 3D mode using the Chart.setChart3D(boolean) property to see the shape created using the PointAttributes.setLineStartCap(int) and LineEndCap properties.

  • The PointAttributes.setLineStyle(int) property allows you to apply an addition style to the selected items.

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

  • See Also:
    PointAttributes.setLineStartCap(int), Chart.setChart3D(boolean), PointAttributes.setLineWidth(short), PointAttributes.setLineStyle(int), Chart

    setLineStartCap

    public void setLineStartCap(int value)

    Sets an starting marker shape for lines in the borders of 3D charts.

    Values:
    LineCap : Specifies the available cap styles with which a line can end.
    ValueDescription
    ANCHOR_MASKSpecifies a mask used to check whether a line cap is an anchor cap.
    ARROW_ANCHORSpecifies an arrow-shaped anchor cap.
    CUSTOMSpecifies a custom line cap.
    DIAMOND_ANCHORSpecifies a diamond anchor cap.
    FLATSpecifies a flat line cap.
    NO_ANCHORSpecifies no anchor.
    ROUNDSpecifies a round line cap.
    ROUND_ANCHORSpecifies a round anchor cap.
    SQUARESpecifies a square line cap.
    SQUARE_ANCHORSpecifies a square anchor line cap.
    TRIANGLESpecifies a triangular line cap.

    Remarks:
  • Adjusting the line width using the PointAttributes.setLineWidth(short) property makes the border of the point or series markers set with this property more and less noticeable.

  • Set the chart to 3D mode using the Chart.setChart3D(boolean) property to see the shape created using the LineStartCap and PointAttributes.setLineEndCap(int) properties.

  • The PointAttributes.setLineStyle(int) property allows you to apply an addition style to the selected items.

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

  • See Also:
    PointAttributes.setLineEndCap(int), Chart.setChart3D(boolean), PointAttributes.setLineWidth(short), PointAttributes.setLineStyle(int), Chart

    setLineStyle

    public void setLineStyle(int value)

    Used to set a line style to the selected item.

    Values:
    DashStyle : Specifies the style with which dashed lines are drawn.
    ValueDescription
    CUSTOMSpecifies a user-defined custom dash style.
    DASHSpecifies a line consisting of dashes.
    DASH_DOTSpecifies a line consisting of a repeating pattern of dash-dot.
    DASH_DOT_DOTSpecifies a line consisting of a repeating pattern of dash-dot-dot.
    DOTSpecifies a line consisting of dots.
    SOLIDSpecifies a solid line.

    Remarks:
  • If you're displaying a 2D Line chart, this property will set the 2D line style. For other charts, this property controls the style of the border surrounding the marker.

  • If you're using this property for a different chart type (other than a 2D Line chart) you can set the Border Color and Width, with the PointAttributes.setBorderColor(java.awt.Color) and PointAttributes.setLineWidth(short) properties respectively. However, you must make sure the Border is visible by setting the Border property to True.

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

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setLineWidth(short), PointAttributes.setBorderColor(java.awt.Color), SeriesAttributes

    setLineWidth

    public void setLineWidth(short value)

    Used to set the line weight or thickness for the selected item.

    Remarks:
  • If you're displaying a 2D Line chart, this property will set the line thickness. For other charts, this property controls the thickness of the border surrounding the marker.

  • If you're using this property for a different chart type (other than a 2D Line chart) you can set the Border Color and Style, with the PointAttributes.setBorderColor(java.awt.Color) and PointAttributes.setLineStyle(int) properties respectively. However, you must make sure the Border is visible by setting the Border property to True.

  • See Also:
    PointAttributes.setBorder(boolean), PointAttributes.setLineStyle(int), PointAttributes.setBorderColor(java.awt.Color), SeriesAttributes

    setMarkerShape

    public void setMarkerShape(int value)

    Used to specify the point type used to paint markers for the selected item.

    Values:
    MarkerShape : Defines different shapes used to paint point markers in the chart.
    ValueDescription
    NONEDo not display point markers.
    RECTDisplays a rectangle.
    CIRCLEDisplays a circle.
    TRIANGLEDisplays a triangle.
    DIAMONDDisplays a diamond.
    MARBLEDisplays a 3D marble.
    HORZ_LINEDisplays a horizontal line.
    VERT_LINEDisplays a vertical line.
    CROSSDisplays a cross.
    INVERTED_TRIANGLEDisplays a rotated triangle.
    XDisplays an X.
    MANYSelects a combination of the above.
    PICTUREDisplays a configured picture.

    Remarks:
  • Point markers will not be shown in 3D line charts.

  • This property applies only to: LINES, CURVE, SCATTER, PARETO, STEP and RADAR charts.

  • You can control the size of the points with the PointAttributes.setMarkerSize(short) property, or how frequently do they appear on the selected series by using the Chart.setMarkerStep(short) property.

  • You can set custom images as chart markers by setting this property to the 'Picture' enumeration and setting an image using the PointAttributes.setPicture(java.awt.Image) property.

  • See Also:
    PointAttributes.setMarkerSize(short), Chart.setMarkerStep(short), Chart.setPointFont(java.awt.Font), Chart.setGallery(int), Chart, SeriesAttributes

    setMarkerSize

    public void setMarkerSize(short value)

    Controls the size of the markers for the selected item.

    Remarks:
  • This property sets the radius of the marker in physical units (pixels). You must make sure the PointAttributes.setMarkerShape(int) Property is set to a valid point type (other than None), before setting this property.

  • Point markers will not be shown in 3D line charts.

  • You can control the shape (or type) of the points with the PointAttributes.setMarkerShape(int) property, or how frequently do they appear on the selected series by using the setMarkerStep(short) property.

  • See Also:
    PointAttributes.setMarkerShape(int), setMarkerStep(short), Chart.setMarkerStep(short), Chart, SeriesAttributes

    setMarkerStep

    public void setMarkerStep(short value)

    Controls how frequently point markers are shown in the selected series.

    Remarks:
  • This property is very useful when the chart contains a large number of points and the point markers disturb the chart's readability. For example, if you are showing 100 points in a line chart, the physical separation (pixels) of them is very small and probably the point markers will make the chart unreadable to the end user. In this case, you can set this property to force Chart FX to show point markers every 20 points.

  • Point markers will not be shown in 3D line charts.

  • You must make sure the PointAttributes.setMarkerShape(int) Property is set to a valid point type (other than None), before setting this property.

  • You can control the shape and Size of the point markers with the PointAttributes.setMarkerShape(int) property and PointAttributes.setMarkerSize(short) properties, respectively.

  • You can extend the point types available by setting this property to an integer representing the negative ASCII code from any font. By default, Chart FX uses the WingDings font table to handle additional point types. For changing the default font, use the Chart.setPointFont(java.awt.Font) property.

  • See Also:
    PointAttributes.setMarkerSize(short), PointAttributes.setMarkerShape(int), Chart.setPointFont(java.awt.Font), Chart

    setPattern

    public void setPattern(int value)

    Allows you to set a pattern for the selected item.

    Values:
    HatchStyle : Specifies the different hatch patterns available.
    ValueDescription
    BACKWARD_DIAGONALA pattern of lines on a diagonal from upper right to lower left.
    CROSSSpecifies horizontal and vertical lines that cross.
    DARK_DOWNWARD_DIAGONALSpecifies diagonal lines that slant to the right from top points to bottom points, are spaced 50 percent closer together than, and are twice the width of ForwardDiagonal. This hatch pattern is not antialiased.
    DARK_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal and are twice the width of HatchStyleHorizontal.
    DARK_UPWARD_DIAGONALSpecifies diagonal lines that slant to the left from top points to bottom points, are spaced 50 percent closer together than BackwardDiagonal, and are twice its width, but the lines are not antialiased.
    DARK_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical and are twice its width.
    DASHED_DOWNWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the right from top points to bottom points.
    DASHED_HORIZONTALSpecifies dashed horizontal lines.
    DASHED_UPWARD_DIAGONALSpecifies dashed diagonal lines, that slant to the left from top points to bottom points.
    DASHED_VERTICALSpecifies dashed vertical lines.
    DIAGONAL_BRICKSpecifies a hatch that has the appearance of layered bricks that slant to the left from top points to bottom points.
    DIAGONAL_CROSSSpecifies forward diagonal and backward diagonal lines that cross. The lines are antialiased.
    DIVOTSpecifies a hatch that has the appearance of divots.
    DOTTED_DIAMONDSpecifies forward diagonal and backward diagonal lines, each of which is composed of dots, that cross.
    DOTTED_GRIDSpecifies horizontal and vertical lines, each of which is composed of dots, that cross.
    FORWARD_DIAGONALA pattern of lines on a diagonal from upper left to lower right.
    HORIZONTALA pattern of horizontal lines.
    HORIZONTAL_BRICKSpecifies a hatch that has the appearance of horizontally layered bricks.
    LARGE_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard with squares that are twice the size of SmallCheckerBoard.
    LARGE_CONFETTISpecifies a hatch that has the appearance of confetti, and is composed of larger pieces than SmallConfetti.
    LARGE_GRIDSpecifies the hatch style Cross.
    LIGHT_DOWNWARD_DIAGONALSpecifies diagonal lines that slant to the right from top points to bottom points and are spaced 50 percent closer together than DownwardDiagonal, but they are not antialiased.
    LIGHT_HORIZONTALSpecifies horizontal lines that are spaced 50 percent closer together than Horizontal.
    LIGHT_UPWARD_DIAGONALSpecifies diagonal lines that slant to the left from top points to bottom points and are spaced 50 percent closer together than BackwardDiagonal, but they are not antialiased.
    LIGHT_VERTICALSpecifies vertical lines that are spaced 50 percent closer together than Vertical.
    MAXSpecifies hatch style SolidDiamond.
    MINSpecifies hatch style Horizonal.
    NARROW_HORIZONTALSpecifies horizontal lines that are spaced 75 percent closer together than hatch style Horizontal (or 25 percent closer together than LightHorizontal).
    NARROW_VERTICALSpecifies vertical lines that are spaced 75 percent closer together than hatch style Vertical (or 25 percent closer together than LightVertical).
    OUTLINED_DIAMONDSpecifies forward diagonal and backward diagonal lines that cross but are not antialiased.
    PERCENT_05Specifies a 5-percent hatch. The ratio of foreground color to background color is 5:100.
    PERCENT_10Specifies a 10-percent hatch. The ratio of foreground color to background color is 10:100.
    PERCENT_20Specifies a 20-percent hatch. The ratio of foreground color to background color is 20:100.
    PERCENT_25Specifies a 25-percent hatch. The ratio of foreground color to background color is 25:100.
    PERCENT_30Specifies a 30-percent hatch. The ratio of foreground color to background color is 30:100.
    PERCENT_40Specifies a 40-percent hatch. The ratio of foreground color to background color is 40:100.
    PERCENT_50Specifies a 50-percent hatch. The ratio of foreground color to background color is 50:100.
    PERCENT_60Specifies a 60-percent hatch. The ratio of foreground color to background color is 60:100.
    PERCENT_70Specifies a 70-percent hatch. The ratio of foreground color to background color is 70:100.
    PERCENT_75Specifies a 75-percent hatch. The ratio of foreground color to background color is 75:100.
    PERCENT_80Specifies a 80-percent hatch. The ratio of foreground color to background color is 80:100.
    PERCENT_90Specifies a 90-percent hatch. The ratio of foreground color to background color is 90:100.
    PLAIDSpecifies a hatch that has the appearance of a plaid material.
    SHINGLESpecifies a hatch that has the appearance of diagonally-layered shingles that slant to the right from top points to bottom points.
    SMALL_CHECKER_BOARDSpecifies a hatch that has the appearance of a checkerboard.
    SMALL_CONFETTISpecifies a hatch that has the appearance of confetti.
    SMALL_GRIDSpecifies horizontal and vertical lines that cross and are spaced 50 percent closer together than hatch style Cross.
    SOLID_DIAMONDSpecifies a hatch that has the appearance of a checkerboard placed diagonally.
    SPHERESpecifies a hatch that has the appearance of spheres laid adjacent to one another.
    TRELLISSpecifies a hatch that has the appearance of a trellis.
    VERTICALA pattern of vertical lines.
    WAVESpecifies horizontal lines that are composed of tildes.
    WEAVESpecifies a hatch that has the appearance of a woven material.
    WIDE_DOWNWARD_DIAGONALSpecifies diagonal lines that slant to the right from top points to bottom points, have the same spacing as hatch style ForwardDiagonal, and are triple its width, but are not antialiased.
    WIDE_UPWARD_DIAGONALSpecifies diagonal lines that slant to the left from top points to bottom points, have the same spacing as hatch style BackwardDiagonal, and are triple its width, but are not antialiased.
    ZIG_ZAGSpecifies horizontal lines that are composed of zigzags.

    Remarks:
  • To use this property, you must make sure the chart scheme (PointAttributes.setScheme(int) property) is set to either B&W or colored patterns.

  • If the chart's scheme is set to colored patterns you can set both the background and foreground color of the pattern with the setColor(java.awt.Color) and PointAttributes.setAlternateColor(java.awt.Color) properties, respectively.

  • See Also:
    PointAttributes.setScheme(int), setColor(java.awt.Color), PointAttributes.setAlternateColor(java.awt.Color), SeriesAttributes, Chart

    setPicture

    public void setPicture(java.awt.Image value)

    Allows you to set a picture to the selected item.

    Remarks:
  • The Picture property may be used in two different ways depending on the chart's gallery and scheme:

    1. If the chart gallery is one that uses point markers, meaning you can set the shape of the marker using the MarkerShape property, then the configured image will be used as a point marker as long as the PointAttributes.setMarkerShape(int) for that point is set to MarkerShape.Picture.

    2. If the chart gallery is one that uses bars, area markers or pie slices (Bar, Area or Pie type charts), the image will be tiled in the selected series or point. However, in order for the tiled effect to be applied you must set the PointAttributes.setScheme(int) to Scheme.Pattern.

  • The Legends and DataEditor will also show the picture but with an appropriated size. Notice that if you do not set the PointAttributes.setScheme(int) to Scheme.Pattern, the configured picture will only be used with charts that have point markers.

  • When this property is set to a 3D chart, the sides of the markers (3D perspective) are painted with the configured series color.

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

  • See Also:
    setGallery(int), SeriesAttributes

    setPointLabelAlign

    public void setPointLabelAlign(int value)

    Allows you to align point labels using the marker as a reference for the selected item.

    Values:
    LabelAlign : Define the ways of aligning point labels using the marker as a reference.
    ValueDescription
    LEFTThe label will be left aligned to the marker.
    CENTERThe label will be centered with the marker.
    RIGHTThe label will be right aligned to the marker.
    TOPThe label will be on the top edge of the marker.
    VCENTERThe label will be vertically centered.
    BOTTOMThe label will be on the bottom edge of the marker.

    Remarks:
  • The right way of setting this property is to chose a horizontal and vertical alignment styles and combined them using the Or (bitwise) operator, as follows:

    chart1.getPoint(0, 0).setPointLabelAlign(LabelAlign.LEFT | LabelAlign.TOP);

  • To use this property, you must make sure the point labels are visible (PointAttributes.setPointLabels(boolean) property).

  • Although you can set a general alignment for labels showing data values, Chart FX may overwrite such setting to avoid an undesired display of the point label. For example, if you have negative values in the chart, Chart FX will overwrite the Centered-Bottom alignment to a Centered-Top alignment so the label will show properly for points having negative values.

  • You can also control the label angle with the PointAttributes.setPointLabelAngle(short) property.

  • To set the font associated with the selected point label, please refer to the PointAttributes.setPointLabelFont(java.awt.Font) property.

  • To set the font color associated with the point labels please refer to the PointAttributes.setPointLabelColor(java.awt.Color) property.

  • See Also:
    PointAttributes.setPointLabelColor(java.awt.Color), PointAttributes.setPointLabelFont(java.awt.Font), PointAttributes.setPointLabels(boolean), PointAttributes.setPointLabelAngle(short), Chart, SeriesAttributes

    setPointLabelAngle

    public void setPointLabelAngle(short value)

    Allows you to display the point label at the specified angle for the selected item.

    Remarks:
  • The PointAttributes.setPointLabels(boolean) must be visible in order to view the label angle configured.

  • You can also control the text alignment with the PointAttributes.setPointLabelAlign(int) property.

  • The font for a selected item may be customized using the PointAttributes.setPointLabelFont(java.awt.Font) property.

  • Use a positive number to rotate the labels from lower left to upper right. Use negative degrees to rotate text from upper left to lower right. (Range [-90,90])

  • See Also:
    PointAttributes.setPointLabelFont(java.awt.Font), PointAttributes.setPointLabelAlign(int), PointAttributes.setPointLabels(boolean), Chart, SeriesAttributes

    setPointLabelColor

    public void setPointLabelColor(java.awt.Color value)

    Allows you to change the color of point labels for the selected item.

    Remarks:
  • The Chart.setPointLabels(boolean) property must first be set to True in order to view the color of the point label.

  • It is recommended to use light point label colors when the Chart.setInsideColor(java.awt.Color) or a series of a Bar chart is a dark color (and, vice versa).

  • The Chart.setPointLabelColor(java.awt.Color) property is a global property to change the color for all point labels.

  • You may modify the font of the selected item using the PointAttributes.setPointLabelFont(java.awt.Font) property.

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

  • See Also:
    Chart.setPointLabels(boolean), Chart.setInsideColor(java.awt.Color), Chart.setPointLabelColor(java.awt.Color), PointAttributes.setPointLabelFont(java.awt.Font), Chart

    setPointLabelFont

    public void setPointLabelFont(java.awt.Font value)

    Allows you to change the text font attributes for the point labels of the selected item.

    Remarks:
  • When setting a font in Chart FX, you must create a new font object with the desired attributes and assign that object to the desired chart element every time you want to change the font.

  • You can set the color for a selected point label using the PointAttributes.setPointLabelColor(java.awt.Color) property.

  • The Chart.setPointLabels(boolean) property must first be set to True in order to view the font of the point label.

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

  • See Also:
    Chart.setPointLabels(boolean), PointAttributes.setPointLabelColor(java.awt.Color), Chart.setFont(java.awt.Font), Chart

    setPointLabels

    public void setPointLabels(boolean value)

    Allows you to display the value via point label for a selected item.

    Remarks:
  • You can also control the text alignment and text display angle with the PointAttributes.setPointLabelAlign(int) and PointAttributes.setPointLabelAngle(short) properties, respectively.

  • You can modify the font of the selected point label using the PointAttributes.setPointLabelFont(java.awt.Font) property.

  • See Also:
    PointAttributes.setPointLabelAlign(int), PointAttributes.setPointLabelAngle(short), PointAttributes.setPointLabelFont(java.awt.Font), SeriesAttributes

    setScheme

    public void setScheme(int value)

    Allows you to change the color scheme for a selected item.

    Values:
    Scheme : Define color scheme in the chart.
    ValueDescription
    SOLIDUse solid colors.
    BW_PATTERNUse Black & White patterns.
    PATTERNUse colored patterns.
    GRADIENTUse Gradient when painting the chart series

    Remarks:
  • The difference between patterns and hatched patterns is that hatched patterns are defined by windows and they can be resized when printing the charts. However, there are limited hatched patterns available.

  • The Chart FX patternbar uses patterns (not hatched) that are suitable for the screen but when they are printed, they are defined as 8x8 pixels and therefore they will not be visible when printing with high resolution printer (i.e. 600 dpi). The Printer.setForceColors(boolean) property in the printer object uses hatched patterns to print the charts.

  • A general rule of thumb is to use patterns for the screen and hatched patterns when printing the chart.

  • When creating gradients on point markers, the Scheme must be set to Gradient. The setColor(java.awt.Color) and PointAttributes.setAlternateColor(java.awt.Color) properties can be set to create the desired gradient colors.

  • See Also:
    PointAttributes.setAlternateColor(java.awt.Color), PointAttributes.setPattern(int), setColor(java.awt.Color), Chart.setScheme(int), Chart, SeriesAttributes

    setSeparateSlice

    public void setSeparateSlice(short value)

    Allows you to separate a slice of a Pie or Doughnut chart for a selected item.

    Remarks:
  • Setting this property to 100 will make the vertex of the slice to be on the edge of the pie.

  • Chart FX does not provide administrative properties, such as the biggest slice in a PIE chart, so if you want to separate a particular slice based on a certain condition, you must first determine the slice to be separated based on the data contained in the chart.

  • See Also:
    Chart.setGallery(int), setGallery(int), Chart

    setSmoothFlags

    public void setSmoothFlags(int value)

    Sets the rendering quality for the selected series and text related to this series.

    Values:
    SmoothFlags : Sets the rendering quality
    ValueDescription
    FILLSpecifies antialiased rendering inside of the chart.
    BORDERSpecifies antialiased rendering on chart borders.
    TEXTSpecifies that each character is antialiased rendering.
    NONESpecifies no antialiasing.
    TEXT_SYSTEMSpecifies to use the system settings.

    Remarks:
  • To change the chart rendering quality use directly the chart Chart.setSmoothFlags(int) property.

  • See Also:
    Chart.setSmoothFlags(int), Chart

    setStacked

    public void setStacked(boolean value)

    Allows you to stack the selected series with the previous series to achieve multi-stacked charts.

    Remarks:
  • Stacked options apply only to Bar and Area charts. So before applying this property, you must make sure the previous series and the selected series are of the same type (Bar or Area).

  • You can also use the Chart.setStacked(int) property of the Chart object to assign the attribute to all series.

  • See Also:
    Chart.setStacked(int), Chart

    setTag

    public void setTag(java.lang.Object value)

    Assign a string to any item for retrieval later.

    Remarks:
  • This string can be viewed when the mouse is placed over a point in a series using the Chart.setShowTips(boolean) property.

  • The Chart.setPointLabelMask(java.lang.String) and Chart.setTipMask(java.lang.String) properties have a format called %L to display the Tag if exists.

  • See Also:
    Chart.setShowTips(boolean), Chart.setPointLabelMask(java.lang.String), Chart.setTipMask(java.lang.String), Chart

    setTypeMask

    public void setTypeMask(int value)

    Allows you to set additional attributes to the selected item.

    Values:
    ChartType : Define additional visual attributes in the chart and allows to turn on/off them.
    ValueDescription
    PAINT_MARKERThis constant will turn on message event for customize chart drawing process.
    COLOR_LINEThis constant specifies that the lines of a 2D Line Chart must be drawn using colors.
    SHOW_3DSee Chart3D.
    HORZSee Gallery.
    TOOLSee Toolbar.
    PALETTESee PaletteBar.
    LEGENDSee LegendBox.
    HIDE_SERIESThis constant will hide all chart series.
    EACH_BARSee MultipleColors.
    CLUSTERSee Cluster.
    SHOW_DATASee DataEditor.
    EDITORThis constant will show the Data Editor. See DataEditor.
    DLG_GRAYThis constant will cause the dialogs to be shown with a gray background, to provide support for applications that also use gray backgrounds. This keeps the graphics library consistent with the rest of the client application.
    PATTERNSee PatternBar.
    SHOW_VALUESSee PointLabels.
    POINT_LABELSThis constant will show the point markers on a Line or Spline Chart.
    MENUSee MenuBar.
    DEFAULTSee property default.
    INTERNAL_BORDERThis constant will show an internal border for supported Chart FX tools in the chart area.
    NO_BORDERSSee Border.
    PIE_VALUESThis constant specifies that the values must be painted in the pie chart (instead of painting the percentages).
    TRACK_MOUSEThis constant has to be included for those charts you want to capture mouse tracking.
    EVEN_SPACINGThis constant specifies points in the x axis will be even spaced, which means that points will be equally distanced in the x axis. When apply, this can cause a behavior in which you will see a blank gap at the right side of the chart, since the points can not be equally distance. Useful with real-time charts. (Default = Off)
    SER_LEGENDSee SerLegBox.
    GLOBALInternal use. Refers all enumerations that effect the chart globally, not by point or series.
    USER_LEGENDShows or Hides the user legend box in the chart. See UserLegendBox.

    Remarks:
  • Some of the available flags in this property are supported by individual properties of the object which will apply changes to the selected item. If you want to apply some flags to the entire chart, please refer to the chart's Chart.setTypeEx(int)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 will use the bitwise operators (And, Or, Not, Xor) provided by your development tool. Because it is a mask property, you must make sure you use these operators to turn on/off bits and avoid losing previous settings to the property.For example if you want to include the NoBorders setting, the right way of setting this property is:

    chart1.getPoint(0,0).setTypeMask(chart1.getPoint(0,0).getTypeMask() | TypeMask.NO_BORDERS);
    (RIGHT!)

    If you type the following code:

    chart1.getPoint(0,0).setTypeMask(TypeMask.NO_BORDERS);
    (WRONG!)

    You'll erase all other settings in the property causing an erratic behavior of the library and an incorrect setting of the individual properties which also control these flags.

  • See Also:
    Chart.setTypeEx(int), Chart.setChartStyle(int), PointAttributes.setPointLabels(boolean), PointAttributes.setBorder(boolean), setVisible(boolean), Chart, SeriesAttributes

    setURL

    public void setURL(java.lang.String value)
    Deprecated. You should use SeriesAttributes.getLink().setUrl instead.

    See Also:
    getLink()

    setVisible

    public void setVisible(boolean value)

    Shows or hides the selected series.

    Remarks:
  • Hiding an Series will:

    - not recalculate any of the scale values for the axis.

    - not remove the data associated with it.

    - hide the legend associated with it from the Series Legend.

    - hide all the data points in the Data Editor.

  • If you hide a Series and want Chart FX to recalculate the axis scale values, you must invoke the Chart.recalcScale() method when you show and/or hide the selected Series.

  • See Also:
    Chart.recalcScale(), PointAttributes

    setVolume

    public void setVolume(short value)

    Allows you to specify a volume for a data point markers in supported galleries. By adjusting the volume, you can modify the amount of space you want between the items.

    Remarks:
  • The larger the value, the lesser the distance between the selected point and its neighbors.

  • This property has a dual functionality depending on the clustered status of the chart, as follows:

    If the chart is clustered, this property is used to specify the amount of space between the selected point and its neighbors in the z-axis (a.k.a. Gap Depth). When used in this context, this property is used for any chart type that supports clustered options (Including Multi-Type charts)

    When the chart is not clustered, this property controls the amount of space between the selected point and its neighbors in the x-axis (a.k.a. Gap Width). When used in this context, this property applies to any chart type that allows side to side positioning of the series (BAR, BUBBLE, CANDLESTICK, HI-LO-CLOSE, OPEN-HI-LOW-CLOSE and CUBES).

  • If you want to control the Volume property for all the series in the chart (i.e. apply the same volume setting to all of them) you can use the chart class Chart.setVolume(short) property.

  • See Also:
    Chart.setGallery(int), Chart.setVolume(short), setGallery(int), Chart, SeriesAttributes

    setYAxis

    public void setYAxis(int value)

    Allows you to move (or assign) the selected data series to a different numerical axis.

    Values:
    YAxis : Defines the main or secondary Y Axis when assigning series to a selected Y axis.
    ValueDescription
    MAINMain Y axis.
    SECONDARYSecondary Y axis.

    Remarks:
  • Chart FX supports two Y axes with different and independent scales, you can use this property to associate data series with any of these axis. A typical example of a double Y axis chart is a financial (volume) chart, where the price of the stock ranges from 70-90 and the volume traded ranges from 500.000 to 2.000.000. Obviously, when you attempt to plot both series in the same chart, the scale needed in one axis to plot both series will not produce desirable results. In this case, you'll use this property to associate the stock price data series with the primary Y axis (ranging from 70-90) and the volume traded series with a secondary Y axis (ranging from 0 to 2.000.000).

  • When assigning a series to a Secondary Y axis you should make sure that you make the axis assignment before passing data. By doing this, Chart FX will calculate the Axis.setMax(double), Axis.setMin(double) and Axis.setStep(double) for the secondary Y axis automatically. If the axis assignment is done after the data has been passed, you can set the Max, Min and Step manually or call the Chart.recalcScale() method. Please keep in mind that calling the RecalcScale method is a less efficient way to create the chart.

  • Once you have set a specific data series to a chart, you can customize the axis settings using any of the properties supported by the Axis Object.

  • See Also:
    Chart.getAxis(int), Chart.getAxisX(), Chart.getAxisY(), Axis.setMax(double), Axis.setMin(double), Axis.setStep(double), Chart.recalcScale(), Axis, Chart

    http://www.softwarefx.com

    2005 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.