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