Releases: Abhinandan-Kushwaha/react-native-gifted-charts
v1.4.49
🎉 1.4.49
✨ Features added-
- Added the prop
renderDataPointsAfterAnimationEnds
to Line/Area charts to render the data points after the animation has ended. This flag can be helpful ifonPress
does not work in case of multi-line animated charts. See #921
🐛 Bug fixes
- Fixed the issue- "getPointerProps starts from 0 index, regardless of where you press and drag on the LineChart". See #937
- Fixed the issue- "Unable to use multi onPress in LineChart". See #921 and #570
- Fixed the issue- "LineChart 1st data point does not show pointer label if initialSpacing={0}". See #925
🔨 Refactor
Made the value
property of data items optional for Bar and Line/Area charts. Added null safety types for internal calculations, while the <BarChart>
and <LineChart>
components exposed by the library will be capable of accepting null/undefined values as data items, internally it will be conerted to respective nullSafe type after handling the null values (by interpolatio or replacing with 0).
Below are the exposed types and their corresponding null afe types-
Chart Type | Type of data prop |
Corresponding null safe type |
---|---|---|
BarChart | barDataItem[] | barDataItemNullSafe[] |
LineChart | lineDataItem[] | lineDataItemNullSafe[] |
LineChart with dataSet |
DataSet[] | DataSetNullSafe[] |
This refactor fixes the below type-related issues-
v1.4.48
🎉 1.4.48 Major Release
✨ Features added-
- Added support for
barMarginBottom
to stacked bar charts. See #126 (comment) - Added the prop
customBackground
to Bar, Line, Area charts.customBackground
is an object with following keys (All of which are optional). See #790
CustomBackground
type CustomBackground = {
color?: ColorValue
component?: Function
horizontalShift?: number
verticalShift?: number
height?: number
width?: number
widthAdjustment?: number
}
- Added the props-
focusTogether
andfocusProximity
to Line and Area charts to control the focus behaviour. See #910 - BarChart lineConfig with strokeDashArray support. See #927
- Added the property
resetPointerIndexOnRelease
insidepointerConfig
to set pointerIndex to -1 upon releasing the pointer. Default value isfalse
. See #854 - Added the property
activatePointersInstantlyOnTouch
insidepointerConfig
whose default value istrue
. When set to false, the pointer will be activated not instantly after touch, but on dragging after touch. See #934
🐛 Bug fixes
- Fixed the issue-
barMarginBottom
not working for Bar charts. - Fixed issue with X-axis label position in stacked bar charts with negative values.
- Some fix about vertical lines in Line charts.
- Fixed the issue- "LineChart - Strip and Points not showing beyond x index 0 for DataSet". See #911
- Fixed the issue- "hidePointer doesn't work". See #932
- Fixed the issue- "Custom Data Point in wrong position with non-uniform spacing on data in LineChart" Seehttps://github.com//issues/923
- Fixed the issue- "extrapolateMissingValues not working with dataSet". See #916
- Fixed the issue- "The first property setting of BarChart/LineChart RulesConfigArray does not take effect". See #893
- Fixed the issue- "areaChart2, areaChart3, areaChart4... props not working". See #892
- Fixed the issue- "overflowTop parameter behaviour & verticalLinesHeight". See #884
- Fixed the issue- "Text formatting for labels not working for the focused Pie". See #886
- Fixed the issue- "PieChart focused Pie label styling does not work properly". See #886
- Fixed the issue- "Custom data points are not shown on web". See #889
v1.4.47
🎉 1.4.47
✨ Features added-
- Added the properties
hidePointerForMissingValues
andhidePointerDataPointForMissingValues
to the PointerConfig object. In case there are data items with missing/undefined/null values the library interpolates those values. But if you don't want the pointer to be displayed for such values, you can set thehidePointerForMissingValues
property to true. Its default value is false. WhenhidePointerForMissingValues
is set to true,hidePointerDataPointForMissingValues
automatically becomes true, unless otherwise specified. See #881
🐛 Bug fixes
- The vertical strips shown by using the
showStrip
property were always shown over the data points, but now they will be shown beneath the data points. This behaviour can be reversed by using thestripOverDataPoints
prop.
v1.4.46
v1.4.45
🎉 1.4.45
✨ Features added-
- Added the property
horizontalStripConfig
inside thepointerConfig
to create crosshair effect.
🐛 Bug fixes
- Fixed the issue- "PieChart is not displayed if there is a huge difference between several values". See #874
- Fixed the issue- "App crashes when extrapolateMissingValue is set to false and only the last value is defined". See #871
- Fixed the issue- Population pyramid chart with a mid axis has misaligned X-axis labels.
- Fixed the issue- Line chart's line is misaligned if dataPointsRadius is large.
v1.4.44
🎉 1.4.44
✨ Features added-
- Added support for different spacing for each line in Line/Area charts. Added the props
spacing1
,spacing2
,spacing3
... See #858 - Added support for different spacing for each data point in a line in Line/Area charts. Added the
spacing
property inside the objects of thedata
anddataSet
arrays. - Added the tooltip feature in Pie/Donut charts using the
showTooltip
prop.
🐛 Bug fixes
v1.4.43
🎉 1.4.43
- Added
onLeftPress
andonRightPress
props to Population charts. See #855 - Fix BarChart crash when maxValue is 0. Thanks to sakisdog for the PR- Abhinandan-Kushwaha/gifted-charts-core#55
v1.4.42
🎉 1.4.42
✨ Features added-
- Added 185 screenshot tests to avoid regressions and make the library pixel perfect. See https://abhinandan-kushwaha.github.io/TestingCharts/ss-test/test.html
- Added animation to bar charts when the width of bar changes, earlier animation worked only on height change.
🐛 Bug fixes
- Fixed the issue- Crash on passing empty data to Bar charts. See #851
- Fixed the issue- Line & area charts with
pointerConfig
blink whenanimateOnDataChange
is true. See #849 - Fixed the issue-
animateOnDataChange
does not work when yAxisOffset is set. See #853 - Fixed the issue- Right side y-Axis not working in
<LineChartBiColor>
. See #847 - Fixed all issues with yAxisSide='right' and secondary Y-axis alignment. Wrote thorough screenshot tests relates to Axes and labels.
v1.4.41
v1.4.40
🎉 1.4.40
✨ Features added-
Added the properties dynamicLegendComponent
and dynamicLegendContainerStyle
inside the pointerConfig object.
dynamicLegendComponent is a property inside the pointerConfig prop, very similar to pointerLabelComponent
, the only difference is that it is stationary whereas pointerLabelComponent moves as the pointer moves. You can set the position of the dynamicLegendComponent using the dynamicLegendContainerStyle
property inside pointerConfig
You are supposed to assign a callback function to dynamicLegendComponent. The callback function receives 2 parameters-
- Array of currently selected items (in case you are rendering a single line, the array will have a single item)
- Index of the selected item.
Note: The legend component appears only as long as the pointer remains remains on the screen. To make the dynamic legend remain persistently on the screen, you can set thepersistPointer
property to true. TheinitialPointerIndex
property can also be useful.
🐛 Bug fixes
-
Fixed the issue-
autoShiftLabels
not working properly. See https://gifted-charts.web.app/barchart/#xAxisShift -
Fixed the issue- "Bar alignment issue when using the
labelsExtraHeight
prop." See #839