public class

BarSeriesStyle

extends SeriesStyle
java.lang.Object
   ↳ com.shinobicontrols.charts.SeriesStyle
     ↳ com.shinobicontrols.charts.BarSeriesStyle

Class Overview

Style properties specific to BarSeries that manage its look and feel. If you make any styling changes after the chart has been displayed, you should call redrawChart().

Summary

Public Constructors
BarSeriesStyle()
Constructs a new BarSeriesStyle object.
BarSeriesStyle(BarSeriesStyle barSeriesStyle)
Constructs a new BarSeriesStyle object taking its values from the given BarSeriesStyle.
Public Methods
int getAreaColor()
Gets the fill color of the area inside the bar or column.
int getAreaColorBelowBaseline()
Gets the fill color of the area inside the bar or column when the data point is below the baseline.
int getAreaColorGradient()
Gets the second fill color of the area inside the bar or column, used to form a gradient.
int getAreaColorGradientBelowBaseline()
Gets the second fill color of the area inside the bar or column, when the data point is below the baseline, used to form a gradient.
float getCornerRatio()
Returns the ratio used to calculate the corner radius applied to the corners of the tip of each bar or column.
SeriesStyle.FillStyle getFillStyle()
Whether, and how, to fill the area inside the bar or column.
int getLineColor()
Gets the color of the bar or column outline.
int getLineColorBelowBaseline()
Gets the color of the bar or column outline, when the data point is below the baseline.
float getLineWidth()
Gets the width of the bar or column outline, in device independent pixels.
boolean isLineShown()
Whether the bar or column outline should be drawn.
void setAreaColor(int areaColor)
Sets the fill color of the area inside the bar or column.
void setAreaColorBelowBaseline(int areaColorBelowBaseline)
Sets the fill color of the area inside the bar or column when the data point is below the baseline.
void setAreaColorGradient(int areaColorGradient)
Sets the second fill color of the area inside the bar or column, used to form a gradient.
void setAreaColorGradientBelowBaseline(int areaColorGradientBelowBaseline)
Sets the second fill color of the area inside the bar or column, when the data point is below the baseline, used to form a gradient.
void setCornerRatio(float cornerRatio)
Sets the ratio used to calculate the corner radius applied to the corners of the tip of each bar or column.
void setFillStyle(SeriesStyle.FillStyle fillStyle)
Set whether, and how, to fill the area inside the bar or column.
void setLineColor(int lineColor)
Sets the color of the bar or column outline.
void setLineColorBelowBaseline(int lineColorBelowBaseline)
Sets the color of the bar or column outline, when the data point is below the baseline.
void setLineShown(boolean showLine)
Sets whether the bar or column outline should be drawn.
void setLineWidth(float lineWidth)
Sets the width of the bar or column outline.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BarSeriesStyle ()

Constructs a new BarSeriesStyle object.

public BarSeriesStyle (BarSeriesStyle barSeriesStyle)

Constructs a new BarSeriesStyle object taking its values from the given BarSeriesStyle. If this BarSeriesStyle is null then the default style values will be used.

Parameters
barSeriesStyle the BarSeriesStyle to copy values from

Public Methods

public int getAreaColor ()

Gets the fill color of the area inside the bar or column. This area is only filled if the bar or column's SeriesStyle.FillStyle is set to FLAT or GRADIENT.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • the int representation of the fill color for the bar or column

public int getAreaColorBelowBaseline ()

Gets the fill color of the area inside the bar or column when the data point is below the baseline. This area is only filled if the bar or column's SeriesStyle.FillStyle is set to FLAT or GRADIENT.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • the int representation of the fill color for the bar or column when the data point is below the baseline

public int getAreaColorGradient ()

Gets the second fill color of the area inside the bar or column, used to form a gradient. The gradient effect is only shown if the bar or column's SeriesStyle.FillStyle is set to GRADIENT.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • the int representation of the second fill color for the bar or column, used to form a gradient

public int getAreaColorGradientBelowBaseline ()

Gets the second fill color of the area inside the bar or column, when the data point is below the baseline, used to form a gradient. The gradient effect is only shown if the bar or column's SeriesStyle.FillStyle is set to GRADIENT.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • the int representation of the second fill color for the bar or column when the data point is below the baseline, used to form a gradient

public float getCornerRatio ()

Returns the ratio used to calculate the corner radius applied to the corners of the tip of each bar or column. The corner radius is calculated by multiplying this ratio value against half the bar or column width. Furthermore, it considers the ratio between the X and Y axes ranges.

The ratio is a value between 0.0 and 1.0, where a ratio of 1.0 causes the tip of each bar or column to be fully rounded and a ratio of 0.0 makes the tip fo each bar or column flat.

