Redesign chart

This commit is contained in:
Maria Zadnepryanets
2020-08-01 11:37:20 +00:00
committed by Sofiya Tepikin
parent 550b1e6314
commit ef16cfd041
27 changed files with 718 additions and 575 deletions
+10 -4
View File
@@ -1,12 +1,12 @@
import React from 'react'
import PropTypes from 'prop-types'
import { View } from 'react-native'
import { StyleSheet, View } from 'react-native'
import SymptomIcon from './symptom-icon'
import TickList from './tick-list'
import ChartLegend from './chart-legend'
import styles from './styles'
import { CHART_YAXIS_WIDTH } from '../../config'
const YAxis = ({
height,
@@ -19,6 +19,8 @@ const YAxis = ({
return (
<View>
{shouldShowTemperatureColumn && <TickList height={height} />}
<ChartLegend height={xAxisHeight} />
<View style={[styles.yAxis, {height: symptomsSectionHeight}]}>
{symptomsToDisplay.map(symptom => (
<SymptomIcon
@@ -29,8 +31,6 @@ const YAxis = ({
)
)}
</View>
{shouldShowTemperatureColumn && <TickList height={height} />}
<ChartLegend xAxisHeight={xAxisHeight} />
</View>
)
}
@@ -43,4 +43,10 @@ YAxis.propTypes = {
xAxisHeight: PropTypes.number.isRequired
}
const styles = StyleSheet.create({
yAxis: {
width: CHART_YAXIS_WIDTH
}
})
export default YAxis