-
Notifications
You must be signed in to change notification settings - Fork 356
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
The option to place the labels on the bottom #21
Comments
@jsong0605 thanks for suggestion! For ex., below option will set text lower than the original position. var chart = bb.generate({
...
onrendered: function() {
d3.selectAll(".bb-texts .bb-text").each(function() {
var text = d3.select(this);
text.attr("y", (+text.attr("y") + 20))
});
}
}); We will take in considering for the next release. thanks! |
I really appreciate your answer! ~ :) As far as I'm concerned, the 'onrendered' function follows the default rendering on the default position. So, the blicking problem still remains to be resolved. Could I please have a solution for that matter, if you have one~ ? |
@jsong0605 you mean flickering of the text? well, in that occasion to avoid .bb-texts text.bb-text {
opacity: 0;
} var chart = bb.generate({
...
onrendered: function() {
d3.selectAll(".bb-texts .bb-text").each(function() {
var text = d3.select(this);
text
.attr("y", (+text.attr("y") + 20))
.style("opacity", "1");
});
}
}); Checkout the online demo : |
Yes, that's the issue what I meant. Thanks for the detail solution to detour the issue. :) |
Description
AFAIK, the labels are rendered on the upper-side of the chart by default.
There's no option to manipulate the position of labels, so far.
The easiest way (but bothering ;() is increasing the 'y' value of element manually.
However, changing the 'y' value by hand may cause a blink.
Because, this re-rendering follows the default rendering on the default position.
I'd like to place the label on the bottom by handling the option which could be a solution to the above problem at the same time.
If you guys have a possible way, please add it to the following release.
I believe that there must be other users who seriously need it.
Thanks ~ :)
Steps to check or reproduce
The text was updated successfully, but these errors were encountered: