i'll be getting two values bigValue & smallValue based on this I should set maxValue & minValue, below are the conditions explained
if bigValue=42 & smallValue=23 then maxValue=50 & minValue=20
if bigValue=12 & smallValue=03 then maxValue=20 & minValue=0
if bigValue=0.156 & smallValue=0.1 then maxValue=0.2 & minValue=0.1
if bigValue=0.0156 & smallValue=0.01 then maxValue=0.02 & minValue=0.01
How to achieve this with better logic using only javascript?
Here bigValue & smallValue can be of any values & both will be positive.
I have this requirement to set the start and end point for y-axis in graph.
bigValue 42 come with smallValue 03
, for example?else
?). You probably could put those value in a table and do some sort of a composite key lookup, but I'm not sure whether it's worth it in your case.