---
title: lineGradient
framework: mapkitjs
role: symbol
role_heading: Instance Property
path: mapkitjs/style/linegradient
---

# lineGradient

The gradient to apply along the line.

## Declaration

```data
get lineGradient(): LineGradient | null;
set lineGradient(lineGradient: LineGradient | null);
```

## Discussion

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

## See Also

### Styling lines

- [lineCap](mapkitjs/style/linecap.md)
- [lineDash](mapkitjs/style/linedash.md)
- [lineDashOffset](mapkitjs/style/linedashoffset.md)
- [lineJoin](mapkitjs/style/linejoin.md)
- [lineWidth](mapkitjs/style/linewidth.md)
- [LineGradient](mapkitjs/linegradient.md)
