Highcharts: How to make the chart appear even without data?

Asked

Viewed 358 times

2

I integrated the Highcharts chart with a tree. Then, when selecting a hierarchy in the tree, automatically the chart is loaded with the selected information. But when there is nothing selected in the tree, the graph disappears.

I would like to know how to show the graph, even when there is no data?

1 answer

2


In accordance with documentation you can do this by setting the property showAxes for true.

$('#container').highcharts({
        chart: {
            showAxes: true
        }
});
  • @lake Guimarães Correia Certo! It worked partially. It’s not showing the x axis, only the Y.

  • I get it. I believe it is not possible, but in parallel I bring you another possible solution: the use of noData (warn the user that there is no data to display). is in the documentation as well. http://api.highcharts.com/highcharts#noData

  • example of use: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/no-data-to-display/no-data-pie/

  • Got it. The first solution better meets my need. Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.