Since Google Apps Script is in javascript, I was wondering if I could somehow import it and use it instead of the charting library.
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Highlight parent path to the root
- Google Apps Script to turn in, grade, and return a
- Avoid overlapping of nodes in tree layout in d3.js
相关文章
- D3.js: Stop transitions interrupting on mouseover?
- Adding text to the center of a D3 Donut Graph
- rect collision detection d3js
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- Pausing and resuming a transition
Yes you can import d3 and use it in Google Apps Script. To do so, you need to include it in your script as described here: https://github.com/d3/d3
Here is a hello world GAS script in Gist
As of 2016, it works perfectly. Here is a simple example.
D3 within GAS
You can find the code here: github-D3-GAS
Yes, in principle you can include any Javascript library you like. However, it must comply with Google's Caja sanitization - see the "JavaScript Libraries" subheading here. You will need to build your app using the Html Service and not Ui Service.
[Update 02/09/2015] The HtmlService has moved on a little since this was originally written. This page on restrictions details more about the 3 different sandbox modes. The IFRAME mode does not use the Caja sanitization.