JavaScript How to show sections on a radial progress bar?

I currently have a radial progress bar like a 'solid' border and I'd like to have a radial progress bar with sections (like a 'dashed' border but with more control on it).

What I'm looking for :

enter image description here

Here is what I have so far:

var el = document.getElementById('graph'); // get canvas

var options = {
  percent: el.getAttribute('data-percent'),
  size: el.getAttribute('data-size'),
  lineWidth: el.getAttribute('data-line'),
  rotate: 0
}

var canvas = document.createElement('canvas');
var span = document.createElement('span');
span.textContent = options.percent + '%';

if (typeof(G_vmlCanvasManager) !== 'undefined') {
  G_vmlCanvasManager.initElement(canvas);
}

var ctx = canvas.getContext('2d');
canvas.width = canvas.height = options.size;

el.appendChild(span);
el.appendChild(canvas);

ctx.translate(options.size / 2, options.size / 2); // change center
ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI); // rotate -90 deg

var radius = (options.size - options.lineWidth) / 2;

var drawCircle = function(color, lineWidth, percent) {
  percent = Math.min(Math.max(0, percent || 1), 1);
  ctx.beginPath();
  ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, false);
  ctx.strokeStyle = color;
  ctx.lineCap = 'round'; // butt, round or square
  ctx.lineWidth = lineWidth
  ctx.stroke();
};

drawCircle('#57d39d', options.lineWidth, 100 / 100);
drawCircle('#14928e', options.lineWidth, options.percent / 100);
div {
  position: relative;
  margin: 30px;
  width: 110px;
  height: 110px;
}
canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}
span {
  color: black;
  display: block;
  line-height: 110px;
  text-align: center;
  width: 110px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 30px;
  margin-left: 5px;
}
<div class="chart" id="graph" data-percent="30" data-size="110" data-line="6"></div>
Answer:1

I'm following this awesome blog and there is a simple example of generators with sending a value for the .next() method: var answers = [ `It is certain`, `It is decidedly so`, `Without a doubt`, `...

I'm following this awesome blog and there is a simple example of generators with sending a value for the .next() method: var answers = [ `It is certain`, `It is decidedly so`, `Without a doubt`, `...

  1. python generator input value

When I'm trying to do object-oriented pure JS with private methods, I frequently do the following (function(exports) { var Foo = function(num) { this.num = num }; var addTwo = function() {...

When I'm trying to do object-oriented pure JS with private methods, I frequently do the following (function(exports) { var Foo = function(num) { this.num = num }; var addTwo = function() {...

  1. private object functions
  2. javascript private functions in object

I have some text on a page which I get using a variable: <p class="category-list-replace">ksadj| lksd| sakdj</p> <p class="category-list-replace">sdawfe| nekesa</p> <p ...

I have some text on a page which I get using a variable: <p class="category-list-replace">ksadj| lksd| sakdj</p> <p class="category-list-replace">sdawfe| nekesa</p> <p ...

  1. replace characters html
  2. replace html characters javascript
  3. replace html characters c#
  4. replace html characters java
  5. replace html characters php
  6. replace html characters in sql
  7. replace html characters swift
  8. replace special characters html
  9. vba replace html characters
  10. js replace html characters
  11. python replace html characters
  12. mysql replace html characters
  13. oracle replace html characters
  14. jquery replace html characters
  15. html replace characters in a string
  16. replace special characters with html entities
  17. java string replace html characters
  18. php replace special characters html entities
  19. vb.net replace html characters
  20. javascript replace special characters html entities

I have a Table with JQuery's selectable feature.My Table was selectable each td which are in the same column. Below is my full html <html> <head> <link href="/css/jquery-ui....

I have a Table with JQuery's selectable feature.My Table was selectable each td which are in the same column. Below is my full html <html> <head> <link href="/css/jquery-ui....