Urgent.News

What's breaking now, across thousands of outlets.

Tech

billboard.js 4.1.0: Live resizing, configurable subchart, React subpath & CSP-safe worker

Glad to announce billboard.js v4.1.0! ๐ŸŽ‰ This minor release is about giving back control over things that used to be fixed: how the chart behaves while its container is being dragged, what the subchart overview renders, and where the Web Worker source comes from. The React component also moved into the main package as a subpath export. For the detailed release info, please check out the releaseโ€ฆ

Billboard.js version 4.1.0 has been released, bringing several improvements and new features. One of the most significant changes is the introduction of live resizing, which allows the chart to follow the container's size while being dragged. This is achieved through the new resize.live option. When resize.live is set to true, the chart redraws itself every frame as the container's size changes, ensuring that the chart's pixel size matches the container's size in real-time.

There are two strategies for live resizing: redraw and stretch. In the redraw strategy, the chart is redrawn every frame, allowing for an exact rendering of the chart at the new size. If the resizing redraw takes more than the animation frame budget of 16ms, the chart switches to the stretch strategy, where it stretches the rendering to the new size for the rest of the resize process. This ensures that the chart maintains a consistent rendering time and avoids frame drops during resizing.

Another notable change in this release is the configurable subchart rendering. The subchart, which was previously a small copy of the main chart, can now render as its own chart with its own type, axes, and chart options. This allows for greater flexibility in displaying data and can be useful for comparing different data series or visualizing data in different ways.

The subchart can be rendered with different chart types (such as bar or area) and can have its own axes and grid options. This feature is particularly useful when visualizing complex datasets that require multiple charts with varying visualizations.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Architecture: Write It Down Before Rewriting

Part of the "How to bring order to a project" series โ€” the architecture track. Same context: a growing gamedev project, about twenty services on different stacks, an architecture that "grewโ€ฆ

There Is No Repro for a Phone Call

Every other part of my stack comes with a safety net I never asked for. TypeScript refuses to compile. A test goes red. A pull request makes somebody ask why I touched that line.

  • No compile checks or reviews for prompt changes in phone call system
  • Global prompt state written in prose with no scoping or privacy
  • Live editing of production config in browser with no change history

Zero Failures and Zero Tests Look the Same

The build is green. It has been green all week. That is the part you should have found suspicious. Somebody renamed a directory in a tidy-up commit nine days ago. The runner matches files by pattern.

  • Build system unchanged for a week despite 200 tests missing
  • Zero passing tests reported despite no failures in pipeline
  • Single guard can catch all versions of this issue

More from Wednesday 16 September โ†’