Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move away from ggplot2 to interactive JS charts #8

Open
jackolney opened this issue Feb 23, 2017 · 1 comment
Open

Move away from ggplot2 to interactive JS charts #8

jackolney opened this issue Feb 23, 2017 · 1 comment

Comments

@jackolney
Copy link
Owner

Perhaps using: http://jkunst.com/highcharter/

Maybe need a static ggplot2 backup system for LaTeX!?

@jackolney
Copy link
Owner Author

jackolney commented Feb 23, 2017

# Test with highcharter
require(highcharter)
# lets try a basic 90-90-90 thing

indicator <- c("First 90", "Second 90", "Third 90")
value <- c(0.74, 0.86, 0.85)

test <- data.frame(indicator, value)

hchart(object = test,
    type = "column",
    hcaes(x = indicator, y = value)) %>%
    hc_xAxis(title = list(text = "UNAIDS Targets", 
                          style = list(fontSize = "20px")),
             labels = list(style = list(fontSize = "18px"))) %>%
    hc_yAxis(title = list(text = "Perentage", 
                          style = list(fontSize = "20px")),
             labels = list(formatter = JS("function() {
                            return this.value*100+'%';
                           }"),
                           style = list(fontSize = "18px")
                          )
            )

# its just wrappers around JSON... urgh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant