docs: private void initGraphics() {
          if (Double.compare(getPrefWidth(), 0.0) <= 0 || Double.compare(getPrefHeight(), 0.0) <= 0 || Double.compare(getWidth(), 0.0) <= 0 ||
              Double.compare(getHeight(), 0.0) <= 0) {
              if (getPrefWidth() > 0 && getPrefHeight() > 0) {
                  setPrefSize(getPrefWidth(), getPrefHeight());
              } else {
                  setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
              }
          }
  
          segmentPane = new Pane();
  
          chartCanvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT);
          chartCanvas.setMouseTransparent(true);
  
          chartCtx    = chartCanvas.getGraphicsContext2D();
  
          pane = new Pane(segmentPane, chartCanvas);
          pane.setBackground(new Background(new BackgroundFill(backgroundPaint, CornerRadii.EMPTY, Insets.EMPTY)));
          pane.setBorder(new Border(new BorderStroke(borderPaint, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(borderWidth))));
  
          getChildren().setAll(pane);
  
          prepareData();
      }