Giter Site home page Giter Site logo

hrbrmstr / taucharts Goto Github PK

View Code? Open in Web Editor NEW
65.0 9.0 12.0 4.44 MB

:bar_chart: An R htmlwidget interface to the TauCharts javascript library

Home Page: http://rpubs.com/hrbrmstr/taucharts

License: Other

R 1.90% JavaScript 0.16% HTML 97.94%
r rstats htmlwidgets htmlwidget charting-library interactive-visualizations taucharts-javascript-library taucharts

taucharts's Introduction

taucharts is an R htmlwidget interface to the TauCharts javascript library

Take a look at the TODO list and chip in!

Right now, you can make & customize (including manual color scales & ordered factors + legends + tooltips + trendlines):

  • scatterplots
  • scatterplot matrices
  • line charts
  • bar charts (veritical, horizontal & stacked)

Composite plots are on the road map for support but not in the R package yet.

Have a look on RPubs to see what taucharts can do!

The following functions are implemented:

  • tauchart: Create a new TauChart
  • tau_line: Create a TauCharts line chart
  • tau_point: Create a TauCharts scatterplot
  • tau_bar: Create a TauCharts bar chart (horizontal or vertical)
  • tau_stacked_bar: Create a TauCharts stacked bar chart (veritcal only)
  • tau_guide_gridlines: Control showing of axis gridlines
  • tau_guide_padding: Set overall chart padding
  • tau_guide_x: Control x-axis padding, label, scale & tick format
  • tau_guide_y: Control y-axis padding, label, scale & tick format
  • tau_legend: Add a TauCharts legend
  • tau_tooltip: Add a TauCharts tooltip
  • tau_trendline: Add a TauCharts trendline
  • run_tau_app: Run a built-in example Shiny app
  • tau_tasks: Add post-render JavaScript tasks to taucharts
  • tau_add_css_rule: Add a CSS rule to the rendered htmlwidget
  • tau_set_font: Set font-family for the chart
  • as_tauchart: Turn a simple (single-geom) ggplot plot into an tauchart object
  • tau_title: Add a title to the tauchart plot

with many color palette options:

  • tau_color_manual: Specify the colors used in the charts
  • tau_color_brewer: Use the ColorBrewer palette in the charts
  • tau_color_economist: Use the “Economist” palette used in the charts
  • tau_color_few: Use the “Few” palette used in the charts
  • tau_color_highcharts: Use the HighchartsJS palette used in the charts
  • tau_color_manual: Specify the colors used in the charts
  • tau_color_tableau: Use the Tableau palette in the charts
  • tau_color_wsj: Use the “Wall Street Journal” palette used in the charts

The following datasets are included:

  • cars_data: statistics on cars released from 1997 through 2013 (a data frame with 135 rows and 7 variables)

News

  • Version 0.4.5 released : Shiny click events, color themes for faceted charts, updated TauCharts JS lib
  • Version 0.4.4.9000 released : tau_title
  • Version 0.4.3.9000 released : minor issue with guides
  • Version 0.4.2.9000 released : pre-CRAN flight check
  • Version 0.4.0.9000 released : added as_tauchart & updated TauCharts JS lib
  • Version 0.3.4.9000 released : added warning for global targeted CSS rules and font ref fix thx to @jlewis91
  • Version 0.3.3.9001 released : fix for custom colors and tau_line
  • Version 0.3.3 released : custom font for chart (?tau_set_font)
  • Version 0.3.2 released : custom colors working in legend & trendlines
  • Version 0.3.1 released : removed R 3.2.0 dependency (removed the dependent code)
  • Version 0.3.0 released : color palettes galore!
  • Version 0.3.0.9000 released : ?tau_add_css_rule (add CSS rules to a chart)
  • Version 0.2.6.9000 released : ?tau_tasks (add JavaScript to a chart)
  • Version 0.2.5.9000 released : list & run example Shiny apps - see ?run_tau_app for more info
  • Version 0.2.5.9000 released : stacked bar charts
  • Version 0.1.0 released : trendline, tooltips & dev fork (prod is pretty much stable & functional)
  • Version 0.0.1.9003 released : facet-based ordering + legends
  • Version 0.0.1.9000 released : auto-detects column classes, can add manual colors & faceted plots are now working (see the Rpub for an example)
  • Version 0.0.0.9000 released

