Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8312957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:20:00+00:00 2026-06-08T20:20:00+00:00

How can I make a pie chart fill 100% of the div it is

  • 0

How can I make a pie chart fill 100% of the divit is contained in? The div has a width of 198px and it’s height is 152px.

Additionally I would like to have a linear-gradient effect inside each pie slice, can you advise on how to do that?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:20:01+00:00Added an answer on June 8, 2026 at 8:20 pm

    You can achieve the full height of the pie chart by setting the size attribute in the plotOptions of pie and removing margins, spacing and titles from the chart.

    Code

        chart: {           
            margin: [0, 0, 0, 0],
            spacingTop: 0,
            spacingBottom: 0,
            spacingLeft: 0,
            spacingRight: 0
        },
        plotOptions: {
            pie: {
                size:'100%',
                dataLabels: {
                    enabled: false
                }
            }
        }
    

    Example (updated the fiddle to point to version 2.2.4)

    Here is an example demonstrating this.

    As to the linear gradients, I don’t know if they have been implemented yet, but here is an example showing radial gradients.

    Radial gradients are also part of Highcharts 3.0 now, here is an example

    Update

    Looks like as of Highcharts 3.0, this is not possible anymore due to the chart auto-scaling within the plot area, an excerpt from their documentation:

    size: The diameter of the pie relative to the plot area. Can be a percentage or pixel value. Pixel values are given as integers. The default behaviour (as of 3.0) is to scale to the plot area and give room for data labels within the plot area. As a consequence, the size of the pie may vary when points are updated and data labels more around. In that case it is best to set a fixed value, for example “75%”. Defaults to .

    in my opinion this should not be the case since dataLabels are disabled. should probably be logged as a bug

    Update (Aug 2014)

    As per Torstein’s comment, this is indeed still possible. slicedOffset needs to be set to 0 in addition to the margins begin set. (example)

    $(function () {
        $('#container').highcharts({
            title: null,
            chart: {
                type: 'pie',
                margin: 0
            },
            
            plotOptions: {
                pie: {
                    slicedOffset: 0,
                    size: '100%',
                    dataLabels: {
                        enabled: false
                    }
                }
            },
            
            series: [{
                data: [
                    ['Firefox',   44.2],
                    ['IE7',       26.6],
                    ['IE6',       20],
                    ['Chrome',    3.1],
                    ['Other',    5.4]
                ]
            }]
        });
    });
    #container {
        outline: 1px solid red;
        padding: 0;
    }
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="https://code.highcharts.com/highcharts.js"></script>
    <div id="container" style="height: 400px; width: 500"></div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone tell me how I can make a table be 100% height in
I'm trying to make a sort of pie-chart shape on a canvas element, however
I'm new to d3.js and Im trying to make a Pie-chart with it. I
I attempted to make a pie chart from scratch and it worked. The problem
I need to make a Pie Chart and Bar graph using Perl. I need
I can make my program write a .dat file with an array of Node
How can make a link within a facebox window that redirects it to another
I can make a single row IKImageBrowserView by setting the [imageBrowser setContentResizingMask:NSViewWidthSizable]; but in
I can make a variable's name from two variables' value: $a = 'tea'; $b
I can make a log in for easily, so that's not the problem. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.