Embedding charts in SMF forums

Discussion in 'SMF Discussions' started by alex@, Oct 31, 2012.

  1. alex@

    alex@ Adept

    Joined:
    Oct 28, 2009
    Messages:
    155
    Likes Received:
    2
    Location:
    DK
    First Name:
    Alex
    Simple Chart is a modification I have made for SMF.

    http://custom.simple...ex.php?mod=3489

    As other modifications in SMF, the mod is easy to install with a few clicks in the Package Manager of the Simple Machines forum software.

    What the mod does, is to add a BBCode - [chart][/chart]

    An example:
    [chart width=550 height=400 title="Best forum software" layout=v max=220]IPB=100|MyBB=80|phpBB=70,3|SMF=210|Xen Foro=110|Vbulletin=80[/chart]

    Result:
    .



    Horizontal:
    [chart width=550 title="Best forum software" max=300]IPB=100|MyBB=80|phpBB=70,3|SMF=210|Xen Foro=110|Vbulletin=80[/chart]

    Result:
    .


    As a pie:
    [chart title="Best forum software" layout=pie]IPB=100|MyBB=80|phpBB=70,3|SMF=210|Xen Foro=110|Vbulletin=80[/chart]

    Result:
    .



    You can also use the BBC to show a gauge:
    [chart title="Standard" layout=gauge]a=50[/chart]

    Result:
    .



    .. or star votes:
    [chart layout=stars]x=5.5[/chart]
    .



    Pies and gauges are created in the .svg format, the rest is generated in HTML.
    You can of course style most of it with css, even the svg images are stylable this way.

    You cal also style the charts, by adding style=MyPersonalStyle or something.

    Pies and gauges are generated on the fly, which means it's also possible to use some predefined layouts with variable max, level.

    I have made some predefined gauge styles:
    .

    With the width parameter, you can decide the diameter. As SVG's are scalable, they always looks nice, not like images.
     
    Last edited by a moderator: Jan 10, 2014
  2. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    Pretty cool addon, charts are always a fun thing to look at and play with.
     
  3. alex@

    alex@ Adept

    Joined:
    Oct 28, 2009
    Messages:
    155
    Likes Received:
    2
    Location:
    DK
    First Name:
    Alex
    Thanks!

    It was fun making. Especially, learning the SVG format. It is a pretty cool format and you can make some cool things with it, like hover effects (which I used on the pie charts). You can see and test that here

    Something I'm concidering too, is to have the mod embed simple gantt charts. And maybe progress bars.
     

Share This Page