xwjune opened a new issue #14071:
URL: https://github.com/apache/echarts/issues/14071


   ### Version
   5.0.1
   
   ### Steps to reproduce
   import React, { useEffect } from 'react';
   import * as echarts from 'echarts/lib/echarts';
   import 'echarts/lib/chart/line';
   import 'echarts/lib/component/tooltip';
   
   const ChartLine = () => {
     useEffect(() => {
       const option = {
           tooltip: {
               show: true,
           },
           grid: {
               top: '10%',
               bottom: '10%',
               left: '10%',
               right: '10%',
           },
           xAxis: {
               type: 'category',
               data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
           },
           yAxis: {
               type: 'value'
           },
           series: [{
               data: [820, 932, 901, 934, 1290, 1330, 1320],
               type: 'line',
               smooth: true
           }]
       };
   
       const myChart = echarts.init(document.getElementById('myChart'));
       myChart.setOption(option);
     }, []);
   
     return (
       <div style={{ width: 400, height: 400 }} id="myChart" />
     );
   };
   
   export default ChartLine;
   
   ### What is expected?
   图表能正确显示
   
   ### What is actually happening?
   曲线图报错:xAxis "0" not found
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to