Code Monkey home page Code Monkey logo

kchartdemo's Introduction

股票k线图

Mou icon Mou icon Mou icon

使用

1.	k线图 
		_kLineChartView = [[KLineChartView alloc] initWithFrame:CGRectMake(20, 50, self.view.frame.size.width - 40.0f, 300.0f)];
    	_kLineChartView.backgroundColor = [UIColor whiteColor];      		_kLineChartView.topMargin = 20.0f;
    	_kLineChartView.rightMargin = 1.0;
    	_kLineChartView.bottomMargin = 80.0f;
    	// YES表示:Y坐标的值根据视图中呈现的k线图的最大值最小值变化而变化;NO表示:Y坐标是所有数据中的最大值最小值,不管k线图呈现如何都不会变化。默认YES
    	//_kLineChartView.yAxisTitleIsChange = NO;
        
    	// 及时更新k线图
    	//_kLineChartView.dynamicUpdateIsNew = YES;
        
    	//是否支持手势
  	    //_kLineChartView.supportGesture = NO;

2. 分时图
		_tLineChartView = [[TLineChartView alloc] initWithFrame:CGRectMake(20, 380.0f, self.view.frame.size.width - 40.0f, 180.0f)];
        _tLineChartView.backgroundColor = [UIColor whiteColor];
        _tLineChartView.topMargin = 5.0f;
        _tLineChartView.leftMargin = 50.0;
        _tLineChartView.bottomMargin = 0.5;
        _tLineChartView.rightMargin = 1.0;
        _tLineChartView.pointPadding = 1.6;
        _tLineChartView.flashPoint = YES;
        // 圆滑的曲线
        //_tLineChartView.smoothPath = NO;

注意⚠️

  1. 其他参数设置可以查看KLineChartView.h & TLineChartView.h 头文件。
  2. 网络请求查看 KLineListManager.m 文件。
  3. 数据处理查看 KLineListTransformer.m 文件。

其他

1.k线图功能比较完整,如有不同需求,可以自行改动就能满足需求。

2.在使用的过程中有什么不明白的地方可以给我提 Issues

3.为什么不适用pod管理的原因,希望能够提供让更多的人参与自行修改,能够定制自己的k线图。

4.GNetworkinghttps://github.com/DerClown/GNetworking这个网络请求,是我借鉴 YTKcasatwy 写的一个高性能的网络框架。在这里非常感谢猿题库团队casatwy做出的贡献。

kchartdemo's People

Contributors

derclown avatar dong1721 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

Watchers

 avatar  avatar  avatar  avatar  avatar

kchartdemo's Issues

请问怎么控制x轴分时图 宽度? 除了设置pointpading

比如图中,后台返回的数据只能到15:00左右,还要预先留出到凌晨6:00的空间。 这个分时图显示宽度除了用pointpading控制么? 我能想到的就是补全下数据, 把剩下补充到凌晨6点。 您有什么好的思路实现图中样式呢? 希望能给些思路哈
img_2647

分时图的动态数据刷新

这里没有分时图的动态刷新吧 只有K线图的么 而且k线图提供的方法还注释了 我打开了也找不到刷新的方法哎

关于数组越界 为什么设置pointPadding数值为1.5时候,会崩溃?

我下的就是最新版本。我想看着您写的项目写一遍,希望您不忙时候帮忙能解答下, 不胜感激!!
这里有点不明白 ceil(quarteredWidth/_pointPadding) 为什么要这么算?

self.kGraphDrawCount = floor(((self.frame.size.width - self.leftMargin - self.rightMargin -self.pointPadding) / self.pointPadding));

2016-09-22 2 08 03

很好用,可是有几个问题

我想用第三方的,仅仅为了画k线,但是看了下demo,发现里面并不是纯粹的画线,传入数据格式,通讯方式,感觉是有点不方便,因为业务原因只能用自己的通讯方式,从demo里还要剥离通讯层,最后我都不知道哪部分是我需要的,那些是我用不到的。
希望能改成纯粹的画线的第三方,最好有一个传入数据的方法或属性,给个说明,从pod安装。感觉这样会好一些。

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.