We don't directly support this use case. If your code is in Java, it might
be a little simpler to use our Data Source Library (
https://code.google.com/p/google-visualization-java/) to create a Data
Source that can be used with our queries, but beyond that we don't really
do anything to make this easier.

You may want to search for "web application read from SQL", to get an
overview of what to do, but the gist is that you will need a server,
written in some language. That server will do the actual reading from the
SQL datatable, and return the data in some format. Your JavaScript will
fire a request to this server, parse the data, convert it into a DataTable,
and use it in a chart.

If you would point to the pie chart example that you found, I could help
you convert it to an org chart. But beyond that, there's a lot of
non-visualization stuff that you need to figure out before you can actually
get the visualization working with data from SQL.

As for your second question, about setting options, you would set them in
the JavaScript, before you draw your chart. If you'll notice, our examples
(located at
https://developers.google.com/chart/interactive/docs/gallery/orgchart) have
a chart.draw(...) call that takes data and an object. That object is where
you need to put your options. For example, in the example on that page, the
draw call would turn into chart.draw(data, {collapsible: true, allowHtml:
true});

I hope that helps.

On Fri Nov 14 2014 at 12:32:08 PM Edward Sokolove <[email protected]>
wrote:

> I'm really trying to find an example of how to connect a SQL Server DB to
> populate the orgChart.  I've looked and have not found a good working
> example.  I found a really good one for a pie chart but not exactly sure
> how to convert it to an orgchart.  Any help would be greatly appreciated.
>
> On Monday, November 10, 2014 7:47:43 AM UTC-7, Edward Sokolove wrote:
>>
>> I wanted to know how I would integrate a recordset from a sql server
>> database?  I'm creating an org chart.  Also, how do I set options like
>> collapsible =true?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to