updated vignette sync charts
This commit is contained in:
parent
4b82ddb922
commit
5dc9271701
|
@ -30,14 +30,30 @@ apex(
|
|||
mapping = aes(x = date, y = pce),
|
||||
type = "line",
|
||||
synchronize = "economics"
|
||||
)
|
||||
) %>%
|
||||
ax_yaxis(
|
||||
decimalsInFloat = 0,
|
||||
labels = list(
|
||||
formatter = format_num("~s"),
|
||||
minWidth = 40
|
||||
)
|
||||
) %>%
|
||||
ax_tooltip(x = list(format = "yyyy"))
|
||||
|
||||
apex(
|
||||
data = tail(economics, 150),
|
||||
mapping = aes(x = date, y = psavert),
|
||||
type = "line",
|
||||
synchronize = "economics"
|
||||
)
|
||||
) %>%
|
||||
ax_yaxis(
|
||||
decimalsInFloat = 0,
|
||||
labels = list(
|
||||
formatter = format_num("~s"),
|
||||
minWidth = 40
|
||||
)
|
||||
) %>%
|
||||
ax_tooltip(x = list(format = "yyyy"))
|
||||
```
|
||||
|
||||
|
||||
|
@ -45,6 +61,8 @@ apex(
|
|||
|
||||
```
|
||||
|
||||
Note that you have to set a common `minWidth` for y axis labels. Different width yaxis in different charts will produce incorrect results when hovering or interacting.
|
||||
|
||||
|
||||
For an example in Shiny, you can run:
|
||||
|
||||
|
|
Loading…
Reference in New Issue