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

Support Scatter charts #143

Closed
jithine opened this issue Jun 15, 2017 · 3 comments
Closed

Support Scatter charts #143

jithine opened this issue Jun 15, 2017 · 3 comments

Comments

@jithine
Copy link

jithine commented Jun 15, 2017

First of all thanks for this amazing library. Would it be possible to add Scatter type charts to existing supported ones? http://www.chartjs.org/docs/latest/charts/scatter.html

@intrueder
Copy link

@jithin1987
From docs,

To use a scatter chart, data must be passed as objects containing X and Y properties

That's all you need.

@jithine jithine closed this as completed Jun 16, 2017
@kumarharsh
Copy link
Contributor

@intrueder yes, that makes sense. But while translating chartjs directly to react code, I was expecting this to work:

import { Scatter } from 'react-chartjs-2';

Which would have been equivalent to what you write in vanilla js: var scChart = Chart.Scatter(canvas, {...}).

Chart.Bar, Chart.Line, etc are exposed, so why not Chart.Scatter too? Just to be clear, I don't have a big problem with using Line for scatter chart per se, but for clarity and equivalence with chartjs API, it might be a good to have...

@kumarharsh
Copy link
Contributor

FYI, there are some more settings involved for rendering a proper scatter chart using line charts. Refer to the defaults in this PR: chartjs/Chart.js#4381

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

3 participants