public class Style extends Configurable<Style>
BaseChart.setStyle(Style), ChartTitle.setStyle(Style), etc.).
Example usage:
chart.setStyle(
new Style()
.setOption("fontFamily", "serif")
);
Note that some convenience methods are provided on this class for setting commonly used
CSS options (such as setColor(String), setFontFamily(String),
setFontSize(String), etc). But, any arbitrary CSS option can be set by
simply using the Configurable.setOption(String, Object) method. E.g., the following two
lines are equivalent:
style.setFontFamily("serif");
style.setOption("fontFamily", "serif");
| Constructor and Description |
|---|
Style() |
| Modifier and Type | Method and Description |
|---|---|
Style |
setBottom(String bottom)
Convenience method for setting the "bottom" CSS style option.
|
Style |
setColor(String color)
Convenience method for setting the "color" CSS style option.
|
Style |
setCursor(String cursor)
Convenience method for setting the "cursor" CSS style option.
|
Style |
setFont(String font)
Convenience method for setting the "font" CSS style option.
|
Style |
setFontFamily(String fontFamily)
Convenience method for setting the "fontFamily" CSS style option.
|
Style |
setFontSize(String fontSize)
Convenience method for setting the "fontSize" CSS style option.
|
Style |
setFontStyle(String fontStyle)
Convenience method for setting the "fontStyle" CSS style option.
|
Style |
setFontWeight(String fontWeight)
Convenience method for setting the "fontWeight" CSS style option.
|
Style |
setLeft(String left)
Convenience method for setting the "left" CSS style option.
|
Style |
setMargin(String margin)
Convenience method for setting the "margin" CSS style option.
|
Style |
setPosition(String position)
Convenience method for setting the "position" CSS style option.
|
Style |
setRight(String right)
Convenience method for setting the "right" CSS style option.
|
Style |
setTop(String top)
Convenience method for setting the "top" CSS style option.
|
getOptions, setOptionpublic Style setBottom(String bottom)
chart.setOption("bottom", "10px");
bottom - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setColor(String color)
chart.setOption("color", "#FF0000");
color - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setCursor(String cursor)
chart.setOption("cursor", "pointer");
cursor - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setFont(String font)
chart.setOption("font", "normal 13px Verdana, sans-serif");
font - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setFontFamily(String fontFamily)
chart.setOption("fontFamily", "serif");
fontFamily - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setFontSize(String fontSize)
chart.setOption("fontSize", "16px");
fontSize - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setFontStyle(String fontStyle)
chart.setOption("fontStyle", "italic");
fontStyle - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setFontWeight(String fontWeight)
chart.setOption("fontWeight", "bold");
fontWeight - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setLeft(String left)
chart.setOption("left", "10px");
left - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setMargin(String margin)
chart.setOption("margin", "0px");
margin - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setPosition(String position)
chart.setOption("position", "absolute");
position - The value to use for the CSS style option.Style instance for convenient method chaining.public Style setRight(String right)
chart.setOption("right", "10px");
right - The value to use for the CSS style option.Style instance for convenient method chaining.Copyright © 2015. All Rights Reserved.