-
Notifications
You must be signed in to change notification settings - Fork 35
Configure graphs and charts
This is tutorial how to configure the graph component, and everything needed for using it. The graph component is a component which can display data which is linked to a clickpoint in the map.
Here you can see how and what can be configured.
First, the graph must be fed with data. Currently, this consists of an attribuutbron with a related attribuutbron. Let's take for example municipalities with it's related neighbourhood.
When clicked on a layer (in this example municipality), you can get a graph, which shows the population of each neighbourhood.
The steps to prepare the data are:\
- Load in the attributesource(s) (preferably JDBC, not yet tested with WFS)
- Link the featuretypes (municipality and neighbourhoods) with relate
- Link the "parent" featuretype (municipality) to the layer on which you want to click in the map as a feat
- Go the the application --> "Boomstructuur met kaarten" --> the layer (you see the new attributes displayed)--> Save.
- Go to the Layoutmanager and add the Graph component to the layout.
- Open the configuration of the graph component, and go to the next paragraph.
In the component configuration, configure the following:
- Configure a title
- Choose the type of chart (currently line, vertical bar and horizontal bar)
- Configure the layer (municipality)
- Choose the x-axis: for example the neighbourhood name
- Choose multiple y-axis: for example the neighbourhood population. This must currently always be an attribute from the related featuretype (neighbourhoods)
- Save the configuration
- Save the application
- Enable the layer
- Open the component
- Select the layer
- Click on the button "Selecteer punt voor grafiek" and click in the map
- The graph will arrive when the information is loaded
You can configure multiple graphs: each graph will be drawn in a tab. This way you can visualize your the same data in different styles, or different data in different styles, or the different data in the same style, or ... well, you probably get it by now.
You can do this by clicking multiple times on the "Grafiekconfiguratie toevoegen" button. You will see a configuration option for each graph.
You can display multiple columns in one graph! For example, per neighbourhood you can show a bar graph of the population differentiated to age (a bar for each age category). This can be done by selecting multiple y-axes in one graph.
There are currently 3 types of graphs supported:
- Bar vertical
- Bar horizontal
- Line
You can switch off series (the y-axes) by clicking on the legend.
By hovering over the graph, you get a tooltip with the value and the x-axis.
Some ideas which are not yet implemented:
- More types of graphs
- Configuration of the colors used by the graphs