JavaScript & React libraryChangelog

Changelog

2.3.0

cosmograph

  • Configurable cluster labels limit; fixes
  • Cache sanitized labels for better performance
  • Cache images in IndexedDB
  • Preserve aspect ratio ot loaded images
  • Keep image size aligned with point size
  • Load images concurrently
  • Tweak shapes and links handling utils
  • Tweak initial point spread based on their count
  • Change pointSamplingDistance to 100
  • Support for point shapes and images

fix

  • Prefetch images from cache before applying point shapes To fix the issue when loading a project always showed point shapes behind images even when disabled
  • Don’t call cosmos render after setImageData to avoid hover point reset
  • Use input point sizes for images on the first graph build

general

  • Experimental AI docs
  • Better error reporting
  • Fix for hidePointShapesForLoadedImages while images are loading
  • Better formatting for date labels
  • Fix label colors update after point color change
  • Tweak pointGreyoutOpacity
  • Properly reset image loading on graph destroy or update
  • Cache images; loading optimizations; Refactor
  • Abort image loading then column gets unselected

2.2.1

general

  • Restore support for config options and a callback removed in cosmos.gl 3.0 Restores support for config options and a callback removed in cosmosgl/graph#207 (cosmos.gl/graph 3.0) so existing Cosmograph users can keep using the old names until they migrate. Changes
    • Deprecated config props (accepted, then normalized): pointColor → pointDefaultColor, pointSize → pointDefaultSize, linkColor → linkDefaultColor, linkWidth → linkDefaultWidth, linkArrows → linkDefaultArrows. Declared in BasicConfig with @deprecated JSDoc.
    • Deprecated callback: onSimulationRestart (replacement: onSimulationUnpause). Declared in SimulationEventConfig; invoked from onSimulationUnpause in the event manager so both callbacks run on unpause.
    • Normalization: In setConfig, after merging with defaults, any deprecated prop is copied to its replacement only when the replacement is not set. No changes to _createCosmosConfig; Cosmos receives the same config as before (extra keys are ignored). All compat code is commented as cosmos.gl/graph 3.0 compat and tagged with TODO: remove in Cosmograph v3. Not changed
    • Cosmograph already exposes only the new Cosmos API: getPointsInRect, selectPointsInRect / unselectPointsInRect, and unpause(). The deprecated methods getPointsInRange, selectPointsInRange, and restart() are not used or exposed; no compat layer added for them.

2.2.0

cosmograph

  • Add getSampledLinks and getSampledLinkPositionsMap methods
  • Fix incorrect method call in screenToSpacePosition
  • Reduce default space size to 4096 for better iOS support
  • Add setZoomTransformByPointPositions method to set zoom based on point positions
  • Enhance onRectSelected callback to include point indices
  • Update getPointIndicesByExactValues to handle null values
    • Updated the getPointIndicesByExactValues function to support querying for null values alongside other specified values, improving data retrieval accuracy.
  • Update @interacta/css-labels to version 0.3.0
  • Fix resetSelectionOnEmptyCanvasClick
    • Changed the behavior of resetSelectionOnEmptyCanvasClick to call unselectAllPoints() instead of resetting only _pointSelectionClient selection
  • Fix table name references in link retrieval methods
    • Updated getLinksByPointIds and getLinksByPointIndices methods to use linksTableName instead of pointsTableName for accurate data retrieval.
  • Enhance captureScreenshot method to support scaling
    • Updated captureScreenshot method to accept an optional scale parameter, allowing for higher resolution screenshots.

cosmograph > bars

  • Multi-selection support, animation and sorting controls
    • Added Shift+click multi-selection for bars.
    • Updated onClick(item, event) to carry mouse event information.
    • Added togglable animation for bars during sorting.
    • ui > Bars: Added new Bars config props for sorting/animation behavior:
      • moveFilteredToTop — when true, filtered bars are grouped at the top during active filtering.
      • animateSort — enables/disables smooth transition when bar order changes.
      • sortAnimationDurationMs — controls sort transition duration in milliseconds.
    • Applied sort updates immediately on relevant config changes so behavior/animation toggles take effect instantly.
    • Improved applyInFilter handling for list/array accessors to make multi-select filtering consistent with exact-match behavior.

cosmograph > labels

  • Fix weight resolution logic for points with pointLabelWeightBy
  • Update @interacta/css-labels to 0.4.0 and sanitize label content with DOMPurify to prevent XSS
  • Updated label handling for focused points
    • Improved focused label handling by ensuring focused labels are prioritized and correctly tracked, including fallback mechanisms for position tracking.
  • Update select all button text and adjust background colors
  • Fix disabled state handling for accessor button
  • Fix ‘all fields’ result selection didin’t apply zoom and point selection
    • Updated the accessor getter to return the index accessor when all fields are selected.
  • Added zoom/focus on select configuration props
    • Added new zoomToPointOnSelectScale, zoomToPointOnSelectDuration, focusPointOnSelect, configuration options for tuning zoom and controlling focus ring on selected point in the search dropdown.

