KLineChart
KLineChart copied to clipboard
Feat heikin ashi bars
(Feat) Implement heikin ashi bars
Summary
This PR implements Heikin Ashi candle type.
Changes Made
-
getDataList now supports a boolean flag to determine if the data returned should be mutated to fit the selected candle type
-
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
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