• Topic
  • Discussion
  • OATWikiWeb.OATDOCsparqline(Last) -- Owiki? , 2016-08-19 14:58:52 Edit owiki 2016-08-19 14:58:52

    sparkline.js

    Library for drawing Sparklines using SVG.

    Objects

    OAT.Sparkline(div, options)

    Creates a Sparkline inside div; options describes its properties. Its values are the same as in OAT.LineChart. Options can be following:

    • axes - display axes? (bool, default false)
    • grid - display grid? (bool, default false)
    • legend - display legend? (bool, default false)
    • gridDesc - display grid description? (bool, default false)
    • desc - display description? (bool, default false)
    • paddingLeft - (default 2)
    • paddingTop - (default 2)
    • paddingRight - (default 1)
    • paddingBottom - (default 2)
    • colors - array of colors (default ["#888"])
    • markers - array of markers (default [OAT.LineChartMarker.MARKER_NONE]) (see OAT.LineChart constants)

    Methods

    OAT.Sparkline::attachData(dataArray)

    Adds dataArray to the Sparkline.

    OAT.Sparkline::draw()

    Draws the Sparkline.

    Example

    var s = new OAT.Sparkline("myDiv",{});
    s.attachData([1,2,3,-5,2,3.7,5,4]);
    s.draw();
    

    Referenced by...