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 7552737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:51:35+00:00 2026-05-30T10:51:35+00:00

Hello I want to have a % in my google chart data i have

  • 0

Hello I want to have a % in my google chart data i have my data like a number but is not accepting % symbol.

    <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
    google.load("visualization", "1", {packages:["corechart"]});
    google.setOnLoadCallback(drawChart);
    function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Year');
data.addColumn('number', 'Sales');
data.addRows([
['Line 1', 71.36, 71.36871], 
['line 2', 3.07, 74.44134]
    ]);

    var options = {
      width: 400, height: 240,
      title: 'Company Performance'

    };

    var chart = new     
    google.visualization.LineChart(document.getElementById('chart_div'));
    chart.draw(data, {vAxis: {format:'#,#%'} } );
  }

I tried puting the data like

['Line 1', 71.36,'71.36%'], 
['line 2', 3.07,'3.07%' ]
    ]);
  • 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-05-30T10:51:37+00:00Added an answer on May 30, 2026 at 10:51 am

    Google charts accepts as to give a dictionary with two elements “v” from value and “f” from format.
    You can give your values as

    data.addRows([
    ['Line 1', {"v":71.36871,"f":"71.36%"}], 
    ['line 2', {"v":3.07,"f":"3.07%"}]
    ]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a vector: (def data [Hello World Test This]) And I want
In perl suppose I have a string like 'hello\tworld\n' , and what I want
I have a string: hello good old world and i want to upper case
Hello again Stackoverflow people! Assume I have these words: smartphones, smartphone I want to
I want to use/reuse C++ object with Objective-C. I have a hello.h that has
Say, I have a string hello is it me you're looking for I want
I have the following string: <SEM>electric</SEM> cu <SEM>hello</SEM> rent <SEM>is<I>love</I>, <PARTITION />mind I want
I have code like this <?php $array = array('http://www.google.com', 'http://www.facebook.com', 'http://www.twitter.com'); foreach ( $array
Hello i want to run this tutorial but i getting error on importing import
I am new to PHP but learning slowly. Problem I have is including Google

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.