apexcharter/reference/apex.html

203 lines
138 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="Initialize a chart with three main parameters :
data, mapping and type of chart."><title>Quick ApexCharts — apex • apexcharter</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><link href="../deps/Poppins-0.4.6/font.css" rel="stylesheet"><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Quick ApexCharts — apex"><meta property="og:description" content="Initialize a chart with three main parameters :
data, mapping and type of chart."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--><!-- dependencies from examples --><script src="libs/htmlwidgets-1.6.2/htmlwidgets.js"></script><script src="libs/apexcharter-binding-0.4.0.9300/apexcharter.js"></script></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-dark navbar-expand-lg bg-primary"><div class="container">
<a class="navbar-brand me-2" href="../index.html">apexcharter</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.0.9300</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="collapse navbar-collapse ms-3">
<ul class="navbar-nav me-auto"><li class="nav-item">
<a class="nav-link" href="../articles/apexcharter.html">Get started</a>
</li>
<li class="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/extra/advanced-configuration.html">Advanced configuration examples</a>
<a class="dropdown-item" href="../articles/extra/chart-options.html">Customize chart options</a>
<a class="dropdown-item" href="../articles/extra/facets.html">Create grid of charts</a>
<a class="dropdown-item" href="../articles/extra/shiny-integration.html">Use in Shiny application</a>
<a class="dropdown-item" href="../articles/extra/spark-box.html">Create boxes with sparklines</a>
<a class="dropdown-item" href="../articles/extra/sync-charts.html">Synchronize charts with each other</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/dreamRs/apexcharter/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul></div>
</div>
</nav><div class="container template-reference-topic">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="" class="logo" alt=""><h1>Quick ApexCharts</h1>
<small class="dont-index">Source: <a href="https://github.com/dreamRs/apexcharter/blob/HEAD/R/apex.R" class="external-link"><code>R/apex.R</code></a></small>
<div class="d-none name"><code>apex.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Initialize a chart with three main parameters :
data, mapping and type of chart.</p>
</div>
<div class="section level2">
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">apex</span><span class="op">(</span></span>
<span> <span class="va">data</span>,</span>
<span> <span class="va">mapping</span>,</span>
<span> type <span class="op">=</span> <span class="st">"column"</span>,</span>
<span> <span class="va">...</span>,</span>
<span> auto_update <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> synchronize <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> serie_name <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> width <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> height <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> elementId <span class="op">=</span> <span class="cn">NULL</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
<dl><dt>data</dt>
<dd><p>Default dataset to use for chart. If not already
a <code>data.frame</code>, it will be coerced to with <code>as.data.frame</code>.</p></dd>
<dt>mapping</dt>
<dd><p>Default list of aesthetic mappings to use for chart</p></dd>
<dt>type</dt>
<dd><p>Specify the chart type. Available options:
<code>"column"</code>, <code>"bar"</code>,
<code>"line"</code>, <code>"step"</code>, <code>"spline"</code>,
<code>"area"</code>, <code>"area-step"</code>, <code>"area-spline"</code>,
<code>"pie"</code>, <code>"donut"</code>,
<code>"radialBar"</code>, <code>"radar"</code>, <code>"scatter"</code>,
<code>"heatmap"</code>, <code>"treemap"</code>,
<code>"timeline"</code>.</p></dd>
<dt>...</dt>
<dd><p>Other arguments passed on to methods. Not currently used.</p></dd>
<dt>auto_update</dt>
<dd><p>In Shiny application, update existing chart
rather than generating new one. Can be <code>TRUE</code>/<code>FALSE</code> or
use <code><a href="config_update.html">config_update()</a></code> for more control.</p></dd>
<dt>synchronize</dt>
<dd><p>Give a common id to charts to synchronize them (tooltip and zoom).</p></dd>
<dt>serie_name</dt>
<dd><p>Name for the serie displayed in tooltip,
only used for single serie.</p></dd>
<dt>width, height</dt>
<dd><p>A numeric input in pixels.</p></dd>
<dt>elementId</dt>
<dd><p>Use an explicit element ID for the widget.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>An <code><a href="apexchart.html">apexchart()</a></code></p>
<p></p>
<p><code>htmlwidget</code> object.</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://ggplot2.tidyverse.org" class="external-link">ggplot2</a></span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/dreamRs/apexcharter" class="external-link">apexcharter</a></span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># make a barchart with a frequency table</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="st">"mpg"</span>, package <span class="op">=</span> <span class="st">"ggplot2"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">apex</span><span class="op">(</span><span class="va">mpg</span>, <span class="fu"><a href="apexcharter-exports.html">aes</a></span><span class="op">(</span><span class="va">manufacturer</span><span class="op">)</span>, type <span class="op">=</span> <span class="st">"bar"</span><span class="op">)</span></span></span>
<div id="htmlwidget-6ffd9304c19e45045dd9" style="width:700px;height:432.632880098888px;" class="apexcharter html-widget "></div>
<script type="application/json" data-for="htmlwidget-6ffd9304c19e45045dd9">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"data":[{"x":"audi","y":18},{"x":"chevrolet","y":19},{"x":"dodge","y":37},{"x":"ford","y":25},{"x":"honda","y":9},{"x":"hyundai","y":14},{"x":"jeep","y":8},{"x":"land rover","y":4},{"x":"lincoln","y":3},{"x":"mercury","y":4},{"x":"nissan","y":13},{"x":"pontiac","y":5},{"x":"subaru","y":14},{"x":"toyota","y":34},{"x":"volkswagen","y":27}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":true}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"grid":{"yaxis":{"lines":{"show":false}},"xaxis":{"lines":{"show":true}}},"yaxis":{"labels":{"style":{"colors":"#848484"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"audi","max":"volkswagen"},"type":"bar"},"evals":[],"jsHooks":[]}</script><span class="r-in"><span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># timeseries</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="st">"economics"</span>, package <span class="op">=</span> <span class="st">"ggplot2"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">apex</span><span class="op">(</span></span></span>
<span class="r-in"><span> data <span class="op">=</span> <span class="va">economics</span>, </span></span>
<span class="r-in"><span> mapping <span class="op">=</span> <span class="fu"><a href="apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">date</span>, y <span class="op">=</span> <span class="va">uempmed</span><span class="op">)</span>, </span></span>
<span class="r-in"><span> type <span class="op">=</span> <span class="st">"line"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<div id="htmlwidget-69e6e3657c190f55811e" style="width:700px;height:432.632880098888px;" class="apexcharter html-widget "></div>
<script type="application/json" data-for="htmlwidget-69e6e3657c190f55811e">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[-79056000000,4.5],[-76377600000,4.7],[-73699200000,4.6],[-71107200000,4.9],[-68428800000,4.7],[-65836800000,4.8],[-63158400000,5.1],[-60480000000,4.5],[-57974400000,4.1],[-55296000000,4.6],[-52704000000,4.4],[-50025600000,4.4],[-47433600000,4.5],[-44755200000,4.2],[-42076800000,4.6],[-39484800000,4.8],[-36806400000,4.4],[-34214400000,4.4],[-31536000000,4.4],[-28857600000,4.9],[-26438400000,4],[-23760000000,4],[-21168000000,4.2],[-18489600000,4.4],[-15897600000,4.4],[-13219200000,4.4],[-10540800000,4.7],[-7948800000,4.5],[-5270400000,4.8],[-2678400000,4.6],[0,4.6],[2678400000,4.5],[5097600000,4.6],[7776000000,4.1],[10368000000,4.7],[13046400000,4.9],[15638400000,5.1],[18316800000,5.4],[20995200000,5.2],[23587200000,5.2],[26265600000,5.6],[28857600000,5.9],[31536000000,6.2],[34214400000,6.3],[36633600000,6.4],[39312000000,6.5],[41904000000,6.7],[44582400000,5.7],[47174400000,6.2],[49852800000,6.4],[52531200000,5.8],[55123200000,6.5],[57801600000,6.4],[60393600000,6.2],[63072000000,6.2],[65750400000,6.6],[68256000000,6.6],[70934400000,6.7],[73526400000,6.6],[76204800000,5.4],[78796800000,6.1],[81475200000,6],[84153600000,5.6],[86745600000,5.7],[89424000000,5.7],[92016000000,6.1],[94694400000,5.7],[97372800000,5.2],[99792000000,5.5],[102470400000,5],[105062400000,4.9],[107740800000,5],[110332800000,5.2],[113011200000,4.9],[115689600000,5.4],[118281600000,5.5],[120960000000,5.1],[123552000000,4.7],[126230400000,5],[128908800000,5.1],[131328000000,4.8],[134006400000,5],[136598400000,4.6],[139276800000,5.3],[141868800000,5.7],[144547200000,5],[147225600000,5.3],[149817600000,5.5],[152496000000,5.2],[155088000000,5.7],[157766400000,6.3],[160444800000,7.1],[162864000000,7.2],[165542400000,8.699999999999999],[168134400000,9.4],[170812800000,8.800000000000001],[173404800000,8.6],[176083200000,9.199999999999999],[178761600000,9.199999999999999],[181353600000,8.6],[184032000000,9.5],[186624000000,9],[189302400000,9],[191980800000,8.199999999999999],[194486400000,8.699999999999999],[197164800000,8.199999999999999],[199756800000,8.300000000000001],[202435200000,7.8],[205027200000,7.7],[207705600000,7.9],[210384000000,7.8],[212976000000,7.7],[215654400000,8.4],[218246400000,8],[220924800000,7.5],[223603200000,7.2],[226022400000,7.2],[228700800000,7.3],[231292800000,7.9],[233971200000,6.2],[236563200000,7.1],[239241600000,7],[241920000000,6.7],[244512000000,6.9],[247190400000,7],[249782400000,6.8],[252460800000,6.5],[255139200000,6.7],[257558400000,6.2],[260236800000,6.1],[262828800000,5.7],[265507200000,6],[268099200000,5.8],[270777600000,5.8],[273456000000,5.6],[276048000000,5.9],[278726400000,5.5],[281318400000,5.6],[283996800000,5.9],[286675200000,5.9],[289094400000,5.9],[291772800000,5.4],[294364800000,5.6],[297043200000,5.6],[299635200000,5.9],[302313600000,4.8],[304992000000,5.5],[307584000000,5.5],[310262400000,5.3],[312854400000,5.7],[315532800000,5.3],[318211200000,5.8],[320716800000,6],[323395200000,5.8],[325987200000,5.7],[328665600000,6.4],[331257600000,7],[333936000000,7.5],[336614400000,7.7],[339206400000,7.5],[341884800000,7.7],[344476800000,7.5],[347155200000,7.4],[349833600000,7.1],[352252800000,7.1],[354931200000,7.4],[357523200000,6.9],[360201600000,6.6],[362793600000,7.1],[365472000000,7.2],[368150400000,6.8],[370742400000,6.8],[373420800000,6.9],[376012800000,6.9],[378691200000,7.1],[381369600000,7.5],[383788800000,7.7],[386467200000,8.1],[389059200000,8.5],[391737600000,9.5],[394329600000,8.5],[397008000000,8.699999999999999],[399686400000,9.5],[402278400000,9.699999999999999],[404956800000,10],[407548800000,10.2],[410227200000,11.1],[412905600000,9.800000000000001],[415324800000,10.4],[418003200000,10.9],[420595200000,12.3],[423273600000,11.3],[425865600000,10.1],[428544000000,9.300000000000001],[431222400000,9.300000000000001],[433814400000,9.4],[436492800000,9.300000000000001],[439084800000,8.699999999999999],[441763200000,9.1],[444441600000,8.300
<span class="r-in"><span><span class="co"># you can add option to apex result :</span></span></span>
<span class="r-in"><span><span class="fu">apex</span><span class="op">(</span></span></span>
<span class="r-in"><span> data <span class="op">=</span> <span class="va">economics</span>, </span></span>
<span class="r-in"><span> mapping <span class="op">=</span> <span class="fu"><a href="apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">date</span>, y <span class="op">=</span> <span class="va">uempmed</span><span class="op">)</span>, </span></span>
<span class="r-in"><span> type <span class="op">=</span> <span class="st">"line"</span></span></span>
<span class="r-in"><span><span class="op">)</span> <span class="op"><a href="apexcharter-exports.html">%&gt;%</a></span> </span></span>
<span class="r-in"><span> <span class="fu"><a href="ax_stroke.html">ax_stroke</a></span><span class="op">(</span>width <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></span>
<div id="htmlwidget-f077cd0cededc1214277" style="width:700px;height:432.632880098888px;" class="apexcharter html-widget "></div>
<script type="application/json" data-for="htmlwidget-f077cd0cededc1214277">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[-79056000000,4.5],[-76377600000,4.7],[-73699200000,4.6],[-71107200000,4.9],[-68428800000,4.7],[-65836800000,4.8],[-63158400000,5.1],[-60480000000,4.5],[-57974400000,4.1],[-55296000000,4.6],[-52704000000,4.4],[-50025600000,4.4],[-47433600000,4.5],[-44755200000,4.2],[-42076800000,4.6],[-39484800000,4.8],[-36806400000,4.4],[-34214400000,4.4],[-31536000000,4.4],[-28857600000,4.9],[-26438400000,4],[-23760000000,4],[-21168000000,4.2],[-18489600000,4.4],[-15897600000,4.4],[-13219200000,4.4],[-10540800000,4.7],[-7948800000,4.5],[-5270400000,4.8],[-2678400000,4.6],[0,4.6],[2678400000,4.5],[5097600000,4.6],[7776000000,4.1],[10368000000,4.7],[13046400000,4.9],[15638400000,5.1],[18316800000,5.4],[20995200000,5.2],[23587200000,5.2],[26265600000,5.6],[28857600000,5.9],[31536000000,6.2],[34214400000,6.3],[36633600000,6.4],[39312000000,6.5],[41904000000,6.7],[44582400000,5.7],[47174400000,6.2],[49852800000,6.4],[52531200000,5.8],[55123200000,6.5],[57801600000,6.4],[60393600000,6.2],[63072000000,6.2],[65750400000,6.6],[68256000000,6.6],[70934400000,6.7],[73526400000,6.6],[76204800000,5.4],[78796800000,6.1],[81475200000,6],[84153600000,5.6],[86745600000,5.7],[89424000000,5.7],[92016000000,6.1],[94694400000,5.7],[97372800000,5.2],[99792000000,5.5],[102470400000,5],[105062400000,4.9],[107740800000,5],[110332800000,5.2],[113011200000,4.9],[115689600000,5.4],[118281600000,5.5],[120960000000,5.1],[123552000000,4.7],[126230400000,5],[128908800000,5.1],[131328000000,4.8],[134006400000,5],[136598400000,4.6],[139276800000,5.3],[141868800000,5.7],[144547200000,5],[147225600000,5.3],[149817600000,5.5],[152496000000,5.2],[155088000000,5.7],[157766400000,6.3],[160444800000,7.1],[162864000000,7.2],[165542400000,8.699999999999999],[168134400000,9.4],[170812800000,8.800000000000001],[173404800000,8.6],[176083200000,9.199999999999999],[178761600000,9.199999999999999],[181353600000,8.6],[184032000000,9.5],[186624000000,9],[189302400000,9],[191980800000,8.199999999999999],[194486400000,8.699999999999999],[197164800000,8.199999999999999],[199756800000,8.300000000000001],[202435200000,7.8],[205027200000,7.7],[207705600000,7.9],[210384000000,7.8],[212976000000,7.7],[215654400000,8.4],[218246400000,8],[220924800000,7.5],[223603200000,7.2],[226022400000,7.2],[228700800000,7.3],[231292800000,7.9],[233971200000,6.2],[236563200000,7.1],[239241600000,7],[241920000000,6.7],[244512000000,6.9],[247190400000,7],[249782400000,6.8],[252460800000,6.5],[255139200000,6.7],[257558400000,6.2],[260236800000,6.1],[262828800000,5.7],[265507200000,6],[268099200000,5.8],[270777600000,5.8],[273456000000,5.6],[276048000000,5.9],[278726400000,5.5],[281318400000,5.6],[283996800000,5.9],[286675200000,5.9],[289094400000,5.9],[291772800000,5.4],[294364800000,5.6],[297043200000,5.6],[299635200000,5.9],[302313600000,4.8],[304992000000,5.5],[307584000000,5.5],[310262400000,5.3],[312854400000,5.7],[315532800000,5.3],[318211200000,5.8],[320716800000,6],[323395200000,5.8],[325987200000,5.7],[328665600000,6.4],[331257600000,7],[333936000000,7.5],[336614400000,7.7],[339206400000,7.5],[341884800000,7.7],[344476800000,7.5],[347155200000,7.4],[349833600000,7.1],[352252800000,7.1],[354931200000,7.4],[357523200000,6.9],[360201600000,6.6],[362793600000,7.1],[365472000000,7.2],[368150400000,6.8],[370742400000,6.8],[373420800000,6.9],[376012800000,6.9],[378691200000,7.1],[381369600000,7.5],[383788800000,7.7],[386467200000,8.1],[389059200000,8.5],[391737600000,9.5],[394329600000,8.5],[397008000000,8.699999999999999],[399686400000,9.5],[402278400000,9.699999999999999],[404956800000,10],[407548800000,10.2],[410227200000,11.1],[412905600000,9.800000000000001],[415324800000,10.4],[418003200000,10.9],[420595200000,12.3],[423273600000,11.3],[425865600000,10.1],[428544000000,9.300000000000001],[431222400000,9.300000000000001],[433814400000,9.4],[436492800000,9.300000000000001],[439084800000,8.699999999999999],[441763200000,9.1],[444441600000,8.300
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># with group variable</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="st">"economics_long"</span>, package <span class="op">=</span> <span class="st">"ggplot2"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">apex</span><span class="op">(</span></span></span>
<span class="r-in"><span> data <span class="op">=</span> <span class="va">economics_long</span>, </span></span>
<span class="r-in"><span> mapping <span class="op">=</span> <span class="fu"><a href="apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">date</span>, y <span class="op">=</span> <span class="va">value01</span>, group <span class="op">=</span> <span class="va">variable</span><span class="op">)</span>, </span></span>
<span class="r-in"><span> type <span class="op">=</span> <span class="st">"line"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<div id="htmlwidget-4e99bcd3138ad4d22fc9" style="width:700px;height:432.632880098888px;" class="apexcharter html-widget "></div>
<script type="application/json" data-for="htmlwidget-4e99bcd3138ad4d22fc9">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"pce","type":"line","data":[[-79056000000,0],[-76377600000,0.0002652497197765077],[-73699200000,0.0007615233890357775],[-71107200000,0.0004706043415389667],[-68428800000,0.0009155393553576157],[-65836800000,0.001574385433512166],[-63158400000,0.002070659102771431],[-60480000000,0.002301683052254198],[-57974400000,0.003217222407611809],[-55296000000,0.003191553079891505],[-52704000000,0.00368782674915077],[-50025600000,0.004243995516424089],[-47433600000,0.004834390053991158],[-44755200000,0.00515953487178171],[-42076800000,0.005262212182662942],[-39484800000,0.005553131230159753],[-36806400000,0.005989509801404973],[-34214400000,0.005972396916258099],[-31536000000,0.006571347896398595],[-28857600000,0.007016282910217254],[-26438400000,0.00703339579536412],[-23760000000,0.007461217924035903],[-21168000000,0.008008830248735783],[-18489600000,0.0080601689041764],[-15897600000,0.008214184870498248],[-13219200000,0.00883024873578561],[-10540800000,0.009112611340708994],[-7948800000,0.00956610279710108],[-5270400000,0.009737231648569792],[-2678400000,0.00993402982775881],[0,0.01043885993959152],[2678400000,0.01089235139598361],[5097600000,0.0107468918722352],[7776000000,0.01106348024745232],[10368000000,0.0116110925721522],[13046400000,0.01194479383251619],[15638400000,0.01213303556913178],[18316800000,0.01250951904236295],[20995200000,0.01304001848191596],[23587200000,0.01297156694132847],[26265600000,0.01282610741758007],[28857600000,0.01359618724918928],[31536000000,0.01449461371940003],[34214400000,0.0147769763243234],[36633600000,0.01499944383123273],[39312000000,0.01558128192622635],[41904000000,0.01577808010541538],[44582400000,0.01652249060930427],[47174400000,0.01644548262614336],[49852800000,0.0169588691805495],[52531200000,0.01765194102899779],[55123200000,0.01789152142105398],[57801600000,0.0183278999922992],[60393600000,0.01896963318530688],[63072000000,0.01923488290508338],[65750400000,0.01963703570603487],[68256000000,0.0207493732405815],[70934400000,0.02103173584550488],[73526400000,0.02150234018704384],[76204800000,0.02181037211968753],[78796800000,0.02252055685328268],[81475200000,0.02306816917798256],[84153600000,0.02347887842150748],[86745600000,0.0246596674966416],[89424000000,0.025138828280754],[92016000000,0.0256179890648664],[94694400000,0.0265078590925037],[97372800000,0.02730360825183322],[99792000000,0.02790255923197371],[102470400000,0.02815069606660336],[105062400000,0.02865552617843606],[107740800000,0.02888655012791882],[110332800000,0.02972508150011552],[113011200000,0.02965662995952803],[115689600000,0.03101710432870431],[118281600000,0.03093153990296995],[120960000000,0.03167595040685885],[123552000000,0.03165028107913855],[126230400000,0.03232624004243996],[128908800000,0.03277117505625862],[131328000000,0.03377227883735059],[134006400000,0.03457658443925354],[136598400000,0.03556913177777208],[139276800000,0.03604829256188448],[141868800000,0.03689538037665461],[144547200000,0.03834141917156523],[147225600000,0.03836708849928554],[149817600000,0.03871790264479641],[152496000000,0.03846120936759334],[155088000000,0.03894037015170573],[157766400000,0.04012115922683986],[160444800000,0.04130194830197398],[162864000000,0.0414046256128552],[165542400000,0.04178110908608638],[168134400000,0.0438260988611375],[170812800000,0.04450205782443891],[173404800000,0.04561439535898554],[176083200000,0.04623045922427292],[178761600000,0.04689786174500089],[181353600000,0.04741980474198049],[184032000000,0.04869471468542239],[186624000000,0.0500894148248924],[189302400000,0.05137288121090774],[191980800000,0.05142421986634838],[194486400000,0.05204028373163574],[197164800000,0.05293871020184649],[199756800000,0.05270768625236372],[202435200000,0.05423073303043527],[205027200000,0.05500936930461791],[207705600000,0.05572811048078651],[210384000000,0.05665220627871756],[212976000000,0.05733672168459241],[215654400000,0.05838060767855157],[218246400000,0.0603058072575746],[22092
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by <a href="https://twitter.com/_pvictorr" class="external-link"><img src="https://pbs.twimg.com/profile_images/844237339404722177/E1U61aM8_normal.jpg"> Victor Perrier</a>, <a href="https://twitter.com/_mfaan" class="external-link"><img src="https://pbs.twimg.com/profile_images/912313931326218240/o1-wvA18_normal.jpg"> Fanny Meyer</a>.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>