Installation

devtools::install_github("hrbrmstr/taucharts")

Usage

library(taucharts)

# current verison
packageVersion("taucharts")
#> [1] '0.4.5'

Test Results

library(testthat)
date()
#> [1] "Fri May 11 00:02:12 2018"

test_dir("tests/testthat", reporter = SummaryReporter)
#> basic functionality: S
#> 
#> ══ Skipped ════════════════════════════════════════════════════════════════════════════
#> 1. we can do something (@test-taucharts.R#2) - Empty test
#> 
#> ══ DONE ═══════════════════════════════════════════════════════════════════════════════

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

taucharts's People

Contributors

adeelk93 avatar hrbrmstr avatar jbkunst avatar jlewis91 avatar timelyportfolio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

taucharts's Issues

Custom color palettes not working with legend

tauchart(mtcars) %>%
  tau_point("wt", "mpg", color="cyl") %>%
  tau_color_tableau() %>% 
  tau_legend()

image

When I use Developer Tools to inspect it, it looks like the color should be being applied, but it's not showing up.

color functions not working for me with line charts

Always possible it's user error, but using your sample line_dat data here

line_dat <- structure(list(type = c("us", "us", "us", "us", "us", "us", "bug", 
"bug", "bug", "bug", "bug"), count = c(0L, 10L, 15L, 12L, 16L, 
13L, 21L, 19L, 23L, 26L, 23L), date = c("12-2013", "01-2014", 
"02-2014", "03-2014", "04-2014", "05-2014", "01-2014", "02-2014", 
"03-2014", "04-2014", "05-2014")), .Names = c("type", "count", 
"date"), class = "data.frame", row.names = c(NA, 11L))

this works for me

tauchart(line_dat) %>% 
  tau_point("date", "count", "type") %>% 
  tau_color_manual(c("red", "blue"))

But this doesn't

tauchart(line_dat) %>% 
  tau_line("date", "count", "type") %>% 
  tau_color_manual(c("red", "blue"))

Yet this does

tauchart(line_dat) %>% 
  tau_line("date", "count", "type")

custom color palette?

Is there a way to use a custom palette? The help file only mentions "tableau10medium", "gray5", "colorblind10", "purplegray12", "bluered12", "greenorange12", "cyclic".

library(taucharts)
tauchart(mtcars) %>%
  tau_point("wt", "mpg", color="cyl") %>%
  tau_color_tableau(palette = "bluered12") %>% 
  tau_legend()

Can I use, for example, this one?

Thanks!

tau_point size enhancement

Allowing a fixed value would be useful
I have tried hacking by adding a column with a value of ,say, 1 without success

Percentage in Y axis?

Is it possible change this graph to display percentages in the y axis? (5%, 10%, 15%, 20%)

DF <-
  structure(
    list(
      Ranking = structure(
        1:5, .Label = c("Bottom", "Bellow Average",
                        "Average", "Above Average", "Top"), class = "factor"
      ), Prob = c(20L,
                  20L, 20L, 20L, 20L)
    ), .Names = c("Ranking", "Prob"), row.names = c(NA,-5L), class = "data.frame"
  )

tauchart(DF) %>% tau_bar(x = "Ranking", y = "Prob")

Thanks!

Shiny compatibility?

Is taucharts compatible with shiny? If so, what am I missing?

library(shiny)
library(taucharts)
DF <-
  structure(
    list(
      Ranking = structure(
        1:5, .Label = c("Bottom", "Bellow Average",
                        "Average", "Above Average", "Top"), class = "factor"
      ), Prob = c(20L,
                  20L, 20L, 20L, 20L)/100
    ), .Names = c("Ranking", "Prob"), row.names = c(NA,-5L), class = "data.frame"
  )



server <- function(input, output) {

  output$plot <- renderPlot({
    tauchart(DF) %>% 
      tau_bar(x="Ranking", y="Prob") %>% 
      tau_guide_y(tick_format="%")
  })

}

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(width = 3),
    mainPanel(width = 9, plotOutput("plot"))
  )
)

shinyApp(ui = ui, server = server, options = list(width=800, height=490))

Thanks!

Y Axis Scaling Not Working Again

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"
  )

Rpres issues with taucharts

http://stackoverflow.com/questions/32514371/error-with-rstudios-rpresentation-and-taucharts

The following error is shown in Rpresentation (From RStudio)
<!-htmlpreserve-> when rendering a tauchart on one of the presentation slides.

Whereas with ioslides there is no error and the graph is plotted nicely and keeps all its interactivity.

Do I need to add an additional parameter in the chunk options? Or do I need to specifically assign print to the object?

Code:

```{r,warning=FALSE,error=FALSE,message=FALSE,echo=FALSE}
tauchart(df) %>% 
tau_stacked_bar(x="x",y="y",color="color") %>%
tau_legend() %>% tau_tooltip()
```

Plot months in x-axis?

The ticks in this plot go from 0 to 13:

countspermonth <-
  structure(
    list(
      month = c(4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2,
                3), count = c(
                  1203409L, 1104115L, 933362L, 940897L, 1149347L,
                  1221000L, 1319375L, 1087002L, 1126721L, 1276824L, 1152835L, 1687903L
                )
    ), row.names = c(NA,-12L), class = "data.frame", .Names = c("month",
                                                                "count")
  )

library(taucharts)
tauchart(countspermonth) %>% 
  tau_line(x = "month", y = "count") %>% 
  tau_guide_x(label="Month") %>% 
  tau_guide_y(label="Counts", label_padding=50)

Is there a way to tell tauchart to use months instead of numbers? Or at least respect the 4,5,..2 ticks?

Thanks!

Stacked bars?

Is is possible to have stacked bars? For example:

#Fake data
effectiveness <-
  structure(
    list(
      Ranking = structure(
        c(
          5L, 4L, 3L, 2L, 1L, 5L,
          4L, 3L, 2L, 1L, 5L, 4L, 3L, 2L, 1L, 1L, 2L, 3L, 4L, 5L
        ), .Label = c("Bottom",
                      "Bellow Average", "Average", "Above Average", "Top"), class = c("ordered",
                                                                                      "factor")
      ), Probability = c(
        0.4, 0.4, 0.1, 0.08, 0.02, 0.1, 0.2,
        0.5, 0.1, 0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.01, 0.04, 0.15, 0.7,
        0.1
      ), data = structure(
        c(
          4L, 4L, 4L, 4L, 4L, 2L, 2L, 2L, 2L,
          2L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L
        ), .Label = c("none",
                      "little", "some", "lots"), class = c("ordered", "factor")
      )
    ), .Names = c("Ranking",
                  "Probability", "data"), row.names = c(NA,-20L), class = "data.frame"
  )

effectiveness %>% 
  tauchart(.) %>%
  tau_bar(x = "data", y = "Probability", color = "Ranking") %>%
  tau_guide_y(tick_format = "%") %>%
  tau_tooltip() %>% 
  tau_legend()

I would like to have 4 bars, each one adds to 100%

Thanks!

Can't Install Update

I think there is some bad code here:

/private/var/folders/0n/qhktf1j96b112pf4d6hm2qch0000gn/T/RtmpjA40rj/devtools64aa1b2dfd2/hrbrmstr-taucharts-ad3e17b/R/plugins.:4:1: unexpected input
3: #' @param tau taucharts object
4: <<

Charts Not Displaying v0.4.9000

This is my first attempt with Taucharts and I cannot make a chart display. The code executes without error, but the output is always a blank screen. I've tried viewing in both the default RStudio viewer and knitting as an HTML file and opening directly in browser. The blank page loads each time.

Other htmlwidgets seem to work fine. e.g. metricsgraphics charts display as expected.

I've tried using both the example scatter plot and line chart data.

R Session Info:

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] metricsgraphics_0.9.0 htmlwidgets_0.8       taucharts_0.4.4.9000  dplyr_0.5.0          

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.10       lattice_0.20-34    zoo_1.8-0          digest_0.6.12      assertthat_0.2.0   grid_3.3.2         R6_2.2.0          
 [8] jsonlite_1.4       DBI_0.5-1          magrittr_1.5       RColorBrewer_1.1-2 tools_3.3.2        yaml_2.1.14        htmltools_0.3.6   
[15] knitr_1.15.20      tibble_1.2       

CSS Rules not local to a single graphic

When a css rule is added to a single graphic, e.g. tau_add_css_rule(".axis_rooty:not(.facet-axis) .tick:nth-child(2n+2) text {opacity: 0;}"), the rule takes effect for all graphics on the .Rmd HTML page. It's probably a good idea to nest all rules within a chart id, so that different themes can be applied to different graphics.

legend size & location

Hi,

Is there a way to control the boundary of legend, font size and layout/location of it?
I am using taucharts with shinydashboard, I feel the space used by legend should be adjusted in many cases.

add vertical lines?

Is it possible to add vertical lines to a graph? like geom_vline in ggplot2

Right now I have this graph:

df1 <-
  structure(
    list(
      Timestamp = structure(
        c(
          1441814593, 1441818193,
          1441821398, 1441821449, 1441828375, 1441873127, 1441813676, 1441837436,
          1441843661, 1441885583, 1441966341, 1441985621, 1442048926, 1442321691,
          1442321740, 1442328339, 1442329081, 1442349761, 1442391375, 1442408140,
          1442417679, 1442496854, 1442506500
        ), tzone = "UTC", class = c("POSIXct",
                                    "POSIXt")
      ), Group = c(
        1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L
      )
    ), .Names = c("Timestamp",
                  "Group"), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,-23L)
  ) %>% group_by(Group) %>% 
  arrange(Timestamp) %>% 
  mutate(count = row_number()) 

library(taucharts)
df1 %>% group_by(Group) %>% 
  arrange(Timestamp) %>% 
  mutate(count = row_number()) %>% 
  tauchart() %>% 
  tau_line("Timestamp", "count", "Group") %>% 
  tau_legend() %>% tau_tooltip() %>% 
  tau_guide_x(auto_scale=TRUE, label="Timestamp", tick_format="%b %d")

I would like to add two vertical lines:

vlines <- as.numeric(c(
  as.POSIXct("2015-09-11 00:00:00"),
  as.POSIXct("2015-09-15 00:00:00")
))   

Is that possible?

Thanks!

Can this warning (and only this) be suppressed?

Warning in func() :
Ignoring explicitly provided widget ID "tau-95ffc7899e12ee4f87162fffbe06cf"; Shiny doesn't use them

I have been using other htmlwidgets but it seems only taucharts will cause this warning.

Scatter w/ Color + Trendline

Hi,

Just discovered this package. Generally very nice!

Question:
It seems not possible to show the trend line simultaneously with colored scatter points when each point is its own group.

What I would like to achieve is having a legend identifying every point (as they represent store fronts in our case). For this I (afaik) need to specify 'color'. Yet color seems to do some sort of grouping as well, thus preventing the trend line to show up (as there is only one data point per group).

Is it possible to add a legend, preferably w/ colored observations, and add a trend line treating all points the same?

Shows a legend + trend line (but grouped):

tauchart(cars_data) %>%
  tau_point("milespergallon", c("class", "price"), color="class") %>%
  tau_trendline() %>% 
  tau_legend()

Shows legend but (almost) no trend line (changed color to vehicle to make the point):

tauchart(cars_data) %>%
  tau_point("milespergallon", "price", color="vehicle") %>%
  tau_trendline() %>% 
  tau_legend()

How to disable dodge on color in tau_bar()

In tau_bar(x, y, color, size, horizontal),
is it possible to disable dodge or use tau_stacked_bar() automatically,
if color==x or (horizontal==T && color==y)

