@chainplatform/charts 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/LineChart.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainplatform/charts",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Reusable React Native charts for Chain Platform.",
5
5
  "main": "src/index.js",
6
6
  "devDependencies": {
package/src/LineChart.js CHANGED
@@ -31,7 +31,7 @@ class LineChart extends PureComponent {
31
31
  };
32
32
 
33
33
  render() {
34
- const { enableTooltip, data, width, height, strokeColor, strokeWidth, showDots, dotRadius, touchRadius, paddingHorizontal, paddingVertical, backgroundColor } = this.props;
34
+ const { enableTooltip, data, width, height, fillColor, strokeColor, strokeWidth, showDots, dotRadius, touchRadius, paddingHorizontal, paddingVertical, backgroundColor } = this.props;
35
35
  const { tooltip } = this.state;
36
36
 
37
37
  if (!data?.length) return null;
@@ -66,7 +66,7 @@ class LineChart extends PureComponent {
66
66
 
67
67
  {points.map((point, index) => (
68
68
  <React.Fragment key={`point-${index}`}>
69
- {showDots && <Circle cx={point.x} cy={point.y} r={dotRadius} fill="#fff" stroke={strokeColor} strokeWidth={setSize(2)} />}
69
+ {showDots && <Circle cx={point.x} cy={point.y} r={dotRadius} fill={fillColor} stroke={strokeColor} strokeWidth={setSize(2)} />}
70
70
  <Circle
71
71
  cx={point.x}
72
72
  cy={point.y}
@@ -93,6 +93,7 @@ LineChart.propTypes = {
93
93
  width: PropTypes.number,
94
94
  height: PropTypes.number,
95
95
  strokeColor: PropTypes.string,
96
+ fillColor: PropTypes.string,
96
97
  strokeWidth: PropTypes.number,
97
98
  showDots: PropTypes.bool,
98
99
  dotRadius: PropTypes.number,
@@ -108,6 +109,7 @@ LineChart.defaultProps = {
108
109
  width: setSize(160),
109
110
  height: setSize(60),
110
111
  strokeColor: '#5B7CFA',
112
+ fillColor: '#FFFFFF',
111
113
  strokeWidth: setSize(2),
112
114
  showDots: true,
113
115
  dotRadius: setSize(3),