Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How replicate the value of Y Axis on both sides of the axis in Highcharts

I need only replicate the value of Y axes on both sides os the axis. Note that my chart DOES NOT have multiple axes.

Look the example: [http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/bar-basic/]

I know it's something simple, but I could not find the solution.

Please guide me. Thanks in advance.

like image 608
PradoComp Avatar asked Apr 02 '13 13:04

PradoComp


People also ask

What is the opposite of y axis?

the x-axis is the point (x,-y). When you reflect a point across the y-axis, the y-coordinate remains the same, but the x-coordinate is transformed into its opposite (its sign is changed). Notice that B is 5 horizontal units to the right of the y-axis, and B' is 5 horizontal units to the left of the y-axis.

What is tick interval in Highcharts?

The width of the grid lines extending the ticks across the plot area. Defaults to 1 on the Y axis and 0 on the X axis, except for 3d charts. In styled mode, the stroke width is given in the . highcharts-grid-line class.

What is y axis in chart?

Charts typically have two axes that are used to measure and categorize data: a vertical axis (also known as value axis or y axis), and a horizontal axis (also known as category axis or x axis).


1 Answers

You still need to specify multiple axes, and then you can use the 'linkedTo' and 'opposite' properties:

 yAxis: [{
                min: 0,
                title: {
                    text: 'Population (millions)',
                    align: 'high'
                },
                labels: {
                    overflow: 'justify'
                }
            },{
                linkedTo:0,
                opposite:true
            }],

.

Edit for clarification based on comment below:

Highstock, at the time of this writing, sets the opposite property as true for the yAxis by default.

However, Highstock is not a "version of Highcharts". Highstock is its own product, originating from and related to Highcharts.

All versions of Highcharts currently set opposite to false both axes by default - yAxis will be on the left, and xAxis will be on the bottom.

like image 68
jlbriggs Avatar answered Oct 13 '22 20:10

jlbriggs