Interactive Range Slider Filter Widget throws strange error

Hi all,

I am experiencing a strange error with the slider widget when there is only one unique value in the data (min = max). It throws the following error, although the node stays green:

Is this a bug, or have I misconfigured something?

Cheers,
Denis

Hello @d3n1s,

That error is to be expected as the node requires the Max range to be larger than the Min as it lists out in the error message.

Although it should usually pop up as you try to change it in the node such as:

I don’t think it should let you save it with those values unless you run with a different set of values.

Hope this helps,
TL

1 Like

Yes, I noticed the constraint.
What would you suggest I do when there is only one unique value to plot?
Example: a set of products with the same limit coefficient, where I filter on limit value

I could not find a way to bypass that.

Hello @d3n1s,

Sorry for the late reply.

So you would want to use the ‘If Switch’ node where you can pass a variable to it depending on how many unique values you have.

Such as say when you only have one: pass ‘bottom’ as a variable and the if switch will default the bottom port where you will bypass the slider widget

When there is more than one value, you want to pass:, use ‘top’ and go to your default workflow with the slider widget

To get this variable you will need to add a couple nodes to make sure you are passing a variable with the proper values of ‘top’ or ‘bottom’ depending on the condition. Either rule engine or variable expressions can get you there.

TL

2 Likes

Wouldn’t it be more meaningful if you could implement a min<=max logic, instead of min<max? This way it would work without ‘workarounds’ if you have only one unique value in the dataset.

Do you mean like an option inside the slide widget node?

TL

No, I mean the node should not complain about Max=Min by default.