Skip to content

plotly_ex 0.3.0

Latest

Choose a tag to compare

@pklonowski pklonowski released this 26 Oct 20:22

This release includes the unpublished 0.2.0 changes below. The previous Hex
release was 0.1.0; use the README migration guide when upgrading.

Breaking

  • Target plotly.js 4.1.2. Migrate Scattermapbox / Choroplethmapbox /
    Densitymapbox to the equivalent *map traces and layout.mapbox to layout.map.
    Deprecated constructors now raise actionable migration errors.
  • Regenerated structs reject removed top-level stream, *src and
    layout.hidesources fields. Choroplethmap opacity belongs in marker.opacity.
  • Warn on removed Chart Studio config keys and mapboxAccessToken.
  • Adopt upstream color parsing and axis defaults; map traces require WebGL2 and
    MathJax 2 is no longer supported. See the README migration guide for the full list.

Added

  • Quiver vector fields through Plotly.Quiver, Plotly.Express.quiver/2,
    Plotly.quiver/2, color grouping, and smart-cell X/Y/U/V selectors.
  • Shared Kino/LiveView event payloads with cursor and point pixels, bbox,
    xvals/yvals, and plotly_unhover; missing values consistently serialize as null.
  • MathJax 4 loading for Kino and on-demand loading in the LiveView hook.
  • Schema support for Sankey direction/order, geo scale bounds and legend group
    double-click behavior. Notebook examples cover JSON export, modern CSS colors,
    map migration, quiver and anywhere events.

Changed

  • Disable Plotly Cloud upload by default on all render paths, preserving explicit
    showSendToCloud values. Figure.to_json/1 remains faithful to the original figure.
  • Version the Phoenix bundled URL to invalidate previously cached JavaScript on upgrade.
  • Serialize Kino live renders so startup or a slow earlier render cannot overwrite a newer update.
  • Regeneration removes obsolete generated trace files while retaining handwritten files.
  • Update Phoenix demos, Livebook notebooks, migration documentation and regression tests.
  • Refresh locked development dependencies, including upstream security patches.
  • Stage only tracked working-tree files for public releases, omit private tooling,
    and rewrite all notebook dependencies for Hex installation.

Fixed

  • Normalize bare-string 3D scene axis titles so their text renders correctly.
  • Share concurrent MathJax loading and tolerate startup failures without blocking charts.
  • Fix the Relayout Button notebook's light-theme action (renamed Default to Light) and make Reset restore both the light appearance and automatic axis ranges.
  • Preserve empty data arrays as [], while keeping empty figure layout/config options as objects.
  • Accept atom- and string-keyed Express rows and selectors, including grouped quiver and Explorer color selectors.
  • Resolve bundled named templates (string or atom) consistently across all renderers; preserve inline templates and faithful figure JSON. Combine them with + (e.g. "plotly_dark+presentation", deep-merged left to right). Unknown names log a warning and render without a template instead of crashing.
  • Recover Kino live charts after an initial render failure and attach event listeners once after successful plotting.

Upstream fixes

The bundled upgrade includes the fixes in
plotly.js 4.0.0–4.1.2,
including map selection, font-load redraw, hover handling and responsive resizing.

Includes the unpublished 0.2.0 automatic CDN/mirror/offline loading and Phoenix bundle-serving support.

Install: {:plotly_ex, "~> 0.3.0"}. See the README for migration from 0.1.0.