Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
React Chartist tooltip not showing up

I'm trying to use react chartist tool-tip and there are no errors but nothing shows up when the chart is hovered. Also it appears to be below my DOM i have also specified it to have position of absolute, and a height and width but it doesn't display anything.

const [options, setOptions] = useState({
    showArea: true,
    showLabels: true,
    fullWidth: true,
    high: 17,
    low: 0,
    chartPadding: {
      top: 20,
      right: 0,
      bottom: 0,
      left: -40,
    },
    axisX: {
      showGrid: true,
      showLabel: true,
      labelInterpolationFnc: function (value, index) {
        return index !== 0 && index !== data.labels.length - 1 ? value : null;
      },
    },
    plugins: [
      ChartistTooltip({
        appendToBody: true,
        pointClass: "ct-line-marker",
      }),
    ],
    axisY: { showLabel: true, showGrid: false },
  });

  const drawPoint = (ctx) => {
    if (ctx.type === "point" && ctx.index === markerIndex) {
      var circle = new chartist.Svg(
        "circle",
        {
          cx: ctx.x,
          cy: ctx.y,
          r: 7,
          "ct:value": ctx.value.y,
          "ct:meta": ctx.meta,
          style: "pointer-events: all !important",
        },
        "ct-line-marker"
      );
      ctx.element.replace(circle);
    }
  };

Chart Component

        <Chartist
          listener={{
            created: createGradient,
            draw: drawPoint,
          }}
          options={options}
          data={data}
          type={type}
        />
about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda