You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "helgasoft (via GitHub)" <gi...@apache.org> on 2023/05/09 18:20:13 UTC

[GitHub] [echarts] helgasoft commented on issue #18602: [Bug] Tooltip display data no match with xAxis

helgasoft commented on issue #18602:
URL: https://github.com/apache/echarts/issues/18602#issuecomment-1540659311

   There are too many bars per day/month. 
   Axis label shows the position of the very **first** bar for the day/month. The others are added side-by-side and since each bar has a _barWidth_, they gradually move to the right further from the label. If too many, they could even spill to the next axis label.
   Conclusion: bars are not a good option for this type of data.  Try _scatter_, add this code at the end of yours:
   ```
   option.series.forEach(s => {
     s.type = 'scatter';
     s.data = s.data.filter(a=>a[1]); // remove nulls
   });
   myChartEchart.setOption(option);
   ```
   ![image](https://github.com/apache/echarts/assets/13038071/3598ba25-17cc-4b67-8f2e-d42021cacc59)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org