I want to adjust a field’s value by multiplying it as a workaround for Chart not having a left & right axis option like the Tracker plugin.
The use-case would to fields of values where one field is a much higher number than the other.
For example, Field A’s values range from 80-120 while Field B’s values range from 1-10.
In Tracker, I could assign Field A to the left vertical axis and Field B to the right vertical axis and see both lines easily, but in Chart Field B is a tiny line at the bottom of the graphic with miniscule variations.
If I could multiply Field B’s values by 10 they would be visible in a useful manner but I can’t figure it out.
I thought I might be able to create a new variable that multiplies the variable I want to adjust, but to no avail.
Here’s how I set the variable:
const hourSleep = pages.map(p => p.sleep).values
And here’s what I tried that failed:
const hourSleep = pages.map(p => p.sleep).values const sleepAdjust = (hoursSleep * 10)
And some variations thereof, but all of them resulted in an error so I didn’t even get as far as trying to plot the new figures.