Skip to main content

Visualization in GraphSearch

Abstract

Visualization in GraphSearch

In addition to presenting search result in list view, GraphSearch provides a visualization feature.

You can use it to display statistics of facet information in charts for more straightforward understanding of the dataset and easier analytics.

Currently GraphSearch supports three chart templates, namely:

  • Pie Chart,

  • Column Chart and

  • 2D Column Chart (stacked column chart).

The following properties are available to configure all charts:

Field Name

Description

Example

Mandatory

Chart ID

A unique identifier representing a chart in GraphSearch which can be chosen freely.

pie1, column2

(tick)

Base Facet Field

The facet field used to facet data and render a chart according to the facet members. When GraphSearch is on top of a search index driven by Solr or Elasticsearch, the facet field is a dynamic field created by the index server represented by an identifier. In the case of GraphSearch on an RDF dataset, the facet field is represented by the predicate URI. Facet field identifier or predicate URI can be found at the Search Fields tab of the admin UI.

Solr/Elasticsearch: dyn_uri_Topic

RDF: http://schema.org/memberOf

(tick)

Chart Title

Title of the chart displayed at top of the chart.

My Pie Chart

Data Labels Format

Format of the data label based on Highcharts specifications.

See http://api.highcharts.com/highcharts/plotOptions.series.dataLabels.format for more information.

{y} mm (adds 'mm' to the data value)

{point.name} displays the name of data point in a pie chart

Show Labels

Toggle display of labels.

true

Horizontal / Vertical Placement

Location of the chart placed in the start window. Each value must be in the form of "x.x,y.y" representing the location of the chart relative to the window and must be a range between 0 and 1.

Horizontal: 0.1,0.4

Vertical: 0.3,0.5

More configuration options will be explained per chart type.

How to Create a Chart

To create a chart, navigate to the Charts tab in the admin UI, and simply click any chart creation button.

See the screenshot below:

23901843.png

Chart Types

Pie Chart

Click the button New Pie Chart in the Chart tab to create a new pie chart.

Then fill in the required properties in the pop-up configuration dialog.

As mentioned previously, you have to specify a random chart id and facet to visualize by providing the facet identifier (for Solr / Elasticsearch backend) or facet predicate URI (for RDF database backend).

See the screenshot below as an example.

23901847.png

After saving the configuration, the chart is created and can be seen when navigating to the start page of GraphSearch.

The data behind the chart corresponds to the selected facet:

23901849.png

Column Chart

Click the button New Column Chart in the Chart tab to create a new column chart.

Then fill in the required properties in the pop-up configuration dialog.

Again, you have to specify a random chart id and facet to visualize by providing the facet identifier (for Solr / Elasticsearch backend) or facet predicate URI (for RDF database backend).

Note

Compared to pie charts, column charts have one additional optional property 'Y-Axis-Title' where a custom label can be displayed at the left side of Y axis.

See the screenshot below as an example.

23901851.png
23901852.png

2D Column Chart

The advantage of a 2D column chart is that the chart is faceted into two dimensions.

In addition to the the base facet, one has to specify a list of facet member identifiers (for Solr / Elasticsearch backend) or facet member URIs (for RDF database backend) as sub facet to further expound the column chart.

In the example provided below, three facet member URIs are selected as sub facet and the corresponding outcome is illustrated:

23901845.png
23901846.png

Additionally, 2D column chart supports two extra properties 'Results should be stacked' and 'Invert results' where the former will result in a stacked bar chart, and the latter will swap the data used for X axis and Y axis.

Chart Position

By default, the chart is placed at the center of the search result, if chart position is not configured explicitly.

Therefore, if you configured multiple charts without specifying a position, they will be all stacked at the center.

It is possible to drag and drop the chart to any place by dragging the blank chart window header region, as shown in the following screenshot:

23901854.png

However, such placements are client side and temporary. The default position will be restored after refreshing the page.

To fix the position of charts at the server side, you have to specify 'horizontal placement' and 'vertical placement' when creating a chart.

Example

By setting horizontal placement to 0.0,0.5 and vertical placement to 0.0,0.3, the chart will occupy half of the horizontal space and 30% of vertical space in the search result window.

The origin of such measurement is upper left vertex of the search result window. Therefore, the chart will be placed at the upper left corner.

See the screenshot for illustration:

23901848.png
23901850.png

Following such logic, you can organize multiple charts in a neat way.

23901844.png