Struct plotters_iced::ChartBuilder[][src]

pub struct ChartBuilder<'a, 'b, DB> where
    DB: DrawingBackend
{ /* fields omitted */ }
Expand description

The helper object to create a chart context, which is used for the high-level figure drawing. With the help of this object, we can convert a basic drawing area into a chart context, which allows the high-level charting API being used on the drawing area.

Implementations

Create a chart builder on the given drawing area

  • root: The root drawing area
  • Returns: The chart builder object

Set the margin size of the chart (applied for top, bottom, left and right at the same time)

  • size: The size of the chart margin.

Set the top margin of current chart

  • size: The size of the top margin.

Set the bottom margin of current chart

  • size: The size of the bottom margin.

Set the left margin of current chart

  • size: The size of the left margin.

Set the right margin of current chart

  • size: The size of the right margin.

Set all the label area size with the same value

Set the most commonly used label area size to the same value

Set the size of X label area

  • size: The height of the x label area, if x is 0, the chart doesn’t have the X label area

Set the size of the Y label area

  • size: The width of the Y label area. If size is 0, the chart doesn’t have Y label area

Set the size of X label area on the top of the chart

  • size: The height of the x label area, if x is 0, the chart doesn’t have the X label area

Set the size of the Y label area on the right side

  • size: The width of the Y label area. If size is 0, the chart doesn’t have Y label area

Set a label area size

  • pos: THe position where the label area located
  • size: The size of the label area size

Set the caption of the chart

  • caption: The caption of the chart
  • style: The text style
  • Note: If the caption is set, the margin option will be ignored
👎 Deprecated:

build_ranged has been renamed to build_cartesian_2d and is to be removed in the future.

Build the chart with a 2D Cartesian coordinate system. The function will returns a chart context, where data series can be rendered on.

  • x_spec: The specification of X axis
  • y_spec: The specification of Y axis
  • Returns: A chart context

Build a 3 dimensional cartesian chart. The function will returns a chart context, where data series can be rendered on.

  • x_spec: The specification of X axis
  • y_spec: The specification of Y axis
  • z_sepc: The specification of Z axis
  • Returns: A chart context

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.