Skip to content

Commit

Permalink
Merge pull request #835 from Abhinandan-Kushwaha/development
Browse files Browse the repository at this point in the history
v1.4.38 fixed misaligned line in Bar for -ve values
  • Loading branch information
Abhinandan-Kushwaha authored Sep 13, 2024
2 parents 492977f + eaf2436 commit 3088160
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-gifted-charts",
"version": "1.4.37",
"version": "1.4.38",
"description": "The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar and Population Pyramid charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
"main": "dist/index.js",
"files": [
Expand Down
14 changes: 12 additions & 2 deletions release-notes/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 🎉 1.4.38

Fixed the issue- "Line chart inside Bar chart misaligned if data contains -ve values"

---

---

---

# 🎉 1.4.37

### 🐛 Bug fixes
Expand Down Expand Up @@ -27,7 +37,7 @@ Fixed the issue- "secondary Y-axis offset is not getting considered in the Line
## ✨ Features added-

1. Added support for secondary Bars using the property `isSecondary: true` inside the objects of data array. Available in both Bar and Stacked bar charts. See https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/discussions/828 <br />
Also, **removed** the redundant `secondaryData` prop from Bar charts.
Also, **removed** the redundant `secondaryData` prop from Bar charts.

2. Auto-compute the params for the secondary Y-axis based on the secondary data range. Applicable for both Bar and Line/Area charts.

Expand All @@ -44,7 +54,7 @@ These features were implemented with a considerable amount of refactor which I h
## ✨ Features added-

1. Added the prop `extrapolateMissingValues` to Line and Area charts to enable/disable the extrapolation of nullish values at the start and end of the chart. The default value of `extrapolateMissingValues` is true. <br />
Note that extrapolation will not work if `interpolateMissingValues` is set to false. Extrapolation works only if interpolation is enabled. See https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/821
Note that extrapolation will not work if `interpolateMissingValues` is set to false. Extrapolation works only if interpolation is enabled. See https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/821

2. Added the feature to auto scale the Y-axis and auto compute the value of `roundToDigits` based on the range of values in the data or dataSet. See https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/825

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const RenderLineInBarChart = (props: LineInBarChartPropsType) => {
spacing,
containerHeight,
maxValue,
yAxisOffset
yAxisOffset,
};

const renderAnimatedLine = () => {
Expand All @@ -73,7 +73,7 @@ const RenderLineInBarChart = (props: LineInBarChartPropsType) => {
pointerEvents="none"
style={{
position: 'absolute',
height: containerHeight + 10,
height: containerHeightIncludingBelowXAxis + labelsExtraHeight,
left: 6 - yAxisLabelWidth,
bottom: 50 + xAxisLabelsVerticalShift, //stepHeight * -0.5 + xAxisThickness,
width: animatedWidth,
Expand Down

0 comments on commit 3088160

Please sign in to comment.