Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a line chart. In one of the expressions I use symbols (Points) to represent it. I want each of these points (symbols) to be painted with one color or another depending on some conditions.
So I defined background color for the expression as below:
$(target_orders)
which is a variable that I have defined as below:
if($(numOrders) < 10, Green(), If($(numOrders) >= 10 and $(numOrders) <= 50, Yellow(), Red()))
and numOrders is another variable as below:
sum({$<[Order Type] = {'A'}>}if([quantity] > 20000.0, 1,0))
What is happening is that all points are being painted with the same color and the correct would be (based on conditions) some red and some green.
Any ideas?
I am not sure whether you should be setting the foreground or background colour.
Having tested that, test your logic by creating a straight table with the same dimension as your chart, and with the expressions:
=sum({$<[Order Type] = {'A'}>}if([quantity] > 20000.0, 1,0))
=f($(numOrders) < 10, Green(), If($(numOrders) >= 10 and $(numOrders) <= 50, 'Yellow', 'Red'))
The results of this table should give an insight into the problem.
Another thought occurred to me - Are the expression defined with a leading = sign? If so, then they are expanded and evaluated before the chart is constructed and have no knowledge of the chart dimensions. Try removing the = sign so that they can be expanded and evaluated within the chart.
I am not using = sign.