public final class Bar extends java.lang.Object implements IExtension, IGallery
Provides access to the Bar gallery object.
Bar charts are the most common type of business chart and are especially useful for comparative analysis. You can use a bar chart to illustrate comparisons among individual items. Bar charts are also useful for comparing classes or groups of data. In bar charts, a class or group can have a single category (single series) of data, or they can be broken down further into multiple categories (multiple series) for greater depth of analysis.
The methods of the Bar
class allow you to customize the visual attributes of a Bar chart. In order to make the supported members available, you must first set the gallery of the chart to Bar, and cast the setGalleryAttributes
method of the Chart to the Bar
class:
chart1.setGallery(Gallery.BAR); Bar bar; bar = ((Bar)chart1.getGalleryAttributes());
The cast will fail if the gallery is not set to Bar.
Once you have done this, using the newly created object you can assign these special attributes for the Bar gallery type in your chart.
PopulateCarProduction(chart1);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
chart1.setGallery(Gallery.BAR);
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; } }
Constructor and Description |
---|
Bar()
Constructs a newly allocated Bar object
|
Bar(VectorBarTemplate template)
Constructs a newly allocated Bar object
|
Modifier and Type | Method and Description |
---|---|
short |
getIntraSeriesGap()
Allows you to set the separation of the bars on a same point, on a multi-series chart.
|
VectorBarValue |
getTemplate()
Allows you to set the template that the bar chart will use.
|
java.lang.String |
getTemplateString()
Allows you to set the template that the bar chart will use.
|
VectorBarTemplate |
getTemplateVectorBarTemplate()
Allows you to set the template that the bar chart will use.
|
boolean |
isOverlap()
Allows you to draw all series over of the last one of the collection.
|
boolean |
isShowMarkers()
Instruct the chart to draw Markers on each bar.
|
void |
resetIntraSeriesGap()
Set the property IntraSeriesGap to its default value.
|
void |
resetOverlap()
Set the property Overlap to its default value.
|
void |
resetShowMarkers()
Set the property ShowMarkers to its default value.
|
void |
setIntraSeriesGap(short value)
Allows you to set the separation of the bars on a same point, on a multi-series chart.
|
void |
setOverlap(boolean value)
Allows you to draw all series over of the last one of the collection.
|
void |
setShowMarkers(boolean value)
Instruct the chart to draw Markers on each bar.
|
void |
setTemplate(java.lang.String value)
Allows you to set the template that the bar chart will use.
|
void |
setTemplate(VectorBarTemplate value)
Allows you to set the template that the bar chart will use.
|
void |
setTemplate(VectorBarValue value)
Allows you to set the template that the bar chart will use.
|
public Bar()
public Bar(VectorBarTemplate template)
template
- public short getIntraSeriesGap()
Allows you to set the separation of the bars on a same point, on a multi-series chart.
The minimum separation is 0, meaning that all bars are stick side-by-side.
The greater the separation, the bars will become thinner.
If the chart is too narrow, or if the chart has many points and/or series, the effect this method would give will be diminished.
Below, a chart will 3 series and 3 visible points, with IntraSeriesGap set to 0:
PopulateProductSales(chart1);
chart1.setGallery(Gallery.BAR);
Bar myBar;
myBar = ((Bar)chart1.getGalleryAttributes());
myBar.setIntraSeriesGap((short) 0);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
chart1.getAxisY().setStep(5000);
chart1.getAxisX().zoom(0, 3);
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; } }
Below, the same chart with IntraSeriesGap set to 10:
PopulateProductSales(chart1);
chart1.setGallery(Gallery.BAR);
Bar myBar;
myBar = ((Bar)chart1.getGalleryAttributes());
myBar.setIntraSeriesGap((short) 10);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
chart1.getAxisY().setStep(5000);
chart1.getAxisX().zoom(0, 3);
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; } }
public void setIntraSeriesGap(short value)
Allows you to set the separation of the bars on a same point, on a multi-series chart.
The minimum separation is 0, meaning that all bars are stick side-by-side.
The greater the separation, the bars will become thinner.
If the chart is too narrow, or if the chart has many points and/or series, the effect this method would give will be diminished.
Below, a chart will 3 series and 3 visible points, with IntraSeriesGap set to 0:
PopulateProductSales(chart1);
chart1.setGallery(Gallery.BAR);
Bar myBar;
myBar = ((Bar)chart1.getGalleryAttributes());
myBar.setIntraSeriesGap((short) 0);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
chart1.getAxisY().setStep(5000);
chart1.getAxisX().zoom(0, 3);
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; } }
Below, the same chart with IntraSeriesGap set to 10:
PopulateProductSales(chart1);
chart1.setGallery(Gallery.BAR);
Bar myBar;
myBar = ((Bar)chart1.getGalleryAttributes());
myBar.setIntraSeriesGap((short) 10);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
chart1.getAxisY().setStep(5000);
chart1.getAxisX().zoom(0, 3);
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; } }
value
- public boolean isOverlap()
Allows you to draw all series over of the last one of the collection.
To achieve the desired behavior, all series must have a different Volume size.
The last series in the collection must have the greatest Volume value.
Values must ascend according to the position of the series in the collection. For example, if your data has 3 series, the values should be as follows:
chart1.Series[0].Volume < chart1.Series[1].Volume < chart1.Series[2].Volume
Below, a chart with the isOverlap
method set to true:
PopulateProductSales(chart1);
chart1.setGallery(Gallery.BAR);
Bar myBar;
myBar = ((Bar)chart1.getGalleryAttributes());
chart1.getSeries().get(0).setVolume((short)30);
chart1.getSeries().get(1).setVolume((short)50);
chart1.getSeries().get(2).setVolume((short)80);
myBar.setOverlap(true);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
chart1.getAxisY().setStep(5000);
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; } }
public void setOverlap(boolean value)
Allows you to draw all series over of the last one of the collection.
To achieve the desired behavior, all series must have a different Volume size.
The last series in the collection must have the greatest Volume value.
Values must ascend according to the position of the series in the collection. For example, if your data has 3 series, the values should be as follows:
chart1.Series[0].Volume < chart1.Series[1].Volume < chart1.Series[2].Volume
Below, a chart with the isOverlap
method set to true:
PopulateProductSales(chart1);
chart1.setGallery(Gallery.BAR);
Bar myBar;
myBar = ((Bar)chart1.getGalleryAttributes());
chart1.getSeries().get(0).setVolume((short)30);
chart1.getSeries().get(1).setVolume((short)50);
chart1.getSeries().get(2).setVolume((short)80);
myBar.setOverlap(true);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
chart1.getAxisY().setStep(5000);
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; } }
value
- public boolean isShowMarkers()
Instruct the chart to draw Markers on each bar.
When setting this method to true, the Chart will display point markers on each bar.
Below, a bar chart with Markers on and PointLabels:
PopulateCarProduction_Sedan(chart1);
chart1.setGallery(Gallery.BAR);
Bar bar;
bar = ((Bar)chart1.getGalleryAttributes());
bar.setShowMarkers(true);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
chart1.getLegendBox().setVisible(false);
chart1.getAllSeries().getPointLabels().setVisible(true);
public static void PopulateCarProduction_Sedan(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); // Since not all the fields in the DataSource are required, we must specify the number // of series that will be contained in the chart and perform the corresponding bindings chart1.getData().setSeries(1); NumericDataField numericFieldSedan = new NumericDataField(); numericFieldSedan.setDataPath("Sedan"); chart1.getDataSourceSettings().getDataFields().add(numericFieldSedan); chart1.getSeries().get(0).getBindings().setY(numericFieldSedan); StringDataField stringField = new StringDataField(); stringField.setDataPath("Month"); chart1.getDataSourceSettings().getDataFields().add(stringField); chart1.getAxisX().getBindings().setLabel(stringField); }
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; } }
resetShowMarkers
public void setShowMarkers(boolean value)
Instruct the chart to draw Markers on each bar.
When setting this method to true, the Chart will display point markers on each bar.
Below, a bar chart with Markers on and PointLabels:
PopulateCarProduction_Sedan(chart1);
chart1.setGallery(Gallery.BAR);
Bar bar;
bar = ((Bar)chart1.getGalleryAttributes());
bar.setShowMarkers(true);
chart1.getTitles().add(new TitleDockable("Vehicles Production by Type"));
chart1.getLegendBox().setVisible(false);
chart1.getAllSeries().getPointLabels().setVisible(true);
public static void PopulateCarProduction_Sedan(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); // Since not all the fields in the DataSource are required, we must specify the number // of series that will be contained in the chart and perform the corresponding bindings chart1.getData().setSeries(1); NumericDataField numericFieldSedan = new NumericDataField(); numericFieldSedan.setDataPath("Sedan"); chart1.getDataSourceSettings().getDataFields().add(numericFieldSedan); chart1.getSeries().get(0).getBindings().setY(numericFieldSedan); StringDataField stringField = new StringDataField(); stringField.setDataPath("Month"); chart1.getDataSourceSettings().getDataFields().add(stringField); chart1.getAxisX().getBindings().setLabel(stringField); }
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
- resetShowMarkers
public VectorBarTemplate getTemplateVectorBarTemplate()
Allows you to set the template that the bar chart will use.
Chart FX provides many templates to use with the Bar charts.
If you do not want to use templates, you can choose the None option.
To set a Template for a Bar chart:
Bar bar; bar = ((Bar)chart1.getGalleryAttributes()); bar.setTemplate(VectorBarTemplate.BarLights);
Below, samples for every template:
public void setTemplate(VectorBarTemplate value)
Allows you to set the template that the bar chart will use.
Chart FX provides many templates to use with the Bar charts.
If you do not want to use templates, you can choose the None option.
To set a Template for a Bar chart:
Bar bar; bar = ((Bar)chart1.getGalleryAttributes()); bar.setTemplate(VectorBarTemplate.BarLights);
Below, samples for every template:
value
- public VectorBarValue getTemplate()
Allows you to set the template that the bar chart will use.
Chart FX provides many templates to use with the Bar charts.
If you do not want to use templates, you can choose the None option.
To set a Template for a Bar chart:
Bar bar; bar = ((Bar)chart1.getGalleryAttributes()); bar.setTemplate(VectorBarTemplate.BarLights);
Below, samples for every template:
public void setTemplate(VectorBarValue value)
Allows you to set the template that the bar chart will use.
Chart FX provides many templates to use with the Bar charts.
If you do not want to use templates, you can choose the None option.
To set a Template for a Bar chart:
Bar bar; bar = ((Bar)chart1.getGalleryAttributes()); bar.setTemplate(VectorBarTemplate.BarLights);
Below, samples for every template:
value
- public java.lang.String getTemplateString()
Allows you to set the template that the bar chart will use.
Chart FX provides many templates to use with the Bar charts.
If you do not want to use templates, you can choose the None option.
To set a Template for a Bar chart:
Bar bar; bar = ((Bar)chart1.getGalleryAttributes()); bar.setTemplate(VectorBarTemplate.BarLights);
Below, samples for every template:
public void setTemplate(java.lang.String value)
Allows you to set the template that the bar chart will use.
Chart FX provides many templates to use with the Bar charts.
If you do not want to use templates, you can choose the None option.
To set a Template for a Bar chart:
Bar bar; bar = ((Bar)chart1.getGalleryAttributes()); bar.setTemplate(VectorBarTemplate.BarLights);
Below, samples for every template:
value
- public void resetIntraSeriesGap()
public void resetOverlap()
public void resetShowMarkers()
isShowMarkers
2014 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.