diagram2Add my vote for this tag graphing1Add my vote for this tag rendering1Add my vote for this tag visualization1Add my vote for this tag workflow1Add my vote for this tag create new tag
, view all tags


Create a flowchart from topic text


Fuxograma de Exemplo
Stop the mouse above each item and see the tag with the name in a bigger size.
Each item is a link for the text block what was created it and where can exist more information about this step.

The Based SVG
The example above was generated by the content of the topic FlowchartPluginExample

The items of the flowchart are defined in the following way:

---++ Item of the Flowchart
   * Id: unique_name
   * Type: Question
   * Yes: item_A
   * No: item_B

A more complete example is available at FlowchartPlugin Example, once the plugin is installed.

Syntax Rules

To create and display the flowchart, use the variable %FLOWCHART% or %FLOWCHART{...}%.

This plugin uses the content of the topic and considers that each level two heading (---++) indicate the beginning of the definition of a new item of the flowchart.

To specify the item and the derived action is expected a list of the type * Attribute: Value

Attribute Description
Type Type of the flowchart's item. Default: Action. See the valid types in the table below
Id Identification for the Goto. It needs to validate with /[_a-zA-Z0-9]*/
Color Color differentiated for the item
Goto Indicates so that item it must follow. Default: Next
Yes The same as Goto, but is required for Type: Question
No The same as Goto, but is required for Type: Question

The valid types are:

Type Description
Start Indicates the beginning of a flowchart. This must be the first item
Action The standard type. It indicates an action
Question Opens a fork in the flow. It requires the definition of attributes Yes and No
End Indicates the end of the flowchart (or part of it)
End-Error End for the error case

To control the beginning and end of of valid headings for the construction of the Flowchart use %FLOWCHART_START% and %FLOWCHART_STOP%.

If a name is excessively big for the space of the item a line break can be made with %FLOWCHART_BR%. This will not intervene with the text of the page, only in the flowchart.

You can changes the appearance of the flowchart by adding the following parameters to the variable:

Parameter Description
item-w Width for the flowchart's itens area
item-h Height for the flowchart's itens
area-w Width of the area of the flowchart's itens
area-h Height of the area of the flowchart's itens
percent Percentage of the PNG size presented in relation to the standard of the generated SVG
text-size Size in pixels of the font text
tag-style Style for the img tag


IDEA! Web bowsers normally make a cache of the web page and images. It is possible that after a change to the flowchart you do not see the image update. If this happens click "Reload" in your web browser to clear the cache.

IDEA! Some flowcharts can become so complex and will be difficult to follow its lines. In this case, increase the area of items, giving a bigger space between them. eg: %FLOWCHART{ area-w="220" area-h="100" }%

Construction of the Flowchart

  1. The blocks initialized by a heading level two ---++ are read as definition of item of the Flowchart (in the same way as the TWiki:Plugins.SlideShowPlugin).
  2. An SVG is created with this information and is attached to the topic. This SVG file can be accessed by %ATTACHURL%/flowchart_%TOPIC%.svg.
  3. A PNG is generated by ImageMagick and reduced, so that the image has a good anti-aliasing, that it is not obtained in the direct conversion. The PNG is attached to the topic and can be accessed by %ATTACHURL%/flowchart_%TOPIC%.png (use this to separate the flowchart's image of the definition topic when it is rendered).
  4. A map for the image is created linking the items of the flowchart with the origin of its information, which can contain more information for the implementation. %ATTACHURL%/flowchartMapImg_%TOPIC%.txt (use to map the image out of the topic where the flowchart was generated)
    <img src="%PUBURL%/Web/FlowchartTopic/flowchart_FlowchartTopic.png" usemap="flowchart_FlowchartTopic" alt="Flowchart" border="0" />
  5. The content of the map file and one image tag presenting the PNG are placed in the place of variable %FLOWCHART%.

The files (SVG, PNG and Map) are generated when the topic contend %FLOWCHART% is saved.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %FLOWCHARTPLUGIN_ITEM_WIDTH%

To override the default settings, add them to Main.TWikiPreferences.

  • Default width for the flowchart's itens
    • Set ITEM_WIDTH = 140
  • Default height for the flowchart's itens
    • Set ITEM_HEIGHT = 40
  • Default width for the area of the flowchart's itens
    • Set ITEM_AREA_W = 180
  • Default height of the area of the flowchart's itens
    • Set ITEM_AREA_H = 70
  • Default size in pixels of the font text
    • Set TEXT_SIZE = 17
  • Default percentage of the PNG size presented in relation to the standard of the generated SVG
    • Set PERCENT_IMG = 70
  • Default style for the img tag
    • Set TAG_STYLE = border:1px dotted #505050;

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Create a flowchart from topic text

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this extension. The following instructions are for the administrator who installs the extension on the TWiki server.

  • For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.

  • Or, follow these manual installation steps:
    • Download the ZIP file from the extension home on twiki.org (see below).
    • Unzip FlowchartPlugin.zip in your twiki installation directory.
    • Set the ownership of the extracted directories and files to the webserver user.
    • Install the dependencies (if any).

  • Plugin configuration and testing:
    • Run the configure script and enable the plugin in the Plugins section.
    • Configure additional plugin settings in the Extensions section if needed.
    • Test if the installation was successful using the examples provided.

Plugin Info

Plugin Author: TWiki:Main.AurelioAHeckert
Copyright: © 2005 TWiki:Main.AurelioAHeckert
© 2007-2011 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2012-12-02
Change History:  
2012-12-02: TWikibug:Item7020: Add category to VarFLOWCHART; doc improvements -- TWiki:Main.PeterThoeny
2011-06-16: TWikibug:Item6756: Fix for anchors not working if title is longer than 32 characters -- TWiki:Main.TimmoVerlaan
2011-01-17: TWikibug:Item6530: Back-porting from related project - thanks GPL; doc improvements
16 Jul 2010 Set the path to ImageMagick in configure -- TWiki:Main.AndrewRJones
05 Jan 2010 Invalid META header in VarFLOWCHART gives wrong revision and can make the core code crash if a search finds this topic; plugin lacks its attachments for the example topic
09 Sep 2009 Improve docs; do not read preferences from the plugin topic -- TWiki:Main.AndrewRJones
05 May 2009 Removed what seems to be forgotten debug code that floods the tmp dir with files named web_topic.txt with the content ini -- TWiki:Main.KennethLavrsen
13786 TWikibug:Item4090 - Failed if topics attachment directory did not exist -- TWiki:Main.AndrewRJones
13779 TWikibug:Item4085 - Fixed problem with subwebs. -- patch by TWiki:Main.JohnWorsley
27 Jun 2005: Initial public version 0.8
ImageMagick>0The ImageMagick library. Can be downloaded from http://www.imagemagick.org/.
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/FlowchartPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/FlowchartPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/FlowchartPluginAppraisal

Related Topics: VarFLOWCHART, TWikiPreferences, TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 FlowchartPlugin.md5 r7 r6 r5 r4 r3 manage 0.2 K 2012-12-03 - 00:10 PeterThoeny  
Compressed Zip archivetgz FlowchartPlugin.tgz r7 r6 r5 r4 r3 manage 149.4 K 2012-12-03 - 00:09 PeterThoeny  
Compressed Zip archivezip FlowchartPlugin.zip r9 r8 r7 r6 r5 manage 152.7 K 2012-12-03 - 00:09 PeterThoeny  
Unknown file formatEXT FlowchartPlugin_installer r4 r3 r2 r1 manage 3.8 K 2012-12-03 - 00:10 PeterThoeny  
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.