Skip to content

How do you add text at the center of a doughnut chart? #183

@Vruttant

Description

@Vruttant

Describe your question

How do you add text at the center of a doughnut chart?

Which Blazor project type is your question related to?

  • Client-Side

Which charts is this question related to?

  • Doughnut Chart

JavaScript equivalent

{       
        ...
        var text = "75%",
        textX = Math.round((width - ctx.measureText(text).width) / 2),
        textY = height / 2;
        ctx.fillText(text, textX, textY);
        ctx.save();
        ...
}

Additional context

https://jsfiddle.net/cmyker/ooxdL2vj/

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions