Code Monkey home page Code Monkey logo

lightchart's People

Contributors

felixb1010 avatar pichukov avatar rminsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lightchart's Issues

ChartLine cut off at min and max

Thanks a lot for this awesome library - it's a joy to use, and one of the few truly light and functional SwiftUI chart libraries out here. ๐Ÿ‘

One thing I noticed:
IMG_04D40C478EC9-1

I assume this happens because the line stroke is equally applied to both sides of the line, and then cut off by frame. It would probably make sense to vertically move the chart inwards by half of the stroke width, so that the stroke is no longer cut off.

Thanks again!

Chart does not show anything when all the data are equal

The chart does not show anything if all the elements in the array is same

Ex:

LightChartView(data: [10, 10, 10, 10, 10],
                               type: .curved,
                               visualType: .filled(color: chartColor, lineWidth: 5),
                               currentValueLineType: .dash(color: .gray, lineWidth: 1, dash: [5]))

I've even tried adding an offset, but the result is still same

LightChartView(data: [10, 10, 10, 10, 10],
                               type: .curved,
                               visualType: .filled(color: chartColor, lineWidth: 5),
                               offset: 0.2,
                               currentValueLineType: .dash(color: .gray, lineWidth: 1, dash: [5]))

Current behavior

  • The chart does not show anything if all the data are same

Expected behavior

  • The chart shows a horizontal line if all the data are same

Please fix this.
Thanks so much for this amazing SwiftUI library.

Add "firstValueLine" and "customValueLine"

This is not a bug, just a feature suggestion.

LightChart already comes with the currentValueLine, which draws a horizontal line at the last known value and works great.

I would like to suggest adding two more line types:

  • a firstValueLine (showing the first value in the data row)
  • one or multiple customValueLines (showing a horizontal line at a value to be defined by the user).

Background: I use LightChart for stock charts. It would be nice to draw a line at the first value of the chart (e.g. the opening price in the morning) or another arbitrary value (e.g. 0 or the closing price of the previous day).

Thanks for considering this! It's not urgent, but I think it would make a nice addition.

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.