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

The percentage toggle is broken #6

Open
dgrtwo opened this issue Apr 29, 2020 · 0 comments
Open

The percentage toggle is broken #6

dgrtwo opened this issue Apr 29, 2020 · 0 comments

Comments

@dgrtwo
Copy link
Contributor

dgrtwo commented Apr 29, 2020

The toggle to show metrics as a percentage out of a total is broken (it continues to show just the absolute total). Example:

---
name: metrics_example_example
owner: drob
metrics:
  nb_example:
    title: Example
    description: Example
dimensions:
  dimension:
    title: Example
    description: Example
---
library(dplyr)
library(tidyr)
library(tidymetrics)
library(shinymetrics)

example_values <- crossing(date = Sys.Date() - 100:1,
                           dimension = c("Type 1", "Type 2")) %>%
    mutate(period = "day",
           nb_example = rpois(n(), 20))

example_metrics <- create_metrics(example_values)

preview_metric(example_metrics$example_example_nb_example)

image

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

No branches or pull requests

1 participant