You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for the amazing work on Victory Native and for the recent updates integrating react-native-skia. The performance improvements and visual quality enhancements are impressive!
I’ve recently updated to the latest version of victory-native which uses react-native-skia, and I noticed that the behavior of labels has changed compared to the older versions. Previously, we were able to create multi-line labels by including \n in the label text, like so:
label="Heart Rate\n(BPM)"
This would render two lines of text in the chart. However, in the new Skia-based version, the \n is not being interpreted as a line break, and the text appears on a single line with the literal \n.
This feature was extremely useful for adding contextual and formatted labels, especially in tight layouts or dual-axis charts.
Would it be possible to update the label rendering logic to support multi-line text using \n again?
Thanks again for the great work on the library and for your time and consideration!
Proposal
Links / References
The text was updated successfully, but these errors were encountered:
Example of code that patch had to be applied to work:
<CartesianChartxAxis={{formatXLabel: (value: number)=>formatXAxisLabel(value),}}>...</CartesianChart>constformatXAxisLabel=(value: number,)=>{constdate=newDate(value);return`${date.toLocaleDateString('en-US',{weekday: 'short',timeZone: 'UTC',})}\n${date.getUTCDate()}`;// note the new line break here}
Description
Hi team 👋,
First of all, thank you for the amazing work on Victory Native and for the recent updates integrating react-native-skia. The performance improvements and visual quality enhancements are impressive!
I’ve recently updated to the latest version of victory-native which uses react-native-skia, and I noticed that the behavior of labels has changed compared to the older versions. Previously, we were able to create multi-line labels by including \n in the label text, like so:
label="Heart Rate\n(BPM)"
This would render two lines of text in the chart. However, in the new Skia-based version, the \n is not being interpreted as a line break, and the text appears on a single line with the literal \n.
This feature was extremely useful for adding contextual and formatted labels, especially in tight layouts or dual-axis charts.
Would it be possible to update the label rendering logic to support multi-line text using \n again?
Thanks again for the great work on the library and for your time and consideration!
Proposal
Links / References
The text was updated successfully, but these errors were encountered: