wuba / react-native-echarts

📈 React Native ECharts Library: An awesome charting library for React Native, built upon Apache ECharts and leveraging react-native-svg and react-native-skia. Offers significantly better performance compared to WebView-based solutions.
https://wuba.github.io/react-native-echarts/
Apache License 2.0
682 stars 24 forks source link

折线图 图例问题 #180

Open yongduodou opened 1 month ago

yongduodou commented 1 month ago

{ 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 ,请问这种应该怎么解决呢 image

Chandankkrr commented 1 week ago

Facing the same issue on Android, when the legend type is set to scroll, the legend disappears