Using AngularJS with Kendo UI to Chart Data

0 Answers 266 Views
General Discussions
karai
Top achievements
Rank 1
karai asked on 09 Mar 2022, 06:34 AM

This is more of a general question about how charts work and how data manipulation works. I have an issue where I am lacking the vocabulary to explain what I want to my developer,

I have a large table in sql. I have a webapp that I use to view the data in a kendo ui grid, and it is written in angularjs and jsp,

I think it would be best to illustrate with a simple example:

I sell apples, and I log in every apple into my inventory along with all of the characteristics of the apple, like color, the date I bought it, the date it was sold, the condition of the apple (rotten/not rotten), the name of the farm the apple came from, plus a lot more about the apple.

I want to chart the number or green apples that were marked sold each day for the past month, and then compare that to the number of red apples that were marked sold per day over the past month.

I am essentially counting the rows that match the filtering (color = green, availability = sold) and then plotting them based on the date sold column

This is something I might make a pivot table for in excel and then graph from that

I want to explain this to him and give links of examples, where I am not plotting numbers in the database, I'm summing the number of rows that match specific filtering and then plotting the per day total over specific date range.

My googlefoo is failing me so I thought I would ask someone who has done something similar to this and what it is called so I can search more efficiently for answers.

Thank you in advance for your help!

Nikolay
Telerik team
commented on 14 Mar 2022, 07:32 AM

Hi Karai,

I am not 100% sure I understand the requirement so I will try to ask questions that will help me better understand it.

Do you need to show the data (red sold apples and green sold apples) in a Kendo UI Chart? If this is so I can suggest declaring a Column Chart with 2 series that will display the relevant data for the past month. Here is an example of what you can achieve:

Additionally, you can perform operations like filtering and sorting over the dataSource before passing it to the Chart so you get the desired result. Below I will post some of these operations:

Filter: https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/filter

Sort: https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/sort

Group: https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/group

Let me know if this helps.

Regards,

Nikolay

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
karai
Top achievements
Rank 1
Share this question
or