Scatter plots with multiple values per entry
The scatter plot widget is too limited at the moment: it can only be used to display scalar values from non-repeated structures.
To improve this, the following should be done:
-
Extend the widget pydantic model to include -
Instead of providing a string for x
,y
, andcolor
, we should use more complex configuration objects that can include units, labels etc. -
Document the possibility of using JMESPath syntax on quantity
-
Add root_validator
that ensures backward compatibility with old models.
-
-
Create a new function utility function parseJMESPath
for parsing JMESPath syntax -
Create tests for parseJMESPath
:-
Raise JMESPath errors correctly -
Handle functions -
Handle selectors -
Handle quantity names with schema + dtype
-
-
Create new input component InputJMESPath
for JMESPath queries -
Create tests for InputJMESPath
:-
Raise JMESPath errors correctly -
Only allow values from current SearchContext
-
-
Create tests for WidgetScatterPlot
:-
Test that using quantity names that target scalar values works as normal -
Test that custom axis labels are shown correctly -
Test that custom units are handled correctly. -
Test that using (subset) of JMESPath syntax works: -
selection: results.material.topology[0].cell.a
-
functions: max(results.material.topology[*].cell.a)
-
-
-
Create tests for WidgetScatterPlotEdit
:-
Test that using invalid JMESPath syntax gives a warning -
Test that targeting unavailable quantities gives warning -
Test that invalid units gives warning -
Test that incompatible units gives warning -
Test that missing required values units gives warning -
Test that targeting repeatable data with no JMESPath syntax gives a warning.
-
Edited by Lauri Himanen