Skip to content

Commit

Permalink
Merge pull request #166 from PublicHealthEngland/development
Browse files Browse the repository at this point in the history
New feature and essential updates

No conflict detected.
  • Loading branch information
xenatisch authored May 14, 2020
2 parents 1bf62b7 + d3714df commit 6c48579
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "covid-public",
"version": "1.6.1",
"version": "1.6.2",
"private": true,
"homepage": "https://coronavirus.data.gov.uk/",
"dependencies": {
Expand Down
22 changes: 11 additions & 11 deletions src/components/BarChart/BarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ const BarChart: ComponentType<Props> = ({ header, tooltipText, data }: Props) =>
labels: dataSorted.map(d => d.date),
datasets: [
// REMOVED PENDING FORMAL RELEASE
// {
// label: "Rolling average",
// data: movingAverage(dataSorted.map(d => d.value), 7),
// type: 'line',
// fill: false,
// borderColor: "#323d13",
// backgroundColor: "#323d13",
// borderWidth: 2,
// order: 0,
// pointHoverRadius: 0
// },
{
label: "Rolling average",
data: movingAverage(dataSorted.map(d => d.value), 7),
type: 'line',
fill: false,
borderColor: "#323d13",
backgroundColor: "#323d13",
borderWidth: 2,
order: 0,
pointHoverRadius: 0
},
{
label: "Daily deaths",
backgroundColor: '#62a3b3',
Expand Down
30 changes: 15 additions & 15 deletions src/components/StackedBarChart/StackedBarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ const getBarChartData = ({ previous, change }) => {
labels: previousSorted.map(d => d.date),
datasets: [
// REMOVE PENDING FORMAL RELEASE
// {
// label: "Rolling average of the total",
// data: [
// NaN, NaN, NaN, NaN, NaN, NaN,
// ...movingAverage(sum, 7).slice(3, -3),
// NaN, NaN, NaN
// ],
// type: 'line',
// fill: false,
// borderColor: "#323d13",
// backgroundColor: "#323d13",
// borderWidth: 2,
// order: 0,
// pointHoverRadius: 0
// },
{
label: "Rolling average of the total",
data: [
NaN, NaN, NaN, NaN, NaN, NaN,
...movingAverage(sum, 7).slice(3, -3),
NaN, NaN, NaN
],
type: 'line',
fill: false,
borderColor: "#323d13",
backgroundColor: "#323d13",
borderWidth: 2,
order: 0,
pointHoverRadius: 0
},
{
label: "Previously reported",
backgroundColor: '#62a3b3',
Expand Down
5 changes: 5 additions & 0 deletions src/pages/About/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import URLs from "common/urls";

import type { AboutProps, AboutState } from './About.types';
import * as Styles from './About.styles';
import { win } from "leaflet/src/core/Browser";



Expand Down Expand Up @@ -47,6 +48,10 @@ export default class About extends Component<AboutProps, {}> {

this.setState({ loading: true }, this.getData)

// ToDo: This should be done for every page in the "app.js".
const base = document.querySelector("head>base");
base.href = document.location.pathname;

} // componentDidMount

display() {
Expand Down
4 changes: 4 additions & 0 deletions src/pages/Accessibility/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default class Accessibility extends Component<AccessibilityProps, {}> {

this.setState({ loading: true }, this.getData)

// ToDo: This should be done for every page in the "app.js".
const base = document.querySelector("head>base");
base.href = document.location.pathname;

} // componentDidMount

display() {
Expand Down
4 changes: 4 additions & 0 deletions src/pages/Archive/Archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ export default class Archive extends Component<ArchiveProps, {}> {

this.setState({loading: true}, this.getData)

// ToDo: This should be done for every page in the "app.js".
const base = document.querySelector("head>base");
base.href = document.location.pathname;

} // componentDidMount

display() {
Expand Down
4 changes: 4 additions & 0 deletions src/pages/Cookies/Cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const setCookies = () => {
const Cookies: ComponentType<Props> = ({ }: Props) => {
const [cookieState, setCookieState] = useState('unset');

// ToDo: This should be done for every page in the "app.js".
const base = document.querySelector("head>base");
base.href = document.location.pathname;

const handleAccept = () => {
const
today = new Date(),
Expand Down
4 changes: 4 additions & 0 deletions src/pages/MobileRegionTable/MobileRegionTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import * as Styles from './MobileRegionTable.styles';
const MobileRegionTable: ComponentType<Props> = ({ ...props }: Props) => {
const data = useLoadData();

// ToDo: This should be done for every page in the "app.js".
const base = document.querySelector("head>base");
base.href = document.location.pathname;

if ( !data ) return <MainLoading/>;

return (
Expand Down

0 comments on commit 6c48579

Please sign in to comment.