PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, April 23, 2022

[FIXED] How to define format for Drilldown Pie Charts in Highcharts

 April 23, 2022     highcharts, pie-chart, react-highcharts     No comments   

Issue

How can I define the format for Drilldown Pie Charts in Highcharts similar to the way we do it using series.dataLabels.format for normal pie charts?

This is code the way I have done it for a normal pie chart. Once I drilldown, I want to it be in some other format than {point.name}({point.count}): {point.y:.1f}%.

series: {                         
    dataLabels: {
        enabled: true,
        format: '{point.name}({point.count}): {point.y:.1f}% ',
        inside: true,
        position: {
            x: 10,
            y: -100
        }
    }
}

Solution

You can set wanted format inside the drilldown.series options.

Code:

drilldown: {
        series: [
            {
                    dataLabels: {
                    format: '{point.name} test test test'
                },
                name: "Chrome",
                id: "Chrome",
                data: [
                    [
                        "v65.0",
                        0.1
                    ]...
         }]
     }

Demo: https://jsfiddle.net/BlackLabel/f981q3vj/

API: https://api.highcharts.com/highcharts/drilldown.series



Answered By - Sebastian Wędzel
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,217,724

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing