Redesign chart
This commit is contained in:
committed by
Sofiya Tepikin
parent
550b1e6314
commit
ef16cfd041
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user