I tried another solution that swaps the svg text on a 'ready' listener:
var labels = {};
var rowInds = dataTable.getSortedRows([{ column: 0 }]);
for (var i = 0; i < rowInds.length; i++) {
var v = dataTable.getValue(rowInds[i], 0);
labels[v] = dataTable.getFormattedValue(rowInds[i], 0);
}
google.visualization.events.addListener(chart, 'ready',
function() {
var tags = container.getElementsByTagName('text');
$.each(tags, function() {
if (labels.hasOwnProperty(this.textContent)) {
this.textContent = labels[this.textContent];
}
});
});
However, the arbitrary ellipses added on long timeline labels that have
been grieved many, many times break the above entirely and so am no further
ahead.
Ho hum,
David
On Wednesday, September 15, 2021 at 4:03:26 PM UTC-4 David Shorthouse wrote:
> Hmm...I answered my own question.
>
> [ { c: [ { v: 1, f: "Smith" } ... ] }, { c: [ { v: 2, f: "Smith" } ... ] }
> ]
>
> Results in an error:
>
> Invalid data table format: column #0 must be of type 'string'.
>
> Can anyone offer a suggestion? Is it possible to change the row label
> after the groupByRowLabel has been invoked such that if I did have "Q1",
> "Q2", etc. used as row labels, swap them out for other values just prior to
> rendering?
>
> Thanks,
>
> David
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/d5678e2c-00bf-42b9-981e-1312ad1647dbn%40googlegroups.com.