Mukil Deepthi
Mukil Deepthi

Reputation: 6472

how to change text color for legends in primeng charts

I am using basic charts in Primeng i.e Line, Bar and Pie chart in my angular 4 app. I would like to change the text color for the legends and x-axis and y-axis texts. I tried setting the options but noenter image description heret working. Can anyone please help me how to do this?

Please find attached the charts i am getting.

I tried setting the options

typescript: options: any; this.options = { legend: { fontColor: 'red' } };

i am using primeng v4.x Thanks

Upvotes: 0

Views: 3068

Answers (1)

Mukil Deepthi
Mukil Deepthi

Reputation: 6472

    this.options = {
        legend: {
            labels: {
                fontColor: 'white'
            }
        }
    };

The documentation for the chart options are available in : http://www.chartjs.org/docs/latest/axes/styling.html

Upvotes: 2

Related Questions