Skip to content

Commit

Permalink
[Tagcloud] Replaces current implementation with elastic-charts (elast…
Browse files Browse the repository at this point in the history
…ic#100017)

* WIP - Replace tagcloud with es-charts wordcloud

* Cleanup and add unit tests

* Fix interpreter test

* Update all tagcloud snapshots

* Partial fix tagcloud test

* Fix some other functional tests, add migration script, update sample data

* Replace getColor with getCategorixalColor

* Fix functional test

* Apply clickhandler event for filtering by clicking the word

* Fix weight calculation

* Add a unit test and fix functional

* Change the cursor to pointer

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
2 people authored and John Dorlus committed Jun 15, 2021
1 parent 8960780 commit 7e41ee1
Show file tree
Hide file tree
Showing 46 changed files with 642 additions and 1,393 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -215,7 +215,6 @@
"cytoscape-dagre": "^2.2.2",
"d3": "3.5.17",
"d3-array": "1.2.4",
"d3-cloud": "1.2.5",
"d3-scale": "1.0.7",
"d3-shape": "^1.1.0",
"d3-time": "^1.1.0",
Expand Down
Expand Up @@ -280,7 +280,7 @@ export const getSavedObjects = (): SavedObject[] => [
defaultMessage: '[eCommerce] Top Selling Products',
}),
visState:
'{"title":"[eCommerce] Top Selling Products","type":"tagcloud","params":{"scale":"linear","orientation":"single","minFontSize":18,"maxFontSize":72,"showLabel":false},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"segment","params":{"field":"products.product_name.keyword","size":7,"order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing"}}]}',
'{"title":"[eCommerce] Top Selling Products","type":"tagcloud","params":{"scale":"linear","orientation":"single","minFontSize":18,"maxFontSize":72,"showLabel":false,"palette":{"type":"palette","name":"default"}},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"segment","params":{"field":"products.product_name.keyword","size":7,"order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing"}}]}',
uiStateJSON: '{}',
description: '',
version: 1,
Expand Down
Expand Up @@ -242,7 +242,7 @@ export const getSavedObjects = (): SavedObject[] => [
defaultMessage: '[Flights] Destination Weather',
}),
visState:
'{"title":"[Flights] Destination Weather","type":"tagcloud","params":{"scale":"linear","orientation":"single","minFontSize":18,"maxFontSize":72,"showLabel":false},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"segment","params":{"field":"DestWeather","size":10,"order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing"}}]}',
'{"title":"[Flights] Destination Weather","type":"tagcloud","params":{"scale":"linear","orientation":"single","minFontSize":18,"maxFontSize":72,"showLabel":false,"palette":{"type":"palette","name":"default"}},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{}},{"id":"2","enabled":true,"type":"terms","schema":"segment","params":{"field":"DestWeather","size":10,"order":"desc","orderBy":"1","otherBucket":false,"otherBucketLabel":"Other","missingBucket":false,"missingBucketLabel":"Missing"}}]}',
uiStateJSON: '{}',
description: '',
version: 1,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import React, { lazy } from 'react';
import { VisEditorOptionsProps } from 'src/plugins/visualizations/public';
import { TagCloudVisParams, TagCloudTypeProps } from '../types';

const TagCloudOptionsLazy = lazy(() => import('./tag_cloud_options'));

export const getTagCloudOptions = ({ palettes }: TagCloudTypeProps) => (
props: VisEditorOptionsProps<TagCloudVisParams>
) => <TagCloudOptionsLazy {...props} palettes={palettes} />;
27 changes: 0 additions & 27 deletions src/plugins/vis_type_tagcloud/public/components/label.js

This file was deleted.

0 comments on commit 7e41ee1

Please sign in to comment.