-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use c3 instead of nvd3 #3571
Comments
@eloyekunle: GitHub didn't allow me to assign the following users: eloyekunle. Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@eloyekunle Will you be working on it? |
@maciaszczykm Yes I will. |
Great :) |
I'm wondering if we shouldn't use d3 directly instead of using wrappers (like nvd3 and c3). |
@eloyekunle Would be the best IMO. Is it much effort? |
We might have to create internal utility classes for the charts we'll need, so it's moderate effort. |
That's what I was trying to avoid, because then maintenance effort is bigger. Why is using some kind of framework not better? |
@floreks In my opinion, it is good to have our own implementation if there is not too much of it. We can control everything better direct access to d3 instead of using nvd3/c3 interfaces. Additionally less popular frameworks often deprecate pretty quickly. d3 seems to be stable for a really long time. @eloyekunle Do you have any proof of concept already so we can take a look at how much of utility classes are needed? |
@maciaszczykm No I don't have a proof of concept, but I'm working on one. |
I have a POC up at: https://github.com/eloyekunle/d3-angular-poc. The chart implementation is at: https://github.com/eloyekunle/d3-angular-poc/blob/master/charts/index.js, and it is used at: https://github.com/eloyekunle/d3-angular-poc/blob/master/src/app/chart/chart.component.ts#L23. This implementation is heavily influenced by nvd3:
The POC only has plain Pie and Donut charts now, without labels/legends/tooltips. Donut Chart similar to those on Node Detail Page: With a few modifications, the charts on the Node detail page can be replaced with this implementation, and we can add newer chart types as needs arise. |
This looks really nice. I'd prefer however to use Typescript also for charts wrapper to easily include that as part of our source code (if possible). Maybe as a Factory/Service that we could use to build charts. All necessary logic could be enclosed in i.e. |
nvd3 is not maintained for a long time and uses a very old version of d3. We should switch to something that is maintained and frequently updated, i.e. c3.
The text was updated successfully, but these errors were encountered: