WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 97a0f7e

Browse files
committed
AG-15406 Update example to use flashOnUpdate
1 parent 367932d commit 97a0f7e

File tree

1 file changed

+3
-13
lines changed
  • packages/ag-charts-website/src/content/docs/flash-on-update/_examples/flash-on-update

1 file changed

+3
-13
lines changed

packages/ag-charts-website/src/content/docs/flash-on-update/_examples/flash-on-update/main.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,13 @@ const options: AgCartesianChartOptions<DataType> = {
8282
position: 'left',
8383
},
8484
},
85+
flashOnUpdate: {
86+
enabled: true,
87+
},
8588
};
8689

8790
const chart = AgCharts.create(options);
8891

89-
function flashChart() {
90-
const chartBackground = document.querySelector('#myChart');
91-
chartBackground.animate(
92-
[
93-
{ background: '#cfeeff', offset: 0 },
94-
{ background: '#cfeeff', offset: 0.1 },
95-
{ background: 'transparent', offset: 1 },
96-
],
97-
{ duration: 1000, easing: 'ease-out' }
98-
);
99-
}
100-
10192
function randomize() {
10293
chart.updateDelta({ data: getRandomizedData() });
103-
flashChart();
10494
}

0 commit comments

Comments
 (0)