bobrosski
Posts: 1
Joined: Sat Nov 19, 2022 6:15 pm

Volume By Price indicator - Bin Width

Hello,

First time posting here :)

[My Request]
I was wondering if it is possible to adjust the bin size for the volume by price indicator for when there is lots of granular data as seen in the attached screenshot. I would like to make the bin size smaller so that I can better understand/interpret the volume by price distribution on 1 minute or tick level data.

[What I've Done]
I have looked through the documentation and tried different things with my JavaScript but could not find a solution.

[Additional Information]
I have attached the JavaScript I am working with here: https://jsfiddle.net/bobrosski/yhg2tmon/4/

The demo provided by highcharts can be found here: https://www.highcharts.com/demo/stock/s ... e-by-price

Best regards
Bobrosski
Attachments
Screenshot 2022-11-20 102125.png
Screenshot 2022-11-20 102125.png (53.34 KiB) Viewed 231 times
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Volume By Price indicator - Bin Width

Hi there!

Welcome to our forum, and thank you for contacting us with your question.

Those volume bars, that are rendered on the chart adjust their height automatically to the plot area height. Since you want to inspect the data on 1 minute timeframe, I guess that you would like to have more volume bars, than the default 12.

In that case, I would suggest using the API option called series.vbp.params.ranges and set it to a higher value. With that, you will have more bars than now, and they will be thinner, so the end goal should be reached!

API Reference: https://api.highcharts.com/highstock/se ... ams.ranges
Live demo (see lines 91-95): https://jsfiddle.net/BlackLabel/1em0r2ak/

Let me know if that's what you were looking for, and in case of any other questions, please do not hesitate to contact us anytime,
Have a great day!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Stock”