unsure how we can do it without eval...
probably need to register the available tools somehow somewhere (in rollup config?), so that we could do viz = new alltools[toolConfig.tool]
//TODO: how to do it without eval? we no longer have registry of all the tools, such as in old vizabi
const toolPrototype = eval(toolConfig.tool);
//could be: viz = new LineChart({ ...
viz = new toolPrototype({
placeholder: document.getElementsByClassName("vzb-placeholder")[0],
model,
locale,
ui
});
since we already have allTools in rollup config and vizabi-tools.json maybe it's a good idea to align every name to be like LineChart instead of linechart
unsure how we can do it without eval... probably need to register the available tools somehow somewhere (in rollup config?), so that we could do
viz = new alltools[toolConfig.tool]