Reputation: 365
Is it possible to also draw tick lines along the top of the chart using highcharts for the x-axis? I have seen the opposite attribute:
But this inverts the x-axis ticks and labels. I simply wanted to also include some tick marks along the top for the x-axis as well. This is very typical in scientific plots.
Thanks
Upvotes: 0
Views: 644
Reputation: 7372
You can achieve it by adding an additional opposite x-axis linked to the main one with disabled labels:
Highcharts.chart('container', {
xAxis: [{}, {
linkedTo: 0,
opposite: true,
labels: {
enabled: false
}
}],
series: [{
data: [
439,
525,
571,
696,
970,
119,
137,
154
]
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container"></div>
Demo:
API reference:
Upvotes: 1