Skip to content

Commit

Permalink
experimenting with colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Proladge committed Apr 21, 2020
1 parent c03fa19 commit e443e4c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions server/src/services/domain/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CountrySituationInfo } from '../../models/covid19.models';
import { Status } from '../../models/constants';
export const Transform = (situations: CountrySituationInfo[]): ChartModel => {
const days = situations.map((x) => x.date);
// return config as ChartModelExtended;
return {
type: 'line',
data: {
Expand All @@ -12,22 +13,22 @@ export const Transform = (situations: CountrySituationInfo[]): ChartModel => {
label: Status.Confirmed,
data: situations.map((x) => x.confirmed),
fill: false,
borderColor: 'blue',
backgroundColor: '#f3a16c',
borderColor: 'rgb(230, 165, 96)',
backgroundColor: 'rgb(230, 165, 96)',
},
{
label: Status.Deaths,
data: situations.map((x) => x.deaths),
fill: false,
borderColor: '#de425b',
backgroundColor: '#de425b',
borderColor: 'rgb(222, 66, 91)',
backgroundColor: 'rgb(222, 66, 91)',
},
{
label: Status.Recovered,
data: situations.map((x) => x.recovered),
fill: false,
borderColor: '#488f31',
backgroundColor: '#488f31',
borderColor: 'rgb(62, 148, 107)',
backgroundColor: 'rgb(62, 148, 107)',
},
],
},
Expand All @@ -46,8 +47,9 @@ export const enrichWithTitle = (
title: {
display: true,
text: title,
fontColor: 'hotpink',
fontSize: 32,
fontColor: 'dark',
fontFamily: 'Helvetica',
fontSize: 28,
},
},
};
Expand Down

0 comments on commit e443e4c

Please sign in to comment.