[Google Charts] I figured out how to update it to get Gantt charts

[Google Charts] I figured out how to update it to get Gantt charts

  
Forge Component
(9)
Published on 2014-02-11 by André Vieira
9 votes
Published on 2014-02-11 by André Vieira

This details the changes in the loader to get the more recent Google visualizations: https://developers.google.com/chart/interactive/docs/basic_load_libs

I changed the expression in the GChart to suit:

google.charts.load('current', {'packages':['corechart','"+GetGChartTypeById.List.Current.GChartType.Package+"']});
google.charts.setOnLoadCallback(drawChart);

...and added a GanttChart record to GChartType with a Package of "gantt" (and a Class of "Gantt" - not sure where the Class is used)

The Gantt charts don't auto-size near as I can tell, so putting in 42 * the length of the records - with some adjustments if you change the chart options - seems to work.

The record structure that works is:

Hope that helps!

-- Ritchie Annand

nice one.

did you join the team and update the component? :D

Very cool! Do you want to publish it? just ask to join the team

The team? There are teams on here? How do I get in on this? :)

(Wondering what else to do to the component to clean up my changes)

Also: Google's Gantt chart is a very frustrating component - it's bad about font choices, doesn't respect arrow styles, re-sorts your lists based on dependency or sort-of-on start date and loses its rendering mind if the next row starts before the current row (e.g. if you're doing actuals versus projected)...

...but otherwise, it's quite nice :)

That's right, every component has its team. Belonging to a team allows you to upload new versions of the components. Just go to https://www.outsystems.com/forge/component-discussions/421/Google+Charts and ask to join the team.

If you want to share what you have we might be able to help you :)

Here's my update...

So... just Manage -> Upload New Version, then? Or should I have someone eyeball my changes first?

The changes look okay, just a small remark on the webblock changes:

you don't need to put an extended property to define the class, just put it on "Style Classes".


Also, it would be nice to have an example in the samples eSpace so that people can see it working and see how to use it.


Cheers!

Ah, of course! Just like containers.

It's not that necessary, mind. I thought that it might help with styling the contents, but it seems that Google does a rather inordinate amount of on-the-fly style generation (like inline font family on every text node) instead of deferring to CSS.

That's a good idea to have an example in the samples eSpace. I'll see if I can get some time for that :)