<div id="container" style="width:100%; height:400px;"></div>
      $(function () { 
          var myChart = Highcharts.chart('container', {
              chart: {
                  type: 'column'
              },
              title: {
                  text: '2018 台北市長選舉 0281投開票所選舉資料'
              },
              xAxis: {  
                  type: 'category'
              },
              yAxis: {
                  title: {
                      text: '單位:張',
                  },
              },
              series: [
                  {
                      name: '得票數',
                      colorByPoint: true,
                      data: [
                          {
                              name: '吳萼洋',
                              y: 2,
                          },
                          {
                              name: '丁守中',
                              y: 390,
                              color: "#031195",
                          },
                          {
                              name: '姚文智',
                              y: 180,
                              color: "#159818",
                          },
                          {
                              name: '柯文哲',
                              y: 418,
                              color: "#24d7d6",
                          },
                          {
                              name: '李錫錕',
                              y: 1,
                          },
                      ]
                  },   
              ],
          });
      });

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://code.highcharts.com/highcharts.js
  2. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js