code: private void drawSections() {
          if (sections.isEmpty()) return;
          sectionCtx.clearRect(0, 0, size, size);
          double xy       = size * 0.1875;
          double wh       = size * 0.625;
          double offset   = -ANGLE_RANGE * 0.5 - 90;
          int    listSize = sections.size();
          for (int i = 0 ; i < listSize ; i++) {
              Section section = sections.get(i);
              double sectionStartAngle;
              if (Double.compare(section.getStart(), maxValue) <= 0 && Double.compare(section.getStop(), minValue) >= 0) {
                  if (Double.compare(section.getStart(), minValue) < 0 && Double.compare(section.getStop(), maxValue) < 0) {
                      sectionStartAngle = 0;
                  } else {
                      sectionStartAngle = (section.getStart() - minValue) * angleStep;
                  }
                  double sectionAngleExtend;
                  if (Double.compare(section.getStop(), maxValue) > 0) {
                      sectionAngleExtend = (maxValue - section.getStart()) * angleStep;
                  } else if (Double.compare(section.getStart(), minValue) < 0) {
                      sectionAngleExtend = (section.getStop() - minValue) * angleStep;
                  } else {
                      sectionAngleExtend = (section.getStop() - section.getStart()) * angleStep;
                  }
                  sectionCtx.save();
                  sectionCtx.setStroke(section.getColor());
                  sectionCtx.setLineWidth(size * 0.18382353);
                  sectionCtx.setLineCap(StrokeLineCap.BUTT);
                  sectionCtx.strokeArc(xy, xy, wh, wh, -(offset + sectionStartAngle), -sectionAngleExtend, ArcType.OPEN);
                  sectionCtx.restore();
              }
          }
      }
docs: ******************** Drawing *******************************************