anychart.onDocumentReady(function() {
anychart.format.inputLocale('ja-jp');
anychart.format.inputDateTimeFormat('yyyy.MM.dd');
anychart.format.outputLocale('ja-jp');
var treeData = anychart.data.tree(getData(), 'as-table');
chart = anychart.ganttProject();
chart.container('container');
var dataGrid = chart.dataGrid();
dataGrid.column(0).title().text('#');
dataGrid.column(1).width(250).title('title');
var c2 = dataGrid.column(2);
c2.labels().format(function() {
var start = this.actualStart || this.autoStart;
return anychart.format.date(start);
var c3 = dataGrid.column(3);
c3.labels().format(function() {
var end = this.actualEnd || this.autoEnd;
return (end === void 0) ? '' : anychart.format.date(end);
dataGrid.tooltip().format(tooltipFormatter);
chart.getTimeline().tooltip().format(tooltipFormatter);
function tooltipFormatter() {
var startDate = this.actualStart || this.autoStart;
var endDate = this.actualEnd || this.autoEnd;
var progress = this.progressValue;
if (progress === void 0) {
var auto = this.autoProgress * 100;
progress = (Math.round(auto * 100) / 100 || 0) + '%';
return (startDate ? 'start date: ' + anychart.format.date(startDate) : '') +
(endDate ? '\nend date: ' + anychart.format.date(endDate) : '') +
(progress ? '\nprogress: ' + progress : '');
{id: '1', name: 'Phase 1 - Strategic Plan'},
{id: '2', name: 'Self assessment', parent: '1'},
name: 'It defines the business vision',
actualStart: '2015.03.13',
name: 'To identify the available skills, information and support',
actualStart: '2015.03.25',
name: 'Decide whether you want to continue',
actualStart: '2015.04.07',
baselineStart: '2015.04.06',
baselineEnd: '2015.04.18'