Skip to content

Commit

Permalink
Rename to removeUnreliableData
Browse files Browse the repository at this point in the history
  • Loading branch information
hvangeffen committed Jun 18, 2024
1 parent f0603f8 commit c0b2510
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/charts/ElevationChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import { VChipGroup } from 'vuetify/components'
import { difference } from 'lodash-es'
import {
dataFromResources,
filterUnreliableData,
removeUnreliableData,
} from '@/lib/charts/dataFromResources'
const LEGEND_HEIGHT = 76
Expand Down Expand Up @@ -169,7 +169,7 @@ const addToChart = (chartSeries: ChartSeries) => {
const id = chartSeries.id
const rawData = dataFromResources(chartSeries.dataResources, props.series)
const data = filterUnreliableData(rawData)
const data = removeUnreliableData(rawData)
const line = new ChartLine(data, {
tooltip: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/charts/TimeSeriesChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import type { ThresholdLine } from '../../lib/charts/types/ThresholdLine.js'
import { Series } from '../../lib/timeseries/timeSeries.js'
import {
dataFromResources,
filterUnreliableData,
removeUnreliableData,
} from '@/lib/charts/dataFromResources'
import uniq from 'lodash-es/uniq'
import { extent } from 'd3'
Expand Down Expand Up @@ -190,7 +190,7 @@ const addToChart = (chartSeries: ChartSeries) => {
const id = chartSeries.id
const rawData = dataFromResources(chartSeries.dataResources, props.series)
const data = filterUnreliableData(rawData)
const data = removeUnreliableData(rawData)
const tooltip: TooltipOptions = {
toolTipFormatter: (d) => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/charts/dataFromResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ export function dataFromResources(
* @param data - An array of SeriesData or SeriesArrayData objects.
* @returns An array of SeriesData or SeriesArrayData objects with unreliable data removed.
*/
export function filterUnreliableData(data: (SeriesArrayData | SeriesData)[]) {
export function removeUnreliableData(data: (SeriesArrayData | SeriesData)[]) {
return data.filter(isReliableData)
}

0 comments on commit c0b2510

Please sign in to comment.