Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Heatmap / Swim lane integration #97978

Merged
merged 83 commits into from
Jun 4, 2021
Merged
Changes from 3 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
d67fad6
heatmap wip
darnautov Mar 29, 2021
381240e
format values on X axis
darnautov Mar 30, 2021
415b567
format values for cells
darnautov Mar 30, 2021
9fbca6a
show labels
darnautov Mar 30, 2021
c25cf3e
support legend configuration
darnautov Mar 31, 2021
2c65a8d
render preview
darnautov Apr 1, 2021
54e96a0
add icon
darnautov Apr 2, 2021
38a5a6d
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov Apr 22, 2021
cd912c2
[ML] update visualization
darnautov Apr 22, 2021
c5d02d0
[ML] init suggestions
darnautov Apr 22, 2021
2b40fe3
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 5, 2021
7aaeccd
[ML] fix preview
darnautov May 5, 2021
bb4910c
[ML] fix groupPosition for the legend control
darnautov May 5, 2021
48bbad0
[ML] add formatter for Y-axis
darnautov May 5, 2021
398b92f
[ML] filterOperations for cell value
darnautov May 5, 2021
d25f7e9
[ML] fill all available height
darnautov May 5, 2021
1e6d858
[ML] delete unused file
darnautov May 6, 2021
a8b3be4
[ML] fix suggestion state
darnautov May 6, 2021
3d89c72
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 10, 2021
62db0f2
[ML] update suggestion, add hiding logic
darnautov May 11, 2021
d7b6d01
[ML] suggestions unit tests
darnautov May 11, 2021
c252224
[ML] rename legend interface
darnautov May 11, 2021
5583f3b
[ML] unit tests for visualization, add error messages
darnautov May 11, 2021
b8ac2d3
[ML] fix typos in xy visualization tests
darnautov May 11, 2021
ab10566
[ML] support click event
darnautov May 12, 2021
1b9d09f
[ML] add xDomain for time series data
darnautov May 12, 2021
f7b53ce
[ML] support empty Y axis
darnautov May 12, 2021
75d3440
[ML] change legend default position
darnautov May 12, 2021
f402b58
[ML] getTimeZone util
darnautov May 12, 2021
7b57130
[ML] hide suggestions for reorder
darnautov May 12, 2021
4f32606
[ML] support brush event
darnautov May 12, 2021
b9faf1c
[ML] update unit tests
darnautov May 12, 2021
deb0436
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 12, 2021
ed0bee2
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 19, 2021
b581f1c
[ML] render grid lines in preview
darnautov May 19, 2021
c31d336
[ML] don't display errors on init
darnautov May 20, 2021
4548731
[ML] utilize chartsThemeService
darnautov May 20, 2021
e236ff1
[ML] support histogram for the vertical axis
darnautov May 20, 2021
6283fb0
[ML] fix clearLayer
darnautov May 20, 2021
cf62bc8
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 25, 2021
5ed1d2e
[ML] show empty placeholder on no data
darnautov May 25, 2021
356109c
[ML] fix X domain min
darnautov May 25, 2021
2cde585
[ML] reject suggestions for 3 or more buckets
darnautov May 25, 2021
60c0caa
[ML] suggestions for histograms and histogram for Y-axis
darnautov May 25, 2021
1c4ba88
[ML] fix unit tests
darnautov May 25, 2021
9c0c0ff
[ML] update suggestions for active heatmap
darnautov May 26, 2021
abab529
[ML] chart data test for heatmap
darnautov May 26, 2021
9c97eae
[ML] test for transitioning from heatmap to barchart
darnautov May 26, 2021
bbb088e
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 27, 2021
1477b7d
[ML] disable xDomain
darnautov May 27, 2021
f684b0a
[ML] support intervals in axes configurations
darnautov May 27, 2021
721c9d8
[ML] hide label on the vertical axis when there is only a horizontal …
darnautov May 27, 2021
9e0ac07
[ML] set min cell height for better suggestions preview rendering
darnautov May 27, 2021
4f4cb04
[ML] fix tooltip for empty vertical axis config
darnautov May 27, 2021
1d1c387
[ML] fix click and brushing for empty Y axis
darnautov May 27, 2021
9853d29
[ML] update functional test
darnautov May 27, 2021
e7d2637
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 28, 2021
faf208c
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov May 31, 2021
fce4288
[ML] show beta label
darnautov May 31, 2021
017fc97
[ML] fix legend control
darnautov May 31, 2021
67e52b4
[ML] dataIndex sort by default for the X axis
darnautov May 31, 2021
e8da895
[ML] use euiPaletteForTemperature with quantize color scale
darnautov May 31, 2021
d26f954
[ML] hide all suggestions
darnautov May 31, 2021
224c792
[ML] fix chart data extension issue
darnautov May 31, 2021
41523c5
[ML] fix the caret symbol positioning
darnautov May 31, 2021
067d782
[ML] update unit tests for the heatmap suggestions
darnautov Jun 1, 2021
3c645c5
Merge remote-tracking branch 'upstream/master' into lens-heatmap-chart
darnautov Jun 2, 2021
f90fe8f
[ML] replace EuiBetaBadge with EuiBadge
darnautov Jun 2, 2021
685a5bf
[ML] update functional test
darnautov Jun 2, 2021
edd83a3
[ML] fix chart switch styles
darnautov Jun 2, 2021
1021d1c
[ML] fix functional test
darnautov Jun 3, 2021
c7b46b2
[ML] return null instead of expression with a missing value accessor
darnautov Jun 3, 2021
cc47903
[ML] use table id as a chart id
darnautov Jun 3, 2021
645e34f
[ML] fix scale type for a single row of data
darnautov Jun 3, 2021
feb2b45
[ML] filter out undefined values
darnautov Jun 3, 2021
3a4443f
Merge branch 'master' into lens-heatmap-chart
kibanamachine Jun 3, 2021
3cb6b14
[ML] fix isXAxisLabelVisible
darnautov Jun 3, 2021
d699e9e
[ML] update chart_switch styles
darnautov Jun 4, 2021
4cb2f40
show warning message for the array values
darnautov Jun 4, 2021
9bb03df
remove unused code
darnautov Jun 4, 2021
ef95471
replace ts-ignore with manual type casting
darnautov Jun 4, 2021
5a25c36
add unit tests for error and warning messages
darnautov Jun 4, 2021
6d35fb7
add css class for append, conditional flex group
darnautov Jun 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import './index.scss';
import { LensBrushEvent, LensFilterEvent } from '../types';
import { desanitizeFilterContext } from '../utils';
import { search } from '../../../../../src/plugins/data/public';
import { EmptyPlaceholder } from '../shared_components';
import { LensIconChartHeatmap } from '../assets/chart_heatmap';

declare global {
interface Window {
Expand Down Expand Up @@ -83,11 +85,19 @@ export const HeatmapComponent: FC<HeatmapRenderProps> = ({
if (!dateInterval) return null;
const intervalDuration = search.aggs.parseInterval(dateInterval);
if (!intervalDuration) return null;
const minInterval = intervalDuration.as('milliseconds');
const dateRangeMin = data.dateRange?.fromDate.getTime();

if (!dateRangeMin) {
return;
}

const actualMin = dateRangeMin - (dateRangeMin % minInterval);

return {
min: data.dateRange?.fromDate.getTime(),
min: actualMin,
max: data.dateRange?.toDate.getTime(),
minInterval: intervalDuration.as('milliseconds'),
minInterval,
};
})();

Expand Down Expand Up @@ -219,6 +229,10 @@ export const HeatmapComponent: FC<HeatmapRenderProps> = ({
timeZone,
};

if (!chartData || !chartData.length) {
return <EmptyPlaceholder icon={LensIconChartHeatmap} />;
}

return (
<Chart>
<Settings
Expand Down