ilia timofeev
ilia timofeev

Reputation: 1119

Is any good way to ask and answer about vega / vega-lite?

By good questions and answers I mean:

I copied example from vega-embed into snippet, but it a bit bigger in html part than I expected.

Click Run to see a char and you can edit it with edit the above snippet link.

var yourVlSpec = {
      "$schema": "https://vega.github.io/schema/vega-lite/v2.0.json",
      "description": "A simple bar chart with embedded data.",
      "data": {
        "values": [
          {"a": "A","b": 28}, {"a": "B","b": 55}, {"a": "C","b": 43},
          {"a": "D","b": 91}, {"a": "E","b": 81}, {"a": "F","b": 53},
          {"a": "G","b": 19}, {"a": "H","b": 87}, {"a": "I","b": 52}
        ]
      },
      "mark": "bar",
      "encoding": {
        "x": {"field": "a", "type": "ordinal"},
        "y": {"field": "b", "type": "quantitative"}
      }
    }
vegaEmbed("#vis", yourVlSpec,{actions:{export: false, source: false}});
<script src="https://cdn.jsdelivr.net/npm/vega@3"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@3">
</script>

<body>
  <div id="vis"></div>
</body>

Upvotes: 0

Views: 84

Answers (1)

Philipp_Kats
Philipp_Kats

Reputation: 4214

Сurrent vega editor allows users to share charts (example) - so that might be the best way to communicate issues/solutions on stackoverflow.

Upvotes: 1

Related Questions