In the visualizer you can extend the "types" defined by javascript with other specific types.

The structure of a value will be something like:

{"type":"mf", "value":"C10H20O3"}

Each type may be associated to a renderer. This could be a simple render allowing to put in a molecular formula the number in subscript or more complex renderer allowing to display a chart.

In this simple example we will display the result of a renderer allowing to displlay an "indicator".

 

The indicator allows 2 format, a simple array of number for which colors will be selected automatically or an array of object for which many parameters can be defined. Among those parameters we have: