smo

Struct Configuration

Source
pub struct Configuration { /* private fields */ }

Implementations§

Source§

impl Configuration

Source

pub fn new() -> Configuration

Create a new default Configuration object. Options can be configured using the provided setter methods.

Source

pub fn static_plot(self, static_plot: bool) -> Configuration

Determines whether the graphs are interactive or not. If false, no interactivity, for export or image generation.

Source

pub fn typeset_math(self, typeset_math: bool) -> Configuration

Determines whether math should be typeset or not, when MathJax (either v2 or v3) is present on the page.

Source

pub fn plotly_server_url(self, plotly_server_url: &str) -> Configuration

When set it determines base URL for the “Edit in Chart Studio” show_edit_in_chart_studio/show_send_to_cloud mode bar button and the show_link/send_data on-graph link. To enable sending your data to Chart Studio Cloud, you need to set both plotly_server_url to “https://chart-studio.plotly.com” and also set showSendToCloud to true.

Source

pub fn editable(self, editable: bool) -> Configuration

Determines whether the graph is editable or not. Sets all pieces of edits unless a separate edits config item overrides individual parts.

Source

pub fn autosizable(self, autosizable: bool) -> Configuration

Determines whether the graphs are plotted with respect to layout.auto_size: true and infer its container size.

Source

pub fn responsive(self, responsive: bool) -> Configuration

Determines whether to change the layout size when window is resized. In v3, this option will be removed and will always be true.

Source

pub fn fill_frame(self, fill_frame: bool) -> Configuration

When layout.auto_size is turned on, determines whether the graph fills the container (the default) or the screen (if set to true).

Source

pub fn frame_margins(self, frame_margins: f64) -> Configuration

When layout.auto_size is turned on, set the frame margins in fraction of the graph size.

Source

pub fn scroll_zoom(self, scroll_zoom: bool) -> Configuration

Determines whether mouse wheel or two-finger scroll zooms is enable. Turned on by default for gl3d, geo and mapbox subplots (as these subplot types do not have zoombox via pan), but turned off by default for cartesian subplots. Set scroll_zoom to false to disable scrolling for all subplots.

Source

pub fn double_click(self, double_click: DoubleClick) -> Configuration

Sets the double click interaction mode. Has an effect only in cartesian plots. If false, double click is disable. If reset, double click resets the axis ranges to their initial values. If autosize, double click set the axis ranges to their autorange values. If reset+autosize, the odd double clicks resets the axis ranges to their initial values and even double clicks set the axis ranges to their autorange values.

Source

pub fn double_click_delay(self, double_click_delay: usize) -> Configuration

Sets the delay for registering a double-click in ms. This is the time interval (in ms) between first mousedown and 2nd mouseup to constitute a double-click. This setting propagates to all on-subplot double clicks (except for geo and mapbox) and on-legend double clicks.

Source

pub fn show_axis_drag_handles( self, show_axis_drag_handles: bool, ) -> Configuration

Set to false to omit cartesian axis pan/zoom drag handles.

Source

pub fn show_axis_range_entry_boxes( self, show_axis_range_entry_boxes: bool, ) -> Configuration

Set to false to omit direct range entry at the pan/zoom drag points, note that show_axis_drag_handles must be enabled to have an effect.

Source

pub fn show_tips(self, show_tips: bool) -> Configuration

Determines whether or not tips are shown while interacting with the resulting graphs.

Determines whether a link to Chart Studio Cloud is displayed at the bottom right corner of resulting graphs. Use with send_data and link_text.

Sets the text appearing in the showLink link.

Source

pub fn send_data(self, send_data: bool) -> Configuration

If show_link is true, does it contain data just link to a Chart Studio Cloud file?

Source

pub fn display_mode_bar(self, display_mode_bar: DisplayModeBar) -> Configuration

Determines the mode bar display mode. If true, the mode bar is always visible. If false, the mode bar is always hidden. If hover, the mode bar is visible while the mouse cursor is on the graph container.

Source

pub fn show_send_to_cloud(self, show_send_to_cloud: bool) -> Configuration

Should we include a ModeBar button, labeled “Edit in Chart Studio” that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server as specified by plotly_server_url for editing, export, etc? Prior to version 1.43.0 this button was included by default, now it is opt-in using this flag. Note that this button can (depending on plotly_server_url being set) send your data to an external server. However that server does not persist your data until you arrive at the Chart Studio and explicitly click “Save”.

Source

pub fn show_edit_in_chart_studio( self, show_edit_in_chart_studio: bool, ) -> Configuration

Same as show_send_to_cloud, but use a pencil icon instead of a floppy-disk. Note that if both show_send_to_cloud and show_edit_in_chart_studio are turned on, only show_edit_in_chart_studio will be honored.

Source

pub fn mode_bar_buttons_to_remove( self, mode_bar_buttons_to_remove: Vec<ModeBarButtonName>, ) -> Configuration

Remove mode bar buttons by name.

Source

pub fn to_image_button_options( self, to_image_button_options: ToImageButtonOptions, ) -> Configuration

Statically override options for toImage modebar button.

Determines whether or not the plotly logo is displayed on the end of the mode bar.

Source

pub fn watermark(self, watermark: bool) -> Configuration

Watermark the images with the company’s logo.

Source

pub fn plot_gl_pixel_ratio( self, plot_gl_pixel_ratio: PlotGLPixelRatio, ) -> Configuration

Set the pixel ratio during WebGL image export.

Source

pub fn topojson_url(self, topojson_url: &str) -> Configuration

Set the URL to topojson used in geo charts. By default, the topojson files are fetched from cdn.plot.ly. For example, set this option to: “<path-to-plotly.js>/dist/topojson/” to render geographical feature using the topojson files that ship with the plotly.js module.

Source

pub fn mapbox_access_token(self, mapbox_access_token: &str) -> Configuration

Mapbox access token (required to plot mapbox trace types). If using an Mapbox Atlas server, set this option to “” so that plotly.js won’t attempt to authenticate to the public Mapbox server.

Source

pub fn queue_length(self, queue_length: usize) -> Configuration

Sets the length of the undo/redo queue.

Source

pub fn locale(self, locale: &str) -> Configuration

Sets which localization to use. When using this setting, make sure that the appropriate locale is present in the HTML file. For example, to use the “fr” locale, must be present.

Trait Implementations§

Source§

impl Clone for Configuration

Source§

fn clone(&self) -> Configuration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Configuration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Configuration

Source§

fn default() -> Configuration

Returns the “default value” for a type. Read more
Source§

impl Serialize for Configuration

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V