-
Notifications
You must be signed in to change notification settings - Fork 187
Scatter Chart with new api approach #24
Comments
Hey @yang-wei that sounds great! I've thought a lot about the two different API approaches discussed in #9 and here's what I'd like to do: I'd like to offer both. So you'd create both the Finally, create a simple
This way, people can continue to use the simple, single-component chart for quick charts, or charts that don't need much customization. But if they want to customize the data series, they can access them using the nested Essentially, we'll adopt the nested What do you think? PS: Making pure React axes that are compatible with the existing d3 utilities we are using will be a pretty big job -- I've already looked closely into it. |
@yang-wei By the way, just so we don't overlap each other's work, I wanted to mention my plans for today: I'm going to try to hit the following three things:
But I'll leave the scatter chart to you. Feel free to give me your input/opinions on my proposed API described in the comment above. One small issue/error I've made: I've forgotten to put 'use strict' at the top of a lot of the files, but I definitely want to use strict mode. So if you could put that on any new charts, that would be great. |
Good one @esbullington !
Yes I think supporting 2 ways and legend(I think this is important!) will make this library greater and the So I am going to implement |
Great @yang-wei , that sounds perfect! I'm working on the common axes right now. If you have time for it, I'll submit the PR and let you review it first. Otherwise, I'll go ahead and merge it. One other thing I've noticed. In an effort to make things easy for users, I've been using The only change I'm making to the official SVG terms is using camel case in JS and JSX for SVG properties such as I'll be updating the docs and code to reflect this change. |
@esbullington I haven't figure out a clean way to support both api so I'd just open a pull request of
I saw your issue for next version (0.2.0) published, so I think it would be nice to push this up first. Anyway I will be working on it once I have time. Cheers ! |
Hey @yang-wei since you finished the scatter chart and we merged it, I'm going to close this issue now. If you have any additional questions or comments, please feel free to file another issue. Thanks again for all your help! |
I am experimenting with scatter chart and hope to discuss something with you before I commit. After reading some of the close issues/pr especially #9 , I really like the api approach like this.
For me this is more readable and user can fill in the color easily. So is that ok to open a pr with this approach of api design or you think it's better to keep current style?
Ya I also notice that we are facing component lifecycle issue if we depend d3.svg to render axes. Hope to come out with pure-react-rendering during my experiment.
The text was updated successfully, but these errors were encountered: