Skip to Content
0

Shape with conditional formatting in Lumira Designer

Nov 15, 2017 at 11:43 AM

133

avatar image

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!!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mustafa Bensan Nov 16, 2017 at 10:26 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you Mustafa!!!

It works like magic!!!

1