From b920c7d6d72456e634bdf2678651e07b98644b5d Mon Sep 17 00:00:00 2001 From: Serkan Korkmaz <77464572+serkor1@users.noreply.github.com> Date: Thu, 3 Oct 2024 09:05:47 +0200 Subject: [PATCH] Fix 720720583854139595eae278d8b28c692b1a0a2a :hammer: In the excellent PR https://github.com/serkor1/cryptoQuotes/pull/32 by @stavralf, I made a small error during the review, which have now been fixed. --- vignettes/custom_indicators.Rmd | 34 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/vignettes/custom_indicators.Rmd b/vignettes/custom_indicators.Rmd index b8ace22..e321a89 100644 --- a/vignettes/custom_indicators.Rmd +++ b/vignettes/custom_indicators.Rmd @@ -38,26 +38,24 @@ We start by creating a simple `chart`-object with `volume` as it's only indicato ```{r} # 1) create a simple chart # object -chart_object <- chart( - ticker = BTC, - main = kline(), - sub = list( - volume() - ), - options = list( - dark = FALSE - ) -) - -# 2) display the chart -# and remove the xaxis -# labels, so it doesnt -# get duplicated when the +# +# NOTE: The chart is wrapped in +# plotly::layout() to avoid +# duplicating xaxis when the # custom indicators are added -plotly::layout( - p = chart_object, +chart_object <- plotly::layout( + chart( + ticker = BTC, + main = kline(), + sub = list( + volume() + ), + options = list( + dark = FALSE + ) + ), xaxis = list( - showticklabels=FALSE + showticklabels = FALSE ) ) ```