如何在 AnyGantt 中设置月份列宽?



是否可以从任何图表更改AnyGantt中的月份列的宽度?

这是我的桌子的样子

anychart.onDocumentReady(function() {
// create data tree on our data
var treeData = anychart.data.tree(getData(), anychart.enums.TreeFillingMethod.AS_TABLE);
// create resource gantt chart
chart = anychart.ganttResource();
// set container id for the chart
chart.container("container");
// set data for the chart
chart.data(treeData);
// set start splitter position settings
chart.splitterPosition(200);
// get chart data grid link to set column settings
var dataGrid = chart.dataGrid();
// initiate chart drawing
chart.draw();

您是否正在寻找缩放控制?

chart.xScale().minimum(Date.UTC(2000, 1, 2));    
chart.xScale().maximum(Date.UTC(2000, 3, 6));
// Set zoom to range.
chart.zoomTo("week", 2, "firstDate");

https://api.anychart.com/7.14.3/anychart.charts.Gantt#zoomTo https://playground.anychart.com/api/7.14.3/charts/anychart.charts.Gantt.zoomTo_set_asInterval-plain

此外,还有:

https://api.anychart.com/7.14.3/anychart.charts.Gantt#fitAll
https://api.anychart.com/7.14.3/anychart.charts.Gantt#zoomIn
https://api.anychart.com/7.14.3/anychart.charts.Gantt#zoomOut

相关内容

  • 没有找到相关文章

最新更新