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

Docs for scatter chart are not correct #3118

Closed
georgeu2000 opened this issue Aug 9, 2016 · 4 comments
Closed

Docs for scatter chart are not correct #3118

georgeu2000 opened this issue Aug 9, 2016 · 4 comments

Comments

@georgeu2000
Copy link

The docs for the scatter chart do not seem to be correct:

  1. The example does not render a scatter chart. The line is connected.
  2. The docs reference a showLines config. This does not seem to do anything.
  3. To get the scatter chart to render, I used:
datasets: [{
    label: 'Scatter Dataset',
    showLine: false,
    data: [{
        x: -10,
        ...

I can update the docs, but didn't understand why there is a showLines config and what it is supposed to do.

@etimberg
Copy link
Member

etimberg commented Aug 9, 2016

@georgeu2000 that looks like the docs are not clear. When specified per dataset, the option is showLine. When specified for the entire chart it is showLines. I will happily merge a PR making updates here. An example of showLines working for the entire chart is https://jsfiddle.net/uLvq3qon/1/

The showLine config turns off the line connecting the points. A scatter chart is built from a line chart, because the action of updating all the points is identical and we wanted to reuse code. We use the option to turn off the line. It should be set to false by default in the default scatter chart config (here https://github.com/chartjs/Chart.js/blob/master/src/charts/Chart.Scatter.js#L5)

@georgeu2000
Copy link
Author

OK, I'll see about updating the docs.

There's a scatter type?

The docs use type line for scatter charts. Is there any reason to not use the scatter type?

@etimberg
Copy link
Member

the docs should be using type: 'scatter'

@etimberg etimberg added this to the Version 2.5 milestone Oct 23, 2016
etimberg added a commit that referenced this issue Dec 30, 2016
… for the comparison table. Fixed #3547, #3490, and #3118  while at it.
etimberg added a commit that referenced this issue Jan 8, 2017
… for the comparison table. Fixed #3547, #3490, and #3118  while at it.
@etimberg etimberg modified the milestones: Version 2.6, Version 2.5 Jan 15, 2017
@etimberg
Copy link
Member

Fixed in #3751

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

No branches or pull requests

2 participants