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 <- membership(wc)
V(net)$color <- colorize(membership(wc))
hchart(net, layout = layout_with_fr)

}



jbkunst/highcharter documentation built on June 13, 2025, 6:59 p.m.