Terminal.Gui.Graphs.LegendAnnotation.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class LegendAnnotation
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class LegendAnnotation
  11. ">
  12. <link rel="shortcut icon" href="../../favicon.ico">
  13. <link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
  14. <link rel="stylesheet" href="../../styles/docfx.css">
  15. <link rel="stylesheet" href="../../styles/main.css">
  16. <meta property="docfx:navrel" content="../../toc.html">
  17. <meta property="docfx:tocrel" content="toc.html">
  18. <meta property="docfx:rel" content="../../">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div class="container body-content">
  54. <div id="search-results">
  55. <div class="search-list">Search Results for <span></span></div>
  56. <div class="sr-items">
  57. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  58. </div>
  59. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  60. </div>
  61. </div>
  62. <div role="main" class="container body-content hide-when-search">
  63. <div class="sidenav hide-when-search">
  64. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  65. <div class="sidetoggle collapse" id="sidetoggle">
  66. <div id="sidetoc"></div>
  67. </div>
  68. </div>
  69. <div class="article row grid-right">
  70. <div class="col-md-10">
  71. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Graphs.LegendAnnotation">
  72. <h1 id="Terminal_Gui_Graphs_LegendAnnotation" data-uid="Terminal.Gui.Graphs.LegendAnnotation" class="text-break">Class LegendAnnotation
  73. </h1>
  74. <div class="markdown level0 summary">A box containing symbol definitions e.g. meanings for colors in a graph.
  75. The 'Key' to the graph</div>
  76. <div class="markdown level0 conceptual"></div>
  77. <div class="inheritance">
  78. <h5>Inheritance</h5>
  79. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
  80. <div class="level1"><span class="xref">LegendAnnotation</span></div>
  81. </div>
  82. <div class="implements">
  83. <h5>Implements</h5>
  84. <div><a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a></div>
  85. </div>
  86. <div class="inheritedMembers">
  87. <h5>Inherited Members</h5>
  88. <div>
  89. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
  90. </div>
  91. <div>
  92. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
  93. </div>
  94. <div>
  95. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
  96. </div>
  97. <div>
  98. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
  99. </div>
  100. <div>
  101. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
  102. </div>
  103. <div>
  104. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
  108. </div>
  109. </div>
  110. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.html">Terminal</a>.<a class="xref" href="Terminal.Gui.html">Gui</a>.<a class="xref" href="Terminal.Gui.Graphs.html">Graphs</a></h6>
  111. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  112. <h5 id="Terminal_Gui_Graphs_LegendAnnotation_syntax">Syntax</h5>
  113. <div class="codewrapper">
  114. <pre><code class="lang-csharp hljs">public class LegendAnnotation : IAnnotation</code></pre>
  115. </div>
  116. <h3 id="constructors">Constructors
  117. </h3>
  118. <span class="small pull-right mobile-hide">
  119. <span class="divider">|</span>
  120. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LegendAnnotation__ctor_Terminal_Gui_Rect_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LegendAnnotation.%23ctor(Terminal.Gui.Rect)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  121. </span>
  122. <span class="small pull-right mobile-hide">
  123. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L148">View Source</a>
  124. </span>
  125. <a id="Terminal_Gui_Graphs_LegendAnnotation__ctor_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.#ctor*"></a>
  126. <h4 id="Terminal_Gui_Graphs_LegendAnnotation__ctor_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.#ctor(Terminal.Gui.Rect)">LegendAnnotation(Rect)</h4>
  127. <div class="markdown level1 summary">Creates a new empty legend at the given screen coordinates</div>
  128. <div class="markdown level1 conceptual"></div>
  129. <h5 class="declaration">Declaration</h5>
  130. <div class="codewrapper">
  131. <pre><code class="lang-csharp hljs">public LegendAnnotation(Rect legendBounds)</code></pre>
  132. </div>
  133. <h5 class="parameters">Parameters</h5>
  134. <table class="table table-bordered table-condensed">
  135. <thead>
  136. <tr>
  137. <th>Type</th>
  138. <th>Name</th>
  139. <th>Description</th>
  140. </tr>
  141. </thead>
  142. <tbody>
  143. <tr>
  144. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  145. <td><span class="parametername">legendBounds</span></td>
  146. <td>Defines the area available for the legend to render in
  147. (within the graph). This is in screen units (i.e. not graph space)</td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <h3 id="properties">Properties
  152. </h3>
  153. <span class="small pull-right mobile-hide">
  154. <span class="divider">|</span>
  155. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LegendAnnotation_BeforeSeries.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LegendAnnotation.BeforeSeries%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  156. </span>
  157. <span class="small pull-right mobile-hide">
  158. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L136">View Source</a>
  159. </span>
  160. <a id="Terminal_Gui_Graphs_LegendAnnotation_BeforeSeries_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.BeforeSeries*"></a>
  161. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_BeforeSeries" data-uid="Terminal.Gui.Graphs.LegendAnnotation.BeforeSeries">BeforeSeries</h4>
  162. <div class="markdown level1 summary">Returns false i.e. Lengends render after series</div>
  163. <div class="markdown level1 conceptual"></div>
  164. <h5 class="declaration">Declaration</h5>
  165. <div class="codewrapper">
  166. <pre><code class="lang-csharp hljs">public bool BeforeSeries { get; }</code></pre>
  167. </div>
  168. <h5 class="propertyValue">Property Value</h5>
  169. <table class="table table-bordered table-condensed">
  170. <thead>
  171. <tr>
  172. <th>Type</th>
  173. <th>Description</th>
  174. </tr>
  175. </thead>
  176. <tbody>
  177. <tr>
  178. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  179. <td></td>
  180. </tr>
  181. </tbody>
  182. </table>
  183. <span class="small pull-right mobile-hide">
  184. <span class="divider">|</span>
  185. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LegendAnnotation_Border.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LegendAnnotation.Border%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  186. </span>
  187. <span class="small pull-right mobile-hide">
  188. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L126">View Source</a>
  189. </span>
  190. <a id="Terminal_Gui_Graphs_LegendAnnotation_Border_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Border*"></a>
  191. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_Border" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Border">Border</h4>
  192. <div class="markdown level1 summary">True to draw a solid border around the legend.
  193. Defaults to true. This border will be within the
  194. <a class="xref" href="Terminal.Gui.Graphs.LegendAnnotation.html#Terminal_Gui_Graphs_LegendAnnotation_Bounds">Bounds</a> and so reduces the width/height
  195. available for text by 2</div>
  196. <div class="markdown level1 conceptual"></div>
  197. <h5 class="declaration">Declaration</h5>
  198. <div class="codewrapper">
  199. <pre><code class="lang-csharp hljs">public bool Border { get; set; }</code></pre>
  200. </div>
  201. <h5 class="propertyValue">Property Value</h5>
  202. <table class="table table-bordered table-condensed">
  203. <thead>
  204. <tr>
  205. <th>Type</th>
  206. <th>Description</th>
  207. </tr>
  208. </thead>
  209. <tbody>
  210. <tr>
  211. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  212. <td></td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. <span class="small pull-right mobile-hide">
  217. <span class="divider">|</span>
  218. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LegendAnnotation_Bounds.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LegendAnnotation.Bounds%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  219. </span>
  220. <span class="small pull-right mobile-hide">
  221. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L131">View Source</a>
  222. </span>
  223. <a id="Terminal_Gui_Graphs_LegendAnnotation_Bounds_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Bounds*"></a>
  224. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_Bounds" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Bounds">Bounds</h4>
  225. <div class="markdown level1 summary">Defines the screen area available for the legend to render in</div>
  226. <div class="markdown level1 conceptual"></div>
  227. <h5 class="declaration">Declaration</h5>
  228. <div class="codewrapper">
  229. <pre><code class="lang-csharp hljs">public Rect Bounds { get; set; }</code></pre>
  230. </div>
  231. <h5 class="propertyValue">Property Value</h5>
  232. <table class="table table-bordered table-condensed">
  233. <thead>
  234. <tr>
  235. <th>Type</th>
  236. <th>Description</th>
  237. </tr>
  238. </thead>
  239. <tbody>
  240. <tr>
  241. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  242. <td></td>
  243. </tr>
  244. </tbody>
  245. </table>
  246. <h3 id="methods">Methods
  247. </h3>
  248. <span class="small pull-right mobile-hide">
  249. <span class="divider">|</span>
  250. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LegendAnnotation_AddEntry_Terminal_Gui_Graphs_GraphCellToRender_System_String_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LegendAnnotation.AddEntry(Terminal.Gui.Graphs.GraphCellToRender%2CSystem.String)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  251. </span>
  252. <span class="small pull-right mobile-hide">
  253. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L209">View Source</a>
  254. </span>
  255. <a id="Terminal_Gui_Graphs_LegendAnnotation_AddEntry_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.AddEntry*"></a>
  256. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_AddEntry_Terminal_Gui_Graphs_GraphCellToRender_System_String_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.AddEntry(Terminal.Gui.Graphs.GraphCellToRender,System.String)">AddEntry(GraphCellToRender, string)</h4>
  257. <div class="markdown level1 summary">Adds an entry into the legend. Duplicate entries are permissable</div>
  258. <div class="markdown level1 conceptual"></div>
  259. <h5 class="declaration">Declaration</h5>
  260. <div class="codewrapper">
  261. <pre><code class="lang-csharp hljs">public void AddEntry(GraphCellToRender graphCellToRender, string text)</code></pre>
  262. </div>
  263. <h5 class="parameters">Parameters</h5>
  264. <table class="table table-bordered table-condensed">
  265. <thead>
  266. <tr>
  267. <th>Type</th>
  268. <th>Name</th>
  269. <th>Description</th>
  270. </tr>
  271. </thead>
  272. <tbody>
  273. <tr>
  274. <td><a class="xref" href="Terminal.Gui.Graphs.GraphCellToRender.html">GraphCellToRender</a></td>
  275. <td><span class="parametername">graphCellToRender</span></td>
  276. <td>The symbol appearing on the graph that should appear in the legend</td>
  277. </tr>
  278. <tr>
  279. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
  280. <td><span class="parametername">text</span></td>
  281. <td>Text to render on this line of the legend. Will be truncated
  282. if outside of Legend <a class="xref" href="Terminal.Gui.Graphs.LegendAnnotation.html#Terminal_Gui_Graphs_LegendAnnotation_Bounds">Bounds</a></td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. <span class="small pull-right mobile-hide">
  287. <span class="divider">|</span>
  288. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LegendAnnotation_Render_Terminal_Gui_GraphView_.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LegendAnnotation.Render(Terminal.Gui.GraphView)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  289. </span>
  290. <span class="small pull-right mobile-hide">
  291. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L157">View Source</a>
  292. </span>
  293. <a id="Terminal_Gui_Graphs_LegendAnnotation_Render_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Render*"></a>
  294. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_Render_Terminal_Gui_GraphView_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Render(Terminal.Gui.GraphView)">Render(GraphView)</h4>
  295. <div class="markdown level1 summary">Draws the Legend and all entries into the area within <a class="xref" href="Terminal.Gui.Graphs.LegendAnnotation.html#Terminal_Gui_Graphs_LegendAnnotation_Bounds">Bounds</a></div>
  296. <div class="markdown level1 conceptual"></div>
  297. <h5 class="declaration">Declaration</h5>
  298. <div class="codewrapper">
  299. <pre><code class="lang-csharp hljs">public void Render(GraphView graph)</code></pre>
  300. </div>
  301. <h5 class="parameters">Parameters</h5>
  302. <table class="table table-bordered table-condensed">
  303. <thead>
  304. <tr>
  305. <th>Type</th>
  306. <th>Name</th>
  307. <th>Description</th>
  308. </tr>
  309. </thead>
  310. <tbody>
  311. <tr>
  312. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  313. <td><span class="parametername">graph</span></td>
  314. <td></td>
  315. </tr>
  316. </tbody>
  317. </table>
  318. <h3 id="implements">Implements</h3>
  319. <div>
  320. <a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a>
  321. </div>
  322. </article>
  323. </div>
  324. <div class="hidden-sm col-md-2" role="complementary">
  325. <div class="sideaffix">
  326. <div class="contribution">
  327. <ul class="nav">
  328. <li>
  329. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_Graphs_LegendAnnotation.md&amp;value=---%0Auid%3A%20Terminal.Gui.Graphs.LegendAnnotation%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
  330. </li>
  331. <li>
  332. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Core/Graphs/Annotations.cs/#L118" class="contribution-link">View Source</a>
  333. </li>
  334. </ul>
  335. </div>
  336. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  337. <h5>In this article</h5>
  338. <div></div>
  339. </nav>
  340. </div>
  341. </div>
  342. </div>
  343. </div>
  344. <footer>
  345. <div class="grad-bottom"></div>
  346. <div class="footer">
  347. <div class="container">
  348. <span class="pull-right">
  349. <a href="#top">Back to top</a>
  350. </span>
  351. <span>Generated by <strong>DocFX</strong></span>
  352. </div>
  353. </div>
  354. </footer>
  355. </div>
  356. <script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
  357. <script type="text/javascript" src="../../styles/docfx.js"></script>
  358. <script type="text/javascript" src="../../styles/main.js"></script>
  359. </body>
  360. </html>