| Title: | Create Interactive Chartkick.js Charts in R |
|---|---|
| Description: | Provides an R interface to the Chartkick.js JavaScript charting library using the htmlwidgets framework. The package allows users to create interactive line, bar, column, area, pie, donut, scatter, bubble, geo, and timeline charts from R data frames with minimal code. |
| Authors: | Bilikisu Olatunji [aut, cre] (ORCID: <https://orcid.org/0009-0005-9144-6423>) |
| Maintainer: | Bilikisu Olatunji <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9000 |
| Built: | 2026-05-22 18:17:07 UTC |
| Source: | https://github.com/BWOlatunji/chartkickR |
Create an area chart
area_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )area_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
group |
Optional column used to create multiple series. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a bar chart
bar_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )bar_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
group |
Optional column used to create multiple series. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a bubble chart
bubble_chart( data, x, y, size, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )bubble_chart( data, x, y, size, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
size |
Optional column used as bubble size. Required for BubbleChart. |
group |
Optional column used to create multiple series. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
chartkickR() creates interactive charts powered by Chartkick.js and
htmlwidgets. It accepts an R data frame and maps selected columns to
Chartkick-compatible chart data.
chartkickR( data, x, y, group = NULL, size = NULL, type, ..., width = NULL, height = NULL, elementId = NULL )chartkickR( data, x, y, group = NULL, size = NULL, type, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
group |
Optional column used to create multiple series. |
size |
Optional column used as bubble size. Required for BubbleChart. |
type |
Chart type. One of |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
An htmlwidget object.
Output and render functions for using chartkickR within Shiny applications and interactive R Markdown documents.
chartkickROutput(outputId, width = "100%", height = "400px") renderChartkickR(expr, env = parent.frame(), quoted = FALSE)chartkickROutput(outputId, width = "100%", height = "400px") renderChartkickR(expr, env = parent.frame(), quoted = FALSE)
outputId |
Output variable to read from. |
width, height
|
Valid CSS units. |
expr |
Expression that generates a chartkickR widget. |
env |
Environment in which to evaluate |
quoted |
Whether |
Create a column chart
column_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )column_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
group |
Optional column used to create multiple series. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a donut chart
donut_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)donut_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a geo chart
geo_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)geo_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a line chart
line_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )line_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
group |
Optional column used to create multiple series. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a pie chart
pie_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)pie_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a scatter chart
scatter_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )scatter_chart( data, x, y, group = NULL, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
x |
Column used for the x-axis, category, or label. |
y |
Column used for the y-axis or value. |
group |
Optional column used to create multiple series. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
Create a timeline chart
timeline_chart( data, task, start, end, ..., width = NULL, height = NULL, elementId = NULL )timeline_chart( data, task, start, end, ..., width = NULL, height = NULL, elementId = NULL )
data |
A data frame. |
task |
Column containing task or event names. |
start |
Column containing start dates. |
end |
Column containing end dates. |
... |
Chartkick options passed to JavaScript. |
width, height
|
Widget width and height. |
elementId |
Optional htmlwidget element ID. |
An htmlwidget object.