Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color() does not work with expression in charg

I have a chart where I use the color(n) function to color the bars (background colour). It works fine if I change the colours in the palette to a different colour by choosing a fixed colour. But if I use an expression as the colour the function still refers to the fixed colour and not to the expression.

Has anybody else seen this and more importantly, does anybody have a solution?

4 Replies
Gysbert_Wassenaar

If you want to mess around with colors to such a degree then put the expressions that calculate the color in a variable and use the variable in every place where you want that color.


talk is cheap, supply exceeds demand
sunny_talwar

Hey Gysbert, I think he did find a solution for his problem -> Dollar sign expansion per dimension

Gysbert_Wassenaar

I think that's another problem. If you use a calculated color in the palet for the first color then using color(1) will not use the calculated color, but the original fixed color.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

It's is actually the same problem and I am using the other solution as a workaround. But if anybody would know a simple solution to this problem, it would be a lot easier.

To me, it seems to be a bug in QV. If I use color(1) I expect it to show the first color in the palette even though it is a calculated color. This works for a text box, but not for a chart. And that is also the way it is supposed to work according to QV's help.

Using an expression and put it everywhere does unfortunately work (too many different places to use and too dynamic + I want to use persistent colors).

But I have a workaround, that I can live with. But as far as I understand, this is a bug in QV.