# GraphConstraints struct

Namespace: [Grasshopper2.UI.Graphing](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.graphing.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public readonly struct GraphConstraints : IEquatable<GraphConstraints>, IStorable
```

Axis-lock and ratio constraints applied by a [FunctionEditorBase](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functioneditorbase.md) on top of its current frame. Each field is nullable so "unset" means "no constraint on this dimension".

## Constructors

- [GraphConstraints](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/ctor.md): (2 overloads)

## Fields

- [LockX](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/lockx.md): Gets whether the domain of the graph editor is locked.
- [LockY](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/locky.md): Gets whether the codomain of the graph editor is locked.
- [Ratio](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/ratio.md): Gets the ratio of pixels-per-unit on the X and Y axes. If both the domain and the codomain are locked, this ratio will be ignored.
- [X](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/x.md): Gets the interval for the domain. If [GraphConstraints.LockX](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/lockx.md) is false, this may be ignored.
- [Y](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/y.md): Gets the interval for the codomain. If [GraphConstraints.LockY](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/locky.md) is false, this may be ignored.

## Properties

- [Default](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/default.md): (static)

## Methods

- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/equals.md): (2 overloads)
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/gethashcode.md)
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/store.md)
- [WithCodomain](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/withcodomain.md)
- [WithDomain](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/withdomain.md)
- [WithLock](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/withlock.md)
- [WithRatio](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/withratio.md)

## Operators

- [operator ==](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/op-equality.md): (static)
- [operator !=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.graphconstraints/op-inequality.md): (static)
