* Format a computed aggregation result to make it suitable for a column chart
* @param {Array} calendarDatesMonthsStrArr An array of unique calendar dates strings (in "YYYY-MM-DD" fromat) or unique calendar months strings (in "YYYY-MM" format)
...
...
@@ -65,64 +65,6 @@ const createSeriesOptionsForColumnChart = function (
);
};
/**
* Creates a date string that is used as a header for a shared tooltip string for a column chart
* @param {Number} pointXAxisValue The x-axis value (Unix timestamp) which is common for a set of data points
* @param {String} aggregationInterval The aggregation interval as a string, either "daily" or "monthly"
* @returns {String} A calendar date or calendar month string that is common for a set of data points
@@ -46,21 +46,9 @@ const extractBuildingIdPhenomenonNameFromDatastreamName = function (
/**
* Format the response containing a Datastream's metadata from Sensorthings API
* @param {Object} datastreamMetadata An object containing a Datastream's metadata
* @param {Boolean} isMetadataForAggregation A flag to determine if the datastream metadata will be used for aggregation. Set to `true` if metadata will be used for aggregation, `false` if not
* @returns {Object} An object containing the formatted metadata that is suitable for use in a chart
*/
constformatDatastreamMetadataForChart=function(
datastreamMetadata,
isMetadataForAggregation
){
if(
datastreamMetadata===undefined||
isMetadataForAggregation===undefined
)
thrownewError(
"This function expects two arguments, ensure that both have been supplied"