Dynamic line graph legends
I have some trouble with a dynamic line chart I'm working on. As shown in the attached graph I've got two lines, but I only want to show "Gennemsnitlig fravær - Landstal" when I have chosen for example a city. The line itself dissappeares just fine, but the legend remains when the measure is blank.
How do i make the legend "Gennemsnitlig fravær - Landstal" dissappear dynamically?
0
Comments
Hi Lasse,
Can you please provide some more info on how you defined this chart? Are those two measures, or are they calculations? Maybe a screenshot of the chart in definition mode would be useful.
BR / Ole
Hi Ole,
It is two different measures:
I have also tried using visibility agents, but it only blanks out the values in the underlying tabel and gives the same results as shown above as if i had blanked the calculations in the measure.
Hi Lasse,
I don't think there is a way to dynamically and completely hide a measure upon certain conditions.
In your case, I can only think of an alternative solution that involves two charts on top of each other and use of 'Required criteria'.
The effect should be, when no city is selected, the original chart with two legends will show. When a city is selected, the new topmost chart will show.
BR / Ole
Hi Ole,
Thanks for alternative solution. I have actually thought of that, so allow me to complicate it even further.
Suppose I also have the option of choosing departement and the lines would have to account for that option too. Meaning i can choose city and/or departement. This means there are 3 possibilities:
City, landstal
Dep, landstal
City, Dep, landstal
To my knowledge there is not an option to control criteria with an OR operator to either city or dep?
Hi Lasse,
From the 2022 Winter version you can work with an 'OR' option in required criteria:
https://community.targit.com/hc/en-us/articles/6640220406941-Feature-Required-criteria-to-work-with-ALL-or-ANY-dimension
BR / Ole
Hi Ole,
Thanks for the link! - guess it's time for an upgrade. :-)
Sincerely
Lasse
Please sign in to leave a comment.