wuba / wuba/react-native-echarts
折线图 图例问题
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 967
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
{
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
},
confine: true,
},
grid: {
top: '30%',
right: '3%',
left: '15%',
bottom: '17%',
},
legend: {
type: 'scroll',
textStyle: {
color: '#000000',
fontSize: 12,
},
icon: 'circle',
itemGap: 12,
itemWidth: 9,
data: [
'人员进站',
'人流量统计',
'边界入侵',
'劳保穿戴',
'灭火器',
'安全帽',
'人员离岗',
'抽烟',
'行人检测',
],
},
xAxis: [
{
type: 'category',
data: [],
boundaryGap: false, //x轴顶头显示
axisLine: {
lineStyle: {
color: 'rgba(255,255,255,0.12)',
},
},
axisLabel: {
margin: 10,
color: '#000000',
},
},
],
yAxis: [
{
name: '条',
boundaryGap: ['0%', '12%'],
nameTextStyle: {
verticalAlign: 'middle',
align: 'right',
},
axisLabel: {
formatter: '{value}',
color: '#000000',
},
axisLine: {
show: false,
lineStyle: {
color: '#000000',
},
},
splitLine: {
lineStyle: {
color: 'rgba(0, 0, 0, 0.15)',
},
},
},
],
dataZoom: [
{
type: 'inside',
throttle: 50,
},
],
series: [],
}
这是我的折线图 配置信息,react native 应用中 图例配置 type: 'scroll' 之后,图例显示后就隐藏了,不配置scroll 反而没事,但是我需要 scroll ,请问这种应该怎么解决呢
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported React Native chart with the provided option, especially legend type: 'scroll', and compare it with the configuration without scrolling. Inspect the chart rendering path used by this repository and verify the Android and iOS results. Done means the legend remains visible and can scroll while the listed series and styling continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100