---
title: lineGradient
framework: mapkitjs
role: symbol
role_heading: Interface Property
path: mapkitjs/styleconstructoroptions/linegradient
---

# lineGradient

The gradient to apply along the line.

## Declaration

```data
lineGradient?: LineGradient;
```

## Discussion

Discussion If a style has both strokeColor and lineGradient definitions, lineGradient takes precedence and displays. If you don’t define a color at the start or end location within the gradient, MapKit JS uses the style’s strokeColor.

## See Also

### Setting stroke styles

- [strokeColor](mapkitjs/styleconstructoroptions/strokecolor.md)
- [strokeOpacity](mapkitjs/styleconstructoroptions/strokeopacity.md)
- [strokeStart](mapkitjs/styleconstructoroptions/strokestart.md)
- [strokeEnd](mapkitjs/styleconstructoroptions/strokeend.md)
