diff --git a/assets/src/scripts/components/hydrograph/cursor.js b/assets/src/scripts/components/hydrograph/cursor.js index 41f22a6d61beffcd81ee2083f9dcc09a946a26f6..d1b76fb940d5eb1b08802efeeb53ad69549c66f4 100644 --- a/assets/src/scripts/components/hydrograph/cursor.js +++ b/assets/src/scripts/components/hydrograph/cursor.js @@ -1,7 +1,6 @@ import memoize from 'fast-memoize'; import {createSelector} from 'reselect'; -import config from '../../config'; import {getCurrentMethodID} from '../../selectors/time-series-selector'; import {getNearestTime} from '../../utils'; diff --git a/assets/src/scripts/components/hydrograph/drawing-data.js b/assets/src/scripts/components/hydrograph/drawing-data.js index dc5eb23e211633ef414fe8e01e2e77034ff8cf05..b6026a9f381ff28bca439e475edbd4b746572594 100644 --- a/assets/src/scripts/components/hydrograph/drawing-data.js +++ b/assets/src/scripts/components/hydrograph/drawing-data.js @@ -5,7 +5,6 @@ import {DateTime} from 'luxon'; import {createSelector} from 'reselect'; import {format} from 'd3-format'; -import config from '../../config'; import {getCurrentVariableMedianStatistics} from '../../selectors/median-statistics-selector'; import {getVariables, getCurrentMethodID, getTimeSeries, getCurrentVariableTimeSeries, getTimeSeriesForTsKey, getTsRequestKey, getRequestTimeRange} from '../../selectors/time-series-selector'; @@ -279,9 +278,13 @@ export const lineSegmentsSelector = memoize((tsKey, period) => createSelector( pointsByTsKeySelector(tsKey, period), getCurrentMethodID, (tsPoints, currentMethodID) => { + console.log('In lineSegementsSelector current method id is ' + currentMethodID); let seriesLines = {}; Object.keys(tsPoints).forEach((tsId) => { const methodID = tsId.split(':')[0]; + if (tsPoints[tsId].length) { + console.log('Drawing points for methodID ' + methodID); + } const points = tsPoints[tsId]; let lines = []; diff --git a/assets/src/scripts/components/hydrograph/index.js b/assets/src/scripts/components/hydrograph/index.js index 9a81abeffe476a5f9566ceb9cad53d74d483248b..6985e04d0b4c8612a4eb02acd0517e9aaf2b752e 100644 --- a/assets/src/scripts/components/hydrograph/index.js +++ b/assets/src/scripts/components/hydrograph/index.js @@ -40,6 +40,9 @@ const controlDisplay = function(elem, showElem) { /* * Renders the hydrograph on the node element using the Redux store for state information. The siteno, latitude, and * longitude are required parameters. All others are optional and are used to set the initial state of the hydrograph. + * @param {Redux store} store + * @param {DOM node} node + * @param {Object} - string properties to set initial state information. The property siteno is required */ export const attachToNode = function (store, node, @@ -52,7 +55,7 @@ export const attachToNode = function (store, period, startDT, endDT, - timeSeriesId, + timeSeriesId, // This must be converted to an integer showOnlyGraph = false, showMLName = false } = {}) { @@ -118,7 +121,7 @@ export const attachToNode = function (store, store.dispatch(ivTimeSeriesStateActions.setIVTimeSeriesVisibility('compare', true)); } if (timeSeriesId) { - store.dispatch(ivTimeSeriesStateActions.setCurrentIVMethodID(timeSeriesId)); + store.dispatch(ivTimeSeriesStateActions.setCurrentIVMethodID(parseInt(timeSeriesId))); } // Initial data has been fetched and initial state set. We can render the hydrograph elements // Set up rendering functions for the graph-container diff --git a/graph-server/src/index.js b/graph-server/src/index.js index 8b9343bfcc2a8838f5c806d6d923a512039c9cb7..a223552d2be13ff060008764d48b7621e6df6670 100644 --- a/graph-server/src/index.js +++ b/graph-server/src/index.js @@ -86,7 +86,7 @@ app.use(`${PATH_CONTEXT}/api-docs`, swaggerUi.serve, swaggerUi.setup(swaggerDocu * in: query * description: represents an IV timeSeriesId valid for parameterCode * schema: - * type: string + * type: integer * responses: * 200: * description: PNG image of the IV data for the siteID and parameterCode