fixed resizing bug with auto update + dont update synced charts options
This commit is contained in:
parent
ea901187ac
commit
02cf03fd6a
|
@ -88,17 +88,21 @@ add_locale_apex <- function(widget) {
|
||||||
#' should it draw from the existing paths or completely redraw
|
#' should it draw from the existing paths or completely redraw
|
||||||
#' the chart paths from the beginning. By default, the chart
|
#' the chart paths from the beginning. By default, the chart
|
||||||
#' is re-rendered from the existing paths.
|
#' is re-rendered from the existing paths.
|
||||||
|
#' @param update_synced_charts All the charts in a group should
|
||||||
|
#' also update when one chart in a group is updated.
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
config_update <- function(series_animate = TRUE,
|
config_update <- function(series_animate = TRUE,
|
||||||
update_options = FALSE,
|
update_options = FALSE,
|
||||||
options_animate = TRUE,
|
options_animate = TRUE,
|
||||||
options_redrawPaths = TRUE) {
|
options_redrawPaths = TRUE,
|
||||||
|
update_synced_charts = FALSE) {
|
||||||
list(
|
list(
|
||||||
series_animate = series_animate,
|
series_animate = series_animate,
|
||||||
update_options = update_options,
|
update_options = update_options,
|
||||||
options_animate = options_animate,
|
options_animate = options_animate,
|
||||||
options_redrawPaths = options_redrawPaths
|
options_redrawPaths = options_redrawPaths,
|
||||||
|
update_synced_charts = update_synced_charts
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,10 +245,13 @@ HTMLWidgets.widget({
|
||||||
apexchart.updateSeries(axOpts.series, x.auto_update.series_animate);
|
apexchart.updateSeries(axOpts.series, x.auto_update.series_animate);
|
||||||
if (x.auto_update.update_options) {
|
if (x.auto_update.update_options) {
|
||||||
delete axOpts.series;
|
delete axOpts.series;
|
||||||
|
delete axOpts.chart.width;
|
||||||
|
delete axOpts.chart.height;
|
||||||
apexchart.updateOptions(
|
apexchart.updateOptions(
|
||||||
axOpts,
|
axOpts,
|
||||||
x.auto_update.options_redrawPaths,
|
x.auto_update.options_redrawPaths,
|
||||||
x.auto_update.options_animate
|
x.auto_update.options_animate,
|
||||||
|
x.auto_update.update_synced_charts
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -8,7 +8,8 @@ config_update(
|
||||||
series_animate = TRUE,
|
series_animate = TRUE,
|
||||||
update_options = FALSE,
|
update_options = FALSE,
|
||||||
options_animate = TRUE,
|
options_animate = TRUE,
|
||||||
options_redrawPaths = TRUE
|
options_redrawPaths = TRUE,
|
||||||
|
update_synced_charts = FALSE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
|
@ -21,7 +22,10 @@ config_update(
|
||||||
\item{options_redrawPaths}{When the chart is re-rendered,
|
\item{options_redrawPaths}{When the chart is re-rendered,
|
||||||
should it draw from the existing paths or completely redraw
|
should it draw from the existing paths or completely redraw
|
||||||
the chart paths from the beginning. By default, the chart
|
the chart paths from the beginning. By default, the chart
|
||||||
is re-rendered from the existing paths}
|
is re-rendered from the existing paths.}
|
||||||
|
|
||||||
|
\item{update_synced_charts}{All the charts in a group should
|
||||||
|
also update when one chart in a group is updated.}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
Configuration for auto update
|
Configuration for auto update
|
||||||
|
|
Loading…
Reference in New Issue