By default the corner ratio is set to 0.0

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

The smoothness, or resolution, of the curvature can be controlled separately by using the setNumberOfCornerEdges(int) or setNumberOfCornerEdges(int) methods to set an appropriate value. Note, this value is on a per-series basis.

Returns
  • the ratio used to calculate the corner radius applied to the corners of the tip of each bar or column

public SeriesStyle.FillStyle getFillStyle ()

Whether, and how, to fill the area inside the bar or column.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • whether, and how, to fill the area inside the bar or column

public int getLineColor ()

Gets the color of the bar or column outline. The outline is shown if isLineShown() is true.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • the int representation of the color for the bar or column's outline

public int getLineColorBelowBaseline ()

Gets the color of the bar or column outline, when the data point is below the baseline. The outline is shown if isLineShown() is true.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • the int representation of the color for the bar or column's outline when the data point is below the baseline

public float getLineWidth ()

Gets the width of the bar or column outline, in device independent pixels. The outline is shown if isLineShown() is true.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • the width of the bar or column outline in pixels

public boolean isLineShown ()

Whether the bar or column outline should be drawn.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

Returns
  • whether the bar or column outline should be drawn

public void setAreaColor (int areaColor)

Sets the fill color of the area inside the bar or column. This area is only filled if the bar or column's SeriesStyle.FillStyle is set to FLAT or GRADIENT.

Parameters
areaColor the int representation of the fill color for the bar or column
See Also

public void setAreaColorBelowBaseline (int areaColorBelowBaseline)

Sets the fill color of the area inside the bar or column when the data point is below the baseline. This area is only filled if the bar or column's SeriesStyle.FillStyle is set to FLAT or GRADIENT.

Parameters
areaColorBelowBaseline the int representation of the fill color for the bar or column when the data point is below the baseline

public void setAreaColorGradient (int areaColorGradient)

Sets the second fill color of the area inside the bar or column, used to form a gradient. The gradient effect is only shown if the bar or column's SeriesStyle.FillStyle is set to GRADIENT.

Parameters
areaColorGradient the int representation of the second fill color for the bar or column, used to form a gradient

public void setAreaColorGradientBelowBaseline (int areaColorGradientBelowBaseline)

Sets the second fill color of the area inside the bar or column, when the data point is below the baseline, used to form a gradient. The gradient effect is only shown if the bar or column's SeriesStyle.FillStyle is set to GRADIENT.

Parameters
areaColorGradientBelowBaseline the int representation of the second fill color for the bar or column when the data point is below the baseline, used to form a gradient

public void setCornerRatio (float cornerRatio)

Sets the ratio used to calculate the corner radius applied to the corners of the tip of each bar or column. The corner radius is calculated by multiplying this ratio value against half the bar or column width. Furthermore, it considers the ratio between the X and Y axes ranges.

The given ratio should be a value between 0.0 and 1.0, where a ratio of 1.0 causes the tip of each bar or column to be fully rounded and a ratio of 0.0 makes the tip fo each bar or column flat. Values less than 0.0 will be coerced to 0.0. Similarly, values greater than 1.0 will be coerced to 1.0.

By default the corner ratio is set to 0.0. As with other style properties, to make any changes visible it is necessary to call redrawChart() after setting the corner ratio.

Note, this property can be applied on a per-point basis by performing individual point styling. See SeriesStyleProvider for more details.

The smoothness, or resolution, of the curvature can be controlled separately by using the setNumberOfCornerEdges(int) or setNumberOfCornerEdges(int) methods to set an appropriate value. Note, this value is on a per-series basis.

Parameters
cornerRatio the ratio to use to calculate the corner radius applied to the corners of the tip of each bar or column
See Also

public void setFillStyle (SeriesStyle.FillStyle fillStyle)

Set whether, and how, to fill the area inside the bar or column.

Parameters
fillStyle whether, and how, to fill the area inside the bar or column

public void setLineColor (int lineColor)

Sets the color of the bar or column outline. The outline is shown if isLineShown() is true.

Parameters
lineColor the int representation of the color for the bar or column's outline
See Also

public void setLineColorBelowBaseline (int lineColorBelowBaseline)

Sets the color of the bar or column outline, when the data point is below the baseline. The outline is shown if isLineShown() is true .

Parameters
lineColorBelowBaseline the int representation of the color for the bar or column's outline when the data point is below the baseline

public void setLineShown (boolean showLine)

Sets whether the bar or column outline should be drawn.

Parameters
showLine whether the bar or column outline should be drawn
See Also

public void setLineWidth (float lineWidth)

Sets the width of the bar or column outline. The outline is shown if isLineShown() is true.

Parameters
lineWidth the width of the bar or column outline in pixels
See Also