Skip to content
Snippets Groups Projects
Commit 1ccc3636 authored by Julia Friesel's avatar Julia Friesel
Browse files

Re-add fhm line

parent c43bc417
No related branches found
No related tags found
No related merge requests found
...@@ -10,21 +10,6 @@ import config from './config' ...@@ -10,21 +10,6 @@ import config from './config'
const yAxisView = <View {...styles.yAxis}>{yAxis.labels}</View> const yAxisView = <View {...styles.yAxis}>{yAxis.labels}</View>
function getInfoForNeighborColumns(index, cols) {
const ret = {}
const right = index > 0 ? cols[index - 1] : undefined
const left = index < cols.length - 1 ? cols[index + 1] : undefined
if (right && right.y) {
ret.rightY = right.y
ret.rightTemperatureExclude = right.temperatureExclude
}
if (left && left.y) {
ret.leftY = left.y
ret.leftTemperatureExclude = left.temperatureExclude
}
return ret
}
export default class CycleChart extends Component { export default class CycleChart extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -109,4 +94,19 @@ function getPreviousDays(n) { ...@@ -109,4 +94,19 @@ function getPreviousDays(n) {
const earlierDate = new Date(today - (range.DAY * n)) const earlierDate = new Date(today - (range.DAY * n))
return range(earlierDate, today).reverse() return range(earlierDate, today).reverse()
}
function getInfoForNeighborColumns(index, cols) {
const ret = {}
const right = index > 0 ? cols[index - 1] : undefined
const left = index < cols.length - 1 ? cols[index + 1] : undefined
if (right && right.y) {
ret.rightY = right.y
ret.rightTemperatureExclude = right.temperatureExclude
}
if (left && left.y) {
ret.leftY = left.y
ret.leftTemperatureExclude = left.temperatureExclude
}
return ret
} }
\ No newline at end of file
...@@ -3,7 +3,7 @@ const config = { ...@@ -3,7 +3,7 @@ const config = {
columnWidth: 30, columnWidth: 30,
temperatureScale: { temperatureScale: {
low: 35, low: 35,
high: 40 high: 38
}, },
xAxisRangeInDays: 1000 xAxisRangeInDays: 1000
} }
......
...@@ -9,7 +9,7 @@ import { getOrCreateCycleDay } from '../../db' ...@@ -9,7 +9,7 @@ import { getOrCreateCycleDay } from '../../db'
import cycleModule from '../../lib/cycle' import cycleModule from '../../lib/cycle'
import setUpFertilityStatusFunc from './nfp-lines' import setUpFertilityStatusFunc from './nfp-lines'
import { horizontalGrid } from './y-axis' import { horizontalGrid } from './y-axis'
//import slowlog from 'react-native-slowlog' // import slowlog from 'react-native-slowlog'
const getCycleDayNumber = cycleModule().getCycleDayNumber const getCycleDayNumber = cycleModule().getCycleDayNumber
const label = styles.column.label const label = styles.column.label
...@@ -18,7 +18,7 @@ const getFhmAndLtlInfo = setUpFertilityStatusFunc() ...@@ -18,7 +18,7 @@ const getFhmAndLtlInfo = setUpFertilityStatusFunc()
export default class DayColumn extends Component { export default class DayColumn extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
//slowlog(this, /.*/, {threshold: 30}) // slowlog(this, /.*/, {threshold: 30})
} }
makeDayColumn(data, index) { makeDayColumn(data, index) {
const { const {
...@@ -58,22 +58,18 @@ export default class DayColumn extends Component { ...@@ -58,22 +58,18 @@ export default class DayColumn extends Component {
) )
} }
columnElements.push(cycleDayLabel, dateLabel, horizontalGrid) columnElements.push(cycleDayLabel, dateLabel, horizontalGrid)
// {nfpLineInfo.drawFhmLine ?
// <Line
// x1={0 + styles.nfpLine.strokeWidth / 2}
// y1="20"
// x2={0 + styles.nfpLine.strokeWidth / 2}
// y2={config.chartHeight - 20}
// {...styles.nfpLine}
// /> : null}
// />)
// <Path {...styles.bleedingIcon} if(nfpLineInfo.drawFhmLine) {
// d="M15 3 console.log('jappens')
// Q16.5 6.8 25 18 const fhmLine = (<View
// A12.8 12.8 0 1 1 5 18 position = 'absolute'
// Q13.5 6.8 15 3z" /> top={100}
// : null} width={styles.nfpLine.strokeWidth}
height={200}
{...styles.nfpLine}
/>)
columnElements.push(fhmLine)
}
// {nfpLineInfo.drawLtlAt ? // {nfpLineInfo.drawLtlAt ?
// <Line // <Line
...@@ -105,8 +101,7 @@ export default class DayColumn extends Component { ...@@ -105,8 +101,7 @@ export default class DayColumn extends Component {
onPress: () => { onPress: () => {
this.passDateToDayView(dateString) this.passDateToDayView(dateString)
}, },
activeOpacity: 0., activeOpacity: 0.8
}, },
columnElements columnElements
) )
......
...@@ -82,7 +82,7 @@ const styles = { ...@@ -82,7 +82,7 @@ const styles = {
borderStyle: 'solid' borderStyle: 'solid'
}, },
nfpLine: { nfpLine: {
stroke: '#00b159', backgroundColor: '#00b159',
strokeWidth: 3 strokeWidth: 3
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment