Skip to content
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

ScatterPlot: minX, maxX, minY, maxY #241

Closed
jawj opened this issue Jul 10, 2018 · 7 comments
Closed

ScatterPlot: minX, maxX, minY, maxY #241

jawj opened this issue Jul 10, 2018 · 7 comments

Comments

@jawj
Copy link

jawj commented Jul 10, 2018

I'm using nivo in a dashboard I'm putting together, which is going well so far. Thanks!

Using ResponsiveScatterPlot — I find I can set minX, maxX, etc, but these props don't seem to be respected, and still appear to be set to 0 (min) and auto (max).

Am I doing something wrong here, or is this a problem that could this be fixed in the library?

@jawj jawj changed the title minX, maxX, minY, maxY ScatterPlot: minX, maxX, minY, maxY Jul 10, 2018
@jawj
Copy link
Author

jawj commented Jul 10, 2018

Figured out I can use the scales prop to achieve this, but it feels a bit unpolished?

<ResponsiveScatterPlot scales={[
  { id: 'x', axis: 'x', domain: [0, 100] },
  { id: 'y', axis: 'y', domain: [0, 100] }
]} {... otherprops}/>

@plouc
Copy link
Owner

plouc commented Jul 12, 2018

Yep, sorry for the lack of reply, it's not well documented unfortunately :/ is it ok then, can I close this issue?

@jawj
Copy link
Author

jawj commented Jul 12, 2018

Sure — though I suggest it might be worth accepting minX, maxX etc. in line with the other chart types?

@jawj jawj closed this as completed Jul 12, 2018
@plouc
Copy link
Owner

plouc commented Jul 12, 2018

scales is the best way to deal with scales customization, I've exposed (min|max)(X|Y) on several charts for BC, but it only solve part of the problem, scales also allows to customize scale type (linear, categorical, time…) and I'd like to expose them for other charts as there is many issues regarding this feature.

@plouc
Copy link
Owner

plouc commented Jul 12, 2018

I think the behavior can become very unpredictable with overlapping properties.

@jawj
Copy link
Author

jawj commented Jul 12, 2018

OK, thanks — I'm sure you've thought more about this! I think partly I got confused by the existence of those properties near the top of the ScatterPlotDefaultProps object (lines 69 – 72), which it appears are never used?

@plouc
Copy link
Owner

plouc commented Jul 12, 2018

You're right, it should be removed then :/ I've created a new issue for this #243, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants