diff --git a/DESCRIPTION b/DESCRIPTION index 3f091ed..cf70f8b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: apexcharter -Version: 0.1.2 +Version: 0.1.2.900 Title: Create Interactive Chart with the JavaScript 'ApexCharts' Library Description: Provides an 'htmlwidgets' interface to 'apexcharts.js'. 'Apexcharts' is a modern JavaScript charting library to build interactive charts and visualizations with simple API. diff --git a/_pkgdown.yml b/_pkgdown.yml index b46c2fb..2e09694 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -18,6 +18,8 @@ navbar: href: articles/labs.html - text: "Options & styles for lines" href: articles/lines.html + - text: "Advanced configuration" + href: articles/advanced-configuration.html - text: News href: news/index.html right: diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 568c7b4..582c293 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -8,11 +8,13 @@ License • apexcharter + + @@ -30,10 +32,12 @@ + + @@ -60,7 +64,7 @@ apexcharter - 0.1.2 + 0.1.2.900 @@ -91,13 +95,15 @@
  • Options & styles for lines
  • +
  • + Advanced configuration +
  • News
  • -
  • News
  • -
  • @@ -83,7 +86,7 @@ -
    +

    @@ -141,20 +144,20 @@ stops = c(0, 100, 100, 100) ) )

    -
    -

    Solid area color:

    +
    +

    Solid area color:

    apex(data = economics, type = "area", mapping = aes(x = date, y = uempmed)) %>% 
       ax_fill(type = "solid", opacity = 1)
    -
    -

    Line width:

    +
    +

    Line width:

    apex(data = economics, type = "line", mapping = aes(x = date, y = uempmed)) %>% 
       ax_stroke(width = 1)
    -
    -

    Dotted line

    +
    +

    Dotted line

    apex(data = economics, type = "line", mapping = aes(x = date, y = uempmed)) %>% 
       ax_stroke(dashArray = 6)
    -
    - +
    +

    @@ -162,13 +165,13 @@

    Add points to line :

    apex(data = tail(economics, 20), type = "line", mapping = aes(x = date, y = uempmed)) %>% 
       ax_markers(size = 6)
    -
    -

    Add labels over points

    +
    +

    Add labels over points

    apex(data = tail(economics, 20), type = "line", mapping = aes(x = date, y = uempmed)) %>% 
       ax_markers(size = 6) %>% 
       ax_dataLabels(enabled = TRUE)
    -
    - +
    +

    @@ -178,16 +181,17 @@ ax_yaxis(decimalsInFloat = 2) %>% ax_markers(size = c(3, 6)) %>% ax_stroke(width = c(1, 3))

    -
    -
    apex(data = economics_long, type = "line", mapping = aes(x = date, y = value01, group = variable)) %>% 
    +
    +
    apex(data = economics_long, type = "line", mapping = aes(x = date, y = value01, group = variable)) %>% 
       ax_yaxis(decimalsInFloat = 2) %>% 
       ax_stroke(dashArray = c(8, 5))
    -
    - +
    +
  • Options & styles for lines
  • +
  • + Advanced configuration +
  • @@ -83,13 +86,13 @@ -
    +
    -
    -

    Flipping coordinates can be done by using type = "bar":

    +
    +

    Flipping coordinates can be done by using type = "bar":

    apex(data = n_manufac, type = "bar", mapping = aes(x = manufacturer, y = n))
    -
    -

    To create a dodge bar charts, use aesthetic fill :

    +
    +

    To create a dodge bar charts, use aesthetic fill :

    n_manufac_year <- count(mpg, manufacturer, year)
     
     apex(data = n_manufac_year, type = "column", mapping = aes(x = manufacturer, y = n, fill = year))
    -
    -

    For stacked bar charts, specify option stacked in ax_chart :

    +
    +

    For stacked bar charts, specify option stacked in ax_chart :

    apex(data = n_manufac_year, type = "column", mapping = aes(x = manufacturer, y = n, fill = year)) %>% 
       ax_chart(stacked = TRUE)
    -
    - +
    +

    @@ -134,8 +137,8 @@ economics <- tail(economics, 100) apex(data = economics, type = "line", mapping = aes(x = date, y = uempmed))

    -
    -

    To represent several lines, use a data.frame in long format and the group aesthetic:

    +
    +

    To represent several lines, use a data.frame in long format and the group aesthetic:

    data("economics_long")
     economics_long <- economics_long %>% 
       group_by(variable) %>% 
    @@ -143,29 +146,29 @@
     
     apex(data = economics_long, type = "line", mapping = aes(x = date, y = value01, group = variable)) %>% 
       ax_yaxis(decimalsInFloat = 2) # number of decimals to keep
    -
    -

    Create area charts with type = "area":

    +
    +

    Create area charts with type = "area":

    apex(data = economics_long, type = "area", mapping = aes(x = date, y = value01, fill = variable)) %>% 
       ax_yaxis(decimalsInFloat = 2) %>% # number of decimals to keep
       ax_chart(stacked = TRUE) %>%
       ax_yaxis(max = 4, tickAmount = 4)
    -
    - +
    +

    Scatter charts

    Simple bar charts can be created with:

    apex(data = mtcars, type = "scatter", mapping = aes(x = wt, y = mpg))
    -
    -

    Color points according to a third variable:

    +
    +

    Color points according to a third variable:

    apex(data = mtcars, type = "scatter", mapping = aes(x = wt, y = mpg, fill = cyl)) %>%
       ax_xaxis(tickAmount = 5)
    -
    -

    And change point size using z aesthetics:

    +
    +

    And change point size using z aesthetics:

    apex(data = mtcars, type = "scatter", mapping = aes(x = wt, y = mpg, z = scales::rescale(qsec)))
    -
    - +
    +

    @@ -177,24 +180,24 @@ ) apex(data = poll, type = "pie", mapping = aes(x = answer, y = n))

    -
    - +
    +

    Radial charts

    Simple radial charts can be created with (here we pass values directly in aes, but you can use a data.frame) :

    apex(data = NULL, type = "radialBar", mapping = aes(x = "My value", y = 65))
    -
    -

    Multi radial chart (more than one value):

    +
    +

    Multi radial chart (more than one value):

    fruits <- data.frame(
       name = c('Apples', 'Oranges', 'Bananas', 'Berries'),
       value = c(44, 55, 67, 83)
     )
     
     apex(data = fruits, type = "radialBar", mapping = aes(x = name, y = value))
    -
    - +
    +

    @@ -203,8 +206,8 @@
    mtcars$model <- rownames(mtcars)
     
     apex(data = head(mtcars), type = "radar", mapping = aes(x = model, y = qsec))
    -
    -

    With a grouping variable:

    +
    +

    With a grouping variable:

    # extremely complicated reshaping
     new_mtcars <- reshape(
       data = head(mtcars), 
    @@ -217,8 +220,8 @@
     )
     
     apex(data = new_mtcars, type = "radar", mapping = aes(x = model, y = value, group = time))
    -
    - +
    +

    @@ -235,12 +238,13 @@ ) %>% ax_dataLabels(enabled = FALSE) %>% ax_colors("#008FFB")

    -
    - +
    +
  • Options & styles for lines
  • +
  • + Advanced configuration +
  • News
  • -
  • diff --git a/docs/news/index.html b/docs/news/index.html index 3786c54..296ed11 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -8,11 +8,13 @@ Changelog • apexcharter + + @@ -30,10 +32,12 @@ + + @@ -60,7 +64,7 @@ apexcharter - 0.1.2 + 0.1.2.900 @@ -91,13 +95,15 @@
  • Options & styles for lines
  • +
  • + Advanced configuration +
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • - diff --git a/docs/reference/apexcharter-exports.html b/docs/reference/apexcharter-exports.html index b7cbcc9..858e15c 100644 --- a/docs/reference/apexcharter-exports.html +++ b/docs/reference/apexcharter-exports.html @@ -8,11 +8,13 @@ apexcharter exported operators and S3 methods — apexcharter-exports • apexcharter + + @@ -30,8 +32,8 @@ - + @@ -39,6 +41,7 @@ as Depends of apexcharter" /> + @@ -65,7 +68,7 @@ as Depends of apexcharter" /> apexcharter - 0.1.2 + 0.1.2.900 @@ -96,13 +99,15 @@ as Depends of apexcharter" />
  • Options & styles for lines
  • +
  • + Advanced configuration +
  • News
  • - diff --git a/docs/reference/apexcharter-package.html b/docs/reference/apexcharter-package.html index 1820902..2a5682a 100644 --- a/docs/reference/apexcharter-package.html +++ b/docs/reference/apexcharter-package.html @@ -9,11 +9,13 @@ An <code>htmlwidget</code> interface to the ApexCharts javascript chart library — apexcharter-package • apexcharter + + @@ -31,15 +33,16 @@ ApexCharts javascript chart library — apexcharter-package • apexcharter - + @@ -66,7 +69,7 @@ to create interactive and modern SVG charts." /> apexcharter - 0.1.2 + 0.1.2.900 @@ -97,13 +100,15 @@ to create interactive and modern SVG charts." />
  • Options & styles for lines
  • +
  • + Advanced configuration +
  • News
  • -

    Author

    Victor Perrier (@dreamRs_fr)

    diff --git a/docs/reference/apexcharter-shiny.html b/docs/reference/apexcharter-shiny.html index b160317..dc975bb 100644 --- a/docs/reference/apexcharter-shiny.html +++ b/docs/reference/apexcharter-shiny.html @@ -8,11 +8,13 @@ Shiny bindings for apexcharter — apexcharter-shiny • apexcharter + + @@ -30,14 +32,15 @@ - + + @@ -64,7 +67,7 @@ applications and interactive Rmd documents." /> apexcharter - 0.1.2 + 0.1.2.900 @@ -95,13 +98,15 @@ applications and interactive Rmd documents." />
  • Options & styles for lines
  • +
  • + Advanced configuration +
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • -
  • News
  • - diff --git a/docs/reference/unhcr_ts.html b/docs/reference/unhcr_ts.html new file mode 100644 index 0000000..6af57bc --- /dev/null +++ b/docs/reference/unhcr_ts.html @@ -0,0 +1,179 @@ + + + + + + + + +UNHCR data by continent of origin — unhcr_ts • apexcharter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    +

    The dataset contains data about UNHCR's populations of concern summarised by continent of orginin.

    +
    + +
    unhcr_ts
    + + +

    Format

    + +

    A data frame with 913 observations on the following 4 variables.

    +
    year

    Year concerned.

    +
    population_type

    Populations of concern : Refugees, Asylum-seekers, Internally displaced persons (IDPs), Returned refugees, + Returned IDPs, Stateless persons, Others of concern.

    +
    continent_origin

    Continent of residence of population.

    +
    n

    Number of people concerned.

    +
    +

    Source

    + +

    UNHCR (The UN Refugee Agency) (http://popstats.unhcr.org/en/overview)

    + +
    + +
    + + +
    + + + + + +