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

  • Home
  • SEARCH
  • 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 8933709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:36:42+00:00 2026-06-15T09:36:42+00:00

Short version – I want to modify the width/height of a google.visualization.PieChart object after

  • 0

Short version – I want to modify the width/height of a google.visualization.PieChart object after construction, but I can’t find any documentation pointing out how it’s done.

Context – I’m building a visualization that overlays a bunch of data on a Google Map. At certain lat/long coordinates I want to render a pie chart marker detailing certain statistics that are relevant to that place.

To avoid cluttering up the screen, I want to vary the dimensions of the pie chart markers based on the current zoom level. This requires me to either re-render all markers that are currently visible or, preferably, change the width/height attributes of all markers.

Pie chart on Google Map

I currently use the following settings to render my charts:

        legend: {position: "none"},
        width: 200,
        height: 200,
        backgroundColor: "transparent",
        pieSliceText: "none",
        colors: ["#C10001", "#F79647", "#92D051", "#558ED5", "#7F7F7F"],
        tooltip: {textStyle: {fontSize: 14}}

Is there a way to alter the dimensions of the chart after it’s created?

  • 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-15T09:36:44+00:00Added an answer on June 15, 2026 at 9:36 am

    The only working solution I have so far is to redraw the entire chart with changed width/height settings. This snippet uses jQuery.

    for (var i = 0; i < dataPoints.length; ++i) {
        var drawingOptions = $.extend({}, defaultDrawOptions);
        drawingOptions.width = defaultDrawOptions.width*(currentZoom/defaultZoom);
        drawingOptions.height = defaultDrawOptions.height*(currentZoom/defaultZoom);
    
        dataPoints[i].chart.draw(dataPoints[i].dataSource, drawingOptions);
    }
    

    As you can see, this half-baked solution is rather clumsy and might needlessly deteriorate performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Short version: How can I get a regex that matches a@a.aaaa but not a@a.aaaaa
Short version: Can a COM class modify its own virtual table entries at runtime?
Short version: How would i go about creating an object pool that can store
Short version: After branching in P4, how can I find out the source changelist
Short version: Can I grant access to external databases to a role? Long version:
Short version: How can I map two columns from table A and B if
SHORT VERSION OF QUESTION: So basically my question is: How can I set the
Short version : How can I drag Link 1 into one of the dropdowns
Short Version I want to extend SoapClient so it does this internally when accessing
short version: how can I get rid of the multiple-versions-of-python nightmare ? long version:

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.