hchart.igraph: Plot igraph objects using Highcharts

View source: R/hchart.R

hchart.igraphR Documentation

Plot igraph objects using Highcharts

Description

Plot igraph objects using Highcharts

Usage

## S3 method for class 'igraph'
hchart(object, ..., layout = NULL)

Arguments

object

An igraph object.

...

Additional arguments for the data series (https://api.highcharts.com/highcharts/series).

layout

A layout from igraph package.

Examples


if(require("igraph")) {

N <- 40
net <- sample_gnp(N, p = 2 / N)
wc <- cluster_walktrap(net)
V(net)$label <- seq(N)
V(net)$name <- paste("I'm #", seq(N))
V(net)$page_rank <- round(page_rank(net)$vector, 2)
V(net)$betweenness <- round(betweenness(net), 2)
V(net)$degree <- degree(net)
V(net)$size <- V(net)$degree
V(net)$comm <- as.vector(membership(wc))
V(net)$color <- colorize(membership(wc))
hchart(net, layout = layout_with_fr)

}



highcharter documentation built on April 22, 2026, 5:09 p.m.