Description Usage Arguments Value References Examples
Set the polar
coordinates of Echarts for radar charts.
When an echart object is generated, you can modify it by setting aesthetics using
%>%
.
1 2 3 4 5 |
chart |
|
polarIndex |
Integer vector. The index of the polar systems you want to set. Default NULL. |
center |
Vector of the x, y position of the polar center. Could be numeric or character (percent form) vectors of length 2. Default c('50%', '50%'). |
radius |
The radius of the polar system, could be numeric or character (percent form). Default '75%'. |
startAngle |
Numeric (-180 ~ 180). The start angle. Default 90. |
splitNumber |
Numeric. The number of sections to divide. Default 5. |
boundaryGap |
Numeric vector of length 2. The gapping policy of the axis. Default c(0, 0). |
scale |
Logical. Whether to ignore zero and zoom toward the range of _min and _max. |
axisLine |
List. Axis line styles. You can set its |
axisLabel |
List. Axis label styles. You can set its |
splitLine |
List. Split line styles. You can set its |
splitArea |
List. Split area styles. You can set its |
type |
Character, 'polygon' or 'circle'. The type of the polar shape. Default 'polygon'. |
indicator |
List. The radar indicator and labels. The basic structure is |
axisName |
List. The name of the axis. You can set its |
... |
Elipsis |
A modified echarts object
http://echarts.baidu.com/echarts2/doc/option.html#title~polar
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
cars = mtcars[c('Merc 450SE','Merc 450SL','Merc 450SLC'),
c('mpg','disp','hp','qsec','wt','drat')]
cars$model = rownames(cars)
cars = data.table::melt(cars, id.vars='model')
names(cars) = c('model', 'indicator', 'Parameter')
g = echartr(cars, indicator, Parameter, model, type='radar') %>%
setTitle('Merc 450SE vs 450SL vs 450SLC')
g %>% setPolar(c(1,3), type='circle') %>%
setPolar(2, splitArea=list(show=FALSE)) %>%
setPolar(3, axisName=list(textStyle=textStyle(color='red')))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.