GraphCellToRender.cs 1.1 KB

1234567891011121314151617181920212223242526
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Describes how to render a single row/column of a <see cref="GraphView"/> based on the value(s) in
  4. /// <see cref="ISeries"/> at that location
  5. /// </summary>
  6. public class GraphCellToRender
  7. {
  8. /// <summary>Creates instance and sets <see cref="Rune"/> with default graph coloring</summary>
  9. /// <param name="rune"></param>
  10. public GraphCellToRender (Rune rune) { Rune = rune; }
  11. /// <summary>Creates instance and sets <see cref="Rune"/> with custom graph coloring</summary>
  12. /// <param name="rune"></param>
  13. /// <param name="color"></param>
  14. public GraphCellToRender (Rune rune, Attribute color) : this (rune) { Color = color; }
  15. /// <summary>Creates instance and sets <see cref="Rune"/> and <see cref="Color"/> (or default if null)</summary>
  16. public GraphCellToRender (Rune rune, Attribute? color) : this (rune) { Color = color; }
  17. /// <summary>Optional color to render the <see cref="Rune"/> with</summary>
  18. public Attribute? Color { get; set; }
  19. /// <summary>The character to render in the console</summary>
  20. public Rune Rune { get; set; }
  21. }