Petr,
You can specify the formatted representation of each value in your data
table. Instead of a value like "M", use {v: "M", f: "Male"}. The
formatted representation should then be used in all displays instead of the
value. The problem with this, however, is that you want two different
formatted representations, one for the Table and a different one for your
CategoryFilter. We don't have a way of dealing with that currently,
unfortunately.
One feature that we have been considering would support a formatting
function that you could provide in the Table or CategoryFilter options (for
example), and then your formatting function could do whatever it wants with
the values. This would have to apply to string values as well, of course.
But since you don't want to display your Tag column in your Table at all,
you can specify the columns you do want to display with a 'view' property
for your ChartWrapper. Like so:
"options": { "view": {"columns": [0, 1]} }
See the ChartWrapper docs at:
https://developers.google.com/chart/interactive/docs/reference#chartwrapper-class
On Fri, Nov 27, 2015 at 10:35 AM, Petr <[email protected]> wrote:
> Hi,
> I'm using CategoryFilter for selecting displayed data. Example:
>
> *Name Age Tag*
> John 50 M
> Ray 25 M
> Eve 33 F
> Child 3 C
>
> I do not want to display column "Tag", it is only used by CategoryFilter.
> I want to spare data volume, so I use "M" for "male", "F" for "female", "C"
> for "child". (The data are stored in JSON file).
> *The problem is, how to display in CategoryFilter "Male" instead of "M".*
>
> I have two solution, both are not nice:
> 1st: I can write "Male" instead of "M". But the data file is much bigger.
> 2nd: I can change the cells in DataTable after loading. But execution of
> this code takes some time as well.
>
> Is there any idea how to do that?
> It would be nice to have formatter enabling more complex transformations.
> But there is no formatter for string values.
>
> Any idea?
>
> --
> 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/1288f1cb-ddc3-400d-b704-bfb94bfd0582%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/1288f1cb-ddc3-400d-b704-bfb94bfd0582%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> -
978-394-1058
[email protected] <[email protected]> 5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton MA
--
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/CAOtcSJOmbbQAto7zq0qDq6HUy8rOuyjnjT_xVEFV2iHYmGXqLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.