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

时间:2017-07-19 12:05:24

标签: gantt-chart column-width anychart

是否可以从AnyChart更改AnyGantt中月份列的宽度?

This how my table look like

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();

1 个答案:

答案 0 :(得分:0)

您在寻找变焦控制吗?

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