|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.PointAttributes
public final class PointAttributes
Provides access to the PointAttributes object.
The goal of any chart is to provide a clear visual representation of data that can be easily read and interpreted by the user. To this end, ChartFX enables you to set PointLabels to clearly mark and identify the values on the chart. This is particularly useful when there are many data points and many series, which could appear busy and difficult to decipher.
In the latest release of ChartFX (6.0 and above) we offer enhanced functionality and versatility that was not available in previous versions. You are now able to control the size, color, font etc. of every individual point label in your chart. This is extremely useful for highlighting critical points of data in a chart.
Constructor Summary | |
---|---|
PointAttributes()
|
|
PointAttributes(Chart chart)
|
Method Summary | |
---|---|
java.awt.Color |
getAlternateColor()
Gets the AlternateColor. |
java.awt.Color |
getBorderColor()
Gets the BorderColor. |
int |
getBorderEffect()
Gets the BorderEffect. |
java.awt.Color |
getColor()
Gets the Color. |
short |
getCylSides()
Gets the CylSides. |
int |
getLineEndCap()
Gets the LineEndCap. |
int |
getLineStartCap()
Gets the LineStartCap. |
int |
getLineStyle()
Gets the LineStyle. |
short |
getLineWidth()
Gets the LineWidth. |
Link |
getLink()
Gets the Link object for a selected PointAttributes item. |
int |
getMarkerShape()
Gets the MarkerShape. |
short |
getMarkerSize()
Gets the MarkerSize. |
int |
getPattern()
Gets the Pattern. |
java.awt.Image |
getPicture()
Gets the Picture. |
int |
getPointLabelAlign()
Gets the PointLabelAlign. |
short |
getPointLabelAngle()
Gets the PointLabelAngle. |
java.awt.Color |
getPointLabelColor()
Gets the PointLabelColor. |
java.awt.Font |
getPointLabelFont()
Gets the PointLabelFont. |
int |
getScheme()
Gets the Scheme. |
short |
getSeparateSlice()
Gets the SeparateSlice. |
java.lang.Object |
getTag()
Gets the Tag. |
int |
getTypeMask()
Gets the TypeMask. |
java.lang.String |
getURL()
Deprecated. You should use PointAttributes.getLink().getUrl instead. |
short |
getVolume()
Gets the Volume. |
boolean |
isBorder()
Gets the Border. |
boolean |
isInternalBorder()
Gets the InternalBorder. |
boolean |
isPointLabels()
Gets the PointLabels. |
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)
Allows you to set a color for the selected item. |
void |
setCylSides(short value)
Sets the 3D shape of the selected item. |
void |
setInternalBorder(boolean value)
Gets or sets a value indicating whether a chart will have an internal border. |
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 |
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 |
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 PointAttributes.getLink().setUrl instead. |
void |
setVolume(short value)
Allows you to specify a volume for a data point markers in supported galleries. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PointAttributes()
public PointAttributes(Chart chart)
Method Detail |
---|
public java.awt.Color getAlternateColor()
Gets the AlternateColor. For more detail see setAlternateColor(java.awt.Color)
.
public java.awt.Color getBorderColor()
Gets the BorderColor. For more detail see setBorderColor(java.awt.Color)
.
public int getBorderEffect()
Gets the BorderEffect. For more detail see setBorderEffect(int)
.
public java.awt.Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
public short getCylSides()
Gets the CylSides. For more detail see setCylSides(short)
.
public int getLineEndCap()
Gets the LineEndCap. For more detail see setLineEndCap(int)
.
public int getLineStartCap()
Gets the LineStartCap. For more detail see setLineStartCap(int)
.
public int getLineStyle()
Gets the LineStyle. For more detail see setLineStyle(int)
.
public short getLineWidth()
Gets the LineWidth. For more detail see setLineWidth(short)
.
public Link getLink()
Gets the Link object for a selected PointAttributes item.
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.
Link.setUrl(java.lang.String)
,
Link.setTarget(java.lang.String)
,
Link
public int getMarkerShape()
Gets the MarkerShape. For more detail see setMarkerShape(int)
.
public short getMarkerSize()
Gets the MarkerSize. For more detail see setMarkerSize(short)
.
public int getPattern()
Gets the Pattern. For more detail see setPattern(int)
.
public java.awt.Image getPicture()
Gets the Picture. For more detail see setPicture(java.awt.Image)
.
public int getPointLabelAlign()
Gets the PointLabelAlign. For more detail see setPointLabelAlign(int)
.
public short getPointLabelAngle()
Gets the PointLabelAngle. For more detail see setPointLabelAngle(short)
.
public java.awt.Color getPointLabelColor()
Gets the PointLabelColor. For more detail see setPointLabelColor(java.awt.Color)
.
public java.awt.Font getPointLabelFont()
Gets the PointLabelFont. For more detail see setPointLabelFont(java.awt.Font)
.
public int getScheme()
Gets the Scheme. For more detail see setScheme(int)
.
public short getSeparateSlice()
Gets the SeparateSlice. For more detail see setSeparateSlice(short)
.
public java.lang.Object getTag()
Gets the Tag. For more detail see setTag(java.lang.Object)
.
public int getTypeMask()
Gets the TypeMask. For more detail see setTypeMask(int)
.
public java.lang.String getURL()
PointAttributes.getLink().getUrl
instead.
getLink()
public short getVolume()
Gets the Volume. For more detail see setVolume(short)
.
public boolean isBorder()
Gets the Border. For more detail see setBorder(boolean)
.
public boolean isInternalBorder()
Gets the InternalBorder. For more detail see setInternalBorder(boolean)
.
public boolean isPointLabels()
Gets the PointLabels. For more detail see setPointLabels(boolean)
.
public void setAlternateColor(java.awt.Color value)
Allows you to set the alternate color for a selected item when using gradient scheme.
This property is used in conjunction with 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.
setColor(java.awt.Color)
,
setScheme(int)
,
SeriesAttributes
public void setBorder(boolean value)
Allows you to show or hide marker borders for a selected item.
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 setBorderColor(java.awt.Color)
property.
To set the Border Style and Width for the Point, please refer to the setLineStyle(int)
and setLineWidth(short)
properties respectively.
setBorderColor(java.awt.Color)
,
setLineStyle(int)
,
setLineWidth(short)
,
SeriesAttributes
public void setBorderColor(java.awt.Color value)
Allows you to set a border color for a selected item in the chart.
In order to see the color set using this property, you must make sure the setBorderEffect(int)
is set to BorderEffect.None and make sure the border for the selected item is visible (default setting) by using the 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
Class
ChartCore.setBorderColor(java.awt.Color)
property.
To set the Border Effect, Line Style and Line Width, please refer to the setBorderEffect(int)
, setLineStyle(int)
and setLineWidth(short)
properties respectively.
For more information regarding the Color type, please refer to the Java API Documentation.
setBorder(boolean)
,
setBorderEffect(int)
,
setLineStyle(int)
,
setLineWidth(short)
,
SeriesAttributes
public void setBorderEffect(int value)
Specifies the valid border effects for a selected item.
BorderEffect :
Specify different border effects that may be applied to a object.Value | Description |
---|---|
BorderEffect.NONE | No border effect is applied. The border effect must be None for the BorderColor property to take effect. |
BorderEffect.RAISED | The border has raised inner and outer edges. |
BorderEffect.LIGHT | Apply light color to the border using the series/points color. |
BorderEffect.DARK | Apply dark color to the border using the series/points color. |
BorderEffect.OPPOSITE | Chooses 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. |
BorderEffect.SHADOW | The border will have shadow. |
When setting this property, make sure the border for the selected item is visible by using the setBorder(boolean)
property.
The BorderEffect property must be set to BorderEffect.None for the 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 setBorderColor(java.awt.Color)
,setLineStyle(int)
and setLineWidth(short)
properties respectively.
setBorder(boolean)
,
setBorderColor(java.awt.Color)
,
setLineStyle(int)
,
setLineWidth(short)
,
Chart
,
SeriesAttributes
public void setColor(java.awt.Color value)
Allows you to set a color for the selected item.
The color property is used to set a specific color to the selected item. You can also control the border colors using the setBorderColor(java.awt.Color)
property, however, the setBorderEffect(int)
must be set to BorderEffect.None for the assigned border color to be seen.
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 point array. When you change the chosen palette, using the ChartCore.setPalette(java.lang.String)
property, the point color is automatically changed to reflect the palette chosen.
Normally a series displays the same color on all data points. However, you can force Chart FX to use different colors for each data point by setting the ChartCore.setMultipleColors(boolean)
property to True. However, if you want to color each data point this property is not useful as it assigns colors to the entire series.
This property can be used in conjunction with the ChartCore.setScheme(int)
and setAlternateColor(java.awt.Color)
properties to set gradients to selected items.
For more information regarding the Color type, please refer to the Java API Documentation.
setAlternateColor(java.awt.Color)
,
setBorderColor(java.awt.Color)
,
ChartCore.setPalette(java.lang.String)
,
setBorder(boolean)
,
ChartCore.setMultipleColors(boolean)
,
ChartCore.setScheme(int)
,
Chart
,
SeriesAttributes
public void setCylSides(short value)
Sets the 3D shape of the selected item.
You can create different cylindrical and conical shapes.
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 ChartCore.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 ChartCore.setChart3D(boolean)
property is not required, however the 3D markers are in better context.
ChartCore.setGallery(int)
,
setBorder(boolean)
,
ChartCore.setChart3D(boolean)
,
Chart
,
SeriesAttributes
public void setInternalBorder(boolean value)
Gets or sets a value indicating whether a chart will have an internal border.
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.
ChartCore.setGallery(int)
,
ChartCore.getPoint(int, int)
,
ChartCore.getSeries(int)
,
Chart
public void setLineEndCap(int value)
Sets an ending marker shape for lines in the borders of 3D charts.
LineCap :
Specifies the available cap styles with which a line can end.Value | Description |
---|---|
LineCap.ANCHOR_MASK | Specifies a mask used to check whether a line cap is an anchor cap. |
LineCap.ARROW_ANCHOR | Specifies an arrow-shaped anchor cap. |
LineCap.CUSTOM | Specifies a custom line cap. |
LineCap.DIAMOND_ANCHOR | Specifies a diamond anchor cap. |
LineCap.FLAT | Specifies a flat line cap. |
LineCap.NO_ANCHOR | Specifies no anchor. |
LineCap.ROUND | Specifies a round line cap. |
LineCap.ROUND_ANCHOR | Specifies a round anchor cap. |
LineCap.SQUARE | Specifies a square line cap. |
LineCap.SQUARE_ANCHOR | Specifies a square anchor line cap. |
LineCap.TRIANGLE | Specifies a triangular line cap. |
Adjusting the line width using the 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 ChartCore.setChart3D(boolean)
property to see the shape created using the setLineStartCap(int)
and LineEndCap properties.
The 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.
setLineStartCap(int)
,
ChartCore.setChart3D(boolean)
,
setLineWidth(short)
,
setLineStyle(int)
,
Chart
public void setLineStartCap(int value)
Sets an starting marker shape for lines in the borders of 3D charts.
LineCap :
Specifies the available cap styles with which a line can end.Value | Description |
---|---|
LineCap.ANCHOR_MASK | Specifies a mask used to check whether a line cap is an anchor cap. |
LineCap.ARROW_ANCHOR | Specifies an arrow-shaped anchor cap. |
LineCap.CUSTOM | Specifies a custom line cap. |
LineCap.DIAMOND_ANCHOR | Specifies a diamond anchor cap. |
LineCap.FLAT | Specifies a flat line cap. |
LineCap.NO_ANCHOR | Specifies no anchor. |
LineCap.ROUND | Specifies a round line cap. |
LineCap.ROUND_ANCHOR | Specifies a round anchor cap. |
LineCap.SQUARE | Specifies a square line cap. |
LineCap.SQUARE_ANCHOR | Specifies a square anchor line cap. |
LineCap.TRIANGLE | Specifies a triangular line cap. |
Adjusting the line width using the 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 ChartCore.setChart3D(boolean)
property to see the shape created using the LineStartCap and setLineEndCap(int)
properties.
The 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.
setLineEndCap(int)
,
ChartCore.setChart3D(boolean)
,
setLineWidth(short)
,
setLineStyle(int)
,
Chart
public void setLineStyle(int value)
Used to set a line style to the selected item.
DashStyle :
Specifies the style with which dashed lines are drawn.Value | Description |
---|---|
DashStyle.CUSTOM | Specifies a user-defined custom dash style. |
DashStyle.DASH | Specifies a line consisting of dashes. |
DashStyle.DASH_DOT | Specifies a line consisting of a repeating pattern of dash-dot. |
DashStyle.DASH_DOT_DOT | Specifies a line consisting of a repeating pattern of dash-dot-dot. |
DashStyle.DOT | Specifies a line consisting of dots. |
DashStyle.SOLID | Specifies a solid line. |
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 setBorderColor(java.awt.Color)
and 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.
setBorder(boolean)
,
setLineWidth(short)
,
setBorderColor(java.awt.Color)
,
SeriesAttributes
public void setLineWidth(short value)
Used to set the line weight or thickness for the selected item.
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 setBorderColor(java.awt.Color)
and setLineStyle(int)
properties respectively. However, you must make sure the Border is visible by setting the Border property to True.
setBorder(boolean)
,
setLineStyle(int)
,
setBorderColor(java.awt.Color)
,
SeriesAttributes
public void setMarkerShape(int value)
Used to specify the point type used to paint markers for the selected item.
MarkerShape :
Defines different shapes used to paint point markers in the chart. Value | Description |
---|---|
MarkerShape.NONE | Do not display point markers. |
MarkerShape.RECT | Displays a rectangle. |
MarkerShape.CIRCLE | Displays a circle. |
MarkerShape.TRIANGLE | Displays a triangle. |
MarkerShape.DIAMOND | Displays a diamond. |
MarkerShape.MARBLE | Displays a 3D marble. |
MarkerShape.HORZ_LINE | Displays a horizontal line. |
MarkerShape.VERT_LINE | Displays a vertical line. |
MarkerShape.CROSS | Displays a cross. |
MarkerShape.INVERTED_TRIANGLE | Displays a rotated triangle. |
MarkerShape.X | Displays an X. |
MarkerShape.MANY | Selects a combination of the above. |
MarkerShape.PICTURE | Displays a configured picture. |
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 setMarkerSize(short)
property, or how frequently do they appear on the selected series by using the ChartCore.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 setPicture(java.awt.Image)
property.
setMarkerSize(short)
,
ChartCore.setMarkerStep(short)
,
ChartCore.setPointFont(java.awt.Font)
,
ChartCore.setGallery(int)
,
Chart
,
SeriesAttributes
public void setMarkerSize(short value)
Controls the size of the markers for the selected item.
This property sets the radius of the marker in physical units (pixels). You must make sure the 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 setMarkerShape(int)
property, or how frequently do they appear on the selected series by using the SeriesAttributes.setMarkerStep(short)
property.
setMarkerShape(int)
,
SeriesAttributes.setMarkerStep(short)
,
ChartCore.setMarkerStep(short)
,
Chart
,
SeriesAttributes
public void setPattern(int value)
Allows you to set a pattern for the selected item.
HatchStyle :
Specifies the different hatch patterns available.Value | Description |
---|---|
HatchStyle.BACKWARD_DIAGONAL | A pattern of lines on a diagonal from upper right to lower left. |
HatchStyle.CROSS | Specifies horizontal and vertical lines that cross. |
HatchStyle.DARK_DOWNWARD_DIAGONAL | Specifies 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. |
HatchStyle.DARK_HORIZONTAL | Specifies horizontal lines that are spaced 50 percent closer together than Horizontal and are twice the width of HatchStyleHorizontal. |
HatchStyle.DARK_UPWARD_DIAGONAL | Specifies 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. |
HatchStyle.DARK_VERTICAL | Specifies vertical lines that are spaced 50 percent closer together than Vertical and are twice its width. |
HatchStyle.DASHED_DOWNWARD_DIAGONAL | Specifies dashed diagonal lines, that slant to the right from top points to bottom points. |
HatchStyle.DASHED_HORIZONTAL | Specifies dashed horizontal lines. |
HatchStyle.DASHED_UPWARD_DIAGONAL | Specifies dashed diagonal lines, that slant to the left from top points to bottom points. |
HatchStyle.DASHED_VERTICAL | Specifies dashed vertical lines. |
HatchStyle.DIAGONAL_BRICK | Specifies a hatch that has the appearance of layered bricks that slant to the left from top points to bottom points. |
HatchStyle.DIAGONAL_CROSS | Specifies forward diagonal and backward diagonal lines that cross. The lines are antialiased. |
HatchStyle.DIVOT | Specifies a hatch that has the appearance of divots. |
HatchStyle.DOTTED_DIAMOND | Specifies forward diagonal and backward diagonal lines, each of which is composed of dots, that cross. |
HatchStyle.DOTTED_GRID | Specifies horizontal and vertical lines, each of which is composed of dots, that cross. |
HatchStyle.FORWARD_DIAGONAL | A pattern of lines on a diagonal from upper left to lower right. |
HatchStyle.HORIZONTAL | A pattern of horizontal lines. |
HatchStyle.HORIZONTAL_BRICK | Specifies a hatch that has the appearance of horizontally layered bricks. |
HatchStyle.LARGE_CHECKER_BOARD | Specifies a hatch that has the appearance of a checkerboard with squares that are twice the size of SmallCheckerBoard. |
HatchStyle.LARGE_CONFETTI | Specifies a hatch that has the appearance of confetti, and is composed of larger pieces than SmallConfetti. |
HatchStyle.LARGE_GRID | Specifies the hatch style Cross. |
HatchStyle.LIGHT_DOWNWARD_DIAGONAL | Specifies 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. |
HatchStyle.LIGHT_HORIZONTAL | Specifies horizontal lines that are spaced 50 percent closer together than Horizontal. |
HatchStyle.LIGHT_UPWARD_DIAGONAL | Specifies 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. |
HatchStyle.LIGHT_VERTICAL | Specifies vertical lines that are spaced 50 percent closer together than Vertical. |
HatchStyle.MAX | Specifies hatch style SolidDiamond. |
HatchStyle.MIN | Specifies hatch style Horizonal. |
HatchStyle.NARROW_HORIZONTAL | Specifies horizontal lines that are spaced 75 percent closer together than hatch style Horizontal (or 25 percent closer together than LightHorizontal). |
HatchStyle.NARROW_VERTICAL | Specifies vertical lines that are spaced 75 percent closer together than hatch style Vertical (or 25 percent closer together than LightVertical). |
HatchStyle.OUTLINED_DIAMOND | Specifies forward diagonal and backward diagonal lines that cross but are not antialiased. |
HatchStyle.PERCENT_05 | Specifies a 5-percent hatch. The ratio of foreground color to background color is 5:100. |
HatchStyle.PERCENT_10 | Specifies a 10-percent hatch. The ratio of foreground color to background color is 10:100. |
HatchStyle.PERCENT_20 | Specifies a 20-percent hatch. The ratio of foreground color to background color is 20:100. |
HatchStyle.PERCENT_25 | Specifies a 25-percent hatch. The ratio of foreground color to background color is 25:100. |
HatchStyle.PERCENT_30 | Specifies a 30-percent hatch. The ratio of foreground color to background color is 30:100. |
HatchStyle.PERCENT_40 | Specifies a 40-percent hatch. The ratio of foreground color to background color is 40:100. |
HatchStyle.PERCENT_50 | Specifies a 50-percent hatch. The ratio of foreground color to background color is 50:100. |
HatchStyle.PERCENT_60 | Specifies a 60-percent hatch. The ratio of foreground color to background color is 60:100. |
HatchStyle.PERCENT_70 | Specifies a 70-percent hatch. The ratio of foreground color to background color is 70:100. |
HatchStyle.PERCENT_75 | Specifies a 75-percent hatch. The ratio of foreground color to background color is 75:100. |
HatchStyle.PERCENT_80 | Specifies a 80-percent hatch. The ratio of foreground color to background color is 80:100. |
HatchStyle.PERCENT_90 | Specifies a 90-percent hatch. The ratio of foreground color to background color is 90:100. |
HatchStyle.PLAID | Specifies a hatch that has the appearance of a plaid material. |
HatchStyle.SHINGLE | Specifies a hatch that has the appearance of diagonally-layered shingles that slant to the right from top points to bottom points. |
HatchStyle.SMALL_CHECKER_BOARD | Specifies a hatch that has the appearance of a checkerboard. |
HatchStyle.SMALL_CONFETTI | Specifies a hatch that has the appearance of confetti. |
HatchStyle.SMALL_GRID | Specifies horizontal and vertical lines that cross and are spaced 50 percent closer together than hatch style Cross. |
HatchStyle.SOLID_DIAMOND | Specifies a hatch that has the appearance of a checkerboard placed diagonally. |
HatchStyle.SPHERE | Specifies a hatch that has the appearance of spheres laid adjacent to one another. |
HatchStyle.TRELLIS | Specifies a hatch that has the appearance of a trellis. |
HatchStyle.VERTICAL | A pattern of vertical lines. |
HatchStyle.WAVE | Specifies horizontal lines that are composed of tildes. |
HatchStyle.WEAVE | Specifies a hatch that has the appearance of a woven material. |
HatchStyle.WIDE_DOWNWARD_DIAGONAL | Specifies 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. |
HatchStyle.WIDE_UPWARD_DIAGONAL | Specifies 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. |
HatchStyle.ZIG_ZAG | Specifies horizontal lines that are composed of zigzags. |
To use this property, you must make sure the chart scheme (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 setAlternateColor(java.awt.Color)
properties, respectively.
setScheme(int)
,
setColor(java.awt.Color)
,
setAlternateColor(java.awt.Color)
,
SeriesAttributes
,
Chart
public void setPicture(java.awt.Image value)
Allows you to set a picture to the selected item.
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 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 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 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.
SeriesAttributes.setGallery(int)
,
SeriesAttributes
public void setPointLabelAlign(int value)
Allows you to align point labels using the marker as a reference for the selected item.
LabelAlign :
Define the ways of aligning point labels using the marker as a reference. Value | Description |
---|---|
LabelAlign.LEFT | The label will be left aligned to the marker. |
LabelAlign.CENTER | The label will be centered with the marker. |
LabelAlign.RIGHT | The label will be right aligned to the marker. |
LabelAlign.TOP | The label will be on the top edge of the marker. |
LabelAlign.VCENTER | The label will be vertically centered. |
LabelAlign.BOTTOM | The label will be on the bottom edge of the marker. |
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 (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 setPointLabelAngle(short)
property.
To set the font associated with the selected point label, please refer to the setPointLabelFont(java.awt.Font)
property.
To set the font color associated with the point labels please refer to the setPointLabelColor(java.awt.Color)
property.
setPointLabelColor(java.awt.Color)
,
setPointLabelFont(java.awt.Font)
,
setPointLabels(boolean)
,
setPointLabelAngle(short)
,
Chart
,
SeriesAttributes
public void setPointLabelAngle(short value)
Allows you to display the point label at the specified angle for the selected item.
The setPointLabels(boolean)
must be visible in order to view the label angle configured.
You can also control the text alignment with the setPointLabelAlign(int)
property.
The font for a selected item may be customized using the 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])
setPointLabelFont(java.awt.Font)
,
setPointLabelAlign(int)
,
setPointLabels(boolean)
,
Chart
,
SeriesAttributes
public void setPointLabelColor(java.awt.Color value)
Allows you to change the color of point labels for the selected item.
The ChartCore.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 ChartCore.setInsideColor(java.awt.Color)
or a series of a Bar chart is a dark color (and, vice versa).
The ChartCore.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 setPointLabelFont(java.awt.Font)
property.
For more information regarding the Color type, please refer to the Java API Documentation.
ChartCore.setPointLabels(boolean)
,
ChartCore.setInsideColor(java.awt.Color)
,
ChartCore.setPointLabelColor(java.awt.Color)
,
setPointLabelFont(java.awt.Font)
,
Chart
public void setPointLabelFont(java.awt.Font value)
Allows you to change the text font attributes for the point labels of the selected item.
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 setPointLabelColor(java.awt.Color)
property.
The ChartCore.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.
ChartCore.setPointLabels(boolean)
,
setPointLabelColor(java.awt.Color)
,
Chart.setFont(java.awt.Font)
,
Chart
public void setPointLabels(boolean value)
Allows you to display the value via point label for a selected item.
You can also control the text alignment and text display angle with the setPointLabelAlign(int)
and setPointLabelAngle(short)
properties, respectively.
You can modify the font of the selected point label using the setPointLabelFont(java.awt.Font)
property.
setPointLabelAlign(int)
,
setPointLabelAngle(short)
,
setPointLabelFont(java.awt.Font)
,
SeriesAttributes
public void setScheme(int value)
Allows you to change the color scheme for a selected item.
Scheme :
Define color scheme in the chart. Value | Description |
---|---|
Scheme.SOLID | Use solid colors. |
Scheme.BW_PATTERN | Use Black & White patterns. |
Scheme.PATTERN | Use colored patterns. |
Scheme.GRADIENT | Use Gradient when painting the chart series |
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 setAlternateColor(java.awt.Color)
properties can be set to create the desired gradient colors.
setAlternateColor(java.awt.Color)
,
setPattern(int)
,
setColor(java.awt.Color)
,
ChartCore.setScheme(int)
,
Chart
,
SeriesAttributes
public void setSeparateSlice(short value)
Allows you to separate a slice of a Pie or Doughnut chart for a selected item.
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.
ChartCore.setGallery(int)
,
SeriesAttributes.setGallery(int)
,
Chart
public void setTag(java.lang.Object value)
Assign a string to any item for retrieval later.
This string can be viewed when the mouse is placed over a point in a series using the ChartCore.setShowTips(boolean)
property.
The ChartCore.setPointLabelMask(java.lang.String)
and ChartCore.setTipMask(java.lang.String)
properties have a format called %L to display the Tag if exists.
ChartCore.setShowTips(boolean)
,
ChartCore.setPointLabelMask(java.lang.String)
,
ChartCore.setTipMask(java.lang.String)
,
Chart
public void setTypeMask(int value)
Allows you to set additional attributes to the selected item.
ChartType :
Define additional visual attributes in the chart and allows to turn on/off them. Value | Description |
---|---|
ChartType.PAINT_MARKER | This constant will turn on message event for customize chart drawing process. |
ChartType.COLOR_LINE | This constant specifies that the lines of a 2D Line Chart must be drawn using colors. |
ChartType.SHOW_3D | See Chart3D. |
ChartType.HORZ | See Gallery. |
ChartType.TOOL | See Toolbar. |
ChartType.PALETTE | See PaletteBar. |
ChartType.LEGEND | See LegendBox. |
ChartType.HIDE_SERIES | This constant will hide all chart series. |
ChartType.EACH_BAR | See MultipleColors. |
ChartType.CLUSTER | See Cluster. |
ChartType.SHOW_DATA | See DataEditor. |
ChartType.EDITOR | This constant will show the Data Editor. See DataEditor. |
ChartType.DLG_GRAY | This 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. |
ChartType.PATTERN | See PatternBar. |
ChartType.SHOW_VALUES | See PointLabels. |
ChartType.POINT_LABELS | This constant will show the point markers on a Line or Spline Chart. |
ChartType.MENU | See MenuBar. |
ChartType.DEFAULT | See property default. |
ChartType.INTERNAL_BORDER | This constant will show an internal border for supported Chart FX tools in the chart area. |
ChartType.NO_BORDERS | See Border. |
ChartType.PIE_VALUES | This constant specifies that the values must be painted in the pie chart (instead of painting the percentages). |
ChartType.TRACK_MOUSE | This constant has to be included for those charts you want to capture mouse tracking. |
ChartType.EVEN_SPACING | This 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) |
ChartType.SER_LEGEND | See SerLegBox. |
ChartType.GLOBAL | Internal use. Refers all enumerations that effect the chart globally, not by point or series. |
ChartType.USER_LEGEND | Shows or Hides the user legend box in the chart. See UserLegendBox. |
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 ChartCore.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.
ChartCore.setTypeEx(int)
,
ChartCore.setChartStyle(int)
,
setPointLabels(boolean)
,
setBorder(boolean)
,
SeriesAttributes.setVisible(boolean)
,
Chart
,
SeriesAttributes
public void setURL(java.lang.String value)
PointAttributes.getLink().setUrl
instead.
getLink()
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.
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 ChartCore.setVolume(short)
property.
ChartCore.setGallery(int)
,
ChartCore.setVolume(short)
,
SeriesAttributes.setGallery(int)
,
Chart
,
SeriesAttributes
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |