vinu.felix
Posts: 2
Joined: Thu Feb 29, 2024 7:50 pm

A Query on highcharts

Hi,

Based on forum info I created a highcharts with the option to toggle between bar and pie charts. The 3 little lines(export) menu has been modified with a new menu item to toggle the chart type with the same data.
However I have 2 issues.
The chart is appearing like 'column' though the type is 'bar' (how to make it default horizontal bar type, Is it a bug in Highcharts?)
Also I'm not able to remove the axis label ('Values' and hide the numbers displayed on Y axis because I'm showing percentages and these numbers should be hidden).
Here is my jsfiddle code
https://jsfiddle.net/vinuf666/6gke7xa3/1/

any help is highly appreciated
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: A Query on highcharts

Hello and welcome to our forum!

It looks like the Pie chart type reverses the positions of the axes. So using chart.inverted: true as workaround solves this problem.

And to remove the title of a given axis, just set xAxis.title.text to an empty string.

Demo: https://jsfiddle.net/BlackLabel/k6Ley2t0/
API: https://api.highcharts.com/highcharts/chart.inverted
https://api.highcharts.com/highcharts/xAxis.title.text
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
vinu.felix
Posts: 2
Joined: Thu Feb 29, 2024 7:50 pm

Re: A Query on highcharts

michal.f wrote: Fri Mar 01, 2024 5:16 pm Hello and welcome to our forum!

It looks like the Pie chart type reverses the positions of the axes. So using chart.inverted: true as workaround solves this problem.

And to remove the title of a given axis, just set xAxis.title.text to an empty string.

Demo: https://jsfiddle.net/BlackLabel/k6Ley2t0/
API: https://api.highcharts.com/highcharts/chart.inverted
https://api.highcharts.com/highcharts/xAxis.title.text
Thank you :D

Return to “Highcharts Usage”