Closed congshengwu closed 2 years ago
Support the line feed char \n in the formatter function. Without this PR, Echarts will display blank when use \n in the formatter function.
\n
In the toString util function, every \n will be removed. This PR will keep \n in the return string of the formatter function.
toString
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: string) => { return value + '\n' + '(\\n)'; }, }, }, yAxis: { type: 'value' }, series: [ { data: [150, 230, 224, 218, 135, 147, 260], type: 'line' } ] }} />
For both Android and iOS.
Thanks for your PR, 👍the test pass.
The next version will be released
Summary
Support the line feed char
\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.