-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Is there a way to edit tooltip contents (specifically in a line chart)? #444
Comments
Please use Basically, the default of |
It took me some time to figure it out. the function you want to be editing in is |
I'd like to exclude some data from my tooltip. I have the following: data:{ columns: [["d1",1,2,3,4] , ["t1",5,6,7,8]] } And I want to exclude the data "t1" from my tooltip. I'm trying to use tooltip.content, but it doesn't seem to be working. content: { contents: function(d, defaultTitleFormat, defaultValueFormat, color) { if (d[0].name == "d1") return d[0]; }} Do you have any suggestions? |
Hi, Please see this fiddle: http://jsfiddle.net/7kYJu/186/ Thanks. |
It seems that using 'data.order : null' has caused the shown stacking bottom-to-top in the stacked chart, top-to-bottom in tool-tip, and left-to-right in the legend. <also asked at:https://github.com/masayuki0812/c3/issues/1050> |
@kriticism Not entirely sure, I don't think arbitrarily ordering tooltip contents is supported at the moment. Might be worth asking the Google Group? |
I would like to add tooltip with key value pair using line chart. What i would like to acheive is something like below link please click redraw if it doesn't show tooltip at page load. how can we do that in c3 js? |
Hi there! Thank you |
The function to override is currently at line 1278 and no more at #L303, as indicated by @masayuki0812 at the top of this thread. |
i just make a trick wich allows avoid sort the tooltips to be shown as they are in the data array. Well, i just added a config property called tooltip_sorted initialized to true, about the line 1274 between tooltip_grouped property and tooltip_format_title. Then back to getTooltipContent, just before the check for config.data_groups.length added if config.tooltip_sorted === true, else do nothing. Then the two parts are now like:
the check for the new var
Now i can specify in the model if i want a tooltip sorted or not by:
|
tooltip: {
|
I would like to add to the tooltip additional data that is not shown in the chart. (not the y value of specific x's)
The text was updated successfully, but these errors were encountered: