org.fujion.sparkline.BarPlot Maven / Gradle / Ivy
package org.fujion.sparkline;
import java.util.Map;
import org.fujion.annotation.Option;
/**
* Options for bar plots.
*/
public class BarPlot extends AbstractPlot {
/**
* CSS color used for positive values.
*/
@Option
public String barColor;
/**
* Space between each bar, in pixels.
*/
@Option
public Integer barSpacing;
/**
* Width of each bar, in pixels.
*/
@Option
public Integer barWidth;
/**
* An array of values to specify a color for each individual bar. For example if your chart has
* three values 1,3,1 you can set colorMap$array=["red", "green", "blue"]
*/
@Option("colorMap")
public String[] colorMap$array;
/**
* A range map to map specific values to selected colors. For example if you want all values of
* -2 to appear yellow, set colorMap: { '-2': '#ff0' }.
*/
@Option("colorMap")
public Map colorMap$map;
/**
* CSS color used for negative values.
*/
@Option
public String negBarColor;
/**
* CSS color used for values equal to null. By default null values are omitted entirely, but
* setting this adds a thin marker for the entry - This can be useful if your chart is pretty
* sparse; perhaps try setting it to a light grey or something equally unobtrusive.
*/
@Option
public String nullColor;
/**
* An array of colors to use for stacked bar charts. The first series will use the first value
* in the array, the second series will use the second, etc.
*/
@Option
public String[] stackedBarColor;
/**
* Centers the y-axis at zero if true.
*
* Default: true
*/
@Option
public Boolean zeroAxis;
/**
* CSS color used for values equal to zero.
*/
@Option
public String zeroColor;
protected BarPlot() {
super(SparklineType.BAR);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy