-
Fixed the issue- "pointerConfig and pointerLabelComponent doesn't work properly with Stacked Bar Chart".
Thanks to Anna Conti for her PR - Abhinandan-Kushwaha#1123
See Abhinandan-Kushwaha#1117 -
Fixed the issue- "
trimYAxisAtTopnot working for LineChartBicolor. See Abhinandan-Kushwaha#1125 -
Added
yAxisExtraHeightAtTopto LineChartBiColor (earlier it was available only to Bar and Line charts).
Added types to style related props. Thanks to Seyed Mostafa Hasani for his PRs-
- Abhinandan-Kushwaha/gifted-charts-core#87
- Abhinandan-Kushwaha/gifted-charts-core#89
- Abhinandan-Kushwaha#1119
- Added support for spread (or ranged) area chart using the props
spreadAreaData,spreadAreaColorandspreadAreaOpacity. Thanks to Sadat Taseen for his PR - Abhinandan-Kushwaha#1104
See Abhinandan-Kushwaha#1093
See this Stackoverflow question- https://stackoverflow.com/questions/65683564/fusioncharts-area-range-graph-with-line
-
Fixed the issue-
endIndexstartIndexnot working properly for area chart gradient.
Thanks to Anna Conti for her PR - Abhinandan-Kushwaha#1110
See Abhinandan-Kushwaha#1105 -
Added uniqueId for LineChart area gradient to fix issue in web - multiple color gradients.
Thanks to Anna Conti for her PR - Abhinandan-Kushwaha#1108 -
Removed background pattern margin (of 1 px).
Thanks to Christoph for his PR - Abhinandan-Kushwaha#1113 -
Changed the default value of
labelsPositionOffsetfrom 5 to 0 (in gifted-charts-core), to fix the issue - "RadarChart labels don't work on small numbers".
See Abhinandan-Kushwaha#1094
Added support for multi-focus and multi-highlight in Bar charts. focusedBarIndex and highlightedBarIndex now accept number as well as array of numbers. This allows multiple bars to be focused or highlighted at the same time.
See- Abhinandan-Kushwaha#1083
Tons of thanks to Shubham Pawar for his PRs- Abhinandan-Kushwaha#1084 and Abhinandan-Kushwaha/gifted-charts-core#83
-
Added the prop
onScrollEndDragto Bar (and stacked bar), Line and Area charts. Thanks to Shubham Pawar for his PR Abhinandan-Kushwaha#1068
issue link- Abhinandan-Kushwaha#1067 -
Added the props
bouncesandoverScrollModeto Bar (and stacked bar), Line and Area charts. These props will help control the bouncing effect on iOS and Android respectively. See Abhinandan-Kushwaha#1073
To know more about `bounces` and `overScrollMode`, please go through the official react-native docs here- https://reactnative.dev/docs/scrollview#bounces-ios and https://reactnative.dev/docs/scrollview#overscrollmode-android
-
Added the prop
onBackgroundPressto Bar and Stacked Bar charts. This will help ufocus/unselect after focusing/selecting a Bar. See Abhinandan-Kushwaha#1057 (comment) and Abhinandan-Kushwaha#634 (comment) -
Added the params-
itemandindexto thepointerComponentproperty of thepointerConfigprop. See Abhinandan-Kushwaha#1055
-
Fixed the issue - Line chart with curveType quadratic crashes if
animateOnDataChangeis true and the changed data is of a different length. See Abhinandan-Kushwaha#984 and Abhinandan-Kushwaha#1026 (comment) -
Fixed the issue -
focusedCustomDataPointnot rendering for focused data, (when both customDataPoint and focusedCustomDataPoint are used together) -
Made the props
pieInnerComponentHeightandpieInnerComponentWidthfunctional. Earlier they were defined but were not effective. Thanks to Benjamin Beau fro his PR - Abhinandan-Kushwaha#1045
- In Donut charts, the
centerLabelComponentcallback now accepts index parameter. Initially index is -1. On pressing any pie slice, it is set to the pressed slice's index. This fixes- Abhinandan-Kushwaha#994 (comment) - Added the props
focusedDataPointLabelComponentanddataPointLabelComponentto LineCharts. Eearlier configurable only inside the data array, now it can be passed directly as a prop. - Added the prop
xAxisLabelsAtBottomto Bar, Stacked bar, line and Area charts. See Abhinandan-Kushwaha#1015 (comment)
- Fixed the issue- "Pie charts showing log
showTooltip-----> undefined" See Abhinandan-Kushwaha#1020 - Fixed the issue- "Pressing on the X-axis label not triggering the respective tooltip in Stack Bar chart". See Abhinandan-Kushwaha#1010
- Fixed the issue- "Pointer jumping when spacing is less and user scrolls at the left end of the chart towards Y-axis". See Abhinandan-Kushwaha#410
- Fixed the issue - "
xAxisLabelsVerticalShiftdoes not work with Line and Area charts".
- Added the prop
edgesPressableto Pie charts. Ususally the entire slice of the Pie chart is pressable, but when a slice is foused, it becomes larger. In that case the extra length of the slice protruding out of the chart is unpressable. To make that extra length also pressable, we can use theedgesPressableprop. IfedgesPressableis set to true, the edges of the pie will be pressable, but you may need to press twice for focus- once for unfocusing the already focused pie and then for focusing the new pie. This prop was added after fixing the issue- "Can't select other Pie slices by just one press event". See Abhinandan-Kushwaha#994.
-
Fixed the iussue- "Pointer and strip not showing immediately on bar press". See Abhinandan-Kushwaha#1002
-
Fixed the issue- "LineChart 1st data point shows pointer label on the most top side of the datapoint if initial data value is 0". See Abhinandan-Kushwaha#1003
-
Fixed the issue- "
dynamicLegendComponentdoesn't show actual values from data when used withyAxisOffset". See Abhinandan-Kushwaha#1000 (reply in thread) -
Fixed the issue- "donut PieChart not showing tooltip correctly". See Abhinandan-Kushwaha#983
Added the feature to highlight a particular Bar, Bar-section (in stacked Bar chart) or Line in Bar charts using the below props-
- highlightEnabled
- highlightedBarIndex
- lowlightOpacity
- stackHighlightEnabled
- highlightedStackIndex
The above chart is rendered using the stackHighlightEnabled and highlightedStackIndex props.
- onTouchStart
- onTouchEnd
- onResponderGrant
- onResponderMove
- onResponderEnd
- onPointerEnter
- onPointerLeave
- Fixed the issue- "Dataset Lines rendering incorrectly when lengths don't match". See Abhinandan-Kushwaha#975
- Fixed the issue- "
onPressfor Pie charts on web not working on large screens. See Abhinandan-Kushwaha#969 (comment) - Fixed the issue- "onFocus callback always receives last line". Thanks to brimby for his PR- Abhinandan-Kushwaha#1068 Abhinandan-Kushwaha/gifted-charts-core#73
- Fixed the issue- "
focusProximitynot working fordataSets." See Abhinandan-Kushwaha/gifted-charts-core#73 (comment)
- Added the below properties to the
pointerConfigprop in Line/Area charts, all of which are callback functions. See Abhinandan-Kushwaha#968
- onTouchStart
- onTouchEnd
- onResponderGrant
- onResponderMove
- onResponderEnd
- onPointerEnter
- onPointerLeave
-
Fixed the issue - Pie chart onPress, focusOnPress event is not working on expo web. See Abhinandan-Kushwaha#969 and Abhinandan-Kushwaha#800
-
Fixed the issue- Unable to use the Gifted Charts Pointer within a React Native Tab View (using
onTouchStartandonTouchEndin the pointerConfig object). See Abhinandan-Kushwaha#968
- Added
strokeLinecapto Line charts to support'butt' | 'square' | 'round'linecaps. See Abhinandan-Kushwaha#961
Following props have been added-
- strokeLinecap
- strokeLinecap1
- strokeLinecap2
- strokeLinecap3
- strokeLinecap4
- strokeLinecap5
- Added the
strokeLinecapproperty insecondaryLineConfigand in the items ofdataSetarray
- Added support for animation in
Radarcharts. Following props have been added-
- isAnimated
- animationDuration (default 800)
- animateTogether (default false)
- Added the
isAnimatedandanimationDurationproperties in the objects ofpolygonConfigArray
Upgraded gifted-charts-core version to 0.1.55, had accidentally pushed the previous version with faulty version 0.1.54 of gifted-charts-core
- Added support for multi-radar charts using the prop
dataSetin place ofdata. dataSet is a 2D array while data is 1D. Added the below props to the<RadarChart>component-
- dataLabelsArray
- polygonConfigArray
- dataLabelsConfigSet
- Fixed the issue - "Line Chart with line segments doesn't work when enabling
stepChart". See Abhinandan-Kushwaha#950 - Fixed the dataPointLabelComponent width issue. See Abhinandan-Kushwaha#955
- Fixed the issue - "LineChart - Strip not showing after certain x datapoints, using data prop" Thanks to Lucas Brumatti for his PR - Abhinandan-Kushwaha#954
- Fixed the issue- "ExtrapolateMissingValues bug depending on line direction". See Abhinandan-Kushwaha#953
Added support for Radar charts using <RadarChart> component. See Radar chart props
- Fixed issue with tooltips in Bar and Stacked Bar charts.
- Fixed issue with
customDataPoint,dataPointLabelComponentandfocusedDataPointLabelComponentin Line/Area charts and enhanced the focus related functionality.
- Moved tooltip related logic to gifted-charts-core
- Moved focus related logic for Line/Area charts to gifted-charts-core
- Exported a few more types from gifted-charts-core and exposed them from react-native-gifted-charts
- Added the prop
renderDataPointsAfterAnimationEndsto Line/Area charts to render the data points after the animation has ended. This flag can be helpful ifonPressdoes not work in case of multi-line animated charts. See Abhinandan-Kushwaha#921
This prop is also useful if you are usingfocusedDataPointLabelComponentin animated multiline charts. In animated multiline charts, the focused label component might appear beneath some lines (while it is supposed to be rendered above every line/curve). To fix this layering issue,renderDataPointsAfterAnimationEndscan be useful. See Abhinandan-Kushwaha#1060 (comment)
- Fixed the issue- "getPointerProps starts from 0 index, regardless of where you press and drag on the LineChart". See Abhinandan-Kushwaha#937
- Fixed the issue- "Unable to use multi onPress in LineChart". See Abhinandan-Kushwaha#921 and Abhinandan-Kushwaha#570
- Fixed the issue- "LineChart 1st data point does not show pointer label if initialSpacing={0}". See Abhinandan-Kushwaha#925
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-
- Added support for
barMarginBottomto stacked bar charts. See Abhinandan-Kushwaha#126 (comment) - Added the prop
customBackgroundto Bar, Line, Area charts.customBackgroundis an object with following keys (All of which are optional). See Abhinandan-Kushwaha#790
type CustomBackground = {
color?: ColorValue;
component?: Function;
horizontalShift?: number;
verticalShift?: number;
height?: number;
width?: number;
widthAdjustment?: number;
};- Added the props-
focusTogetherandfocusProximityto Line and Area charts to control the focus behaviour. See Abhinandan-Kushwaha#910 - BarChart lineConfig with strokeDashArray support. See Abhinandan-Kushwaha#927
- Added the property
resetPointerIndexOnReleaseinsidepointerConfigto set pointerIndex to -1 upon releasing the pointer. Default value isfalse. See Abhinandan-Kushwaha#854 - Added the property
activatePointersInstantlyOnTouchinsidepointerConfigwhose default value istrue. When set to false, the pointer will be activated not instantly after touch, but on dragging after touch. See Abhinandan-Kushwaha#934
- Fixed the issue-
barMarginBottomnot 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 Abhinandan-Kushwaha#911
- Fixed the issue- "hidePointer doesn't work". See Abhinandan-Kushwaha#932
- Fixed the issue- "Custom Data Point in wrong position with non-uniform spacing on data in LineChart" See Abhinandan-Kushwaha#923
- Fixed the issue- "extrapolateMissingValues not working with dataSet". See Abhinandan-Kushwaha#916
- Fixed the issue- "The first property setting of BarChart/LineChart RulesConfigArray does not take effect". See Abhinandan-Kushwaha#893
- Fixed the issue- "areaChart2, areaChart3, areaChart4... props not working". See Abhinandan-Kushwaha#892
- Fixed the issue- "overflowTop parameter behaviour & verticalLinesHeight". See Abhinandan-Kushwaha#884
- Fixed the issue- "Text formatting for labels not working for the focused Pie". See Abhinandan-Kushwaha#886
- Fixed the issue- "PieChart focused Pie label styling does not work properly". See Abhinandan-Kushwaha#886
- Fixed the issue- "Custom data points are not shown on web". See Abhinandan-Kushwaha#889
- Added the properties
hidePointerForMissingValuesandhidePointerDataPointForMissingValuesto 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 thehidePointerForMissingValuesproperty to true. Its default value is false. WhenhidePointerForMissingValuesis set to true,hidePointerDataPointForMissingValuesautomatically becomes true, unless otherwise specified. See Abhinandan-Kushwaha#881
- The vertical strips shown by using the
showStripproperty were always shown over the data points, but now they will be shown beneath the data points. This behaviour can be reversed by using thestripOverDataPointsprop.
Added the prop named stripOverDataPoints to Line charts. If set true, the vertical strip appears over the data points, else it appears beneath the data points. See Abhinandan-Kushwaha#877
- Added the property
horizontalStripConfiginside thepointerConfigto create crosshair effect.
- Fixed the issue- "PieChart is not displayed if there is a huge difference between several values". See Abhinandan-Kushwaha#874
- Fixed the issue- "App crashes when extrapolateMissingValue is set to false and only the last value is defined". See Abhinandan-Kushwaha#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.
- Added support for different spacing for each line in Line/Area charts. Added the props
spacing1,spacing2,spacing3... See Abhinandan-Kushwaha#858 - Added support for different spacing for each data point in a line in Line/Area charts. Added the
spacingproperty inside the objects of thedataanddataSetarrays. - Added the tooltip feature in Pie/Donut charts using the
showTooltipprop.
- Fixed the issue- "yAxisOffset does not work with stackData". See Abhinandan-Kushwaha#862
- Fixed the issue-
zIndexnot working for Lines/Curves of the Line/Area charts. - Used scrollAnimation when scrolling to a given index using the
scrollToIndexprop. See Abhinandan-Kushwaha#859
Thanks to dannybit for his PR- Abhinandan-Kushwaha#860
- Added
onLeftPressandonRightPressprops to Population charts. See Abhinandan-Kushwaha#855 - Fix BarChart crash when maxValue is 0. Thanks to sakisdog for the PR- Abhinandan-Kushwaha/gifted-charts-core#55
- 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.
- Fixed the issue- Crash on passing empty data to Bar charts. See Abhinandan-Kushwaha#851
- Fixed the issue- Line & area charts with
pointerConfigblink whenanimateOnDataChangeis true. See Abhinandan-Kushwaha#849 - Fixed the issue-
animateOnDataChangedoes not work when yAxisOffset is set. See Abhinandan-Kushwaha#853 - Fixed the issue- Right side y-Axis not working in
<LineChartBiColor>. See Abhinandan-Kushwaha#847 - Fixed all issues with yAxisSide='right' and secondary Y-axis alignment. Wrote thorough screenshot tests relates to Axes and labels.
Fixed the x-axis alignment issue for animated gradient Bar charts when using xAxisLabelsVerticalShift. Also fixed the extra space at bottom when using xAxisLabelsVerticalShift.
See Abhinandan-Kushwaha#842
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 the persistPointer property to true. The initialPointerIndex property can also be useful.
-
Fixed the issue-
autoShiftLabelsnot working properly. See https://gifted-charts.web.app/barchart/#xAxisShift -
Fixed the issue- "Bar alignment issue when using the
labelsExtraHeightprop." See Abhinandan-Kushwaha#839
-
Fixed the issue- "onPress pressing/focusing wrong Pie section". It fixes these issues-
- Abhinandan-Kushwaha#832
- Abhinandan-Kushwaha#297
- Abhinandan-Kushwaha#812
As a part of this fix, removedonLabelPresswhich is still there in types, but will not be functional. Will try to restore it in future.
-
Fixed the issue- "Line charts crash if data is an empty array." See Abhinandan-Kushwaha#707
Fixed the issue- "Line chart inside Bar chart misaligned if data contains -ve values"
-
Fixed the issue- "Line charts crashing with error
Cannot read property 'isSecondary' of null. See Abhinandan-Kushwaha#831 -
Fixed the issue- "Animations not working for Line charts. See Abhinandan-Kushwaha#833"
Fixed the issue- "secondary Y-axis offset is not getting considered in the Line chart rendered inside Bar chart using showLine and lineConfig = {{ isSecondary: true }}."
-
Added support for secondary Bars using the property
isSecondary: trueinside the objects of data array. Available in both Bar and Stacked bar charts. See Abhinandan-Kushwaha#828
Also, removed the redundantsecondaryDataprop from Bar charts. -
Auto-compute the params for the secondary Y-axis based on the secondary data range. Applicable for both Bar and Line/Area charts.
These features were implemented with a considerable amount of refactor which I hope will fix several issues related to secondary data and negative secondary Y axis.
-
Added the prop
extrapolateMissingValuesto Line and Area charts to enable/disable the extrapolation of nullish values at the start and end of the chart. The default value ofextrapolateMissingValuesis true.
Note that extrapolation will not work ifinterpolateMissingValuesis set to false. Extrapolation works only if interpolation is enabled. See Abhinandan-Kushwaha#821 -
Added the feature to auto scale the Y-axis and auto compute the value of
roundToDigitsbased on the range of values in the data or dataSet. See Abhinandan-Kushwaha#825
-
Fixed the issue- "Y-Axis is not showing the labels correctly if we use the prop
yAxisLabelTextsand have only one Y-axis (primary or secondary) with a negative value." See Abhinandan-Kushwaha#814 (comment) -
Fixed the issue- "null value in pointerLabelComponent inside pointerConfig". The pointer label was having undefined value for a few milliseconds after unfocus. See Abhinandan-Kushwaha#752
-
Fixed the issue- Data line is being rendered a little below the x-axis. See Abhinandan-Kushwaha#824 (reply in thread)
-
Fixed the issue- Secondary Y-axis labels misaligned for negative part (4th quadrant) and
yAxisLabelTextsnot working properly in the Secondary Y-axis. See Abhinandan-Kushwaha#814 (comment) -
Fixed the issue- app crashes with interpolateMissingValues=false and areaChart=true. See Abhinandan-Kushwaha#805
-
Fixed the issue- topLabel component not displayed for animated stacked Bar charts. See Abhinandan-Kushwaha#813
-
Fixed the issue- Line in Bar chart not shifted downwards in case the Bar chart has negative values too. See Abhinandan-Kushwaha#814
-
Fixed the issue- Secondary Y axis labels incorrect when
yAxisLabelTextsprop is used. See Abhinandan-Kushwaha#814 -
Fixed the issue- If both the first and the last pie sections are on pole, then the external labels overlap. See Abhinandan-Kushwaha#806 (comment)
-
Fixed the issue- Pattern inside Bars not displayed. See software-mansion/react-native-svg#2437 (comment)
-
Fixed the issue- animation not working for simple 2d Bar charts.
-
Pointer lines will now be displayed in both positive and negative values of the Line and Area charts (1st and 4th quadrant). See Abhinandan-Kushwaha#799
-
Added the property
avoidOverlappingOfLabelsto the proplabelLineConfigfor Pie and donut charts. The default being true, it auto shifts overlapping external labels in Pie charts rendered usingshowExternalLabelsandexternalLabelComponent. See Abhinandan-Kushwaha#801 Note: Only the labels overlapping near the poles (at the top and bottom) will be auto-shifted. Auto-shifting can be disabled by settingavoidOverlappingOfLabels: falseinside thelabelLineConfigobject.
-
Fixed the issue- Vertical lines displayed using the
showVerticalLinesprop are incomplete in Bar and Line charts when run on web (using Expo). See Abhinandan-Kushwaha#794 -
Fixed the issue- Line chart is shifted up and some data cannot be displayed (on web using Expo). See Abhinandan-Kushwaha#778
-
Fixed the issue- Focused section always getting the color of the 1st section on web (using Expo) See Abhinandan-Kushwaha#800 (comment)
animateOnDataChange now works evevn if the lehgth of data array is changed. Earlier it worked for data changes with same length and threw error on changing the length of data array.
See- Abhinandan-Kushwaha#791
This is solved by adding dummy points to the data having lesser number of points. Dummy points are added carefully using the pointsWithPaddedRepititions util function from gifted-charts-core.
-
The prop
topLabelTextStylenow works for stacked Bar charts just like it used to work for simple Bar charts. See Abhinandan-Kushwaha#446 (comment) -
Secondary Y axis with negative values in secondary data or dataSet with
isSecondary: truesets are now supported. Independent height, stepHeight, stepValue, mostNegativeValue, noOfSectionsBelowXAxis for primary and secondary Y-axes below origin supported.
Fixed the issue- Negative steps and values in in second y axis are incorrect position. See Abhinandan-Kushwaha#775
-
Removed unnecessary interpolation for animations in Line charts.
-
Passed
containerHeightIncludingBelowXAxisto therenderChartContentmethod from theBarAndLineChartsWrappercomponent. This will ensure a consistent value of containerHeightIncludingBelowXAxis. -
Updated the util (
maxAndMinUtil) to compute the value ofminItemin case ofroundToDigits:truein gifted-charts-core. -
Moved the computation of below variables from
getHorizSectionValstouseBarAndLineChartsWrapperin gifted-charts-core.- secondaryMaxItem
- secondaryMinItem
- secondaryStepValue
- secondaryNegativeStepValue
- secondaryNoOfSectionsBelowXAxis
-
Added the prop
referenceLinesOverChartContentto Line and Area charts (earlier available for Bar charts only). See Abhinandan-Kushwaha#761 -
Added support for external Labels in Pie and Donut charts. See Abhinandan-Kushwaha#763
It uses the below props-showExternalLabels(boolean)labelLineConfig(object of LabelLineConfig type)externalLabelComponent(svg component for label, a callback function with 2 parameters- item and index)
The labelLineConfig prop is an object of LabelLineConfig type described below-
type LabelLineConfig = {
length?: number; // default 10
tailLength?: number; // default 8
color?: ColorValue; // default 'black'
thickness?: number; // default 1
labelComponentWidth?: number; // default 20
labelComponentHeight?: number; // default 10
labelComponentMargin?: number; // default 4
};Renamed the extraRadiusForFocused to extraRadius in Pie and Donut charts.
Accidentally pushed with a minor bug. Don't use this version!! Use 1.4.28 or newer versions.
Added the property hidePointers to the objects of the dataSet array. This will let us hide the pointers for individual sets.
Also, we can now add the property hidePointer inside individual data items of any dataSet.
See Abhinandan-Kushwaha#755
- Fixed the issue-
areaChartgiven in dataSet array of line chart doesn't work. See Abhinandan-Kushwaha#758 - Fixed the issue- Crash when I click to datapoint doesn't have any value. See Abhinandan-Kushwaha#757
Added the prop intersectionAreaConfig that defines properties for intersection area of data and data2 (1st & 2nd areas). See https://stackoverflow.com/questions/78435388/react-native-area-chart
Fixed the issue- pointerLabelComponent's second parameter (representing secondaryItem) is undefined. See Abhinandan-Kushwaha#752
Reused activatePointers function, thus removing many lines of repetitive code in the LineChart component.
-
Line charts can now have data arrays of different lengths. This means that data, data2, data3 don't need to be of same length. Same applies to the sets of dataSet.
-
Added the prop
labelWidthto stacked Bar charts. Thanks to Nathan Karmer for his PR- Abhinandan-Kushwaha#748
-
Fixed the issue- Datapoint in secondary lines are incorrect position in pointerConfig. See Abhinandan-Kushwaha#749
-
Fixed the issue- Data points visible even if an area chart is hidded under some other area chart.
-
Fixed the issue- Crash due to replacing
findLastIndexwithslice().reverse().findIndexin gifted-charts-core. I was reversing only the array and forgot to reverse the index. Thanks to dumihi313 for his PR- Abhinandan-Kushwaha/gifted-charts-core#37
-
Added
pointerIndexto the parameter list ofpointerLabelComponent. This will help conditionally format the pointerLabelComponent based on pointerIndex.
pointerLabelComponentnow accepts 3 parameters-items,secondaryDataItemandpointerIndex. One use case would be to position the first and last pointerLabelComponents such that they don't overflow the chart area.
See https://stackoverflow.com/questions/78472182/changer-pointerlable-style-on-a-certain-index-in-react-native-gifted-chart-linec -
Refactored the
animateOnDataChangefor Line and Area charts to make the animation smooth.animateOnDataChangeis now suppported for curved charts as well! See https://stackoverflow.com/questions/78546970/react-native-gifted-charts-not-animating-on-data-change
In gifted-charts-core, replaced findLastIndex() with slice().reverse().findIndex().
See the issue- Abhinandan-Kushwaha/gifted-charts-core#31 and its fix PR- Abhinandan-Kushwaha/gifted-charts-core#33
- Added the prop
verticalLinesStrokeLinecapto Bar and Line charts that takes the values'butt','round'and'square'('butt'being the default). See thestroke-linecapproperty in svg.
The library now ships js binary obtained after compiling using babel. This should fix all typescript issues like these-
- Abhinandan-Kushwaha#722
- Abhinandan-Kushwaha#691
- Abhinandan-Kushwaha#651
- Abhinandan-Kushwaha#625
- Abhinandan-Kushwaha#546
- Abhinandan-Kushwaha#473
Note: Since we are now shipping compiled js, you may need to install the gifted-charts-core dependency.
Accidentally pushed the build folder (dist) without type declarations. Don't use this version!! Use 1.4.22 or newer versions.
Added the following properties in the lineConfig prop for Bar charts (to control the line rendered inside Bar charts using the showLine prop) -
focusEnabled?: boolean;
focusedDataPointColor?: ColorValue;
focusedDataPointRadius?: number;
focusedDataPointIndex?: number;- Added the prop
stripStrokeDashArrayto support dotted and dashed vertical strips in Line and Area charts. See Abhinandan-Kushwaha#611 - Added the properties
barBorderWidthandbarBorderColorto data items in Bar charts. Earlier these properties could only be passed directly as props. But now, they can be passed to individual data items as well. See Abhinandan-Kushwaha#580
- Fixed the issue- Y-axis indices are not properly aligned with rule lines. See Abhinandan-Kushwaha#577
- Added the prop
secondaryXAxisto render an additional X axis at the top of the chart.
The labels to be displayed along the secondary X-axis can be passed in these 2 ways-
- Through the property named
secondaryLabelin the data array - Through the property named
labelTextsin thesecondaryXAxisprop.
The secondaryXAxis props accepts an object of the following type-
XAxisConfig {
thickness?: number
color?: ColorValue
labelsDistanceFromXaxis?: number
labelsHeight?: number
labelsTextStyle?: any
labelTexts?: string[]
}- Added the properties
secondaryLabel,secondaryLabelComponentandsecondaryLabelTextStyleto the data items of Bar and Line charts.
- Fixed the issue- Bar chart does not update on changing data values. (Only animated Bar charts used to update). See Abhinandan-Kushwaha#643
-
Added the prop
autoCenterTooltipto auto-center the tooltip for Bar charts. See Abhinandan-Kushwaha#713 -
Added the prop
nestedScrollEnabledto Bar and Line charts. It is useful when the chart is used inside a horizontal ScrollView as without this, the chart's scrolling is compromised. Thanks to Guilherme Pellegrini Coelho for his PR Abhinandan-Kushwaha#640 -
Added the props
onChartAreaPressandonBackgroundPressfor Line and Area charts. See Abhinandan-Kushwaha#634
-
Fixed the issue- Line chart crashing when using
dataSetandpointerConfigtogether. See Abhinandan-Kushwaha#708 -
Fixed the issue- Values in
pointerLabelComponentare wrong when usingyAxisOffset. See Abhinandan-Kushwaha#645 -
Fixed the issue "A props object containing a "key" prop is being spread into JSX" (in react 18.3 onwards) See Abhinandan-Kushwaha#646
-
Fixed the issue- Horizontal bar tooltip not rotated. See Abhinandan-Kushwaha#672
-
Fixed the issue- In secoundry Y-axis, hideOrigin doesn't work correctly (hides the top Y-label instead of bottom) See Abhinandan-Kushwaha#704
-
Fixed the issue- LineChart does not recognize sectionColors parameter. See Abhinandan-Kushwaha#715
- Added the prop
focusedPieIndexto Pie charts used to set initially focused pie and to override the focus behaviour ononPress. See Abhinandan-Kushwaha#702
-
Fixed the issue- Line inside Bar chart with secondary y-axis is misaligned. Fix taken from this patch-package. See Abhinandan-Kushwaha#543
-
Fixed the issue- When using LineChart with specifying both dataSet and pointerConfig, "Cannot read property 'value' of undefined" error occurs. See Abhinandan-Kushwaha#673
-
Fixed the issue- y-axis labels misaligned for right-side y-axis when passing an
endSpacingvalue. Fixed this by rectifying the calculation oftotalWidthin gifted-charts-core.
-
Added the props
negativeStepValueandnegativeStepHeightto control the value and height of 1 step/section in the Y axis for negative values (in the 4th quadrant). See Abhinandan-Kushwaha#686 (Supported in both- Bar and Line charts, but currently functional in Bar charts only) -
Added the prop
sectionColorsto set the background color of the horizontal sections of the chart. It is an array of ColorValues (or strings denoting colors). So, each section can have a different background color now. See Abhinandan-Kushwaha#547
- Fixed the issue- y-axis gets distorted for large negative values. Y-axis below origin will now have adequate number of sections instead of the default 10 sections. See Abhinandan-Kushwaha#685
- Fixed the issue- Bars slightly below the rules. See Abhinandan-Kushwaha#670 (comment) (Issue was there only in non-gradient Bar chart)
- Added the prop
focusedBarIndexto Bar charts used to set initially focused bar and to override the focus behaviour ononPress. See Abhinandan-Kushwaha#675 - Added the prop
labelsDistanceFromXaxisto shift the X-axis labels vertically up or down from their original position (that is just below the x axis). This prop will be very useful in case of Stacked Bar charts having both +ve and -ve values in the same stack. See Abhinandan-Kushwaha#678 - Added the prop
autoShiftLabelsForNegativeStacksto stacked Bar charts and its default value istrue. It is used to decide whether the X-axis labels should appear just under the negative bar (in case of Stacked Bar charts having both +ve and -ve values in the same stack), or whether they all should appear in one single line. See Abhinandan-Kushwaha#678
- Fixed the issue- Y-axis under the X-axis has one less section than expected. See Abhinandan-Kushwaha#676
- Added the prop
focusedDataPointIndexto Line charts used to set initially focused data point and to override the focus behaviour ononFocus. See Abhinandan-Kushwaha#680
- Fixed the issue- data points getting cropped in non-scrollable fixed width Line and Area charts. See- Abhinandan-Kushwaha#623 and Abhinandan-Kushwaha#681
- Fixed the issue- yAxisLabelTexts not working (showing NaN as labels) See Abhinandan-Kushwaha#22 (comment)
Accidental release, please don't use this version.
- Added the props
adjustToWidthandparentWidthto Bar chart. See Abhinandan-Kushwaha#660 - Added the prop
showDataPointLabelOnFocusto Line / Area charts to show dataPointLabel (tooltip) on the focused data point. See Abhinandan-Kushwaha#664
- Fixed the issue- Bar chart with pointerConfig breaks with negative values. See Abhinandan-Kushwaha#654
- Fixed the issue- When using dataSet, only one pointer is displayed on the line chart. Also added the prop
pointerColorsForDataSet. See Abhinandan-Kushwaha#610 - Fixed issue with pointers on secondary data line not displaying at proper position (earlier they were all displayed at x-axis)
- Removed the wrong prop name
pieInnerComponentin PieChartPro and replaced it with the correct name-centerLabelComponent
Added the prop onMomentumScrollEnd to Bar and Line charts. It can be used to fire an event when scroll is completed. See Abhinandan-Kushwaha#601
-
Added support for multiple lines corresponding to secondary y-axis. Now we can add the property
isSecondaryinside the objects of thedataSetarray. When using isSecondary, make sure to pass thesecondaryYAxisprop. See Abhinandan-Kushwaha#586 -
Added support for
ringPie charts. Just pass the propringin the<PieChartPro>component to make a ring like Pie chart. See Abhinandan-Kushwaha#584 -
Added support for
pieInnerComponentto<PieChartPro>
Animation in Pie and donut charts using the <PieChartPro> component. See Abhinandan-Kushwaha#555
Curved paths (border-radius) in donut sections supported using the <PieChartPro> component. See Abhinandan-Kushwaha#554
Support for expo gradient, thanks to onyx-flame for his PR Abhinandan-Kushwaha#571
- refactors and adjustments related to xAxisThickness and yAxisOffset. See Abhinandan-Kushwaha#574
- Fixed the issue -
animateOnDataChangeskipping the initial render, thus rendering an empty chart. See Abhinandan-Kushwaha#537 - Fixed the issue -
yAxisOffsetnot working withdataSetin Line (and Area) charts.
- Added the properties
shiftTextBackgroundXandshiftTextBackgroundYto data items of Pie (and donut) charts. If we passshiftTextX, the background will also shift (because the library assigns a default value of shiftTextBackgroundX = shiftTextX). This can be overridden by manually passing shiftTextBackgroundX. Same applies toshiftTextBackgroundY
- Fixed the issue- "shiftTextX not working to focused section of the Pie (and donut) charts" Thanks to YASH-TRONX for his PR Abhinandan-Kushwaha#534
- Fixed the issue- line inside Bar (combined chart) getting cropped from right side in case of secondary See Abhinandan-Kushwaha#532 This actually got fixed in the core library (version 0.0.16). Here I just had to use the latest version of gifted-charts-core
- Added the prop
onScrollto Bar, Stacked Bar, Line and Area charts. It is a callback function that takes event as a parameter. - Added the props
paddingHorizontalandpaddingVerticalto Pie (and Donut) charts. This will be useful to accomodate "onBorder" labels. See Abhinandan-Kushwaha#528
Fixed issue with barInnerComponent for Bar charts that don't have gradient. See Abhinandan-Kushwaha#500 (comment)
Added the prop onPressOut to Bar and Stacked Bar charts. See Abhinandan-Kushwaha#523
Fixed issue with noOfSectionsBelowXAxis not taking the value 0 for Line charts. See Abhinandan-Kushwaha#526
- Added
interpolationto Line charts. These props can be used to control interpolation-interpolateMissingValues,showDataPointsForMissingValuesandonlyPositive. See Interpolation in Line chart docs - Added
BEFORE_DATA_POINTtoEdgePositionenum for step charts, and renamed theAT_DATA_POINTEdgePosition toAFTER_DATA_POINT. The default EdgePosition isAFTER_DATA_POINT.
- Fixed the issue- "topLabelComponent not visible for bar charts". See Abhinandan-Kushwaha#519
- Fixed RTL issue in pagination. Thanks to Houssem-Eddine Kellou for his PR Abhinandan-Kushwaha/gifted-charts-core#3
Added the props focusBarOnPress and focusedBarConfig to Bar charts. Using these, we can focus or highlight a bar on press. See Abhinandan-Kushwaha#512
- Fixed issues with
stepValue,noOfSectionsandmaxValue. See Abhinandan-Kushwaha#511 - Fixed issue with pagination, (isCloseToStart not returning true) PR Abhinandan-Kushwaha/gifted-charts-core#2 by Houssem-Eddine Kellou
Moved gifted-charts-core to dependency and put the 3rd party libraries into devDependency. PR Abhinandan-Kushwaha#514 by Armon Raphiel
Exported ruleTypes which was missed in version 1.4.0
📣 This release contains a huge refactor. 🔨 We have now moved most of the logic and maths (including utils, constatnts and types) to our newly launched library named gifted-charts-core
This helped in-
- Segragating UI and logic
- Modularity and code re-usability
- We are very soon going to launch a library for web named
react-gifted-charts❤️ With this we will be able to render charts in react using exactly the same code we use in react-native-gifted-charts!
This huge refactor might have introduced some bugs. Please bear with us.🙏
To avoid this in future mega releases, I am going to add thorough tests in the next release.
We will soon release version 2.0 after adding all types and unit tests for each component!!
-
Added support for Pagination using the props
onEndReached,onStartReachedandendReachedOffset. Thanks to Houssem-Eddine Kellou who added this feature through his PR- Abhinandan-Kushwaha#504. Pagination is now supported for Bar, Stack, Line and Area charts! -
Added the prop
onLongPressto Bar and Stacked Bar charts. See Abhinandan-Kushwaha#506
-
Added the prop
barInnerComponentto Bar and Stacked Bar charts.barInnerComponentcan also be passed as a property inside the data items. See Abhinandan-Kushwaha#500 -
Added the prop
pieInnerComponentto Pie and Donut charts.pieInnerComponentcan also be passed as a property inside the data items. See Abhinandan-Kushwaha#500 -
Exported the following types from
react-native-gifted-charts-
- barDataItem
- stackDataItem
- BarChartPropsType
- StackedBarChartPropsType
- pieDataItem
- PieChartPropsType
- lineDataItem
- bicolorLineDataItem
- LineChartPropsType
- LineChartBicolorPropsType
- popnPyramidDataItem
- PopulationPyramidPropsType
- Moved types to
'.\types.tsfiles for each type of chart and gave proper names to types.
🐛 Minor bug fixes with initialSpacing for Line inside Bar charts (combined Bar and Line charts).
-
Fixed issue with onPress not working on elements just above the chart. See Abhinandan-Kushwaha#497
It was an issue with the of the chart overflowing and overlapping in case stepHeight was large. -
Fixed the issue-
showStripOnFocus: height of strip becomes smaller when usingoverflowTop.
- Fixed issue with
pointerEvent value: box-nonein Pie charts. See Abhinandan-Kushwaha#491 and Abhinandan-Kushwaha#472 - Fixed issue with
data3anddata4in Line charts. See Abhinandan-Kushwaha#490 - Fixed issue- strip not visible for Line and Area charts having
pointerConfigwithpointerLabelComponent.
- Added support for Population Pyramid charts!! See Population Pyramid props
- Pointer labels will now be rendered on top of the rest of the chart content. Earlier, reference lines sometimes used to appear over the pointer lables, this has been fixed now.
- Added the prop
referenceLinesOverChartContentfor Bar charts.
- Fixed the issue- LineChart having a single data item and using the prop
adjustToWidthcaused crashes. See Abhinandan-Kushwaha#484 - Fixed issue with data point label getting cropperd. See Abhinandan-Kushwaha#486
- Fixed the issue- Reference line overlapping the tooltip. See Abhinandan-Kushwaha#476
🐛 Minor bug fixes with pointerEvents in Pie charts and yAxisExtraHeight with pointerLabelComponent in Bar and Line charts. See Abhinandan-Kushwaha#472 and Abhinandan-Kushwaha#467 (comment)
- Added support for mix of positive + negative values in Stacked Bar charts. Thanks to Christoph who added this feature through his PR- Abhinandan-Kushwaha#470
- Added the prop
yAxisExtraHeightfor extra length of Y axis at the top. Default value is 1/20th of the chart height. - Added the prop
inwardExtraLengthForFocused. This allows us to render donut charts whose focused section grows inwards. See Abhinandan-Kushwaha#325
- Earlier, charts used to have an extra length of Y axis equal to
sectionHeight/2at the top. Due to this, charts' height used to change along withsectionHeight. Fixed this by making the default value ofyAxisExtraHeightto a constant value which equals 1/20th of the chart height. See Abhinandan-Kushwaha#467 - Fixed the issue with
getPointerPropswhich threw a warning -Cannot update a component (xxx) while rendering a different component (yyy). See facebook/react#22633
🐛 Minor bug fixes with stripΒehindBars and initialPointerIndex for Bar charts. See Abhinandan-Kushwaha#410 (comment) and Abhinandan-Kushwaha#410 (comment)
-
Added the property
zIndextoreferenceLine1Config,referenceLine2ConfigandreferenceLine3Config. See Abhinandan-Kushwaha#310 -
Added
stripBehindBarsproperty topointerConfigfor Bar charts. See Abhinandan-Kushwaha#410 (comment) -
Added the
trimYAxisAtTopprop for Bar and Line charts. See Abhinandan-Kushwaha#461 -
showValuesAsTopLabelnow shows the sum of stack item values at top of each stack. See Abhinandan-Kushwaha#446 -
Added the property
resetPointerOnDataChangetopointerConfigfor Line charts. The default value ofresetPointerOnDataChangeis true. See Abhinandan-Kushwaha#456
-
Fixed issue with
overflowTop. See Abhinandan-Kushwaha#453 (comment) -
Fixed issue with
stackBorderRadius. See Abhinandan-Kushwaha#354 (comment) and Abhinandan-Kushwaha#354 (comment)
-
Added
pointerConfigsupport to Stacked Bar charts. -
Added
barBorderWidthandbarBorderColorto Bar charts. -
Added separate
spacingfor Line charts inside BarCharts. The line rendered in a Bar chart can have its ownspacingvalue independent from the spacing of the bars. It can be set using thespacingproperty in thelineConfigobject. -
Added these props to apply border radius to Stacked Bar charts-
- stackBorderRadius
- stackBorderTopLeftRadius
- stackBorderTopRightRadius
- stackBorderBottomLeftRadius
- stackBorderBottomRightRadius
- Fixed the issue - initial pointer appearing at top for the second data line. See Abhinandan-Kushwaha#453
Merged ThreeDBar and AnimatedBar codes to make a single file named AnimatedThreeDBar
-
Added the props-
showValuesAsTopLabel,topLabelContainerStyleandtopLabelTextStyleto Bar charts. See Abhinandan-Kushwaha#99 (comment) -
Added the prop
highlightedRangeto render the parts of lines lying in a given data range with a different style (color, thickness,type). See https://stackoverflow.com/questions/70406903/different-colors-line-chart-with-react-native-chart-kit
type HighlightedRange = {
from: number;
to: number;
color?: string | ColorValue;
thickness?: number;
strokeDashArray?: Array<number>;
};- Added the property
pointerEventsto thepointerConfigobject. If you have a Pressable / Touchable item in yourpointerLabelComponent, then you should setpointerEventsto 'auto' inside the pointerConfig object. See Abhinandan-Kushwaha#447
- Fixed the issue - Unwanted Spacing below the charts.See Abhinandan-Kushwaha#448
- Added support for dynamic number of lines with the help of the
dataSetprop. We can now pass an array of data instead of usingdata,data2,data3etc. - Added property
formatYLabelto thesecondaryYAxis, so we can now format the labels of the secondary Y-Axis usingformatYLabel. See Abhinandan-Kushwaha#442
- Fixed issue with Pie charts having all zero values. See Abhinandan-Kushwaha#443
- Added support for line segments in Line and Area charts. See Abhinandan-Kushwaha#432 (comment)
- Added support for 2 line charts inside Bar chart using the
lineData2andlineConfig2props. See Abhinandan-Kushwaha#440
- Fixed issue with step chart edge position. Added a prop named
edgePosition. See Abhinandan-Kushwaha#438
-
Added support for Step charts. To render a step chart, just pass the prop
stepChartto the<LineChart>component.
See Abhinandan-Kushwaha#438 -
Added the properties-
initialPointerIndex,initialPointerAppearDelay, andpersistPointerto thepointerConfigobject. See Abhinandan-Kushwaha#427 -
Added support for customizing individual / specific rules in charts using the prop
rulesConfigArray. See Abhinandan-Kushwaha#432 (comment) -
Added 2 new props-
xAxisLabelsHeightandxAxisLabelsVerticalShift. Here's a brief description of the use case of these props-
The height of X axis labels container is computed automatically. Sometimes you may need to explicitly provide the height of X-axis labels container. An example case is when the font size of label texts is large. Use the `xAxisLabelsHeight`` prop if the labels appear cropped from bottom.
Note- Using the xAxisLabelsHeight prop may shift the X axis labels up or down, making the label text overlap with the chart content. In such a case you can use the `xAxisLabelsVerticalShift`` prop to adjust the vertical position of X axis labels.
-
Fixed issue- Pie charts get distorted when one value is non-zero and rest values are zero. See Abhinandan-Kushwaha#436
-
Fixed issue with programmatically changing focus does in Pie and Donut charts. See Abhinandan-Kushwaha#428
🐛 A minor bug fix. See Abhinandan-Kushwaha#422 (comment)
🐛 A minor bug fix. See Abhinandan-Kushwaha#424
- Added support for Multicolor Line charts. See Abhinandan-Kushwaha#251
These props will help to render multicolor line-
lineGradient?: boolean;
lineGradientComponent?: () => any;
lineGradientId?: string;
lineGradientDirection?: string;
lineGradientStartColor?: string;
lineGradientEndColor?: string;- Added support for custom gradient in area charts using the props
areaGradientComponentandareaGradientId
- Fixed issue- pointerConfig on Bar chart was jaggy
- Added the
formatYLabelprop. The user can now pass a callback function that takes the label generated by the library and modifies it. The modified label returned by the callback function will be finally rendered along the Y-axis. See Abhinandan-Kushwaha#22
- Fixed the issue where tooltip was not rendered in Bar charts that use
showLineprop. Also, bars were not clickable withshowLineandlineBehindBars={false}. See Abhinandan-Kushwaha#411
- Added pointerConfig behaviour to Bar charts. See Abhinandan-Kushwaha#410
- Fixed issue with
pointerConfig. See Abhinandan-Kushwaha#177 - Added types to util functions. See Abhinandan-Kushwaha#379
- Fixed some typescript issues. See Abhinandan-Kushwaha#269 (comment)
- Fixed issue with the 4th curve of curved area charts. See Abhinandan-Kushwaha#402
- Fixed Abhinandan-Kushwaha#406
Fixed issue where a zero value was omitted in Pie chart. See Abhinandan-Kushwaha#401
focusedDataPointLabelComponentnow appears above other UI elements, as it is now given a zIndex of 1000. See Abhinandan-Kushwaha#396- Fixed issue with the position of verticalLines when
hideYAxisTextis set to true.
- replaced
JSON.parse(JSON.stringify())with custom deepClone method (added in utils). It fixed this issue- Abhinandan-Kushwaha#397
- Added the property named
isSecondaryin thelineConfigobject see Abhinandan-Kushwaha#392 - Replaced the prop
verticalLinesTypewithverticalLinesStrokeDashArray
Fixed issue with secondary Y axis position (it was shifting towards right earlier)
- Added the prop
scrollEventThrottle(only for iOS) see https://reactnative.dev/docs/scrollview#scrolleventthrottle-ios - default value is 0 - exposed secondaryDataItem in pointerLabelComponent see Abhinandan-Kushwaha#388
Fixed issue with adjustToWidth (Now if you pass the adjustToWidth prop, your chart will take the screen width automatically)
- secondary Y axis for charts with negative values
- Line chart inside stacked bar chart
minValue is now renamed to mostNegativeValue to avoid confusion
- Fixed issue with
roundToDigitsfor Y axis labels. Now we add trailing 0s after decimal point if needed. So if the Y axis label is 1.5 and we haveroundToDigits={2}, then the label rendered will be 1.50 - Fixed Y axis label issue which displayed NaN as a label when we used
yAxisOffsetandyAxisLabelTextsprops together.
🐛 Minor bug fixes
Added the secondaryYAxis prop to render a secondary Y axis on the right side of the chart. Earliear we were able to render the Y axis either on the left or on the right side, not both.
In addition to data2, data3, etc, now we have the secondaryData prop. This is done to reference the second line to the secondary Y axis.
In Bar, Line and Area charts, we can access the ScrollView using the scrollRef prop. You just need to create a ref using React.useRef() and pass it into the scrollRef prop. The most common use of scrollRef is to scroll to a given position, and to fire the scroll on an event like a button press.
In Bar, Line and Area charts, we can scroll to any given index using the scrollToIndex prop.
To render a horizontal Bar chart from right to left, pass the rtl prop along with the horizontal prop.
Now, we support 2 types of curves-
- Cubic bezier curve
- Quadratic bezier curve
The default curveType is cubiz bezier curve. To change it to quadratic, pass the prop curveType={CurveType.QUADRATIC}
curvature takes a value between 0 and 1. The default curvature value is 0.2
curvature works only for cubic bezier curves. When curvature value is 0, the curve becomes straight line.
In Line and area charts, we can pass the showValuesAsDataPointsText prop to display the value of the data points.
The isAnimated prop is now supported in stacked bar charts.
Similar to the initialSpacing we now have a prop named endSpacing as well.
Similar to the overflowTop we now have a prop named overflowBottom as well, but it makes sense only for line and area charts. It gives extra space at the bottom of the chart to make room for dataPoints or dataPointText.
The library used to break when used in an expo project. This was perhaps due to version conflicts in react-native-svg. We have now moved both react-native-svg and react-native-linear-gradient to peer dependencies. This should hopefully fix the issues with expo.
autoAdjustPointerLabelPosition is now false by default. This should make the Area and Line charts with pointerConfig smooth on Android.

