Good day, guys!

I use a timeline chart to visualize a vacations schedule in my organization.
Now it looks like this:

<https://lh3.googleusercontent.com/-VN5VtAFgvAs/V_MvYZmMIGI/AAAAAAAABYI/EmvmZ_SIFcYgGQCJjI0LWYn4JfrHg8p_gCLcB/s1600/Vacations.PNG>
What I want is to copy it on the top of the chart.
Here you can find the adding of the chart on a page

var container = document.getElementById('chart');
        var chart = new window.google.visualization.Timeline(container);
        var dataTable = new window.google.visualization.DataTable();
 
        dataTable.addColumn({ type: 'string', id: 'Name' });
        dataTable.addColumn({ type: 'string', id: 'BarDates' });
        dataTable.addColumn({ type: 'date', id: 'Start' });
        dataTable.addColumn({ type: 'date', id: 'End' });
        dataTable.addColumn({ type: 'string', role: 'tooltip' });
        var beginStr = "";
        var endStr = "";
        for (var i = 0; i < rows.length; i++) {
            var elems = rows[i].split(',');
            var begin = new Date(elems[1]);
            beginStr = (begin.getDate() < 10 ? '0' + begin.getDate() : 
begin.getDate()) + '/' +
            (begin.getMonth() + 1 < 10 ? '0' + (begin.getMonth() + 1) : 
begin.getMonth() + 1);
            var end = new Date(elems[2]);
            endStr = (end.getDate() < 10 ? '0' + end.getDate() : end.getDate()) 
+ '/' +
            (end.getMonth() + 1 < 10 ? '0' + (end.getMonth() + 1) : 
end.getMonth() + 1);
            if (beginStr === endStr) {
                isHidden = true;
            }
            if (elems.length > 1) {
                dataTable.addRow([elems[0], beginStr + ' - ' + endStr, begin, 
end, elems[3]]);
            } else {
                count = elems[0] - 0;
            }
        }
 
        var options = {
            tooltip: { isHtml: true },
            timeline: {
                colorByRowLabel: true
            },
            width: $('#chart').width(),
            hAxis: {
                minValue: new Date(date - 0, 0, 0),
                maxValue: new Date(date - 0 + 1, 0, 0)
            },
            backgroundColor: '#fff'
        };
 
        $('#chart').height(count * 42 + 60);
 
        chart.draw(dataTable, options);


In addition, there is a very strange behavior of months' names. They is 
chaning every refreshing of a page from English names to my native names. 

Please, help me cope with the problems.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/e5c94f69-ff60-4936-bcd0-a8bf495d8400%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to