-
-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] 单独设置每根蜡烛图的颜色 #555
Comments
可以用自定义指标覆盖原有的k线柱实现 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
需求描述
希望每根K线可以自定义颜色,这样可以实现不同波段显示不同的颜色。
具体实现
增加颜色作为数据项一起传进去设置单个蜡烛图的颜色
// 为图表添加数据
chart.applyNewData([
{ color: '#FF0000', close: 4976.16, high: 4977.99, low: 4970.12, open: 4972.89, timestamp: 1587660000000, volume: 204 },
{ color: '#AAAAAA', close: 4977.33, high: 4979.94, low: 4971.34, open: 4973.20, timestamp: 1587660060000, volume: 194 },
])
The text was updated successfully, but these errors were encountered: