Skip to content

shaoyangyu/Redmine-Macro-for-Protovis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protovis macro for RedMine

It is Redmine Macro for Protovis.

  1. macro format:{{protovis(%name,%width,%height,%data)}}

    ---%data will follow JSON-like format. replace "{}" with "<>"
    ---%name is the name of protovis template which are in /lib folder or in DB for you create with plugin
  2. Example:

Use the Macro on redmine wiki


{{protovis(sample_line,400,300,[

                <x:0,y:0.5>,
                <x:3,y:3>
              ]
)}}

{{protovis(sample_pie,400,300,)}}

Note: the macro will fetch the template from lib folder if the name with “sample_” prefix, but not from db.

Also you can update your protovis template via plugin. your_redminehost/protovis.

3.create protovis template: Context={width,height,data,id} will be passed to render your protovis templates.

Setup steps: 1.download the sourcecode 2.copy the folder to your redmine plugins fold /redmine/plugins/vender/ 3.restart your redmine app.

Sample list :

Line:


{{protovis(sample_line,400,300,[

                <x:0,y:0.5>,
                <x:3,y:3>
              ]
)}}

Pie:


{{protovis(sample_pie,

400,
300,
[0.1,0.2,0.2]
)

}}

Dot:


{{protovis(sample_dot,400,300,[

                <x:0,y:0.5>,
                <x:3,y:3>,
                <x:2,y:1> 
             ]
)}}

Bar:


{{protovis(sample_bar,400,300,[

                <"name":"HK","value":0.5>,
                <"name":"BJ","value":3>,
                <"name":"NY","value":1> 
             ]
)}}

About

one Macro for Protvis on Redmine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published