pub struct Title<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Title<'a>
impl<'a> Title<'a>
Sourcepub fn text(&mut self, text: &'a str) -> &mut Self
pub fn text(&mut self, text: &'a str) -> &mut Self
Sets the title of this axis. Note that before the existence of title.text
, the title’s contents used to be defined as the title
attribute itself. This behavior has been deprecated.
Sourcepub fn font(&mut self) -> &mut Font<'a>
pub fn font(&mut self) -> &mut Font<'a>
Sets this axis’ title font. Note that the title’s font used to be customized by the now deprecated titlefont
attribute.
Sourcepub fn standoff(&mut self, standoff: f64) -> &mut Self
pub fn standoff(&mut self, standoff: f64) -> &mut Self
Sets the standoff distance (in px) between the axis labels and the title text The default value is a function of the axis tick labels, the title font.size
and the axis linewidth
. Note that the axis title position is always constrained within the margins, so the actual standoff distance is always less than the set or default value. By setting standoff
and turning on automargin
, plotly.js will push the margins to fit the axis title at given standoff distance.