Tree Chart

A tree graph is a network structure. It is constituted of a root node that gives birth to several nodes connected by edges or branches.



Color Themes


{
   "x" : {
      "Level1" : [null,"L1","L1","L1",null],
      "Level2" : [null,null,"L2","L2",null]
   },
   "y" : {
      "data" : [
        [1,2,3,4,5]
      ],
      "smps" : ["A","B","C","D","E"],
      "vars" : ["Order"]
   }
}
{
   "graphType" : "Tree",
   "hierarchy" : ["Level1","Level2"],
   "showTransition" : "true",
   "title" : "Collapsible Tree"
}
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/cX-tree2-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
x=read.table("https://www.canvasxpress.org/data/cX-tree2-smp.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
  data=y,
  smpAnnot=x,
  graphType="Tree",
  hierarchy=list("Level1", "Level2"),
  showTransition=TRUE,
  title="Collapsible Tree"
)