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

Y Axis Scaling Not Working Again #50

Open
abresler opened this issue Aug 28, 2015 · 6 comments
Open

Y Axis Scaling Not Working Again #50

abresler opened this issue Aug 28, 2015 · 6 comments
Assignees
Labels

Comments

@abresler
Copy link

Trying to finagle the y scales and looks like it may not be working for tau_lines though the example from the other issue for some reason did scale down.

packages <- 
c('lubridate', 'taucharts', 'magrittr', 'dplyr')
lapply(packages, library, character.only = T)
data <- 
  data_frame(date = seq.Date("2006-06-01" %>% ymd %>% as.Date, length.out = 96, by = 30),
           data = runif(n = 96, min = 10000, max = 12000) %>% as.numeric,
           type = 'T')

data %>% 
  tauchart() %>% 
  tau_line('date', "data", color = 'type') %>% 
  tau_guide_y(min = 10000,
              max = 12000,
              auto_scale = F,
              tick_format = "4,d.0"
  )
@hrbrmstr
Copy link
Owner

I think it's the updated TauCharts JS lib that's the culprit. Try doing devtools::install_github("hrbrmstr/taucharts@1d10c99") and run the code again. I'll see what's up with the JS lib over the weekend.

@hrbrmstr hrbrmstr added the bug label Aug 28, 2015
@hrbrmstr hrbrmstr self-assigned this Aug 28, 2015
@abresler
Copy link
Author

abresler commented Sep 1, 2015

That worked!

@timelyportfolio
Copy link
Collaborator

The issue (related to #49) is tau_guide_y( auto_scale = FALSE ) and I'm pretty sure tau_guide_x also is not working.

packages <- 
c('lubridate', 'taucharts', 'magrittr', 'dplyr')
lapply(packages, library, character.only = T)
data <- 
  data_frame(date = seq.Date("2006-06-01" %>% ymd %>% as.Date, length.out = 96, by = 30),
           data = runif(n = 96, min = 10000, max = 12000) %>% as.numeric,
           type = 'T')

data %>% 
  tauchart() %>% 
  tau_line('date', "data", color = 'type') %>% 
  tau_guide_y(min = 10000,
              max = 12000,
              auto_scale = F,
              tick_format = "4,d.0"
  ) -> tc

tc$x$guide$y$autoScale == FALSE

# manually set it to FALSE
tc$x$guide$y$autoScale = FALSE

tc

image

@hrbrmstr
Copy link
Owner

hrbrmstr commented Sep 2, 2015

I think I got too clever for my own good in those functions. Lemme change something and post a new verison.

@timelyportfolio
Copy link
Collaborator

Also, I just sent pull to dev for 0.5.2.

@hrbrmstr
Copy link
Owner

hrbrmstr commented Sep 2, 2015

aye, caught that. i'll update that first. #ty

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

No branches or pull requests

3 participants