HelmutSteiner
HelmutSteiner

Reputation: 99

Customizing y-axis in Highchart.js (stockchart)

Is it possible to customize the y-axis of my highchart so that every series will start from 100% and not as it is by default from 0% ?

Here is an example for better understanding:

http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/stock/demo/compare/

Here is the js code for showing the percentages in the y-axis:

plotOptions: {
            series: {
                compare: 'percent'
            }
        },

Upvotes: 0

Views: 43

Answers (1)

George Harris
George Harris

Reputation: 194

To simply reverse the y-axis, you could use

 yAxis: {
     reversed: true,
 },

http://www.highcharts.com/stock/demo/yaxis-reversed

If you're instead trying to display data starting from 100% and upwards, you could set the minimum value to be 100, like this:

 yAxis: {
     min: 100
 },

http://api.highcharts.com/highstock#yAxis.min

Upvotes: 1

Related Questions