changes y-ticks and labels, cycle day display and colors of symbols

This commit is contained in:
tina
2018-09-03 20:21:05 +02:00
parent dd380cf9ba
commit 4d5658119a
5 changed files with 62 additions and 27 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ import React, { Component } from 'react'
import { CalendarList } from 'react-native-calendars'
import { getOrCreateCycleDay, bleedingDaysSortedByDate } from '../db'
import cycleModule from '../lib/cycle'
import {shadesOfRed, shadesOfGrey} from '../styles/index'
export default class CalendarView extends Component {
constructor(props) {
@@ -53,7 +54,7 @@ export default class CalendarView extends Component {
}
function toCalFormat(bleedingDaysSortedByDate) {
const shadesOfRed = ['#ffbaba', '#ff7b7b', '#ff5252', '#ff0000']
//const shadesOfRed = ['#ffbaba', '#ff7b7b', '#ff5252', '#ff0000']
return bleedingDaysSortedByDate.reduce((acc, day) => {
acc[day.date] = {
startingDay: true,
@@ -66,7 +67,7 @@ function toCalFormat(bleedingDaysSortedByDate) {
function predictionToCalFormat(predictedDays) {
if (!predictedDays.length) return {}
const shadesOfGrey = ['#e5e5e5', '#cccccc'] // [lighter, darker]
//const shadesOfGrey = ['#e5e5e5', '#cccccc'] // [lighter, darker]
const middleIndex = (predictedDays[0].length - 1) / 2
return predictedDays.reduce((acc, setOfDays) => {
setOfDays.reduce((accSet, day, i) => {