GithubHelp home page GithubHelp logo

spacenation / swiftui-charts Goto Github PK

View Code? Open in Web Editor NEW
662.0 662.0 60.0 902 KB

:rocket: SwiftUI Charts with custom styles

License: MIT License

Swift 100.00%
apple charts ios macos swift swift-library swift-package swiftui swiftui-example tvos watchos xcode

swiftui-charts's People

Contributors

aure avatar ay42 avatar beader avatar coledunsby 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swiftui-charts's Issues

How to add the label on each curve point of chart

Hi i am new to swiftui , i really like your chart but how to add lables on each pickpoints of chart

Chart(data: [0.0, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1])
.chartStyle(
AreaChartStyle(.quadCurve, fill:
LinearGradient(gradient: .init(colors: [Color.orange.opacity(0.7), Color.orange.opacity(0.7)]), startPoint: .top, endPoint: .leading)
)

            )

I want to show lable of each curve point of label

Thanks

Documentation Available?

Besides the short examples on the README file, is there any other documentation available? If the answer "read the source"?

Labels for Max Value

Hi @spacenation,

first of all, thanks for providing this amazing library!
Is there a way to add label for the largest (and maybe smallest) value to the left of a chart? That'd be really helpful for most of my use cases.

Thanks and best regards
Toni

Line charts upside down on WidgetKit

Depending on what your use-case desires: line charts out of the box will be upside down on widgets. To solve this remove all instances of rotationEffects -- and animations for good measure.

        //.rotationEffect(.degrees(180), anchor: .center)
        //.rotation3DEffect(.degrees(180), axis: (x: 0, y: 1, z: 0))

How to "zoom" or "scale"

Suppose I have value set of values that fluctuate between 0 and 1. The timeline goes up and down (lowest value 0) correctly.
Now suppose my next value is 50. I would like the timeline to "zoom out" (or "scale up") so that to place the next incoming value on screen proportinate to the previous numbers.
There is no way to know in advance what value I will receive next, it maybe be a negative value or some higher number as 500.

Is there a built-in solution for this? If not, how could I go about it? Many thanks.

ColumnChartStyle reverses data

I am on version 1.0. The ChartStyle influences the order of the input data as you can see in the screenshot.

As this is kind of unintuitive and I couldn't find any note that/why it is done this way I guess it's a bug.

image

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.