Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to disable labels on x-axis and y-axis in amcharts V4 . Thanks

amcharts — ImgBB[^]

What I have tried:

I deleted this line then deleted my tooltip also
chart.cursor = new am4charts.XYCursor(); 

and tried this
chart.AxisLabel.disabled = true;

and this
chart.xAxes.label.disabled = true; 
Posted
Updated 6-Apr-21 8:11am
v3

How about consulting the amCharts 4 Documentation[^]?

Maybe try setting the disabled property on the relevant AxisLabel[^]?
 
Share this answer
 
Comments
gacar 6-Apr-21 11:37am    
I tried

chart.AxisLabel.disabled = false;

and this

chart.xAxes.label.disabled = false;

but didn't work.
Richard Deeming 6-Apr-21 11:38am    
Read the documentation again; if disabled = false, the label is enabled.

Set disabled = true and see what happens.
gacar 6-Apr-21 11:55am    
Yes right, i mistake, sorry. But i wrote true and didnt work also.
Dave Kreskowiak 6-Apr-21 12:30pm    
You're going to have to ask amCharts. Go to their site and click on the Support link at the top of the page.
gacar 6-Apr-21 12:32pm    
I am free user, i can't ask any.
I found solution:

JavaScript
var dateAxis = chart.xAxes.push(new am4charts.CategoryAxis());
var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());

valueAxis.cursorTooltipEnabled = false;
dateAxis.cursorTooltipEnabled = false; 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900