Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community, I have a board with several graphs and charts, and in the quantities I have a column of kilos, however, they asked me if I could add a button, or some object that, when pressed, converts the column of kilos into units, and vice versa.
Thank you in advance for all the help!
---
Hola comunidad, tengo un tablero con varios gráficos y cuadros, y en las cantidades tengo una columna de kilos, son embargo, me pidieron si se podría agregar un botón, o algún objeto que al presionarlo, la columna de kilos se convierta en unidades, y viceversa.
Desde ya agradezco toda la ayuda!
You could make a button that changes a variable.Then use an if statement with this variable to convert your expression into the desired value.
For example, where vConvert is the variable you change with the button:
if($(vConvert)='units', convert kg's to units
if($(vConvert)='kg',show kg's))
Make sure you load vConvert with a value in the load script, otherwise you'll get an error in the chart when the button is not pressed. So put this is the load script:
let vConvert = 'kg'