marklogic-community / data-explorer

Data Explorer Tool
Other
15 stars 4 forks source link

Feature/file viz #169

Closed masyukun closed 5 years ago

masyukun commented 5 years ago

This pull request will merge a file type visualization into the /adhoc query screen. It is a treemap graph representing the different file types and their quantities, so that it is a bit easier to grasp a database's contents at a glance.

When a database is selected from the dropdown, a new REST service is called that returns the list of file types, their count, and an RGB color code. The color is stable across all databases and all installations; the same root element name or non-XML file extensions will always be the same color no matter which database they're queried against because of a color hashing algorithm, providing visual consistency.

In this version, a remote version of highcharts is referenced, although it's certainly possible to host this file locally. I went through a couple iterations attempting to integrate the highcharts-ng bower package instead, but it requires several package version updates to core libraries (angular, angular-cookies, angular-resources) which require additional code modifications to the auth service that I wasn't comfortable making in this update.

masyukun commented 5 years ago

Here's what the adhoc screen looks like with this Pull Request: GUI Preview

nlaprell commented 5 years ago

A few things I would suggest: