Skip to content

Cant see tooltip data when hovering over multi line graph #146

@nguenauer

Description

@nguenauer

Describe the bug
When using a multiline Chart and hovering over a chart i cannot see any text in the tooltip. I would expect to see the value at the given point.

Expected behavior
See Value A and Value B at the mouse hoverpoint

Screenshots
Image

Additional context
Laravel 11, Livewire 3 Controller:

    protected function buildCallChart(Carbon $start, Carbon $end): LineChartModel
    {
        $invoices = Invoice::whereBetween('billing_period', [
            $start->format('Y.m'),
            $end->format('Y.m')
        ])->get();

        $grouped = $invoices->groupBy('billing_period')->sortKeys();

        $chart = (new LineChartModel())
            ->setTitle("Monthly Inbound vs Outbound Calls")
            ->setAnimated(true)
            ->withGrid()
            ->multiLine()
            ->withLegend()
            ->withDataLabels()
            ->setColors(['#3b82f6', '#ef4444']);

        foreach ($grouped as $month => $data) {
            $label = Carbon::createFromFormat('Y-m', $month)->format('M Y');
            $chart->addSeriesPoint('Inbound Calls', $label, $data->sum('incoming_calls'));
            $chart->addSeriesPoint('Outbound Calls', $label, $data->sum('outbound_calls'));
        }

        return $chart;
    }

Blade:
<livewire:livewire-line-chart key="{{ $chart->reactiveKey() }}" :line-chart-model="$chart" />

Couldn't find a reason why the tooltip stays empty. Appreciating any help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions