How to custom style of title donut chart
Question

I want to change color and font size of title  in <p>Proposal</p>

Now Title me like this


Solution

Hi Suchanya Roekplian,

You can use the below json

   "    title: {
        text: 'My custom title',
         style: {
            color: '#FF00FF',
            fontWeight: 'bold'
        }
    },

    subtitle: {
        text: 'Proposal',
                style: {
            color: '#FF00FF',
            fontStyle:'italic',
            fontWeight: 'bold',
            fontSize:'12px'
        }
    }"

For more info, Refer the document HightChartsAPI

Hope it helps!

Regards,

Ellakkiya.S

@Ellakkiya S very good! :)

I was trying to find a JSON that could do that, but until now, nothing.

One other solution, cannot you insert a class inside of <b class="donut-chart__title"> ... <b>

and then, on your theme you put

.donut-chart__title{

//and you insert here your styles?

}


Best regards,

Márcio

Replace <p>Proposal</p> with <p style=""font-size: 16px; color: #CECECE;"">Proposal</p>

Great minds think alike! :D It's great that solution, but inline styles it's not good to have, I am just replying to you because I was taught to not ever have inline styles. :)

Best regards,

Márcio

Solution

Hi Suchanya Roekplian,

You can use the below json

   "    title: {
        text: 'My custom title',
         style: {
            color: '#FF00FF',
            fontWeight: 'bold'
        }
    },

    subtitle: {
        text: 'Proposal',
                style: {
            color: '#FF00FF',
            fontStyle:'italic',
            fontWeight: 'bold',
            fontSize:'12px'
        }
    }"

For more info, Refer the document HightChartsAPI

Hope it helps!

Regards,

Ellakkiya.S

@Ellakkiya S very good! :)

Thankyou @Marcio Carvalho :)

Hi Suchanya Roekplian,

Is there is any update on the issue? Have you solved it? 


Regards,

Ellakkiya.S

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.