Class RVThumbnail

Index

Methods

  • Releases all resources held by this thumbnail instance (ResizeObserver, window resize listener, and the entry in the active-thumbnails registry). This is called automatically when the container element is removed from the DOM, so explicit calls are not required in most cases. It can still be called explicitly from a framework lifecycle hook (e.g. Angular ngOnDestroy, React useEffect cleanup) to release resources sooner.

    Returns void

  • Re-renders the thumbnail using the current theme. Called automatically whenever RevealSdkSettings.theme changes.

    Returns void

  • Renders the thumbnail for a visualization into the target element without requiring a dashboard or widget. Uses the default theme and no context ID.

    Parameters

    • div: string

      The selector of the HTML element to render the thumbnail into.

    • chartType: RVChartType

      The chart type to render.

    Returns RVThumbnail

    The RVThumbnail instance.

  • Renders a thumbnail for a dashboard into the target element. When dashboardIdOrDashboard is a string it is treated as a dashboard ID and fetched from the server. When it is an RVDashboard instance the already-loaded model is used directly. Optionally renders only the thumbnail for a specific visualization.

    Parameters

    • div: string

      The selector of the HTML element to render the thumbnail into.

    • dashboardIdOrDashboard: string | RVDashboard

      A dashboard ID string or an RVDashboard instance.

    • Optionalviz: string | number | object | RVVisualization | null

      Optional visualization identifier — a zero-based index, a title, an RVVisualization instance, or a plain object with title/chartType properties.

    Returns Promise<RVThumbnail | null>

    The RVThumbnail instance, or null if the dashboard could not be loaded.

  • Renders a thumbnail for a dashboard supplied as a JSON string (documentJsonString) into the target element. Optionally renders only the thumbnail for a specific visualization.

    Parameters

    • div: string

      The selector of the HTML element to render the thumbnail into.

    • json: string

      The full dashboard JSON string (documentJsonString format).

    • Optionalviz: string | number | object | RVVisualization | null

      Optional visualization identifier — a zero-based index, a title, an RVVisualization instance, or a plain object with title/chartType properties.

    Returns RVThumbnail

    The RVThumbnail instance.