Avoid duplicate TAF marker points in chart data
This commit is contained in:
@@ -494,13 +494,18 @@ export function getTemperatureChartData(
|
|||||||
}) || null
|
}) || null
|
||||||
: null;
|
: null;
|
||||||
tafMarkers.forEach((marker) => {
|
tafMarkers.forEach((marker) => {
|
||||||
if (sameMarker(marker, currentTafMarker) || sameMarker(marker, nextTafMarker)) {
|
const isPrimaryTafMarker =
|
||||||
|
sameMarker(marker, currentTafMarker) || sameMarker(marker, nextTafMarker);
|
||||||
|
const isPeakReferenceMarker = sameMarker(marker, peakWindowTafMarker);
|
||||||
|
if (isPrimaryTafMarker) {
|
||||||
marker.isCurrent = true;
|
marker.isCurrent = true;
|
||||||
tafCurrentMarkerPoints[marker.index] = tafMarkerValue;
|
tafCurrentMarkerPoints[marker.index] = tafMarkerValue;
|
||||||
}
|
}
|
||||||
if (sameMarker(marker, peakWindowTafMarker)) {
|
if (isPeakReferenceMarker) {
|
||||||
marker.isPeakWindow = true;
|
marker.isPeakWindow = true;
|
||||||
tafPeakWindowMarkerPoints[marker.index] = tafMarkerValue - 0.15;
|
if (!isPrimaryTafMarker) {
|
||||||
|
tafPeakWindowMarkerPoints[marker.index] = tafMarkerValue - 0.15;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const formatTafLegendMarker = (
|
const formatTafLegendMarker = (
|
||||||
|
|||||||
Reference in New Issue
Block a user