Hi, I am a Freeplane/Sciplore (Docear) fan.
I am the only one in need of a GANNT chart to combine to Freeplane?
Let me know and we take it from there to propose this to the developers.
Thanks for your inputs.
fil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Download JFreeChart and copy jfreechart-1.0.13.jar and jcommon-1.0.16.jar to that directory.
Start Freeplane and add lib to Preferences -> Plugins -> Scripting -> Script -> Script classpath.
Create a script file ''gantt.groovy'' in the "scripts" directory in your freeplane user directory with the following content:
//@ExecutionModes({ON_SINGLE_NODE})importgroovy.swing.SwingBuilderimportjavax.swing.WindowConstantsasWCimportorg.jfree.chart.ChartFactory;importorg.jfree.chart.ChartPanel;importorg.jfree.chart.JFreeChart;importorg.jfree.data.category.IntervalCategoryDataset;importorg.jfree.data.gantt.Task;importorg.jfree.data.gantt.TaskSeries;importorg.jfree.data.gantt.TaskSeriesCollection;importorg.jfree.data.time.SimpleTimePeriod;//adaptedfrom[url]http://www.java2s.com/Code/Java/Chart/JFreeChartGanttDemo1.htm[/url]////main//finalIntervalCategoryDatasetdataset=createDataset();finalJFreeChartchart=createChart(dataset);defswing=newSwingBuilder()defframe=swing.frame(title:'Groovy Gantt',defaultCloseOperation:WC.DISPOSE_ON_CLOSE){panel(id:'canvas'){widget(newChartPanel(chart))}}frame.pack()frame.show()//createtaskdatafromthemap.Notetheuseofinject//(see[url]http://insidethemachine.wordpress.com/2009/01/25/injectgroovy/)[/url]defIntervalCategoryDatasetcreateDataset(){returnnode.map.root.children.inject(newTaskSeriesCollection()){seriesCollection,seriesNode->seriesCollection.add(seriesNode.children.inject(newTaskSeries(seriesNode.to.plain)){series,taskNode->//reallivesoftwarewillbeabitmorepermissivedefdates=taskNode.children.collect{dateNode->dateNode.to.date}if(dates.size()!=2)thrownewRuntimeException(taskNode+" does not have exactly 2 date children as expected")series.add(newTask(taskNode.to.plain,newSimpleTimePeriod(dates[0],dates[1])))series//thisisa"return"})seriesCollection//thisisa"return"}}defJFreeChartcreateChart(finalIntervalCategoryDatasetdataset){returnChartFactory.createGanttChart("Gantt Chart Demo"//charttitle,"Task"//domainaxislabel,"Date"//rangeaxislabel,dataset//data,true//includelegend,true//tooltips,false//urls);returnchart;}
After saving this file restart Freeplane
Create a new map (Ctrl-n) and copy/paste the following onto the root node:
Hello. I am wondering if anyone can help determine why I can not get the above instructions to work. I am not well versed in java/groovy and am struggling to understand what part of the code needs fixing. I am using Freeplane 1.3.12 and I followed the above instructions exactly. Instead of seeing data I get the chart popup with only headers (see image.) Is anyone available to help troubleshoot this with me? If I can get the basic functionality working I can then begin to understand the code better and expand on it for my needs, but right now I can't even figure out how to get it working as described.
Any help would be greatly appreciated. In the mean time I am trying to learn Groovy and figure this out. I need project management functionality for work related responsibilities, and I really would like to figure out how to make Freeplane do everything I need.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi ionizing,
I think you did the right thing. I was able to confirm your experience with Freeplane 1.2. The gantt chart appears as the image in your post, a single square. The information in the root not is not converted to a chart. The Instruction dates from 2011, when Freeplane 1.1 or earlier was the standard. I think this is the problem.
@Volker,
Could you please look at the problem ?
The link in your post does not work anymore.
Regards
Jodi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi jokro & ionizing,
I'm using Freeplane 1.3 and couldn't find jcommon. Some links on the explanation post lost their validity. Any way to implement all this ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If possible, I would like to open this two year-old thread:
I have the same problem as "ionizing" above, which remains despite carefully double-checking instructions, and then following Volker's subsequent instructions (although the test text to be copied into the root node seems to me identical to the first one).
I have FP 1.5.17 and attempted to use jfreechart-1.0.19 (Jul'14). Is the answer simply that the two elements are incompatible?
I would greatly appreciate assistance.
Thanks,
Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I am a Freeplane/Sciplore (Docear) fan.
I am the only one in need of a GANNT chart to combine to Freeplane?
Let me know and we take it from there to propose this to the developers.
Thanks for your inputs.
fil
Hi fil,
Freeplane has no builtin support for Gantt charts, but with scripting (know
how) and the JFreeChart library (see https://sourceforge.net/projects/freepla
ne/forums/forum/758437/topic/4593586) it's possible to add Gantt support
for yourself:
The chart should appear. The context menu allows some actions like printing
the chart. Close with mouse or with the Escape key.
There are lots of opportunities to tune the script but it should be a good
starting point for more.
Regards,
Volker
Last edit: Volker Börchers 2015-01-09
Very nice !
Hello. I am wondering if anyone can help determine why I can not get the above instructions to work. I am not well versed in java/groovy and am struggling to understand what part of the code needs fixing. I am using Freeplane 1.3.12 and I followed the above instructions exactly. Instead of seeing data I get the chart popup with only headers (see image.) Is anyone available to help troubleshoot this with me? If I can get the basic functionality working I can then begin to understand the code better and expand on it for my needs, but right now I can't even figure out how to get it working as described.
Any help would be greatly appreciated. In the mean time I am trying to learn Groovy and figure this out. I need project management functionality for work related responsibilities, and I really would like to figure out how to make Freeplane do everything I need.
Hi ionizing,
I think you did the right thing. I was able to confirm your experience with Freeplane 1.2. The gantt chart appears as the image in your post, a single square. The information in the root not is not converted to a chart. The Instruction dates from 2011, when Freeplane 1.1 or earlier was the standard. I think this is the problem.
@Volker,
Could you please look at the problem ?
The link in your post does not work anymore.
Regards
Jodi
Hi jokro & ionizing,
I'm using Freeplane 1.3 and couldn't find jcommon. Some links on the explanation post lost their validity. Any way to implement all this ?
ionizing, it looks like you put everything into the root node but it should look like this:
If you copy and paste it onto a node (not in an open editor) you will get a nested structure.
I added the Gantt script to the wiki page Scripting: Example scripts using external libraries.
Regards, Volker
Last edit: Volker Börchers 2015-01-09
If possible, I would like to open this two year-old thread:
I have the same problem as "ionizing" above, which remains despite carefully double-checking instructions, and then following Volker's subsequent instructions (although the test text to be copied into the root node seems to me identical to the first one).
In attempting to crack this, I have:
given both execute script, file/read permissions (in FP preferences);
tried by omitting to add "lib" to FP preferences (as per instructions in " General installation instructions" #3, on http://freeplane.sourceforge.net/wiki/index.php/Scripting:_Example_scripts_using_external_libraries#JFreeChart:_Diagrams_and_Charts );
used the downloadable "gantt.groovy" file located on the same "General installation instructions" above, and hence omitted any typos in the scripts;
not found similarities and therefore any help in the other (old) thread on this topic, https://sourceforge.net/p/freeplane/discussion/758437/thread/aa9d1f6e/
I have FP 1.5.17 and attempted to use jfreechart-1.0.19 (Jul'14). Is the answer simply that the two elements are incompatible?
I would greatly appreciate assistance.
Thanks,
Thomas