Skip to main content

HtmlGanttRenderer

Struct HtmlGanttRenderer 

Source
pub struct HtmlGanttRenderer {
    pub chart_width: u32,
    pub row_height: u32,
    pub label_width: u32,
    pub header_height: u32,
    pub padding: u32,
    pub theme: GanttTheme,
    pub show_dependencies: bool,
    pub interactive: bool,
    pub focus: Option<FocusConfig>,
}
Expand description

HTML 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

§theme: GanttTheme

Theme (light or dark)

§show_dependencies: bool

Show dependency arrows

§interactive: bool

Enable interactivity (tooltips, click handlers)

§focus: Option<FocusConfig>

Focus view configuration (None = show all tasks)

Implementations§

Source§

impl HtmlGanttRenderer

Source

pub fn new() -> Self

Source

pub fn dark_theme(self) -> Self

Use dark theme

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 hide_dependencies(self) -> Self

Disable dependency arrows

Source

pub fn static_chart(self) -> Self

Disable interactivity

Source

pub fn focus(self, patterns: Vec<String>) -> Self

Set focus view configuration

Focus view expands tasks matching the patterns while collapsing others.

§Arguments
  • patterns - Task ID prefixes or glob patterns to expand
§Example
let renderer = HtmlGanttRenderer::new()
    .focus(vec!["6.3.2".into(), "8.6".into()]);
Source

pub fn context_depth(self, depth: usize) -> Self

Set context depth for non-focused tasks

  • 0 = hide all non-focused tasks
  • 1 = show only top-level containers (default)
  • 2 = show two levels of hierarchy
§Example
let renderer = HtmlGanttRenderer::new()
    .focus(vec!["6.3.2".into()])
    .context_depth(0); // Hide all context

Trait Implementations§

Source§

impl Clone for HtmlGanttRenderer

Source§

fn clone(&self) -> HtmlGanttRenderer

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 HtmlGanttRenderer

Source§

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

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

impl Default for HtmlGanttRenderer

Source§

fn default() -> Self

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

impl Renderer for HtmlGanttRenderer

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.