As already mentioned in the comments, you might want to give
networkD3 a shot.
Here is an example based on the sample data you provide.
# Create nodes and links data.frames nodes <- data.frame(name = unique(unlist(hc_dat[, 1:2]))) links <- data.frame( source = match(hc_dat$from, nodes$name) - 1, target = match(hc_dat$to, nodes$name) - 1, value = hc_dat$N) # Draw a Sankey diagram library(networkD3) sankeyNetwork( Links = links, Nodes = nodes, Source = "source", Target = "target", Value = "value", NodeID = "name", fontSize = 16, fontFamily = "sans-serif", nodeWidth = 30, nodePadding = 30)
Sankey from A->B and from B->C can be done by re-defining your underlying data:
hc_dat <- data.frame(from = c("A", "B"), to = c("B", "C"), N = c(7, 5))
Similarly, you can define node from A->C
hc_dat <- data.frame(from = c("A", "B", "A"), to = c("B", "C", "C"), N = c(5, 5, 7))
This does not render a nice plot, though.
- R Highcharter Sankey nodes column property trouble
- Sorting Sankey chart's source & destination nodes alphabetically
- How to change the palette colors of a highcharter column plot which depends on a variable?
- Highcharter - move data label to top of column
- highchart Sankey chart nodes flow with image for insights
- Adding a pattern fill to a black and white column graph in Highcharter
- set font size of sankey chart in HIghcharter for R
- Strange character in the Highstock source code
- Column Labels in Sankey Charts in Highcharts
- Different ToolTip text For Links and Nodes in Highcharts Sankey Charts
- Column based Highchart drilldown series assign color code to each column
- Having trouble mapping highcharter aesthetics to reactive object elements
- xAxis order of R highcharter column plot
- Why does highcharts sankey chart sometimes combine multiple nodes with same node name but different Id into one and hide the lines?
- trouble with categories on highcharts column chart
- drilldown feature with url property for column graph in Highcharts
- Trouble Animating svgX of HighCharts Column Label
- HighCharts Sankey + NextJS: TypeError: Cannot read property 'Core/Series/Point.js' of undefined
- sorting categories in a highcharter stacked column chart
- Highcharts sankey draggable nodes
- How to create a column range chart in Highcharts using range and navigator functions?
- How do you change the colour of each category within a highcharts column chart?
- set different colors for each column in highcharts
- Highchart specific width stack column bar graph
- Disable-Click on Legend in HighCharts Column Graph
- Maximum bar width in Highcharts column charts
- How to hide zero values in Column chart
- Displaying percentage in Y-axis of Highcharts column chart
- Highcharts : Change opacity of a column chart
- SyntaxError: JSON.parse: expected property name or '}' while using highcharts
More Query from same tag
- Why is the line not displayed in the highcharts?
- my first highchart
- Highstock Navigator Mask doesn't cover content
- bar not displayed in Highcharts for Higher values
- External JSON from API into array?
- Center tooltip for highcharts area chart
- Highstock candlestick chart wrong color
- Highcharts Pie Chart from Ajax
- Highcharts - Highstock chart showing double line on hovering data points to show tooltip
- Highcharts doesn't work
- Data coming through socket (nodejs) and push into Highchart
- Creating graph with x-axis only using D3
- highcharts with angular, removing xAxis line
- Customise Highstock tooltip conditionally
- Highcharts custom SVG marker
- Django Passing arguments to linked .js script template
- How to bind dynamic data to highcharts in Windows Phone 8.1 application
- highchats in r shiny: the x values on click are not the real values of my date axis
- Toggle alert visibility using highcharts
- Highcharts - Positioning the legend (left and right/x and y)
- Change the color of legend symbol highchart
- HighCharts donut - how to individually adjust height of each external segment?
- What is the best jQuery Chart framework to build stacked multiple y-axis charts?
- Highcharts - Remove first marker from Area chart in every series
- the datatime value displayed not correct on highchart
- Highcharts not showing tooltip after update from null
- I can't return my json object
- Highcharts reflow does not work on class selector
- How to calculate the weights in a Sankey chart?
- How to define a custom class to HighchartsReact component