-
Notifications
You must be signed in to change notification settings - Fork 35
Rfc2: Graph component
A new component will be created for creating graphs.
The viewer-admin will get a new block in the layoutmanager for dragging the graph component to the layout. There it can be configured. The viewer will get a new button with which the graph component can be started. After a click on a feature which is configured with the graph component, a (interactive!) graph will be shown.
The changes needed for the completion of this functionality are described here.
The modules which are affected by these changes are split in the viewer and viewer-admin
- A new component for showing the graph.
- A backend for retrieving the data for it's configured attribute sources
- Hooking the new component to the get feature info event
The creation of the graph is done by the JS/CSS framework ExtJS, which we already use, so this doesn't introduce any other dependencies. Other frameworks were considered (like D3, charts.js, highcharts). They were or too complex (the requested functionality is a "simple" graph), too bulky (large files, large configurations) or didn't meet our specs.
A new component with a configuration page. Just like any other component. You can configure multiple graphs in a application. Each graph consist of a layer which has a attributesource configured. Then you define one x-axis and multiple y-axis attributes, and a graph-type (line, horizontal bar, vertical bar). The y-axis can be either a direct attribute (example 1), or a linked attribute via relate (example 2):
Example 1
Layer with configured attributesource which has the following attributes: Name: x-axis Population 0 -14 yrs: y-axis Population 14 - 25 yrs: y-axis This can be used for a bar chart for the population (split by age) of each region
Example 2
Layer configured with an attributesource which has a linked attributesource: Attributesource 1 (region): Id Name
Attributesource 2 (population): fk (linked to attributesource 1 id) year population This can be used to configure a line chart which pops up when clicked on a region which displays a line chart of the population per year.
We foresee no incompatibility with older version. All the old configurations will be kept and remain functional.
https://github.com/B3Partners/flamingo/tree/feat/rfc2_graph-component