-
Notifications
You must be signed in to change notification settings - Fork 473
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
add rollover formatting options #490
Comments
+1 |
@almossawi one way we can make this easier to format is to make a series of tspans within the rollover text element, each one corresponding to the x accessor, y accessor, and perhaps something relating to the group if we have a multiline element. This should then reduce the problem to merely formatting tspans and changing the text within them, which should open up possibilities for other formatting options, if we want to go that direction. |
@hamilton Yes, as discussed. That sounds great. |
…essor on line graphs using tspans. Next step is to implement the argument, then generalize this for the other graph types.
…o come up with an example for functions.
There are issues with these commits. |
… are super ugly anyway. Helps toward #490.
The default rollover formatting options are very limited. We would like to include custom formatting options that are both powerful and easy. We will be including two new params:
x_rollover_format
andy_rollover_format
. It takes either a string (depending on what the data type is), or a function (for other / extended cases).STRING
When the accessor is a number, we will provide D3's native number formatting options: https://github.com/mbostock/d3/wiki/Formatting
When the acessor is a date, we will provide D3's native date formatting options: https://github.com/mbostock/d3/wiki/Time-Formatting
FUNCTION
If you pass in a function, you get the data point, as before. This should allow for every other useful case we care about.
The text was updated successfully, but these errors were encountered: