-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xAxis "0" not found #14080
Comments
Hi! We've received your issue and please be patient to get responded. 🎉 In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer. If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question. If you are interested in the project, you may also subscribe our mailing list. Have a nice day! 🍵 |
涉及按需加载,文档稍后更新 // 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); |
In addition to @susiwen8 's answer. Since 5.0.1. import "echarts/lib/component/grid"; You can check the import code on the new example page |
ok, thanks a lot ! |
Version
5.0.1
Reproduction link
https://codesandbox.io/s/async-fast-n3sz9?file=/src/index.js
Steps to reproduce
访问reproduction link
What is expected?
正常显示柱图
What is actually happening?
报错: xAxis "0" not found
The text was updated successfully, but these errors were encountered: