AntoineGuillot2 / D3partitionR

R package to visualise interactively hierarchical data.
http://enhancedatascience.com/2017/09/20/d3partitionr-0-5-beta/
40 stars 7 forks source link

set_continuous_color_scale #19

Open jakehoare opened 6 years ago

jakehoare commented 6 years ago

I am attempting to set_continuous_color_scale on a treemap with the code below and it produces the error visible should be a boolean

df = data.frame(Count = c(10,20,30,40),
                L1 = c("A", "A", "B", "B"),
                L2 = c("C1", "C2", "D1", "D2"),
                stringsAsFactors = FALSE)

D3partitionR() %>%
    add_data(df, count = "Count", steps = c("L1","L2"), color = "Count") %>%
    set_chart_type('treemap') %>%
    set_continuous_color_scale(c("#aabbcc", "#112233")) %>%
    plot()

I have made various attempts to set visible with set_labels_parameters, set_legend_parameters, set_tooltip_parameters and set_trail that have failed to resolve the issue.

How do I use this function (or any other method) to modify the colors? Thanks

AntoineGuillot2 commented 6 years ago

You're right, there is a bug in there. I will look into it.

AntoineGuillot2 commented 6 years ago

This should be corrected in the dev branch.

acobb83 commented 4 years ago

Hi, looks like the issue is occurring again. Is there anyway around this issue?

AntoineGuillot2 commented 4 years ago

Hi @acobb83, are you using the github version or the cran one ?