# Highcharts - Spline Chart with Inverted Axes

#### Complete Python Prime Pack

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack

9 Courses     2 eBooks

Following is an example of a spline chart with inverted axes.

We have already seen configuration used to draw a chart in Highcharts Configuration Syntax chapter. Now, we will discuss an example of a spline chart with inverted axes.

## Configurations

Configure the chart type to be spline based. chart.type decides the series type for the chart. Here, the default value is "line".

Configure the axes to be inverted. When true x axis is vertical and y axis is horizontal – if a bar series is present in the chart, the same will be inverted. Here, the default value is false.

## chart

```var chart = {
type: 'spline',
inverted: true
};
```

## Example

highcharts_spline_inverted.htm

```<html>
<title>Highcharts Tutorial</title>
</script>
<script src = "https://code.highcharts.com/highcharts.js"></script>

<body>
<div id = "container" style = "width: 550px; height: 400px; margin: 0 auto"></div>
<script language = "JavaScript">
var chart = {
type: 'spline',
inverted: true
};
var title = {
text: 'Atmosphere Temperature by Altitude'
};
var subtitle = {
text: 'According to the Standard Atmosphere Model'
};
var xAxis = {
reversed: false,
title: {
enabled: true,
text: 'Altitude'
},
labels: {
formatter: function () {
return this.value + 'km';
}
},
showLastLabel: true
};
var yAxis = {
title: {
text: 'Temperature'
},
labels: {
formatter: function () {
return this.value + '\xB0';
}
},
lineWidth: 2
};
var legend = {
enabled: false
};
var tooltip = {
pointFormat: '{point.x} km: {point.y}\xB0C'
};
var plotOptions = {
spline: {
marker: {
enable: false
}
}
};
var series = [{
name: 'Temperature',
data: [[0, 15], [10, -50], [20, -56.5], [30, -46.5], [40, -22.1],
[50, -2.5], [60, -27.7], [70, -55.7], [80, -76.5]]
}];

var json = {};
json.chart = chart;
json.title = title;
json.subtitle = subtitle;
json.legend = legend;
json.tooltip = tooltip;
json.xAxis = xAxis;
json.yAxis = yAxis;
json.series = series;
json.plotOptions = plotOptions;
\$('#container').highcharts(json);

});
</script>
</body>

</html>
```

## Result

Verify the result.

highcharts_line_charts.htm