From 6f14ff0bcf7607ccaf91c1751ed46d73e6ca733e Mon Sep 17 00:00:00 2001 From: Juned Chhipa Date: Wed, 4 Dec 2024 16:04:21 +0530 Subject: [PATCH] update react samples to functional components --- samples/source/area/area-datetime.xml | 14 +++--- .../source/column/dynamic-loaded-chart.xml | 4 +- samples/source/index.js | 8 ++-- samples/source/line/realtime.xml | 4 +- samples/source/misc/annotations-example.xml | 4 +- samples/source/pie/donut-update.xml | 36 ++++++++------- samples/source/template.html | 44 ++++++++----------- .../timelines/multi-series-group-rows.xml | 6 ++- 8 files changed, 60 insertions(+), 60 deletions(-) diff --git a/samples/source/area/area-datetime.xml b/samples/source/area/area-datetime.xml index 6ba1aec67..a59198154 100644 --- a/samples/source/area/area-datetime.xml +++ b/samples/source/area/area-datetime.xml @@ -36,32 +36,32 @@
{% if format == 'react' %} {% endif %} {% if format == 'react' %} {% endif %} {% if format == 'react' %} {% endif %} {% if format == 'react' %} {% endif %}
@@ -486,8 +486,8 @@ selection: 'one_year', -updateData(timeline) { - this.setState({ +const updateData = (timeline) => { + setState({ selection: timeline }) diff --git a/samples/source/column/dynamic-loaded-chart.xml b/samples/source/column/dynamic-loaded-chart.xml index 0784c89d7..e064af064 100644 --- a/samples/source/column/dynamic-loaded-chart.xml +++ b/samples/source/column/dynamic-loaded-chart.xml @@ -269,7 +269,7 @@ function updateQuarterChart(sourceChart, destChartIDToUpdate) {