Giter VIP home page Giter VIP logo

jclinechartview's Introduction

JCLineChartView

参考几个画曲线图代码,然后综合起来写的一个曲线视图。

================================================================

已实现:

1、能够类似PNChart在一个view上画多条曲线。

2、曲线通过Catmull-Rom样条插值实现,曲线趋势由 前两点 + 当前点 + 后一点 形成插值点。

3、多点间可插入值为 CGFLOAT_MIN 的点,使曲线断开。

4、支持环形曲线区域内填充颜色。

5、支持输入两条曲线,对两条曲线内区域填充颜色。

================================================================

Demo中的使用例子:

1、同时画多条曲线。

2、画中间有断点的线。

3、用颜色填充曲线内部区域。

4、用颜色填充曲线内部区域,且画边框。

5、输入两条曲线,对两条曲线间的区域进行颜色填充。

Screenshot1

Screenshot2

Screenshot3

Screenshot4

================================================================

可与JCAdsorbScrollView配合使用,使滚动结束时自动吸附到曲线的点上。例子如下:

https://github.com/jimple/toy/tree/master/JCAdsorbScrollView

================================================================

参考了

PNChart的画曲线代码:

https://github.com/kevinzhow/PNChart

MPPlot的平滑曲线插值代码:

https://github.com/MP0w/MPPlot

jclinechartview's People

Contributors

jimple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.