For example:
mtcars %>% dplyr::mutate(cyl=factor(cyl)) %>% tauchart() %>% tau_bar('cyl', 'mpg', 'cyl')

Themes do not work for facet plots

Custom themes add css classes which target tau-fill-, but facet grid color classes are color20-. It isn't clear to me why the taucharts widgets create tau-fill classes, when all tauCharts library examples (facet or otherwise) seem to create color labeled classes. Is this because the embedded version of taucharts is out of date?

Smooth transition when subsetting?

The following shiny app allows me to subset the data and then redraws a bar graph. Is it possible to have an animation where the bars change size instead of the discrete jumps that I have now?

#Fake data
effectiveness <-
  structure(
    list(
      Ranking = structure(
        c(
          5L, 4L, 3L, 2L, 1L, 5L,
          4L, 3L, 2L, 1L, 5L, 4L, 3L, 2L, 1L, 1L, 2L, 3L, 4L, 5L
        ), .Label = c("Bottom",
                      "Bellow Average", "Average", "Above Average", "Top"), class = c("ordered",
                                                                                      "factor")
      ), Probability = c(
        0.4, 0.4, 0.1, 0.08, 0.02, 0.1, 0.2,
        0.5, 0.1, 0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.01, 0.04, 0.15, 0.7,
        0.1
      ), data = c(
        "lots", "lots", "lots", "lots", "lots", "little",
        "little", "little", "little", "little", "none", "none", "none",
        "none", "none", "some", "some", "some", "some", "some"
      )
    ), row.names = c(NA,-20L), .Names = c("Ranking", "Probability", "data"), class = "data.frame"
  )
# Shiny app
server <- function(input, output) {
  output$plot <- renderTaucharts({
    effectiveness %>% filter(data == input$data) %>%
      tauchart(.) %>%
      tau_bar(x = "Ranking", y = "Probability") %>%
      tau_guide_y(tick_format = "%") %>%
      tau_tooltip()
  })

}

ui <- fluidPage(sidebarLayout(
  sidebarPanel(width = 3,
               selectInput(
                 "data", label = h4("Data available:"),
                 choices = c("none", "little", "some", "lots"),
                 selected = 1
               )),
  mainPanel(width = 9, tauchartsOutput("plot"))
))

shinyApp(ui = ui, server = server)

Thanks!

Enable pre-selected option in tau_legend

Hi,

There are a few cases I want to preselect some values when chart it rendered. Having this feature will allow me to drill through from other diagrams to here. For example, I clicked a cell in DT package, fetch the filter condition, and then show all relevant data in a bar chart (while still maintaining the capability to see the whole dataset)
maybe something like
data %>%
tauchart %>%
tau_bar('XXX','YYY',color = 'ColorColumn') %>%
tau_legend(selected = sessionObj$DTselectedCol)

Thanks.

Chart creates horizontal scrollbar

It appears that the width: 100% attribute of the .graphical-report__progress div can cause unneeded horizontal scroll bars of a few pixels on the page.

white text on tooltip is too hard to read

When I create a presentation with ioslides the text on the tooltip is white and too hard to read.

white tooltip

This is the code:


---
title: "Untitled"
author: "Ignacio"
date: "8/5/2015"
output: ioslides_presentation
runtime: shiny

---

## Test {.flexbox .vcenter}

