Using mysql to visualize real-time time series data with update

Hi,

I want to use Grafana to display biometric measurements in real-time.
I am currently trying it out with mysql but want to use Opentsdb in the end probably.

I have a table with the column “Creation_Time”, which I want to use as time axis. It has nanoseconds timestamps like 1424697765671520439. I can’t figure out how to plot the data in Grafana.
That was my try, but it say no data points:
SELECT
from_unixtime(Creation_Time/1000000000) as time_sec,
x as value,
‘x’ as metric
FROM activity_data
WHERE __timeFrom(Creation_Time/1000000000) AND __timeTo(Creation_Time/1000000000)
I am dividing by 1000000000 because otherwise I can’t use from_unixtime.
The x column has values like -0.0037384033 and no null values.

From the Doc I don’t understand how the macro $__timeFrom works. Does it uses the minimum value of the specified column or is there some other more sophisticated logic behind it allowing zooming.

Thanks in advance.