High‑D API

Purpose of This Document

Welcome to the Macrofocus High-D API. High-D API is a Java/Swing implementation of common multidimensional visualization techniques. This developer guide is designed for developers who want to learn how to use High-D API in their applications.

Multidimensional Analysis Basic

High-D API Features

High-D API comes with an extended set of features, including:

  • Flexible mean of interfacing with data models, file formats, and databases

  • Complete set of effective visualization techniques (parallel coordinates, tables lens, scatter plots, MDS, …​)

  • Powerful interaction possibilities

  • Customizable axis order and visibility

  • Zoomable user interface, including drilling

  • Many options to fine-tune the appearance of the display

  • Filtering support

  • Useful for small datasets already, but scales to 1'000'000s of data objects

High-D API Quick Start

This section contains some examples that demonstrate how easy it is to get up and running with Macrofocus High-D API. The following sections provide much more detail about how to configure your visualizations and which features are available, but most developers are eager to get something working quickly, so here is a quick working example.

The code below will produce the output below. It creates a random data table with 10 dimensions (columns) and 100'000 observations (rows) and visualize it using the parallel coordinates component. While the content of this example is meaningless, it highlights the key principles and one should be able to extrapolate the use of such a visualization technique when applied to quality control, fraud detection, and financial data and any other areas where getting the big picture reveals pattern.

To use the High-D API for Java/Swing, place the macrofocus-high-d.jar, macrofocus-common.jar, macrofocus-slider.jar, macrofocus-visualization.jar, trove.jar, and molap.jar libraries in your class path. An efficient starting point is to instantiate the com.macrofocus.high_d.HighDFactory component.

public class Hello {
    public static void main(String[] args) {
        final TableModel tableModel = TableHelper.createRandomTableModel(4, 100000, 10);

        SwingHighDFactory<Integer,String> hdFactory = HighDFactory.getSwingInstance(DataFrameFactory.getSwingInstance().fromTableModel(tableModel));
        ParallelCoordinates<Integer,String> parallelCoordinates = hdFactory.createParallelCoordinates();

        ParallelCoordinatesModel<Integer,String>  model = parallelCoordinates.getModel();

        // Tune the appearance
        parallelCoordinates.getView().setColorTheme(new DarkColorTheme());

        // Normalize all the scales between 0 and 1
        for(AxisModel axisModel: model.getAxisHierarchy().getAxisGroupHierarchy().getRoot().getAxisModels()) {
            axisModel.getInterval().setValue(0, 1);

        // Filter out values that are not between 0.5 and 0.7
        model.getAxisHierarchy().getAxisModel("2").getInterval().setValue(0.5, 0.2);

        // Adjust the initial state
        model.getColoring().setColor(model.getObject(498), Color.green);

        final JFrame frame = new JFrame("Hello from the High-D World!");
        frame.setSize(800, 500);

Data Source

You may read your data from any data sources such as a database table, a file, a piece of data in memory. The data should be in tabular format that can be converted to a DataFrame as defined in in the MOLAP library. From High-D API point of view, the only data it will accept is the DataFrame. As long as you convert your raw data to DataFrame, you can use it in Macrofocus High-D API.

High-D API Architecture

The com.macrofocus.high_d.HighDFactory class acts as a façade to instantiate the various visualization components. All the components created using one hdFactory will then automatically share some of their interaction properties, such as probing, selection, coloring, to easily create user interfaces with multiple coordinated views. Each visualization component of the High-D API follow a model-view-controller (MVC) architecture. In brief, the controller collects user input, the model manipulates application data, and the view presents results to the user. For example, the ScatterPlot façade wraps a ScatterPlotModel, ScatterPlotView, and ScatterPlotController interfaces together. It allows easy loading of the data and customization of the most common settings.

Interacting with High-D API

Probing and selection

The selected observation can be retrieved using HighDFactory.getVisual().getSelection(). The observation currently under the mouse can be accessed using HighDFactory.getVisual().getProbing().

Handling dynamic data

High-D API will listen to events sent by the DataFrame and will update the visualization accordingly. Changing the structure of the data, such as the number of columns, their names and types, is currently not supported.


High-D API has been designed with performance in mind. Datasets containing 100'000s of data objects can be handled. To assess the effectiveness of each visualization component, one can display timing information using the setShowTiming(true) method.

What’s Next

There are still many features that we want to add to this product but haven’t got a chance to do so.

  1. Self-Organizing Maps.

  2. Improve documentation for creating custom colormaps.

  3. JavaFX and GWT implementations.

  4. Provide support for animated transitions.

If you have any feedbacks and suggestions, please feel free to email us.