Wraps a raw JavaScript expression string for use in Figure config values.
When serialised via Jason, the value is emitted as a {"__rawjs__": "expr"}
marker object. The Kino and Phoenix Hook widgets detect these markers and
eval them in the browser before passing the config to Plotly.newPlot,
so that JavaScript references (e.g. Plotly.Icons.camera) and function
literals (e.g. "function(gd) { ... }") work correctly.
Example
Figure.new(config: %{
modeBarButtonsToAdd: [%{
name: "my_button",
icon: Plotly.RawJS.new("Plotly.Icons.camera"),
click: Plotly.RawJS.new("function(gd) { alert(gd.id); }")
}]
})
Summary
Functions
Wrap a JavaScript expression string.
Types
@type t() :: %Plotly.RawJS{value: String.t()}