Author Topic: Graphs on a google sites page  (Read 8084 times)

reaver

  • Rogueliker
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Graphs on a google sites page
« on: May 29, 2014, 08:23:19 PM »
Only tangentially related to roguelikes, but here we go:

I have some google sites page and I'm trying to document some activated abilities for the actors for my game. Anyway, long story short, ideally I'd like to use a graph in dot language like these: http://www.graphviz.org/Gallery/undirected/fdpclust.svg, (directed graphs, not that it matters).
Once upon a time I was working with a wiki system called Confluence which allowed you to insert some tags and write some code in dot language. Is there anything similar for google sites or in general? I want to write code in the html, not paste an link of an image generated from an application. Embedding the code in a link for a web app is ok, even though it will probably make my eyes squint.

Also, if you're ready to suggest Javascript, I'm ready to say that I'm clueless, but I'd take pointers on how to add dot support on the webpage.

reaver

  • Rogueliker
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Re: Graphs on a google sites page
« Reply #1 on: June 01, 2014, 08:39:01 AM »
Well, ok I found the code-integrated-in-link version, adding e.g. this in the HTML:

<img src="https://chart.googleapis.com/chart?cht=gv:neato&chl=digraph{A->B->C->A}&chs=150x150" alt="neato chart">

It looks like the forum automatically recognizes the url and you can view the result directly.

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Graphs on a google sites page
« Reply #2 on: June 30, 2014, 02:31:05 PM »
HTML does not work in this forum - replace your code with the correct tags

https://chart.googleapis.com/chart?cht=gv:neato&chl=digraph{A->B->C->D->C->A}&chs=450x450
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

reaver

  • Rogueliker
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Re: Graphs on a google sites page
« Reply #3 on: July 01, 2014, 07:44:08 AM »
The tags were on purpose, in case you wanted to add that in your own html :)

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: Graphs on a google sites page
« Reply #4 on: July 01, 2014, 10:54:55 AM »
Cool. Good find though.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike