The DataTable is transformed by the chart code into the elements of the
visualization, typically SVG, but possibly HTML for a couple chart types
(e.g. Table).  The DataTable API does have a generic property mechanism, so
you can associate arbitrary property name-value pairs to columns, and these
would be available when you handle events related to the chart, once it has
been rendered.  But it is probably not a good idea to add css properties to
the visualization elements.  Since your goal is to manipulate the data,
then you can already do that via the event handlers built into charts.
Hope that helps.

On Tue, Aug 22, 2023 at 1:30 AM SJW <shannon.whi...@gmail.com> wrote:

> I have a table which can have some really long headers and a dynamic
> number of columns.
>
> I want to truncate these headers and move the column header into a title
> tag which shows on hover.
>
> So, ideally, I would want to add a class to the dynamic header columns. Is
> this possible?  From what I have read in the documentation it appears to
> not be possible but as the documentation is pretty cumbersome I wouldn't
> surprised if there was an undocumented method somewhere?
>
> Effectively
>
> ```
> // Initialise DataTable()
> var nonProdDollarsTable = new google.visualization.DataTable();
>
> // Column Setup
> nonProdDollarsTable.addColumn('string', 'No');
> nonProdDollarsTable.addColumn('string', 'Name');
> <?php if ($isGroup) : ?>
> nonProdDollarsTable.addColumn('string', 'Location');
> <?php endif; ?>
> nonProdDollarsTable.addColumn('string', 'Classification');
> nonProdDollarsTable.addColumn('number', 'Allocation');
> <?= $nonProdDollarsColData; ?>
> nonProdDollarsTable.addColumn('number', 'Total');
> ```
>
> So, all columns in the `$nonProdDollarsColData` I want to add a css class
> or something that identifies them to jQuery so I can manipulate the data.
>
> --
> 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 google-visualization-api+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/eb75cc2d-9e1d-4cd2-9354-b86fa09d0512n%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/eb75cc2d-9e1d-4cd2-9354-b86fa09d0512n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

• Daniel LaLiberte

 • SWE

 • Cambridge MA

 • dlalibe...@google.com <dlalibe...@google.com>

-- 
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 google-visualization-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJM2N-zJA%3DV2B%3Dj7BjYFfTyqDwd2KN2Sa%3Dt_%2Bbgi73uDZw%40mail.gmail.com.

Reply via email to