Columns overlap xAxis labels

164 views Asked by At

I have made a Graph with R/rCharts/highcharts inside a markdown document. I produce a plot which includes (besides other commands) this command, which causes the problem in rmarkdown:

plot$yAxis(labels = list(formatter = "#! function() {return (this.value) + '%';} !#"),

                        # The maximum value should always be 100
                        max = 100,

                        # Subtract 5 percent from the minimum value as 
                        # minimum value for the y Axis.
                        min = max(minimum - 5, 0))

Which looks just fine when I look at it in rStudio viewer:

enter image description here

However, when I use the same code inside rmarkdown, the columns seem to start on the wrong position:

enter image description here

Which is caused by the hard setting of the yAxis minimum value. The code creating the error in markdown is exactly the same as above. Only to plot, i use this command:

plot$show('iframesrc', cdn = TRUE)

The columns start position does not seem to be updated.. Do you have any idea what causes the error?

0

There are 0 answers