Вопрос

In rCharts examples such as these for dimple plots, the axis labels often overlap the tick mark labels, which makes them effectively unusable for presentation quality work... But in the examples given for dimple (outside the R / rCharts environment) they don't. Is there a way from within R to fix this?

Here is a reproducible example of the issue - observe the label on the y axis.

require(rCharts)
data(iris)

iris_t <- ddply(iris, .(Species), summarise,
                Sepal.Length = sum(Sepal.Length),
                Sepal.Width=sum(Sepal.Width))

dPlot(x = "Sepal.Length",
      y = "Sepal.Width",
      data=iris_t)

(Note - as I say in a comment, this seems to be specific to when the chart is sent directly to the web browser from R. If I save it first via sink(...) and the print method of the dPlot object, then open it in a browser from the file server, the axis labels look to be in good positions).

Это было полезно?

Решение

It simply requires an update to version 1.1.1 of dimple. This issue is specific to some changes made in Chrome v30. I've fixed it in dimple but some referencing sites have not yet updated. You'll find this is not an issue in other browsers. I'm still not sure what changed in the Chrome update but it seems to break a particular type of selection in d3.

More details here: https://github.com/PMSI-AlignAlytics/dimple/releases/tag/1.1.1

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top