Continuity, Dataflow, Scatterplot
Released on 2022-07-22
This is a large release of updates to DataFlow and charts, along with numerous internal improvements, fixes and upstream updates.
Additionally, we've got an updated features page layout which shows our realtime charting a bit better!
Charting improvements
LineChart continuity
LineCharts and TimeSlicedLineCharts now both accept a continuitySource
and continuityAccessor
.
Truthy values on this source will break a line's continuity. By default this pulls data from the acceptability of the device.
The source can be overridden:
LineChart blanking
LineCharts and TimeSlicedLineCharts now both accept a blankTrigger
. This allows for a dataSource to wipe previous data from the LineChart.
The following demonstrates a DataSource which updates the entire chart every timestep, blanking each time.
ScatterPlot
The ScatterPlot
component allows for drawing sized and colored dots and is now part of the documented API.
Useful for test-benches and visualising multi-channel sensor data.
This example shows the readings of a multi-zone lidar and drives the point-size with reflectance strength values.
Accessors
TimeSlicedLineChart accessors are now unified. Instead of separate x and y accessors, a single accessor returns an object with x and y members.
Color now has its own accessor, as does continuity.
DataFlow improvements
Frontiers can now operate in realtime, allowing for sparse sources in DataFlows. The continuity source is one such source used by all LineCharts.
DataFlow event ordering is now guaranteed to the event instead of the batch. Developer-made DataFlows are now simpler to reason about.
The iterator API has changed from accepting events as themselves (event: Event<T>)
to their data and time alone (data: T, time: Time)
. This allows better enforcement of the time frontiers.
Improved type information
All DataFlows now automatically infer type information, allowing for strict enforcement of the events through the graph. Technical blog post here.
Charts now accept these typed Queryables and will automatically infer the types of their callbacks for better autocomplete.
DataSourcePrinters now automatically grab the ZoomWrapper context, allowing for DataFlows that aggregate and print based on their view window.
Improved Histogram
The histogram transformer now calculates rolling histograms across the window instead of accumulating and requiring an invalidation.
New DataFlow operators
advance
advance
is given the time once per timestep, and can emit an additional event just before the frontier closes over that time.
advance(queryable, time => { console.log(`${time} has passed`) // don't emit any new events return undefined})
coalesce
coalesce
takes an object as an argument with a flat keyed object of Queryables, and combines their events so that the latest is in each key position.
const fooSource = new DataSource<number>()const barSource = new DataSource<string>()const boolSource = new DataSource<boolean>()const res = coalesce({ foo: fooSource, bar: barSource, bool: boolSource,})
peek
peek
allows queries that do not affect the overall SharedFrontier.
peek(queryable, (data, time) => { // update state machine with information from returned events})
Embedded Library
Arduino LibraryManager
The electricui-embedded
C library is now available directly through the Arduino Library manager.
The quickstart guide has been updated to reflect this workflow option.
Platformio Registry
The electricui-embedded
C library is now listed on the platformio package registry.
Other fixes
- Hundreds of small documentation updates, code-snippet improvements and improved screenshots.
- Fixed issue with generating release builds on macOS Monterey.
- Fixed issues with build pathing on Windows platforms.
- Fixed annotations incorrectly querying their domain.
- Fixed missing zoom behaviour when using TriggerDomain.
- Fixed TimeSlicedLineChart not sorting events correctly
- Fixed ZoomBrush breaking with single-point selections.
- Better handling of default codecs alongside user-specfied custom codecs.
- Removed infinite loop in
iterateAdvance
dataflow operator. - Better handling of react-three-fiber prop exports
- Dataflow queries clone in situations where subtle mutation may have previously occured.
- Correctly catches pauseUntil errors in the Persistence engine.
- Substantial increases to unit-test coverage.