Pie chart tooltip for minimum slice
Hi there,
I have created a pie chart based on a data set (NAME, DESCRIPTION, VOLUME).
The category is based on row["NAME"] while the series is based on row["VOLUME"].
I've also set a minimum slice set at 2%, labelled "Others" and a mouseover tooltip for each slice displaying the DESCRIPTION, while the legend is based on NAME. This works well, except for the aggregated slice, where the tooltip shows the overall percentage of the slice (which makes sense since it cannot find a single DESCRIPTION in this case).
However, I was wondering if there was a way of displaying "Others" for the tooltip rather than the overall percentage?
Many thanks,
Cedric
I have created a pie chart based on a data set (NAME, DESCRIPTION, VOLUME).
The category is based on row["NAME"] while the series is based on row["VOLUME"].
I've also set a minimum slice set at 2%, labelled "Others" and a mouseover tooltip for each slice displaying the DESCRIPTION, while the legend is based on NAME. This works well, except for the aggregated slice, where the tooltip shows the overall percentage of the slice (which makes sense since it cannot find a single DESCRIPTION in this case).
However, I was wondering if there was a way of displaying "Others" for the tooltip rather than the overall percentage?
Many thanks,
Cedric
0
Comments
-
I made some progress with this issue, in that I modified the expression for the tooltip to the following:
if (row["DESCRIPTION"].indexOf("%")!=-1) {
"Others";
} else {
row["DESCRIPTION"];
}
Assuming that the description would be replaced by the overall percentage, if the contents of the description contained a % then it would be the aggregated slice otherwise it's a "normal" slice. However, this did not produce the desired effect, in fact it made no difference at all!
Changing the script to label the tooltip Others if it did not contain a % in the following way:
if (row["DESCRIPTION"].indexOf("%")==-1) {
"Others";
} else {
row["DESCRIPTION"];
}
Strangely, this replaced all tooltips with Others except for the aggregated slice which still displays the overall percent for this slice.
So I'm a bit confused here, if anyone can figure out what's wrong with this script, let me know,
Regards,
Cedric0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management