是否可以从AnyChart更改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();
答案 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