oksktank/react-native-pure-chart

Should tooltips title show the series name?

kanokith opened this issue · 4 comments

Now the tooltips title show the 'x' data, is it better to show the seriesName?
Screen Shot 2562-09-19 at 16 20 03
Screen Shot 2562-09-19 at 16 20 25

is there any solution?

Hi,i modify the file column-chart.js col102 like this:
before :
tooltipRenders.push(<Text key={'tooltipTitle-' + i} style={styles.tooltipTitle}>{series.data[selectedIndex]['x']}</Text>)
after :
tooltipRenders.push(<Text key={'tooltipTitle-' + i} style={styles.tooltipTitle}>{series.seriesName}{series.data[selectedIndex]['x']}</Text>)
and I had seriesName in the tooltips

@NapChen @kanokith can you create a PR so this can be implemented? This is really useful update as it doesn't make sense to show e.g. Date 3x times in one label and no legend

@NapChen @kanokith can you create a PR so this can be implemented? This is really useful update as it doesn't make sense to show e.g. Date 3x times in one label and no legend

hi bro,maybe you can try this repo https://github.com/supervons/react-native-echarts-pro instead