lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Dec 24, 2012 at 3:12 PM, Jeff Smith <spammealot1@live.co.uk> wrote:
> It ended up as a mash up of some Lua, html, Javascript and Sqlite code, it
> sounds complicated, but in reality it is very easy to use as that complexity
> is largely hidden.

That is a very cool wrapper - Lua is great at making APIs pleasant to use.

I'm a great fan of the Flot Javascript in-browser chart library [1]
and lua-flot[2] is a little library I did for an article and
languished on my hard drive.  It exploits the near-isomorphism between
Lua and Javascript data to generate pretty plots without needing to
involve the cloud in any way.  By doing it this way you can use the
Flot documentation directly with a little bit of mental translation.
(Laziness being one of the parents of invention)

At 146 lines, it just does one thing - generates the HTML for a single
graph. There's a lot of available Flot plugins (in particular for
interactivity and image plots), and if there's interest I'll extend
flot.lua to use them in a simple fashion.

The document [2] was generated by prettify.lua which could be a useful
basis for a bare-bones blogging tool for those who like arguing with
code and graphs.

steve d.

[1] http://www.flotcharts.org/
[2] http://stevedonovan.github.com/lua-flot/flot-lua.html