apexcharts / Blazor-ApexCharts

A blazor wrapper for ApexCharts.js
https://apexcharts.github.io/Blazor-ApexCharts
MIT License
788 stars 91 forks source link

Unable to change Legend and Totals font colours on Donut and Radial Charts #492

Open khaljimbo opened 1 month ago

khaljimbo commented 1 month ago

Using Apex Charts version 3.3.0 I am unable to change the Font Colours of either the totals or Legends in my Donut and Radial charts

I am using the following for my Donut Chart for the Legend Lables

        options.Legend = new Legend
        {
            Show = true,
            Position = ApexCharts.LegendPosition.Bottom,
            Labels = new LegendLabels
            {
                Colors = new List<string> { "#450a0a" }
            }
        };

And for my Donut Chart Totals

        options.PlotOptions = new PlotOptions
            {
                Pie = new PlotOptionsPie
                {
                    Donut = new PlotOptionsDonut
                    {
                        Labels = new DonutLabels
                        {
                            Total = new DonutLabelTotal { FontSize="24px", Color = "#718096", Formatter = @"function (w) {return w.globals.seriesTotals.reduce((a, b) => { return (a + b) }, 0)}" }
                        }
                    }
                }
            };

The colours remain the default.

joadan commented 1 week ago

Hi,

For the total color I believe the sample is working, https://apexcharts.github.io/Blazor-ApexCharts/donut-charts#total Have you assigned your options to the chart?