/ Charts

A simple stock charting library for Android supporting time-line and more

A simple stock charting library for Android supporting time-line and more

ikvStockChart

A simple stock charting library for Android, supporting time-line, k-line, macd, kdj, rsi, boll index, and interactive gesture operation, including left and right sliding to refresh, scaling, highlighting.

Usage

repositories {
    jcenter()
}

dependencies {
    compile 'com.wordplat:ikvStockChart:0.1.5'
}
<com.wordplat.ikvstockchart.InteractiveKLineLayout
        android:id="@+id/kLineLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
        final EntrySet entrySet = new EntrySet();
        entrySet.addEntry(new Entry(...));
        
        kLineLayout.getKLineView().setEntrySet(entrySet);
        kLineLayout.getKLineView().notifyDataSetChanged();
        kLineLayout.getKLineView().setKLineHandler(new KLineHandler() {
            @Override
            public void onLeftRefresh() {
                kLineLayout.getKLineView().refreshComplete();
            }

            @Override
            public void onRightRefresh() {
                kLineLayout.getKLineView().refreshComplete();
            }

            @Override
            public void onSingleTap(MotionEvent e, float x, float y) {

            }

            @Override
            public void onDoubleTap(MotionEvent e, float x, float y) {

            }

            @Override
            public void onHighlight(Entry entry, int entryIndex, float x, float y) {

            }

            @Override
            public void onCancelHighlight() {

            }
        });

ikvStockChart 支持 66 个属性配置,设置各个线条颜色大小参考 https://github.com/wordplat/ikvStockChart/blob/master/PROPERTY.md

        SizeColor sizeColor = kLineLayout.getKLineView().getRender().getSizeColor();
        sizeColor.setXXX();

Screenshot

S70417-010650

S70413-225235

S70413-225125

S70413-225055

S70413-225013

S70413-224945

S70413-224859

GitHub