class_docstr: Data aggregation functionality for ``go.Figures``.
class_docstr_tok: ["Data","aggregation","functionality","for","``","go.Figures","``","."]
docstr: Stop the running dash-app.
  
  Parameters
  ----------
  warn: bool
      Whether a warning message will be shown or  not, by default True.
  
  !!! warning
  
      This only works if the dash-app was started with [`show_dash`][figure_resampler.figure_resampler.FigureResampler.show_dash].
docstr_tok: ["Stop","the","running","dash-app",".","Parameters","--","--","--","--","--","warn",":","bool","Whether","a","warning","message","will","be","shown","or","not",",","by","default","True",".","!","!","!","warning","This","only","works","if","the","dash-app","was","started","with","[","`","show_dash","`","]","[","figure_resampler.figure_resampler.FigureResampler.show_dash","]","."]
code: def stop_server(self, warn: bool = True):
      """Stop the running dash-app.
  
      Parameters
      ----------
      warn: bool
          Whether a warning message will be shown or  not, by default True.
  
      !!! warning
  
          This only works if the dash-app was started with [`show_dash`][figure_resampler.figure_resampler.FigureResampler.show_dash].
      """
      if self._app is not None:
          servers_dict = (
              self._app._server_threads
              if self._is_persistent_inline
              else dash.jupyter_dash._servers
          )
          old_server = servers_dict.get((self._host, self._port))
          if old_server:
              if self._is_persistent_inline:
                  old_server.kill()
                  old_server.join()
              else:
                  old_server.shutdown()
          del servers_dict[(self._host, self._port)]
      elif warn:
          warnings.warn(
              "Could not stop the server, either the \n"
              + "\t- 'show-dash' method was not called, or \n"
              + "\t- the dash-server wasn't started with 'show_dash'"
          )
  
imports: from __future__ import annotations
  import os
  import warnings
  from pathlib import Path
  from typing import List, Optional, Tuple
  import dash
  import plotly.graph_objects
  from plotly.basedatatypes import BaseFigure
  from ..aggregation import AbstractAggregator, AbstractGapHandler, MedDiffGapHandler, MinMaxLTTB
  from .figure_resampler_interface import AbstractFigureAggregator
  from .utils import is_figure, is_fr
label_desc: Use image node_id 7 for calling the FigureResampler obj's underlying member method code with example usage: obj.stop_server(warn) without return types