Template text
Views have to display text coming from items, eg. in a tooltip, in axes labels, and so on.
It would be nice to support, in these displayables, templatized texts, ie. text using variables.
These variables would be substituted at runtime with real values taken for each item metadata.
For example, for the following item item:
{
@id: 42,
metadata: [
{ pid: 'name', value: 'Frodo' },
{ pid: 'age', value: '33' },
{ pid: "template", value : "My name is ${name} and I'm ${age} yo." },
]
}
When metadata item.template would be displayed, its value should be My name is Frodo and I'm 33 yo.
Things to think about:
- which template syntax(es) should be supported ?
- what about variables that could be substituted only by following pointers on other items, like
"My name is ${name} and my uncle name is ${parent.name}." -
🌐 localization ?