OFC4J API Documentation

OFC4J is a library that provides an Open Flash Chart 2 API for the Java language. It works by modeling OFC data structures and then serializing to JSON text.

The best place to start is at the {@link jofc2.model.Chart Chart} class. This class holds all other Chart data and is ultimately what is transformed to send to the OFC widget.

OFC4J should easily integrate with Spring (Chart might be especially good as a prototype-scoped bean) and other Java frameworks. The Gallery application uses Groovy to build the charts. Here is a sample:

return new Chart(new Date().toString())
    .addElements(new FilledBarChart()
        .setOutlineColour("#577261")
        .setColour("#E2D66A")
        .addValues(9, 8, 7, 6, 5, 4, 3, 2, 1))
    .setBackgroundColour("#FFFFFF");