Pro: Symbolise line using gradient along length

7149
19
09-24-2020 11:08 PM
JohnWatt
Occasional Contributor

It would be great if a colour gradient could be rotated along a line symbol's length.  There are a few 'nearly there' workarounds, but currenty Pro can only apply a gradient through the thickness of the line - not from end to end.

 

Eg I can use a gradient stroke through the line like below, but not from end to end like this ↓

 

 

 

From discussion: Line gradient symbology with direction? 

19 Comments
ChelseaRozek

There are a couple old posts about this (like Want to symbolize lines with color gradient ), but I'm wondering if Pro has this capability now. I can make my lines have a gradient, but it runs perpendicular to the direction of the line.

 

I was trying to make a flow line map (Creating radial flow maps with ArcGIS), and would love for the color to follow the direction of travel to help users understand what's happening.

The closest I've gotten is with a picture stroke of a gradient in the correct direction, but then it repeats/changes based on your zoom level. I don't see an option to stretch the picture to fill the length of the line.

Am I missing any options?

JacobHelfman1

The first thing I would do is merge all the parts of the line feature into one feature, then apply the symbology. Then I would adjust the symblogy so that the color gradient is going in the direction I want (Fill symbol layers—ArcGIS Pro | Documentation). If that doesn't quote fulfill my requirements, I would consider using solid stroke and modifying the actual symbology itself, editing the line's colors or marker symbol layers, such as arrows etc... (Line symbols—ArcGIS Pro | Documentation). 

ChelseaRozek

Hi Jacob,

      Thanks for replying. Happy New Year!

- They are 3 separate lines, each with only 2 vertices. 

- I only see the option to flip the colors with Gradient Stroke, not rotate which direction it's going.

      - Adding a Rotate Effect rotates the whole line so they no longer point where they should.

- I don't see any way to get a gradient effect by modifying the Solid Stroke option.

- I mentioned modifying the Picture Stroke with a picture of a gradient. Do you know if it can be stretched to the full line for all zoom levels?

ClementDouillet

Hello Chelsea and Jacob,

I have the same issue and have found no solution yet.

It seems a so trivial effect that I didn't expect spending so much time looking for the solution.

The thing Chelsea and I are trying to do, looks like this : Center for Spatial Research 


A gradient from the origin to the end of each line.

I personally have created a unique layer/feature with all the lines in it. The line have been generated with the tool "XY To Line", and have a direction: they have an origin and an end understood by ArcGIS.
See the example here where I apply the "arrow effect". The arrow is properly displayed from start (dark points) to finish (green points).


While formatting the line symbol and applying a "gradient stroke" I obtain this.

We are very close of the solution because the gradient direction is actually displayed perpendicularly to the line direction. I would be enough to give this gradient a 90° flip, and that's it. But unfortunately, As Chelsea mentioned, the rotating effect rotates the entire lines, and not the gradient. Maybe, here, I have missed this "rotating" option, but I have looked every parameter, and found nothing.

I also have thought about applying a "fill layer" and a "gradient fill" with a "buffer effect" and a "linear direction". I thought this was a clever workaround, but the gradient still doesn't display following the line direction.

With line width 1pt, note here the problem of direction :

With line width 11 pt, I see that the gradient is in fact horizontal, and the small line width actually tricked my mind :

I also have attempted new things :

Finally I have also have tried other solutions :
- use a "graduated color" symbology :

- "vary symbology by attribute" :

Even by designing a custom "Field" containing both X and Y coordinates, this doesn't create the right effect and applies the gradient to the whole set of lines, and not to each line individually.

I guess the closest solution we have, is to apply a "gradient stroke" on a line symbol, but with a vertical color scheme/color ramp, and not an horizontal one, as proposed in ArcGIS.
The color scheme in ArcGIS :

I have designed something in photoshop like this :

And imported it as "picture stroke".

I am so close of the expected result. But the gradient length doesn't adapt to the line length.

Here with picture size 7pt :

Here with picture size 4 pt :

Well, all this mess to finally have no solution.

But, maybe this can trigger new ideas for someone?

At least, I expect having filled this post with various keywords so it is now more easily google-able, and hopefully our saver will find us soon and come with his more-than-expected-marvelous solution.

Thanks,

Clément

LynnCarlson__GISP

I am seeking the same thing for maps I am working on...a line symbol that will be semi-transparent at the start node, becoming opaque at the end node.  I started trying various things with photoshop as well, but when I came across this discussion, decided to stop since it seemed as though the attempts already made were extensive to no avail.

Perhaps @John_M_Nelson #JohnMNelson_esristyles, #ArcGISPro could design a custom stylex that would achieve this effect? 

KoryKramer

I searched on ArcGIS Ideas‌ and cannot find this request documented anywhere.  Given the discussion here, there is evidently some demand already.  I'd recommend that somebody submit this as an idea - please include [copy/paste] some of the various use cases as described here to provide context to the idea.  This will open the feature up to voting from the community.

Thank you!

KoryKramer

Pro: Symbolise line using gradient along length - GeoNet, The Esri Community 

Submitted by John Watt  Please go upvote the idea and provide use cases in the idea's comments (if not already provided on this thread).  Thank you!

ChelseaRozek

Would be great when making radial flow maps! Creating radial flow maps with ArcGIS 

JohnJones

Note that it would be nice if the line had measures (M values) for these to be able to be taken into account in controlling how the gradient is mapped to the line, for example if the M at the start of the line was 0 and the M at the end of the line was 1 (with monotonicity) that placing a vertex at the middle of the line with an M value like 0.8 would cause the gradient to 'flow' quicker so that instead of getting half way through the gradient it got 80% through by the midpoint.  Splitting the line in the middle then would assign M values (linearly interpolated) so that splitting the line may retain the gradient (the first half going from 0 to 0.8 and the second going from 0.8 to 1 on the gradient.

Alternatively the 'curves' of the gradient could be adjusted, but that would change would apply globally to all features (using this symbol) rather than be controllable by feature (as the above measure approach could).

KoryKramer
Status changed to: Under Consideration