UNPKG

praemo-razor-visual

Version:

Utilities to support the rendering and visualization of insights and notificaitons gained from the Razor™ industrial AI/ML engine.

13 lines (12 loc) 358 B
export default function CounterChart(context) { if (!context || context === null || context === undefined) { return { data: {}, layout: {} }; } const calculate_plot = (context) => { if (context instanceof String) { return { data: context }; } return { data: context.value, layout: null }; }; return calculate_plot(context); }