Skip to content
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

版本4.1.20无法设置横轴颜色 #3530

Closed
hebingliang opened this issue Jul 20, 2021 · 0 comments
Closed

版本4.1.20无法设置横轴颜色 #3530

hebingliang opened this issue Jul 20, 2021 · 0 comments

Comments

@hebingliang
Copy link

chart = new Chart({
container: 'container',
autoFit: true,
height: '50vh',
padding: [40, 60, 40, 60],
});
chart.data(this.listData);
chart.axis('keyAsString', {
label: {
textStyle: {
fill: '#ff0000',
},
},
});
chart.scale('docCount', {
range: [0, 1],
type: 'linear',
});
if (this.storeFilters.groupType == 4) {
chart.scale('keyAsString', {
formatter: k => this.$formatDate(new Date(k)),
});
} else {
chart.scale('keyAsString', {});
}
chart.axis('keyAsString', {
label: {
textStyle: {
fill: '#ff0000',
},
},
});
chart.tooltip({
showCrosshairs: true,
});

      chart.line().position('keyAsString*docCount');
      chart.area().position('keyAsString*docCount');
      chart.render();
      this.updateChart(chart);

如上代码所示:无法设置横轴颜色

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant