Bar series. More...
Public Types | |
enum | BarWidthStyle { STRETCHED, FIXED } |
Bar width style. More... | |
Public Member Functions | |
BarWidthStyle | getBarWidthStyle (BarWidthStyle style) |
Gets the bar width style. | |
void | setBarWidthStyle (BarWidthStyle style) |
Sets the bar width style. | |
int | getBarWidth () |
Gets the bar width in pixels. | |
void | setBarWidth (int width) |
Sets the bar width in pixels. | |
int | getBarPadding () |
Gets the bar padding in percentage. | |
void | setBarPadding (int padding) |
Sets the bar padding in percentage. | |
Color | getBarColor () |
Gets the bar color. | |
void | setBarColor (Color color) |
Sets the bar color. | |
Rectangle[] | getBounds () |
Gets the array of bar rectangles. |
Bar series.
Definition at line 15 of file IBarSeries.java.
Bar width style.
STRETCHED |
the style stretching the bar width depending on interval of bars. |
FIXED |
the style fixing the bar width regardless of interval of bars. |
Definition at line 20 of file IBarSeries.java.
Color org.swtchart.IBarSeries.getBarColor | ( | ) |
int org.swtchart.IBarSeries.getBarPadding | ( | ) |
Gets the bar padding in percentage.
Implemented in org.swtchart.internal.series.BarSeries.
int org.swtchart.IBarSeries.getBarWidth | ( | ) |
Gets the bar width in pixels.
Implemented in org.swtchart.internal.series.BarSeries.
BarWidthStyle org.swtchart.IBarSeries.getBarWidthStyle | ( | BarWidthStyle | style | ) |
Gets the bar width style.
style | the bar width style |
Rectangle [] org.swtchart.IBarSeries.getBounds | ( | ) |
Gets the array of bar rectangles.
This method is typically used for mouse listener to check whether mouse cursor is on bar.
The returned array has the same size as data points. Depending on X axis range, some bars can be out of screen. In this case, the rectangles for invisible bars will be null
in the returned array.
Implemented in org.swtchart.internal.series.BarSeries.
void org.swtchart.IBarSeries.setBarColor | ( | Color | color | ) |
Sets the bar color.
If null is given, default color will be set.
color | the bar color |
Implemented in org.swtchart.internal.series.BarSeries.
Referenced by org.swtchart.examples.StackSeriesExample.createChart(), org.swtchart.examples.CategoryExample.createChart(), org.swtchart.examples.advanced.LegendBoundsExample.createChart(), org.swtchart.examples.advanced.BarBoundsExample.createChart(), and org.swtchart.examples.ext.InteractiveChartExample.createPartControl().
void org.swtchart.IBarSeries.setBarPadding | ( | int | padding | ) |
Sets the bar padding in percentage.
The specified padding is active only when the bar width style is set to BarWidthStyle.STRETCHED
.
padding | the bar padding in percentage |
Implemented in org.swtchart.internal.series.BarSeries.
void org.swtchart.IBarSeries.setBarWidth | ( | int | width | ) |
Sets the bar width in pixels.
The specified bar width is active only when the bar width style is set to BarWidthStyle.FIXED
.
width | the bar width in pixels |
Implemented in org.swtchart.internal.series.BarSeries.
void org.swtchart.IBarSeries.setBarWidthStyle | ( | BarWidthStyle | style | ) |
Sets the bar width style.
The default is BarWidthStyle.STRETCHED
style | the bar width style |