company logo

Plot Usage

Plot minimizes the amount of configuration data that must be composed in the context to two JSON sections:

  • series
  • contains a array of arrays. the inner array is a series and must match the array length in all consequent series.

  • labels
  • title:defines the title over the chart
  • series: define names for the series (use the same order like in the series array)
  • instances: define the names of the instances in a series.

The context class handler has to compose the JSON string and set it with a user control's defined data source ( property() ).

plot_data = {

  series: [

      [ 1, 2, 1, 1, 4, 1] //bases

    , [ 2, 2, 1, 1, 1,32] //attributes

    , [ 3, 3, 1, 1, 5,33] //relationships

    , [ 4, 2, 1, 1, 1,44] //references

    ]

, labels: {

      title: "project1"

    , series: ["Bases", "Attributes", "Relationships", "References"]

    , instances: ["WebKitControl", "WebKitPage", "SomeClass", "OtherClass","Class5","Class6"]

    }

};

Also take a look at the examples in the plot/index.js control