Hi, I've searched extensively for a solution to this but can't find anything that works.
I have a vector graphic with several horizontal lines; each line has bumps and 'ridges' of varying heights and no two lines are the same. I want to apply a gradient to each individual horizontal line so that the bottom/flat part is one colour and the peaks/ridges are another colour - like the two lines near the bottom of this image, which I did manually with gradient tool.
How can I apply that same style to the other lines? It is not practical to do it manually as there are 80 lines altogether. I have tried the following without success:
Applying the gradient swatch to other lines. This only applies the gradient horizontally (see the line in the middle of the image) rather than vertically; if I try to rotate the gradient, it doesn't work, I think because the rotation is based on the width of the object and isn't limiting itself to the height of the object (this is hard to describe)
Using 'create style' for my gradient stroke and applying the new style to other lines. This doesn't do anything; the lines stay white. It doesn't do anything if I try to draw a circle or square as a fresh shape, either.
using 'create style' for a gradient fill and applying it to other lines. This kind of works but I still need to apply the gradient to each line manually then tinker with the stroke/fill options to set it correctly.
Selecting one of the correctly styled lines, clicking copy, then trying to 'paste style' to another line. As above, doesn't do anything, lines stay white, doesn't work on newly created shapes.
Selecting all of the lines and using the gradient tool on them in one go. This just treats all of the lines as a group, so across the whole image the ones towards the bottom are purple and the lines at the top are white rather than styling each line individually.
If it matters:
I've tried the above with the lines grouped and as individual layers
The lines are open-ended rather than closed shapes
Ideas, please! Grateful for any insight.