Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
lucasdavis500
Contributor II

Dynamic Color Chart Caption

title ex.png

Hi all, I found this chart here - Line charts tricks: In-Chart Legend

I would like to know how to change the color of text in chart captions to match the lines... I was attempting to put my legend on my line charts like in the aforementioned post, but I could not get the function to work properly ( it was returning the max VALUE of my dimension, not replacing it with the text I wanted for a dynamic legend), so I've decided to maybe go this route, but can't seem to figure out how to accomplish this either..

1 Solution

Accepted Solutions
MVP
MVP

Re: Dynamic Color Chart Caption

In the original post, rebeccad seems to indicate that it's a text box, and in context, I suspect that the two countries being compared are hardcoded as two separate expressions.

Here's something similar using an additional chart to be the legend, and Name as a dimension. Colors for each name are defined in script and used in both charts to be sure they stay in sync.

Edit: Added colored name at end of each line.

Capture.PNG

1 Reply
MVP
MVP

Re: Dynamic Color Chart Caption

In the original post, rebeccad seems to indicate that it's a text box, and in context, I suspect that the two countries being compared are hardcoded as two separate expressions.

Here's something similar using an additional chart to be the legend, and Name as a dimension. Colors for each name are defined in script and used in both charts to be sure they stay in sync.

Edit: Added colored name at end of each line.

Capture.PNG