# Vega-Lite API help with facet or concatenate

**URL:** https://talk.observablehq.com/t/vega-lite-api-help-with-facet-or-concatenate/3024
**Category:** Help
**Created:** [April 6, 2020, 5:16pm UTC](https://talk.observablehq.com/t/vega-lite-api-help-with-facet-or-concatenate/3024 "2020-04-06T17:16:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![frscott](https://avatars.discourse-cdn.com/v4/letter/f/90db22/32.png) [@frscott](https://talk.observablehq.com/u/frscott)
#### Post date: [April 6, 2020, 5:16pm UTC](https://talk.observablehq.com/t/vega-lite-api-help-with-facet-or-concatenate/3024/1 "2020-04-06T17:16:52Z")

</div>

Here is my notebook: [https://observablehq.com/@frscott/nba-statistics](https://observablehq.com/@frscott/nba-statistics)

I currently have Points, Rebounds, and Assists displayed horizontally in small scatter plots by team name. I would like to display them vertically by team name [.row()] and horizontally concatenate the three separate graphs [.hconcat()]. For some reason when I do it this way there is an error.

> Error: Invalid specification {}. Make sure the specification includes at least one of the following properties: “mark”, “layer”, “facet”, “hconcat”, “vconcat”, “concat”, or “repeat”.

```js
{
  const points = vl.markCircle()
    .data(NBA_data)
    
    .encode(
      vl.x().fieldO('season').title('Seasons'),
      vl.y().fieldQ('pts').title('Points'),
      vl.color().fieldN('team_abbreviation').legend(null),
      vl.row('team_abbreviation'),
      vl.tooltip('player_name')
    )
    .resolve({axis: {x: 'independent'}})
    .width(250)
    .height(100)
    .render();
  
  const assists = vl.markCircle()
    .data(NBA_data)
    
    .encode(
      vl.x().fieldO('season').title('Seasons'),
      vl.y().fieldQ('ast').title('Assists'),
      vl.color().fieldN('team_abbreviation').legend(null),
      vl.row('team_abbreviation'),
      vl.tooltip('player_name')
    )
    .resolve({axis: {x: 'independent'}})
    .width(250)
    .height(100)
    .render();
  
  const rebounds = vl.markCircle()
    .data(NBA_data)
    
    .encode(
      vl.x().fieldO('season').title('Seasons'),
      vl.y().fieldQ('reb').title('Rebounds'),
      vl.color().fieldN('team_abbreviation').legend(null),
      vl.row('team_abbreviation'),
      vl.tooltip('player_name')
    )
    .resolve({axis: {x: 'independent'}})
    .width(250)
    .height(100)
    .render();
  
  return vl.hconcat(points, assists, rebounds).render();
}

```

---

<div class="post-metadata">

### Author: ![mahviz](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mahviz/32/2930_2.png) [@mahviz](https://talk.observablehq.com/u/mahviz)
#### Post date: [April 14, 2020, 2:58am UTC](https://talk.observablehq.com/t/vega-lite-api-help-with-facet-or-concatenate/3024/2 "2020-04-14T02:58:37Z")

</div>

I can’t access your notebook to see the details. But this notebook I’ve put together might help:

> **[Lab 3: Practice Vega-Lite Multi-View Charts and Aggregations](https://observablehq.com/@i247sp20/lab-3-practice-vega-lite-multi-view-charts-and-aggregations?collection=@i247sp20%2Flabs)**
>
> An Observable notebook by i247 2020.
