How do I plot a graph or chart on the confirmation message? How do I plot a graph on the confirmation message, on a webform and Drupal 8?
I searched a lot, but did not find anything useful, but these results.

There are several modules involved in graphing, including the Charts module.

There is a programming solution (Display webform results data in a Google Chart), but I don't think it works, since the site will contain dozens of questionnaires. Drawing charts should be easy, something similar to Twing or only in the confirmation message textBox area.

images files can be displayed if uploaded to the site via the questionnaire in this way (from How to Display Image after submitting webform in the confirmation message page).
&lt;img src=&quot;[submission:values:image_key]&quot;/&gt;


There are previous attempts at Drupal 7, such as the Webform Charts module. I don't know how it worked.
Since there doesn't seem to be a solution for this, I would define a webform handler that would preprocess the confirmation page with the chart that you generate.
There are plenty of D8 module for charting, and in the handler you have access to the webform submission values. You could even use a different method and save the chart image into a hidden image field on the submission. Handlers are sweet like that.
Check out WebformHandlerBase class/interface for the full method list. Checkout this other answer involving webform handlers to get you started. Once you have your handler, check out these examples for your methods.
Acting on presave()
/**
 * The example below demonstrates:
 * - retrieving a submission value
 * - processing it
 * - setting a field value to that result
 *
 * @param WebformSubmissionInterface $webform_submission
 *   A webform submission.
 */
public function preSave(WebformSubmissionInterface $webform_submission)
{
  $age = $webform_submission-&gt;getElementData('age');
  $ageChart = $this-&gt;someInjectedFooChartingService($age);
  $webform_submission-&gt;setElementData('age_chart', $ageChart-&gt;BarExportPng());
}

Acting on preprocessConfirmation()
/**
 * The example below demonstrates:
 * - retrieving a submission value
 * - processing it
 * - passing data to the confirmation template
 *
 * @param array $variables
 * @throws Exception
 */
public function preprocessConfirmation(array &amp;$variables)
{
  /** @var WebformSubmissionInterface $webform_submission */
  $webform_submission = $variables['webform_submission'];
  $age = $webform_submission-&gt;getElementData('age');
  $ageChart = $this-&gt;someInjectedChartingService($age);
  // Add data to the confirmation template
  $variables['agechart'] = $ageChart;
}