Skip to content

Commit

Permalink
hazard chart and UHS chart both use "Acceleration (g)"; hazard map CS…
Browse files Browse the repository at this point in the history
…V shows cov if statistic is cov; (#271)
  • Loading branch information
benjamineac authored Oct 26, 2022
1 parent 6948a0d commit f46187c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/hazardCharts/HazardCharts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const HazardCharts: React.FC<HazardChartsProps> = ({ data, state, dispatch }: Ha
<GroupCurveChartResponsive
scaleType={state.hazardXScale}
yScaleType={'log'}
xLabel=" Acceleration (g)"
xLabel="Acceleration (g)"
yLabel="Annual Probability of Exceedance"
xLimits={state.hazardXScale === 'linear' ? [HAZARD_GMIN, HAZARD_GMAX] : [HAZARD_GMIN_LOG, HAZARD_GMAX_LOG]}
yLimits={[HAZARD_POEMIN, HAZARD_POEMAX]}
Expand All @@ -100,7 +100,7 @@ const HazardCharts: React.FC<HazardChartsProps> = ({ data, state, dispatch }: Ha
scaleType={state.spectraXScale}
yScaleType={'linear'}
xLabel="Period (s)"
yLabel="Shaking Intensity (g)"
yLabel="Acceleration (g)"
xLimits={state.spectraXScale === 'linear' ? [SA_PERIODMIN, SA_PERIODMAX] : [SA_PERIODMIN_LOG, SA_PERIODMAX_LOG]}
yLimits={spectralYLimits}
tooltip={true}
Expand Down
4 changes: 4 additions & 0 deletions src/views/hazardMaps/hazardMaps.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export const getHazardMapCSVData = (data: string[], vs30: number, imt: string, p
['lon', 'lat', 'shaking intensity(g)'],
];

if (statistic === 'cov') {
csvData[1][2] = 'coefficient of variation';
}

data.forEach((geojsonString) => {
const geojsonObject = JSON.parse(geojsonString);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down

0 comments on commit f46187c

Please sign in to comment.