<< How Effective is the Mozilla Stability Program? | The roads I take... | Integration eines Magento-2-Webshops mit FreeFinance und selbstgebautem Warenmanagement >>

Finding an Openly Licensed JS Graph Library

As I mentioned at the end of the recent post on stability graphs, I was looking for doing JS-based, dynamic versions of those graphs. Those would be able to always have current data without manually copying stuff around (as I've done previously) and should be available to more people in the Mozilla community.

That said, even though I tried previously to do some canvas magic to create graphs in JS, it's tedious to create all that code by oneself, so I set out to find a library that can help me.

My set of ideal requirements was:
So, I went on a web search and tried to find libraries that would fulfill my requirements. Interestingly, I saw a number of commercially licensed JS libraries floating around, I guess there's some business in creating graphs out there.
The list below is the libraries I took a closer look at (before you ask, flot is not on the list because it requires jQuery and therefore violates my "graphs only" and "lightweight" goals right away):
  • Chart.js
    • This one is lightweight and graph-only.
    • Examples do not have dynamic tooltips but a number of animations that are only distracting from the actual graph data.
    • RGraph
      • Dynamic tooltips in the examples are a bit sluggish.
      • Supports feeding JSON to it directly.
      • dygraphs
        • Has interactive zoom etc. by default, supports annotations for specific points.
        • Has somewhat of a list of dependencies (all open).
        • Only supports CSV or JS Array data.

        • So none of those turned out to be completely ideal in the light of my goals/preferences. That said, dygraphs looked decent enough so I went with that in the end and have dynamic versions of my graphs implemented.
          (Ping me on IRC if you want a link, I don't want to link them on the blog as the uninformed could come to wrong or hasty conclusions looking at the data).

          Of course, if you are looking for a graphs library for your project, you might chose completely differently, but maybe the list is helpful to find what fits your needs. ;-)

          Beitrag geschrieben von KaiRo und gepostet am 1. Mai 2014 01:12 | 6 Kommentare | TrackBack

          Kommentare

          AutorBeitrag

          Gervase Markham

          zitieren
          Flotcharts?
          http://www.flotcharts.org/

          Gerv
          01.05.2014 13:12

          KaiRo

          Webmaster

          zitieren
          Gerv, as I mentioned right before starting into the list, it's coupled to jQuery and therefore violates my goals.
          01.05.2014 13:51

          Pete

          zitieren
          Why lightweight?
          Is your app so time and memory critical that you have to save each byte and ms of CPU time? I mean, consider all these frameworks out there as a black box. When they do what you want, fine. Don't care about the rest.

          I would agree when it comes to integral parts of an app, like jQuery. The problem there is, once you use it, you can't simply replace it. But a chart library only has a few API calls.
          01.05.2014 20:54

          KaiRo

          Webmaster

          zitieren
          I want to understand as much of the code I write, and I do not want 95% of the pageload be loading libraries. I'm not doing any app there (all my apps have 0 libraries), this is just a page that consists of one big graph.
          02.05.2014 13:07

          philipp

          zitieren

          KaiRo

          Webmaster

          zitieren

          Unfortunately, that seems to require D3 and therefore pulls in all that other stuff I don't want.
          14.12.2014 16:00

          Kommentar hinzufügen