Formatting timevectors
You can turn a timevector into a formatted text representation. There are two functions for turning a timevector to text:
to_text, which allows you to specify the templateto_plotly, which outputs a format suitable for use with the [Plotly JSON chart schema][plotly]
This function produces a text representation, formatted according to the format_string. The format string can use any valid Tera template syntax, and it can include any of the built-in variables:
TIMES: All the times in the timevector, as an arrayVALUES: All the values in the timevector, as an arrayTIMEVALS: All the time-value pairs in the timevector, formatted as\{"time": $TIME, "val": $VAL\}, as an array
For example, given this table of data:
You can use a format string with TIMEVALS to produce the following text:
Or you can use a format string with TIMES and VALUES to produce the following text:
This function produces a text representation, formatted for use with Plotly.
For example, given this table of data:
You can produce the following Plotly-compatible text: