Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
Hope that someone can help with this. I have a line chart where the x-axis is composed of 5 domains - each domain relates to a score in a psychometric test. So for domain 1 (dom1) there will be a range of different scores. I would like to include on the graph (or superimpose on it) stacked bars for each domain that indicates whether the score is within an acceptable range (green), is OK but needs watching (amber), or is outside of acceptable ranges (red). In the table Domain_Scores I have loaded inline what the range for each domain is. The scoring scale for each domain will always 10 (minimum) and 50 (maximum). Thus for domain 1 (dom1) the acceptable green range is between 50-26, amber 25-20, red 19-10. What I would like is a stacked bar that corresponds to the ranges with the correct colour. The only issue with this is that in some domains a higher score is good ( green, such as if you were measuring a person's self esteem for dom1) while for others (dom2) a lower score is good (green, such as if your were measuring a person's tendency to be depressed) .
Help greatly appreciated
Thanks Neil
Neil,
This is probably one that's much harder than it first appears.
As a first step I'd start looking at intervalmatch() (see the help file) to assign each score a colour (or an id: 1= Green 2=Amber 3=Red) - it should work with numbers just as easily as times as in the example.
From there it should be a case of I assume counting the 'client numbers' with the Domain as you're primary dimension (across the X-axis) and then the new 'Colour' or 'id' as the second dimension to split the stacked chart and then finally an 'if' statement on the Background colour to set the correct bar colours.
Hope that points you in the right direction.
Matt - Visual Analytics Ltd
Hi Matt.
Sorry for the delay in offering my thanks, but I tend to find that those few occasions I use QV much time is spent contemplating how to do what is often blindingly simple! In this case I wanted to set the bars to mimic the backround to a gauge so where the line chart appeared as a point on that bar, the colour of the bar at that point would indicate if it needed attention (red), was fine (green) or keep an eye on (amber). I think the interval match would assign a colour to each of the scores for a domain which would not really do what I wanted. I have used a different visual method to indicate to the user if a score is red, amber, green (small traffic lights by each domain).
Lordy, wish I was a damn site more adept at this rather than pulling my hair what is left of my hair! Thanks you very much for tking the time and trouble to respond to me.
Best Regards Neil