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
+11 -11
View File
@@ -3,20 +3,16 @@ import PropTypes from 'prop-types'
import { Shape } from 'react-native/Libraries/ART/ReactNativeART'
import styles from './styles'
import { Colors } from '../../styles/redesign'
import { CHART_STROKE_WIDTH, CHART_GRID_LINE_HORIZONTAL_WIDTH } from '../../config'
const ChartLine = ({ path, isNfpLine = false }) => {
const strokeStyle =
isNfpLine ? styles.nfpLine.stroke : styles.column.stroke.color
const strokeWidth =
isNfpLine ? styles.nfpLine.strokeWidth : styles.column.stroke.width
const ChartLine = ({ path, isNfpLine }) => {
const color = isNfpLine ? Colors.orange : Colors.grey
const width = isNfpLine
? CHART_STROKE_WIDTH : CHART_GRID_LINE_HORIZONTAL_WIDTH
return (
<Shape
stroke={strokeStyle}
strokeWidth={strokeWidth}
d={path}
/>
<Shape d={path} stroke={color} strokeWidth={width} />
)
}
@@ -25,4 +21,8 @@ ChartLine.propTypes = {
isNfpLine: PropTypes.bool,
}
ChartLine.defaultProps = {
isNfpLine: false
}
export default ChartLine