Question: I have a table,

```
runs  opposition  date 
10  team A  01 aug 2020
23  team B  13 sep 1975
76  team C  03 Jan 1999 
92  team A  01 aug 1982 
12  team C  01 aug 2020 
100  team B  01 aug 2008 
83  team A  01 aug 2005 
93  team B  01 aug 2006 
23  team B  01 aug 2011 
11  team A  01 aug 2019  

```

I want to plot a animated graph which will animated based on dates, teams, runs (addition of runs for teams)

note : probably I would like to create animated graphs like <https://pythonawesome.com/animated-plotting-extension-for-pandas-with-matplotlib/>

How can we plot such animated graph for table or df?

Answer: 
well i don't know about x and y but what you can do is screen shot of specific widgets with package `screenshot`, [link](https://pub.dev/packages/screenshot)

this package capture widgets as Images, even if they are not rendered on screen.

Step 1: create a controller

```
ScreenshotController screenshotController = ScreenshotController();

```

Step 2: wrap widgets with `Screenshot()`

```
Screenshot(
    controller: screenshotController,
    child: Text("This text will be captured as image"),
),

```

step 3: Take the screenshot by calling capture method. This will return a Uint8List

```
screenshotController.capture().then((Uint8List image) {
    //Capture Done
    setState(() {
        _imageFile = image;
    });
}).catchError((onError) {
    print(onError);
});

```
Through RepaintBoundary widget you can take screenshot of specific area which you want. I put one example at here which I performed in my project. Please go with it. I hope it will helpful to you surely.

Declare globalkey first...

```
 GlobalKey globalKey = GlobalKey();

```

Then wrap your widget with RepaintBoundary like below with use of this globalKey.

```
 RepaintBoundary(
            key: globalKey,
            child: Obx(() {
              return Container(
                decoration: BoxDecoration(image: DecorationImage(image: NetworkImage(mainController.imageName.value))),
                height: 390,
                width: 390,
                child: Stack(
                  children: generatedNameWidgets,
                ),
              );
            })),

```