general

  • Update “@cosmos.gl/graph” to “3.0.0-beta.6” This version removes all previously deprecated APIs. Cosmograph already uses the new names, so no functional changes are needed. Removed configs: pointColor, pointSize, linkColor, linkWidth, linkArrows, useClassicQuadtree, simulationRepulsionQuadtreeLevels Removed callback: onSimulationRestart Removed methods: getPointsInRange(), selectPointsInRange(), restart()
  • Update “@cosmos.gl/graph” to “3.0.0-beta.5” and “@interacta/css-labels” to “0.6.0”
    • Use cosmos.ready instead of deviceInitPromise when initializing the graph
  • Update “@cosmos.gl/graph” to “3.0.0-beta.4”
    • In new Cosmos deviceInitPromise is public readonly. Await it before marking Cosmograph initialized so the device is ready.
  • Update “@cosmos.gl/graph” to “3.0.0-beta.2”
    • BREAKING: Removed simulationRepulsionQuadtreeLevels configuration prop

2.1.0

cosmograph

  • Remove deprecated methods
    • BREAKING: Removed onSimulationRestart() and restart(). Use onSimulationUnpause() and unpause() instead
  • Always update links on graph rebuild if they exist, not just when they changed
    • Fixed a bug where links wouldn’t render after a points-only change, as links need to be reset after Cosmos reinitialization

cosmograph > cosmographselectioncomponent

  • Set active state before reset to prevent queries with invalid accessor
    • Moved the setting of the active state to occur before resetting the filter to prevent invalid accessor queries during component updates.

cosmograph > bars+timeline+histogram

  • Add initialSelection property
    • Introduced initialSelection property in CosmographBarsConfigInterface, CosmographHistogramConfigInterface, and CosmographTimelineConfigInterface to allow for restoring saved filter states after data loads.

cosmograph > data kit

  • Allow including all columns using ['*'] for pointIncludeColumnsandlinkIncludeColumns`

cosmograph > labels

  • Add showSelectedLabels option to control visibility of selected point labels during filtering
    • Introduced showSelectedLabels configuration to manage the display of labels for selected points when filtering is active.
    • Updated relevant interfaces and documentation to reflect the new option.
  • Added event listener for pointSizeScaleUpdated to trigger label rendering based on point size scale updates
  • Improve rendering performance and new props for better label customization
    • Introduced showUnselectedPointLabels option to control visibility of labels for unselected points during filtering.
    • Added showDynamicLabelsLimit and selectedPointLabelsLimit options to control the maximum number of dynamic labels and selected point labels displayed.
    • Fixed rendering priority (weight) for dynamic, top and selected labels.
    • Improved label management during filtering and selection.
  • Update labels visibility logic in some conditions
    • Introduced showFocusedPointLabel configuration option to control the visibility of labels for the focused point.
    • Cluster labels now remain active if filtering is active but point labels (showDynamicLabels, showTopLabels, showFocusedPointLabel) are not configured/not visible. showLabelsFor will be still visible with cluster labels if specified
    • Fixed customLabels visibility during simulaiton
    • Updated relevant documentation to reflect new features

cosmograph > layout

  • Fix randomSeed prop

cosmograph > search

  • Add selectConnectedPoints option to configuration
    • Introduced a new configuration option selectConnectedPoints to allow users to select all points connected to a selected point from the dropdown.
  • Update accessor handling and improve search field logic
    • Changed default accessor to undefined in search configuration (search by all fields).
    • Improved logic for managing selected search fields and rendering suggestions based on current input.
    • CSS adjustments to ensure consistent styling and prevent text overflow.
  • Fix css variables for footer

cosmograph > timeline

  • Fixed default formatter that caused incorrect parsing for some dates
    • ui: Added defaultDateFormat helper function to export

general

  • Update “@cosmos.gl/graph” to “2.6.4”
  • Sync styles for search input and suggestions
    • Changed background color of search input and suggestions to use var(—cosmograph-search-background) for consistency.
    • Updated text color for search suggestions to use var(—cosmograph-search-text-color).

ui > timeline

  • Add support for symlog scale in timeline configuration
    • Introduced useSymlogScale option in TimelineConfigInterface to enable symlog scaling for the Y axis.
    • Updated default timeline configuration to set useSymlogScale to false.

2.0.1

cosmograph

  • Improved error handling
    • Improved error reporting mechanism that now includes DuckDB error tracking
    • Fixed processedFully that will be true only if processed rows count is lower than actual rows count (even if data is incorrect)
    • Fixed statusIndicatorMode config prop that ignored false state

cosmograph > cosmographsizelegend

  • Fixed legend for LinkWidthStrategy.Count when no accessor provided

cosmograph > data kit

  • New createMissingPoints prop for preparing links configuration
    • Modified CosmographDataPrepPointsConfig interface to include createMissingPoints property for controlling auto-creation of missing points from link source and target columns.
    • Updated insertLinks function to check for and create missing IDs from both source and target columns if createMissingPoints is enabled.

cosmograph > histogram & timeline

  • Fix setSelection method
  • Add useQuantiles option for quantized extent limitation

cosmograph > histogram + timeline

  • Include outliers into the edge selections when useQuantiles is true

cosmograph > search

  • Remove multifieldSearch option and implement “all fields” option
    • Removed the multifieldSearch configuration option from CosmographSearch.
    • Introduced functionality to select “all fields” for search queries.
    • Updated search methods to accommodate the new all fields selection logic.

cosmograph > search & filtering

  • Support array (VARCHAR[]) data handling
    • Modified FilteringClient to support filtering on array columns.
    • Updated CosmographSearch to detect and handle array columns, allowing for more flexible search queries.

cosmograph > timeline

  • Fix fetchData method

general

  • Update README.md