Giter VIP home page Giter VIP logo

Comments (8)

techouse avatar techouse commented on May 26, 2024 2

The answer here is obvious: Don't use curves.

from fl_chart.

TobiasRump avatar TobiasRump commented on May 26, 2024 1

Hey, you need to set the the property for preventing overshooting:

 LineChartBarData(
    ...
      isCurved: true,
      curveSmoothness: 0.4,
      preventCurveOverShooting: true,  <--
     ...
  ),

from fl_chart.

guvanch07 avatar guvanch07 commented on May 26, 2024 1

okay, thank you for clarifying @TobiasRump

from fl_chart.

guvanch07 avatar guvanch07 commented on May 26, 2024

@TobiasRump Thanks
but faced other problem after adding preventCurveOverShooting, not all corners are curved
Screenshot 2024-05-03 at 13 10 19

from fl_chart.

TobiasRump avatar TobiasRump commented on May 26, 2024

@guvanch07 pls check the docs
you have three properties to manipulate the curve behavior:

PropName Description default value
isCurved curves the corners of the line on the spot's positions false
curveSmoothness smoothness radius of the curve corners (works when isCurved is true) 0.35
preventCurveOverShooting prevent overshooting when draw curve line on linear sequence spots, check this #25 false
preventCurveOvershootingThreshold threshold for applying prevent overshooting algorithm 10.0

from fl_chart.

edgarfroes avatar edgarfroes commented on May 26, 2024

So, I'm facing the same issue and I am NOT using curved lines, and all junctions are weird:

image

from fl_chart.

edgarfroes avatar edgarfroes commented on May 26, 2024

I just cloned the sample app and ran it without any modifications, and the result is the same, the corners are not matching.

Flutter: 3.19.6

I tested on both iOS Simulator and Android emulator. The print above is on an iPhone 11 physical device, and the print below is from an iOS Simulator.

image

from fl_chart.

edgarfroes avatar edgarfroes commented on May 26, 2024

By the looks of it, it appears to be a calculation error when painting the corners of the lines onto the right coordinates, which are the coordinates that match the connection between the end of said line and the start of the next one.

from fl_chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.