Using Anychart to plot volume on the same plot window of stock price

347 Views Asked by At

I am exploring AnyChart JS to plot candlestick stock chart. While Anychart.js has a dedicated component to plot trading volume on a second plot window, I am used to seeing volume plotted at the bottom of the price chart window. It just looks cleaner this way. The document does not mention plotting volume like this but that it can clearly be done as demo on one of their pages. ( page here: https://www.anychart.com/products/anystock/overview/ )

enter image description here

So I am wondering if anyone know of an "official way" of plotting volume in the same window of stock price or we have to hack it by plotting a second series (perhaps a third series even so we can show different colour of up and down days).

2

There are 2 best solutions below

2
On

The source code of this sample is available in the AnyStock gallery. The idea is to create a second series (Volume) on the plot and apply a custom series height and logarithmic scale to it.

0
On

Anychart support team provided the source code as per the sample shown in the earlier comment.

You need lines 48 - 67 in the sample - playground.anychart.com/BVHPxBya – AnyChart Support 2 hours