Hi Mike,

This feature is not supported by the Timeline chart at this time. You can
make a feature request here:
https://github.com/google/google-visualization-issues/issues

On Thu, Sep 3, 2015 at 1:02 AM Mike O'Connell <[email protected]> wrote:

> Has anyone gotten 'style' columns to work for timelines or have any idea
> when they're going to be?
>
> As per the snippet below:
>
> console.log(google);
> google.load("visualization", "1.1", {
>     packages: ["timeline"]
> });
> google.setOnLoadCallback(drawMap);
>
> function drawMap() {
>     chart = new
> google.visualization.Timeline(document.getElementById('map_div'));
>
>     loadData();
> }
>
> function selected() {
> val = chart.getSelection()[0];
>     console.log(dataTable.getValue(val.row, 5));
> }
>
> function loadData() {
>     dataTable = new google.visualization.DataTable();
>
>     dataTable.addColumn({ type: 'string', id: 'President' });
>     dataTable.addColumn({ type: 'string', id: 'Name' });
>     dataTable.addColumn({ type: 'string', id: 'Tooltip', role: 'tooltip',
> 'p': {'html': true} });
>     dataTable.addColumn({ type: 'date', id: 'Start' });
>     dataTable.addColumn({ type: 'date', id: 'End' });
>     dataTable.addColumn({ type: 'number', id: 'ID', role: 'hidden' });
>     *dataTable.addColumn({ type: 'string', role: 'style' });*
>
>     dataTable.addRows([
>         [ 'Washington', 'prezi', '<div style="padding:
> 5px;"><p>sometool\'s tip</h1></div>', new Date(1789, 3, 30), new Date(1797,
> 2, 4), 1, *'color: green'* ],
>         [ 'Adams', 'prezi', '<div style="padding: 5px;"><p>sometool\'s
> tip</h1></div>',      new Date(1797, 2, 4),  new Date(1801, 2, 4), 2, *'color:
> red'* ],
>         [ 'Jefferson', 'prezi', '<div style="padding: 5px;"><p>sometool\'s
> tip</h1></div>',  new Date(1801, 2, 4),  new Date(1809, 2, 4), 3, *'color:
> blue'* ]]);
>
>     var options = {
> avoidOverlappingGridLines: false,
>         tooltip: { isHtml: true },
>         timeline: { barLabelStyle: {fontName: "arial", fontSize: "8" }}
>     };
>     google.visualization.events.addListener(chart, 'select', selected);
>
>     chart.draw(dataTable, options);
> }
>
> If it's not supported can I make the feature request at the same time?
>
> --
> 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
> http://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/b0e2eb64-5307-4df8-b1e8-1f5459c9f212%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/b0e2eb64-5307-4df8-b1e8-1f5459c9f212%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAEwwup7aOkuPpu1xsGvd0%3DULSOcXG41WRnPQ8DMdqPNaF9fQhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to