New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pie Chart modificaiton of tooltip data #507
Comments
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
Original issue reported on code.google.com by |
I don't see how the documentation is fixed? It still shows that HTML tooltips should be supported by Pie Charts, when in reality they are not. |
@grabks the documentation still needs updating. I did not know I need to load the "1.1" version of the visualization API for them to work. |
Also, it seems that the tooltip column must be the 3rd column, or it won't work. It will fail to load/use the tooltip from any other column So, it seems that there are at least 2 requirements for HTML tooltip in Pie Charts, not mentioned anywhere in the docs:
|
@ragulka We generally don't update the documentation with which version to use, since 1.1 will eventually be pushed to 1.0, and a new release will be pushed to 1.1, and so on. You can read more about our release process here. As for the other question, given that the Pie Chart only supports two data columns and no other roles except 'tooltip', I'm not sure where the confusion here is coming from, since the documentation explicitly states that the third column and onward should be a role column. Perhaps we should make the charts throw an error when you give it extra columns? |
@grabks the confusion comes from the docs saying "column N (optional)". Since N can generally represent any number, and the Purpose is stated as "Optional roles", I did not see how this could explicitly state that the 3rd column should be the tooltip column. The way I understand it, is that any column starting from 3rd is optional, and the role is also optional. I don't think that throwing error when given an extra (non-role) column is good, as the optional columns are a great way to store metadata (IDs, slugs, etc) about each row. |
I see how this can be confusing now. The way I was seeing it is that the first two columns can be followed by any number of supported role columns (since the purpose is "Optional roles", but I suppose that doesn't make it clear that the roles for those columns are non-optional), where the only supported role is 'tooltip'. This would mean that you can follow it with any number of tooltip columns (although only one would really make sense). The pie chart throwing an error for extra columns wouldn't prevent you from using extra columns to store metadata, since you could always create a DataView that's just right for the pie chart, and then refer back to the original table for the metadata. You would already have to do this for other charts that have stricter data formats. I could also see us extending the pie chart to support multiple layers (like a sunburst), or multiple pie charts (like the gauge chart), where it would actually start to make use of the extra columns, so it's probably not a good idea to use extra columns for metadata for this reason. In any case, I filed an internal bug for us to improve the documentation, so it should be fixed soon. |
Here we are 3 1/2 years after the final post on this and still tooltips don't work on pie charts unless they are the third column and there's nothing in the docs about it. And, no 'tooltip' isn't the only valid role for pie charts, 'style' is a valid role too. I just wasted half a day trying to get tooltips to work before I found this post, thanks Google developers and tech writers. Time to look at Charts.js |
Not true, it does work now. I can confirm that this is working. You must have a column with: ' + key + ': <span style="color:' + colcolor + ';">' + val + ' ';} It renders as expected. |
Original issue reported on code.google.com by
ggriffin.mbi
on 2011-01-25 23:07:52The text was updated successfully, but these errors were encountered: