Skip to main content

SvgRenderer

Struct SvgRenderer 

Source
pub struct SvgRenderer {
Show 14 fields pub chart_width: u32, pub row_height: u32, pub label_width: u32, pub header_height: u32, pub padding: u32, pub critical_color: String, pub normal_color: String, pub milestone_color: String, pub background_color: String, pub grid_color: String, pub text_color: String, pub font_family: String, pub font_size: u32, pub display_mode: DisplayMode,
}
Expand description

SVG Gantt chart renderer configuration

Fields§

§chart_width: u32

Width of the chart area (excluding labels) in pixels

§row_height: u32

Height per task row in pixels

§label_width: u32

Width of the label column in pixels

§header_height: u32

Header height in pixels

§padding: u32

Padding around the chart

§critical_color: String

Color for critical path tasks

§normal_color: String

Color for normal tasks

§milestone_color: String

Color for milestones

§background_color: String

Background color

§grid_color: String

Grid line color

§text_color: String

Text color

§font_family: String

Font family

§font_size: u32

Font size in pixels

§display_mode: DisplayMode

Display mode for task labels

Implementations§

Source§

impl SvgRenderer

Source

pub fn new() -> Self

Source

pub fn chart_width(self, width: u32) -> Self

Configure chart width

Source

pub fn row_height(self, height: u32) -> Self

Configure row height

Source

pub fn label_width(self, width: u32) -> Self

Configure label column width

Source

pub fn display_mode(self, mode: DisplayMode) -> Self

Configure display mode for task labels

Trait Implementations§

Source§

impl Clone for SvgRenderer

Source§

fn clone(&self) -> SvgRenderer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SvgRenderer

Source§

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

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

impl Default for SvgRenderer

Source§

fn default() -> Self

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

impl Renderer for SvgRenderer

Source§

type Output = String

Source§

fn render( &self, project: &Project, schedule: &Schedule, ) -> Result<String, RenderError>

Render a schedule to the output format

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

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.