# GH_LegendData class

Namespace: [Grasshopper.Kernel.Special](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.kernel.special.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_LegendData : IGH_PreviewData
```

## Constructors

- [GH_LegendData](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/ctor.md)

## Properties

- [Bounds2D](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/bounds2d.md): Gets or sets the 2D bounds.
- [Bounds3D](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/bounds3d.md): Gets or sets the 3D bounds.
- [ClippingBox](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/clippingbox.md)
- [Colours](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/colours.md): Gets the internal list of colours.
- [Names](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/names.md): Gets the internal list of names.
- [Type](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/type.md): Gets or sets the legend type.

## Methods

- [ClearCachedGeometry](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/clearcachedgeometry.md): You must call this function when making changes to the legend object after it was drawn at least once.
- [DrawViewportMeshes](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/drawviewportmeshes.md)
- [DrawViewportWires](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/drawviewportwires.md)
- [Render](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.special.gh-legenddata/render.md): Render this legend to a GDI Graphics surface.
