Tootltip doesnot contains all label. #12050
Unanswered
Peeyushmohapatra
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have created a Component that takes a prop type of
type TOrgChargerInstSubsDataApiRespData = { monthAndYear: string; organizationChargersInstallationSubscriptionHistory: { numberOfChargers: number; installationSubscriptionName: string | null; numberOfActiveChargers: number; numberOfInactiveChargers: number; }[]; }
and show the chart based on the data. I wanted a stacked bar chart.
Bars are working properly but when i hover on a bar i am only able to see one label instead of multiple
this is the whole component code.
`"use client";
import { useEffect, useRef } from "react";
import { useParams } from "next/navigation";
import { ChartConfiguration, ChartData, ChartOptions } from "chart.js/auto";
import dayjs from "dayjs";
import { useForm } from "react-hook-form";
import { getDictionary } from "@/app/dictionaries";
import { SelectInput } from "@/components/formControls/SelectInput";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/Card";
import { Form, FormControl, FormField, FormItem, FormMessage } from "@/components/ui/Form";
import { useChart } from "@/hooks/useChart";
import { TOrgChargerInstSubsDataApiRespData } from "@/schema/organization/installationSchema";
import { TOptionType } from "@/typings";
import { BAR_CHART_COLORS } from "@/utils/constants";
import { createUniqueColorPicker, generateRandomColor } from "@/utils/helpers";
interface Props {
chargerInstSubsData: TOrgChargerInstSubsDataApiRespData[];
}
export function OrgChargerStatusDistributionChart({ chargerInstSubsData }: Props) {
const chartRef = useRef(null);
const { lang } = useParams();
const { common, glossary } = getDictionary(lang as string, ["common", "glossary"]);
const form = useForm<{
orgChargerStatusDistributionDataType: "allChargers" | "activeChargers" | "inactiveChargers";
}>({
defaultValues: {
orgChargerStatusDistributionDataType: "allChargers",
},
mode: "onChange",
});
}
`
the tooltip should contains data like this
Beta Was this translation helpful? Give feedback.
All reactions