Closed congshengwu closed 2 years ago
Support the line feed "\n" in the formatter function. Without this PR, Echarts will display blank when use '\n' in the formatter function.
"\n"
'\n'
In the toString util function, every '\n' will be removed. This PR will keep '\n' in the return string of the formatter function.
Use the line feed char '\n' in the formatter function. Without this PR, Echarts is blank. With this PR, rendering well with line feed where you want.
<RNEChartsPro width="100%" height={300} option={{ xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], axisLabel: { formatter(value) { return value + '\n' + '(week)'; } } }, yAxis: { type: 'value' }, series: [ { data: [150, 230, 224, 218, 135, 147, 260], type: 'line' } ] }} />
For both Android and iOS.
This PR is closed and replaced with #41.
Summary
Support the line feed
"\n"
in the formatter function. Without this PR, Echarts will display blank when use'\n'
in the formatter function.In the toString util function, every
'\n'
will be removed. This PR will keep'\n'
in the return string of the formatter function.Test plan
Use the line feed char
'\n'
in the formatter function. Without this PR, Echarts is blank. With this PR, rendering well with line feed where you want.Compatibility
For both Android and iOS.