BarSeriesBar.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. namespace Terminal.Gui;
  2. /// <summary>A single bar in a <see cref="BarSeries"/></summary>
  3. public class BarSeriesBar
  4. {
  5. /// <summary>
  6. /// Creates a new instance of a single bar rendered in the given <paramref name="fill"/> that extends out
  7. /// <paramref name="value"/> graph space units in the default <see cref="Orientation"/>
  8. /// </summary>
  9. /// <param name="text"></param>
  10. /// <param name="fill"></param>
  11. /// <param name="value"></param>
  12. public BarSeriesBar (string text, GraphCellToRender fill, float value)
  13. {
  14. Text = text;
  15. Fill = fill;
  16. Value = value;
  17. }
  18. /// <summary>The color and character that will be rendered in the console when the bar extends over it</summary>
  19. public GraphCellToRender Fill { get; set; }
  20. /// <summary>
  21. /// Optional text that describes the bar. This will be rendered on the corresponding <see cref="Axis"/> unless
  22. /// <see cref="BarSeries.DrawLabels"/> is false
  23. /// </summary>
  24. public string Text { get; set; }
  25. /// <summary>The value in graph space X/Y (depending on <see cref="Orientation"/>) to which the bar extends.</summary>
  26. public float Value { get; }
  27. }