Terminal.Gui.Graphs.LegendAnnotation.html 18 KB

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