CoolFace
Apppublic

MegaTronX/Subsystem_OS_Command_Access

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
chart_df.html35 linesDownload Raw Back to root
1<!DOCTYPE html>2<html>3<head>4  <style>5    .error {6        color: red;7    }8  </style>9  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm//vega@5"></script>10  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm//vega-lite@4.17.0"></script>11  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm//vega-embed@6"></script>12</head>13<body>14  <div id="vis"></div>15  <script>16    (function(vegaEmbed) {17      var spec = {"config": {"view": {"continuousWidth": 400, "continuousHeight": 300}}, "data": {"name": "data-e58adc7548bdded6fd09c49a28ff71ba"}, "mark": {"type": "circle", "size": 60}, "encoding": {"color": {"field": "cos", "type": "quantitative"}, "x": {"field": "x", "type": "quantitative"}, "y": {"field": "y", "type": "quantitative"}}, "$schema": "https://vega.github.io/schema/vega-lite/v4.17.0.json", "datasets": {"data-e58adc7548bdded6fd09c49a28ff71ba": [{"x": 1, "y": 3, "cos": 0.1}, {"x": 2, "y": 4, "cos": 0.5}]}};18      var embedOpt = {"mode": "vega-lite"};19 20      function showError(el, error){21          el.innerHTML = ('<div class="error" style="color:red;">'22                          + '<p>JavaScript Error: ' + error.message + '</p>'23                          + "<p>This usually means there's a typo in your chart specification. "24                          + "See the javascript console for the full traceback.</p>"25                          + '</div>');26          throw error;27      }28      const el = document.getElementById('vis');29      vegaEmbed("#vis", spec, embedOpt)30        .catch(error => showError(el, error));31    })(vegaEmbed);32 33  </script>34</body>35</html>