DEV Community

Cover image for Vega Unfurl Slack app
dataPixy πŸ§šβ€β™‚οΈ
dataPixy πŸ§šβ€β™‚οΈ

Posted on • Updated on

Vega Unfurl Slack app

So, I did start working on this Vega unfurl Slack app last week.

Should I finish it?

Usage Example

  1. Paste this Vega-Lite Bar Chart JSON spec example into online Vega Editor:
{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "title": "Bar Chart",
  "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"}
  }
}
  1. Click Share in Vega Editor to copy encoded vega spec URL.

  2. Paste vega spec URL into a Slack channel in a workspace with the installed vega-unfurl app.

You should see that shared link expended with a new attachment containing vega chart title, description and json schema information extracted from the shared encoded link.

Vega Unfurl Example

References

Everything you ever wanted to know about unfurling ...

All will be revealed ...

Unfurling links in messages

Slack Events API

Developing Slack apps locally

Top comments (2)

Collapse
 
tarasnovak profile image
dataPixy πŸ§šβ€β™‚οΈ

I added data links to that Vega spec slack msg unfurl attachment ...

Will add png snapshot gen. next.

Collapse
 
tarasnovak profile image
dataPixy πŸ§šβ€β™‚οΈ

might get back to it this weekend ...