Class
Distribution
ConsoleMonster.Frames
Counts in labelled buckets with line bars on one shared scale; a bucket gets a role only when its owner marks it.
Inheritance
- object
- Distribution
Usage
Explore 6 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
- Extension method Distribution.BarWidth
- Method Distribution.Add
- Method Distribution.AddNote
- Method DistributionFluent.BarWidth
Accepted by parameters 2
- Extension method Distribution.BarWidth
- Method DistributionFluent.BarWidth
Constructors
public Distribution() #Methods
public Distribution Add(string label, long count, HealthState? state = null) #Adds a bucket.
Parameters
- label string
- The literal label.
- count long
- The count.
- state ConsoleMonster.Frames.HealthState? = null
- Optional state for buckets past a threshold the data owner supplied.
public Distribution AddNote(string label, long count, HealthState state, string note) #Adds a row without a bar, such as items that were not read.
Parameters
- label string
- The literal label.
- count long
- The count.
- state ConsoleMonster.Frames.HealthState
- The note's state.
- note string
- A literal note in place of the bar.
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
public int BarWidth { get; set; } #The bar width the distribution would like (default 25).
Extension Methods
public static Distribution BarWidth(Distribution distribution, int value) #Sets Distribution.BarWidth: The bar width the distribution would like (default 25).
Parameters
- distribution ConsoleMonster.Frames.Distribution
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Frames.Distribution { BarWidth = value }; distribution.BarWidth(value);