Package 'chartkickR'

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

Help Index


Create an area chart

Description

Create an area chart

Usage

area_chart(
  data,
  x,
  y,
  group = NULL,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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

Description

Create a bar chart

Usage

bar_chart(
  data,
  x,
  y,
  group = NULL,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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

Description

Create a bubble chart

Usage

bubble_chart(
  data,
  x,
  y,
  size,
  group = NULL,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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.


Create a Chartkick.js chart in R

Description

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.

Usage

chartkickR(
  data,
  x,
  y,
  group = NULL,
  size = NULL,
  type,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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 "LineChart", "PieChart", "DonutChart", "ColumnChart", "BarChart", "AreaChart", "ScatterChart", "BubbleChart", "GeoChart", or "Timeline".

...

Chartkick options passed to JavaScript.

width, height

Widget width and height.

elementId

Optional htmlwidget element ID.

Value

An htmlwidget object.


Shiny bindings for chartkickR

Description

Output and render functions for using chartkickR within Shiny applications and interactive R Markdown documents.

Usage

chartkickROutput(outputId, width = "100%", height = "400px")

renderChartkickR(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

Output variable to read from.

width, height

Valid CSS units.

expr

Expression that generates a chartkickR widget.

env

Environment in which to evaluate expr.

quoted

Whether expr is quoted.


Create a column chart

Description

Create a column chart

Usage

column_chart(
  data,
  x,
  y,
  group = NULL,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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

Description

Create a donut chart

Usage

donut_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)

Arguments

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

Description

Create a geo chart

Usage

geo_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)

Arguments

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

Description

Create a line chart

Usage

line_chart(
  data,
  x,
  y,
  group = NULL,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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

Description

Create a pie chart

Usage

pie_chart(data, x, y, ..., width = NULL, height = NULL, elementId = NULL)

Arguments

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

Description

Create a scatter chart

Usage

scatter_chart(
  data,
  x,
  y,
  group = NULL,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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

Description

Create a timeline chart

Usage

timeline_chart(
  data,
  task,
  start,
  end,
  ...,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

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.

Value

An htmlwidget object.