Package smile.plot.vega
Class ViewConfig
java.lang.Object
smile.plot.vega.ViewConfig
The style of a single view visualization.
-
Method Summary
Modifier and TypeMethodDescriptionaxis()
Returns the axis definition object.continuousHeight
(int height) Sets the default height when the plot has a continuous field for y or latitude, or has arc marks.continuousWidth
(int width) Sets the default width when the plot has a continuous field for x or longitude, or has arc marks.cornerRadius
(int cornerRadius) Sets the radius of corners.Sets the mouse cursor used over the view.discreteHeight
(int height) Sets the default height when the plot has non arc marks and either a discrete y-field or no y-field.discreteWidth
(int width) Sets the default width when the plot has non-arc marks and either a discrete x-field or no x-field.Sets the fill color.fillOpacity
(double opacity) Sets the fill opacity.opacity
(double opacity) Sets the overall opacity.step
(int step) Sets the default step size for x-/y- discrete fields.Sets the stroke color.Sets the stroke cap for line ending style.strokeDash
(double stroke, double space) Sets the alternating [stroke, space] lengths for stroke dash.strokeDashOffset
(int offset) Sets the offset (in pixels) into which to begin drawing with the stroke dash array.strokeJoin
(String join) Sets the stroke line join method.strokeMiterLimit
(int limit) Sets the miter limit at which to bevel a line join.strokeOpacity
(double opacity) Sets the stroke opacitystrokeWidth
(int width) Sets the stroke width.Returns the specification in pretty print.toString()
-
Method Details
-
toString
-
toPrettyString
Returns the specification in pretty print.- Returns:
- the specification in pretty print.
-
continuousWidth
Sets the default width when the plot has a continuous field for x or longitude, or has arc marks. -
continuousHeight
Sets the default height when the plot has a continuous field for y or latitude, or has arc marks. -
discreteWidth
Sets the default width when the plot has non-arc marks and either a discrete x-field or no x-field. -
discreteHeight
Sets the default height when the plot has non arc marks and either a discrete y-field or no y-field. -
step
Sets the default step size for x-/y- discrete fields. -
cornerRadius
Sets the radius of corners.- Parameters:
cornerRadius
- The radius in pixels of rounded rectangles or arcs' corners.- Returns:
- this object.
-
cursor
Sets the mouse cursor used over the view.- Parameters:
cursor
- Any valid CSS cursor type can be used.- Returns:
- this object.
-
fill
Sets the fill color.- Parameters:
color
- the fill color.- Returns:
- this object.
-
fillOpacity
Sets the fill opacity.- Parameters:
opacity
- a value between [0, 1].- Returns:
- this object.
-
opacity
Sets the overall opacity.- Parameters:
opacity
- a value between [0, 1].- Returns:
- this object.
-
stroke
Sets the stroke color.- Parameters:
color
- the stroke color.- Returns:
- this object.
-
strokeCap
Sets the stroke cap for line ending style. One of "butt", "round", or "square".- Parameters:
cap
- "butt", "round", or "square".- Returns:
- this object.
-
strokeDash
Sets the alternating [stroke, space] lengths for stroke dash.- Parameters:
stroke
- the stroke length.space
- the space length.- Returns:
- this object.
-
strokeDashOffset
Sets the offset (in pixels) into which to begin drawing with the stroke dash array.- Parameters:
offset
- the stroke offset.- Returns:
- this object.
-
strokeJoin
Sets the stroke line join method.- Parameters:
join
- "miter", "round" or "bevel".- Returns:
- this object.
-
strokeMiterLimit
Sets the miter limit at which to bevel a line join.- Parameters:
limit
- the miter limit.- Returns:
- this object.
-
strokeOpacity
Sets the stroke opacity- Parameters:
opacity
- a value between [0, 1].- Returns:
- this object.
-
strokeWidth
Sets the stroke width.- Parameters:
width
- the width in pixels.- Returns:
- this object.
-
axis
Returns the axis definition object.- Returns:
- the axis definition object.
-