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

On Wednesday, September 15, 2021 at 3:50:30 PM UTC-4 David Shorthouse wrote:

> Hi all,
>
> I've been making timelines but have a homonymy issue in my data for the 
> row labels that I'd like to differentiate. I was hoping that I could use 
> object notation to feed unique "v" values & then format them with "f" as a 
> work-around, but that appears not to work.
>
> Example homonymy issue:
>
> [ { c: [ { v: "Smith" } ... ] }, { c: [ { v: "Smith" } ... ] } ]
>
> Attempted work-around:
>
> [ { c: [ { v: "Q1", f: "Smith" } ... ] }, { c: [ { v: "Q2", f: "Smith" } 
> ... ] } ]
>
> What I was hoping would happen here is that the values for "v" would be 
> used as the groupByRowLabel, which I additionally require, whereas the "f" 
> formatter would be used as display for the row labels. That way, identical 
> labels would show on render but I'd have separate rows because the grouping 
> happens on the value, not the format. However, the "Q1" and "Q2" above are 
> used as undesirable row labels and the "f" is ignored entirely. Evidently, 
> 'string'-type row labels cannot be formatted. 
>
> Would it make any difference if my row values were type number like this?
>
> [ { c: [ { v: 1, f: "Smith" } ... ] }, { c: [ { v: 2, f: "Smith" } ... ] } 
> ]
>
> 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 google-visualization-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/e785448f-cd3a-4590-a179-10ab789ac309n%40googlegroups.com.

Reply via email to