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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:33:37+00:00 2026-06-14T10:33:37+00:00

I am working in Google visualization charts. I had designed a orgChart. Here is

  • 0

I am working in Google visualization charts. I had designed a orgChart. Here is my code.

 <script type='text/javascript'>
    google.load('visualization', '1', { packages: ['orgchart'] });
    google.setOnLoadCallback(drawChart);

    function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Name');
        data.addColumn('string', 'Manager');

        data.addRows([
    [{ v: 'TOP', f: 'TOP' }, ''],
    [{ v: 'TOP CO', f: 'TOP CO' }, 'TOP'],
    [{ v: 'TOP FR', f: 'TOP FR' }, 'TOP'],
    [{ v: 'EAST', f: 'EAST' }, 'TOP CO'],
    [{ v: 'WEST', f: 'WEST' }, 'TOP CO'],
    [{ v: 'FRAN', f: 'FRAN' }, 'TOP FR'],
    [{ v: 'ADIRAN', f: 'ADIRAN' }, 'EAST'],
    [{ v: 'FINGER', f: 'FINGER' }, 'EAST'],
    [{ v: 'CENTRAL', f: 'CENTRAL' }, 'WEST'],
    [{ v: 'NORTH', f: 'NORTH' }, 'WEST']
    ]);

   var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
   chart.draw(data, { allowHtml: true });

   google.visualization.events.addListener(chart, 'select', function () {
   var selection = chart.getSelection()[0];
   var label = data.getColumnLabel(selection.column);
   alert(label);
 });

}

I am very new to this concept. Whenever i am clicking any data, i am getting the error like

Microsoft JScript runtime error: Invalid column index undefined. Should be an integer in the range [0-1].

Whether the data format which i had given is wrong or else i need to any other thing. My requirement is, when i click the data means, the clicked value should be displayed in ALERT BOX.

  • 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-14T10:33:38+00:00Added an answer on June 14, 2026 at 10:33 am

    I realize that this is an old post, but I thought it might help others if it gets solved.

    You are not able to achieve your goal since the table visualization only handles row selections. The column will always be undefined.

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

Sidebar

Related Questions

I'm using gviz_api (google-visualization-python) to build some line charts. http://code.google.com/p/google-visualization-python/ I'e edited a line
I'm working with google annotated time line graphs: http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html My question is: I would
I had a perfect working Google Map, connecting to my Fusion Tables, with nice
Working with Google Maps, I have the following code: var tileNames = [base, parking,
I am working with JavaScript in a Google Spreadsheet and I would like to
Is is possible to have a working Google speech to text button in a
Working code: Google dictionary lookup via python and beautiful soup -> simply execute and
I am working with google map api ... http://code.google.com/p/gmaps-samples-flash/source/browse/trunk/samplecode/GeocodingSimple.mxml What i want to do
I am using Google visualization api. Following is my sample code. Either of the
I am working with Google map v3. And i am newbie with java script.

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.