FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Chart

    struct · ferroui-controls-livecharts · v0.5.0

    struct Chart
    

    Shared host for all chart families. All application state stays on the UI thread.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Chart>
    

    Returns a strong reference to this object.

    Source

    construct

    fn construct() -> Self
    

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    revision

    fn revision(self: &Self) -> u64
    

    Source

    last_error

    fn last_error(self: &Self) -> Option<String>
    

    Source

    invalidate_chart

    fn invalidate_chart(self: &Self)
    

    Source

    scene

    fn scene(self: &Self, size: Size) -> Result<Rc<Scene>, ChartError>
    

    Measures once per data revision and size. The returned scene is an immutable snapshot.

    Source

    find_points

    fn find_points(self: &Self, position: Point) -> Vec<HitRegion>
    

    Source

    move_pointer

    fn move_pointer(self: &Self, position: Point)
    

    Source

    clear_hover

    fn clear_hover(self: &Self)
    

    Source

    hover_changed

    fn hover_changed(self: &Self, handler: impl Fn(&ChartPointerEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Source

    data_pointer_down

    fn data_pointer_down(self: &Self, handler: impl Fn(&ChartPointerEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Source

    update_finished

    fn update_finished(self: &Self, handler: impl Fn() -> () + 'static) -> Rc<dyn IDisposable>
    

    Source

    zoom_at

    fn zoom_at(self: &Self, position: Point, factor: f64) -> Result<bool, ChartError>
    

    Zooms about a control-local point. A disabled gesture returns false.

    Source

    pan_by

    fn pan_by(self: &Self, from: Point, to: Point) -> Result<bool, ChartError>
    

    Source

    zoom_to_section

    fn zoom_to_section(self: &Self, from: Point, to: Point) -> Result<bool, ChartError>
    

    Zooms to the part of the plot selected by a secondary pointer drag. Reversed selections and inverted/logarithmic axes use the same inverse scales.

    Source

    reset_zoom

    fn reset_zoom(self: &Self)
    

    Source

    axis_scales

    fn axis_scales(self: &Self) -> (Vec<AxisScale>, Vec<AxisScale>)
    

    Source

    polar_scale

    fn polar_scale(self: &Self, angle_axis: usize, radius_axis: usize) -> Result<Option<PolarScale>, ChartError>
    

    A resolved polar axis pair (PolarScaler): the angle scale maps to degrees, the radius scale to logical pixels from the centre, which includes the title and legend layout. None for another chart family or a missing axis.

    Source

    scale_data_to_pixels

    fn scale_data_to_pixels(self: &Self, data: Point, x_axis: usize, y_axis: usize) -> Result<Option<Point>, ChartError>
    

    Converts chart values (X/Y, or angle/radius of a polar chart) into control-local pixels. A missing axis or a chart family without axes returns None.

    Source

    scale_pixels_to_data

    fn scale_pixels_to_data(self: &Self, point: Point, x_axis: usize, y_axis: usize) -> Result<Option<Point>, ChartError>
    

    Inverse of scale_data_to_pixels, using the current layout and axis limits.

    Source

    presentation_scene

    fn presentation_scene(self: &Self, now_ms: f64, target: Rc<Scene>) -> Rc<Scene>
    

    Source

    zoom_level

    fn zoom_level(self: &Self) -> f64
    

    The zoom of a map (ZoomLevel), 1 by default.

    Source

    pan_offset

    fn pan_offset(self: &Self) -> Point
    

    The pan of a map (PanOffset), in pixels.

    Source

    map_viewport

    fn map_viewport(self: &Self) -> MapViewport
    

    The pan and zoom of a map.

    Source

    set_viewport

    fn set_viewport(self: &Self, zoom: f64, pan: Point)
    

    Sets the zoom and pan of a map (MapFactory.SetViewport).

    Source

    pan_map

    fn pan_map(self: &Self, delta: Point)
    

    Moves a map by a screen distance (GeoMapChart.Pan), whatever its interaction mode.

    Source

    zoom_map

    fn zoom_map(self: &Self, pivot: Point, direction: ZoomDirection)
    

    One zoom step of a map about a control-local position, which stays in place (GeoMapChart.Zoom), with the chart's ZoomingSpeed, MinZoomLevel and MaxZoomLevel, whatever its interaction mode.

    Source

    reset_viewport

    fn reset_viewport(self: &Self)
    

    The zoom and pan of a map back to none (ResetViewport).

    Source

    rotate_to

    fn rotate_to(self: &Self, longitude: f64, latitude: f64, duration_ms: f64)
    

    Turns a globe to face a longitude and latitude, the short way round, over the given time (RotateTo, 800 ms in the source, quadratic in and out); a duration of 0, or a chart not in a visual tree, turns it at once. Setting CenterLongitude or CenterLatitude ends the rotation.

    Source

    project

    fn project(self: &Self, longitude: f64, latitude: f64) -> Result<Option<Point>, ChartError>
    

    The control-local position of a longitude and latitude on a map (GeoMapChart.Project), through its projection, rotation and viewport; None on the far side of a globe or for another chart family.

    Source

    unproject

    fn unproject(self: &Self, point: Point) -> Result<Option<(f64, f64)>, ChartError>
    

    The longitude and latitude of a control-local position on a map (GeoMapChart.Unproject); None outside the disc of a globe or for another chart family.

    Source

    find_land_at

    fn find_land_at(self: &Self, position: Point) -> Option<GeoLand>
    

    The land of a map whose shape contains the position (FindLandAt): its names, the values of the series that have one and the anchor of its tooltip.

    Source

    map_land

    fn map_land(self: &Self, id: PointId) -> Option<GeoLand>
    

    The land of a point of a map event (ChartPoint.Context.DataSource, a LandDefinition in the source).

    Source

    chart_kind_property

    fn chart_kind_property() -> &'static StyledProperty<ChartKind>
    

    Source

    series_property

    fn series_property() -> &'static StyledProperty<ChartSeriesCollection>
    

    Source

    x_axes_property

    fn x_axes_property() -> &'static StyledProperty<Axes>
    

    Source

    y_axes_property

    fn y_axes_property() -> &'static StyledProperty<Axes>
    

    Source

    title_property

    fn title_property() -> &'static StyledProperty<String>
    

    Source

    title_size_property

    fn title_size_property() -> &'static StyledProperty<f64>
    

    Source

    text_color_property

    fn text_color_property() -> &'static StyledProperty<Color>
    

    Source

    legend_position_property

    fn legend_position_property() -> &'static StyledProperty<LegendPosition>
    

    Source

    tooltip_position_property

    fn tooltip_position_property() -> &'static StyledProperty<TooltipPosition>
    

    Source

    tooltip_finding_strategy_property

    fn tooltip_finding_strategy_property() -> &'static StyledProperty<FindingStrategy>
    

    Source

    tooltip_tolerance_property

    fn tooltip_tolerance_property() -> &'static StyledProperty<f64>
    

    Source

    zoom_mode_property

    fn zoom_mode_property() -> &'static StyledProperty<ZoomAndPanMode>
    

    Source

    zooming_speed_property

    fn zooming_speed_property() -> &'static StyledProperty<f64>
    

    Source

    animations_speed_property

    fn animations_speed_property() -> &'static StyledProperty<f64>
    

    Source

    draw_margin_property

    fn draw_margin_property() -> &'static StyledProperty<Option<Rect>>
    

    Source

    sections_property

    fn sections_property() -> &'static StyledProperty<Vec<Section>>
    

    Source

    initial_rotation_property

    fn initial_rotation_property() -> &'static StyledProperty<f64>
    

    Source

    max_angle_property

    fn max_angle_property() -> &'static StyledProperty<f64>
    

    Source

    inner_radius_property

    fn inner_radius_property() -> &'static StyledProperty<f64>
    

    Source

    fit_to_bounds_property

    fn fit_to_bounds_property() -> &'static StyledProperty<bool>
    

    Source

    min_value_property

    fn min_value_property() -> &'static StyledProperty<f64>
    

    Source

    max_value_property

    fn max_value_property() -> &'static StyledProperty<Option<f64>>
    

    Source

    clockwise_property

    fn clockwise_property() -> &'static StyledProperty<bool>
    

    Source

    active_map_property

    fn active_map_property() -> &'static StyledProperty<Option<Rc<DrawnMap>>>
    

    Source

    map_projection_property

    fn map_projection_property() -> &'static StyledProperty<MapProjection>
    

    Source

    min_latitude_property

    fn min_latitude_property() -> &'static StyledProperty<Option<f64>>
    

    Source

    max_latitude_property

    fn max_latitude_property() -> &'static StyledProperty<Option<f64>>
    

    Source

    min_longitude_property

    fn min_longitude_property() -> &'static StyledProperty<Option<f64>>
    

    Source

    max_longitude_property

    fn max_longitude_property() -> &'static StyledProperty<Option<f64>>
    

    Source

    interaction_mode_property

    fn interaction_mode_property() -> &'static StyledProperty<MapInteractionMode>
    

    Source

    min_zoom_level_property

    fn min_zoom_level_property() -> &'static StyledProperty<f64>
    

    Source

    max_zoom_level_property

    fn max_zoom_level_property() -> &'static StyledProperty<f64>
    

    Source

    stroke_property

    fn stroke_property() -> &'static StyledProperty<Option<Color>>
    

    Source

    fill_property

    fn fill_property() -> &'static StyledProperty<Option<Color>>
    

    Source

    center_longitude_property

    fn center_longitude_property() -> &'static StyledProperty<f64>
    

    Source

    center_latitude_property

    fn center_latitude_property() -> &'static StyledProperty<f64>
    

    Source

    markers_property

    fn markers_property() -> &'static StyledProperty<GeoMarkers>
    

    Source

    visual_elements_property

    fn visual_elements_property() -> &'static StyledProperty<ChartVisualElements>
    

    Source

    chart_kind

    fn chart_kind(self: &Self) -> ChartKind
    

    Source

    set_chart_kind

    fn set_chart_kind(self: &Self, value: ChartKind)
    

    Source

    series

    fn series(self: &Self) -> ChartSeriesCollection
    

    Source

    set_series

    fn set_series(self: &Self, value: ChartSeriesCollection)
    

    Source

    x_axes

    fn x_axes(self: &Self) -> Axes
    

    Source

    set_x_axes

    fn set_x_axes(self: &Self, value: Axes)
    

    Source

    y_axes

    fn y_axes(self: &Self) -> Axes
    

    Source

    set_y_axes

    fn set_y_axes(self: &Self, value: Axes)
    

    Source

    title

    fn title(self: &Self) -> String
    

    Source

    set_title

    fn set_title(self: &Self, value: String)
    

    Source

    title_size

    fn title_size(self: &Self) -> f64
    

    Source

    set_title_size

    fn set_title_size(self: &Self, value: f64)
    

    Source

    text_color

    fn text_color(self: &Self) -> Color
    

    Source

    set_text_color

    fn set_text_color(self: &Self, value: Color)
    

    Source

    legend_position

    fn legend_position(self: &Self) -> LegendPosition
    

    Source

    set_legend_position

    fn set_legend_position(self: &Self, value: LegendPosition)
    

    Source

    tooltip_position

    fn tooltip_position(self: &Self) -> TooltipPosition
    

    Source

    set_tooltip_position

    fn set_tooltip_position(self: &Self, value: TooltipPosition)
    

    Source

    tooltip_finding_strategy

    fn tooltip_finding_strategy(self: &Self) -> FindingStrategy
    

    Source

    set_tooltip_finding_strategy

    fn set_tooltip_finding_strategy(self: &Self, value: FindingStrategy)
    

    Source

    tooltip_tolerance

    fn tooltip_tolerance(self: &Self) -> f64
    

    Source

    set_tooltip_tolerance

    fn set_tooltip_tolerance(self: &Self, value: f64)
    

    Source

    zoom_mode

    fn zoom_mode(self: &Self) -> ZoomAndPanMode
    

    Source

    set_zoom_mode

    fn set_zoom_mode(self: &Self, value: ZoomAndPanMode)
    

    Source

    zooming_speed

    fn zooming_speed(self: &Self) -> f64
    

    Source

    set_zooming_speed

    fn set_zooming_speed(self: &Self, value: f64)
    

    Source

    animations_speed

    fn animations_speed(self: &Self) -> f64
    

    Source

    set_animations_speed

    fn set_animations_speed(self: &Self, value: f64)
    

    Source

    draw_margin

    fn draw_margin(self: &Self) -> Option<Rect>
    

    Source

    set_draw_margin

    fn set_draw_margin(self: &Self, value: Option<Rect>)
    

    Source

    sections

    fn sections(self: &Self) -> Vec<Section>
    

    Source

    set_sections

    fn set_sections(self: &Self, value: Vec<Section>)
    

    Source

    initial_rotation

    fn initial_rotation(self: &Self) -> f64
    

    Source

    set_initial_rotation

    fn set_initial_rotation(self: &Self, value: f64)
    

    Source

    max_angle

    fn max_angle(self: &Self) -> f64
    

    Source

    set_max_angle

    fn set_max_angle(self: &Self, value: f64)
    

    Source

    inner_radius

    fn inner_radius(self: &Self) -> f64
    

    Source

    set_inner_radius

    fn set_inner_radius(self: &Self, value: f64)
    

    Source

    fit_to_bounds

    fn fit_to_bounds(self: &Self) -> bool
    

    Source

    set_fit_to_bounds

    fn set_fit_to_bounds(self: &Self, value: bool)
    

    Source

    min_value

    fn min_value(self: &Self) -> f64
    

    Source

    set_min_value

    fn set_min_value(self: &Self, value: f64)
    

    Source

    max_value

    fn max_value(self: &Self) -> Option<f64>
    

    Source

    set_max_value

    fn set_max_value(self: &Self, value: Option<f64>)
    

    Source

    clockwise

    fn clockwise(self: &Self) -> bool
    

    Source

    set_clockwise

    fn set_clockwise(self: &Self, value: bool)
    

    Source

    active_map

    fn active_map(self: &Self) -> Option<Rc<DrawnMap>>
    

    Source

    set_active_map

    fn set_active_map(self: &Self, value: Option<Rc<DrawnMap>>)
    

    Source

    map_projection

    fn map_projection(self: &Self) -> MapProjection
    

    Source

    set_map_projection

    fn set_map_projection(self: &Self, value: MapProjection)
    

    Source

    min_latitude

    fn min_latitude(self: &Self) -> Option<f64>
    

    Source

    set_min_latitude

    fn set_min_latitude(self: &Self, value: Option<f64>)
    

    Source

    max_latitude

    fn max_latitude(self: &Self) -> Option<f64>
    

    Source

    set_max_latitude

    fn set_max_latitude(self: &Self, value: Option<f64>)
    

    Source

    min_longitude

    fn min_longitude(self: &Self) -> Option<f64>
    

    Source

    set_min_longitude

    fn set_min_longitude(self: &Self, value: Option<f64>)
    

    Source

    max_longitude

    fn max_longitude(self: &Self) -> Option<f64>
    

    Source

    set_max_longitude

    fn set_max_longitude(self: &Self, value: Option<f64>)
    

    Source

    interaction_mode

    fn interaction_mode(self: &Self) -> MapInteractionMode
    

    Source

    set_interaction_mode

    fn set_interaction_mode(self: &Self, value: MapInteractionMode)
    

    Source

    min_zoom_level

    fn min_zoom_level(self: &Self) -> f64
    

    Source

    set_min_zoom_level

    fn set_min_zoom_level(self: &Self, value: f64)
    

    Source

    max_zoom_level

    fn max_zoom_level(self: &Self) -> f64
    

    Source

    set_max_zoom_level

    fn set_max_zoom_level(self: &Self, value: f64)
    

    Source

    stroke

    fn stroke(self: &Self) -> Option<Color>
    

    Source

    set_stroke

    fn set_stroke(self: &Self, value: Option<Color>)
    

    Source

    fill

    fn fill(self: &Self) -> Option<Color>
    

    Source

    set_fill

    fn set_fill(self: &Self, value: Option<Color>)
    

    Source

    center_longitude

    fn center_longitude(self: &Self) -> f64
    

    Source

    set_center_longitude

    fn set_center_longitude(self: &Self, value: f64)
    

    Source

    center_latitude

    fn center_latitude(self: &Self) -> f64
    

    Source

    set_center_latitude

    fn set_center_latitude(self: &Self, value: f64)
    

    Source

    markers

    fn markers(self: &Self) -> GeoMarkers
    

    Source

    set_markers

    fn set_markers(self: &Self, value: GeoMarkers)
    

    Source

    visual_elements

    fn visual_elements(self: &Self) -> ChartVisualElements
    

    Source

    set_visual_elements

    fn set_visual_elements(self: &Self, value: ChartVisualElements)
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.