private static string GenerateHtml(DataExplorer explorer) { var divId = Guid.NewGuid().ToString("N"); var data = explorer.GetData().SerializeToJson(); var code = new StringBuilder(); code.AppendLine("<div>"); code.AppendLine($"<div id=\"{divId}\" style=\"height: 100ch ;margin: 2px;\">"); code.AppendLine("</div>"); code.AppendLine(@"<script type=""text/javascript""> dotnetInteractiveExtensionsRequire('dotnet-interactive-extensions/sanddance/lib', (interactiveSandDance) => {"); code.AppendLine($@" let viewer = interactiveSandDance.createSandDance(document.getElementById(""{divId}""), ""explorer"");"); code.AppendLine($@" viewer.loadData({data}); }});"); code.AppendLine(" </script>"); code.AppendLine("</div>"); return(code.ToString()); }