cancel
Showing results for 
Search instead for 
Did you mean: 

Shape with conditional formatting in Lumira Designer

abarros123
Explorer
0 Kudos

Hi,

We need that a shape we created in Lumira Designer change the color depending on the measure.

For instance: if the sales are below 5000 that shape becomes red and if the sales are higher than 5000 the sabes becomes green.

I know I can do this by code in the On Start function in the applicacion.

Can I achieve the same using the Conditional Formating?

Thank you in advance!!

Accepted Solutions (0)

Answers (1)

Answers (1)

MustafaBensan
Active Contributor
0 Kudos

Hi Andres,

You cannot apply the Conditional Formatting feature to the shape component. To achieve the same effect you would need to apply code similar to the following:

var mySalesValue = DS_1.getData(<SalesMeasure>, <selection>).value;

if (mySalesValue < 5000.00) {
   SHAPE_1.setFillColor("red")
} else {
   SHAPE_1.setFillColor("green")
}

Regards,

Mustafa.

abarros123
Explorer

Thank you Mustafa!!!

It works like magic!!!