Como desenhar uma legenda sobre um gráfico

Observação: Isso faz parte do exemplo “Galeria de gráficos com widgets ”.

Captura de tela que mostra um ponto aleatório de dois gráficos sendo destacado

A classe QChart fornece dois métodos que fazem o mapeamento entre as coordenadas da cena e o domínio da série (definido pelos intervalos dos eixos).

QPointF QChart::mapToPosition(const &value, QAbstractSeries *series) QPointF

QPointF QChart::mapToValue(const &position, QAbstractSeries *series) QPointF

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.