Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mattcorke
New Contributor II

Dynamic legend in scatter plot based upon selected x and y axis measures

Hi there,

I have a scatter plot with several measures for the x and y axis. I want the legend to be coloured according to the value of x-axis value minus y-axis value.

If the user changes selects an alternative x / y axis measure then the legend is automatically updated to reflect this.

Any help much appreciated.

Thanks

Matt

Tags (2)
1 Solution

Accepted Solutions

Re: Dynamic legend in scatter plot based upon selected x and y axis measures

Hi Matt, maybe setting color by expression and using column(1) to refer to x-axis and column(2) to y-axis, so it can be something like:

If(column(1)-column(2)>0, Red(), Green())

2 Replies

Re: Dynamic legend in scatter plot based upon selected x and y axis measures

Hi Matt, maybe setting color by expression and using column(1) to refer to x-axis and column(2) to y-axis, so it can be something like:

If(column(1)-column(2)>0, Red(), Green())

mattcorke
New Contributor II

Re: Dynamic legend in scatter plot based upon selected x and y axis measures

Thanks Ruben - that worked great! I added column 1 - column 2 as a measure and used the diverging classes colour scheme.

Thanks again

Matt

Community Browser