fix(plugin-chart-handlebars): fix overflow, debounce and control reset (#19879)

* fix(plugin-chart-handlebars): fix overflow

* add debounce, fix reset controls

* fix deps

* remove redundant code

* improve examples

* add last missing resetOnHides

* fix test

* use isPlainObject
This commit is contained in:
Ville Brofeldt
2022-04-28 16:38:23 +03:00
committed by GitHub
parent 1d50665da0
commit d5ea537b0e
15 changed files with 56 additions and 171 deletions

View File

@@ -31,15 +31,12 @@ describe('Handlebars tranformProps', () => {
height: 500,
viz_type: 'handlebars',
};
const data = [{ name: 'Hulk', sum__num: 1, __timestamp: 599616000000 }];
const chartProps = new ChartProps<QueryFormData>({
formData,
width: 800,
height: 600,
queriesData: [
{
data: [{ name: 'Hulk', sum__num: 1, __timestamp: 599616000000 }],
},
],
queriesData: [{ data }],
});
it('should tranform chart props for viz', () => {
@@ -47,9 +44,7 @@ describe('Handlebars tranformProps', () => {
expect.objectContaining({
width: 800,
height: 600,
data: [
{ name: 'Hulk', sum__num: 1, __timestamp: new Date(599616000000) },
],
data,
}),
);
});