Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: SUIT
-
Labels:None
-
Story Points:14
-
Epic Link:
-
Sprint:SUIT Sprint 2016-10
-
Team:Science User Interface
Description
Refactor charts store to allow multiple data elements.
Generalize chart actions to work with any kind of chart data or chart parameters.
Example: histogram point is described by the number of bins, min and max, scatter plot point is described by x and y, etc. For each chart data type we have a way to fetch the data, based on some parameters. But we want chart actions to be independent of chart type or chart data type: CHART_ADD, CHART_DATA_FETCH, CHART_DATA_UPDATE, CHART_OPTIONS_UPDATE, etc.
The implementation might be based on a simplified version of
https://confluence.lsstcorp.org/display/DM/Firefly+chart+design
Implementation notes:
Refactored chart actions and data to be able to support multiple chart elements connected to different data.
charts.data - is the store object with chart ids as the keys, the values are chart data object, which has chartDataElements field.
chartDataElements - object with chartDataElementId keys
and chartDataElement object as value
chartDataElement shape:
{id, options, defaultOptions, data, meta, tblId,
type - to get helper functions like
chartDataElements - object with chartDataElementId keys
and chartDataElement object as value
chartDataElement shape:
{id, options, defaultOptions, data, meta, tblId, type}The 'type' is an id of a ChartDataType, two of them are predefined: 'xycols' and 'histogram'.
Each chart data type has fetchData function and fetchParamsChanged functions, and possibly other helper functions.