Skip to content
Snippets Groups Projects
Commit cc4c1e8e authored by tina's avatar tina
Browse files

removes 0.2 units as this introduces buggy behaviour in ticks, changes line styles

parent 1e81cd82
No related branches found
No related tags found
No related merge requests found
...@@ -82,20 +82,19 @@ export default class DayColumn extends Component { ...@@ -82,20 +82,19 @@ export default class DayColumn extends Component {
// we merge the colors here instead of from the stylesheet because of a RN // we merge the colors here instead of from the stylesheet because of a RN
// bug that doesn't apply borderLeftColor otherwise // bug that doesn't apply borderLeftColor otherwise
const customStyle = { const potentialCustomStyle = {
height: columnHeight, height: columnHeight,
borderLeftColor: 'grey', borderLeftColor: 'grey',
borderRightColor: 'grey'
} }
if (drawFhmLine) { if (drawFhmLine) {
customStyle.borderLeftColor = styles.nfpLine.borderColor potentialCustomStyle.borderLeftColor = styles.nfpLine.borderColor
customStyle.borderLeftWidth = 3 potentialCustomStyle.borderLeftWidth = 3
} }
const column = React.createElement( const column = React.createElement(
TouchableOpacity, TouchableOpacity,
{ {
style: [styles.column.rect, customStyle], style: [styles.column.rect, potentialCustomStyle],
key: this.props.index.toString(), key: this.props.index.toString(),
onPress: () => { onPress: () => {
this.passDateToDayView(dateString) this.passDateToDayView(dateString)
......
...@@ -46,7 +46,7 @@ const styles = { ...@@ -46,7 +46,7 @@ const styles = {
rect: { rect: {
width: config.columnWidth, width: config.columnWidth,
borderStyle: 'solid', borderStyle: 'solid',
borderRightWidth: 0.25, borderLeftWidth: 0.5,
} }
}, },
bleedingIcon: { bleedingIcon: {
...@@ -69,7 +69,7 @@ const styles = { ...@@ -69,7 +69,7 @@ const styles = {
'#feb47b' '#feb47b'
], ],
yAxis: { yAxis: {
width: config.columnWidth, width: 27,//config.columnWidth,
borderRightWidth: 0.5, borderRightWidth: 0.5,
borderColor: 'lightgrey', borderColor: 'lightgrey',
borderStyle: 'solid' borderStyle: 'solid'
...@@ -84,7 +84,7 @@ const styles = { ...@@ -84,7 +84,7 @@ const styles = {
horizontalGrid: { horizontalGrid: {
position:'absolute', position:'absolute',
borderColor: 'lightgrey', borderColor: 'lightgrey',
borderTopWidth: 0.25, borderWidth: 0.5,
width: '100%', width: '100%',
borderStyle: 'solid', borderStyle: 'solid',
left: config.columnWidth left: config.columnWidth
......
...@@ -15,8 +15,15 @@ export function makeYAxisLabels(columnHeight) { ...@@ -15,8 +15,15 @@ export function makeYAxisLabels(columnHeight) {
// to reliably place the label vertically centered to the grid // to reliably place the label vertically centered to the grid
const tick = scaleMax - i * units const tick = scaleMax - i * units
const tickLabel = tick * 10 % 10 ? tick.toString() : tick.toString() + '.0' const tickLabel = tick * 10 % 10 ? tick.toString() : tick.toString() + '.0'
const showTick = (tick * 10 % 2) ? false : true let showTick
const tickBold = tick * 10 % 5 ? {} : {fontWeight: 'bold'} let tickBold
if (units === 0.1) {
showTick = (tick * 10 % 2) ? false : true
tickBold = tick * 10 % 5 ? {} : {fontWeight: 'bold'}
} else {
showTick = (tick * 10 % 5) ? false : true
tickBold = tick * 10 % 10 ? {} : {fontWeight: 'bold'}
}
return ( return (
<Text <Text
style={[style, {top: y - 8}, tickBold]} style={[style, {top: y - 8}, tickBold]}
......
...@@ -14,8 +14,6 @@ scaleObservable((scale) => { ...@@ -14,8 +14,6 @@ scaleObservable((scale) => {
const scaleRange = scale.max - scale.min const scaleRange = scale.max - scale.min
if (scaleRange <= 3) { if (scaleRange <= 3) {
unitObservable.set(0.1) unitObservable.set(0.1)
} else if (scaleRange <= 5) {
unitObservable.set(0.2)
} else { } else {
unitObservable.set(0.5) unitObservable.set(0.5)
} }
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
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