Skip to content

Commit

Permalink
minor control fixes for Box and Histogram
Browse files Browse the repository at this point in the history
(cherry picked from commit 10a6c92)
  • Loading branch information
ctacke committed Aug 9, 2024
1 parent 5b8682c commit fd0061a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,14 @@ private void DrawSeries(MicroGraphics graphics, List<HistogramChartSeries> serie
var barHeight = (int)(heightScale * pair.Y);

// make sure we don't draw off-chart for over-scale values
if (barHeight > ChartAreaHeight) { barHeight = ChartAreaHeight; }
if (barHeight > ChartAreaHeight)
{
barHeight = ChartAreaHeight;
}
if ((x < ChartAreaLeft) || (x > ChartAreaLeft + ChartAreaWidth))
{
continue;
}

DrawValueBar(
graphics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
public class Box : ThemedControl
{
private Color _foreColor;
private bool _isFilled = true;

/// <summary>
/// Gets or sets a value indicating whether the display box is filled with the foreground color.
/// </summary>
public bool IsFilled { get; set; } = true;
public bool IsFilled
{
get => _isFilled;
set => SetInvalidatingProperty(ref _isFilled, value);
}

/// <summary>
/// Initializes a new instance of the <see cref="Box"/> class with the specified dimensions.
Expand Down

0 comments on commit fd0061a

Please sign in to comment.