JFreeChartWrapper - Gantt

Hi there,
I’m currently working on an internship project. The goal is to display data from a company database on a Gantt diagram, wrapped into a Vaadin portlet, and accessed on a Liferay portal.
So far, I managed creating a Gantt diagram using JFreeChart. One thing my tutors and I liked : the “click and drag zoom” (you can zoom in/out on different time scales by a simple click and drag on the Gantt diagram. Pleasant way to read its data.)
Then, I tried to add it to a Vaadin portlet using JFreeChartWrapper. It worked.

But ! I quickly discovered that JfreeChartWrapper first converted the chart to a png before adding it to the portlet. Which means that no more interactivity was possible. I mean, “pleasant interactivity”, cause I still have the zoom in/out components (datepickers/combobox for time chosing, actualize button which deletes the chart, updates it and adds it again, etc.) I implemented, but it’s much more annoying this way.
My tutors said that I would have to find something else (believe me I spend a lot of time researching) if I couldn’t fix it.

So, if you guys know a way to do so, I would be more than grateful !

Thanks,
TLM.

Have you already tried other related add-ons in Directory?
https://vaadin.com/directory#addon/gantt
https://vaadin.com/directory#addon/vaadin-gantt-diagram

If those are not suitable for your use case, there are some js-libraries which can be wrapped to work with Vaadin:
http://schweigi.github.io/angular-gantt/index.html
http://www.jsgantt.com/

About those two add-ons : my tutor said the first is not suitable, and he’s currently trying to get something out of the second add-on.

My knowledge is quite limited in javaScript (or “quite limited” simply :p). What does it mean to “wrap a js-library to work with Vaadin” ?

PS : the instruction is to code in java only.

TLM.

See for example this blog post:
https://vaadin.com/blog/-/blogs/vaadin-7-loves-javascript-components

Or see how my recent Sticky-addon is wrapping an existing javascript library into a Vaadin component: https://github.com/johannest/sticky

Thought, it requires a little bit of javascript coding too.

Okay, let’s see what I can do with it.

Thx for your help.

Hi,

You can also create some sort of gant charts with Vaadin Charts. See e.g.

http://demo.vaadin.com/charts/#ColumnRangeResourceUsage

cheers,
matti

Hi !

Indeed, there are interesting things in there ! Didn’t notice.
Just started trying to combine http://demo.vaadin.com/charts/#ColumnRangeResourceUsage with http://demo.vaadin.com/charts/#ForumTrends . Is it possible to do so ?

Thanks

  • EDIT -

Wait…
https://vaadin.com/directory/#addon/vaadin-charts:vaadin=7 is under CVAL 2.0 license, what does it mean ? I need free softwares/Open source…

Anayway, I’m currently trying to add a simple

Chart chart = new Chart(ChartType.COLUMNRANGE); (with all the code provided on the demo source) to my application, but I can’t figure a way to make it work.
I think I’m missing something. When lauching my project on a tomcat 7.0.42, I get the following error message :

Widgetset 'com.vaadin.DefaultWidgetSet' does not contain implementation for com.vaadin.addon.charts.Chart. Check its component connector's @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. I tried to fix it by changing @VaadinServletConfiguration annotation in my code. I looked for a correct wigetset file like “com.vaadin.addon.charts.Widgetset” to add in my project file under “WebContent/VAADIN/widgetsets” (and then set the param “widgetset=“com.vaadin.addon.charts.Widgetset”” in the annotation), but found nothing.

Could you explain me how to fix it ?

Cheers,
TLM

Hi,

Vaadin Charts is based on excellent, but commercial, Highcharts library, thus also Vaadin Charts als has its fee (includes special license for the underlaying Highcharts).

To make add-ons that contain client side extensions you need to compile (or create) your application widgetset. This is usually done by your tooling. E.g. If you have based your project on the maven archetype, just issue “mvn clean install” after you have added the dependency.

You can refer to
these instructions
.

cheers,
matti