```{r, echo=FALSE, message=F}
library(taucharts)
library(htmlwidgets)
library(dplyr)
#Fake data
effectiveness <-
  structure(
    list(
      Ranking = structure(
        c(
          5L, 4L, 3L, 2L, 1L, 5L,
          4L, 3L, 2L, 1L, 5L, 4L, 3L, 2L, 1L, 1L, 2L, 3L, 4L, 5L
        ), .Label = c("Bottom",
                      "Bellow Average", "Average", "Above Average", "Top"), class = c("ordered",
                                                                                      "factor")
      ), Probability = c(
        0.4, 0.4, 0.1, 0.08, 0.02, 0.1, 0.2,
        0.5, 0.1, 0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.01, 0.04, 0.15, 0.7,
        0.1
      ), data = structure(
        c(
          4L, 4L, 4L, 4L, 4L, 2L, 2L, 2L, 2L,
          2L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L
        ), .Label = c("none",
                      "little", "some", "lots"), class = c("ordered", "factor")
      )
    ), .Names = c("Ranking",
                  "Probability", "data"), row.names = c(NA,-20L), class = "data.frame"
  )
effectiveness  %>% arrange(data, Ranking)  %>%tauchart() %>%
  tau_stacked_bar(x = "data", y = "Probability", color = "Ranking") %>%
  tau_guide_y(tick_format = "%", auto_scale = FALSE) %>%
  tau_guide_gridlines(FALSE, FALSE) %>% 
  tau_tooltip() %>% 
  tau_legend()
```

Control graphic width / height?

Perhaps this is not the place for a how-to question, but is there a method in the package for changing the width of a graphic? I've been looking at tauchartsOutput, but am not sure whether/how this applies in a non-shiny, static doc context.

add tasks (maybe undocumented)

I have found it very useful for things like #19 to add the ability for power users to customize htmlwidgets after render. Without this little hook, htmlwidgets make it very difficult to perform this behavior. Here is the standard bit of code I have been including.

    // set up a container for tasks to perform after completion
    //  one example would be add callbacks for event handling
    //  styling
    if (!(typeof x.tasks === "undefined") ){
      if ( (typeof x.tasks.length === "undefined") ||
       (typeof x.tasks === "function" ) ) {
         // handle a function not enclosed in array
         // should be able to remove once using jsonlite
         x.tasks = [x.tasks];
      }
      x.tasks.map(function(t){
        // for each tasks call the task with el supplied as `this`
        t.call(el);
      })
    }

In the example from #19, a user could then do.

tc %>%
  tau_tasks( htmlwidgets::JS("function(){ d3.select(this).selectAll().style('fill','black') }")

@hrbrmstr, would this be ok to add? So far I have been adding it undocumented, but I could add a tau_tasks function or something similar.

error in local shiny server

I'm not sure if this is an error with taucharts or my shiny server.

When I use Rstudio on my local computer to my taucharts example works well. But, when I try to load it on my local shiny server i get this error:

Error: do not know how to convert 'x' to class “POSIXct”

Thanks for the help!

y-axis max and min?

Is there a way to set the max an min for the y-axis? For example

DF <-
  structure(
    list(
      Ranking = structure(
        1:5, .Label = c("Bottom", "Bellow Average",
                        "Average", "Above Average", "Top"), class = "factor"
      ), Prob = c(20L,
                  20L, 20L, 20L, 20L)/100
    ), .Names = c("Ranking", "Prob"), row.names = c(NA,-5L), class = "data.frame"
  )

tauchart(DF) %>% 
  tau_bar(x="Ranking", y="Prob") %>% 
  tau_guide_y(tick_format="%")

I would like the max value to be 100%

Thanks!

tau_title() in rdocument/rmarkdown displays plots in viewer pane

Hi Team,
I am using the example given in the help section of tau_title() within a rdocument as follows:
tauchart(mtcars) %>%
tau_point("mpg", "wt") %>%
tau_guide_y(auto_scale=FALSE) %>%
tau_title("Some Really Good Plot Title",
"font-weight:bold;margin:auto;text-align:center;font-size:24px;
color:#7f7f7f;font-family:sans-serif")

This does not show the plot inline within the rdocument but opens the Viewer pane of RStudio.

While the following code displays the plot inline.
tauchart(mtcars) %>%
tau_point("mpg", "wt") %>%
tau_guide_y(auto_scale=FALSE)

Am i doing something incorrect or is there some parameter i need to set to display my plots with title inline within the rdocument?

The help file does mention it as "This is most certainly a temporary hack."

Vinay

widget sizing

in my blog post i desperately tried to replicate the widget on the taucharts home page and just could not. so, it must be doing some things that aren't solely div-size related. i think i just need to replicate what they did by hand and then compare to the widget output to get the diff, but it's definitely a bug right now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.