Skip to content

Line chart with tension of 0 renders incorrectly #2467

Closed

Description

@tomduncalf

As demonstrated at http://jsbin.com/wawowateru/2/edit?html,js,output a line chart with tension of 0 (to get straight lines) renders incorrectly. This worked correctly at 3166895 so a regression must have crept in.

For now, a workaround is to use a very small tension (e.g. 0.000001 - http://jsbin.com/zadiwohuxa/1/edit?html,js,output). I will try and have a look in to what is causing this myself, logging it here first though.

Activity

  1. added this to the milestone on May 5, 2016
  2. etimberg commented on May 5, 2016

    @etimberg
    Member

    I'm kinda surprised by this given that https://github.com/chartjs/Chart.js/blob/master/src/elements/element.line.js hasn't been touched in months but that might be the problem. I think the tension got removed from the points

  3. tomduncalf commented on May 5, 2016

    @tomduncalf
    ContributorAuthor

    Hm yes, that would make sense – not sure what the best way to address this is without context

  4. etimberg commented on May 5, 2016

    @etimberg
    Member

    Either the tension here needs to come from the line view and not the point view

    or

    https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.line.js#L197-L208 needs to also set the tension

  5. etimberg commented on May 6, 2016

    @etimberg
    Member

    PR to fix this in #2473

  6. tomduncalf commented on May 6, 2016

    @tomduncalf
    ContributorAuthor

    Nice, thank you!

    On 6 May 2016 at 12:22, Evert Timberg notifications@github.com wrote:

    PR to fix this in #2473 #2473

    —
    You are receiving this because you authored the thread.
    Reply to this email directly or view it on GitHub
    #2467 (comment)

  7. etimberg commented on May 7, 2016

    @etimberg
    Member

    Released in version 2.1.1.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions