Back to Top

VisApplication master

Electron interactive API demos

addVis(visName, parentElement)

create and add graphic to selected html div. Exemplo de uso addVis(scatterplotMatrix,contentDiv) .

Parameters

Name Type Description
visName string
  • name of graphic selected to be created
parentElement string
  • div class name where view will be added

Returns

object

svg visualization

settings_individual_for_views(vis_container)

  • menu setting individual and functions selection,propriets,ands expots

Parameters

Name Type Description
vis_container object
  • container html for add vis and settings

Returns

Void

menu_tools(parentElement)

import html structure from folder settings menu public / html /

Parameters

Name Type Description
parentElement string
  • parent div id title where element will be added

Returns

Void

updateInterface()

Refresh the interface as you enter data and create submenus with interactions and click changes, function responsible for updating color menu options, filter, hierarchies, demand details and all other menus use updateInteface() .

Returns

object

updated html element

colors()

use colors() To create options in the html color menu and add the color selection inputs as needed, you can add various inputs or color range. Use the html element in the html colorSelector class to select and update options.

Returns

Void

size()

use size() to create and size select options to display items. use html select selectSize to create elements

Returns

Void

defaultMenu()

use defaultMenu() to create the default item creation color control html and higlight. use html select input.setColorDefault and input.setHighlightColor to create elements and changes

Returns

Void

clean_menus()

event to clear settings menu interface use clean_menus() . function to clear html from application settings menu

Returns

object

html element

addMenu(parentElement)

create html menu of settings and control of interfaces of submenus hiden and show

Parameters

Name Type Description
parentElement string
  • parent element id title where the menu will be added

Returns

Void

createVis(container, select)

this function create one visulaization with all dimensions or one selected

Parameters

Name Type Description
container object
  • object html where will be added.
select string
  • collum selected for generate view

Returns

Void

selectColumnsInVis(container, select)

Parameters

Name Type Description
container object
  • object html with view svg
select array.<string>
  • string elements selecteds

Returns

Void

updatevis()

This function redraws all screen views, enters data, and redraws

Examples

// basic selection for all views using the ".partition-content" class used in all update functions
$(".partition-content").each(function () {
     this.__vis__.data(_data_);
     this.__vis__.redraw();
    });
*

Returns

Void

updateSize(size)

This function updates the size of items according to the attributes of the selected database dimension, works in hierarchical views.

Parameters

Name Type Description
size string
  • The title of dimesion chosen size.

Returns

Void

updateHie(hie)

This function creates hierarchies as dimensions are added to hierarchical views, they must be passed the title of the selected dimensions.

Parameters

Name Type Description
hie array.<string>
  • array with title of the selected dimensions of the database to mount the hierarchy.

Returns

Void

updateColorContinues(attr, min, max)

continuous color coloring function by tweening two colors, this function has effect on all screen views

Parameters

Name Type Description
attr array.<string>
  • array with continuous dimension title.
min number
  • minimum value of the dimension continues.
max number
  • maximum value of the continuous dimension.

Examples

Scale color linear used     
let c = d3.scaleLinear()
        .domain([min,max])
        .range([colorMin,colorMax]);

Returns

Void

updateCategoricalColor(attr, item, colors)

coloring function in categorical dimensions, this function has effect on all views

Parameters

Name Type Description
attr string
  • Dimension title selected for coloring.
item array.<string>
  • title array of the attr category dimension values.
colors array.<string>
  • array with title of the selected dimensions of the database to mount the hierarchy.

Examples

return  colors[attr.indexOf(d.data[item])];//   d.data[] hierchies visualization  
return colors[attr.indexOf(d[item])];//         d[] other visualizations

Returns

Void

filterCategoricalValues(attr, select_item)

Color filter function for categorical values, Color values are preserved. This function, once applied, has an effect on all views.

Parameters

Name Type Description
attr string
  • Title of the selected categorical dimension to filter.
select_item string
  • dimension attribute selected for filter

Returns

Void

filterColorContinues(attr, min, max, min_select, max_select)

color filter function for continuous values, can pass the color filter range, and prescribe the visualization colors, this function has effect on all screen views

Parameters

Name Type Description
attr string
  • Title of the selected categorical dimension to filter.
min number
  • minimum attribute value
max number
  • attribute maximum value
min_select number
  • minimum filter limit
max_select number
  • maximum filter limit

Returns

Void

details_on_demand(items)

activate details on demand use visthechlib function detail(data,index,items value)

Parameters

Name Type Description
items string
  • list name of dimensions

Returns

Void

updateFilter_by_dimension(dimension_select)

update filter by dimension use visthechlib function filterByDimension()

Parameters

Name Type Description
dimension_select Array.<string>
  • list name of dimensions array dimension_select

Returns

Void

new DataPreparation(data)

Class Class Data preparation and processing class for later use.can return keys, arrays, minimum and maximum as needed for application

Parameters

Name Type Description
data object
  • Selected database.

Examples

const data = {.......};
const DataPreparation = new DataPreparation(data);

Returns

Void

DataPreparation.getKeys()

Get the keys of columns.

Returns

string

the key values ​​of all columns.

DataPreparation.getValues()

set the values keys of columns.

Returns

string

the key values ​​of all columns.

DataPreparation.getLimit()

Get the column limit in the array where the minimum value array[0] and maximum value array[1]

Returns

array.<number>

the minimum and maximum limit values ​​of each column.

DataPreparation.getCategorical_values()

Get Categorical values of database.

Returns

array.<string>

The attribute of of each column in the dataset.

DataPreparation.getNumeric_values()

Get numeric values of database.

Returns

array.<number>

The non-repeating values ​​of each dataset column.

new Interaction_Chosen()

Data interaction of the chosen class. used for all views controls real-time mouse event dispatch uses pattern strategy

Returns

Void