KLineChart icon indicating copy to clipboard operation
KLineChart copied to clipboard

Feat heikin ashi bars

Open Basttyy opened this issue 2 months ago • 0 comments

(Feat) Implement heikin ashi bars

Summary

This PR implements Heikin Ashi candle type.

Changes Made

  1. getDataList now supports a boolean flag to determine if the data returned should be mutated to fit the selected candle type

  2. Candle type style option now supports type 'heikin_ashi' which will make the chart display Heikin Ashi candles

Usage Example

const chart = init('container-div', {
  styles: {
    candle: {
      // 'candle_solid' | 'candle_stroke' | 'candle_up_stroke' | 'candle_down_stroke' | 'ohlc' | 'area'
      type: 'candle_solid',
    }
  }
})

Benefits

Users will now be able to use Heikin Ashi Candle type on their charts

Testing

✅ TypeScript compilation successful
✅ Build passes (ES and UMD modules)
✅ Type definitions generated correctly
✅ Manual testing carried out on sample project
✅ No breaking changes to existing API

Breaking Changes

None. This is a non-breaking additive change.

Sample Screenshot

Screenshot from 2025-11-20 18-13-01

Notes: There are merge conflict because my fork has merged some PR's which are still unmerged on this Repo. Hence those PR's have to be merged first

Basttyy avatar Nov 20 '25 17:11 Basttyy