Class ChartTask
A scheduled task, plotted by TwGanttChart.
public sealed record ChartTask : IEquatable<ChartTask>
- Inheritance
-
ChartTask
- Implements
- Inherited Members
Remarks
A task that ends when it starts (or before) is a milestone, drawn as a diamond. A task that other tasks name as their ParentId is a summary: its dates and progress are rolled up from the tasks under it.
Constructors
ChartTask(string, DateTime, DateTime)
A scheduled task, plotted by TwGanttChart.
public ChartTask(string Label, DateTime Start, DateTime End)
Parameters
LabelstringThe task name shown on the axis, tooltips and table view.
StartDateTimeWhen the task starts.
EndDateTimeWhen the task ends.
Remarks
A task that ends when it starts (or before) is a milestone, drawn as a diamond. A task that other tasks name as their ParentId is a summary: its dates and progress are rolled up from the tasks under it.
Properties
ColorIndex
Gets the zero-based slot of the theme's series colors the bar uses. Defaults to the first.
public int? ColorIndex { get; init; }
Property Value
- int?
End
When the task ends.
public DateTime End { get; init; }
Property Value
Id
Gets the identifier that dependencies and child tasks use to refer to this task. Defaults to Label, so it only needs setting when two tasks share a name.
public string? Id { get; init; }
Property Value
Key
public string Key { get; }
Property Value
Label
The task name shown on the axis, tooltips and table view.
public string Label { get; init; }
Property Value
ParentId
Gets the identifier of the summary task this task sits under, or null for a top-level task.
public string? ParentId { get; init; }
Property Value
Progress
Gets how far along the task is, from 0 (not started) to 1 (done), or null to show no progress.
public double? Progress { get; init; }
Property Value
Start
When the task starts.
public DateTime Start { get; init; }
Property Value
Methods
Deconstruct(out string, out DateTime, out DateTime)
public void Deconstruct(out string Label, out DateTime Start, out DateTime End)
Parameters
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(ChartTask?)
public bool Equals(ChartTask? other)
Parameters
otherChartTask
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(ChartTask?, ChartTask?)
public static bool operator ==(ChartTask? left, ChartTask? right)
Parameters
Returns
operator !=(ChartTask?, ChartTask?)
public static bool operator !=(ChartTask? left, ChartTask? right)