1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

I want the tooltip to display a specific background color for the application while still...

Discussão em 'Angular' iniciado por Sidrameshwar Biradar, Setembro 23, 2024.

  1. I want the chart tooltip to display the application, vulnerabilities, and duration. However, for the application name in the tooltip, I would like it to have a background color.

    this.options.plugins = {
    tooltip: {
    callbacks: {
    // Suppress the default title (duration) rendering
    title: () => {
    return "";
    },
    // Suppress individual label rendering
    label: () => {
    return "";
    },
    // Combine everything in the afterBody
    afterBody: (context: any) => {
    console.log("context", context);
    const apps = context
    .map((item) => item.dataset.label)
    .join(", ");
    const duration = context[0].label;
    const vulns = context[0].raw;
    return [
    `application: ${apps}`,
    `vulnerabilities: ${vulns}`,
    `Duration: ${duration}`,
    ];
    },
    },
    },
    };`


    current behaviour for only applications:[​IMG]

    Expected behaviour for only applications i want like below colors for:[​IMG]

    Continue reading...

Compartilhe esta Página