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

Make columnsize a bit smaller and style y axis

parent 92ac6525
No related branches found
No related tags found
No related merge requests found
const config = {
chartHeight: 350,
columnWidth: 30,
columnWidth: 25,
temperatureScale: {
low: 35,
high: 38
high: 38,
units: 0.1
}
}
......
......@@ -104,7 +104,7 @@ export default class DayColumn extends Component {
onPress: () => {
this.passDateToDayView(dateString)
},
activeOpacity: 0.8
activeOpacity: 1
},
columnElements
)
......
......@@ -72,10 +72,10 @@ const styles = {
},
yAxisLabel: {
position: 'absolute',
right: 3,
left: 3,
color: 'grey',
fontSize: 12,
fontWeight: 'bold'
fontSize: 11,
textAlign: 'left'
},
horizontalGrid: {
position:'absolute',
......
......@@ -4,9 +4,10 @@ import config from './config'
import styles from './styles'
function makeYAxis() {
const scaleMin = config.temperatureScale.low
const scaleMax = config.temperatureScale.high
const numberOfTicks = (scaleMax - scaleMin) * 2
const scale = config.temperatureScale
const scaleMin = scale.low
const scaleMax = scale.high
const numberOfTicks = (scaleMax - scaleMin) * (1 / scale.units)
const tickDistance = config.chartHeight / numberOfTicks
const tickPositions = []
......@@ -23,7 +24,7 @@ function makeYAxis() {
<Text
style={{...style}}
key={i}>
{scaleMax - i * 0.5}
{scaleMax - i * scale.units}
</Text>
)
tickPositions.push(y)
......
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