Skip to main content

Getting started with D3.js

  • Jun 22, 2020 11:49 AM UTC
  • 4 replies
  • 109 views

Hi there,

I’m a d3.js developer new to Airtable. I’m trying to work out how to import d3 (which is an external Javascript library) and where to do it so I can get started!

And would I do this in the API or in a scripting block?

Any thoughts?

This topic has been closed for replies.

4 replies

Forum|alt.badge.img+4
  • Inspiring
  • Jun 22, 2020 6:49 PM UTC

Welcome!

The best place to do this would be in a custom block: Airtable Blocks SDK

With custom blocks, you can install packages from npm, so that should work with D3.


  • Author
  • Participating Frequently
  • Jun 22, 2020 7:16 PM UTC

That’s great @Kasra - thank you. Would you be really kind and point me to a link on the syntax to use to install packages from npm. I was no doubt looking in the wrong place but couldn’t find it today.


Forum|alt.badge.img+4
  • Inspiring
  • Jun 22, 2020 7:53 PM UTC

Once you’ve created your custom block and installed the blocks command line tool, you’ll have your block’s code on your computer. From there, you can run npm install --save d3 to install d3.

Here’s a good place to start: Airtable Blocks SDK

Note that you’ll need to sign up for the beta to create custom blocks: Custom apps developer survey


  • Author
  • Participating Frequently
  • Jun 23, 2020 4:43 PM UTC

Thank you so much @Kasra. I’ve got it working and d3 installed so all ready to get it up and running tomorrow. Speedy response also much appreciated.