Skip to main content

GraphType

Trait GraphType 

Source
pub trait GraphType {
    // Required method
    fn plot_type() -> PlotType;
}
Expand description

A trait defining the type of graph or plot used for visualization purposes.

The GraphType trait is designed to provide a standardized way to determine the visualization type for a given data representation. Implementors of this trait should define the specific plot type that suits their data or visualization needs.

§Usage

Implement this trait for any data structure or context that requires a well-defined graph type for displaying data.

Required Methods§

Source

fn plot_type() -> PlotType

Returns the type of plot to be used for visualization.

§Description

The plot_type function determines and returns the type of plot that should be used. This information can be useful when configuring or rendering visual data representations. The returned PlotType is typically an enum or specific type representing various available plot types (e.g., line plot, bar chart, scatter plot, etc.).

§Returns
  • PlotType - The specific type of plot identified for use.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§