|Chord snip is an add-on for Google Sheets that creates a Chord diagram as you type, gives you the SVG code to embed it in a web site and the ability to embed it in your Sheet. It’s available on the Sheets add-on store. (not anymore! feel free to use the code to create your own one) I’ll use D3.js version 4 under the hood.|
Page Content hide
Introductory videoHere’s a video showing the features of Chord Snip
On startingHere’s the Add-on launching menu item On initialization, Chord Snip automatically identifies the data on the active sheet and builds a Chord diagram. The sidebar looks like this and shows a preview of the chart you can choose to insert into your sheet.
About Chord diagramsActually, you’ll see the explanation below in the About tab But here’s a quick explanation for those unfamiliar with Chord diagrams.
What is a Chord diagram?A chord diagram is a visualization of the relationship between data items, usually showing the flow of data between items in a system. The diagram is arranged as connected chords in a circle and can show flows in both directions. Chord Snip is a Google Sheets add-on/Office add-in which maintains a chord diagram preview in the sidebar of the active sheet’s data in real-time.
Suitable types of dataChord charts are often used to show flows between places or members of a system (for example journeys to and from places)
Data formatA Chord diagram needs 3 data items, which should be laid out as columns with headers in a sheet.
- Source. Sending process name Target. Receiving process name Volume. The volume of flow between ‘Source’ and ‘Target’
Chart imageYou can get a scaled-up version of the chart preview by copying the code shown in the Chart settings/embed code area. This will be in SVG format so that you can embed the code or link to the drive file in a web site or document. It is also possible to insert a static version of the chart in your sheet. The scale and look of the chart are controlled by options in Chart settings.
Source data columnsThere are 3 columns of interest for a Chord diagram. Chord snip will try to deduce which columns are which, but you can explicitly set them via the Data settings dialog. The columns section can be used to modify the source data location.
Source data scopeBy default, all the data in the active sheet is incorporated into the chart. If you select an area of data and choose the selected range from the source data section, the chart will only use data from the selected area.
Test dataIf Chord snip detects that there is no suitable data on the current page, you’ll get a message like this, and it will even generate a new sheet with some data to play around with if you want.
Inserting a full-sized chart in the sheet.To embed a chart image in your sheet, select a cell that at which the top left corner of the chart should be positioned, and use Insert. This will embed a full-sized image as below.
Removing an inserted imageYou can manipulate or remove an already inserted image from your sheet with this standard sheets image dialog.
Chart settingsThere are a large number of settings available to change the appearance of both the preview and the full-sized chart. Let’s take a look through them. It should be evident from the images what each setting does.
Preview Chart appearanceThis dialog gives access to further settings to change the appearance of various attributes of the chart.
Link appearanceThese settings set the appearance of the links between each node.
Color modesThese identify the color scheme approach. There are various to choose from which may be extended over time. These schemes are used to color both the nodes and the links. Ramp position and ramp value will create a color ramp scheme which will be interpolated using either the position of the node or its total volume to scale the color. The start and finish ramp colors can be specified Here’s an image using these ramp colors, first ramping by position then by value
OpacityOpacity is a value between 0 and 1 and is the transparency of the color. A lowish value is most effective for this kind of diagram so the crossovers can be more clearly seen. Here’s what an opacity of 1 looks like, using the google20 scheme.
BorderHere’s the same diagram with the border width set to 0.
Node appearanceThe nodes are the chords round the exterior of the circle. They take their fill colors from the link color schemes and opacity. The label settings are self-explanatory, but here are a few notes on the others.
- The pad angle is the spacing between nodes. Here’s a diagram with node spacing of 0.
- The thickness of the arc is the difference between the exterior and interior radii of the arcs. Here’s a diagram with a larger thickness
- The items can be sorted according to volume, or left in their natural order.
TooltipsHovering over a link or a node will reveal some data. The tooltip format is not configurable.]
InteractivityThe preview diagram is interactive. Hovering over a node will hide all but its links Images embedded in sheets don’t have this interactivity, since they are simply images of a diagram.
ScaleThese settings are the sizes of the full-scale chart that you embed in your sheet with the Insert button. Some notes on these settings.
- The width and font size of the desired embedded chart is used to scale other measurements of the original chart such as the angle between nodes.
- The image margin is the padding around the image in the embedded image.
- The image frame fill color is the background color to use for the embedded image frame.
- A transparent image frame when embedded could look like this. This is .5 opacity – note the sheet grid lines show through.
Embed codeChord snip creates SVG code that can be copied directly into a web page’s HTML code to embed the chart. Just copy the code in this dialog.
Managing settingsYou’ll notice that each settings page has an application and a back button. This allows you to undo any changes you’ve made while on this settings page. Apply will be enabled if you have made any. Any changes made on the page are immediately applied to the chart preview so you can flip over to see what it looks like. To keep them hit Apply, to get abandon them use Back. In addition, Chord snip has a comprehensive way of making settings permanent so you can re-use them if you have a house or document style you want to follow, or for restoring complete settings as they were at the beginning of the session, or to the default values for the chart.
Save settingsThis dialog allows you to retain the current settings so that they will apply each time you open this document, or to every document where you use Chord Snip. Clear these settings will cause Chord snip to revert to its normal default values in this and other documents.
Reset settingsChord snip follows this pattern when deciding which settings to use when opening, using the first settings collection that exists. In an open document, you can select some different setting by using the Apply settings dialog
Data SettingsYou can modify the scope of the chart with these settings
Respecting FiltersThe add-on now uses SheetsMore to respect data, so the chart will pay attention to the most common types of filters selected in the UI. Since this is a service with a quota, the setting of respect filters is not saved to avoid unnecessary API traffic, so if you want it, you need to set it for your session.
AvailabilityThis add-on is available in the Sheets add-on store Join our community for news of when this add-on is published so you can use it in your own workbooks.
Pro versionAll features mentioned here are available in the current Chord Snip version. At some future time, there might be a pro-version with additional capabilities or a lite version with some features that might need to be unlocked before they are available. For more information on this join our community
Source codeAs usual, the code is open source. You can find it on GitHub. or at the bottom of this page
Other versionsYou may want to check out Sankey Snip which is a similar add-on for creating Sankey flow diagrams.
- Add-on for decrypting columns in Google Sheets
- Color Arranger
- Dicers Pro and advanced features
- Import, export and mix container bound and standalone Apps Script projects
- Inline libraries in an Apps Script project
- Measure round trip and execution time from add-ons
- Merging sheets from multiple sources and encrypting selected columns
- Merging slide templates with tabular data
- Office Add-ins – first attempt
- Orchestrating competing google and Office framework loads
- Plotting maps with overlays Sheets add-on starter
- Promise implementation for Apps Script Stripe payments
- Refreshing an oauth token in add-on
- Repeatable add-on settings layouts and style
- Sheets API – Developer Metadata
- SlidesMerge add-on
- Unpicking the Google Picker
- Watching for changes in an Office add-in
- When test add-ons doesn’t work
- Sankey Snip