Highcharts circular progress bar measurement chart

To create a circular progress bar measurement chart using Highcharts, you can follow these steps:

  • Include the Highcharts library in your HTML file. You can either download it from the Highcharts website or include it from a CDN like this:
<script src="https://code.highcharts.com/highcharts.js"></script>
  • Create a container element for the chart in your HTML file, like this:
<div id="chart-container"></div>
  • In your JavaScript code, define the data for the chart as a percentage value between 0 and 100. For example:
var value = 75;
  • Create a Highcharts chart object and configure it with the data and chart options. In this case, we want a gauge chart with a circular shape, so we'll set the chart type to 'gauge', and we'll use the 'pane' and 'yAxis' options to configure the shape and range of the chart, like this:
Highcharts.chart('chart-container', {
  chart: {
    type: 'gauge',
    plotBackgroundColor: null,
    plotBackgroundImage: null,
    plotBorderWidth: 0,
    plotShadow: false
  },

  title: {
    text: 'Measurement'
  },

  pane: {
    startAngle: -150,
    endAngle: 150,
    background: [{
      backgroundColor: '#EEE',
      borderWidth: 0,
      outerRadius: '100%',
      innerRadius: '90%'
    }]
  },

  yAxis: {
    min: 0,
    max: 100,
    lineWidth: 0,
    tickPositions: []
  },

  plotOptions: {
    gauge: {
      dataLabels: {
        enabled: false
      },
      dial: {
        radius: '100%',
        backgroundColor: 'black',
        borderColor: 'white',
        borderWidth: 1,
        baseWidth: 10,
        topWidth: 1,
        baseLength: '95%',
        rearLength: '0%'
      },
      pivot: {
        radius: 5,
        backgroundColor: 'white',
        borderColor: 'black',
        borderWidth: 1
      }
    }
  },

  series: [{
    name: 'Value',
    data: [value]
  }]
});

Note that we're using the 'pane' option to define the shape of the chart, and the 'yAxis' option to set the range of the chart. We're also using the 'plotOptions' option to style the chart elements, including the dial, pivot, and data labels.

  • Finally, add some CSS to style the chart container and make it responsive, like this:
#chart-container {
  width: 100%;
  height: 500px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

This will create a circular progress bar measurement chart using the specified data and options, and render it in the 'chart-container' element on your web page. You can customize the chart further by adjusting the options and adding additional features, like tooltips, legends, and labels.

  1. Customizing appearance in Highcharts Circular Progress Bar Measurement Chart:

    • Customize the appearance by adjusting chart options such as colors, size, and style.
    Highcharts.chart('container', {
        chart: {
            type: 'solidgauge',
            backgroundColor: '#f2f2f2',
            height: '200px'
        },
        title: null,
        pane: {
            startAngle: -90,
            endAngle: 90,
            background: [{
                backgroundColor: '#64b4dc',
                outerRadius: '100%',
                innerRadius: '80%',
                shape: 'arc'
            }]
        },
        yAxis: {
            min: 0,
            max: 100,
            lineWidth: 0,
            tickPositions: []
        },
        plotOptions: {
            solidgauge: {
                dataLabels: {
                    y: 5,
                    borderWidth: 0,
                    useHTML: true
                }
            }
        },
        series: [{
            name: 'Measurement',
            data: [75],
            dataLabels: {
                format: '<div style="text-align:center"><span style="font-size:20px;color:#333">{y}</span><br/><span style="font-size:12px;color:silver">%</span></div>'
            },
            tooltip: {
                valueSuffix: ' %'
            }
        }]
    });
    
  2. Adding data to Highcharts Circular Progress Bar Measurement Chart:

    • Add data for the circular progress bar within the series array.
    series: [{
        name: 'Measurement',
        data: [75],
        // Other configuration options...
    }]
    
  3. Interactive features in Highcharts Circular Progress Bar Measurement Chart:

    • Enable interactive features like tooltips and data labels for a user-friendly experience.
    plotOptions: {
        solidgauge: {
            dataLabels: {
                enabled: true,
                // Other data label options...
            }
        }
    },
    tooltip: {
        valueSuffix: ' %'
    }
    
  4. Implementing measurement charts in Highcharts:

    • Utilize the Solid Gauge Chart type to represent measurements with a circular progress bar.
    chart: {
        type: 'solidgauge',
        // Other chart options...
    }
    
  5. Circular progress bar chart for measurements using Highcharts:

    • Create a circular progress bar chart by configuring the start and end angles, background, and dataLabels.
    pane: {
        startAngle: -90,
        endAngle: 90,
        background: [{
            backgroundColor: '#64b4dc',
            outerRadius: '100%',
            innerRadius: '80%',
            shape: 'arc'
        }]
    },
    yAxis: {
        min: 0,
        max: 100,
        // Other yAxis options...
    }