blacklabel / indicators

Indicators plugin for Highstock by Black Label
http://blacklabel.github.io/indicators/
Other
35 stars 12 forks source link

Updating the options of indicators not working #61

Open anupai opened 7 years ago

anupai commented 7 years ago

Hi, I have to change the height and position of the indicator graph, on an event. i'm using the update method, but changes are not reflecting.

http://jsfiddle.net/anuPai/jLbrmqyx/

Here on clicking 'click', rsi indicator gets added. On clicking on 'change' i'm changing the height. But in graph it is not reflecting.

pawelfus commented 7 years ago

Thank you for reporting this bug. You are right, updating yAxis options is broken.

anupai commented 7 years ago

Any alternative way of updating these options available for this scenario?

pawelfus commented 7 years ago

You can directly update options in the Axis, demo: http://jsfiddle.net/jLbrmqyx/2/

    chart.indicators.allItems[0].options.Axis.options.top = '80%';
    chart.indicators.allItems[0].options.Axis.options.height = '15%';
        chart.yAxis[0].update({
            height: '75%'
        });