public final class GlobalAttributes extends SeriesAttributes
Provides access to the GlobalAttributes object.
The GlobalAttributes allows customization of visual attributes that apply to all the SeriesAttributes and PointAttributes in a Chart.
Using the GlobalAttributes members, you can set setGallery type, setColor, etc.
GlobalAttibuttes are accessed through the setAllSeries method of the Chart.
SeriesAttributes.SeriesBindings| Constructor and Description |
|---|
GlobalAttributes() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
getAlternateColor()
Gets or sets the Alternate Color for a all the Series.
|
AxisX |
getAxisX()
Assigns properties specifically to the primary X axis.
|
AxisY |
getAxisY()
Assigns properties specifically to the Y axis.
|
java.awt.Color |
getColor()
Gets or sets the color for all series.
|
Gallery |
getGallery()
Gets and sets the chart type for all Series.
|
AxisX.AxisBindings |
getLabelBindings()
Gets the LabelBindings object for all the series
|
com.softwarefx.server.Link |
getLink()
Gets the Link object for the chart.
|
int |
getOpacity()
Gets or Set a numeric value representing the opacity level for all the series
|
Pane |
getPane()
Gets or sets the Pane which will be used by the series by default.
|
HatchStyle |
getPattern()
Gets or sets the Pattern for all the series in a chart.
|
PointLabelOrganizer |
getPointLabelOrganizer()
Gets a PointLabelOrganizer object for point label customization.
|
Stacked |
getStacked()
Gets or sets the Stacked style in the chart.
|
boolean |
isHorizontal()
Gets or sets a value specifying to transpose X and Y axes in a chart.
|
boolean |
isMultipleColors()
Gets and sets the Multiple colors to allow for independently colored data points.
|
boolean |
isVisible()
Shows or hides all the Series.
|
void |
resetFlags()
Set the property Flags to its default value.
|
void |
resetHorizontal()
Set the property Horizontal to its default value.
|
void |
resetMultipleColors()
Set the property MultipleColors to its default value.
|
void |
resetOpacity()
Set the property Opacity to its default value.
|
void |
resetStacked()
Set the property Stacked to its default value.
|
void |
setAlternateColor(java.awt.Color value)
Gets or sets the Alternate Color for a all the Series.
|
void |
setAxisX(AxisX value)
Assigns properties specifically to the primary X axis.
|
void |
setAxisY(AxisY value)
Assigns properties specifically to the Y axis.
|
void |
setColor(java.awt.Color value)
Gets or sets the color for all series.
|
void |
setGallery(Gallery value)
Gets and Sets the chart type for all Series.
|
void |
setHorizontal(boolean value)
Gets or sets a value specifying to transpose X and Y axes in a chart.
|
void |
setMultipleColors(boolean value)
Gets and Sets the Multiple colors to allow for independently colored data points.
|
void |
setOpacity(int value)
Set a numeric value representing the opacity level for all the series
|
void |
setPane(Pane value)
Gets or sets the Pane which will be used by the series by default.
|
void |
setPattern(HatchStyle value)
Gets or sets the Pattern for all the series in a chart.
|
void |
setStacked(Stacked value)
Gets or sets the Stacked style in the chart.
|
void |
setVisible(boolean value)
Shows or hides all the Series.
|
bringToFront, drawMarker, getBindings, getDataMax, getDataMaxDateTime, getDataMaxDouble, getDataMaxTimeSpan, getDataMin, getDataMinDateTime, getDataMinDouble, getDataMinTimeSpan, getMarkerFont, getMarkerStep, getOriginalPosition, getStudy, isStacked, resetOriginalPosition, sendToBack, setMarkerFont, setMarkerStep, setOriginalPosition, setStackedgetBarShape, getBorder, getEffects, getFillMode, getLine, getMarkerShape, getMarkerShapeCharacter, getMarkerSize, getMarkerStyle, getMarkerTemplate, getMarkerWidth, getPicture, getPointLabels, getSeparateSlice, getTag, getText, getVolume, setBarShape, setFillMode, setMarkerShape, setMarkerShapeCharacter, setMarkerSize, setMarkerStyle, setMarkerTemplate, setMarkerWidth, setPicture, setSeparateSlice, setTag, setText, setVolumepublic java.awt.Color getAlternateColor()
chart1.getAllSeries().setFillMode(FillMode.GRADIENT); chart1.getAllSeries().setColor(new java.awt.Color(255,0,0,255)); chart1.getAllSeries().setAlternateColor(new java.awt.Color(255,228,196,255));
getAlternateColor in class PointAttributespublic void setAlternateColor(java.awt.Color value)
chart1.getAllSeries().setFillMode(FillMode.GRADIENT); chart1.getAllSeries().setColor(new java.awt.Color(255,0,0,255)); chart1.getAllSeries().setAlternateColor(new java.awt.Color(255,228,196,255));
setAlternateColor in class PointAttributesvalue - public AxisX getAxisX()
Assigns properties specifically to the primary X axis.
setAxisX method allows developers to assign attributes directly to the X axis object, use the setAxisY method for the primary Y axis.Axis method is used to reference axes other than the primary X and Y.setMajor and setMinor methods, you can customize grid line attributes using the Linemembers.isVisible method is false:PopulateProductSales(chart1);
chart1.getAxisX().setVisible(false);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
public static void PopulateProductSales(Chart chart1) {
ProductSales[] data = new ProductSales[]{
new ProductSales("Jan", 12560, 23400, 34500),
new ProductSales("Feb", 13400, 21000, 38900),
new ProductSales("Mar", 16700, 17000, 42100),
new ProductSales("Apr", 12000, 19020, 43800),
new ProductSales("May", 15800, 26500, 37540),
new ProductSales("Jun", 9800, 27800, 32580),
new ProductSales("Jul", 17800, 29820, 34000),
new ProductSales("Aug", 19800, 17800, 38000),
new ProductSales("Sep", 23200, 32000, 41300),
new ProductSales("Oct", 16700, 26500, 46590),
new ProductSales("Nov", 11800, 23000, 48700),
new ProductSales("Dec", 13400, 15400, 49100)
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class ProductSales {
public ProductSales(String month, double white, double red, double sparkling) {
this.setMonth(month);
this.setWhite(white);
this.setRed(red);
this.setSparkling(sparkling);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private double privateWhite;
public final double getWhite() {
return privateWhite;
}
public final void setWhite(double value) {
privateWhite = value;
}
private double privateRed;
public final double getRed() {
return privateRed;
}
public final void setRed(double value) {
privateRed = value;
}
private double privateSparkling;
public final double getSparkling() {
return privateSparkling;
}
public final void setSparkling(double value) {
privateSparkling = value;
}
}
This sample shows how to access and modify the Step method:
PopulateNewConstructions(chart1);
chart1.getTitles().add(new TitleDockable("New Constructions in US Market"));
chart1.getAxisX().getScale().setStep(((DataUnit)SfxNET.System.TimeSpan.FromDays(30.0)));
chart1.getLegendBox().setDock(DockArea.BOTTOM);
public static void PopulateNewConstructions(Chart chart1) {
NewConstructions[] data = new NewConstructions[] {
new NewConstructions(new java.util.GregorianCalendar(2012, 7, 1).getTime(), 88, 116, 351, 186 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 8, 1).getTime(), 75, 128, 376, 170 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 9, 1).getTime(), 79, 147, 424, 204 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 10, 1).getTime(), 75, 151, 425, 213 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 11, 1).getTime(), 68, 154, 449, 171 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 12, 1).getTime(), 115, 190, 465, 213 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 1, 1).getTime(), 87, 95, 483, 233 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 2, 1).getTime(), 106, 135, 505, 223 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 3, 1).getTime(), 94, 140, 554, 217 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 4, 1).getTime(), 79, 154, 412, 207 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 5, 1).getTime(), 101, 135, 482, 201 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 6, 1).getTime(), 82, 126, 431, 207 )
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class NewConstructions {
public NewConstructions(java.util.Date date, double northeast, double midwest, double south, double west) {
this.setDate(date);
this.setNortheast(northeast);
this.setMidwest(midwest);
this.setSouth(south);
this.setWest(west);
}
private java.util.Date privateDate = new java.util.Date(0);
public final java.util.Date getDate() {
return privateDate;
}
public final void setDate(java.util.Date value) {
privateDate = value;
}
private double privateNortheast;
public final double getNortheast() {
return privateNortheast;
}
public final void setNortheast(double value) {
privateNortheast = value;
}
private double privateMidwest;
public final double getMidwest() {
return privateMidwest;
}
public final void setMidwest(double value) {
privateMidwest = value;
}
private double privateSouth;
public final double getSouth() {
return privateSouth;
}
public final void setSouth(double value) {
privateSouth = value;
}
private double privateWest;
public final double getWest() {
return privateWest;
}
public final void setWest(double value) {
privateWest = value;
}
}
getAxisX in class SeriesAttributespublic void setAxisX(AxisX value)
Assigns properties specifically to the primary X axis.
setAxisX method allows developers to assign attributes directly to the X axis object, use the setAxisY method for the primary Y axis.Axis method is used to reference axes other than the primary X and Y.setMajor and setMinor methods, you can customize grid line attributes using the Linemembers.isVisible method is false:PopulateProductSales(chart1);
chart1.getAxisX().setVisible(false);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
public static void PopulateProductSales(Chart chart1) {
ProductSales[] data = new ProductSales[]{
new ProductSales("Jan", 12560, 23400, 34500),
new ProductSales("Feb", 13400, 21000, 38900),
new ProductSales("Mar", 16700, 17000, 42100),
new ProductSales("Apr", 12000, 19020, 43800),
new ProductSales("May", 15800, 26500, 37540),
new ProductSales("Jun", 9800, 27800, 32580),
new ProductSales("Jul", 17800, 29820, 34000),
new ProductSales("Aug", 19800, 17800, 38000),
new ProductSales("Sep", 23200, 32000, 41300),
new ProductSales("Oct", 16700, 26500, 46590),
new ProductSales("Nov", 11800, 23000, 48700),
new ProductSales("Dec", 13400, 15400, 49100)
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class ProductSales {
public ProductSales(String month, double white, double red, double sparkling) {
this.setMonth(month);
this.setWhite(white);
this.setRed(red);
this.setSparkling(sparkling);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private double privateWhite;
public final double getWhite() {
return privateWhite;
}
public final void setWhite(double value) {
privateWhite = value;
}
private double privateRed;
public final double getRed() {
return privateRed;
}
public final void setRed(double value) {
privateRed = value;
}
private double privateSparkling;
public final double getSparkling() {
return privateSparkling;
}
public final void setSparkling(double value) {
privateSparkling = value;
}
}
This sample shows how to access and modify the Step method:
PopulateNewConstructions(chart1);
chart1.getTitles().add(new TitleDockable("New Constructions in US Market"));
chart1.getAxisX().getScale().setStep(((DataUnit)SfxNET.System.TimeSpan.FromDays(30.0)));
chart1.getLegendBox().setDock(DockArea.BOTTOM);
public static void PopulateNewConstructions(Chart chart1) {
NewConstructions[] data = new NewConstructions[] {
new NewConstructions(new java.util.GregorianCalendar(2012, 7, 1).getTime(), 88, 116, 351, 186 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 8, 1).getTime(), 75, 128, 376, 170 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 9, 1).getTime(), 79, 147, 424, 204 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 10, 1).getTime(), 75, 151, 425, 213 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 11, 1).getTime(), 68, 154, 449, 171 ),
new NewConstructions(new java.util.GregorianCalendar(2012, 12, 1).getTime(), 115, 190, 465, 213 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 1, 1).getTime(), 87, 95, 483, 233 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 2, 1).getTime(), 106, 135, 505, 223 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 3, 1).getTime(), 94, 140, 554, 217 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 4, 1).getTime(), 79, 154, 412, 207 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 5, 1).getTime(), 101, 135, 482, 201 ),
new NewConstructions(new java.util.GregorianCalendar(2013, 6, 1).getTime(), 82, 126, 431, 207 )
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class NewConstructions {
public NewConstructions(java.util.Date date, double northeast, double midwest, double south, double west) {
this.setDate(date);
this.setNortheast(northeast);
this.setMidwest(midwest);
this.setSouth(south);
this.setWest(west);
}
private java.util.Date privateDate = new java.util.Date(0);
public final java.util.Date getDate() {
return privateDate;
}
public final void setDate(java.util.Date value) {
privateDate = value;
}
private double privateNortheast;
public final double getNortheast() {
return privateNortheast;
}
public final void setNortheast(double value) {
privateNortheast = value;
}
private double privateMidwest;
public final double getMidwest() {
return privateMidwest;
}
public final void setMidwest(double value) {
privateMidwest = value;
}
private double privateSouth;
public final double getSouth() {
return privateSouth;
}
public final void setSouth(double value) {
privateSouth = value;
}
private double privateWest;
public final double getWest() {
return privateWest;
}
public final void setWest(double value) {
privateWest = value;
}
}
setAxisX in class SeriesAttributesvalue - public AxisY getAxisY()
Assigns properties specifically to the Y axis.
setAxisY method allows developers to assign attributes directly to the Y axis object, use the setAxisX method for the primary X axis.Axis method is used to reference axes other than the primary X and Y.setMajor and setMinor methods, you can customize grid line attributes using the Linemembers.PopulateProductSales(chart1);
chart1.getAxisY().getLabelsFormat().setDecimals(2);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
public static void PopulateProductSales(Chart chart1) {
ProductSales[] data = new ProductSales[]{
new ProductSales("Jan", 12560, 23400, 34500),
new ProductSales("Feb", 13400, 21000, 38900),
new ProductSales("Mar", 16700, 17000, 42100),
new ProductSales("Apr", 12000, 19020, 43800),
new ProductSales("May", 15800, 26500, 37540),
new ProductSales("Jun", 9800, 27800, 32580),
new ProductSales("Jul", 17800, 29820, 34000),
new ProductSales("Aug", 19800, 17800, 38000),
new ProductSales("Sep", 23200, 32000, 41300),
new ProductSales("Oct", 16700, 26500, 46590),
new ProductSales("Nov", 11800, 23000, 48700),
new ProductSales("Dec", 13400, 15400, 49100)
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class ProductSales {
public ProductSales(String month, double white, double red, double sparkling) {
this.setMonth(month);
this.setWhite(white);
this.setRed(red);
this.setSparkling(sparkling);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private double privateWhite;
public final double getWhite() {
return privateWhite;
}
public final void setWhite(double value) {
privateWhite = value;
}
private double privateRed;
public final double getRed() {
return privateRed;
}
public final void setRed(double value) {
privateRed = value;
}
private double privateSparkling;
public final double getSparkling() {
return privateSparkling;
}
public final void setSparkling(double value) {
privateSparkling = value;
}
}
The following sample shows how the Y axis labels are not displayed when the isVisible method is false:
PopulateCarProduction(chart1);
chart1.getAxisY().setVisible(false);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
public static void PopulateCarProduction(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class CarProduction {
private CarProduction(String month, int sedan, int coupe, int SUV) {
this.setMonth(month);
this.setSedan(sedan);
this.setCoupe(coupe);
this.setSUV(SUV);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private int privateSedan;
public final int getSedan() {
return privateSedan;
}
public final void setSedan(int value) {
privateSedan = value;
}
private int privateCoupe;
public final int getCoupe() {
return privateCoupe;
}
public final void setCoupe(int value) {
privateCoupe = value;
}
private int privateSUV;
public final int getSUV() {
return privateSUV;
}
public final void setSUV(int value) {
privateSUV = value;
}
}
getAxisY in class SeriesAttributespublic void setAxisY(AxisY value)
Assigns properties specifically to the Y axis.
setAxisY method allows developers to assign attributes directly to the Y axis object, use the setAxisX method for the primary X axis.Axis method is used to reference axes other than the primary X and Y.setMajor and setMinor methods, you can customize grid line attributes using the Linemembers.PopulateProductSales(chart1);
chart1.getAxisY().getLabelsFormat().setDecimals(2);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
public static void PopulateProductSales(Chart chart1) {
ProductSales[] data = new ProductSales[]{
new ProductSales("Jan", 12560, 23400, 34500),
new ProductSales("Feb", 13400, 21000, 38900),
new ProductSales("Mar", 16700, 17000, 42100),
new ProductSales("Apr", 12000, 19020, 43800),
new ProductSales("May", 15800, 26500, 37540),
new ProductSales("Jun", 9800, 27800, 32580),
new ProductSales("Jul", 17800, 29820, 34000),
new ProductSales("Aug", 19800, 17800, 38000),
new ProductSales("Sep", 23200, 32000, 41300),
new ProductSales("Oct", 16700, 26500, 46590),
new ProductSales("Nov", 11800, 23000, 48700),
new ProductSales("Dec", 13400, 15400, 49100)
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class ProductSales {
public ProductSales(String month, double white, double red, double sparkling) {
this.setMonth(month);
this.setWhite(white);
this.setRed(red);
this.setSparkling(sparkling);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private double privateWhite;
public final double getWhite() {
return privateWhite;
}
public final void setWhite(double value) {
privateWhite = value;
}
private double privateRed;
public final double getRed() {
return privateRed;
}
public final void setRed(double value) {
privateRed = value;
}
private double privateSparkling;
public final double getSparkling() {
return privateSparkling;
}
public final void setSparkling(double value) {
privateSparkling = value;
}
}
The following sample shows how the Y axis labels are not displayed when the isVisible method is false:
PopulateCarProduction(chart1);
chart1.getAxisY().setVisible(false);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
public static void PopulateCarProduction(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class CarProduction {
private CarProduction(String month, int sedan, int coupe, int SUV) {
this.setMonth(month);
this.setSedan(sedan);
this.setCoupe(coupe);
this.setSUV(SUV);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private int privateSedan;
public final int getSedan() {
return privateSedan;
}
public final void setSedan(int value) {
privateSedan = value;
}
private int privateCoupe;
public final int getCoupe() {
return privateCoupe;
}
public final void setCoupe(int value) {
privateCoupe = value;
}
private int privateSUV;
public final int getSUV() {
return privateSUV;
}
public final void setSUV(int value) {
privateSUV = value;
}
}
setAxisY in class SeriesAttributesvalue - public java.awt.Color getColor()
Gets or sets the color for all series.
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 setColor method is used to set a specific color to all series. You can control colors of other chart elements using methods such as setForeColor, setBackColor and setPlotAreaColor.
Named color are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").
For more information regarding the Color type, please refer to the Documentation.
This method applies to all series. You can then override this value by setting the same method for a specific series.
Change the color for all series to red:
chart1.getAllSeries().setColor(new java.awt.Color(255,0,0,255));
getColor in class SeriesAttributespublic void setColor(java.awt.Color value)
Gets or sets the color for all series.
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 setColor method is used to set a specific color to all series. You can control colors of other chart elements using methods such as setForeColor, setBackColor and setPlotAreaColor.
Named color are supported (e.g. Red), to use Hex notation you have to use quotes (e.g. "#FF00FF").
For more information regarding the Color type, please refer to the Documentation.
This method applies to all series. You can then override this value by setting the same method for a specific series.
Change the color for all series to red:
chart1.getAllSeries().setColor(new java.awt.Color(255,0,0,255));
setColor in class SeriesAttributesvalue - public Gallery getGallery()
Gets and sets the chart type for all Series.
When you set the gallery with this method it applies to all the series in the chart. If you want to create a Multitype (or combination chart) please refer to the Series object Gallery method.
When you set the gallery with this method it applies to all the series in the chart. If you want to create a Multitype (or combination chart) please refer to the Series object setGallery method.
When selecting a Gallery for charts, keep in mind the number of data series which will be included in the chart. Pie, Pyramid and Doughnut chart types can only display one series per chart. If you have multiple data series, you may want to select a Gallery type that supports one that one series.
Creating a gallery object using the setGalleryAttributes method allows you to assign additional attributes to selected gallery types.
This method applies to all series. You can then override this value by setting the same method for a specific series.
To display an AREA chart:
chart1.getAllSeries().setGallery(Gallery.AREA);
getGallery in class SeriesAttributespublic void setGallery(Gallery value)
Gets and Sets the chart type for all Series.
When you set the gallery with this method it applies to all the series in the chart. If you want to create a Multitype (or combination chart) please refer to the Series object Gallery method.
When you set the gallery with this method it applies to all the series in the chart. If you want to create a Multitype (or combination chart) please refer to the Series object setGallery method.
When selecting a Gallery for charts, keep in mind the number of data series which will be included in the chart. Pie, Pyramid and Doughnut chart types can only display one series per chart. If you have multiple data series, you may want to select a Gallery type that supports one that one series.
Creating a gallery object using the setGalleryAttributes method allows you to assign additional attributes to selected gallery types.
This method applies to all series. You can then override this value by setting the same method for a specific series.
To display an AREA chart:
chart1.getAllSeries().setGallery(Gallery.AREA);
setGallery in class SeriesAttributesvalue - public boolean isHorizontal()
chart1.getAllSeries().setHorizontal(true);
resetHorizontalpublic void setHorizontal(boolean value)
chart1.getAllSeries().setHorizontal(true);
value - resetHorizontalpublic AxisX.AxisBindings getLabelBindings()
AxisX.AxisBindings Axbinding; Axbinding = new AxisX.AxisBindings(); Axbinding = chart1.getAllSeries().getLabelBindings();
public com.softwarefx.server.Link getLink()
SoftwareFX.WebForms.Link link1; link1 = chart1.getAllSeries().getLink();
getLink in class PointAttributespublic boolean isMultipleColors()
Gets and sets the Multiple colors to allow for independently colored data points.
PopulateSouthAmericaPopulation(chart1);
chart1.getAllSeries().setMultipleColors(true);
chart1.setGallery(Gallery.BAR);
chart1.getLegendBox().setVisible(false);
chart1.getTitles().add(new TitleDockable("South American Countries Population"));
chart1.getAxisY().setScaleUnit(1000000);
chart1.getAxisY().getTitle().setText("(in Millions)");
public static void PopulateSouthAmericaPopulation(Chart chart1) {
SouthAmericaPopulation[] data = new SouthAmericaPopulation[]{
new SouthAmericaPopulation("Brazil", 201033000),
new SouthAmericaPopulation("Colombia", 47130000),
new SouthAmericaPopulation("Argentina", 41350000),
new SouthAmericaPopulation("Peru", 30476000),
new SouthAmericaPopulation("Venezuela", 29760000),
new SouthAmericaPopulation("Chile", 16841000),
new SouthAmericaPopulation("Ecuador", 15779000),
new SouthAmericaPopulation("Bolivia", 10517000)
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class SouthAmericaPopulation {
public SouthAmericaPopulation(String country, double population) {
this.setCountry(country);
this.setPopulation(population);
}
private String privateCountry;
public final String getCountry() {
return privateCountry;
}
public final void setCountry(String value) {
privateCountry = value;
}
private double privatePopulation;
public final double getPopulation() {
return privatePopulation;
}
public final void setPopulation(double value) {
privatePopulation = value;
}
}
public static class Countries {
public Countries(String country, double lei, double gdppc, java.awt.Image flag) {
this.setCountry(country);
this.setLEI(lei);
this.setGDPPC(gdppc);
this.setFlag(flag);
}
private String privateCountry;
public final String getCountry() {
return privateCountry;
}
public final void setCountry(String value) {
privateCountry = value;
}
private double privateLEI;
public final double getLEI() {
return privateLEI;
}
public final void setLEI(double value) {
privateLEI = value;
}
private double privateGDPPC;
public final double getGDPPC() {
return privateGDPPC;
}
public final void setGDPPC(double value) {
privateGDPPC = value;
}
private java.awt.Image privateFlag;
public final java.awt.Image getFlag() {
return privateFlag;
}
public final void setFlag(java.awt.Image value) {
privateFlag = value;
}
}
resetMultipleColorspublic void setMultipleColors(boolean value)
Gets and Sets the Multiple colors to allow for independently colored data points.
PopulateSouthAmericaPopulation(chart1);
chart1.getAllSeries().setMultipleColors(true);
chart1.setGallery(Gallery.BAR);
chart1.getLegendBox().setVisible(false);
chart1.getTitles().add(new TitleDockable("South American Countries Population"));
chart1.getAxisY().setScaleUnit(1000000);
chart1.getAxisY().getTitle().setText("(in Millions)");
public static void PopulateSouthAmericaPopulation(Chart chart1) {
SouthAmericaPopulation[] data = new SouthAmericaPopulation[]{
new SouthAmericaPopulation("Brazil", 201033000),
new SouthAmericaPopulation("Colombia", 47130000),
new SouthAmericaPopulation("Argentina", 41350000),
new SouthAmericaPopulation("Peru", 30476000),
new SouthAmericaPopulation("Venezuela", 29760000),
new SouthAmericaPopulation("Chile", 16841000),
new SouthAmericaPopulation("Ecuador", 15779000),
new SouthAmericaPopulation("Bolivia", 10517000)
};
ObjectProvider objProvider = new ObjectProvider(data);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class SouthAmericaPopulation {
public SouthAmericaPopulation(String country, double population) {
this.setCountry(country);
this.setPopulation(population);
}
private String privateCountry;
public final String getCountry() {
return privateCountry;
}
public final void setCountry(String value) {
privateCountry = value;
}
private double privatePopulation;
public final double getPopulation() {
return privatePopulation;
}
public final void setPopulation(double value) {
privatePopulation = value;
}
}
public static class Countries {
public Countries(String country, double lei, double gdppc, java.awt.Image flag) {
this.setCountry(country);
this.setLEI(lei);
this.setGDPPC(gdppc);
this.setFlag(flag);
}
private String privateCountry;
public final String getCountry() {
return privateCountry;
}
public final void setCountry(String value) {
privateCountry = value;
}
private double privateLEI;
public final double getLEI() {
return privateLEI;
}
public final void setLEI(double value) {
privateLEI = value;
}
private double privateGDPPC;
public final double getGDPPC() {
return privateGDPPC;
}
public final void setGDPPC(double value) {
privateGDPPC = value;
}
private java.awt.Image privateFlag;
public final java.awt.Image getFlag() {
return privateFlag;
}
public final void setFlag(java.awt.Image value) {
privateFlag = value;
}
}
value - resetMultipleColorspublic int getOpacity()
chart1.getAllSeries().setOpacity(125);
resetOpacitypublic void setOpacity(int value)
chart1.getAllSeries().setOpacity(125);
value - resetOpacitypublic Pane getPane()
Gets or sets the Pane which will be used by the series by default.
The setMainPane method of the Chart class is a shortcut to this method.
To set the setBackColor method of the setMainPane:
chart1.getAllSeries().getPane().setBackColor(new java.awt.Color(224,255,255,255));
getPane in class SeriesAttributespublic void setPane(Pane value)
Gets or sets the Pane which will be used by the series by default.
To set the setBackColor method of the setMainPane:
chart1.getAllSeries().getPane().setBackColor(new java.awt.Color(224,255,255,255));
setPane in class SeriesAttributesvalue - public HatchStyle getPattern()
chart1.getAllSeries().setFillMode(FillMode.PATTERN); chart1.getAllSeries().setPattern(HatchStyle.CROSS);
getPattern in class PointAttributespublic void setPattern(HatchStyle value)
chart1.getAllSeries().setFillMode(FillMode.PATTERN); chart1.getAllSeries().setPattern(HatchStyle.CROSS);
setPattern in class PointAttributesvalue - public PointLabelOrganizer getPointLabelOrganizer()
PointLabelOrganizer pntLblOrganizer; pntLblOrganizer = chart1.getAllSeries().getPointLabelOrganizer();
public Stacked getStacked()
Gets or sets the Stacked style in the chart.
isStacked method in the series object.PopulateCarProduction(chart1);
chart1.setGallery(Gallery.BAR);
chart1.getAllSeries().setStacked(Stacked.STACKED_100);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
public static void PopulateCarProduction(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class CarProduction {
private CarProduction(String month, int sedan, int coupe, int SUV) {
this.setMonth(month);
this.setSedan(sedan);
this.setCoupe(coupe);
this.setSUV(SUV);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private int privateSedan;
public final int getSedan() {
return privateSedan;
}
public final void setSedan(int value) {
privateSedan = value;
}
private int privateCoupe;
public final int getCoupe() {
return privateCoupe;
}
public final void setCoupe(int value) {
privateCoupe = value;
}
private int privateSUV;
public final int getSUV() {
return privateSUV;
}
public final void setSUV(int value) {
privateSUV = value;
}
}
resetStackedpublic void setStacked(Stacked value)
Gets or sets the Stacked style in the chart.
isStacked method in the series object.PopulateCarProduction(chart1);
chart1.setGallery(Gallery.BAR);
chart1.getAllSeries().setStacked(Stacked.STACKED_100);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
public static void PopulateCarProduction(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class CarProduction {
private CarProduction(String month, int sedan, int coupe, int SUV) {
this.setMonth(month);
this.setSedan(sedan);
this.setCoupe(coupe);
this.setSUV(SUV);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private int privateSedan;
public final int getSedan() {
return privateSedan;
}
public final void setSedan(int value) {
privateSedan = value;
}
private int privateCoupe;
public final int getCoupe() {
return privateCoupe;
}
public final void setCoupe(int value) {
privateCoupe = value;
}
private int privateSUV;
public final int getSUV() {
return privateSUV;
}
public final void setSUV(int value) {
privateSUV = value;
}
}
value - resetStackedpublic boolean isVisible()
chart1.getAllSeries().setVisible(false);
isVisible in class SeriesAttributespublic void setVisible(boolean value)
chart1.getAllSeries().setVisible(false);
setVisible in class SeriesAttributesvalue - public void resetFlags()
public void resetHorizontal()
isHorizontalpublic void resetMultipleColors()
isMultipleColorspublic void resetOpacity()
setOpacitypublic void resetStacked()
setStacked2014 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.