chord-diagram

Change and transition dataset in chord diagram with D3

独自空忆成欢 提交于 2019-11-27 18:50:54
I'm working on a chord diagram using D3. I am trying to make it so that when a user clicks on a link the dataset will change to another predefined dataset. I've looked at both http://exposedata.com/tutorial/chord/latest.html and http://fleetinbeing.net/d3e/chord.html , and have tried to use some elements in there to get it to work. Here is the JavaScript to create the "default" diagram: var dataset = "data/all_trips.json"; var width = 650, height = 600, outerRadius = Math.min(width, height) / 2 - 25, innerRadius = outerRadius - 18; var formatPercent = d3.format("%"); var arc = d3.svg.arc()

R make circle/chord diagram with circlize from dataframe

守給你的承諾、 提交于 2019-11-27 10:38:56
问题 I would like to make a chord diagram using the circlize package . I have a dataframe containing cars with four columns. The 2 first columns contains information on car band and model owned and the next two columns to the brand and model the respondent migrated to. Here is a simple example of the dataframe: Brand_from model_from Brand_to Model_to 1: VOLVO s80 BMW 5series 2: BMW 3series BMW 3series 3: VOLVO s60 VOLVO s60 4: VOLVO s60 VOLVO s80 5: BMW 3series AUDI s4 6: AUDI a4 BMW 3series 7:

Change and transition dataset in chord diagram with D3

落爺英雄遲暮 提交于 2019-11-26 19:37:53
问题 I'm working on a chord diagram using D3. I am trying to make it so that when a user clicks on a link the dataset will change to another predefined dataset. I've looked at both http://exposedata.com/tutorial/chord/latest.html and http://fleetinbeing.net/d3e/chord.html, and have tried to use some elements in there to get it to work. Here is the JavaScript to create the "default" diagram: var dataset = "data/all_trips.json"; var width = 650, height = 600, outerRadius = Math.min(width, height) /