Funnel chart

author(s): Torstein Hønsi

by Rajesh Danabal

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/funnel.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>

<figure class="highcharts-figure">
  <div id="container"></div>
  <p class="highcharts-description">
    Chart showing a sales funnel. A funnel chart is often used to visualize
    data from stages of a process. Readers can quickly identify bottlenecks
    in the process by comparing the area size variation of each stage.
  </p>
</figure>

CSS

#container {
  height: 400px;
}

.highcharts-figure,
.highcharts-data-table table {
  min-width: 360px;
  max-width: 600px;
  margin: 1em auto;
}

.highcharts-data-table table {
  font-family: Verdana, sans-serif;
  border-collapse: collapse;
  border: 1px solid #EBEBEB;
  margin: 10px auto;
  text-align: center;
  width: 100%;
  max-width: 500px;
}

.highcharts-data-table caption {
  padding: 1em 0;
  font-size: 1.2em;
  color: #555;
}

.highcharts-data-table th {
  font-weight: 600;
  padding: 0.5em;
}

.highcharts-data-table td,
.highcharts-data-table th,
.highcharts-data-table caption {
  padding: 0.5em;
}

.highcharts-data-table thead tr,
.highcharts-data-table tr:nth-child(even) {
  background: #f8f8f8;
}

.highcharts-data-table tr:hover {
  background: #f1f7ff;
}

JavaScript

Highcharts.chart('container', {
  "chart": {
    "animation": false,
    "type": "funnel",
    "backgroundColor": "transparent",
    "events": {},
    "reflow": true,
    "options3d": {
      "enabled": false,
      "alpha": 0,
      "beta": 0,
      "depth": 100
    }
  },
  "title": {
    "text": ""
  },
  "subtitle": {
    "text": ""
  },
  "plotOptions": {
    "series": {
      "animation": false,
      "showInLegend": true,
      "borderColor": "",
      "borderWidth": 1,
      "allowPointSelect": true,
      "cursor": "normal",
      "turboThreshold": 0,
      "point": {
        "events": {}
      },
      "states": {
        "normal": {
          "animation": false
        },
        "inactive": {
          "opacity": 1
        },
        "hover": {
          "enabled": false
        }
      },
      "dataLabels": {
        "enabled": false,
        "style": {
          "color": "#777777",
          "fontSize": 12,
          "fontFamily": "Lucida Grande, Lucida Sans Unicode, Arial, Helvetica, sans-serif"
        },
        "inside": false,
        "align": "center",
        "rotation": 0,
        "x": null,
        "y": null,
        "backgroundColor": "rgba(230,230,230,0.75)",
        "useHTML": false,
        "crop": true,
        "borderColor": "",
        "borderRadius": 3,
        "borderWidth": 1,
        "padding": 2,
        "distance": 0,
        "shadow": false,
        "textOutline": false
      }
    },
    "funnel": {
      "dataLabels": {},
      "showInLegend": true
    },
    "funnel3d": {
      "dataLabels": {},
      "showInLegend": true
    }
  },
  "tooltip": {},
  "legend": {
    "enabled": true,
    "align": "left",
    "verticalAlign": "top",
    "layout": "horizontal",
    "navigation": {
      "activeColor": "#494949",
      "animation": false,
      "arrowSize": 12,
      "inactiveColor": "#e2e2e2",
      "style": {
        "color": "#333",
        "fontFamily": "Lucida Grande, Lucida Sans Unicode, Arial, Helvetica, sans-serif",
 ...