BarSeriesBar.cs 1.1 KB

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