【发布时间】:2020-07-29 07:34:40
【问题描述】:
我正在使用google柱形图创建如下所示的柱形图:
const chart = new google.visualization.ColumnChart(chartDiv); // Extract the data from which to populate the chart.
chart.draw(data, {
height: 300,
legend: "none",
// @ts-ignore TODO(jpoehnelt) check versions
titleY: "Elevation (Meters)",
titleX: "Distance (Miles)"
});
其中一个问题是 xaxis 中的值。我怎样才能只显示 5 个值,例如。 1、2、3、4、5?以红色标记的 xaxes 值被密集填充。如何分成5个部分?感谢您的帮助!
【问题讨论】:
标签: javascript charts google-api google-visualization column-chart