Skip to content

WDFN-816 Implement multi site hydrograph

Bucknell, Mary S. requested to merge mbucknell/waterdataui:wdfn-816 into main

Before making a pull request

  • Put the appropriate EXEMPT flag if needed in the MR label (see https://practices.wma.chs.usgs.gov/practice/peer_code_review/)
  • Run all linters (make lint)
  • Run all tests (make test)
  • Update the changelog appropriately
  • If making a release, update code.json metadataLastUpdated and bump CHANGELOG.md to next version.

Description

Added a new Vue component MultiSiteHydrograph which uses the general purpose component TimeSeriesGraph. Added the xaxis, yaxis, and hydrograph line rendering watcher functions in addition to a preliminary title and hydrograph description strings.

I reworked the Pinia store for the multi-site-hydrograph to get the data in a data structure that is easier for the developers to use and interpret. I also modified the instantaneous-values fetchTimeSeries function to accept a string (for a single site) or an array of strings (for multiple sites). This allows a single service call to be made when retrieving data for the multi site hydrograph. I also added two getters to retrieve the current timeDomain and valueDomain of the IV data, which is used to calculate the scales used for the hydrograph.

I also added a scales.js module as a reusable module in d3-rendering. This is used so that scales are calculated in a similar way for time series hydrographs, including the existing hydrograph and daily-value-hydrograph on the monitoring location page. Doing this allows reuse and more consistency across our graphing products.

After making a pull request

  • If appropriate, put the link to the PR in the JIRA ticket
  • Assign someone to review unless the change is trivial
  • Check the accessibility CI step and fix or explain any issues.

Merge request reports

Loading