-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathcloud.js
More file actions
58 lines (55 loc) · 1.67 KB
/
cloud.js
File metadata and controls
58 lines (55 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
require('plugins/tagcloud/cloud.less');
require('plugins/tagcloud/lib/cloud_controller.js');
require('plugins/tagcloud/lib/cloud_directive.js');
function TagCloudProvider(Private) {
var TemplateVisType = Private(require('ui/template_vis_type/template_vis_type'));
var Schemas = Private(require('ui/vis/schemas'));
return new TemplateVisType({
name: 'tagcloud',
title: 'Tag cloud',
description: 'A tag cloud visualization is a visual representation of text data, ' +
'typically used to visualize free form text. Tags are usually single words, ' +
'and the importance of each tag is shown with font size or color.',
icon: 'fa-cloud',
template: require('plugins/tagcloud/cloud.html'),
params: {
defaults: {
textScale: 'linear',
orientations: 1,
fromDegree: 0,
toDegree: 0,
font: 'serif',
fontStyle: 'normal',
fontWeight: 'normal',
timeInterval: 500,
spiral: 'archimedean',
minFontSize: 18,
maxFontSize: 72
},
editor: require('plugins/tagcloud/cloud_vis_params.html')
},
schemas: new Schemas([
{
group: 'metrics',
name: 'metric',
title: 'Tag Size',
min: 1,
max: 1,
aggFilter: ['avg', 'sum', 'count', 'min', 'max', 'median', 'cardinality'],
defaults: [
{ schema: 'metric', type: 'count' }
]
},
{
group: 'buckets',
name: 'segment',
icon: 'fa fa-cloud',
title: 'Tags',
min: 1,
max: 1,
aggFilter: ['terms', 'significant_terms']
}
])
});
}
require('ui/registry/vis_types').register(TagCloudProvider);