fix(plugin-chart-echarts): [feature-parity] apply button of annotation layer doesn't work as expected (#19761)

* fix(plugin-chart-echarts): [feature-parity] apply button of annotation layer does't work

* fix: lint

* fix: test
This commit is contained in:
Stephen Liu
2022-06-08 17:06:24 +08:00
committed by GitHub
parent 8e46ae5c6a
commit 9f02ff656d
5 changed files with 48 additions and 65 deletions

View File

@@ -180,54 +180,54 @@ describe('EchartsTimeseries transformProps', () => {
...formData,
annotationLayers: [event, interval, timeseries],
},
queriesData: [
{
...queriesData[0],
annotation_data: {
'My Event': {
columns: [
'start_dttm',
'end_dttm',
'short_descr',
'long_descr',
'json_metadata',
],
records: [
{
start_dttm: 0,
end_dttm: 1000,
short_descr: '',
long_descr: '',
json_metadata: null,
},
],
annotationData: {
'My Event': {
columns: [
'start_dttm',
'end_dttm',
'short_descr',
'long_descr',
'json_metadata',
],
records: [
{
start_dttm: 0,
end_dttm: 1000,
short_descr: '',
long_descr: '',
json_metadata: null,
},
'My Interval': {
columns: ['start', 'end', 'title'],
records: [
{
start: 2000,
end: 3000,
title: 'My Title',
},
],
],
},
'My Interval': {
columns: ['start', 'end', 'title'],
records: [
{
start: 2000,
end: 3000,
title: 'My Title',
},
'My Timeseries': [
],
},
'My Timeseries': [
{
key: 'My Line',
values: [
{
key: 'My Line',
values: [
{
x: 10000,
y: 11000,
},
{
x: 20000,
y: 21000,
},
],
x: 10000,
y: 11000,
},
{
x: 20000,
y: 21000,
},
],
},
],
},
queriesData: [
{
...queriesData[0],
},
],
});