How do I count bucket data rows and display it in a pie chart?

How do I count bucket data rows and display it in a pie chart?
That’s it. I just wanna count the current amount of data in my bucket. I’m fairly new to this. It’s been a week.

help

Ran

Hi @smartxholding,
You can try this code to get the amount of data in your bucket:
const account = new Account({ token: ‘Your-account-token’ });
const result = await account.buckets.amount(‘bucket_id’);