Forum Discussion
Deneb Vega-lite: AND/OR logic
- 3 years ago
Hi Salle,
You can use JavaScript logical operators in expressions, so something like the following will work:
"test": "datum['Diameter'] > datum['Diameter USL'] || datum['Diameter'] < datum['Diameter LSL']"- And: &&
- Or: ||
- Not equal: !=
If you're using the predicate approach (using more structured objects rather than expressions), you can use 'predicate composition' to combine these using arrays - there's an example at the bottom of the doc page here.
Hopefully this will help get you moving. Good luck!
Regards,
Daniel
Hi Salle,
You can use JavaScript logical operators in expressions, so something like the following will work:
"test": "datum['Diameter'] > datum['Diameter USL'] || datum['Diameter'] < datum['Diameter LSL']"
- And: &&
- Or: ||
- Not equal: !=
If you're using the predicate approach (using more structured objects rather than expressions), you can use 'predicate composition' to combine these using arrays - there's an example at the bottom of the doc page here.
Hopefully this will help get you moving. Good luck!
Regards,
Daniel