BlazorChartjs icon indicating copy to clipboard operation
BlazorChartjs copied to clipboard

Tooltip Style Modification

Open BuddhaCodes opened this issue 2 years ago • 0 comments

Hello there, the tooltip feature of the charts is amazing as it is, however it isn't flexible enough I think. I will like to request the options to being able to pass the BackgroundColor, Position and TitleColor

Something like this

Tooltip = new Tooltip()
{
    Callbacks = new Callbacks()
    {
        Label = (ctx) =>
        {
            return new[] { 
                $"DataIndex: {ctx.DataIndex}\nDatasetIndex: {ctx.DatasetIndex}" };
        },
        Title = (ctx) =>
        {
            return new[] { $"This is the value {ctx.Value}" };
        },
       BackgroundColor = new() { "#ffffff" }
    }
}

BuddhaCodes avatar Jul 19 '23 14:07 BuddhaCodes