Search code examples
javascriptchartshighchartsdata-visualizationangular2-highcharts

An alternative way of displaying the negative values on the column chart


I wonder if there's an alternative way of displaying the negative values on the column chart.

The bottom most value on the y axis should be the lowest value. The columns on the graph should grow from the bottom and upward to their corresponding values.

See images below with the current and expected behavior.

Current Expected


Solution

  • It will be best if you use threshold property:

    series: [{
        ...
        threshold: -20
    }]
    

    Live demo: http://jsfiddle.net/BlackLabel/0moe5q2y/

    API Reference: https://api.highcharts.com/highcharts/series.column.threshold