Git Product home page Git Product logo

stockchart's Introduction

StockChart

自定义股票行情图,高仿某币app行情图**(持续更新中!!!)**具体绘制细节参考博客: https://blog.csdn.net/kemeng7758/article/details/106729748

功能

1.支持行情图左右滑动
2.支持行情图的惯性滑动
3.支持行情图的方法和缩小
4.支持BOLL和MACD技术指标(后面会继续丰富指标)
5.支持主图副图动态添加,尺寸修改等
6.支持长按滑动和长按弹框等

效果图

项目关键类

行情图容器:MarketFigureChart
行情图主图:KMasterChartView
行情图副图:KSubChartView(成交量、MACD)
手势处理:ChartTouchHelper
数据处理:ChartDataSourceHelper

使用方式(可参考MainActivity当中代码)

(1)布局当中引用

<com.guannan.chartmodule.chart.MarketFigureChart
  android:id="@+id/chart_container"
  android:layout_width="match_parent"
  android:layout_height="wrap_content" />

(2)然后在代码当中动态添加即可

// 行情图容器
mMarketFigureChart = findViewById(R.id.chart_container);

// 行情图主图(蜡烛线)
mKLineChartView = new KMasterChartView(this);
mMarketFigureChart.addChildChart(mKLineChartView, 200);

// 行情图附图(成交量)
mVolumeView = new KSubChartView(this);
mMarketFigureChart.addChildChart(mVolumeView, 100);

// MACD
mMacdView = new KSubChartView(this);
mMarketFigureChart.addChildChart(mMacdView, 100);

stockchart's People

Contributors

slamdunk007 avatar

Watchers

James Cloos 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.