pub struct TkHistogram {
    pub id: String,
}
Expand description

Refers to a histogram

Fields§

§id: String

Implementations§

source§

impl TkHistogram

source

pub fn plot(&self, series: &str, (x, y): (f64, f64))

Plots a single bar - the x-value defines the right-hand side of the bar.

source

pub fn plot_cumulative(&self, series: &str, (x, y): (f64, f64))

Plots a single bar, accumulating the previous values. The x-value defines the right-hand side of the bar.

source

pub fn series_style(&self, series: &str, value: HistogramStyle)

Sets display-style of histogram.

Trait Implementations§

source§

impl Clone for TkHistogram

source§

fn clone(&self) -> TkHistogram

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 TkHistogram

source§

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

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

impl PartialEq for TkHistogram

source§

fn eq(&self, other: &TkHistogram) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TkChartSeries for TkHistogram

source§

fn series_colour(&self, series: &str, colour: &str)

Sets colour for displaying data series
source§

fn series_drawing_mode(&self, series: &str, mode: DrawingMode)

Sets drawing mode for displaying data series (called “type” in tklib’s plotchart documentation).
source§

fn series_fill_area(&self, series: &str, area: FillArea)

Used to select whether to fill the area above or below the line of data series.
source§

fn series_fill_colour(&self, series: &str, colour: &str)

Sets colour to use when drawing filled area.
source§

fn series_line_width(&self, series: &str, width: u64)

Sets width of line for displaying data series
source§

fn series_symbol(&self, series: &str, symbol: Symbol, radius: u64)

Sets symbol type and radius for displaying data series
source§

impl TkPlotchart for TkHistogram

source§

fn id(&self) -> &str

Returns the widget’s id reference - used within tk

source§

fn background_axes_colour(&self, colour: &str)

Sets the background colour for the axes.
source§

fn background_gradient_colour( &self, colour: &str, direction: GradientDirection, brightness: Brightness )

Sets a background gradient.
source§

fn background_image(&self, image: &TkImage)

Sets a background image.
source§

fn background_plot_colour(&self, colour: &str)

Sets the background colour for the plot area.
source§

fn balloon(&self, (x, y): (f64, f64), text: &str, direction: Direction)

Creates balloon text (does not work for 3D plots).
source§

fn balloon_arrow_size(&self, value: u64)

Sets arrow-length, in pixels, for balloon text.
source§

fn balloon_background_colour(&self, colour: &str)

Sets background colour of balloon text.
source§

fn balloon_font(&self, font: &TkFont)

Sets font for balloon text.
source§

fn balloon_justify(&self, value: Justify)

Sets justification for balloon text.
source§

fn balloon_outline_colour(&self, colour: &str)

Sets outline colour of balloon text.
source§

fn balloon_margin(&self, value: u64)

Sets width of margin, in pixels, around balloon text.
source§

fn balloon_rim_width(&self, value: u64)

Sets margin size, in pixels, around balloon text.
source§

fn balloon_text_colour(&self, colour: &str)

Sets colour of balloon text.
source§

fn draw_x_band(&self, y_min: f64, y_max: f64)

Draws a horizontal light-grey band.
source§

fn draw_y_band(&self, y_min: f64, y_max: f64)

Draws a vertical light-grey band.
source§

fn erase(&self)

Erases this plot and all associated resources.
source§

fn legend(&self, series: &str, text: &str)

Adds a line to legend for given data series.
source§

fn legend_background(&self, colour: &str)

Sets background colour for legend.
source§

fn legend_border(&self, colour: &str)

Sets border colour for legend.
source§

fn legend_canvas(&self, canvas: &TkCanvas)

Sets canvas on which to draw legend.
source§

fn legend_font(&self, font: &TkFont)

Sets font with which to draw legend.
source§

fn legend_position(&self, value: Position)

Position of legend on display.
source§

fn legend_remove(&self, series: &str)

Removes legend entry for given series.
source§

fn legend_spacing(&self, value: u64)

Sets spacing between rows in legend.
source§

fn legend_type(&mut self, value: LegendType)

Type of legend to display - series identified by line or colour rectangle.
source§

fn plaintext(&self, (x, y): (f64, f64), text: &str, direction: Direction)

Starts definition of plain text (does not work for 3D plots).
source§

fn plaintext_colour(&self, colour: &str)

Sets colour of plain text.
source§

fn plaintext_font(&self, font: &TkFont)

Sets font for plain text.
source§

fn plaintext_justify(&self, value: Justify)

Sets justification for plain text.
source§

fn save(&self, filename: &str)

Saves chart to a file in postscript format.
source§

fn subtitle(&self, text: &str)

Sets subtitle of chart.
source§

fn title(&self, text: &str, placement: Justify)

Sets title of chart.
source§

fn v_subtitle(&self, text: &str)

Sets subtitle of the (vertical) y-axis, and displays vertically along axis.
source§

fn v_title(&self, text: &str)

Sets title of the (vertical) y-axis, and displays vertically along axis.
source§

fn x_format(&self, format: &str)

Sets tcl format string for numbers, see Tk manual
source§

fn x_label_offset(&self, value: f64)

Sets space in pixels between label and tickmark.
source§

fn x_minor_ticks(&self, value: u64)

Sets number of minor tick marks.
source§

fn x_scale(&self, (min, max, step): (f64, f64, f64))

Changes x-axis definition to (min, max, step).
source§

fn x_subtitle(&self, text: &str)

Sets subtitle of the (horizontal) x-axis.
source§

fn x_tick_lines(&self, colour: &str, dash: ChartDash)

Turns on display of vertical ticklines at each tick location.
source§

fn x_tick_length(&self, value: u64)

Sets length in pixels of tick lines.
source§

fn x_title(&self, text: &str)

Sets title of the (horizontal) x-axis.
source§

fn y_format(&self, format: &str)

Sets tcl format string for numbers, see Tk manual
source§

fn y_label_offset(&self, value: f64)

Sets space in pixels between label and tickmark.
source§

fn y_minor_ticks(&self, value: u64)

Sets number of minor tick marks.
source§

fn y_scale(&self, (min, max, step): (f64, f64, f64))

Changes y-axis definition to (min, max, step).
source§

fn y_subtitle(&self, text: &str)

Sets subtitle of the (vertical) y-axis.
source§

fn y_tick_lines(&self, colour: &str, dash: ChartDash)

Turns on display of vertical ticklines at each tick location.
source§

fn y_tick_length(&self, value: u64)

Sets length in pixels of tick lines.
source§

fn y_title(&self, text: &str)

Sets title of the (vertical) y-axis.
source§

impl StructuralPartialEq for TkHistogram

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> 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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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.