public class Line
extends java.lang.Object
Provides access to the Line gallery object.
Line charts show trends in data at equal intervals and are effective for comparing highs and lows in a continuum. You can create multiple lines by adding additional data series to the chart. In a 2D line chart additional lines will be drawn in the main chart area and, in the case of 3D line charts, lines could be displayed at the same level or clustered in the Z axis.
The methods of the Line
class allow you to customize the visual attributes of a Line chart. In order to make the supported members available, you must first set the gallery of the chart to Lines, and cast the setGalleryAttributes
method of the Chart to the Line
class:
chart1.setGallery(Gallery.LINES); Line line; line = ((Line)chart1.getGalleryAttributes());
The cast will fail if the gallery is not set to Lines.
Once you have done this, using the newly created object you can assign these special attributes for the Lines gallery type in your chart.
PopulateProductSales(chart1);
chart1.getTitles().add(new TitleDockable("Wine Sales by Type"));
chart1.getAxisY().getLabelsFormat().setFormat(AxisFormat.CURRENCY);
chart1.setGallery(Gallery.LINES);
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; } }
Constructor and Description |
---|
Line()
Constructs a newly allocated Line object
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor()
Sets or Gets the line color for a selected line.
|
LineCap |
getEndCap()
Gets or sets a marker shape at the end of a selected line.
|
LineCap |
getStartCap()
Gets or sets a marker shape at the beginning of a selected line.
|
DashStyle |
getStyle()
Gets or sets the line style for a selected line.
|
int |
getWidth()
Gets or sets the line width for a selected line.
|
void |
resetColor()
Set the property Color to its default value.
|
void |
resetEndCap()
Set the property EndCap to its default value.
|
void |
resetSeriesIndex()
Set the property SeriesIndex to its default value.
|
void |
resetStartCap()
Set the property StartCap to its default value.
|
void |
resetStyle()
Set the property Style to its default value.
|
void |
resetWidth()
Set the property Width to its default value.
|
void |
setColor(java.awt.Color value)
Sets or Gets the line color for a selected line.
|
void |
setEndCap(LineCap value)
Gets or sets a marker shape at the end of a selected line.
|
void |
setStartCap(LineCap value)
Gets or sets a marker shape at the beginning of a selected line.
|
void |
setStyle(DashStyle value)
Gets or sets the line style for a selected line.
|
void |
setWidth(int value)
Gets or sets the line width for a selected line.
|
public java.awt.Color getColor()
Sets or Gets the line color for a selected line.
setWidth
and setStyle
of the selected line using the supported members of the Line .setEndCap
and setStartCap
methods allow you to configured various shapes at the beginning and ending of a selected line.PopulateProductSales(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(255,0,0,255));
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 method is also inherited by the Line
class, to set the color for a Major gridline:
PopulateProductSales(chart1);
chart1.getAxisY().getGrids().getMajor().setColor(new java.awt.Color(0,0,255,255));
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; } }
resetColor
public void setColor(java.awt.Color value)
Sets or Gets the line color for a selected line.
setWidth
and setStyle
of the selected line using the supported members of the Line .setEndCap
and setStartCap
methods allow you to configured various shapes at the beginning and ending of a selected line.PopulateProductSales(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(255,0,0,255));
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 method is also inherited by the Line
class, to set the color for a Major gridline:
PopulateProductSales(chart1);
chart1.getAxisY().getGrids().getMajor().setColor(new java.awt.Color(0,0,255,255));
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; } }
value
- resetColor
public LineCap getEndCap()
Gets or sets a marker shape at the end of a selected line.
PopulatePopulationData(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisX().getLine().setEndCap(LineCap.ROUND_ANCHOR);
chart1.getTitles().add(new TitleDockable("Population Distribution by Gender and Age Range"));
chart1.getAxisY().getTitle().setText("Percentage");
chart1.getAxisX().getTitle().setText("Age Range");
public static void PopulatePopulationData(Chart chart1, String fieldNames) { PopulationData[] data = new PopulationData[]{ new PopulationData("0-4", 10471, 10024), new PopulationData("5-9", 9954, 9512), new PopulationData("10-14", 10670, 10167), new PopulationData("15-19", 10871, 10312), new PopulationData("20-24", 10719, 10178), new PopulationData("25-29", 10060, 9744), new PopulationData("30-34", 10021, 9864), new PopulationData("35-39", 10479, 10424), new PopulationData("40-44", 11294, 11454), new PopulationData("45-49", 11080, 11377), new PopulationData("50-54", 9772, 10212), new PopulationData("55-59", 8415, 8944), new PopulationData("60-64", 6203, 6814), new PopulationData("65-69", 4712, 5412), new PopulationData("70-74", 3804, 4697), new PopulationData("75-79", 3094, 4282), new PopulationData("80-84", 2117, 3459), new PopulationData("85-89", 1072, 2135), new PopulationData("90-94", 397, 1034), new PopulationData("95-99", 91, 321), new PopulationData("100+", 12, 58) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); if (fieldNames != "") { List<DataField> removeFields = new ArrayList<DataField>(); List<String> includeFields = Arrays.asList(fieldNames.split(",")); chart1.getDataSourceSettings().fillFromSchema(); for (DataField dataField : chart1.getDataSourceSettings().getDataFields()) { if (dataField.isMeasure() && !includeFields.contains(dataField.getDataPath())) { removeFields.add(dataField); } } for (DataField dataField : removeFields) { chart1.getDataSourceSettings().getDataFields().remove(dataField); } } } public static void PopulatePopulationData(Chart chart1) { PopulatePopulationData(chart1, ""); }
public static class PopulationData { public PopulationData(String range, double male, double female) { this.setRange(range); this.setMale(male); this.setFemale(female); } private String privateRange; public final String getRange() { return privateRange; } public final void setRange(String value) { privateRange = value; } private double privateMale; public final double getMale() { return privateMale; } public final void setMale(double value) { privateMale = value; } private double privateFemale; public final double getFemale() { return privateFemale; } public final void setFemale(double value) { privateFemale = value; } }
resetEndCap
public void setEndCap(LineCap value)
Gets or sets a marker shape at the end of a selected line.
PopulatePopulationData(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisX().getLine().setEndCap(LineCap.ROUND_ANCHOR);
chart1.getTitles().add(new TitleDockable("Population Distribution by Gender and Age Range"));
chart1.getAxisY().getTitle().setText("Percentage");
chart1.getAxisX().getTitle().setText("Age Range");
public static void PopulatePopulationData(Chart chart1, String fieldNames) { PopulationData[] data = new PopulationData[]{ new PopulationData("0-4", 10471, 10024), new PopulationData("5-9", 9954, 9512), new PopulationData("10-14", 10670, 10167), new PopulationData("15-19", 10871, 10312), new PopulationData("20-24", 10719, 10178), new PopulationData("25-29", 10060, 9744), new PopulationData("30-34", 10021, 9864), new PopulationData("35-39", 10479, 10424), new PopulationData("40-44", 11294, 11454), new PopulationData("45-49", 11080, 11377), new PopulationData("50-54", 9772, 10212), new PopulationData("55-59", 8415, 8944), new PopulationData("60-64", 6203, 6814), new PopulationData("65-69", 4712, 5412), new PopulationData("70-74", 3804, 4697), new PopulationData("75-79", 3094, 4282), new PopulationData("80-84", 2117, 3459), new PopulationData("85-89", 1072, 2135), new PopulationData("90-94", 397, 1034), new PopulationData("95-99", 91, 321), new PopulationData("100+", 12, 58) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); if (fieldNames != "") { List<DataField> removeFields = new ArrayList<DataField>(); List<String> includeFields = Arrays.asList(fieldNames.split(",")); chart1.getDataSourceSettings().fillFromSchema(); for (DataField dataField : chart1.getDataSourceSettings().getDataFields()) { if (dataField.isMeasure() && !includeFields.contains(dataField.getDataPath())) { removeFields.add(dataField); } } for (DataField dataField : removeFields) { chart1.getDataSourceSettings().getDataFields().remove(dataField); } } } public static void PopulatePopulationData(Chart chart1) { PopulatePopulationData(chart1, ""); }
public static class PopulationData { public PopulationData(String range, double male, double female) { this.setRange(range); this.setMale(male); this.setFemale(female); } private String privateRange; public final String getRange() { return privateRange; } public final void setRange(String value) { privateRange = value; } private double privateMale; public final double getMale() { return privateMale; } public final void setMale(double value) { privateMale = value; } private double privateFemale; public final double getFemale() { return privateFemale; } public final void setFemale(double value) { privateFemale = value; } }
value
- resetEndCap
public LineCap getStartCap()
Gets or sets a marker shape at the beginning of a selected line.
PopulatePopulationData(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisX().getLine().setStartCap(LineCap.ROUND_ANCHOR);
chart1.getTitles().add(new TitleDockable("Population Distribution by Gender and Age Range"));
chart1.getAxisY().getTitle().setText("Percentage");
chart1.getAxisX().getTitle().setText("Age Range");
public static void PopulatePopulationData(Chart chart1, String fieldNames) { PopulationData[] data = new PopulationData[]{ new PopulationData("0-4", 10471, 10024), new PopulationData("5-9", 9954, 9512), new PopulationData("10-14", 10670, 10167), new PopulationData("15-19", 10871, 10312), new PopulationData("20-24", 10719, 10178), new PopulationData("25-29", 10060, 9744), new PopulationData("30-34", 10021, 9864), new PopulationData("35-39", 10479, 10424), new PopulationData("40-44", 11294, 11454), new PopulationData("45-49", 11080, 11377), new PopulationData("50-54", 9772, 10212), new PopulationData("55-59", 8415, 8944), new PopulationData("60-64", 6203, 6814), new PopulationData("65-69", 4712, 5412), new PopulationData("70-74", 3804, 4697), new PopulationData("75-79", 3094, 4282), new PopulationData("80-84", 2117, 3459), new PopulationData("85-89", 1072, 2135), new PopulationData("90-94", 397, 1034), new PopulationData("95-99", 91, 321), new PopulationData("100+", 12, 58) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); if (fieldNames != "") { List<DataField> removeFields = new ArrayList<DataField>(); List<String> includeFields = Arrays.asList(fieldNames.split(",")); chart1.getDataSourceSettings().fillFromSchema(); for (DataField dataField : chart1.getDataSourceSettings().getDataFields()) { if (dataField.isMeasure() && !includeFields.contains(dataField.getDataPath())) { removeFields.add(dataField); } } for (DataField dataField : removeFields) { chart1.getDataSourceSettings().getDataFields().remove(dataField); } } } public static void PopulatePopulationData(Chart chart1) { PopulatePopulationData(chart1, ""); }
public static class PopulationData { public PopulationData(String range, double male, double female) { this.setRange(range); this.setMale(male); this.setFemale(female); } private String privateRange; public final String getRange() { return privateRange; } public final void setRange(String value) { privateRange = value; } private double privateMale; public final double getMale() { return privateMale; } public final void setMale(double value) { privateMale = value; } private double privateFemale; public final double getFemale() { return privateFemale; } public final void setFemale(double value) { privateFemale = value; } }
resetStartCap
public void setStartCap(LineCap value)
Gets or sets a marker shape at the beginning of a selected line.
PopulatePopulationData(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisX().getLine().setStartCap(LineCap.ROUND_ANCHOR);
chart1.getTitles().add(new TitleDockable("Population Distribution by Gender and Age Range"));
chart1.getAxisY().getTitle().setText("Percentage");
chart1.getAxisX().getTitle().setText("Age Range");
public static void PopulatePopulationData(Chart chart1, String fieldNames) { PopulationData[] data = new PopulationData[]{ new PopulationData("0-4", 10471, 10024), new PopulationData("5-9", 9954, 9512), new PopulationData("10-14", 10670, 10167), new PopulationData("15-19", 10871, 10312), new PopulationData("20-24", 10719, 10178), new PopulationData("25-29", 10060, 9744), new PopulationData("30-34", 10021, 9864), new PopulationData("35-39", 10479, 10424), new PopulationData("40-44", 11294, 11454), new PopulationData("45-49", 11080, 11377), new PopulationData("50-54", 9772, 10212), new PopulationData("55-59", 8415, 8944), new PopulationData("60-64", 6203, 6814), new PopulationData("65-69", 4712, 5412), new PopulationData("70-74", 3804, 4697), new PopulationData("75-79", 3094, 4282), new PopulationData("80-84", 2117, 3459), new PopulationData("85-89", 1072, 2135), new PopulationData("90-94", 397, 1034), new PopulationData("95-99", 91, 321), new PopulationData("100+", 12, 58) }; ObjectProvider objProvider = new ObjectProvider(data); chart1.getDataSourceSettings().setDataSource(objProvider); if (fieldNames != "") { List<DataField> removeFields = new ArrayList<DataField>(); List<String> includeFields = Arrays.asList(fieldNames.split(",")); chart1.getDataSourceSettings().fillFromSchema(); for (DataField dataField : chart1.getDataSourceSettings().getDataFields()) { if (dataField.isMeasure() && !includeFields.contains(dataField.getDataPath())) { removeFields.add(dataField); } } for (DataField dataField : removeFields) { chart1.getDataSourceSettings().getDataFields().remove(dataField); } } } public static void PopulatePopulationData(Chart chart1) { PopulatePopulationData(chart1, ""); }
public static class PopulationData { public PopulationData(String range, double male, double female) { this.setRange(range); this.setMale(male); this.setFemale(female); } private String privateRange; public final String getRange() { return privateRange; } public final void setRange(String value) { privateRange = value; } private double privateMale; public final double getMale() { return privateMale; } public final void setMale(double value) { privateMale = value; } private double privateFemale; public final double getFemale() { return privateFemale; } public final void setFemale(double value) { privateFemale = value; } }
value
- resetStartCap
public DashStyle getStyle()
Gets or sets the line style for a selected line.
setWidth
and setColor
of the selected line using the supported members of the Line .setEndCap
and setStartCap
methods allow you to configured various shapes at the beginning and ending of a selected line.The image below depicts a 'DashDot' Line style assigned to the X axis:
PopulateNewConstructions(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisX().getLine().setStyle(DashStyle.DASH_DOT);
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; } }
For more information regarding the Drawing type, please refer to the Documentation.
resetStyle
public void setStyle(DashStyle value)
Gets or sets the line style for a selected line.
setWidth
and setColor
of the selected line using the supported members of the Line .setEndCap
and setStartCap
methods allow you to configured various shapes at the beginning and ending of a selected line.The image below depicts a 'DashDot' Line style assigned to the X axis:
PopulateNewConstructions(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisX().getLine().setStyle(DashStyle.DASH_DOT);
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; } }
For more information regarding the Drawing type, please refer to the Documentation.
value
- resetStyle
public int getWidth()
Gets or sets the line width for a selected line.
setStyle
and setColor
of the selected line using the supported members of the Line .setEndCap
and setStartCap
methods allow you to configured various shapes at the beginning and end of a selected line.PopulateNewConstructions(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisY().getLine().setWidth((short)5);
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; } }
resetWidth
public void setWidth(int value)
Gets or sets the line width for a selected line.
setStyle
and setColor
of the selected line using the supported members of the Line .setEndCap
and setStartCap
methods allow you to configured various shapes at the beginning and end of a selected line.PopulateNewConstructions(chart1);
chart1.getAxisX().getLine().setColor(new java.awt.Color(0,0,0,255));
chart1.getAxisY().getLine().setWidth((short)5);
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; } }
value
- resetWidth
public void resetColor()
setColor
public void resetEndCap()
setEndCap
public void resetSeriesIndex()
public void resetStartCap()
setStartCap
public void resetStyle()
setStyle
public void resetWidth()
setWidth
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.