devcat
Posts: 3
Joined: Tue Jun 22, 2021 4:14 am

Size after addAxis.

Hello.


1. Create a chart when the button is pressed. (Use addAxis method and addSeries method)
2. I want to create it under candle column. The chart size should be the same as before.

For example
https://jsfiddle.net/mczx9g34/2/

Thanks you.
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Size after addAxis.

Hello devcat!

Welcome to our forum and thanks for contacting us with your question!

As far as I see your demo does exactly what you've said. How can I help you with that? :)

Best regards!
Dominik Chudy
Highcharts Developer
devcat
Posts: 3
Joined: Tue Jun 22, 2021 4:14 am

Re: Size after addAxis.

Hello dominik.c!

If you look at the sample, it is produced in first axis.
For example, when adding TIRX series, I want it to be created at the end.
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Size after addAxis.

Hi again!

I'm not sure if I understand what you're looking for. You can specify to which axis should be the series added. If you comment line 22 the series will be added to the same axis to which does the aapl series belong.

Could you describe more precisely what you would like to achieve? Any image or sketch would be a huge help.

Best regards!
Dominik Chudy
Highcharts Developer
devcat
Posts: 3
Joined: Tue Jun 22, 2021 4:14 am

Re: Size after addAxis.

Oh, I'm sorry.

I am trying to create a series from the bottom of the series using addSeries/addAxis methods or wraper.
(The additional location is the same as the TRIX auxiliary indicator.)
However, if I do it the way I do it, the added series will overlap with the first series.

Thank you.

(I want to add it like the blue area of the attached image.)
Attachments
20210629_152632.png
20210629_152632.png (20.35 KiB) Viewed 1356 times
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Size after addAxis.

Hi again!

Thanks for the explanation!

If you want to add series to the axis to which AAPL Volume series belongs to you can just assign it to yAxis number 1. If you'd like to create another axis that will be displayed under AAPL Volume you need to adjust its height and top properties to place it properly. I also suggest setting the margin on the navigator to 50 to make a place for the new axis.

API references:
https://api.highcharts.com/highstock/yAxis.top
https://api.highcharts.com/highstock/yAxis.height
https://api.highcharts.com/highstock/series.line.yAxis
https://api.highcharts.com/highstock/navigator.margin

Demo:
https://jsfiddle.net/BlackLabel/5qedfyat/

Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Stock”