Extract styles and move vertical line a bit so it's completely visible

This commit is contained in:
Julia Friesel
2018-07-19 07:29:54 +02:00
parent 955207ed8d
commit 4b5f4f905a
2 changed files with 10 additions and 6 deletions
+6 -6
View File
@@ -72,14 +72,15 @@ export default class CycleChart extends Component {
<Rect {...styles.column.rect} /> <Rect {...styles.column.rect} />
{nfpLineInfo.drawFhmLine ? {nfpLineInfo.drawFhmLine ?
<Line <Line
x1="0" x1={0 + styles.nfpLine.strokeWidth / 2}
y1="20" y1="20"
x2="0" x2={0 + styles.nfpLine.strokeWidth / 2}
y2={config.chartHeight - 20} y2={config.chartHeight - 20}
stroke="orange" {...styles.nfpLine}
strokeWidth="5"
/> : null} /> : null}
{this.placeHorizontalGrid()} {this.placeHorizontalGrid()}
<Text {...label.number} y={config.cycleDayNumberRowY}>{cycleDayNumber}</Text> <Text {...label.number} y={config.cycleDayNumberRowY}>{cycleDayNumber}</Text>
<Text {...label.date} y={config.dateRowY}>{dateLabel}</Text> <Text {...label.date} y={config.dateRowY}>{dateLabel}</Text>
@@ -97,8 +98,7 @@ export default class CycleChart extends Component {
y1={nfpLineInfo.drawLtlAt} y1={nfpLineInfo.drawLtlAt}
x2={config.columnWidth} x2={config.columnWidth}
y2={nfpLineInfo.drawLtlAt} y2={nfpLineInfo.drawLtlAt}
stroke="orange" {...styles.nfpLine}
strokeWidth="3"
/> : null} /> : null}
{y ? this.drawDotAndLines(y, cycleDay.temperature.exclude, index) : null} {y ? this.drawDotAndLines(y, cycleDay.temperature.exclude, index) : null}
+4
View File
@@ -62,6 +62,10 @@ const styles = {
horizontalGrid: { horizontalGrid: {
stroke: 'lightgrey', stroke: 'lightgrey',
strokeWidth: 1 strokeWidth: 1
},
nfpLine: {
stroke: '#00b159',
strokeWidth: 3
} }
} }