public class Button<T extends Button> extends Configurable<T>
chart.setExporting(
new Exporting()
.setContextButton(
newContextButton(
.setAlign("center")
.setVerticalAlign("middle")
)
);
| Modifier and Type | Class and Description |
|---|---|
static class |
Button.Align
An enumeration of supported credits horizontal alignment types, which can be passed to methods
like
Credits.setAlign(Credits.Align) method. |
static class |
Button.VerticalAlign
An enumeration of supported credits vertical alignment types, which can be passed to methods
like
Credits.setVerticalAlign(Credits.VerticalAlign) method. |
| Constructor and Description |
|---|
Button() |
| Modifier and Type | Method and Description |
|---|---|
Button |
setAlign(Button.Align align)
Convenience method for setting the 'align' option for the Button module.
|
Button |
setEnabled(Boolean enabled)
Convenience method for setting the 'enabled' option for the Button module.
|
Button |
setHeight(Number height)
Convenience method for setting the 'height' option for the Button module.
|
Button |
setSymbolFill(String symbolFill)
Convenience method for setting the 'symbolFill' option for the Button module.
|
Button |
setSymbolSize(Number symbolSize)
Convenience method for setting the 'symbolSize' option for the Button module.
|
Button |
setSymbolStroke(String symbolStroke)
Convenience method for setting the 'symbolStroke' option for the Button module.
|
Button |
setSymbolStrokeWidth(Number symbolStrokeWidth)
Convenience method for setting the 'symbolStrokeWidth' option for the Button module.
|
Button |
setSymbolX(Number symbolX)
Convenience method for setting the 'symbolX' option for the Button module.
|
Button |
setSymbolY(Number symbolY)
Convenience method for setting the 'symbolY' option for the Button module.
|
Button |
setText(String text)
Convenience method for setting the 'text' option for the Button module.
|
Button |
setVerticalAlign(Button.VerticalAlign verticalAlign)
Convenience method for setting the 'verticalAlign' option for the Button module.
|
Button |
setWidth(Number width)
Convenience method for setting the 'width' option for the Button module.
|
Button |
setY(Number y)
Convenience method for setting the 'y' option for the Button module.
|
getOptions, setOptionpublic Button setAlign(Button.Align align)
button.setOption("align", right)
The Horizontal alignment for the buttons. Can be one of "left," "center," or "right." Defaults to rightalign - The horizontal position of the export buttonButton instance for convenient method chaining.public Button setEnabled(Boolean enabled)
button.setOption("enabled", true)
Whether to enable buttons. Defaults to true.enabled - 'true' to enable the export button.Button instance for convenient method chaining.public Button setHeight(Number height)
button.setOption("height", 20)
Pixel height of the buttons. Defaults to 20.height - The height in pixels of the export button.Button instance for convenient method chaining.public Button setSymbolFill(String symbolFill)
button.setOption("symbolFill", "#E0E0E0")
Fill color for the symbol within the button. Defaults to #E0E0E0symbolFill - The color with which to fill the export button.Button instance for convenient method chaining.public Button setSymbolSize(Number symbolSize)
button.setOption("symbolSize", 14)
The pixel size of the symbol on the button. Defaults to 14.symbolSize - The size in pixels of the export button symbol.Button instance for convenient method chaining.public Button setSymbolStroke(String symbolStroke)
button.setOption("symbolStroke", "#666")
The color of the symbol's stroke or line. Defaults to #666symbolStroke - The color of the export button's lines.Button instance for convenient method chaining.public Button setSymbolStrokeWidth(Number symbolStrokeWidth)
button.setOption("symbolStrokeWidth", 1)
The pixel stroke width of the symbol on the button. Defaults to 1.symbolStrokeWidth - The width in pixels of the lines on the export button.Button instance for convenient method chaining.public Button setSymbolX(Number symbolX)
button.setOption("symbolX", 12.5)
The x position of the center of the symbol inside the button. Defaults to 12.5.symbolX - The distance in pixels of the export button from the left edge of the button.Button instance for convenient method chaining.public Button setSymbolY(Number symbolY)
button.setOption("symbolY", 10.5)
The y position of the center of the symbol inside the button. Defaults to 10.5.symbolY - The distance in pixels of the export button symbol from the top edge of the button.Button instance for convenient method chaining.public Button setText(String text)
button.setOption("text", null)
A text string to add to the individual button. Defaults to nulltext - The text to display with the export button.Button instance for convenient method chaining.public Button setVerticalAlign(Button.VerticalAlign verticalAlign)
button.setOption("verticalAlign", "top")
The vertical alignment of the buttons. Can be one of "top", "middle" or "bottom". Defaults to top.verticalAlign - The vertical position of the export button.Button instance for convenient method chaining.public Button setWidth(Number width)
button.setOption("width", 24)
The pixel width of the button. Defaults to 24.width - The width in pixels of the export button.Button instance for convenient method chaining.public Button setY(Number y)
button.setOption("y", 0)
The vertical offset of the button's position relative to its verticalAlign. . Defaults to 0.y - The number of pixels to offset the export button from the bottom of the chart.Button instance for convenient method chaining.Copyright © 2015. All Rights Reserved.