Terminal.Gui.Graphs.LegendAnnotation.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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.3.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. <meta property="docfx:navrel" content="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.Graphs.LegendAnnotation">
  73. <h1 id="Terminal_Gui_Graphs_LegendAnnotation" data-uid="Terminal.Gui.Graphs.LegendAnnotation" class="text-break">Class LegendAnnotation
  74. </h1>
  75. <div class="markdown level0 summary">
  76. A box containing symbol definitions e.g. meanings for colors in a graph.
  77. The &apos;Key&apos; to the graph
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><span class="xref">System.Object</span></div>
  83. <div class="level1"><span class="xref">LegendAnnotation</span></div>
  84. </div>
  85. <div class="implements">
  86. <h5>Implements</h5>
  87. <div><a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a></div>
  88. </div>
  89. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.Graphs.html">Terminal.Gui.Graphs</a></h6>
  90. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  91. <h5 id="Terminal_Gui_Graphs_LegendAnnotation_syntax">Syntax</h5>
  92. <div class="codewrapper">
  93. <pre><code class="lang-csharp hljs">public class LegendAnnotation : Object, IAnnotation</code></pre>
  94. </div>
  95. <h3 id="constructors">Constructors
  96. </h3>
  97. <a id="Terminal_Gui_Graphs_LegendAnnotation__ctor_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.#ctor*"></a>
  98. <h4 id="Terminal_Gui_Graphs_LegendAnnotation__ctor_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.#ctor(Terminal.Gui.Rect)">LegendAnnotation(Rect)</h4>
  99. <div class="markdown level1 summary">
  100. Creates a new empty legend at the given screen coordinates
  101. </div>
  102. <div class="markdown level1 conceptual"></div>
  103. <h5 class="decalaration">Declaration</h5>
  104. <div class="codewrapper">
  105. <pre><code class="lang-csharp hljs">public LegendAnnotation(Rect legendBounds)</code></pre>
  106. </div>
  107. <h5 class="parameters">Parameters</h5>
  108. <table class="table table-bordered table-striped table-condensed">
  109. <thead>
  110. <tr>
  111. <th>Type</th>
  112. <th>Name</th>
  113. <th>Description</th>
  114. </tr>
  115. </thead>
  116. <tbody>
  117. <tr>
  118. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  119. <td><span class="parametername">legendBounds</span></td>
  120. <td>Defines the area available for the legend to render in
  121. (within the graph). This is in screen units (i.e. not graph space)</td>
  122. </tr>
  123. </tbody>
  124. </table>
  125. <h3 id="properties">Properties
  126. </h3>
  127. <a id="Terminal_Gui_Graphs_LegendAnnotation_BeforeSeries_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.BeforeSeries*"></a>
  128. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_BeforeSeries" data-uid="Terminal.Gui.Graphs.LegendAnnotation.BeforeSeries">BeforeSeries</h4>
  129. <div class="markdown level1 summary">
  130. Returns false i.e. Lengends render after series
  131. </div>
  132. <div class="markdown level1 conceptual"></div>
  133. <h5 class="decalaration">Declaration</h5>
  134. <div class="codewrapper">
  135. <pre><code class="lang-csharp hljs">public bool BeforeSeries { get; }</code></pre>
  136. </div>
  137. <h5 class="propertyValue">Property Value</h5>
  138. <table class="table table-bordered table-striped table-condensed">
  139. <thead>
  140. <tr>
  141. <th>Type</th>
  142. <th>Description</th>
  143. </tr>
  144. </thead>
  145. <tbody>
  146. <tr>
  147. <td><span class="xref">System.Boolean</span></td>
  148. <td></td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <a id="Terminal_Gui_Graphs_LegendAnnotation_Border_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Border*"></a>
  153. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_Border" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Border">Border</h4>
  154. <div class="markdown level1 summary">
  155. True to draw a solid border around the legend.
  156. Defaults to true. This border will be within the
  157. <a class="xref" href="Terminal.Gui.Graphs.LegendAnnotation.html#Terminal_Gui_Graphs_LegendAnnotation_Bounds">Bounds</a> and so reduces the width/height
  158. available for text by 2
  159. </div>
  160. <div class="markdown level1 conceptual"></div>
  161. <h5 class="decalaration">Declaration</h5>
  162. <div class="codewrapper">
  163. <pre><code class="lang-csharp hljs">public bool Border { get; set; }</code></pre>
  164. </div>
  165. <h5 class="propertyValue">Property Value</h5>
  166. <table class="table table-bordered table-striped table-condensed">
  167. <thead>
  168. <tr>
  169. <th>Type</th>
  170. <th>Description</th>
  171. </tr>
  172. </thead>
  173. <tbody>
  174. <tr>
  175. <td><span class="xref">System.Boolean</span></td>
  176. <td></td>
  177. </tr>
  178. </tbody>
  179. </table>
  180. <a id="Terminal_Gui_Graphs_LegendAnnotation_Bounds_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Bounds*"></a>
  181. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_Bounds" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Bounds">Bounds</h4>
  182. <div class="markdown level1 summary">
  183. Defines the screen area available for the legend to render in
  184. </div>
  185. <div class="markdown level1 conceptual"></div>
  186. <h5 class="decalaration">Declaration</h5>
  187. <div class="codewrapper">
  188. <pre><code class="lang-csharp hljs">public Rect Bounds { get; set; }</code></pre>
  189. </div>
  190. <h5 class="propertyValue">Property Value</h5>
  191. <table class="table table-bordered table-striped table-condensed">
  192. <thead>
  193. <tr>
  194. <th>Type</th>
  195. <th>Description</th>
  196. </tr>
  197. </thead>
  198. <tbody>
  199. <tr>
  200. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  201. <td></td>
  202. </tr>
  203. </tbody>
  204. </table>
  205. <h3 id="methods">Methods
  206. </h3>
  207. <a id="Terminal_Gui_Graphs_LegendAnnotation_AddEntry_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.AddEntry*"></a>
  208. <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>
  209. <div class="markdown level1 summary">
  210. Adds an entry into the legend. Duplicate entries are permissable
  211. </div>
  212. <div class="markdown level1 conceptual"></div>
  213. <h5 class="decalaration">Declaration</h5>
  214. <div class="codewrapper">
  215. <pre><code class="lang-csharp hljs">public void AddEntry(GraphCellToRender graphCellToRender, string text)</code></pre>
  216. </div>
  217. <h5 class="parameters">Parameters</h5>
  218. <table class="table table-bordered table-striped table-condensed">
  219. <thead>
  220. <tr>
  221. <th>Type</th>
  222. <th>Name</th>
  223. <th>Description</th>
  224. </tr>
  225. </thead>
  226. <tbody>
  227. <tr>
  228. <td><a class="xref" href="Terminal.Gui.Graphs.GraphCellToRender.html">GraphCellToRender</a></td>
  229. <td><span class="parametername">graphCellToRender</span></td>
  230. <td>The symbol appearing on the graph that should appear in the legend</td>
  231. </tr>
  232. <tr>
  233. <td><span class="xref">System.String</span></td>
  234. <td><span class="parametername">text</span></td>
  235. <td>Text to render on this line of the legend. Will be truncated
  236. if outside of Legend <a class="xref" href="Terminal.Gui.Graphs.LegendAnnotation.html#Terminal_Gui_Graphs_LegendAnnotation_Bounds">Bounds</a></td>
  237. </tr>
  238. </tbody>
  239. </table>
  240. <a id="Terminal_Gui_Graphs_LegendAnnotation_Render_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Render*"></a>
  241. <h4 id="Terminal_Gui_Graphs_LegendAnnotation_Render_Terminal_Gui_GraphView_" data-uid="Terminal.Gui.Graphs.LegendAnnotation.Render(Terminal.Gui.GraphView)">Render(GraphView)</h4>
  242. <div class="markdown level1 summary">
  243. 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>
  244. </div>
  245. <div class="markdown level1 conceptual"></div>
  246. <h5 class="decalaration">Declaration</h5>
  247. <div class="codewrapper">
  248. <pre><code class="lang-csharp hljs">public void Render(GraphView graph)</code></pre>
  249. </div>
  250. <h5 class="parameters">Parameters</h5>
  251. <table class="table table-bordered table-striped table-condensed">
  252. <thead>
  253. <tr>
  254. <th>Type</th>
  255. <th>Name</th>
  256. <th>Description</th>
  257. </tr>
  258. </thead>
  259. <tbody>
  260. <tr>
  261. <td><a class="xref" href="Terminal.Gui.GraphView.html">GraphView</a></td>
  262. <td><span class="parametername">graph</span></td>
  263. <td></td>
  264. </tr>
  265. </tbody>
  266. </table>
  267. <h3 id="implements">Implements</h3>
  268. <div>
  269. <a class="xref" href="Terminal.Gui.Graphs.IAnnotation.html">IAnnotation</a>
  270. </div>
  271. </article>
  272. </div>
  273. <div class="hidden-sm col-md-2" role="complementary">
  274. <div class="sideaffix">
  275. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  276. <h5>In This Article</h5>
  277. <div></div>
  278. </nav>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. <footer>
  284. <div class="grad-bottom"></div>
  285. <div class="footer">
  286. <div class="container">
  287. <span class="pull-right">
  288. <a href="#top">Back to top</a>
  289. </span>
  290. <span>Generated by <strong>DocFX</strong></span>
  291. </div>
  292. </div>
  293. </footer>
  294. </div>
  295. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  296. <script type="text/javascript" src="../../styles/docfx.js"></script>
  297. <script type="text/javascript" src="../../styles/main.js"></script>
  298. </body>
  299. </html>