livewire-charts icon indicating copy to clipboard operation
livewire-charts copied to clipboard

Is there a way to change the hover title?

Open linusx opened this issue 3 years ago • 11 comments

Hello,

Right now on hover, the title says series-1 for a ColumnChartModel.

$usersChart = $users->reduce(function (ColumnChartModel $usersChart, $data) use ( $dashboard ) {
    $month = $data->first()->created_at->format('n');
    $value = $data->count();
    return $usersChart->addColumn($dashboard->months[$month], $value, $dashboard->colors[$month] );
}, (new ColumnChartModel())
    ->setTitle('Users Created')
    ->setAnimated($this->firstRun)
    ->withoutLegend()
);

I was wondering how to change that title?

Thanks.

linusx avatar Dec 05 '20 22:12 linusx

any updates here?

pmediavictor avatar Feb 15 '21 18:02 pmediavictor

has anyone been able to remove the series-1 hover from the ColumnChartModel? i need to remove it!

bertux77 avatar Apr 12 '21 17:04 bertux77

has anyone been able to remove the series-1 hover from the ColumnChartModel? i need to remove it!

I want to do this too

AllexNogue avatar Oct 06 '21 19:10 AllexNogue

@asantibanez can you help us with this? how to change the title "series-1" ?

AllexNogue avatar Oct 06 '21 20:10 AllexNogue

Hello, I have the same problem.

jappi00 avatar Dec 04 '21 14:12 jappi00

For anyone looking to remove the "series-1" text from the tooltip, adding the following CSS to my project's stylesheet worked:

.apexcharts-tooltip-text-label {
  display: none !important;
}

Hope this helps someone!

jimhlad avatar Jan 13 '22 20:01 jimhlad

Same here. Please add function to adjust series name and tooltip content in a single column chart

SDJeff avatar Jan 30 '22 08:01 SDJeff

I think the library changed because jimhlad's solution didn't work for me.

But this did the trick in a ColumnChartModel:

<style type="text/css"> .apexcharts-tooltip-text-y-label { display: none !important; } </style>

Slund avatar May 03 '22 09:05 Slund

Any update on this?

trippo avatar Dec 21 '22 09:12 trippo

@Slund @linusx @SDJeff @jimhlad I fix this problem with a new PR #80

You can use (new ColumnChartModel())->setTitle('Title') and the hover title use that title

trippo avatar Dec 21 '22 10:12 trippo