diff --git a/readme.md b/readme.md index d73391c..8440b93 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ [![Tests](https://github.com/Daveiano/weewx-wdc/actions/workflows/test.yml/badge.svg)](https://github.com/Daveiano/weewx-wdc/actions/workflows/test.yml) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Daveiano/weewx-wdc?label=latest%20release&sort=semver) -![GitHub milestone](https://img.shields.io/github/milestones/issues-open/Daveiano/weewx-wdc/18) +![GitHub milestone](https://img.shields.io/github/milestones/issues-open/Daveiano/weewx-wdc/19) ![GitHub commits since latest release (by SemVer)](https://img.shields.io/github/commits-since/Daveiano/weewx-wdc/latest) ![GitHub all releases](https://img.shields.io/github/downloads/Daveiano/weewx-wdc/total) ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/Daveiano/weewx-wdc) diff --git a/skins/weewx-wdc/src/js/diagrams/d3/line.tsx b/skins/weewx-wdc/src/js/diagrams/d3/line.tsx index 77a1a37..5fe5da0 100644 --- a/skins/weewx-wdc/src/js/diagrams/d3/line.tsx +++ b/skins/weewx-wdc/src/js/diagrams/d3/line.tsx @@ -436,7 +436,7 @@ export const D3LineDiagram: FunctionComponent = ( svgElement .append("g") .selectAll("dot") - .data(dataSet.data.filter((d: any) => d.y !== null)) + .data(dataSet.data) .enter() .append("circle") .attr("cx", (d: any) => { @@ -456,7 +456,7 @@ export const D3LineDiagram: FunctionComponent = ( if (observationProps.enableArea) { svgElement .append("path") - .datum(dataSet.data.filter((d: any) => d.y !== null) as any) + .datum(dataSet.data as any) .attr("fill", colors[index]) .attr( "fill-opacity", @@ -490,10 +490,7 @@ export const D3LineDiagram: FunctionComponent = ( "stroke-width", observationProps.lineWidth ? observationProps.lineWidth : 2 ) - .attr( - "d", - lineGenerator(dataSet.data.filter((d: any) => d.y !== null) as any) - ); + .attr("d", lineGenerator(dataSet.data as any)); }); // Markers. diff --git a/skins/weewx-wdc/src/js/index.tsx b/skins/weewx-wdc/src/js/index.tsx index 28f005e..f951198 100644 --- a/skins/weewx-wdc/src/js/index.tsx +++ b/skins/weewx-wdc/src/js/index.tsx @@ -128,6 +128,8 @@ diagrams.forEach((diagram) => { diagram.dataset.value.replace(/'/g, '"') ); + // Filter out null values. + // @see https://groups.google.com/g/weewx-development/c/frA0Vc9Ku9Q series.forEach((serie, index) => { data = [ ...data,