You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/01/20 08:19:54 UTC

[GitHub] [echarts] susiwen8 edited a comment on issue #14080: xAxis "0" not found

susiwen8 edited a comment on issue #14080:
URL: https://github.com/apache/echarts/issues/14080#issuecomment-763422825


   涉及按需加载,文档稍后更新
   
   ```js
   // const echarts = require("echarts");
   import * as echarts from "echarts/core";
   import {
     GridComponent,
   } from 'echarts/components';
   import {
     BarChart,
   } from 'echarts/charts';
   import {
     CanvasRenderer,
   } from 'echarts/renderers';
   echarts.use([GridComponent, BarChart, CanvasRenderer]);
   var myChart = echarts.init(document.getElementById("main"));
   // 指定图表的配置项和数据
   var option = {
     title: {
       text: "ECharts 入门示例"
     },
     tooltip: {},
     legend: {
       data: ["销量"]
     },
     xAxis: {
       data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]
     },
     yAxis: {},
     series: [
       {
         name: "销量",
         type: "bar",
         data: [5, 20, 36, 10, 10, 20]
       }
     ]
   };
   
   myChart.setOption(option);
   
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



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