KLineChart icon indicating copy to clipboard operation
KLineChart copied to clipboard

[Bug] Kline as line when precision as 8

Open qiaolevip opened this issue 1 year ago • 4 comments

Version

10.0.0-alpha2

Steps to Reproduce

  1. from the api example: https://klinecharts.com/api/chart/registerIndicator
  2. fork code from https://klinecharts.com/api/chart/registerIndicator#draw
  3. set data as small Demo: https://stackblitz.com/edit/pmkh6xgh?file=index.js
  4. then the kLine shows as line

Already setPrecision

chart.setPrecision({
  price: 8,
  volume: 8,
});

Current Behavior

image

Expected Behavior

image

Environment

- OS:Mac
- Browser:Chrome
- Framework:React@19

Any additional comments?

No response

qiaolevip avatar Jan 10 '25 03:01 qiaolevip

Change the precision of this indicator.

liihuu avatar Jan 15 '25 10:01 liihuu

Change the precision of this indicator.

You can see the online demo, already setting precision set data as small Demo: https://stackblitz.com/edit/pmkh6xgh?file=index.js

qiaolevip avatar Jan 17 '25 09:01 qiaolevip

https://stackblitz.com/edit/pmkh6xgh-wr4uhrjn?file=index.js

liihuu avatar Jan 18 '25 01:01 liihuu

@liihuu Is it possible to dynamically change precision based on the chart precision? I have a chart indicator that gets precision from the chart price.

inthedark122 avatar Jan 25 '25 07:01 inthedark122