Search code examples
javascriptamcharts5

amCharts5 - How to Hide X-Axis Labels on Gannt Chart?


I'm trying to adapt this code (amCharts 5 Gantt Chart) to my project and want to hide the x-axis labels on this amCharts 5 gannt chart. Any thoughts on how to achieve this?


Solution

  • From their demo code, just before the following...

    chart.appear(1000, 100);
    

    Add the following...

    xAxis.hide();
    

    If that doesn't work for you, perhaps do it after the chart is shown (chart.appear(1000, 100);)?

    More information: https://www.amcharts.com/docs/v5/reference/axislabel/#hide_method