mtennekes / treemap

R package for treemap visualisation
64 stars 24 forks source link

sorting through sortID broken after fixing #27 #30

Closed javrucebo closed 8 years ago

javrucebo commented 8 years ago

Giving an ordering preference through parameter sortID is broken.

Commit d8817db2805058f6a36db9f882790681961bc052 breaks the behaviour

# create data set
set.seed(1234)
df <- data.frame(A=LETTERS[1:12],size=seq(12,1),sort=sample(12))

# install the last version with sortID respected and plot treemap
devtools::install_github("treemap", user="mtennekes", subdir="pkg",ref="5ca7c0b562e4a60bab111752210d6aba8995f55a")
library(treemap)
treemap(df,index="A",vSize="size",algorithm="pivotSize",sortID="sort")

# install the version which breaks sortID and plot treemap
devtools::install_github("treemap", user="mtennekes", subdir="pkg",ref="d8817db2805058f6a36db9f882790681961bc052")
library(treemap)
treemap(df,index="A",vSize="size",algorithm="pivotSize",sortID="sort")

Treemap with and without sorting

mtennekes commented 8 years ago

Thanks for reporting!