# `GSComponent valueForAxis:`

*Instance Method*

The effective interpolation value for a smart-component axis.

## Declaration

```swift
func value(for axis: GSAxis) -> CGFloat
```

```objc
- (CGFloat) valueForAxis:(GSAxis *) axis;
```

```python
valueForAxis_(axis: GSAxis) -> float
```

## Parameters

- `axis` — An axis of the referenced glyph.

## Discussion

An explicit value in [`GSComponent.pieceSettings`](/Core/GlyphsCore/GSComponent/pieceSettings) overrides the coordinate of the corresponding base-glyph layer.

## See Also

### Smart Components

- [`GSComponent.pieceSettings`](/Core/GlyphsCore/GSComponent/pieceSettings) — Explicit interpolation values for smart-component axes.
- [`GSComponent setPieceSettingsFast:`](/Core/GlyphsCore/GSComponent/setPieceSettingsFast:) — Replaces the smart-component settings without copying, undo, or change notifications.
- [`GSComponent setPieceValue:forKey:`](/Core/GlyphsCore/GSComponent/setPieceValue:forKey:) — Sets an explicit interpolation value for a smart-component axis.
- [`GSComponent removePieceValueForKey:`](/Core/GlyphsCore/GSComponent/removePieceValueForKey:) — Removes an explicit interpolation value for a smart-component axis.
- [`GSComponent pieceValueForKey:`](/Core/GlyphsCore/GSComponent/pieceValueForKey:) — The explicit interpolation value for a smart-component axis.

