Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Dynamic Color Based on Value Line Chart for PDF Output Using Interactive Chart Tool

JeremyMBA19
5 - Atom

Hi all. I want to know if there is a way to have a dynamic coloring option for a line chart using an interactive chart tool, however the output will be to static pdf files. A sample workflow is attached. I tried using the split option however the output is not as expected. Essentially, if the value is >= 3.0 then the color of the line should be red, if the value is >= 2.4 the color of the line should be yellow, if the value is < 0 then the color of the line should be green. I understand this may not be achievable in Alteryx. I appreciate any help which may be provided. 

JeremyMBA19_0-1749739267085.png

 

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@JeremyMBA19 
My idea is that we use the Transform feature first to split the lines per their color group then use the Layer funtion to manually adjust the color acoordingly.

At last, export to pdf with Render Tool.

2025-06-13 171141.png2025-06-13 171201.png2025-06-13 171201A.png

 

joseph512d
5 - Atom

@JeremyMBA19 dogwhistlesoundwrote:

Hi all. I want to know if there is a way to have a dynamic coloring option for a line chart using an interactive chart tool, however the output will be to static pdf files. A sample workflow is attached. I tried using the split option however the output is not as expected. Essentially, if the value is >= 3.0 then the color of the line should be red, if the value is >= 2.4 the color of the line should be yellow, if the value is < 0 then the color of the line should be green. I understand this may not be achievable in Alteryx. I appreciate any help which may be provided. 

JeremyMBA19_0-1749739267085.png

 


To dynamically color a line chart in Alteryx for static PDF output, you'll need to work around the tool's limitations by creating separate line series for each color. Use a **Formula tool** to generate new columns, assigning your data point's value to the respective color column (e.g., `Value_Red` if `Value >= 3.0`, otherwise `Null()`). Then, in the **Interactive Chart tool**, add a separate **line layer** for each of these color-specific columns and set their colors accordingly. The `Null()` values will ensure only the correct colored segment of the line appears, giving the illusion of a single line changing color. Finally, use the **Render tool** to output your dynamically colored chart to a static PDF.

theresa397ayres
5 - Atom

Hello,

 

Split your data into three separate line series, each filtered by the threshold conditions, like so:

X Y Series
1 3.1 Red Segment
2 2.7 Yellow Segment
3 -0.2 Green Segment

Then, create an interactive chart (or Report Chart) where each "Series" has its own color.

 

 

To avoid visual gaps, set nulls for Y-values outside each segment, so the line doesn't connect across thresholds.

For example:

"Red" series: has Y values only where Y ≥ 3.0, and NULL elsewhere.

Same logic for yellow and green.

You can do this using Formula tools before the chart, like:


Red_Y: IF [Value] >= 3.0 THEN [Value] ELSE NULL()
Yellow_Y: IF [Value] >= 2.4 AND [Value] < 3.0 THEN [Value] ELSE NULL()
Green_Y: IF [Value] < 0 THEN [Value] ELSE NULL()

 

Best Regard,

Theresa

MyMilestoneCard Login

Labels
Top Solution Authors