301 lines
79 KiB
HTML
301 lines
79 KiB
HTML
<!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="apexcharter">
|
||
<title>Customize chart options • 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.1.0/bootstrap.min.css" rel="stylesheet">
|
||
<script src="../../deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><link href="../../deps/_Poppins-0.4.0/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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="Customize chart options">
|
||
<meta property="og:description" content="apexcharter">
|
||
<!-- 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]-->
|
||
</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.3.0.9000</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-2">
|
||
<ul class="navbar-nav me-auto">
|
||
<li class="nav-item">
|
||
<a class="nav-link" href="../../articles/apexcharter.html">Get started</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" href="../../reference/index.html">Reference</a>
|
||
</li>
|
||
<li class="active 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-article">
|
||
<script src="chart-options_files/accessible-code-block-0.0.1/empty-anchor.js"></script><script src="chart-options_files/htmlwidgets-1.5.4/htmlwidgets.js"></script><script src="chart-options_files/apexcharter-binding-0.3.0.9000/apexcharter.js"></script><div class="row">
|
||
<main id="main"><div class="page-header">
|
||
<img src="" class="logo" alt=""><h1>Customize chart options</h1>
|
||
|
||
|
||
<small class="dont-index">Source: <a href="https://github.com/dreamRs/apexcharter/blob/HEAD/vignettes/extra/chart-options.Rmd" class="external-link"><code>vignettes/extra/chart-options.Rmd</code></a></small>
|
||
<div class="d-none name"><code>chart-options.Rmd</code></div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="section level2">
|
||
<h2 id="title-subtitle-and-axis-titles">Title, subtitle and axis titles<a class="anchor" aria-label="anchor" href="#title-subtitle-and-axis-titles"></a>
|
||
</h2>
|
||
<p>Packages and data used below:</p>
|
||
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><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 class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="st">"diamonds"</span>, package <span class="op">=</span> <span class="st">"ggplot2"</span><span class="op">)</span></code></pre></div>
|
||
<div class="section level3">
|
||
<h3 id="labs">Labs<a class="anchor" aria-label="anchor" href="#labs"></a>
|
||
</h3>
|
||
<p>You can set title, subtitle and axis’ titles at once with <code><a href="../../reference/ax_labs.html">ax_labs()</a></code>:</p>
|
||
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">diamonds</span>, type <span class="op">=</span> <span class="st">"column"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_labs.html">ax_labs</a></span><span class="op">(</span>
|
||
title <span class="op">=</span> <span class="st">"Cut distribution"</span>,
|
||
subtitle <span class="op">=</span> <span class="st">"Data from ggplot2"</span>,
|
||
x <span class="op">=</span> <span class="st">"Cut"</span>,
|
||
y <span class="op">=</span> <span class="st">"Count"</span>
|
||
<span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-1d385dd4669e47e7e2d2" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-1d385dd4669e47e7e2d2">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"type":"bar","data":[{"x":"Fair","y":1610},{"x":"Good","y":4906},{"x":"Very Good","y":12082},{"x":"Premium","y":13791},{"x":"Ideal","y":21551}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"yaxis":{"labels":{"style":{"colors":"#848484"}},"title":{"text":"Count","style":{"fontWeight":400,"fontSize":"14px"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}},"title":{"text":"Cut","style":{"fontWeight":400,"fontSize":"14px"}}},"title":{"text":"Cut distribution","style":{"fontWeight":700,"fontSize":"16px"}},"subtitle":{"text":"Data from ggplot2","style":{"fontWeight":400,"fontSize":"14px"}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"Fair","max":"Very Good"},"type":"column"},"evals":[],"jsHooks":[]}</script><p>If you want more control (font size, alignment, …), you can use <code><a href="../../reference/ax_title.html">ax_title()</a></code>, <code><a href="../../reference/ax_subtitle.html">ax_subtitle()</a></code>, <code><a href="../../reference/ax_xaxis.html">ax_xaxis()</a></code> and <code><a href="../../reference/ax_yaxis.html">ax_yaxis()</a></code>, as described below.</p>
|
||
</div>
|
||
<div class="section level3">
|
||
<h3 id="title">Title<a class="anchor" aria-label="anchor" href="#title"></a>
|
||
</h3>
|
||
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">diamonds</span>, type <span class="op">=</span> <span class="st">"column"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span><span class="op">(</span>text <span class="op">=</span> <span class="st">"Cut distribution"</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-10d2e963ef1361fcdcd3" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-10d2e963ef1361fcdcd3">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"type":"bar","data":[{"x":"Fair","y":1610},{"x":"Good","y":4906},{"x":"Very Good","y":12082},{"x":"Premium","y":13791},{"x":"Ideal","y":21551}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"yaxis":{"labels":{"style":{"colors":"#848484"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}}},"title":{"text":"Cut distribution"}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"Fair","max":"Very Good"},"type":"column"},"evals":[],"jsHooks":[]}</script><p>You can set some options, for example:</p>
|
||
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">diamonds</span>, type <span class="op">=</span> <span class="st">"column"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span><span class="op">(</span>
|
||
text <span class="op">=</span> <span class="st">"Cut distribution"</span>,
|
||
align <span class="op">=</span> <span class="st">"center"</span>,
|
||
style <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>fontSize <span class="op">=</span> <span class="st">"22px"</span>, fontWeight <span class="op">=</span> <span class="fl">700</span><span class="op">)</span>
|
||
<span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-ae5054b5c853ca0a17ed" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-ae5054b5c853ca0a17ed">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"type":"bar","data":[{"x":"Fair","y":1610},{"x":"Good","y":4906},{"x":"Very Good","y":12082},{"x":"Premium","y":13791},{"x":"Ideal","y":21551}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"yaxis":{"labels":{"style":{"colors":"#848484"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}}},"title":{"text":"Cut distribution","align":"center","style":{"fontSize":"22px","fontWeight":700}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"Fair","max":"Very Good"},"type":"column"},"evals":[],"jsHooks":[]}</script><p>Full list of parameters is available here : <a href="https://apexcharts.com/docs/options/title/" class="external-link uri">https://apexcharts.com/docs/options/title/</a></p>
|
||
</div>
|
||
<div class="section level3">
|
||
<h3 id="subtitle">Subtitle<a class="anchor" aria-label="anchor" href="#subtitle"></a>
|
||
</h3>
|
||
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">diamonds</span>, type <span class="op">=</span> <span class="st">"column"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span><span class="op">(</span>text <span class="op">=</span> <span class="st">"Cut distribution"</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span><span class="op">(</span>text <span class="op">=</span> <span class="st">"Data from ggplot2"</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-45920933a950b871f915" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-45920933a950b871f915">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"type":"bar","data":[{"x":"Fair","y":1610},{"x":"Good","y":4906},{"x":"Very Good","y":12082},{"x":"Premium","y":13791},{"x":"Ideal","y":21551}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"yaxis":{"labels":{"style":{"colors":"#848484"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}}},"title":{"text":"Cut distribution"},"subtitle":{"text":"Data from ggplot2"}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"Fair","max":"Very Good"},"type":"column"},"evals":[],"jsHooks":[]}</script><p>With same options than for title:</p>
|
||
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">diamonds</span>, type <span class="op">=</span> <span class="st">"column"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_title.html">ax_title</a></span><span class="op">(</span>
|
||
text <span class="op">=</span> <span class="st">"Cut distribution"</span>,
|
||
align <span class="op">=</span> <span class="st">"center"</span>,
|
||
style <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>fontSize <span class="op">=</span> <span class="st">"22px"</span>, fontWeight <span class="op">=</span> <span class="fl">700</span><span class="op">)</span>
|
||
<span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_subtitle.html">ax_subtitle</a></span><span class="op">(</span>
|
||
text <span class="op">=</span> <span class="st">"Data from ggplot2"</span>,
|
||
align <span class="op">=</span> <span class="st">"center"</span>,
|
||
style <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>fontSize <span class="op">=</span> <span class="st">"16px"</span>, fontWeight <span class="op">=</span> <span class="fl">400</span>, color <span class="op">=</span> <span class="st">"#BDBDBD"</span><span class="op">)</span>
|
||
<span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-ee89bdfc971d7fddb05a" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-ee89bdfc971d7fddb05a">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"type":"bar","data":[{"x":"Fair","y":1610},{"x":"Good","y":4906},{"x":"Very Good","y":12082},{"x":"Premium","y":13791},{"x":"Ideal","y":21551}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"yaxis":{"labels":{"style":{"colors":"#848484"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}}},"title":{"text":"Cut distribution","align":"center","style":{"fontSize":"22px","fontWeight":700}},"subtitle":{"text":"Data from ggplot2","align":"center","style":{"fontSize":"16px","fontWeight":400,"color":"#BDBDBD"}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"Fair","max":"Very Good"},"type":"column"},"evals":[],"jsHooks":[]}</script><p>Full list of parameters is available here : <a href="https://apexcharts.com/docs/options/subtitle/" class="external-link uri">https://apexcharts.com/docs/options/subtitle/</a></p>
|
||
</div>
|
||
<div class="section level3">
|
||
<h3 id="axis-title">Axis title<a class="anchor" aria-label="anchor" href="#axis-title"></a>
|
||
</h3>
|
||
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">diamonds</span>, type <span class="op">=</span> <span class="st">"column"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span><span class="op">(</span>title <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>text <span class="op">=</span> <span class="st">"Count"</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span><span class="op">(</span>title <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>text <span class="op">=</span> <span class="st">"Cut"</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-edc096fac9cbd613acaa" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-edc096fac9cbd613acaa">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"type":"bar","data":[{"x":"Fair","y":1610},{"x":"Good","y":4906},{"x":"Very Good","y":12082},{"x":"Premium","y":13791},{"x":"Ideal","y":21551}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"yaxis":{"labels":{"style":{"colors":"#848484"}},"title":{"text":"Count"}},"xaxis":{"labels":{"style":{"colors":"#848484"}},"title":{"text":"Cut"}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"Fair","max":"Very Good"},"type":"column"},"evals":[],"jsHooks":[]}</script><p>With some options:</p>
|
||
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">diamonds</span>, type <span class="op">=</span> <span class="st">"column"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/apexcharter-exports.html">aes</a></span><span class="op">(</span>x <span class="op">=</span> <span class="va">cut</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span><span class="op">(</span>title <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>
|
||
text <span class="op">=</span> <span class="st">"Count"</span>,
|
||
style <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>fontSize <span class="op">=</span> <span class="st">"14px"</span>, color <span class="op">=</span> <span class="st">"#BDBDBD"</span><span class="op">)</span>
|
||
<span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_xaxis.html">ax_xaxis</a></span><span class="op">(</span>title <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>
|
||
text <span class="op">=</span> <span class="st">"Cut"</span>,
|
||
style <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>fontSize <span class="op">=</span> <span class="st">"14px"</span>, color <span class="op">=</span> <span class="st">"#BDBDBD"</span><span class="op">)</span>
|
||
<span class="op">)</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-4c766dcbbc417243510b" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-4c766dcbbc417243510b">{"x":{"ax_opts":{"chart":{"type":"bar"},"series":[{"name":[],"type":"bar","data":[{"x":"Fair","y":1610},{"x":"Good","y":4906},{"x":"Very Good","y":12082},{"x":"Premium","y":13791},{"x":"Ideal","y":21551}]}],"dataLabels":{"enabled":false},"plotOptions":{"bar":{"horizontal":false}},"tooltip":{"shared":true,"intersect":false,"followCursor":true},"yaxis":{"labels":{"style":{"colors":"#848484"}},"title":{"text":"Count","style":{"fontSize":"14px","color":"#BDBDBD"}}},"xaxis":{"labels":{"style":{"colors":"#848484"}},"title":{"text":"Cut","style":{"fontSize":"14px","color":"#BDBDBD"}}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"Fair","max":"Very Good"},"type":"column"},"evals":[],"jsHooks":[]}</script>
|
||
</div>
|
||
</div>
|
||
<div class="section level2">
|
||
<h2 id="lines">Lines<a class="anchor" aria-label="anchor" href="#lines"></a>
|
||
</h2>
|
||
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><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 class="co">## economics dataset from ggplot2</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 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 class="va">economics</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">tail</a></span><span class="op">(</span><span class="va">economics</span>, <span class="fl">50</span><span class="op">)</span>
|
||
<span class="va">economics_long</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">subset</a></span><span class="op">(</span><span class="va">economics_long</span>, <span class="va">date</span> <span class="op">>=</span> <span class="st">"2010-01-01"</span><span class="op">)</span></code></pre></div>
|
||
<div class="section level3">
|
||
<h3 id="type-of-line">Type of line<a class="anchor" aria-label="anchor" href="#type-of-line"></a>
|
||
</h3>
|
||
<p>Classic line:</p>
|
||
<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-a10ce8c6f39af3b360d2" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-a10ce8c6f39af3b360d2">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1298937600000,21.5],[1301616000000,20.9],[1304208000000,21.6],[1306886400000,22.4],[1309478400000,22],[1312156800000,22.4],[1314835200000,22],[1317427200000,20.6],[1320105600000,20.8],[1322697600000,20.5],[1325376000000,20.8],[1328054400000,19.7],[1330560000000,19.2],[1333238400000,19.1],[1335830400000,19.9],[1338508800000,20.4],[1341100800000,17.5],[1343779200000,18.4],[1346457600000,18.8],[1349049600000,19.9],[1351728000000,18.6],[1354320000000,17.7],[1356998400000,15.8],[1359676800000,17.2],[1362096000000,17.6],[1364774400000,17.1],[1367366400000,17.1],[1370044800000,17],[1372636800000,16.2],[1375315200000,16.5],[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","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":"2011-03-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script><p>Spline curve:</p>
|
||
<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span><span class="op">(</span>curve <span class="op">=</span> <span class="st">"smooth"</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-2657c7fa8f1a0aca3293" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-2657c7fa8f1a0aca3293">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1298937600000,21.5],[1301616000000,20.9],[1304208000000,21.6],[1306886400000,22.4],[1309478400000,22],[1312156800000,22.4],[1314835200000,22],[1317427200000,20.6],[1320105600000,20.8],[1322697600000,20.5],[1325376000000,20.8],[1328054400000,19.7],[1330560000000,19.2],[1333238400000,19.1],[1335830400000,19.9],[1338508800000,20.4],[1341100800000,17.5],[1343779200000,18.4],[1346457600000,18.8],[1349049600000,19.9],[1351728000000,18.6],[1354320000000,17.7],[1356998400000,15.8],[1359676800000,17.2],[1362096000000,17.6],[1364774400000,17.1],[1367366400000,17.1],[1370044800000,17],[1372636800000,16.2],[1375315200000,16.5],[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"smooth","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","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":"2011-03-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script><p>Steps chart:</p>
|
||
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span><span class="op">(</span>curve <span class="op">=</span> <span class="st">"stepline"</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-d4737e072d7fea8fa526" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-d4737e072d7fea8fa526">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1298937600000,21.5],[1301616000000,20.9],[1304208000000,21.6],[1306886400000,22.4],[1309478400000,22],[1312156800000,22.4],[1314835200000,22],[1317427200000,20.6],[1320105600000,20.8],[1322697600000,20.5],[1325376000000,20.8],[1328054400000,19.7],[1330560000000,19.2],[1333238400000,19.1],[1335830400000,19.9],[1338508800000,20.4],[1341100800000,17.5],[1343779200000,18.4],[1346457600000,18.8],[1349049600000,19.9],[1351728000000,18.6],[1354320000000,17.7],[1356998400000,15.8],[1359676800000,17.2],[1362096000000,17.6],[1364774400000,17.1],[1367366400000,17.1],[1370044800000,17],[1372636800000,16.2],[1375315200000,16.5],[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"stepline","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","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":"2011-03-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script>
|
||
</div>
|
||
<div class="section level3">
|
||
<h3 id="line-appearance">Line appearance<a class="anchor" aria-label="anchor" href="#line-appearance"></a>
|
||
</h3>
|
||
<p>Color line with gradient:</p>
|
||
<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_fill.html">ax_fill</a></span><span class="op">(</span>
|
||
type <span class="op">=</span> <span class="st">"gradient"</span>,
|
||
gradient <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>
|
||
shade <span class="op">=</span> <span class="st">"dark"</span>,
|
||
gradientToColors <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"#FDD835"</span><span class="op">)</span>,
|
||
shadeIntensity <span class="op">=</span> <span class="fl">1</span>,
|
||
type <span class="op">=</span> <span class="st">"horizontal"</span>,
|
||
opacityFrom <span class="op">=</span> <span class="fl">1</span>,
|
||
opacityTo <span class="op">=</span> <span class="fl">1</span>,
|
||
stops <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">100</span>, <span class="fl">100</span>, <span class="fl">100</span><span class="op">)</span>
|
||
<span class="op">)</span>
|
||
<span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-3f97d6b138dc9a479652" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-3f97d6b138dc9a479652">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1298937600000,21.5],[1301616000000,20.9],[1304208000000,21.6],[1306886400000,22.4],[1309478400000,22],[1312156800000,22.4],[1314835200000,22],[1317427200000,20.6],[1320105600000,20.8],[1322697600000,20.5],[1325376000000,20.8],[1328054400000,19.7],[1330560000000,19.2],[1333238400000,19.1],[1335830400000,19.9],[1338508800000,20.4],[1341100800000,17.5],[1343779200000,18.4],[1346457600000,18.8],[1349049600000,19.9],[1351728000000,18.6],[1354320000000,17.7],[1356998400000,15.8],[1359676800000,17.2],[1362096000000,17.6],[1364774400000,17.1],[1367366400000,17.1],[1370044800000,17],[1372636800000,16.2],[1375315200000,16.5],[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","labels":{"style":{"colors":"#848484"}}},"fill":{"type":"gradient","gradient":{"shade":"dark","gradientToColors":["#FDD835"],"shadeIntensity":1,"type":"horizontal","opacityFrom":1,"opacityTo":1,"stops":[0,100,100,100]}}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"2011-03-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script><p>Solid area color:</p>
|
||
<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics</span>, type <span class="op">=</span> <span class="st">"area"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_fill.html">ax_fill</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"solid"</span>, opacity <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-f7683c0d788e2ab197ed" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-f7683c0d788e2ab197ed">{"x":{"ax_opts":{"chart":{"type":"area"},"series":[{"name":"uempmed","type":"area","data":[[1298937600000,21.5],[1301616000000,20.9],[1304208000000,21.6],[1306886400000,22.4],[1309478400000,22],[1312156800000,22.4],[1314835200000,22],[1317427200000,20.6],[1320105600000,20.8],[1322697600000,20.5],[1325376000000,20.8],[1328054400000,19.7],[1330560000000,19.2],[1333238400000,19.1],[1335830400000,19.9],[1338508800000,20.4],[1341100800000,17.5],[1343779200000,18.4],[1346457600000,18.8],[1349049600000,19.9],[1351728000000,18.6],[1354320000000,17.7],[1356998400000,15.8],[1359676800000,17.2],[1362096000000,17.6],[1364774400000,17.1],[1367366400000,17.1],[1370044800000,17],[1372636800000,16.2],[1375315200000,16.5],[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","labels":{"style":{"colors":"#848484"}}},"fill":{"type":"solid","opacity":1}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"2011-03-01","max":"2015-04-01"},"type":"area"},"evals":[],"jsHooks":[]}</script><p>Line width:</p>
|
||
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/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></code></pre></div>
|
||
<div id="htmlwidget-60a4f53c2935ff717fc2" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-60a4f53c2935ff717fc2">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1298937600000,21.5],[1301616000000,20.9],[1304208000000,21.6],[1306886400000,22.4],[1309478400000,22],[1312156800000,22.4],[1314835200000,22],[1317427200000,20.6],[1320105600000,20.8],[1322697600000,20.5],[1325376000000,20.8],[1328054400000,19.7],[1330560000000,19.2],[1333238400000,19.1],[1335830400000,19.9],[1338508800000,20.4],[1341100800000,17.5],[1343779200000,18.4],[1346457600000,18.8],[1349049600000,19.9],[1351728000000,18.6],[1354320000000,17.7],[1356998400000,15.8],[1359676800000,17.2],[1362096000000,17.6],[1364774400000,17.1],[1367366400000,17.1],[1370044800000,17],[1372636800000,16.2],[1375315200000,16.5],[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":1},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","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":"2011-03-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script><p>Dotted line</p>
|
||
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span><span class="op">(</span>dashArray <span class="op">=</span> <span class="fl">6</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-ce6e124fa60ffe7b8c16" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-ce6e124fa60ffe7b8c16">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1298937600000,21.5],[1301616000000,20.9],[1304208000000,21.6],[1306886400000,22.4],[1309478400000,22],[1312156800000,22.4],[1314835200000,22],[1317427200000,20.6],[1320105600000,20.8],[1322697600000,20.5],[1325376000000,20.8],[1328054400000,19.7],[1330560000000,19.2],[1333238400000,19.1],[1335830400000,19.9],[1338508800000,20.4],[1341100800000,17.5],[1343779200000,18.4],[1346457600000,18.8],[1349049600000,19.9],[1351728000000,18.6],[1354320000000,17.7],[1356998400000,15.8],[1359676800000,17.2],[1362096000000,17.6],[1364774400000,17.1],[1367366400000,17.1],[1370044800000,17],[1372636800000,16.2],[1375315200000,16.5],[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":2,"dashArray":6},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","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":"2011-03-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script>
|
||
</div>
|
||
<div class="section level3">
|
||
<h3 id="markers">Markers<a class="anchor" aria-label="anchor" href="#markers"></a>
|
||
</h3>
|
||
<p>Add points to line :</p>
|
||
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">tail</a></span><span class="op">(</span><span class="va">economics</span>, <span class="fl">20</span><span class="op">)</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_markers.html">ax_markers</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">6</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-84fc935ab199d1f09187" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-84fc935ab199d1f09187">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","labels":{"style":{"colors":"#848484"}}},"markers":{"size":6}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"2013-09-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script><p>Add labels over points</p>
|
||
<div class="sourceCode" id="cb18"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">tail</a></span><span class="op">(</span><span class="va">economics</span>, <span class="fl">20</span><span class="op">)</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_markers.html">ax_markers</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fl">6</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_dataLabels.html">ax_dataLabels</a></span><span class="op">(</span>enabled <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-1a1ed8c67612ab694eaf" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-1a1ed8c67612ab694eaf">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"uempmed","type":"line","data":[[1377993600000,16.5],[1380585600000,16.3],[1383264000000,17.1],[1385856000000,17.3],[1388534400000,15.4],[1391212800000,15.9],[1393632000000,15.8],[1396310400000,15.7],[1398902400000,14.6],[1401580800000,13.8],[1404172800000,13.1],[1406851200000,12.9],[1409529600000,13.4],[1412121600000,13.6],[1414800000000,13],[1417392000000,12.9],[1420070400000,13.2],[1422748800000,12.9],[1425168000000,12],[1427846400000,11.5]]}],"dataLabels":{"enabled":true},"stroke":{"curve":"straight","width":2},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","labels":{"style":{"colors":"#848484"}}},"markers":{"size":6}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"2013-09-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script>
|
||
</div>
|
||
<div class="section level3">
|
||
<h3 id="multiple-lines">Multiple lines<a class="anchor" aria-label="anchor" href="#multiple-lines"></a>
|
||
</h3>
|
||
<p>You can use vectors of parameters to custom series separately:</p>
|
||
<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics_long</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span><span class="op">(</span>decimalsInFloat <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_markers.html">ax_markers</a></span><span class="op">(</span>size <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">6</span><span class="op">)</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span><span class="op">(</span>width <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">3</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-d220e8fb4e5a98111849" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-d220e8fb4e5a98111849">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"pce","type":"line","data":[[1262304000000,0.81244277879029],[1264982400000,0.81490703425144],[1267401600000,0.8199125531569],[1270080000000,0.821948986489377],[1272672000000,0.823497702595169],[1275350400000,0.82524321688015],[1277942400000,0.828092512257104],[1280620800000,0.831814564776549],[1283299200000,0.833594304831823],[1285891200000,0.838360243345227],[1288569600000,0.842638464631945],[1291161600000,0.84583857415441],[1293840000000,0.849552070231281],[1296518400000,0.852512599361689],[1298937600000,0.859391979190732],[1301616000000,0.862566419385476],[1304208000000,0.864654191373395],[1306886400000,0.866776189131607],[1309478400000,0.870258661258995],[1312156800000,0.872235199493459],[1314835200000,0.875443865458497],[1317427200000,0.876727331844512],[1320105600000,0.877274944169212],[1322697600000,0.878361612376039],[1325376000000,0.886053854249557],[1328054400000,0.893874442761677],[1330560000000,0.893728983237929],[1333238400000,0.896116230715918],[1335830400000,0.895166465590266],[1338508800000,0.89325837889639],[1341100800000,0.895902319651582],[1343779200000,0.898204002703836],[1346457600000,0.903115400740988],[1349049600000,0.906392518246614],[1351728000000,0.909558401998785],[1354320000000,0.909874990374002],[1356998400000,0.915205654097253],[1359676800000,0.918354424964277],[1362096000000,0.917284869642597],[1364774400000,0.915428121604162],[1367366400000,0.918782247092949],[1370044800000,0.92085290619572],[1372636800000,0.923240153673709],[1375315200000,0.926020997510075],[1377993600000,0.92924677636026],[1380585600000,0.933773134481608],[1383264000000,0.939574402546397],[1385856000000,0.942167004646148],[1388534400000,0.941704956747183],[1391212800000,0.946299766409118],[1393632000000,0.952871114305516],[1396310400000,0.957970754079284],[1398902400000,0.961889604777918],[1401580800000,0.967759324383294],[1404172800000,0.971481376902739],[1406851200000,0.978651675779278],[1409529600000,0.979772569756398],[1412121600000,0.985385596084572],[1414800000000,0.987815625775428],[1417392000000,0.988722608688212],[1420070400000,0.987353577876462],[1422748800000,0.990468122973193],[1425168000000,0.99696246288643],[1427846400000,1]]},{"name":"pop","type":"line","data":[[1262304000000,0.904928367541553],[1264982400000,0.906522578484998],[1267401600000,0.908042831188798],[1270080000000,0.907871995872802],[1272672000000,0.909333427123338],[1275350400000,0.910808064028442],[1277942400000,0.912428538364542],[1280620800000,0.914171298541104],[1283299200000,0.915968409806222],[1285891200000,0.917804973683399],[1288569600000,0.919414025580265],[1291161600000,0.920942011028899],[1293840000000,0.92241324585498],[1296518400000,0.923667544729019],[1298937600000,0.924916847313091],[1301616000000,0.926320689747691],[1304208000000,0.927724597922949],[1306886400000,0.929237808158818],[1309478400000,0.930929200229156],[1312156800000,0.932641070514292],[1314835200000,0.934479762745255],[1317427200000,0.936246879835405],[1320105600000,0.93777012373912],[1322697600000,0.939250841655039],[1325376000000,0.940676320983526],[1328054400000,0.941956603852427],[1330560000000,0.943274638293876],[1333238400000,0.944653203445681],[1335830400000,0.945995981027082],[1338508800000,0.947533194820507],[1341100800000,0.949120765957549],[1343779200000,0.95085923655621],[1346457600000,0.952703327738667],[1349049600000,0.954406249076806],[1351728000000,0.956048820491396],[1354320000000,0.957518855550477],[1356998400000,0.958807725792759],[1359676800000,0.959880514711547],[1362096000000,0.961048077005648],[1364774400000,0.962326987538324],[1367366400000,0.963689454446634],[1370044800000,0.965229330736687],[1372636800000,0.966772066745339],[1375315200000,0.968592663860335],[1377993600000,0.970448177482025],[1380585600000,0.972224366782906],[1383264000000,0.97391518362249],[1385856000000,0.975423315392571],[1388534400000,0.976921972290395],[1391212800000,0.97823645673634],[1393632000000,0.97957855225842],[1396310400000,0.980992099657577],[1398902400000,0.982473622896551],[1401580800000,0.984073150615668],[1404172800000,0.985702006885595],[1406851200000,0.987603703319152],[1409529600000,0.989506155770269],[1412121600000,0.991383363808922],[1414800000000,0.993112959418826],[1417392000000,0.994608132061805],[1420070400000,0.996107750416745],[1422748800000,0.997306408041825],[1425168000000,0.998590610697427],[1427846400000,1]]},{"name":"psavert","type":"line","data":[[1262304000000,0.258278145695364],[1264982400000,0.23841059602649],[1267401600000,0.231788079470199],[1270080000000,0.278145695364238],[1272672000000,0.317880794701987],[1275350400000,0.311258278145695],[1277942400000,0.304635761589404],[1280620800000,0.311258278145695],[1283299200000,0.298013245033113],[1285891200000,0.291390728476821],[1288569600000,0.291390728476821],[1291161600000,0.324503311258278],[1293840000000,0.344370860927152],[1296518400000,0.357615894039735],[1298937600000,0.317880794701987],[1301616000000,0.311258278145695],[1304208000000,0.311258278145695],[1306886400000,0.33112582781457],[1309478400000,0.337748344370861],[1312156800000,0.33112582781457],[1314835200000,0.304635761589404],[1317427200000,0.304635761589404],[1320105600000,0.317880794701987],[1322697600000,0.370860927152318],[1325376000000,0.384105960264901],[1328054400000,0.384105960264901],[1330560000000,0.417218543046358],[1333238400000,0.43046357615894],[1335830400000,0.437086092715232],[1338508800000,0.456953642384106],[1341100800000,0.397350993377483],[1343779200000,0.384105960264901],[1346457600000,0.397350993377483],[1349049600000,0.437086092715232],[1351728000000,0.496688741721854],[1354320000000,0.649006622516556],[1356998400000,0.271523178807947],[1359676800000,0.23841059602649],[1362096000000,0.245033112582781],[1364774400000,0.278145695364238],[1367366400000,0.298013245033113],[1370044800000,0.304635761589404],[1372636800000,0.291390728476821],[1375315200000,0.298013245033113],[1377993600000,0.304635761589404],[1380585600000,0.271523178807947],[1383264000000,0.264900662251656],[1385856000000,0.278145695364238],[1388534400000,0.324503311258278],[1391212800000,0.337748344370861],[1393632000000,0.344370860927152],[1396310400000,0.344370860927152],[1398902400000,0.344370860927152],[1401580800000,0.344370860927152],[1404172800000,0.350993377483444],[1406851200000,0.33112582781457],[1409529600000,0.344370860927152],[1412121600000,0.33112582781457],[1414800000000,0.337748344370861],[1417392000000,0.357615894039735],[1420070400000,0.364238410596026],[1422748800000,0.377483443708609],[1425168000000,0.344370860927152],[1427846400000,0.357615894039735]]},{"name":"uempmed","type":"line","data":[[1262304000000,0.754716981132076],[1264982400000,0.75],[1267401600000,0.773584905660377],[1270080000000,0.85377358490566],[1272672000000,0.863207547169811],[1275350400000,1],[1277942400000,0.863207547169811],[1280620800000,0.80188679245283],[1283299200000,0.768867924528302],[1285891200000,0.811320754716981],[1288569600000,0.80188679245283],[1291161600000,0.844339622641509],[1293840000000,0.825471698113208],[1296518400000,0.806603773584906],[1298937600000,0.825471698113208],[1301616000000,0.797169811320755],[1304208000000,0.830188679245283],[1306886400000,0.867924528301887],[1309478400000,0.849056603773585],[1312156800000,0.867924528301887],[1314835200000,0.849056603773585],[1317427200000,0.783018867924528],[1320105600000,0.792452830188679],[1322697600000,0.778301886792453],[1325376000000,0.792452830188679],[1328054400000,0.740566037735849],[1330560000000,0.716981132075472],[1333238400000,0.712264150943396],[1335830400000,0.75],[1338508800000,0.773584905660377],[1341100800000,0.636792452830189],[1343779200000,0.679245283018868],[1346457600000,0.69811320754717],[1349049600000,0.75],[1351728000000,0.688679245283019],[1354320000000,0.64622641509434],[1356998400000,0.556603773584906],[1359676800000,0.622641509433962],[1362096000000,0.641509433962264],[1364774400000,0.617924528301887],[1367366400000,0.617924528301887],[1370044800000,0.613207547169811],[1372636800000,0.575471698113208],[1375315200000,0.589622641509434],[1377993600000,0.589622641509434],[1380585600000,0.580188679245283],[1383264000000,0.617924528301887],[1385856000000,0.627358490566038],[1388534400000,0.537735849056604],[1391212800000,0.561320754716981],[1393632000000,0.556603773584906],[1396310400000,0.55188679245283],[1398902400000,0.5],[1401580800000,0.462264150943396],[1404172800000,0.429245283018868],[1406851200000,0.419811320754717],[1409529600000,0.443396226415094],[1412121600000,0.452830188679245],[1414800000000,0.424528301886792],[1417392000000,0.419811320754717],[1420070400000,0.433962264150943],[1422748800000,0.419811320754717],[1425168000000,0.377358490566038],[1427846400000,0.35377358490566]]},{"name":"unemploy","type":"line","data":[[1262304000000,0.975842740980501],[1264982400000,0.981132075471698],[1267401600000,0.98815820636299],[1270080000000,0.997868477145338],[1272672000000,0.960290518670561],[1275350400000,0.930686034578037],[1277942400000,0.933685955632746],[1280620800000,0.944422515196969],[1283299200000,0.938975290123944],[1285891200000,0.9340017367964],[1288569600000,0.978605826162469],[1291161600000,0.920738927922949],[1293840000000,0.894292255466961],[1296518400000,0.879055814320676],[1298937600000,0.872503355174864],[1301616000000,0.889871319175811],[1304208000000,0.881818899502645],[1306886400000,0.890266045630378],[1309478400000,0.874555932738612],[1312156800000,0.878897923738849],[1314835200000,0.889160811557591],[1317427200000,0.861214178574248],[1320105600000,0.838162153627536],[1322697600000,0.821662587826636],[1325376000000,0.798294781716271],[1328054400000,0.799557906370885],[1330560000000,0.791663377279545],[1333238400000,0.786374042788348],[1335830400000,0.787479276861135],[1338508800000,0.790005526170364],[1341100800000,0.787163495697482],[1343779200000,0.772558616878503],[1346457600000,0.744454093313334],[1349049600000,0.745164600931554],[1351728000000,0.73577011131286],[1354320000000,0.758901081550486],[1356998400000,0.772558616878503],[1359676800000,0.731428120312623],[1362096000000,0.710823399384227],[1364774400000,0.716428515039078],[1367366400000,0.708060314202258],[1370044800000,0.715718007420857],[1372636800000,0.682876766400884],[1375315200000,0.678455830109734],[1377993600000,0.677745322491513],[1380585600000,0.667166653509118],[1383264000000,0.639614746980343],[1385856000000,0.609378700560512],[1388534400000,0.593431751796005],[1391212800000,0.605036709560275],[1393632000000,0.60748401357859],[1396310400000,0.553959106339307],[1398902400000,0.56635351701271],[1401580800000,0.534854345938265],[1404172800000,0.546538248993447],[1406851200000,0.545827741375227],[1409529600000,0.519223178337412],[1412121600000,0.497750059208968],[1414800000000,0.505644588300308],[1417392000000,0.476197994789611],[1420070400000,0.490881818899503],[1422748800000,0.467750848661877],[1425168000000,0.459382647825057],[1427846400000,0.461119444225152]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":[1,3]},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","labels":{"style":{"colors":"#848484"}}},"markers":{"size":[3,6]}},"auto_update":{"series_animate":true,"update_options":false,"options_animate":true,"options_redrawPaths":true,"update_synced_charts":false},"sparkbox":false,"xaxis":{"min":"2010-01-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script><div class="sourceCode" id="cb20"><pre class="downlit sourceCode r">
|
||
<code class="sourceCode R"><span class="fu"><a href="../../reference/apex.html">apex</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">economics_long</span>, type <span class="op">=</span> <span class="st">"line"</span>, mapping <span class="op">=</span> <span class="fu"><a href="../../reference/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 class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_yaxis.html">ax_yaxis</a></span><span class="op">(</span>decimalsInFloat <span class="op">=</span> <span class="fl">2</span><span class="op">)</span> <span class="op"><a href="../../reference/apexcharter-exports.html">%>%</a></span>
|
||
<span class="fu"><a href="../../reference/ax_stroke.html">ax_stroke</a></span><span class="op">(</span>dashArray <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">8</span>, <span class="fl">5</span><span class="op">)</span><span class="op">)</span></code></pre></div>
|
||
<div id="htmlwidget-3a6f82ba47773350ed43" style="width:100%;height:350px;" class="apexcharter html-widget"></div>
|
||
<script type="application/json" data-for="htmlwidget-3a6f82ba47773350ed43">{"x":{"ax_opts":{"chart":{"type":"line"},"series":[{"name":"pce","type":"line","data":[[1262304000000,0.81244277879029],[1264982400000,0.81490703425144],[1267401600000,0.8199125531569],[1270080000000,0.821948986489377],[1272672000000,0.823497702595169],[1275350400000,0.82524321688015],[1277942400000,0.828092512257104],[1280620800000,0.831814564776549],[1283299200000,0.833594304831823],[1285891200000,0.838360243345227],[1288569600000,0.842638464631945],[1291161600000,0.84583857415441],[1293840000000,0.849552070231281],[1296518400000,0.852512599361689],[1298937600000,0.859391979190732],[1301616000000,0.862566419385476],[1304208000000,0.864654191373395],[1306886400000,0.866776189131607],[1309478400000,0.870258661258995],[1312156800000,0.872235199493459],[1314835200000,0.875443865458497],[1317427200000,0.876727331844512],[1320105600000,0.877274944169212],[1322697600000,0.878361612376039],[1325376000000,0.886053854249557],[1328054400000,0.893874442761677],[1330560000000,0.893728983237929],[1333238400000,0.896116230715918],[1335830400000,0.895166465590266],[1338508800000,0.89325837889639],[1341100800000,0.895902319651582],[1343779200000,0.898204002703836],[1346457600000,0.903115400740988],[1349049600000,0.906392518246614],[1351728000000,0.909558401998785],[1354320000000,0.909874990374002],[1356998400000,0.915205654097253],[1359676800000,0.918354424964277],[1362096000000,0.917284869642597],[1364774400000,0.915428121604162],[1367366400000,0.918782247092949],[1370044800000,0.92085290619572],[1372636800000,0.923240153673709],[1375315200000,0.926020997510075],[1377993600000,0.92924677636026],[1380585600000,0.933773134481608],[1383264000000,0.939574402546397],[1385856000000,0.942167004646148],[1388534400000,0.941704956747183],[1391212800000,0.946299766409118],[1393632000000,0.952871114305516],[1396310400000,0.957970754079284],[1398902400000,0.961889604777918],[1401580800000,0.967759324383294],[1404172800000,0.971481376902739],[1406851200000,0.978651675779278],[1409529600000,0.979772569756398],[1412121600000,0.985385596084572],[1414800000000,0.987815625775428],[1417392000000,0.988722608688212],[1420070400000,0.987353577876462],[1422748800000,0.990468122973193],[1425168000000,0.99696246288643],[1427846400000,1]]},{"name":"pop","type":"line","data":[[1262304000000,0.904928367541553],[1264982400000,0.906522578484998],[1267401600000,0.908042831188798],[1270080000000,0.907871995872802],[1272672000000,0.909333427123338],[1275350400000,0.910808064028442],[1277942400000,0.912428538364542],[1280620800000,0.914171298541104],[1283299200000,0.915968409806222],[1285891200000,0.917804973683399],[1288569600000,0.919414025580265],[1291161600000,0.920942011028899],[1293840000000,0.92241324585498],[1296518400000,0.923667544729019],[1298937600000,0.924916847313091],[1301616000000,0.926320689747691],[1304208000000,0.927724597922949],[1306886400000,0.929237808158818],[1309478400000,0.930929200229156],[1312156800000,0.932641070514292],[1314835200000,0.934479762745255],[1317427200000,0.936246879835405],[1320105600000,0.93777012373912],[1322697600000,0.939250841655039],[1325376000000,0.940676320983526],[1328054400000,0.941956603852427],[1330560000000,0.943274638293876],[1333238400000,0.944653203445681],[1335830400000,0.945995981027082],[1338508800000,0.947533194820507],[1341100800000,0.949120765957549],[1343779200000,0.95085923655621],[1346457600000,0.952703327738667],[1349049600000,0.954406249076806],[1351728000000,0.956048820491396],[1354320000000,0.957518855550477],[1356998400000,0.958807725792759],[1359676800000,0.959880514711547],[1362096000000,0.961048077005648],[1364774400000,0.962326987538324],[1367366400000,0.963689454446634],[1370044800000,0.965229330736687],[1372636800000,0.966772066745339],[1375315200000,0.968592663860335],[1377993600000,0.970448177482025],[1380585600000,0.972224366782906],[1383264000000,0.97391518362249],[1385856000000,0.975423315392571],[1388534400000,0.976921972290395],[1391212800000,0.97823645673634],[1393632000000,0.97957855225842],[1396310400000,0.980992099657577],[1398902400000,0.982473622896551],[1401580800000,0.984073150615668],[1404172800000,0.985702006885595],[1406851200000,0.987603703319152],[1409529600000,0.989506155770269],[1412121600000,0.991383363808922],[1414800000000,0.993112959418826],[1417392000000,0.994608132061805],[1420070400000,0.996107750416745],[1422748800000,0.997306408041825],[1425168000000,0.998590610697427],[1427846400000,1]]},{"name":"psavert","type":"line","data":[[1262304000000,0.258278145695364],[1264982400000,0.23841059602649],[1267401600000,0.231788079470199],[1270080000000,0.278145695364238],[1272672000000,0.317880794701987],[1275350400000,0.311258278145695],[1277942400000,0.304635761589404],[1280620800000,0.311258278145695],[1283299200000,0.298013245033113],[1285891200000,0.291390728476821],[1288569600000,0.291390728476821],[1291161600000,0.324503311258278],[1293840000000,0.344370860927152],[1296518400000,0.357615894039735],[1298937600000,0.317880794701987],[1301616000000,0.311258278145695],[1304208000000,0.311258278145695],[1306886400000,0.33112582781457],[1309478400000,0.337748344370861],[1312156800000,0.33112582781457],[1314835200000,0.304635761589404],[1317427200000,0.304635761589404],[1320105600000,0.317880794701987],[1322697600000,0.370860927152318],[1325376000000,0.384105960264901],[1328054400000,0.384105960264901],[1330560000000,0.417218543046358],[1333238400000,0.43046357615894],[1335830400000,0.437086092715232],[1338508800000,0.456953642384106],[1341100800000,0.397350993377483],[1343779200000,0.384105960264901],[1346457600000,0.397350993377483],[1349049600000,0.437086092715232],[1351728000000,0.496688741721854],[1354320000000,0.649006622516556],[1356998400000,0.271523178807947],[1359676800000,0.23841059602649],[1362096000000,0.245033112582781],[1364774400000,0.278145695364238],[1367366400000,0.298013245033113],[1370044800000,0.304635761589404],[1372636800000,0.291390728476821],[1375315200000,0.298013245033113],[1377993600000,0.304635761589404],[1380585600000,0.271523178807947],[1383264000000,0.264900662251656],[1385856000000,0.278145695364238],[1388534400000,0.324503311258278],[1391212800000,0.337748344370861],[1393632000000,0.344370860927152],[1396310400000,0.344370860927152],[1398902400000,0.344370860927152],[1401580800000,0.344370860927152],[1404172800000,0.350993377483444],[1406851200000,0.33112582781457],[1409529600000,0.344370860927152],[1412121600000,0.33112582781457],[1414800000000,0.337748344370861],[1417392000000,0.357615894039735],[1420070400000,0.364238410596026],[1422748800000,0.377483443708609],[1425168000000,0.344370860927152],[1427846400000,0.357615894039735]]},{"name":"uempmed","type":"line","data":[[1262304000000,0.754716981132076],[1264982400000,0.75],[1267401600000,0.773584905660377],[1270080000000,0.85377358490566],[1272672000000,0.863207547169811],[1275350400000,1],[1277942400000,0.863207547169811],[1280620800000,0.80188679245283],[1283299200000,0.768867924528302],[1285891200000,0.811320754716981],[1288569600000,0.80188679245283],[1291161600000,0.844339622641509],[1293840000000,0.825471698113208],[1296518400000,0.806603773584906],[1298937600000,0.825471698113208],[1301616000000,0.797169811320755],[1304208000000,0.830188679245283],[1306886400000,0.867924528301887],[1309478400000,0.849056603773585],[1312156800000,0.867924528301887],[1314835200000,0.849056603773585],[1317427200000,0.783018867924528],[1320105600000,0.792452830188679],[1322697600000,0.778301886792453],[1325376000000,0.792452830188679],[1328054400000,0.740566037735849],[1330560000000,0.716981132075472],[1333238400000,0.712264150943396],[1335830400000,0.75],[1338508800000,0.773584905660377],[1341100800000,0.636792452830189],[1343779200000,0.679245283018868],[1346457600000,0.69811320754717],[1349049600000,0.75],[1351728000000,0.688679245283019],[1354320000000,0.64622641509434],[1356998400000,0.556603773584906],[1359676800000,0.622641509433962],[1362096000000,0.641509433962264],[1364774400000,0.617924528301887],[1367366400000,0.617924528301887],[1370044800000,0.613207547169811],[1372636800000,0.575471698113208],[1375315200000,0.589622641509434],[1377993600000,0.589622641509434],[1380585600000,0.580188679245283],[1383264000000,0.617924528301887],[1385856000000,0.627358490566038],[1388534400000,0.537735849056604],[1391212800000,0.561320754716981],[1393632000000,0.556603773584906],[1396310400000,0.55188679245283],[1398902400000,0.5],[1401580800000,0.462264150943396],[1404172800000,0.429245283018868],[1406851200000,0.419811320754717],[1409529600000,0.443396226415094],[1412121600000,0.452830188679245],[1414800000000,0.424528301886792],[1417392000000,0.419811320754717],[1420070400000,0.433962264150943],[1422748800000,0.419811320754717],[1425168000000,0.377358490566038],[1427846400000,0.35377358490566]]},{"name":"unemploy","type":"line","data":[[1262304000000,0.975842740980501],[1264982400000,0.981132075471698],[1267401600000,0.98815820636299],[1270080000000,0.997868477145338],[1272672000000,0.960290518670561],[1275350400000,0.930686034578037],[1277942400000,0.933685955632746],[1280620800000,0.944422515196969],[1283299200000,0.938975290123944],[1285891200000,0.9340017367964],[1288569600000,0.978605826162469],[1291161600000,0.920738927922949],[1293840000000,0.894292255466961],[1296518400000,0.879055814320676],[1298937600000,0.872503355174864],[1301616000000,0.889871319175811],[1304208000000,0.881818899502645],[1306886400000,0.890266045630378],[1309478400000,0.874555932738612],[1312156800000,0.878897923738849],[1314835200000,0.889160811557591],[1317427200000,0.861214178574248],[1320105600000,0.838162153627536],[1322697600000,0.821662587826636],[1325376000000,0.798294781716271],[1328054400000,0.799557906370885],[1330560000000,0.791663377279545],[1333238400000,0.786374042788348],[1335830400000,0.787479276861135],[1338508800000,0.790005526170364],[1341100800000,0.787163495697482],[1343779200000,0.772558616878503],[1346457600000,0.744454093313334],[1349049600000,0.745164600931554],[1351728000000,0.73577011131286],[1354320000000,0.758901081550486],[1356998400000,0.772558616878503],[1359676800000,0.731428120312623],[1362096000000,0.710823399384227],[1364774400000,0.716428515039078],[1367366400000,0.708060314202258],[1370044800000,0.715718007420857],[1372636800000,0.682876766400884],[1375315200000,0.678455830109734],[1377993600000,0.677745322491513],[1380585600000,0.667166653509118],[1383264000000,0.639614746980343],[1385856000000,0.609378700560512],[1388534400000,0.593431751796005],[1391212800000,0.605036709560275],[1393632000000,0.60748401357859],[1396310400000,0.553959106339307],[1398902400000,0.56635351701271],[1401580800000,0.534854345938265],[1404172800000,0.546538248993447],[1406851200000,0.545827741375227],[1409529600000,0.519223178337412],[1412121600000,0.497750059208968],[1414800000000,0.505644588300308],[1417392000000,0.476197994789611],[1420070400000,0.490881818899503],[1422748800000,0.467750848661877],[1425168000000,0.459382647825057],[1427846400000,0.461119444225152]]}],"dataLabels":{"enabled":false},"stroke":{"curve":"straight","width":2,"dashArray":[8,5]},"yaxis":{"decimalsInFloat":2,"labels":{"style":{"colors":"#848484"}}},"xaxis":{"type":"datetime","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":"2010-01-01","max":"2015-04-01"},"type":"line"},"evals":[],"jsHooks":[]}</script>
|
||
</div>
|
||
</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.1.</p>
|
||
</div>
|
||
|
||
</footer>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html>
|